Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Two classes using one daq card

Can I have two classes using one daq card at the same time? I want one class for AO and another class for AI? Can the classes be in different Apps, while running at the same time? Thanks

JMD
0 Kudos
Message 1 of 11
(5,424 Views)
Hello,

If you are using our new NI-DAQmx driver you can accomplish this task as long as one application is using AO and the other is using AI. You cannot have two programs trying to control the same functionality simultaneously.

Our new driver, NI-DAQmx, is a multithreaded driver. Our older driver, Trad. NI-DAQ, is not multithreaded. Let me know which device you have and what language you are using to develop your app. and I will tell you what you can do.

http://digital.ni.com/softlib.nsf/websearch/BEC182021CEB566C86256EEE00696562?opendocument&node=132060_US

Regards,
Bill B
Applications Engineer
National Instruments
0 Kudos
Message 2 of 11
(5,424 Views)
We are going to be using a M series device, and I'll be programming in C#.

JMD
0 Kudos
Message 3 of 11
(5,424 Views)
Hello,

You will definitely be able to achieve this type of control with an M Series board. You can have one application controlling the AI and another program controlling the AO.

Bill
0 Kudos
Message 4 of 11
(5,424 Views)
I tried to use two class (AI and AO) at the same time in my computer, but I failed. Please, see my attached program and give me comments.

I am using DAQCard-6036E via NI-DAQ7.0. My program is written in C#.

I tried to murge two DAQmx samples in one program. AI and AO run saparately. However, if I try to run at the same time, one kills the other and gives errors.

I lookforward to hearing you soon.

Thank you very much.
0 Kudos
Message 5 of 11
(5,424 Views)
I was able to run your sample code just fine. What Kinda error's are you getting?

JMD
0 Kudos
Message 6 of 11
(5,424 Views)
What kind of DAQ card do you use? I am using PCMCIA DAQCard 6036E? If you run my program with PCI Card successfuly, my problem may happen due to PCMCIA Card limitation. Please let me know the type of your DAQ Card.

Moreover, I want to make sure that you ran a generation class by pushing 'show'->'start.' while you were running acquistion class in main window.

Thank you.
0 Kudos
Message 7 of 11
(5,424 Views)
I use a pci 6036. And yes I did runa generation class.
But I am using DAqmx 7.3
JMD
0 Kudos
Message 8 of 11
(5,424 Views)
Can you tell me what version of DAQmx you're using, and specifically what the error text is?

-- Chris W
NI .NET DAQmx Team
0 Kudos
Message 9 of 11
(5,424 Views)
Version: I am using DAQmx version 7.1.0f1.

Error Message: Actually, I have no error message when I tried to run acquisition and generation simutaneouly, but it just stop generating signal. Moreover, it gives error message when I try to quit generation function. I got error "Status Code: -200016."

I tested my program using PCI-MIO-16E-4 via DAQmx 7.1.0f1. It works without any problem. I guess the error is due to the limitations of PCMCIA Card.

I had similar experience when I was using Labwindow/CVI. I took ANSI C examples to implementing double buffered acquisition and generation(actually there are two seperate examples and I merged them into one program). My program worked well with PCI-M
IO-16E-1, but it did not work with DAQCard 6024E (PCMCIA card).

Please teach me how I can solve this problem.

Thank you.
0 Kudos
Message 10 of 11
(5,424 Views)