Example 1b: CNC spindle, synchronized internally and by the PLC
To achieve output of the M functions to the PLC, the PLC_INFO bit is set in the synchronization mode.
The spindle always executes the corresponding command immediately (asynchronously). Corresponding to the synchronization method, the contouring motion however is additionally synchronized with the acknowledgement by the PLC.
Initialization in the axis parameter list
kenngr.achstyp 0x00000004 Spindle
Initialization in the channel parameter list
spindel[0].m3_synch 0x00020002 MVS_SVS, PLC_INFO
spindel[0].m4_synch 0x00020004 MVS_SNS, PLC_INFO
spindel[0].m5_synch 0x00000004 MVS_SNS
spindel[0].m19_synch 0x00000004 MVS_SNS
Programming example
The feed motion X100 is started after both the spindle and the PLC have confirmed execution of the M3 command.