Chapter 2. Programming Interface
DeviceMaster UP PROFINET CbA User Guide
: 2000409 Rev. D
- 11
Packet Identification
2.3. Packet
Identification
DeviceMaster UP polls the serial ports and gathers serial data into packets. The PROFINET CbA protocol
moves these serial packets to the Programmable Logic Controller (PLC). Note that this device does not act as
a gateway for serial streams of data. DeviceMaster UP gathers all serial data into packets.
Serial packets are identified by STX and ETX characters or the timeout feature.
•
Start of Text (STX)
- A delimiter that marks the beginning of a packet.
•
End of Text (ETX)
- A delimiter that marks the end of a packet.
•
Timeout
- Packets are identified by an absence of characters for a specified period of time.
The following tables show the available options.
As seen from the table, you must configure either an ETX or Timeout (or both).
When you enable STX, the DeviceMaster UP scans for STX and behaves accordingly:
•
When the first byte is STX, the DeviceMaster UP collects the data. When the DeviceMaster UP finds an
ETX or Timeout, the DeviceMaster UP declares the data to be a packet and moves the packet into the
bstring
output variable.
•
If the first byte is not STX, the DeviceMaster UP discards the byte. The DeviceMaster UP continues to
discard bytes until it finds an STX.
When you enable ETX and/or timeout, DeviceMaster UP scans for ETX and/or waits for a Timeout and
behaves accordingly:
•
When you enable ETX, the DeviceMaster UP scans the serial data for the ETX. When the DeviceMaster
UP finds an ETX, it stores the data as a packet.
•
When you enable Timeout, and the time between characters exceeds the Timeout value, the DeviceMaster
UP stores the data as a packet.
Note:
You can enable ETX and Timeout together.
The DeviceMaster UP polls the serial port for serial data. The collection of a packet may span multiple polling
periods. If a packet exceeds 128 bytes, DeviceMaster UP discards the packet.
When you enable Strip STX/ETX Characters, DeviceMaster UP strips the STX and ETX characters in packets
received from the serial port.
Note:
Serial Packets sent from the PLC to the DeviceMaster UP (over Ethernet), and then sent out the serial
port, are not checked for STX/ETX. No STX/ETX character stripping occurs in these serial packets,
and framing/parity/overrun error checking does not apply.
You can modify the STX, ETX, and Timeout values through the web page for the DeviceMaster UP. For more
information, see the instructions in
3.1. Accessing the Server Configuration Page
on Page 21. Additional
information on the web page is provided in
Chapter 3. Configuring the DeviceMaster UP
STX
ETX Timeout
Result
No
No
No
Invalid, no packet ID method
No
No
Yes
Timeout used to detect end of packet
No
Yes
No
ETX used to detect end of packet
No
Yes
Yes
ETX or timeout used to detect end of packet
Yes
No
No
Invalid, no packet ID method
Yes
No
Yes
STX starts packet, timeout used to detect end
Yes
Yes
No
STX-ETX used to detect start and end
Yes
Yes
Yes
STX starts packet, ETX or timeout used to detect end
Содержание DeviceMaster Up
Страница 1: ...PROFINET CbA User Guide ...