04-06-2014 08:01 PM
Serial write is there becuase sensor has to be interogated with a string of "2" before it will return a temperature
04-06-2014 08:01 PM
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.
04-06-2014 08:09 PM
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.
04-06-2014 08:13 PM - edited 04-06-2014 08:18 PM
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
04-07-2014 12:15 AM
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?
04-07-2014 08:35 AM - edited 04-07-2014 08:41 AM
@juliecat wrote:
I'm new to this posting thing. How do you get a screenshot in line in the post versus adding an attachement?
download the "JKI VI Package Manager" and click/install "Code Capture Tool" from LAVA...
04-07-2014 08:40 AM
04-07-2014 10:10 PM
Julie,
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.
Thanks,
Steven Howell
Certified LabVIEW Developer
Systems Developer
Optimation - Houston
04-08-2014 12:03 AM
I have version 2012. Can you save it as that?
04-08-2014 12:20 AM
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.