Table of PROFINET RECORD DATA represented on ADS
PROFINET
-
-
Read/Write
Number of AR
API
Application Process Identifier
Slot
SubSlot
Record Data Index
-
Record Data Length
Record Data Transfer
Sequence
Record Data Length of Aligned 2
Example for reading data; the PROFINET controller wants to read data from a Beckhoff device via the record
data. In this example, all the RecIndex values are accepted, and will return the same data - 10 bytes that are
located in the "Data" data array.
CASE i OF
0: ADSREADIND(
CLEAR:=FALSE ,
VALID=> ,
NETID=> ,
PORT=> ,
INVOKEID=> ,
IDXGRP=> ,
IDXOFFS=> ,
LENGTH=> );
IF ADSREADIND.VALID THEN
IdxGroup:=ADSREADIND.IDXGRP;
IdxOffset:=ADSREADIND.IDXOFFS ;
i:=10;
END_IF
10: ADSREADRES(
NETID:=ADSREADIND.NETID,
PORT:=ADSREADIND.PORT,
INVOKEID:=ADSREADIND.INVOKEID ,
RESULT:=0 ,
LEN:=10 ,
DATAADDR:=ADR(Data),
RESPOND:=TRUE );
i:=20;
ADSREADIND(CLEAR:=TRUE);
20: i:=0;
ADSREADRES(RESPOND:=FALSE);
END_CASE
4.1.3
Shared Device
The ProfiNET feature "Shared Device" is supported by the EL6631-0010, by the TwinCAT Supplement from
version TC211 22.xx (= TC2 R3).
Shared Device features a function that allows two controllers to simultaneously access one device and, if
applicable, the same process data image.
EL6631-0010
Length in
Comment
bytes
String
AMS NET ID of the PROFINET
device
2
0xFFFF
When the virtual interface is used,
the port number is to be taken
from the System Manager.
2
0 - Read
1 - Write
2
0x0000
4
0x00000000
2
Slot number
0x0000-0x7FFF
2
SubSlot number
0x0000-0x8FFF
2
0x0000-0x1FFF
2
0x8000
2
to "0" to read
2
consecutive number
can be zero
Version: 3.4.0
Commissioning
ADS
AMSNETID
Port
Read - ReadIndication
Write - WriteIndication
-
-
IndexOffset High Word
IndexOffset Low Word
IndexGroup Low Word
IndexGroup High Word
LENGTH
-
-
31