DanP Posted May 25 Share Posted May 25 Hello, I have 5 manifolds that have fluid running through them and if a clog is detected, then I want to purge just that manifold by triggering a sequence. My issue is that I have 5 channels named WaterManifold0, WaterManifold1, etc to WaterManifold4. I really just want to be able to say manifold = 0 or Manifold =1 and then add that to "WaterManifold" such that I get "WaterManifold0" Can I use: private string WaterManifold = WaterManifold + Manifold Then inside the sequence It will turn on just that manifold (WaterManifold because now WaterManifold = WaterManifold4 for example) for the specified time, turn it back off, then start the normal sequence. Here is the sequence that it would trigger: private string WaterManifold = WaterManifold + Manifold CleanCycle=1 Sequence.WM1.End() Sequence.WM2.End() Sequence.WM3.End() Sequence.WM4.End() Sequence.WM5.End() WaterManifold0=1 WaterManifold1=1 WaterManifold2=1 WaterManifold3=1 WaterManifold4=1 WaterManifold5=1 CleanOut = 0 ReCirc = 1 delay (7) WaterManifold=0 delay(tClean) WaterManifold=1 CleanCycle=0 Sequence.StartUp.Begin() Thank you Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted May 25 Share Posted May 25 OK. You are kind of on the right track but have some syntax errors, and you need to use the execute() function. First you need to build a string with the channel name. You were close with: private string WaterManifold = WaterManifold + Manifold but the syntax is wrong. You want: private string waterManifold = "WaterManifold" + manifold Then to set whatever manifold it references to 0, you would do: execute(waterManifold + " = 0") doing what you did: waterManifold = 0 would put a "0" in the private string variable waterManifold that you created. A few other things. Why are you opening all the other manifolds? That, presumably will interfere with the main sequence right? I guess I need to see the rest of your logic. It seems like maybe you have 5 sequences, one for each manifold. In that case, you don't need to start another sequence to clear the clog. You can just call the sequence as a function. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.