03-29-2006 01:31 PM
Summary: Interruption of a data packet from a Visa serial port with repeatable actions when using a cRio 9474.
Environment: NI-PXI-8190 Pentium 4 2.0 Ghz system 512MB RAM, Windows XP Pro
SP2, Labview 8.0.
PXI-7811R with cRio units: 3-9263’s; 9221; 9401; 9474; 9435; 9215.
2630 multiplexor, and an 8421-RS485.
Visa 3.4.1;
NI Switch 3.00.49161;
NI-Serial 1.8.1;
NI-DMM 2.5.0
The property node (Bytes at Port) shows 78 bytes, the Read asks for a byte count of 78, but the return count is only 24. We have narrowed this anomaly down to when the speed signal is powered through the 9474 – that is, the data stream is complete and correct, until this happens.
We suspected the control system was sending bad data, but we placed a separate computer running a DOS character monitor on the RS 232 data stream and is it complete and correct, Showing us that the full 78 bytes are being transferred, but the Visa read is only producing the 24 bytes.
Then we tried another computer running a small VI that simply reads the RS 232 data stream with Visa (its actually the same sub-Vi doing the reading, but in a smaller easier to handle main VI). The data stream was interrupted on this computer as well! Let me repeat this:
Since the DOS monitor reads the full stream, and both the main computer running Visa 3.4.1 and the separate computer running Visa 3.4.1 only pass on 24 bytes, something seems to be going wrong in the Visa/serial driver.
Any ideas?
TonyI’ve attached the sub-Vi that reads the packet and the FPGA.VI that drives the 9474 engine speed signal.
The rs-232 data stream is continuous and must be sync’d using 4 sync bytes hex ‘FEFEFEFE’ – then the 78 packet bytes are read.
The engine speed section of the Fpga.vi is the second loop.
03-30-2006
02:33 PM
- last edited on
05-27-2025
08:15 AM
by
Content Cleaner
Hi clearman,
This is definitely odd behavior. First I would make sure you have the latest version 3.5 of NI-VISA installed. You also said that you are using a PXI-8421 which is RS-485, but you mention that the control system is using a RS-232 port. Keep in mind that the two are not interchangeable. Are you using the PXI-8421,or the built-in RS-232 port on the PXI controller?
Another suggestion would be to try to replace any asynchronous VISA reads with synchrounous VISA reads. This will help assure that the VISA Read is completing before any other code is executed.
If none of these options fixes the problem, please post a NI-Spy log. This will allow us to see exactly what the driver calls and serial bus are doing.