07-12-2023 09:44 AM
I am using a real time PXI controller to communicate to some devices. I send a simple command, and they respond with 64 bytes of information. I have communicated with 6 of them successfully, but two are giving me issues. If I thread the command, it will stack up and then dump many messages all at once. If I don't thread it, it hangs up for 4-5 seconds on the command write. If I disconnect the peripheral device, the outgoing messages are written at the correct interval as indicated in debug messages as well as a serial sniffer.
Flow control is supposed to be off on the PXI end per the function I am using, and the documentation for the devices state that there is no flow control on their end either.
Device:
My COM port setup:
How can a peripheral device throttle or inhibit outgoing serial messages?
07-12-2023 02:22 PM
real-time PXI controller but you are running Windows?
07-12-2023 02:26 PM
I am not running Windows. I have used Windows and regular serial hardware for this device in the past with no issues. I am working on a real time version of my application.
From college I remember something about serial port idle states being high. Without a digital o-scope I can't tell if this device is pulling down the line such that the PXI device doesn't send the message until some certain criteria is met.
07-12-2023 02:28 PM
ah okay
I have only worked somewhat with RS232 ports in Windows.
07-12-2023 03:26 PM
This issue is blowing my mind. Originally it would hang up on writing the data request message so I thought I would be smart and send that message from a Windows computer and just receive the data message on the real time computer. I plugged in only the receive pin and the ground pin on the real time computer. As soon as I plug in this device all three other com ports come to a screeching halt. They are sending out the data request message, but their interrupt is not catching the incoming data even though I can see it on my sniffer.
07-12-2023 03:38 PM
Are these 2 difficult devices different ones from the other 4?
If so, it may be them.
07-12-2023 03:43 PM
I have 4 of one model and 5 of another. 4 of 4 and 2 of the 5 seem to work, and two don't. One working one and one non-working one have consecutive serial numbers and were ordered at the same time. They both have the same firmware version as well.
The 5 are sending an extra carriage return which did cause some issues at first. The manufacturer will work this into the next firmware update, but since it has to go through engineering it will take months.
07-12-2023 04:20 PM
Does it make a difference which serial port?
07-13-2023 07:23 AM
I have tried different com ports, different cables, and completely different serial cards. This morning I am going to space out the command messages to each port so that they all aren't being processed simultaneously.
07-13-2023 02:47 PM
I had to fall back to using the Windows machine to handle the serial communication for the troublesome model. I am not sure why the PXI hardware has so much trouble with them, but at least this gets me going again. I am going to try to get them on the bench and work on communication when I'm not holding up testing. In parallel, I look forward to updated firmware from the manufacturer.