HEIDENHAIN CNC

The Heidenhain CNC drive accesses Heidenhain TNC640, iTNC530 and other series of machine tools and machining centers through the LSV2 protocol, and can collect real-time operating data from multiple devices, including program names, spindle override , runing status, spindle tools, PLC points, and more.

Parameter Configuration

ParameterDescription
hostdevice ip address
portdevice port, default 19000
timeoutconnection timeout, default 5000ms

Support Data Type

  • uint8
  • int8
  • uint16
  • int16
  • uint32
  • int32
  • uint64
  • int64
  • float
  • double
  • bool
  • string

CNC Data

tag addressdescriptiondata typeparameternote
runStaterun stateint16-0:STARTED 1:STOPPED 2:FINISHED 3:CANCELLED 4:INTERRUPTED 5:ERROR 6:ERROR_CLEARED 7:IDLE 8:UNDEFINED
programMainmain programstring--
programCurrentcurrent programstring--
programLineNocurrent program line noint32--
controlModecontrol modeint16-0:MANUAL 1:MDI 2:PASS_REFERENCES 3:SINGLE_STEP 4:AUTOMATIC 5:UNDEFINED
spindleToolNumberspindle tool numberint32--
spindleToolLengthspindle tool lengthdouble--
spindleToolRadiusspindle tool radiusdouble--
feedOverridefeed overrideint32--
spindleOverridespindle overrideint32--
rapidOverriderapid overrideint32--
machinePositionmachine positiondouble.X .Y .Z .A .C-
parametercnc setting parameterstring.(name)-

CNC address example

addressdescription
ProgramMainread the main program
machinePosition.Xread x asix of machine position
parameter.CfgDisplayLanguage.ncLanguageTNC640 read/write language setting

PLC Data

tag addressdescriptiondata typer/w
MMARKERboolread
IINPUTboolread
OOUTPUTboolread
TTIMERboolread
CCOUNTERboolread
BBYTEuint8/int8/int16/uint16/int32/uint32/int64/uint64/float/doubleread
WWORDint16/uint16/int32/uint32/int64/uint64/float/doubleread
DDWORDint32/uint32/int64/uint64/float/doubleread
NINPUT WORDint16/uint16/int32/uint32/int64/uint64/float/doubleread
UOUTPUT WORDint16/uint16/int32/uint32/int64/uint64/float/doubleread
SSTRINGstringread

PLC Common Address

addressdata typedescrption
M0boolPLC Marker area,address 0
I10boolPLC Input area,address 10
O20boolPLC Output area,address 20
C30boolPLC Counter area,address 30
T40boolPLC Timer area,address 40
B0int8PLC Byte area,address 0
B20int16PLC Byte area,address 20
B40doublePLC Byte area,address 40
W2int16PLC Word area,address 2
D4int32PLC Word area,address 2
N2int16PLC Input Word area,address 2
U2int16PLC OutPut Word area,address 2
S0.128stringPLC String area,address 0,string length 128