kebo2K
Electrical
- Nov 28, 2007
- 7
Hi,
I am a programmer that has been given that task of writing code for a Compact Logix controller. I have worked with opto22 and CTC PAC systems before, but never with AB stuff, and am having difficulty with a few (hopefully basic) concepts. My project involves monitoring and controlling temperature, level, pH, etc. in a number of tanks. Since each tank will monitor that same things, I have created a user defined type that includes all the variable for a 'generic' tank. I have also created an array of generic tanks whose size is equal to the number of tanks.
Question 1.
How do I alias IO to members of my tank variables ? That is how do I alias Local:3:I.Ch0Data to Tank[2].Temperature for example ?
Question 2.
Being that I don't know any ladder logic, I would like to do as much coding as possible in Structured Text and if not there, then I would like to be in Sequential Function Charts. Is there a way in either of those to implement a For Next loop so that I can iterate through my array of user defined tanks? If so how?
Any and all feedback is welcome and thanks for reading
kevin
I am a programmer that has been given that task of writing code for a Compact Logix controller. I have worked with opto22 and CTC PAC systems before, but never with AB stuff, and am having difficulty with a few (hopefully basic) concepts. My project involves monitoring and controlling temperature, level, pH, etc. in a number of tanks. Since each tank will monitor that same things, I have created a user defined type that includes all the variable for a 'generic' tank. I have also created an array of generic tanks whose size is equal to the number of tanks.
Question 1.
How do I alias IO to members of my tank variables ? That is how do I alias Local:3:I.Ch0Data to Tank[2].Temperature for example ?
Question 2.
Being that I don't know any ladder logic, I would like to do as much coding as possible in Structured Text and if not there, then I would like to be in Sequential Function Charts. Is there a way in either of those to implement a For Next loop so that I can iterate through my array of user defined tanks? If so how?
Any and all feedback is welcome and thanks for reading
kevin