Reading From The Nc I/O - Siemens SINUMERIK 840D sl Function Manual

Extended functions
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

A4: Digital and analog NC I/O for SINUMERIK 840D sl
2.4 Direct I/O access without PLC
2.4.5.2

Reading from the NC I/O

Requirement
A valid configuration must already have been loaded to the PLC.
Parameterization for part programs / synchronized actions
Specifications
● Parameterization of the 1st data record: Machine data / system variable index = 0
● Configuration data:
– Logical start address = 456
– Slot length = 32 bytes
● Representation: Big endian format
Parameterization in the machine data
● MD10500 $MN_DPIO_LOGIC_ADDRESS_IN[ 0 ] = 456 (logical start address)
● MD10501 $MN_DPIO_LENGTH_IN[ 0 ] = 32 (length of the I/O-range in bytes)
● MD1050ß2 $MN_DPIO_ATTRIBUTE_IN[ 0 ]
– Bit0 = 1 (big endian format)
– Bit2 = 0 (reading possible via system variables and CC-binding)
– Bit3 = 0 (slot sign-of-life alarms are issued)
Examples
Program code
$AC_MARKER[0]=
$A_DPW_IN[0,0]
$AC_MARKER[1]=
$A_DPSD_IN[0,1]
$AC_MARKER[1]=
$A_DPSD_IN[0.8]
$AC_MARKER[2]=0
$AC_MARKER[3]=8
$AC_MARKER[1]=$A_DPSD_IN[$AC_MARKER[2],$AC_MARKER[3]] ; indirect addressing
ID=2 WHEN $A_DPB_IN[0,11]>=5 DO $AC_MARKER[2]=$A_DPSD_IN[0,8]
; Faulty programming
R1=$A_DPB_IN[0,255]
R1=$A_DPB_IN[2.6]
R1=$A_DPB_IN[1.10]
68
Comment
; Byte
8 bits, index=0, offset=0
; Signed double
32 bits, index=0, offset=1
; Signed double
32 bits, index=0, offset=8
; Index=0
; Offset=8
; Signed double
32 bits, index=0, offset=8
; IF index 0, offset 11 >= 5
; THEN signed double
;
Alarm 17030: Offset 255 > I/O range
;
Alarm 17020: Index 2 not defined in the machine data
;
Alarm 17020: Index 1 reserved for compile cycle, see
below
Function Manual, 10/2015, 6FC5397-1BP40-5BA3
32 bits, index=0, offset=8
Extended Functions

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828d

Table of Contents