04.10.2018, 15:20
(This post was last modified: 04.10.2018, 15:35 by legolas2069.)
Hi,
I'm trying to create an '250 byte string' object from script and I don't know what I have to write on datatype parameter.
address = grp.create({datatype = "raw", address = '32/1/131', name = 'OWM_CD_list.dt', tags = { 'ForeCurrDay'}, comment= 'Time of data calculation'})
Do you know what I have to write there? I looked for it on this link but I dind't found it: http://openrb.com/docs/lua.htm#grp.create
Regards,
EDIT:
I'm answering myself. In the same link:
Most functions use alias parameter - either object group address or object name. (e.g. '1/1/1' or 'My object').
Data types:
dt.bool - 1-bit boolean
dt.bit2 - 1-bit controlled number
dt.bit4 - 3-bit controlled number
dt.char - 1-byte ASCII character string
dt.uint8 - 1-byte unsigned integer
dt.scale - 1-byte unsigned integer [0..100]
dt.angle - 1-byte unsigned integer [0..360]
dt.int8 - 1-byte signed integer
dt.uint16 - 2-byte unsigned integer
dt.int16 - 2-byte unsigned integer
dt.uint24 - 3-byte unsigned integer
dt.rgb - RGB color, alias of dt.uint24
dt.float16 - 2-byte floating point number
dt.time - 3-byte time / day, table with the following fields:
day - number [0..7]
hour - number [0..23]
minute - number [0..59]
second - number [0..59]
dt.date - 3-byte date, table with the following fields:
day - number [1..31]
month - number [1..12]
year - number [1990-2089]
dt.uint32 - 4-byte unsigned integer number
dt.int32 - 4-byte unsigned integer number
dt.float32 - 4-byte unsigned integer number
dt.string - 14-byte ASCII string, null characters '\0' are discarded during decoding
dt.text - 250-byte string, cannot be sent to TP bus
Thanks!
I'm trying to create an '250 byte string' object from script and I don't know what I have to write on datatype parameter.
address = grp.create({datatype = "raw", address = '32/1/131', name = 'OWM_CD_list.dt', tags = { 'ForeCurrDay'}, comment= 'Time of data calculation'})
Do you know what I have to write there? I looked for it on this link but I dind't found it: http://openrb.com/docs/lua.htm#grp.create
Regards,
EDIT:
I'm answering myself. In the same link:
Most functions use alias parameter - either object group address or object name. (e.g. '1/1/1' or 'My object').
Data types:
dt.bool - 1-bit boolean
dt.bit2 - 1-bit controlled number
dt.bit4 - 3-bit controlled number
dt.char - 1-byte ASCII character string
dt.uint8 - 1-byte unsigned integer
dt.scale - 1-byte unsigned integer [0..100]
dt.angle - 1-byte unsigned integer [0..360]
dt.int8 - 1-byte signed integer
dt.uint16 - 2-byte unsigned integer
dt.int16 - 2-byte unsigned integer
dt.uint24 - 3-byte unsigned integer
dt.rgb - RGB color, alias of dt.uint24
dt.float16 - 2-byte floating point number
dt.time - 3-byte time / day, table with the following fields:
day - number [0..7]
hour - number [0..23]
minute - number [0..59]
second - number [0..59]
dt.date - 3-byte date, table with the following fields:
day - number [1..31]
month - number [1..12]
year - number [1990-2089]
dt.uint32 - 4-byte unsigned integer number
dt.int32 - 4-byte unsigned integer number
dt.float32 - 4-byte unsigned integer number
dt.string - 14-byte ASCII string, null characters '\0' are discarded during decoding
dt.text - 250-byte string, cannot be sent to TP bus
Thanks!