LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

selecting which channels to write a file

Hello All
 
I want know how I can easily select a set of channels to write to a file.
 
I am building a strain daq.  I have 24 channels.  I would like to group the channels according to where the guages are on the device.
Say the user puts channels 1-3 on the "Frame" and channels 4-7 on the "Motor". How can I write each grouping to an individual file?
 
Thanks in advance
 
Aaron
0 Kudos
Message 1 of 5
(3,066 Views)
AaScWi,

You can write individual channel to a file by splitting up the data from your DAQmx read VI using Split Signals.  This can be found in the Function Palette » Express » Signal Manipulation » Split Signals

This will split your data into each indivudual channel that you are reading.  If you want to write a group of channels together into a single file you can bundle just those channels back together with Merge Signals, which is found in the same palette

Let me know if this answers your questions. 
Mark
NI App Software R&D
0 Kudos
Message 2 of 5
(3,048 Views)
Thanks for the reply,
 
I already knew about the split and merge. I needed a way to id each channel because sometimes the channels being used will change.  The split and merge methods are to "hardwired" for my app.  Is there a way to use them dynamically? Ideally I would have a list of possible channels in the group and then  I would check to see which ones are present.  I have found on method that is working so far.  I assign names to the channels in the task and then use index waveform array by channel name.  I then merge those signals.  I haven't checked to see if it gives an error when a signal is not found though.
 
I've attached my vi its still a little crude
 
Aaron
0 Kudos
Message 3 of 5
(3,042 Views)
Try using the Select Signals express VI.  This may do exactly what you would like.  This should be in the same pallette as Merge and Split Signals. 
Mark
NI App Software R&D
0 Kudos
Message 4 of 5
(3,026 Views)

Hi AaScWi,

you can use a for loop and an index array block. See in the attached picture the red marked area.

Mike

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