Supported device types and versions
Communication line configuration
Communication station configuration
Station protocol parameters
I/O tag configuration
Changes and modifications
Document revisions


Supported device types and versions



The ASCII Client/Server protocol is intended for parsing serial communication containing simple text-oriented data (data sentences) that conform to a template
StartMark Data1 Separator Data2 Separator .... DataN EndMark

Parameters StartMark, Separator and EndMark can be configured within the station address.

It is also possible to periodically send text-oriented data with an identical template. The StartMark, Separator and EndMark parameters for transmitting can be different from those for receiving.

Example of received data:

Sending<CR><LF>11.8<CR><LF>-17.519723239035<CR><LF>12.2<CR><LF>0.3312<CR><LF>1.465<CR><LF>0.01<CR><LF> 11.384611976362<CR><LF>

Setting individual parameters:

StartMark = ding<CR><LF>

Separator = <CR><LF>

EndMark = Sen


Note: this communication protocol is simpler than the Generic User Protocol and only offers simple value parsing. On the other hand, parsing does not need to be implemented in the ESL script, but is performed directly by the KOM process.


Communication line configuration



Category of communication line:


Communication station configuration



  • Communication protocol ASCII Client/Server.

  • Data Input section

    • Receiving enabled - the protocol processes input data.

    • Startup - text sequence indicating the start of data (StartMark). The end of the sequence must be followed by data.

    • Value delimiter - text sequence separating individual values ​​(Separator).

    • End mark - text sequence indicating the end of data (EndMark).

  • Data output section

    • Transmitting enabled - the protocol writes data with the period Data output period.

    • Startup - text sequence written at the beginning of the data (StartMark).

    • Value delimiter - text sequence separating individual recorded values ​​(Separator).

    • End mark - text sequence written at the end of the data (EndMark).

Note: StartMark, Separator and EndMark parameters can also contain special (control) characters in symbolic form, e.g. <CR> or <LF>. The following table lists the supported characters:

Table 1

Symbolic formCharacterASCII value
<NUL>
NUL0
<SOH>
SOH1
<STX>
STX2
<ETX>
ETX3
<EOT>
EOT4
<ENQ>
ENQ5
<ACK>
ACK6
<BEL>
BEL7
<BS>
BS8
<HT>
HT9
<LF>
LF10
<VT>
VT11
<FF>
FF12
<CR>
CR13
<SO>
SO14
<SI>
SI15
<DLE>
DLE16
<DC1>
DC117
<DC2>
DC218
<DC3>
DC319
<DC4>
DC4

20

<NAK>
NAK21
<SYN>
SYN22
<ETB>
ETB23
<CAN>
CAN24
<EM>
EM25
<SUB>
SUB26
<ESC>
ESC27
<FS>
FS28
<GS>
GS29
<RS>
RS30
<US>
US31
<SPACE>
SPACE32


Station protocol parameters



The following station parameters can be set:

Table 2

Full name

Description

UnitDefault value

Wait timeout

Waiting between data readings.sec0.2

Maximum read timeout

Maximum reading time of one data sentence (if data input is enabled in the station configuration).
If the data sentence is not fully read within this time, the state machine is reset and waiting for the startup sequence to arrive.

sec5

Data output period

Data transmission period (if transmitting is enabled in the station configuration).

sec60

Moxa timeout

If the SerialOverUDP Device Redundant communication line is used, on which two serial servers are configured (e.g. Moxa NPort), the parameter specifies a timeout after which the redundant serial servers will be switched in the event of a communication error (if no data is received within this time limit).

sec120


I/O tag configuration



Possible value types of I/O tag: Ai, Ci, Ao, Co, Di, Dout.


Input I/O tags:


  • The input I/O tag has a numerical address (1 ... 999) indicating the position of the value (Data1, Data2 ... Data N) in the received data sentence
    StartMark Data1 Separator Data2 Separator .... DataN EndMark
    Note: if there are no I/O tags for some addresses, these values ​​will be ignored.
    Example: Input I/O tags with addresses 1 and 3 are configured, the value with address 2 (Data2) will be ignored.


Output I/O tags:


  • The output I/O tag has a numerical address (1 ... 999) indicating the position of the value (Data1, Data2 ... Data N) in the sent data sentence.
    An I/O tag of type Dout is written as 0/1, an I/O tag of type Ao as a floating point with 2 digits after the decimal point (e.g. -123.45).
    Note: if there are no I/O tags for some addresses, then these values ​​will not be sent (nor the separators between them).
    Example: Output I/O tags with addresses 1 and 5 are configured, the following data sentence will be sent:
    StartMark Data1 Separator Data5 EndMark

Changes and modifications



-

Document revisions



  • Ver. 1.0 - October 30, 2024 - Creating the document.


Napíšte komentár