Having problems getting the status of the relays on a VMB4RYLD.
It’s address is module “F1” relay “1”
Can switch it on and off ok, but can’t get it to return its status.
Help please
Respect each variable’s data type, don’t assign strings to integers! I’m surprised it even compiles o_O
“&H” + “0A” is a concatenation of two strings, which in result is the string “&H0A” [NOT OK]
&H0A is the hexadecimal notation of the decimal number 10 [OK]
Thanks for that, i tried to request the status of relay F1 using the exact code you gave above but i still get nothing back from the system
I can still switch the relays on and off with command 01 and 02, but just can’t get the status, but when i stick &HFB in as the command nothing happens.
I my earlier post I indicated that the command was on page 8. On page 8 you will find a ‘Relay status request’ command. The command byte is FA. It has 2 data bytes, one for the command and one for an extra parameter.
The packet with command FB is the response. The response is on page 4 in the manual.
The protocol manual might be hard to understand at first because it was written from the perspective of the module and the CAN protocol, not from a computer’s perspective.
It has been a bit of a challange to get to this stage based on the manual avaialble.
Has there been any other publications regarding the use of the system with a PC ?
Just because I know that beginning from scratch could be hard : here is a small help I’ve written to help those who want to create nice Velbus applications !