Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Retrieve Live Data from cDAQ-9171

Hello, 

 

I have a cDAQ-9171 that I am trying to retrieve sensor data from. I need to continuously retrieve data from the cDAQ-9171 so that I can store / use the data within various applications.

 

I have viewed the raw sensor data inside LabView. However I don't believe LabView will be able to provide the solution I am looking for - as I need to continuously retrieve the data, whereas LabView seems to be structured "tell me how long to record data, then I will output that much data to a file".

 

Ideally I need a solution that works something like this:

 

Python Program (Python is only an example, any programming language will be fine):

 

----

<import any library I need>

 

while true:

  var data = <function call to retrieve data from cDAQ-9171>

 

  <do something with the data>

 

----

 

So the program works in an infinite loop retrieving data from the cDAQ-9171. 

 

My key questions - is doing something like this possible (continuously retrieving data so that it can be used inside a program)?

I need to store the data inside a database so that I can retrieve live sensor data from another program. 

 

Any help would be greatly appreciated. 

 

Thanks

0 Kudos
Message 1 of 3
(2,706 Views)

That's an extraordinarily common thing to do in LabVIEW.  in the shipping examples (Help->Find Examples->Hardware->DAQmx) for continuous voltage input.   (If you want to use it as a starting point, make sure you "Save As..." with a different name to a new location of your own.)

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 2 of 3
(2,684 Views)

Definitely! Check out the "Voltage-Continuous Input.vi", an examplet that ships with LabVIEW.

From LabVIEW click on Help/Find Examples/Hardware Input and Output/DAQmx/Analog Input/Voltage - Continuous Input.vi

 

That'll get you going! 😉

0 Kudos
Message 3 of 3
(2,618 Views)