A4: Digital and analog NCK I/Os for SINUMERIK 840D sl
1.2 Access via PLC
Extended Functions
52 Function Manual, 03/2013, 6FC5397-1BP40-3BA1
1.2.6.3 Examples
Writing to PLC-I/Os
The following assumptions are made in this example:
● Data is to be output directly to the following PLC I/Os:
- log. addr. 521: 8-bit digital output module
- log. addr. 522: 16-bit digital output module
● $A_PBx_OUT is used to output the data from synchronized actions.
Parameter assignment
The machine data should be set as follows:
MD10397 $MN_PLCIO_LOGIC_ADRESS_OUT= 521 ; Data is output from log. addr.
521 onwards
MD10396 $MN_PLCIO_NUM_BYTES_OUT= 3 ; A total of three bytes have to
be output
MD10399 $MN_PLCIO_TYPE_REPRESENTATION = 1 ; Data is displayed in big-endian
format
Run-up of NCK and PLC
Once the NCK and PLC have run up, there is no cyclic data transfer to the PLC I/Os (for
write access).
Programming
Loading and starting of the part program with the following content:
Program code Comment
...
ID=1 WHENEVER TRUE DO $A_PBB_OUT[0]=123 ; Cyclic output (per interpolation cycle)
...
ID=2 WHEN $AA_IW[x] >= 5 DO $A_PBW_OUT[1]='Habcd' ; Output of a HEX value
...