EasyManua.ls Logo

Thytronic NA60-MB0 PRON Series - 2.1.9 STR; 2.1.10 CMD

Thytronic NA60-MB0 PRON Series
59 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
PRON NA60-MB0
Version 3.50
PRON NA60-MB0 Remote Setting Manual
Page: 11 of 59
2.1.9 STR
Description:
String data type. It’s represented by an array of BYTE. Every byte represents the hexadecimal ASCII code
associated with the character of the string
Relationship with Modbus:
An STR data type of length n is placed in N Modbus Registers (N= ceil(n/2)
) keeping the byte ordering. If odd n,
the last byte is placed in the MSB of the last Modbus register. A zero padding operation (with char ‘\0’) is necessary
for every writing operation where the length of the string is lower than the number of bytes contained in the Modbus
registers.
If even n:
C
1
C
2
C
n
C
1
C
2
C
n-1
C
n
1 2 n 1 N
String[n] Modbus Registers
N = ceil(n/2)
If odd n:
C
1
C
2
C
n
C
1
C
2
C
n
‘\0’
1 2 n 1 N
String[n] Modbus Registers
Example:
Let’s assume “Relay reference name” is a STRING variable whose length is 8 characters, its Modbus address is
0x0029 and its dimension is 4 Modbus registers. Let’s set its value to “NAxx”.
First of all the ASCII code in hexadecimal notation for each character of the string “NA10” is equal to 0x4E417878
An example of write request could be the following:
01
10
00
29
00
05
10
4E
41
78
78
00 00 00 00 - -
TX
S F ADR DIM B DATA1 DATA2 DATA3 DATA4 CRC
‘N’ ‘A
‘x’ ‘x’ ‘\0’
‘\0’
‘\0’
‘\0’
Remark. A zero padding operation is necessary because the length of the string “DMC901” is lower than the length
of the RACK_TYPE variable.
2.1.10 CMD
Description:
This type of data represents a command.
Every Command corresponds to a Coil data type. To execute the command, the value of the associated Coil has to
be set to 1 with the Modbus function 0x05.
The ceil function returns the smallest integer value that is greater than or equal to a number. For example,
ceil(2.3)=3 , ceil(1.5)=2.

Related product manuals