LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Please help me assign channel names

Hi Im trying to log select data when any of 24 signals rises above 5 V which I have done with Greater or Equal Express VI. I'm having a hard time getting this data to my file via Write to Measurement File. A waveform plot that I have connected to this signal has no problem extracting the channel names from the signal. However they aren't as easy to get into my data file. I have been searching quite a bit and I know I need to convert to array to get names then back to dynamic for the file making. I'm not having any luck with this approach.  I have quite a few dummy channels involved and I thought about extracting channel names from mx, but obviously I'm only interested in the selected signals of specific channels that have specific voltages.  

 

Thanks.

0 Kudos
Message 1 of 9
(3,745 Views)
It looks like you are trying to assign the tab character as a channel name. There is an Express VI to do this. Everything else is Express, why not use that?

Since you did not attach the actual VI or an image in the correct format (look up snippet) and all of the details are hidden because you do use nothing but Express VIs, really difficult to say what else might be wrong.
0 Kudos
Message 2 of 9
(3,732 Views)

What Express VI does that? Snippet attached. Thanks Dennis.

 

 

 

0 Kudos
Message 3 of 9
(3,726 Views)

Okay here's the other approach I tried. I'm not sure what to do with the channels terminal on the read data expres vi.  It has a storage format, but I think the channel names are in there. I need them to go into my rows on the csv. What I have runs but doesn't work. Any hints appreciated.

0 Kudos
Message 4 of 9
(3,695 Views)

That last VI does not make any sense to me.

 

The Express VI to set a signal name is called Set Dynamic Data Attributes. The set waveform attribute function probably would have worked if you gave it an actual name instead of a tab character, which is something I already mentioned.

0 Kudos
Message 5 of 9
(3,681 Views)

I had a bunch of uneccessary VI's. Results are getting better in that each channel goes to a column in the data file but still no time column or channel labels. 

 

 

0 Kudos
Message 6 of 9
(3,654 Views)

Hi nwiman,

 

I looked a little into your code and I want to point a few things out to you.  I think you now have the Write to Measurement File almost worked out correctly.  Firstly, I want to let you know you are using a DAQmx task, and because we don't have you MAX configuration, we don't know what that is.  I chose to simulate a USB-6351 to get some analog inputs, it is titled Dev1 in my MAX.  Also, to avoid a buffer overflow error from DAQmx while it is waiting for the user to determine the file path, I used a File Dialog express VI to get the path before the While Loop starts.  Lastly I unchecked "Ask user to chose file" in the properties of Write to Measurement File and chose "append to file.  I also want to point out that your code has Tab constants, but the Write to Measurement file is set up for Comma delimited. To show you the functionality of the write to measurement file, I wired the signal after the DAQmx read to the write to Measurement File, and it works how I think you would expect it to.  I recommend using charts for your output signals and when they look like you would expect them, wire them into Write to Measurement File. 

To run the snippet I have attached, you must simulate a USB-6351 in MAX.  Follow this link to add the simulated device to MAX, once it is in MAX you should not need to create a task or anything, just make sure it is named "Dev1".

 

Regards,

0 Kudos
Message 7 of 9
(3,626 Views)

Chris, Thanks for your suggestions. It is working now. Much appreciated. Nik

0 Kudos
Message 8 of 9
(3,600 Views)

No Problem, I'm glad I could help

0 Kudos
Message 9 of 9
(3,589 Views)