4. Motion Control Instructions 4.6.23. TON_ms Explanation of the instruction: When EN is on, the input IN is On, the current value ET starts timing from 0 on; as the current value ET is greater than or equal to the preset value PT, the output TON turns on. After ET reaches PT value, the timing will not be stopped till ET reaches maximum 4294967295. When the input IN is off, the current value ET of the timer is cleared as 0 and the output TON is reset. The preset value PT is effective immediately after being changed. TON_ms is an on-delay timer with 1ms as the timing unit. Explanation of input and output parameter of the instruction: Note:
For the sequence chart of TON_ms, please refer to the program example of TON_s. DVP-MC operating manual 4-127 API On-delay timer Controller TON ms 150 _ 10MC11T Parameter Data Available Explanation name type device EN The execution condition of this instruction. “TON ms” instruction is executed as “EN” turns on; the _ output TON and the current value ET keep unchanged as “EN” turns off. BOOL M,I,Q, constant IN As “IN” is on, the timer starts timing; as “IN” is off, the current value ET of the timer is cleared as 0 and the output TON is reset.
BOOL M,I,Q, constant PT Preset timing value of the timer UDINT Constant,D TON “TON” is on as the current value of the timer is greater than or equal to the preset value PT. BOOL M,Q ET The current value of the timer. UDINT D