AMX Master to Master communication and event handling
William_Huhn
Posts: 4
Is anyone familer with using Master-to-Master communication with two AMX systems? AMX's TechNotes give a good start point, but get vague pretty quickly.
Mine is an NXF cardframe talking with an NI-3100 across a small private network. I have set them each up with different system numbers: NXF is System 1 and the NI-3100 is System 2. I have a virtual devices set up on both: each with itself on 33010:1:0 and the other on 33010:1:x (x is the other's system number).
As for the actual communication, I can SEND_COMMAND to 33010:1:0 on one, and it will broadcast to be picked up on the other. My question is how to handle the receipt - do I use the STRING handler in a DATA_EVENT on the receiver? Or should it be handled in a different way?
Thanks,
Will Huhn
Computer Engineer
Booz | Allen | Hamilton
Mine is an NXF cardframe talking with an NI-3100 across a small private network. I have set them each up with different system numbers: NXF is System 1 and the NI-3100 is System 2. I have a virtual devices set up on both: each with itself on 33010:1:0 and the other on 33010:1:x (x is the other's system number).
As for the actual communication, I can SEND_COMMAND to 33010:1:0 on one, and it will broadcast to be picked up on the other. My question is how to handle the receipt - do I use the STRING handler in a DATA_EVENT on the receiver? Or should it be handled in a different way?
Thanks,
Will Huhn
Computer Engineer
Booz | Allen | Hamilton
0
Comments
Paul
Thanks again
Paul
By default a virtual device has only 1 port, 255 channels, and 8 levels. If you want to use something higher than those numbers then you need to call the SET_VIRTUAL_x_COUNT() functions.
Is it possible you were using a port, channel, or level that?s greater than the default values?
If you do a SEND_COMMAND to a device (virtual or real) then the message gets handled in the COMMAND handler of the DATA_EVENT of said device. If you do a SEND_STRING to a device (virtual or real) then the message gets handled in the STRING handler of the DATA_EVENT of said device. If said device is defined in multiple systems then all will receive the COMMAND or STRING.
If you want to set up a two way conversation without stepping on toes one of the standard methods is to have one side SEND_COMMANDs to the other side and the other SEND_STRINGs to the first side. So you would have something like this:
Welcome to the forum.
All that was ok, as I confirmed that is it was a m2m issue by attaching the device to the second master and feedback worked fine. Attached to the first master I got none. IIRC I believe the issue was related to the virtual number and I had accidentally used a virtual device number in the 31000-32000 range rather than the above 32,768 as the docs say to use. The only side effect was the feedback in m2m. This was years ago so perhaps new firmware has changed this.
Paul