What is Sinumerik MSG Command?
Using Siemens Sinumerik MSG statement MSG(), any character string from the part program can be output as message to the operator.
These messages can be of any kind from informational to real-time critical data display messages.
Read complete article about MSG command Sinumerik MSG Command to Display Messages to CNC Operator
How to Show Blinking Message with Sinumerik MSG Command?
In some critical situation we (cnc programmer) want immediate attention of cnc operator (by showing him a blinking message) and want him to abort the program as well.
Code Sample 1
so in cnc program we can write
N20 IF $AA_IW [X] <= 15 GOTOF ERROR_01 ... ... ... ERROR_01: MSG ("Attention Please!") M30
The above code will fail because when the message will be displayed, immediately it will be removed by the M30 code which resets it.
Code Sample 2
So we can write
N20 IF $AA_IW [X] <= 15 GOTOF ERROR_01 ... ... ... ERROR_01: MSG ("Attention Please!") M00 ... ...
of course this will show the message and will stop the machine immediately,
but what we want is that operator immediately abort the program,
but in this situation if he presses Cycle-Start instead of Reset Button the program will continue to run.
Code Sample 3 – Final Code to Show Blinking Message
So a better solution is below
N20 IF $AA_IW [X] <= 15 GOTOF ERROR_01 ... ... ... ERROR_01: MSG ("Attention Please!") G04 F1.5 MSG() STOPRE G04 F2 GOTOB ERROR_01 ... ...
The above cnc program code will display a message for 1.5 seconds then it will remove the message with MSG() and then will wait for next two seconds, and then will loop again with GOTOB
This whole process will display a blinking message to the cnc operator, and the program can’t be run until the operator presses the RESET button which will reset the program and stops the cnc machine.