08-11-2015 09:35 AM
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!
08-11-2015 09:40 AM
Just like the DAQmx examples, you just need a front panel channel control. That's assuming you aren't using the DAQ Assistant.
08-11-2015 09:41 AM - edited 08-11-2015 09:42 AM
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> ---'
08-11-2015 09:41 AM
I currently am using the DAQ assistant, is this not possible with it?
08-11-2015 09:46 AM
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> ---'
08-11-2015 09:48 AM
Okay perfect, thanks so much for your help!