This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Handle 10 bytes data
#7
(03.02.2022, 06:48)admin Wrote: Event script for the code object. Use 250 byte string object. Code format is 6 numbers, everything else will be ignored.
Code:
value = event.getvalue()

-- code format is 6 numbers
if #value == 6 and value:match('^%d+$') then
  b1 = tonumber(value:sub(1, 2), 16)
  b2 = tonumber(value:sub(3, 4), 16)
  b3 = tonumber(value:sub(5, 6), 16)

  req = string.char(b1, b2, b3, 0, 0, 0, 0, 0, 0, 0x80)
  grp.write('5/4/0', req, dt.raw)
end

works great, you are a crack!

thank you very much
Reply


Messages In This Thread
Handle 10 bytes data - by Kilogica - 24.02.2021, 10:38
RE: Handle 10 bytes data - by admin - 24.02.2021, 10:42
RE: Handle 10 bytes data - by CristianAgata - 14.08.2021, 15:41
RE: Handle 10 bytes data - by Kilogica - 24.02.2021, 10:53
RE: Handle 10 bytes data - by Alberto.ricof - 02.02.2022, 18:25
RE: Handle 10 bytes data - by admin - 03.02.2022, 06:48
RE: Handle 10 bytes data - by Alberto.ricof - 03.02.2022, 23:17

Forum Jump: