05-27-2016 11:12 AM
I am creating a spreadsheet of temperature readings using DAQ Assistant. When I try to add a timestamp the value placed into the spreadsheet is always 77. What am I doing wrong?
Thanks!
Ben
Solved! Go to Solution.
05-27-2016 12:10 PM
Actually, you aren't using the DAQ Assistant.
You are using something called DAQNavi Assistant which I have never heard of before.
But the problem is in your code where you get the timestamp value then convert that to a string. You are then converting the string to a byte array. So if your time is 1:01 PM, you now have a string of characters "1" ":" "0" "1" "space" "P" "M" and they show up as the ASCII equivalents. That Array of ASCII values gets converted an array of doubles then a dynamic data type.
The value 77 is the ASCII value for "M". My guess it is afternoon and you are basically sending the value of 77 for the character M to your data file.
Try to get rid of the express VI's and the dynamic datatype and convert them to real LabVIEW data types in your code as soon as you can. You should probably convert all of your numbers to strings early on since that is ultimately what you want to see in your text file. By converting to strings, you can control the format of each of your pieces of data, then combine those string elements into an array that you send to the Write to Spreadsheet File.
05-27-2016 01:21 PM
Thanks! I ended up converting everything to strings and it worked.