13.2.5.2 Functions
native rM2M_SetPacked(data{}, pos, &{Float,Fixed,_}:value, size=4, bool:bigendian=false);
Writes the transferred value to a specified position in an array
Important note:
Although this function will still be supported for the purpose of downward
compatibility, it should no longer be used for new projects as the unsigned data types might lead
to problems. The „rM2M_Pack()" function should be used as an alternative.
Parameter
Explanation
data
Array that should be used as a data area for a data record or a configuration
pos
Byte offset within the array to determine the position where the value should be
written
value
Value that should be written in the array
size
Number of bytes that should be used for the value to be written
bigendian
Settings for the byte sequence that should be used when writing the value:
true: "Big endian" is used
false: "Little endian" is used
Explanation
Return value
l
OK, if successful
l
< OK, if an error occurs (see "Return codes for general purposes" in
chapter "Constants" on page 118)
Note:
Additional explanation on the byte sequence:
In the following example, the whole number 439.041.101 is saved as a 32-bit integer value from memory
address 10000.
Big endian
Little endian
Addresses
Hex
Dez
Binary
Hex
Dez
Binary
10000
1A
26
00011010
4D
77
01001101
10001
2B
43
00101011
3C
60
00111100
10002
3C
60
00111100
2B
43
00101011
10003
4D
77
01001101
1A
26
00011010
142
Rev. 05
Summary of Contents for myDatalogEASY V3
Page 2: ......
Page 13: ...Chapter 2 Declaration of conformity Chapter 2 Declaration of conformity Rev 05 13 ...
Page 14: ......
Page 42: ......
Page 76: ......
Page 88: ......
Page 102: ......
Page 110: ......
Page 116: ......
Page 234: ......
Page 244: ......
Page 252: ......
Page 254: ......
Page 266: ......
Page 276: ......