Sending bytes to Serial module
Posted: Tue May 09, 2023 6:47 pm
Can sombody help me with this.
I want to send the result of the following code to a serial device (8xrelay) over the generic serial module.
This works fine until the outbuf2 value reaches 11
On the serial monitor the data then is 003 001 011 009'
When the value of outbuf is 12 the data reads 003 001 001 002 014. The 12 gets split in 001 and 002.
Why is the happening with the outbuf2 and not with the outbuf3.
I hope that someone can explain this to me please.
As attachment the info of the device.
I want to send the result of the following code to a serial device (8xrelay) over the generic serial module.
Code: Select all
outbuf0 = 3
outbuf1 = 0
outbuf2 = 0
outbuf3 = outbuf0 Xor outbuf1 Xor outbuf2
Result = outbuf0 & " " & outbuf1 & " " & outbuf2 & " " & outbuf3
SetPropertyValue "Relays.Relay Commando", Result
On the serial monitor the data then is 003 001 011 009'
When the value of outbuf is 12 the data reads 003 001 001 002 014. The 12 gets split in 001 and 002.
Why is the happening with the outbuf2 and not with the outbuf3.
I hope that someone can explain this to me please.
As attachment the info of the device.