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: 

Case Structure in While Loop for DAQ

Solved!
Go to solution

Hello, I am writing a program and I am not very familiar with how to do the case structures. I have 3 inputs from a Measurement Computing DAQ and I am trying to get them to plot onto an excel spreadsheet. I have gotten it to work, but now what I want to do is add a record button so that I can run the program without it logging data until I hit record. I also want the spreadsheet to have labels for each input. I have attached my file and I am looking for advice on how to setup the case structure with the record button and names for each input.Block Diagram.PNG

0 Kudos
Message 1 of 4
(1,269 Views)

Hi Devenp,

 


@Devenp wrote:

what I want to do is add a record button so that I can run the program without it logging data until I hit record.


What about placing the case structure around that WriteFile function when you want to en-/disable recording the data!?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(1,266 Views)

I hadn't thought of that. I tried it and it seems to be working. Is there a way to name each input in the excel file? Right now it just says which input, but I want it to have a name such as "intake pressure"

0 Kudos
Message 3 of 4
(1,247 Views)
Solution
Accepted by Devenp

Hi Devenp,

 


@Devenp wrote:

Is there a way to name each input in the excel file? Right now it just says which input, but I want it to have a name such as "intake pressure"


Sure.

Read the LabVIEW help, especially on this waveform datatype. It allows for handling "attributes" and there are pre-defined attributes used by NI functions like your ExpressVI. One of those pre-defined attributes stores a label for the waveform…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(1,243 Views)