LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial on Controller vs. Card

I remember hearing something from NI that the serial connection on the PXI controller does not work in RT, and the solution is to buy a serial card instead. Is this true?...is there any difference between using the serial on the controller vs. a card in the RT environment?
0 Kudos
Message 1 of 11
(4,395 Views)
The built-in com port is supported with the RT serial driver. That said, benefits of using a plug-in card include larger FIFOs, the additional COM ports themselves, and RS-485 (for the applications that require it).
0 Kudos
Message 2 of 11
(4,395 Views)
Built-in (ISA-based) serial and PCI-based serial work in RT. You just can't use COM1, COM2, etc.

In Windows, COM1 and COM2 are assigned as aliases to the devices ASRL1::INSTR and ASRL2::INSTR. LabVIEW Real-Time does not associate COM1 and COM2 with ASRL1::INSTR and ASRL2::INSTR. Therefore, you cannot reference COM1 and COM2 as the Resource Name for the VISA Configure Serial Port function. Instead use the strings "ASRL1::INSTR" and "ASRL2::INSTR" as the Resource Name for the function.
0 Kudos
Message 3 of 11
(4,395 Views)
Clarification: You can't use the *strings* COM1, COM2, etc.

The strings COM1, COM2, etc are not understood. The hardware COM1, and COM2 will work but must be addressed by their formal VISA nomeclature (i.e. ASRL1:INSTR).
0 Kudos
Message 4 of 11
(4,395 Views)
How large is the serial buffer on the PXI Controller in comparison to the PXI Serial Card? Does the serial port on the PXI Controller share its memory from RAM or does it have its own FIFO?
0 Kudos
Message 5 of 11
(4,395 Views)
I believe the controller's FIFO is 16 bytes (dedicated) and the plug-in cards are 64 bytes (dedicated). The driver has additional buffers allocated in RAM.
0 Kudos
Message 6 of 11
(4,395 Views)
According to NI online serial manuals, when data is received into the Receive buffer, an interrupt is generated and the processor retrieves the data from the serial buffer. How does this work for RT...there won't be an interrupt to generate, so I'm assuming the buffer will continue to fill until a LVRT subVI goes and reads it, or the buffer gets full, at which point it will overwrite data at the beginning of the buffer?
0 Kudos
Message 7 of 11
(4,395 Views)
The RT serial driver doesn't poll for received data - rather it is called by a hardware interrupt and retrieves whatever data is curently residing in the FIFO. This data is then placed into a buffer in RAM where it waits to be accessed by the application.
0 Kudos
Message 8 of 11
(4,395 Views)
How can a hardware device interrupt LabVIEW RT? Isn't that the purpose of having a RT OS?...so that the software controls execution flow, not the hardware? Or is the tranfer of data from the UART buffer to controller RAM happen in one of those threads operating in the 'background'?
0 Kudos
Message 9 of 11
(4,395 Views)
Hardware drivers must pay close attention to how interrupts are handled so that unexceptable jitter is not introduced. It is sometimes a delicate act to balance performance (in this case not overflowing the UART FIFOs) and jitter (deviation from real-time performance).

In order to improve jitter performance some drivers may get an interrupt, silence the interrupt, then signal a high-priority thread that work needs to be done.
0 Kudos
Message 10 of 11
(4,395 Views)