S7-200 programs instructions cannot be used

S7-200 programs, there are those that do not can be used? I did a lot of subroutines, subroutine repeatedly calls without any problems, but there is a subroutine is invoked, each loop inside the first command that calls the subroutine works, while the second call is null and void. If this subroutine and then recopy it, is also a subroutine, which is completely different, just different subprograms, the two calls are normal. Because subroutines using the EU command? R or s is used should not be a problem.
S7-200 PLC 2009 Chinese version of the system manual 204 page says: when the subroutine is called multiple times in the same period, you cannot use the rising edge, falling edge, timers, and counters command.
S7-300/400 number of timers, counters can be set to block input parameter, specifies a different number at each call, timer and counter argument. S7-200 you do not have this feature, use a fixed timer number only in the subroutine. If more than one control object calls the subroutine, different control objects use the same timer counter will produce disastrous results.
Whether there is a rising and falling edge, must go through two scan cycle to determine, before a scan cycle read triggers, and stored to an address within the trigger signal with the scanning cycle compared with the State.
S7-300/400 rising edge, falling edge, directives need to be specified before saving a bit address of the scanning cycle. S7-200 rising edge, falling edge, instructions of the previous status of the scan cycle is saves the operating system. But since only a variant of the previous status of the scanning cycle, so when the program is called multiple times in the same period, you cannot use the rising edge, falling edge, instructions.

Leave a Reply

Your email address will not be published. Required fields are marked *