Up till now i have been concentrating on using recieving commands from the two VMB6IN units i have, and using them to operate in an alarm form, using NC motion sensors, all works well but now I have a VMB4RYLD module and need to now how to send a packet to it to operate, say the 3rd relay in the module using VB.NET.
There appears to be a lot on info on C+ programming but very little on VB.NET.
Using the USB connection.
Can some give me a sample of some code to get me going in the right direction.
Maybe itis just me but serial ports comms is not my strong point.
This is what i have below, understand there must be a “&H” before the address in VB.NET
How about the checksum requirement ?
It’s always a good idea to learn the basics of the programming language first
&H1A is the hexadecimal notation in VB.NET for 1A, which is 26 in decimal. Since the rotary switch for the address on the module is in hexadecimal (0…9 A…F) it makes sense that we use hexadecimal notation as well
You don’t have to worry about how serial communications work since that is already handled behind your back by the SerialBus class. The only thing you need to know is the name of the serial port you will be using (COM1, …)
The Packet class handles a lot of things automatically, like calculating the checksum
That’s the beauty of VelbusLib for .NET, you can write
VBpacket.Priority = PacketPriority.High
Without having to worry which byte needs to be modified for the packet to have high priority.
Use VelbusLink 8 to examine packets as they pass over the bus. Try to understand what each byte in that packet means by using the protocol manual of each module as a reference. Then all will be a lot clearer for you to start sending your own packets.
[quote=“rockhoppers1964”]Up till now i have been concentrating on using recieving commands from the two VMB6IN units i have, and using them to operate in an alarm form, using NC motion sensors, all works well but now I have a VMB4RYLD module and need to now how to send a packet to it to operate, say the 3rd relay in the module using VB.NET.
There appears to be a lot on info on C+ programming but very little on VB.NET.
Using the USB connection.
Can some give me a sample of some code to get me going in the right direction.
Thanks in advance for the help
Andrew[/quote]
hello Andrew,
I tried to send you many email to the following adresse but unfortunatly no response:
andrew (AT)rockhoppers.co.uk