LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving VI for user input

I have a current VI that records/ graphs input voltage, and outputs to an Excel file just like I want. However, I am interested in saving this VI for repeated use in another VI, but with user input required in order to choose a channel on the DAQ. Therefore, the VI would take an input of "2" (for example), and channel 2 on the DAQ would take input data and output to an excel file.

 

I have the record/ Excel output file working just fine, but I am wondering if it is possible to save the VI with the user input like I am interested in. Any help would be much appreciated!

0 Kudos
Message 1 of 6
(2,833 Views)

Just like the DAQmx examples, you just need a front panel channel control. That's assuming you aren't using the DAQ Assistant.

0 Kudos
Message 2 of 6
(2,824 Views)

I'm not 100% sure what you're trying to do. Are you trying to set a default value for that VI to always have wherever it is used? Are you trying to have the VI remember what that input value was last time it was run?

You can manually set default input values by right clicking the control and selecting Data Operations > Make Current Value Default.

If you want to remember inputs from the previous run without the developer environment, then you'll have to look in to writing the value to file and loading the file each run.

 

Apparently it's a much simpler issue than I anticipated...

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 3 of 6
(2,819 Views)

I currently am using the DAQ assistant, is this not possible with it? 

0 Kudos
Message 4 of 6
(2,817 Views)

The DAQ Assistant can't take the specific channel as an input, so you're going to have to use the lower level DAQmx code. You can right-click the DAQmx assistant and Generate NI-DAQmx Code. Within that code you will find your specific channel (something like "Dev1/ai0") which you can change to a front panel control.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 5 of 6
(2,806 Views)

Okay perfect, thanks so much for your help!

0 Kudos
Message 6 of 6
(2,798 Views)