In many cases, the machine or device requires some or a format initializations so that it can enter the basic readiness state. If the user manually enters the data is very slow, and prone to error. The special flag M8002 can be used for creating an auto-initialization program.
2. I/O list
|Reset button||X10||Manual initialization|
|M8002||Initial pulse of PLC|
|M15||Flag of manual initialization|
The special relay M8002 is turned on once during the initial scan of the program. This means that any instruction associated with M8002 is executed only once during power-up, this is an ideal initialization process. This process can reset the data register, set the component on and off, but also can reset the counter.
The example also shows a manual button placed in parallel with the M8002, it allows the user to force initialization at any time the program is running.