LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to have multiple parallel sessions with the NI4351 DAQ using ni435x driver?

Hi,
I am using an NI4351 PCI DAQ card with the Ni435x driver and
LabWindows/CVI v5.5 (on Windows 98) to capture several voltages and a
thermocouple signal. I want to process the thermocouple signal to
enable the software to drive a temperature controller from the card's
digital port. I require a loop which is completely independant of the
voltage reading commands, so that the controller can be tightly
regulated to a setpoint selected from the UIR panel. I am using
seperate threads, so that the temperature control function can be
peformed in the background while the voltage readings are scanned in
another thread. However, by their nature, these scans can never be
interleved or seque
nced with the temperature scans, and so it would
seem that I need more than one DAQ session. Is it possible to
establish seperate sessions with the same DAQ card on program startup
by using the "ViStatus NI435X_Configure()" function? I am hoping to
have two sessions, with each having its own Scan rate, sample size and
channel group. I could keep opening and closing sessions only for the
fact that the temperature control must be continously performed in
real time and I also fear that this would slow down the system. I
would be grateful for any tips.
Thanks.
0 Kudos
Message 1 of 3
(3,166 Views)
JAH,
Your application sounds like an interesting one. You will not be able to what you need with one board. The reason is that the driver locks the resource and can't be access by another process until it releases control, i.e. "Close Session". This is not unique to the 4351 but all NI DAQ cards.
The only way that you can acheive this is to log all the channels at a time that you need, then parse them out in your code. If you only need to monitor the temperature once in awhile then you will still need to log it but ignore them. This will slow your acquisition down some though.
The only other option is to have another board perform the separate task.
You can't access the board with multiple threads or create multiple sessions of a board at the same time.

If you have two boards you will need to put in a wait command inside the process loop to free the process so the processor can handle the other threads. The main reason for this is that NI-DAQ is not multithreaded.

Good luck in your application.

Michael Taylor
Application Engineer
National Instruments
www.ni.com/ask
Message 2 of 3
(3,166 Views)
Thanks Michael. Looks like I'll have to scan everything, pharse out the data as you suggested and hope for the best. Hopefully it won't slow down things too much. At least now, I can stop scratching my head!

All the best,
John.
0 Kudos
Message 3 of 3
(3,166 Views)