Device Emulation
cbailey
Posts: 15
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?
0
Comments
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.
Please let me know of any developments on this issue.
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.
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
Here is the code I tested with: If I go the CREATE_BUFFER route and watch variables I see the data arrive as expected also.
Interesting thread?