|
The counter Z12 increases each time input E0.0 is closed and then returns to zero corresponding to the closure of input E0.1. The output A2.0 is activated when the value of the count is zero. The reset input (R) to counter Z12 connects to a contact of E0.1 whereas the increase (ZV) connects to a contact of E0.0. The rising edge of E0.1 produces a reset of the counter, that is, the count value is programmed to 0. On each rising edge of E0.0 the count is increased by 1 unit. The output from the counter (Q) is high when the value of the count is not equal to 0. All that is required is to invert it to control output A2.0 of the PLC in the same way as in path 2.
The first group of statements of the AWL program increases the value of the counter Z1 by 12 unit on each rising edge of E0.0. The second group resets the counter corresponding with the rising edge of E0.1. The last group transfers the complement of the status of the counter to output A2.0.
More examples: |