Reading From Plc-I/Os - Siemens SINUMERIK 840D sl Function Manual

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

Advertisement

Digital and analog NCK I/Os (A4)
1.5 Examples
1.5.1.2

Reading from PLC-I/Os

The following assumptions are made in this example:
● PLC I/Os:
● $A_PBx_IN is used to read in data from a part program into R parameters.
● In order to avoid slowing down the PLC user program unnecessarily (OB1), an update
Parameter assignment
The machine data should be set as follows:
MD10395 $MN_PLCIO_LOGIC_ADRESS_IN = 420
MD10394 $MN_PLCIO_NUM_BYTES_IN = 11
MD10398 $MN_PLCIO_IN_UPDATE_TIME = 0.03
MD10399 $MN_PLCIO_TYPE_REPRESENTATION = 1
Booting of NCK and PLC:
The update (for read access) is now performed in every third interpolation cycle after the
NCK and PLC have booted.
Programming
Loading and starting of the part program with the following content:
...
R1 = $A_PBW_IN[0]
R2 = $A_PBD_IN[2]
R3 = $A_PBR_IN[6]
R4 = $A_PBB_IN[10]
...
64
- log. addr. 420:
- log. addr. 422:
- log. addr. 426:
- log. addr. 430:
time (for read access) was configured in machine data
MD10398 $MN_PLCIO_IN_UPDATE_TIME
such that an update is only performed in every third interpolation cycle.
16-bit analog input module
32-bit digital input module
32-bit DP slave input
8-bit digital input module
;Read in 16-bit integer
;Read in 32-bit integer
;Read in 32-bit float
;Read in 8-bit integer
;Data are read in from log. addr. 420
onwards
;A total of 11 bytes have to be read in
;Update time period = 30 ms
(interpolation cycle = 12 ms)
;Data are displayed in big-endian
format
Function Manual, 01/2008, 6FC5397-1BP10-3BA0
Extended Functions

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents