LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

real time application using daqmx

Hi

 

In my application i am using daqmx daq assistant express vi to acquire 3 signals (100s/s and 10 samples per channel) in a while loop. Then i filter signals. then i multypy signals with gain and add them. Then using daq assistant express vi I output the processed signal to a mortor in same while loop. i want to perform this application in real time.  is it possible to do this the way i am doing. Thanks

0 Kudos
Message 1 of 9
(3,223 Views)

Hey,

 

I would suggest to use DAQmx functions instead of the Express VI. You will find examples for that under [LVDIR]\examples\DAQmx\

 

Christian

0 Kudos
Message 2 of 9
(3,203 Views)

As per your post you are filtering your ch data.Filtering is based on 10 samples sampled at 10s/s. This means your update rate will not be more than 10Hz in any case.

compared to this I think gain calculation time and delays due to windows will not be significant.

i dont understand why you need real time operation?

i will recommend to use DAQmx VIs directly instead of express VI. Ensure that do not init you hardware in every iteration. this will improve your code by updating the Analog output when your DAQ card is acquiring data in the background.

0 Kudos
Message 3 of 9
(3,201 Views)
Thanks for the reply. I am usign DFD build a filter from transfer function vi  with DFD filtering vi to build my filter. does all the filters sample at 10s/s at 10 samples? I didn't understand what you meant by dont initialize hadware every iteration. I have 3 sensors that provide data continously. They are part of the system. all i want do is process data that come from sensors and output the result to a mortor in real time( as colse to real tiem as possible). Thanks
0 Kudos
Message 4 of 9
(3,189 Views)

Hi suni,

 

You have to make sure that your target is fast enough to keep up with the loops that you want to be running. You want to put the DAQmx API functions in your time critical loop because DAQmx API is shared resource. If you put a shared resource in a low priority loop, it will lock control of the processor and effectively kill the determinism of your system.

 

Also there is a Benchmarking example in NI Example Finder under Help>>Find Examples...>>Toolkits and Modules>>Real-Time>>Benchmarking that will give you a way to determine what is the worst case for your performance and jitter.

 

I hope this helps.

 

Regards,

Stephen S.

National Instruments
Applications Engineering
0 Kudos
Message 5 of 9
(3,140 Views)

Hi Stephan

Thanks for the reply. I am not using a real time operation system. I am trying to implement my system in windows operating system. i am trying to do it as close as possible to real time. i have to aquire data from three channels (sensors) and process (notch filter and multiply with gain) them and output the result to a servor mortor. any suggestion to implement this? so far i have one while loop to acquire and process and to generate.

0 Kudos
Message 6 of 9
(3,134 Views)

Hi suni,

 

I am sorry, there is sometimes confusion between the Real-Time Module that is a LabVIEW product and the phrase "real time." If you just want to take 3 different measurements and output signals, you should be able to do that by combining the code in the templates available in Help>>Find Examples...>>Hardware Input and Output>>DAQmx for both analog input and analog output, if that is what type of signals you are working with.

 

To do this for multiple measurements, if they are from the same device, you can create a single task that refers to all three channels. If they are from different devices, what devices are you using, because it depends on what types of devices you have.

 

Regards,

Stephen S.

National Instruments
Applications Engineering
0 Kudos
Message 7 of 9
(3,114 Views)

Hi Stepen,

 

Thanks for the reply. I am using NI DAQmx E6025 data aquisition card to acquire data from three sensors. These siganls are accellameter, gyro and Joystick input. Then i notch filter gyro and accel. then multipy them using gain number and add them togeather. then i subtract it form joy stick input. result goes to servo mortor that controls the stab. (in a way accel and gyro are feedback form motion from the stab). 

0 Kudos
Message 8 of 9
(3,105 Views)

Hi

 

Can somebody help me with this issue? In my application i tried to sample at 100s/s , 1 sample per cahannel. But system doesn't respond when i did this. But when i take 100s/s and 5 samples for channel system works fine. I want to process one sample at a time because i have data form custum function to add( impulse and step). is there anyway i can achive this in labview?

0 Kudos
Message 9 of 9
(3,064 Views)