From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
06-11-2009 03:28 PM
I don't know if you remember, but I mentioned this problem before. in reply #31 http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=412736#M412736
You have an array of 13 booleans, but you only have an array of 12 filenames. (For some reason, the 13th LED associated with valve 9 is unnamed)!!??
If the 13th item is the true item, it will get a default empty filename out of the array, and thus force a dialog box asking for the filename.
06-11-2009 03:42 PM
06-11-2009 04:27 PM - edited 06-11-2009 04:28 PM
After the top state machine. I named it "asdasd" to show up a bit better. It comes out of the And that comes out of Valve9. I tried to find it on the front panel, but it seemed like the entire tab control highlighted.
Drop a few probes here or there on your block diagram, perhaps some breakpoints, or highlight execution. See if you can figure out exactly which part of your code is triggering the extra dialog.
06-12-2009 09:30 AM
I think I know what is causing it.
Do you ever have a case where no valves are open, booleans are true? If a true can't be found in the boolean array, then the Search 1-D array function returns a -1 as the index. Put a -1 index into an array, you will get the array's default data type, which for a file path array would be an empty file path.
If you wrap the write to spreadsheet file in a case statement, wired from the index, put the file VI inthe default,0 case. Make a -1 one case and leave it empty, then the write to spreadsheet file won't execute when the index is -1 and the file path is empty. (You could also use the Not a Path function on the comparison palette and just make your case structure a True/False).
06-12-2009 12:02 PM
That did the trick to get rid of that problem, but only the time and data stamps for each of the channels is getting logged and not the the measured data. What could be the cause of this? I've attached the txt file below. Also, how can I just put one date stamp and one time stamp into the file? The FOR loop retrieves the data stamp and the time stamps for each channel separately so they can be put into separate columns. However, I only need one time stamp and date stamp for each row of samples. Finally, I am still receiving that Error 0. I have not noticed any other error with the operation of the system besides the data written to the file incorrectly. Do you notice anything that could cause this?
Thanks!
06-12-2009 12:44 PM
You have a For loop to the lower left creating an array of dates and an array of times. One for each waveform in the waveform array. But this will iterate so quickly, all the dates and times should be the same and would have no real correlation to when the data was actually collection. I would eliminate the For Loop and just use Index Array to get the dt and T0 of the first waveform.
The reason for no real data is this. You are taking your array of data and doing a reshape array on it for a length of zero. So you are taking your array and turning it into an empty array. So not data comes through. I don't know why you would be using Reshape Array. It seems to me you should be using Index Array.
06-12-2009 01:21 PM
06-12-2009 01:59 PM
Sure,
You just need to use the same function to write a header string to the file, but only the first time you open it. Easiest thing would be to just take your array of filenames and open each one, write the header, at the very beginning of the program.
06-16-2009 01:28 PM
Okay, I've been running my program for the last day to check for stability and performance. Right now it is just reading in 3 RTDs and there is nothing connected to the CO2 and flow. The data file looks good for the most part. However, every now and then two data points are written in the same cell. I looked at the data file to try to figure out a pattern when this was happening, but I don't see a reoccuring pattern. What could cause multiple data points to be written in one cell and how can this be corrected? I've posted a portion of the data file where this occurs.
Nevermind the time stamp. The first two numbers are the cycle number, and when I posted it here it combined those two cells together.
71 | 24/15/2009 | 19:24:23.765 | 24.683122 | 24.771832 | 25.250652 | 0.026825 | -0.013893 |
71 | 24/15/2009 | 19:24:23.965 | 24.683122 | 24.771832 | 25.250652 | 0.027144 | -0.014524 |
71 | 24/15/2009 | 19:24:24.165 | 24.68343024.683430 | 24.77306224.773062 | 25.25003725.250037 | 0.0268250.026188 | -0.026522 |
71 | 24/15/2009 | 19:24:24.565 | 24.68343 | 24.773062 | 25.250037 | 0.026188 | -0.014524 |
06-17-2009 09:22 AM
Hello NT_Engine,
I noticed that you are using Write Character to File VI which is no longer supported by LabVIEW. Have you tried using Write to Text File VI instead?