Current Help System: PC-DMIS NC (View Core Help)

### Read CNC Variable

Select the
Operation | CNC Programming | Read CNC Variable menu option to open the Read CNC Variable dialog box.

CNC/READVARIABLE,variableNumber,variableName

This command reads a value from a CNC register. A block of 10 values is reserved on the CNC control for I/O between the part program and the control.

variableNumber should be a value between 1 and 10. This will be mapped to a register on the CNC control.

variableName is a PC-DMIS variable created with the ASSIGN command. Select a previously defined variable name from the PC-DMIS Variable combo box.

Note: Reading of CNC variables from the scratchpad area is now done when the controller executes the program. Previous versions of PC-DMIS (2009 and earlier) used to read them when PC-DMIS did an Analysis. You can no longer expect variables set in a CNC/WRITEVARIABLE command to be picked up in a CNC/READVARIABLE command because they now occur at different phases in the program: READVARIABLE occurs during control execution while WRITEVARIABLE occurs during PC-DMIS Analysis.