Can someone explain me these results.
What I do: I am connected with the module through a serial kabel (which is a piece connected to the module which at his turn transmits the data.
I am receiving data, but I think I do not get the responses I supposed to have:
First I connect to the address: Packet packet = new Packet();
packet.Priority = PacketPriority.Low;
packet.Rtr = true;
packet.Address = (byte)Convert.ToInt32(this.comboBoxAdres.Text);
serialBus.Send(packet);
Then I listen for any packets coming in: if (args.Packet.DataSize != 0)
{
this.listBoxResultaat.Items.Add("Command: " + Convert.ToString(args.Packet.Command) + " - " + Convert.ToString(args.Packet.Address) + " - " + Convert.ToString(args.Packet.Size));
for (int i = 0; i < args.Packet.DataSize; i++)
{
inhoud = args.Packet;
this.listBoxResultaat.Items.Add("Byte " + Convert.ToString(i) + ": " + args.Packet*.ToString(“X2”));
}
}**
The result when the machine stops:
Packet 1: DataSize is 4 with this value in each byte: 0 0 1 0
Packet 2: DataSize is 4 with this value in each byte: 0 1 0 0
According to manual I should receive a hex value off x0x09
Is there something wrong with my code, or is it in someway not correct connected with the module.
Data byte 1 = 00 = COMMAND_PUSH_BUTTON_STATUS
Data byte 2 = Push buttons just pressed
Data byte 3 = Push buttons just released
Data byte 4 = Push buttons long pressed
For example:
Data byte 1 = 00 (hex) = COMMAND_PUSH_BUTTON_STATUS
Data byte 2 = 01 (hex) = 0000 0100 (binary) = button 3 was pressed
Data byte 3 = 00 (hex)
Data byte 4 = 00 (hex)
You will need to describe your setup more accurately, what modules you use, how everything is connected, etc.
Each Velbus module sends out its own status. The relay modules like VMB1RY and VMB4RY for example send out a status that indicates which relays are on or off; temperature modules send out temperature changes; … So it is perfectly possible to know the current state of each module.