Chapter 6 Applied Instructions 11. When the signal is rising- or falling-edge triggered, and the PLC completes processing the filters, the PLC reads the high-speed counter value and adds one in the value of the head index. The PLC then records the entering and leaving counter results for each work station. The compared counter result is the current counter value + reference value + observational error. For either rising- or falling-edge triggered, the value of the head index is incremented. The maximum value for the head index mx2 (the maximum number of objects). 12.
The value of the head index is cyclically incremented, when the signal is rising- or falling-edge triggered and completes processing the number of filters (the default for trigger input is OFF). The maximum value for the head index is mx2 (the maximum number of objects). For example, if you set the number of objects to 10, the value of the head index (default: 0) is incremented to 1, 2, 3 to 20 and then 1, 2, 3 to 20 repeatedly. When the value of the head index is 0, it means no object has entered after executing the instruction. The PLC adds one to the value of the head index, and then checks the value of the tail index.
If the value (after adding one) in the value of the head index equals the value of the tail index, the PLC cancels the addition and records the counter result. 13. When the instruction is executed and the state of the initial input is OFF , the rising-edge trigger corresponds to the odd numbers of the head index value, and the falling-edge trigger corresponds to the even numbers of the head index value. 14. When the PLC executes the instruction and the state of the initial input is ON , the falling-edge trigger corresponds to the odd numbers of the head index value, and the rising-edge trigger corresponds to the even numbers of the head index value. 15.
When the PLC executes the instruction, it does not clear the values in the accumulated area and the index areas. If 6_ the data is in a latched area and needs to be enabled again, use the ZRST instruction to clear the values in the head and tail indexes. Example Refer to the example in the YOUT instruction (API 0710) for more information. 6-221