![Xinje XD Series User Manual Download Page 347](http://html.mh-extra.com/html/xinje/xd-series/xd-series_user-manual_887444347.webp)
346
PLSF HD0 K1 Y0
SM2
DMOV K10000 HD0
M0
FEND
I0000
IRET
END
STOP Y0 K1
SM0
DMOV K30000 HD0
IRET
I0100
SM0
DMOV K20000 HD0
IRET
I0200
SM0
( R )
M0
Program explanation
1.
SM2 is ON, set HD0 to 10000, set on M0, PLSF instruction will send 10000Hz pulse,
the object will move from origin to A.
2.
When the object touches A, X0 will be ON at once, the external interruption I0000 will
work, HD0 is set to 30000, the object will move from A to B with the speed of 30000Hz.
3.
When the object touches B, X1 will be ON at once, the external interruption I0100 will
work, HD0 is set to 20000, the object will move from B to C with the speed of 20000Hz.
4.
When the object touches C, X2 will be ON at once, the external interruption I0200 will
work, M0 is set OFF, the pulse sending will stop at once.
Example 2
The diagram is the product packing machine. The robot will pack the product when 30
products are detected, the robot and counter will be reset after packing completed. To
improve the working efficiency, the product sending speed is very fast, the sensor X2 detects
the product time is 8ms, PLC input terminal filter time is 10ms, the normal counter cannot
detect the products. We can use the external interruption to count the products.