From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Real-Time Waveform Acquisition and Logging Sample Project closes RT Main.vi when connect button is pressed on UI Main.vi

Hello all,

 

I am attempting to adapt this sample project to my hardware.  I've added my cDAQ 9139 target to the project and moved the appropriate files.  I've setup the config xml file and loaded it to the root of the cDAQ. 

 

I can run the real time Main.vi and the UI Main.vi.  However, upon entering the ip for my target and pressing the connect button, the reat time Main.vi stops running.  I also get the UI Error 314004 and the UI Main.vi continues running.

 

Any thoughts on what I'm doing wrong?

 

Thanks

Michael

 

Upon further investigation, I've discovered an error in DAQ Initialize.vi. 

 

DAQmx Start Task.vi:7220001<append>
<B>Property: </B>AI.Min
<B>Requested Value: </B>-5.0
<B>Value Must Be Greater Than: </B>-78.125000e-3
<B>Value Must Be Less Than: </B> 78.125000e-3


<B>Device: </B>ThermoCoupleMod

<B>Task Name: </B>_unnamedTask<7>

 

Any suggestions on where to look for correcting this?

 

Thanks again.

0 Kudos
Message 1 of 7
(3,039 Views)

Update:

 

I located the DAQmx error from above and corrected that.  I also determined what needed modified in the three DAQ vi's referenced in the white paper for the sample project.  This has resolved my immediate issues.  Both main vi's run and I can connect to the target.  I'm still working through adapting the project as I cannot currently view any live data.  I believe this is likely caused by another configuration step I need to complete.

 

Does anyone have any suggestions on how to modify the sample project to allow viewing multiple channels in the live data view, perhaps on another tab?

 

Thanks

Michael

 

0 Kudos
Message 2 of 7
(3,025 Views)

Before getting into the multiple channels stage, on the UI Main.vi:

 

There's an "Acquire Live Data"  button above the live data. Have you managed to enable it, or does it stay disabled and grayed out?

Camilo V.
National Instruments
0 Kudos
Message 3 of 7
(2,988 Views)

Yes.  I am now able to view live data, one channel at a time as I think it's designed. 

I would really like to be able to view multiple channels at the same time.  Ideally, I'd like this on the current graph tab (single channel live view isn't required) but having a separate tab would be fine too.

 

Thank You,

Michael

0 Kudos
Message 4 of 7
(2,976 Views)

It is coded for one channel indeed. You would need to do some editing to make it work.

First, you definitively need to make sure that the Live Data Array “knows” it is going to receive an array with the channels. You can do this by putting the waveform constant on the “Send Live Data to UI” case from the UI Message Loop, inside an array constant. That will make the waveform chart accept an array of waveforms.

Then, you need to send the right data type from the Event Handling Loop (in the “Acquire Live Data” event, I believe). This means, you need to input the same array of waveform constant into the Enqueue Message function, wired to the Message Data input. This waveform array must come from the data acquisition loop.

 

Let me know how it goes.

Camilo V.
National Instruments
0 Kudos
Message 5 of 7
(2,939 Views)

Any chance you could post a pic of the code required.  I made a couple attempts without success.

0 Kudos
Message 6 of 7
(2,883 Views)

That's something hard to do without seeing the changes you have already done to the example. Can you upload it?

Camilo V.
National Instruments
0 Kudos
Message 7 of 7
(2,854 Views)