NevisGroup
Member
Hello All:
I have a situation where I have 110 PID loops. For the most part they are all tuned the same but there are always a couple that need special attention. I created an array of 110 PID structures and all is well. I also created one stand alone PID structure that the HMI points to. So to muck with the parameters of the loop I just copy the PID[X] structure into HMI_PID struct. This way the HMI only needs to know about the one struct. With me so far?
The problem with this approach is that I have to continuously copy PID[X] into HMI_PID to keep it live on the HMI. That's all fine and dandy till I want to change a parameter (ie a gain) on the HMI. I cant just copy HMI_PID back over PID[X].
In C I would create a pointer to the PID[X] struct and work with it directly. Is there such a thing in Logix? It would be an alias that I can change the base address of on the fly.
Any Ideas. I have run into this more times than I can count. Not just PID's, Motion Control structs are another place were this happens to me.
(BTW before you tell me to interlock the reads and write in ladder, remember that the tag updates happen async to ladder scans.)
Thanks in advance
I have a situation where I have 110 PID loops. For the most part they are all tuned the same but there are always a couple that need special attention. I created an array of 110 PID structures and all is well. I also created one stand alone PID structure that the HMI points to. So to muck with the parameters of the loop I just copy the PID[X] structure into HMI_PID struct. This way the HMI only needs to know about the one struct. With me so far?
The problem with this approach is that I have to continuously copy PID[X] into HMI_PID to keep it live on the HMI. That's all fine and dandy till I want to change a parameter (ie a gain) on the HMI. I cant just copy HMI_PID back over PID[X].
In C I would create a pointer to the PID[X] struct and work with it directly. Is there such a thing in Logix? It would be an alias that I can change the base address of on the fly.
Any Ideas. I have run into this more times than I can count. Not just PID's, Motion Control structs are another place were this happens to me.
(BTW before you tell me to interlock the reads and write in ladder, remember that the tag updates happen async to ladder scans.)
Thanks in advance