LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I use all channels on a PCI-8431/8 simultaniously

We have a production environent situation and would like to be able to use all 8 ports of the PCI-8431/8 at the same time. In actuality I want to send the same request to all 8 ports at the same time.
 
Is there a example somewhere that shows this sort of thing?
The data coming back will certainly be larger than the 128byte buffer attached to each channel on board. That being the case, can I attach a buffer space to each comm port?
 
We have worked with the 8 channel cards, in some form or another, for a couple of years and are now looking to speed up the process. If I can find a way to utilize the PCB in this form we can lower our production time by 5%.
 
Leon Black
Sr. Designer ABB/TOTALFLOW
0 Kudos
Message 1 of 4
(3,454 Views)

When you open a serial port using OpenComConfig() you are actually opening the port through the windows OS serial driver.  This driver handles both the transmit and receive queues for you.  To use 8 ports, just call OpenComConfig() 8 times and you get 8 separate tx/rx queues.  Simply set these queues large enough to handle your expected data packets.  The minimum and maximum buffer sizes vary by OS, for example win2000 I believe has a minimum buffer size of 4K so if you are using shorter packets than that you are already covered.

The 128 byte receive buffer does not really affect your input data size unless your hardware can not keep up with the interrupt requests generated by the serial card when it is receiving data.  If you have 8 ports simultaneously receiving data at high input speeds, and you are trying to run this on slow hardware, you may reach the limits of the hardware configuration, but with a 128 byte buffer on the card that is probably not likely to be an issue unless your system is heavily loaded by other applications or processes.

While there is not a single function to send the same data out 8 RS232 ports it should be pretty trivial to write you own to simply loop through the 8 ports sending your data buffer.  The transmit functions pass the data to the transmit queue and the actual process of sending the data is handled by the OS and driver for you.

What you are proposing should be very practical to implement, if you have any additional questions post again.

Good Luck

 

Message Edited by mvr on 08-24-2006 04:15 PM

Message 2 of 4
(3,449 Views)
Thanks for the input. I had already set it up the way you described. I was interested in the sigal command to all 8 ports. If no way then back to the driver for each port approach. Thanks again
0 Kudos
Message 3 of 4
(3,439 Views)
We're using the 8431 8 port card as well.

The 843x uses NI's serial driver as a plug in driver.  This either supplements or replaces the native windows driver, not sure.  It is distinctly a different situation than using the NI rs-232 library with a generic com port and the native windows serial driver, though buffer management may be the same.

We've had problems with using generic com ports and the NI rs-232 libray (and the windows native serial driver) on multi-core systems under WinXP Pro.  We switched to the NI 8431 and 1.8 plug in driver and we don't seem to have that particular problem anymore.

Menchar
0 Kudos
Message 4 of 4
(3,410 Views)