A4: Digital and analog NCK I/Os for SINUMERIK 840D sl
1.3 Access via PROFIBUS
Extended Functions
66 Function Manual, 03/2013, 6FC5397-1BP40-3BA1
Programming
Program code Comment
$AC_MARKER[0]=$A_DPW_IN[0,0] ; Read (16 bit) to RangeIndex=0, RangeOffset=0
; Big Endian format
$AC_MARKER[1]=$A_DPSD_IN[0,1] ; Read (32 bit) to RangeIndex=0, RangeOffset=1
; Big Endian format
$AC_MARKER[1]=$A_DPSD_IN[0.8] ; Read (32 bit) to RangeIndex=0, RangeOffset=8
; Big Endian format
$AC_MARKER[2]=0
$AC_MARKER[3]=8
$AC_MARKER[1]=$A_DPSD_IN[$AC_MARKER[2],$AC_MARKER[3]]
; Read (32 bit) to RangeIndex=0, RangeOffset=8
; Big Endian format
; indirect programming
ID=2 WHEN $A_DPB_IN[0,11]>=5 DO $AC_MARKER[2]=’ABCDHex’
; Cyclic fetching (per IPO cycle)
R1=$A_DPB_IN[0,255] ; Alarm 17030 because the RangeOffset is invalid.
R1=$A_DPB_IN[2.6] ; Alarm 17020 because this range is not defined.
R1=$A_DPB_IN[1.10] ; Alarm 17020 because this range of the part
program cannot be written.
R1=$A_DPB_IN[16.6] ; Alarm 17020 because RangeIndex >= max. available
; number of ranges.
1.3.5.3 Query of the RangeIndex in case of "PROFIBUS-I/O in write direction"
Requirement
The S7-HW-configuration is already done.
Configuration for programming via part program/synchronous actions
● RangeIndex = 5 (NCK-internal configuration)
● as per S7-HW-configuration:
– log. start address = 1200
– Slot length = 32 byte
– To be displayed in Big-Endian format