PID Periodic Task & redundant system

Ken Roach said:
Don't be too focused on the "all I did...." aspect of this troubleshooting. Maybe something in these shutdown routines is malfunctioning that did not previously, and it has nothing to do with the PID.

This is what the fault information in the secondary controller will tell you. The rest of the "Array subscript too large" error message tells you which task, which routine, even which rung is responsible for the controller fault. There, and only there, is the root of your problem.

Hi Ken
Thank you very much for your kind support, i think, i am pretty sure that i got the problem and i fixed it as well. But i will see tomorrow if it faulted during the night time or not.

The problem was in the PID task i was assigning a number to a variable and i was using the same variable as one of the indexes of the array in my Main task. And i guess it might be due to the timing issues that this fault was getting trapped depending upon how the last time PID task was executed. Atleast thats my guess, but i will inform you tommorrow if the faults came in again. Thanks a lot for your guidence once again.
 
Originally posted by plcnovel:

And i guess it might be due to the timing issues ...

Periodic tasks will interrupt the program scan wherever it may be when the period expires. So you were running into cases where the periodic task interrupt was occurring after your index limit checks but before the index was used. Essentially the interrupt occurred between instructions. This interrupt point will occur at random depending on the loic that happened to execute and any other variable processor loads. Given a program of your size there are alot of possible interrupt points. That's why it took a while for it to happen.

This issue (and it's brother, the 'Intermediate Calculation Used In An Interrupt) are somewhat common when using periodic tasks. In your case it sounds unintentional. However, it's something you simply need to know can happen and you protect against.

Keith
 

Similar Topics

Hello. I'm trying to figure out if it is better to have multiple PID loops in 1 periodic task, or have several (5) periodic tasks? I'm thinking 5...
Replies
4
Views
3,627
Hi, I would like to assemble a simulator/practice booster pump system that uses PID to maintain steady water pressure under various outlet demands...
Replies
0
Views
89
Hello, I have a motor that we are sending a RPM Speed Output from 0-100% to the VFD. However, the Motor HP needs to be limited to 6000 HP and the...
Replies
3
Views
95
I have S7 1512C controler for controlling 48 PID temperature loop, the output is PWM. Please I need the best, most efficient way to write the...
Replies
13
Views
625
Hi all, I'm having trouble solving a problem I've been working on for several months, and thought you might like a stab at it. The machine runs...
Replies
22
Views
969
Back
Top Bottom