PLCBUS LINUX Computer interface

Forum about PLCBUS devices & software.

Moderator: Digit

Post Reply
Jfn
Member
Member
Posts: 332
Joined: Tue Feb 26, 2008 2:01 pm
Location: Netherlands
Contact:

PLCBUS LINUX Computer interface

Post 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!
User avatar
Snelvuur
Forum Moderator
Forum Moderator
Posts: 3156
Joined: Fri Apr 06, 2007 11:01 pm
Location: Netherlands
Contact:

PLCBUS LINUX Computer interface

Post by Snelvuur »

nice work.. looks simple enough .. i thought it would be complexer then a ctx35..

// Erik (binkey.nl)
Jfn
Member
Member
Posts: 332
Joined: Tue Feb 26, 2008 2:01 pm
Location: Netherlands
Contact:

PLCBUS LINUX Computer interface

Post 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!
Post Reply

Return to “PLCBUS Forum”