Problem RS232 send from a PicoC program block cannot get it working?

241 views
Skip to first unread message

Patrick Van Rie

unread,
Dec 30, 2015, 6:14:29 AM12/30/15
to Loxone English

Hi,


I use a Loxone RS232 extension to send to Velleman K8056 8-relay boards. The RS232 actuators in Loxone config work perfectly fine. That is, if you use only only one of the 32 actuators at a same time (4 boards x 8 relays per board). As I want to use them for opening/closing up to 5 blinds, only 1 of the 5 corresponding RS232 command strings gets through to the boards, or none at all.


So I thought of using a PicoC program block, to send a string of 4 bytes to update all 4 boards at once.


However, my simple testprogram does not generate any output on the RS232 bus, whereas the RS232 actuators do.

Any ideas?

// 2015-12-30 this PicoC program block writes via RS232 to Velleman K8056 RelayCards
// This test should show ABCD on the RS232 sniffer ....
STREAM
* pRs232Stream = stream_create("/dev/tty/RS232",0,0); // create rs232 stream to the name of the Loxone RS232 extension, which I named "RS232"
char* pRS232Cmd = "ABCD";
while(TRUE)
 
{
 
if (pRs232Stream != NULL)
   
{
   setoutputtext
(0, pRS232Cmd); // this shows "ABCD" in Loxone Liveview
   stream_write
( pRs232Stream, pRS232Cmd, strlen( pRS232Cmd ));   // write to output buffer
   stream_flush
(pRs232Stream);
   printf
("%s", pRS232Cmd ); // shows "ABCD" in Loxone Log window
   setoutput
(0,1) ; // set AQ1 to show activity
   sleep
(1000);
   setoutput
(0,0) ; // reset AQ1 to show activity
   sleep
(1000);
   
   
}
 
}
 
}
stream_close
(pRs232Stream);


  
Auto Generated Inline Image 1
Auto Generated Inline Image 2
Auto Generated Inline Image 3

Joakim Arfvidsson

unread,
Mar 12, 2020, 4:18:36 AM3/12/20
to Loxone English
I have the same issue. I'm sending to /dev/tty/rs485 (the name of the extension is "rs485").

Nothing shows up on the bus. I'm seeing other traffic going out through the extension, but PicoC doesn't manage to push out anything.
Reply all
Reply to author
Forward
0 new messages