Page 1 of 1

PLCBUS LINUX Computer interface

Posted: Sun May 25, 2008 1:18 pm
by Jfn
For those experimenting with PLCBUS under Linux: I wrote a small but simple perl script that translates PLCBUS frames in a somewhat more readable form:

Code: Select all

debian:/tmp# ./plcbus_test.pl
USER code       : 255
HOME_UNIT code  : A3
3-Phase coupler : INACTIVE
ACK_PULSE       : ENABLED
Command         : Same home + unit: UNIT OFF
debian:/tmp#
It runs in an endless loop, decoding all packets it receives.

<b>Download Attachment:</b> [img]images/icon_paperclip.gif[/img] plcbus_test.pl.txt<br />3.71KB

Als het niet gerepareerd kan worden dan is het niet kapot!

PLCBUS LINUX Computer interface

Posted: Sun May 25, 2008 2:31 pm
by Snelvuur
nice work.. looks simple enough .. i thought it would be complexer then a ctx35..

// Erik (binkey.nl)

PLCBUS LINUX Computer interface

Posted: Sun May 25, 2008 3:43 pm
by Jfn
I based my script on the protocol specs (Available for download from the manufacturer's website).

It is very basic, but provides an easy insight on what data is received. When using the DIM or BRIGHT function for example, additional data is provided in bytes 4 and 5 of the payload. It tells you about dimlevel and rate etc.

Byte 6 of the payload is the RX_TX_SWITCH byte. It can be used as some sort of handshake method. Among other things, it tells you about whether a given command was received ok by a device.



Als het niet gerepareerd kan worden dan is het niet kapot!