Example 1b: CNC spindle, internal and synchronised by the PLC

Programing Example

prg_example

CNC spindle, internal and synchronised by the PLC

To achieve output of M functions to the PLC, the PLC_INFO bit is set in the synchronisation method.

The spindle then always executes the corresponding command immediately (asynchronously). However, corresponding to the synchronisation method, the path motion is also synchronised by the PLC acknowledgement.

Initialisation in the axis parameter list

kenngr.achstyp           0x00000004      Spindle

Initialisation 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

CNC spindle, internal and synchronised by the PLC
CNC spindle, internal and synchronised by the PLC

The feed motion X100 is started after both the spindle and the PLC confirm execution of the M3 command.