Programming
Notice
Modality for this command refers to the complete runtime of the controller.
The individual parameters can be edited using CNC objects. The last value written is valid. This value is retained in the following uploads.
Syntax: | |
#DIAGNOSIS [SYN] [WAIT] [UPLOAD=.. FILE =.. PATH =.. TOPICS =.. HISTORY_NBR =.. MODE =.. ] | |
| |
SYN | The NC command is executed synchronously with the processing time in the interpolator. Without SYN, the upload is already executed at the time the program is decoded. |
WAIT | The NC program is interrupted until the upload ends. Wait may take place synchronously (SYN) in the interpolator or at the time the program is decoded. |
UPLOAD=.. | Command the upload (otherwise only new parameters are set):
|
FILE=.. | Name of the diagnosis data output file: If FILE is unassigned, the value in P-STUP-00112 is used or the last value that was written by the CNC object diag_upload_file_w. When the output file is specified with an absolute path, the path specified in P-STUP-00111 is ignored. |
PATH=.. | Directory path for output file: If PATH is unassigned, the value in P-STUP-00111 or the current path (default) is used. |
HISTORY_NBR=.. | Number of diagnosis data output files to be saved. The numbering has a value range from 0 to HISTORY_NBR - 1. HISTORY_NBR = 1 (default) means that every file is overwritten at the next upload. If HISTORY_NBR is unassigned, the value in P-STUP-00114 or the default value 1 or the last value written by the CNC object diag_upload_history_nbr_w is used. |
MODE=.. (as of Build V2.11.2059) | Mode in the form of a string in order to modify each individual diagnosis upload. |
FORMAT=.. | Permitted identifiers: STANDARD, REGRESSION and PROTOCOL_INFO Replaced by MODE |
TOPICS=.. | Identifiers in the form of a string to specify each individual diagnosis upload. If no identifiers are specified, the identifiers in P-STUP-00115 or all identifiers (default) or the last value written by the CNC object diag_upload_topics_w is used. For identifiers see the TOPICS table below. |
TOPICS table
Identifier | Meaning |
MIN | Minimum upload |
AX_DRVR | axes |
IPO | Interpolation |
IPO_BLCK | Interpolator function blocks |
LOG | Logging the individual BFs of the CNC |
AX_MGR | Axis management |
DEC | Decoder |
PPREP | Path preparation |
HLI | PLC interface |
MAN | Manual mode |
SIG | Signal/Wait handshake |
COM | Communication |
VARS | External variables |
SAI | Single-axis interpolation (spindle) |
SAI_BLCK | SAI function blocks |
TRC | Tool radius compensation |
ERR | Error messages |
ALL | All data (default) |
Diagnosis upload mode | Meaning |
STANDARD | Default upload with no further functions |
REGRESSION | Formatting for regression test |
PROTOCOL_INFO | Additional information about the upload procedure |
MSG_FLUSH_OFF | Deactivate automatic flush for messages to ISG_DIAG_BED at the start of the diagnosis upload. |
Programing Example
Using the #DIAGNOSIS command
N400 #DIAGNOSIS SYN WAIT [HISTORY_NBR=4]
N401 #DIAGNOSIS WAIT [FILE=diag_data_syn_wait.txt]
N402 #DIAGNOSIS SYN WAIT [TOPICS="IPO MAN DEC"]
N403 #DIAGNOSIS SYN WAIT [UPLOAD]
N404 #DIAGNOSIS SYN [UPLOAD PATH =D:\]
N405 #DIAGNOSIS SYN WAIT [UPLOAD=TO_FILE|TO_SCREEN
TOPICS=DEC+IPO FILE=diag_data_syn.txt]
N406 #DIAGNOSIS [MODE = REGRESSION HISTORY_NBR = 5]
N407 #DIAGNOSIS WAIT [UPLOAD]
N408 #DIAGNOSIS [MODE = STANDARD+REGRESSION+PROTOCOL_INFO]
N409 #DIAGNOSIS WAIT [UPLOAD=TO_SCREEN MODE = STANDARD TOPICS=" IPO MAN DEC "]
N410 #DIAGNOSIS SYN WAIT [UPLOAD=TO_FILE MODE = STANDARD|PROTOCOL_INFO|MSG_FLUSH_OFF TOPICS=DEC|IPO]
The contents of the next 4 lines are identical
N411 #DIAGNOSIS WAIT [TOPICS="IPO MAN DEC"]
N412 #DIAGNOSIS WAIT [TOPICS= IPO+MAN+DEC]
N413 #DIAGNOSIS WAIT [TOPICS="IPO,MAN,DEC"]
N414 #DIAGNOSIS WAIT [TOPICS= IPO|MAN|DEC"]
When TOPICS, MODE and UPLOAD are programmed using | and +, there must be no blanks between the identifiers.
;N415 #DIAGNOSIS WAIT [TOPICS=IPO| MAN|DEC] -> Error 22150
;N416 #DIAGNOSIS WAIT [TOPICS=IPO+ MAN+DEC] -> Error 20392
( naming output files )
N430 #DIAGNOSIS WAIT [FILE=diag_out.txt HISTORY_NBR=3]
N431 #DIAGNOSIS SYN WAIT [UPLOAD]
N432 #DIAGNOSIS SYN WAIT [UPLOAD]
N433 #DIAGNOSIS SYN WAIT [UPLOAD]
The names of the 3 files created are:
- diag_out_0.txt
- diag_out_1.txt
- diag_out_2.txt