Logic Machine Forum
Creating a 250 byte string from script - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Creating a 250 byte string from script (/showthread.php?tid=1627)



Creating a 250 byte string from script - legolas2069 - 04.10.2018

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!