Dear all, I need to know whether the way I am handling the below mentioned scenario is correct or not?
Scenario:
1. Through HMI(Graphics Page,using vijeo citect) user triggers one process.
2. The process needs to poll few analog inputs which are increasing with time and take certain action once the input reaches a particular value and that's set, no need to read these input again until next cycle when user triggers the
process again through HMI.
3. Once triggered the above mentioned polling needs to done very frequently and all other scans can wait which means this is having highest priority.Hence to implement this polling and comparison logic , I use timer event which is periodically(100ms) executed again and again till the read analog input value reaches a particular value.
4.At the start of the processing I keep the event processing inhibited by writing 0 at %S38(System Bit).When user triggers this polling process the event processing is enabled by writing 1 to %S38 bit and thus the timer event starts to run periodically.
5. Now my doubt is that, once analog input has reached the required specific value and all action has been taken, this event processing must stop, so can I do it by resetting %S38 bit in event logic itself.I am using FBD in event logic ,will a logic resetting %S38 stop the event processing further? I have no way to test it presently.
6. Will this work and even if it does, is this the best way to handle this scenario?
I can give any more details required.
Kindly help. Looking forward to the valuable inputs.!!!!
Scenario:
1. Through HMI(Graphics Page,using vijeo citect) user triggers one process.
2. The process needs to poll few analog inputs which are increasing with time and take certain action once the input reaches a particular value and that's set, no need to read these input again until next cycle when user triggers the
process again through HMI.
3. Once triggered the above mentioned polling needs to done very frequently and all other scans can wait which means this is having highest priority.Hence to implement this polling and comparison logic , I use timer event which is periodically(100ms) executed again and again till the read analog input value reaches a particular value.
4.At the start of the processing I keep the event processing inhibited by writing 0 at %S38(System Bit).When user triggers this polling process the event processing is enabled by writing 1 to %S38 bit and thus the timer event starts to run periodically.
5. Now my doubt is that, once analog input has reached the required specific value and all action has been taken, this event processing must stop, so can I do it by resetting %S38 bit in event logic itself.I am using FBD in event logic ,will a logic resetting %S38 stop the event processing further? I have no way to test it presently.
6. Will this work and even if it does, is this the best way to handle this scenario?
I can give any more details required.
Kindly help. Looking forward to the valuable inputs.!!!!