Logic Machine Forum
6byte - DPT - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9)
+--- Thread: 6byte - DPT (/showthread.php?tid=4192)



6byte - DPT - Fahd - 16.08.2022

Hi gyus, 

How could I read a 6byte alarm code from the knx bus (Please , see attached )


RE: 6byte - DPT - admin - 16.08.2022

You can use "14 byte ASCII string" data type. In event script you can check the event.datahex variable contents to determine what kind of alarm it is.


RE: 6byte - DPT - Fahd - 16.08.2022

(16.08.2022, 09:34)admin Wrote: You can use "14 byte ASCII string" data type. In event script you can check the event.datahex variable contents to determine what kind of alarm it is.

Please, Could I just get an example of the first alarm code ?


RE: 6byte - DPT - admin - 16.08.2022

Code:
alarm = event.datahex:sub(3, 12)

if alarm == '000A030C05' then
  log('jammed')
elseif alarm == '0101020C05' then
  log('backup')
end



RE: 6byte - DPT - Fahd - 16.08.2022

(16.08.2022, 09:44)admin Wrote:
Code:
alarm = event.datahex:sub(3, 12)

if alarm == '000A030C05' then
  log('jammed')
elseif alarm == '0101020C05' then
  log('backup')
Thanks