I now see that it writes to the file after the stop button is pressed. I need to write to the file itself every 10 seconds. Can you point me in a direction to achieve this? I see in your next post that you say not to move the shift register.
To write to the file every 10 seconds is simply a matter of moving the write to file processes that are outside of the while loop into the internal of the case structure, so that when the "Report" case is called the data is written to the file. If you were going to do this i might also suggest having the data flushed to the file or closing the file after every "Report" case as this will help to prevent the loss of large amounts of data if the program fails to close properly.
as mentioned previously....also set append to "T". I think its better to write to the file after the vi stops and put an indicator on the "data" shift register array to see the updates....IMHO
Ooooh, This is very close to working...
Last post from apok is working for a single sensor except for one small issue. There's an extra carriage return being written to the file. Screenshot attached (question about screenshots later). I believe the first CR is coming from from the temp sensor and the extra CR is part of the Write to Spreadsheet File.vi or vice versa. Maybe I can strip the two right most characters off the string from the temp sensor.
As for adding the other sensor, I'm going to try adding com4 outside the while loop, placing its respective read/write inside the 'report' case, and change the build array to accomadate another element.
I'm new to this posting thing. How do you get a screenshot in line in the post versus adding an attachement?
Try this solution, as I mentioned, it is a bit advanced, there is a bit of work for you to complete, mainly in the stub VIs that are marked. Also, I have created a simulator to let you test the data logging to make sure that it displays and logs data to your liking. You can change the simulator out for the real serial data by changing the conditional disable structures in the consumer loop.
Both the Error Logger and Data Logger are background processes that are launched and then hidden, they are both shutdown when the main VI shutsdown through user events.
Give it a try, and let me know.
Certified LabVIEW Developer
Optimation - Houston
Sure, try this, sorry about that.
Oh, and when you run the simulated data, the dials are going to go nuts, that is normal, I just have three random number generators for the simulator.