For this to work we must now enter the print commands into the CNC program - here is a Fanuc example (it is different for other types of control):
O1234 | |
POPEN | Open the RS-232 port |
DPRNT[MAXCYCLESTART] | Print MAXCYCLESTART |
PCLOS | Close the port |
· · · | |
Rest of CNC program | |
· · · | |
POPEN | Open the port |
DPRNT[MAXPARTCOMPLETE] | Print MAXPARTCOMPLETE |
G04 D1000 | Delay for 1 second |
DPRNT[MAXCYCLESTOP] | Print MAXCYCLESTOP |
PCLOS | Close the port |
M30 |
![]() |
Using this method cannot tell you when the machine stops in the middle of a program as the MAXCYCLESTOP command will never be reached. MDC-Max can get around this by setting a maximum cycle time but it is not as accurate as using an MDC hardware box in the machine. |
You can mix and match the hardware and software method on these types of controls. The box tells you when the machine starts and stops and a DPRNT is used to tell you when a palette machine changes palette or a part is completed.