Program code
N100 ENDIF
…
N200 PHASE=4
N210 IF EXTDEVICE
N220 OUTPUT=SPRINT("End phase: %D",PHASE)
N230 WRITE(RESULT,"LOCAL_DRIVE/my_file.txt",OUTPUT)
N240 ENDIF
…
See also
String operations (Page 447)
Write file (WRITE) (Page 565)
3.23.5 Alarms (SETAL)
Alarms can be set in an NC program. Alarms are displayed in a separate field at the user
interface. An alarm always goes hand in hand with a response from the control according to the
alarm category.
Syntax
SETAL(<No>[,<String>])
Meaning
SETAL(...): Predefined procedure for setting an alarm
SETAL must be programmed in a separate NC block.
<No>: Alarm number
Data type: INT
Range of val‐
ues:
60000 ... 64999 (reserved) Alarms for SIEMENS cycles
65000 ... 69999 Alarms for user cycles
<String>: Character string (optional)
Data type: STRING
When programming user cycle alarms, a character string with up to four parameters
can be specified.
Variable user texts can be defined in these parameters.
The following predefined parameters are available:
%1 Channel number
%2 Block number, label
%3 Text index for cycle alarms
%4 Additional alarm parameters
Work preparation
3.23 Additional functions
NC programming
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0 1001