LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Serial to Continuous Measurement and Logging (NI-DAQmx)

Hello,

 

I have been successful with:

A program for continuously reading from my serial device

Using the Continuous Measurement and Logging (NI-DAQmx) template to read analog input

 

Now I would like to basically add the serial program to the Continuous Measurement and Logging. I'd like to focus on just data acquisition for now.

 

I believe my VISA Configure Serial Port has been correctly set up in Configure Hardware.vi.

 

I am most confused about the data flow. I thought about creating a cluster (see attached) for the analog and serial input data. Then in Acquire.vi I add my write and read serial code, bundling its output with the output of Analog 1D Wfm NChan NSamp.

 

Am I on the right track? Any leads would be much appreciated.

 

Much thanks,

Ben

0 Kudos
Message 1 of 5
(3,616 Views)

You attached a control, which is literally just a front panel icon. Please attach the VI you can't get to work. From what you tell us, what you need is a simple producer/consumer architecture with the DAQ read in producer, and logging in the consumer. Clusters are the most commonly used type of data in queues as they can handle literally anything you put in them, unbundle at consumer and process accordingly.

0 Kudos
Message 2 of 5
(3,597 Views)

I hate to be this way but... Good luck with that.

 

I spent a couple weeks trying to modify the  Continuous Measurement and Logging example to meet my needs and found it to be so tightly coupled and integrated that making one small change destroyed everything. 

 

In the end (as with most of the shipping examples) it was a good example of what can be done but it is easier and faster to just start from scratch. 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 5
(3,558 Views)

Hi, I have attached the entire project.

 

In Main.vi you can see that I have created a cluster for Serial and DAQ device data. In Acquire.vi I have the DAQ and Serial read, and I try to bundle their outputs. I believe this is what you're trying to suggest?

 

Much thanks,

Ben

0 Kudos
Message 4 of 5
(3,549 Views)

I think I've made progress with the data queue. All errors are gone now and I can run the program. However when I click start, the program is always "Waiting for trigger". How can I disable the trigger and set it so that it never/always logs? I just want to see data in the waveform charts, for now.

0 Kudos
Message 5 of 5
(3,543 Views)