D
The function basically checks to see if the analog input is within range (4 to 20mA), and if not sets an alarm bit (after a time period). The alarm bits, scaled analog values, and fail-timer accumalated values being stored in datablocks (these all available to LOI - as status).
The problem:
This function block is called for all analog inputs, from another function block.
Yet the results obtained during testing showed that for different inputs, the time taken for the alarms to be raised differed. Some alarms were generated instantly, others after the fail-timer had expired, and one alarmed usually after a time had expired, but sometimes instantly...
I don't think there is a problem with the code. So I would like to know if anyone else has had quirky problems relating to datablock usage, or timer usage.
I've also noticed previous problems where simple timer code did not appear to work (a password log-in time remaining status), but then later started to work (the only thing that had changed, was that a couple more timers had been used in other bits of the code).
Therefore, do you have to configure/increase memory areas (add timers, or increase the length of used datablocks), in order for the code to work correctly???
Please tell me I am not crazy...
The problem:
This function block is called for all analog inputs, from another function block.
Yet the results obtained during testing showed that for different inputs, the time taken for the alarms to be raised differed. Some alarms were generated instantly, others after the fail-timer had expired, and one alarmed usually after a time had expired, but sometimes instantly...
I don't think there is a problem with the code. So I would like to know if anyone else has had quirky problems relating to datablock usage, or timer usage.
I've also noticed previous problems where simple timer code did not appear to work (a password log-in time remaining status), but then later started to work (the only thing that had changed, was that a couple more timers had been used in other bits of the code).
Therefore, do you have to configure/increase memory areas (add timers, or increase the length of used datablocks), in order for the code to work correctly???
Please tell me I am not crazy...