03-07-2013 05:38 PM
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.
03-07-2013 07:45 PM
03-07-2013 08:39 PM
What Express VI does that? Snippet attached. Thanks Dennis.
03-08-2013 12:50 PM
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.
03-08-2013 01:02 PM
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.
03-08-2013 04:11 PM
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.
03-11-2013 04:54 PM
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,
03-14-2013 01:54 PM
Chris, Thanks for your suggestions. It is working now. Much appreciated. Nik
03-15-2013 11:36 AM
No Problem, I'm glad I could help