Device Emulation
cbailey
Junior Member
in AMX Hardware
I have been trying to debug a module I wrote that deals with device feedback. In the process of debugging I was using device notifications and the "Emulate a Device" tool to send strings from COM port 2.
On the NI-700 (firmware v2.95.214) that I was using, when I emulated strings to the master it would not trigger the data event for that port. I could see the string in device notifications, but my code would not run. No matter what I tried, I could not get the data event to work. The RX light on the COM port I was emulating does NOT light up, but the Input light does flash.
This seemed odd behavior to me so I switched to another processor. On a NI-3000 (firmware v2.32.145) with the exact same compiled code and the same string output from the device emulation on the same port, the data event was triggered. In this case, the string shows up on the device notifications and the RX light DOES pulse when the string is emulated.
Has anyone else experienced this with Device Emulation? Could someone from AMX please look into this odd behavior?
On the NI-700 (firmware v2.95.214) that I was using, when I emulated strings to the master it would not trigger the data event for that port. I could see the string in device notifications, but my code would not run. No matter what I tried, I could not get the data event to work. The RX light on the COM port I was emulating does NOT light up, but the Input light does flash.
This seemed odd behavior to me so I switched to another processor. On a NI-3000 (firmware v2.32.145) with the exact same compiled code and the same string output from the device emulation on the same port, the data event was triggered. In this case, the string shows up on the device notifications and the RX light DOES pulse when the string is emulated.
Has anyone else experienced this with Device Emulation? Could someone from AMX please look into this odd behavior?
Comments
-
I've had mixed results with Device Emulation and Control myself, it never occurred to me to associate it with a particular master. However, I often confuse myself with how they work in the first place. Control is the one that activates the device directly, Emulation is the one that fakes the device and it's responses to the master. I am always getting them mixed up. But both generate notifications, or should anyway (just did on my test master).
-
Greetings Mr. Bailey and company,
Thanks for bringing up this issue on the emulator. I will begin the process of looking into this. I would encourage you to call things like this in to support as well. We don't routinely monitor the forums for engineering issues. The moderators do the best they can to bring these types of issue to us however.
Thanks again for your support and honesty in these forums. -
Thank you for your prompt response on this issue. I wanted to post of the forums and make sure I wasn't overlooking something simple before calling up tech support and making a fool of myself.

Please let me know of any developments on this issue. -
cbailey wrote:I have been trying to debug a module I wrote that deals with device feedback. In the process of debugging I was using device notifications and the "Emulate a Device" tool to send strings from COM port 2.
On the NI-700 (firmware v2.95.214) that I was using, when I emulated strings to the master it would not trigger the data event for that port. I could see the string in device notifications, but my code would not run. No matter what I tried, I could not get the data event to work. The RX light on the COM port I was emulating does NOT light up, but the Input light does flash.
This seemed odd behavior to me so I switched to another processor. On a NI-3000 (firmware v2.32.145) with the exact same compiled code and the same string output from the device emulation on the same port, the data event was triggered. In this case, the string shows up on the device notifications and the RX light DOES pulse when the string is emulated.
Has anyone else experienced this with Device Emulation? Could someone from AMX please look into this odd behavior?
Maybe not exactly matching this thread but it may be an issue...
While testing a dealer's program, I have disabled the runmode and rebooted the master. Next I did was to hotwire Rx and Tx on a COM port to check something. On a NI-X000 this works, I'll get the STRING FROM notification. But if I try this on a NXM-COM2, I will get no notification.
After some more testing I found that on a NI-x000 the RXON is somehow set automatically, but on a NXC-COM2 (and so maybe also on a NI-700) I have to do this manually either by sending the command RXON to that port, or (in case of an active program) with a CREATE_BUFFER() which is doing this internally. -
Marc Scheibein wrote:After some more testing I found that on a NI-x000 the RXON is somehow set automatically, but on a NXC-COM2 (and so maybe also on a NI-700) I have to do this manually either by sending the command RXON to that port, or (in case of an active program) with a CREATE_BUFFER() which is doing this internally.
I've just been playing with an NI700 and I find that, at startup, an RXON command is sent to 5001:2:0 if there is a STRING: handler present in the appropriate DATA_EVENT, but it is not sent if the STRING: handler is removed. My guess is that the master is considering the STRING: handler to be equivalent to a CREATE_BUFFER in this respect.
For some reason, I can't get the thing to refrain from sending RXON to the first port (5001:1:0).
In any case, I've observed the same thing as CBailey with the NI700 and the device emulator -- the device notifications shows a "String From," but it doesn't appear to actually occur.
Harold -
On the NI-700 (DUET firmware v3.11.323) that I?m using, the emulated strings sent to the master show up in device notifications and DO trigger the data events for both Comm ports as expected. However, like your non DUET firmware, the RX lights for the Comm ports do NOT light but the Input does flash.cbaily wrote:On the NI-700 (firmware v2.95.214) that I was using, when I emulated strings to the master it would not trigger the data event for that port. I could see the string in device notifications, but my code would not run. No matter what I tried, I could not get the data event to work. The RX light on the COM port I was emulating does NOT light up, but the Input light does flash.
Here is the code I tested with:DEFINE_DEVICE dvComm1 = 5001:1:0 dvComm2 = 5001:2:0 DEFINE_EVENT DATA_EVENT[dvComm1] { STRING: {SEND_STRING 0, "'String from Comm 1:',data.text"} } DATA_EVENT[dvComm2] { STRING: {SEND_STRING 0, "'String from Comm 2:',data.text"} }If I go the CREATE_BUFFER route and watch variables I see the data arrive as expected also.
Interesting thread?
Leave a Comment
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums