436
Technical support / Re:Serial communications
« on: April 12, 2011, 01:07:20 PM »
I notice that you are using:
CLRIO NEXT_CALL <-- first line of custom function
SETIO NEXT_CALL <-- almost last line of custom function
Are you expecting that the RELAY NEXT_CALL will generate a pulse that will advance a COUNTER? If yes, then this will not work. The ladder logic is suspended until your custom function completes, so the ladder logic will only "see" the final state of NEXT_CALL
If you are going to advance a sequencer no more often than once per second you could do something like the following. In your custom function you could do a CLRIO NEXT_CALL to disable the sequencer from advancing.
CLRIO NEXT_CALL <-- first line of custom function
SETIO NEXT_CALL <-- almost last line of custom function
Are you expecting that the RELAY NEXT_CALL will generate a pulse that will advance a COUNTER? If yes, then this will not work. The ladder logic is suspended until your custom function completes, so the ladder logic will only "see" the final state of NEXT_CALL
If you are going to advance a sequencer no more often than once per second you could do something like the following. In your custom function you could do a CLRIO NEXT_CALL to disable the sequencer from advancing.