05-21-2008 11:43 AM
05-21-2008 01:06 PM - edited 05-21-2008 01:06 PM
What are you using for the format string? Do you ever get less than 5 data items after the time stamp?
Instead of the Scan From String, you could also use the Spreadsheet String to Array function. The delimiter is a space, format of %f, and data type is a 1D DBL array. If you need the timestamp, you would convert to a string array and after using the Index Array function, get the numerics and convert those separately.
05-21-2008 01:34 PM
05-21-2008 02:04 PM
05-21-2008 05:59 PM
05-21-2008 06:49 PM
05-21-2008 06:58 PM
05-22-2008 09:35 AM
05-22-2008 10:46 AM
Yes there is another part of the code that writes, but it does it on com 1 and I read the data in from com 2. The byte count part is for when not data is coming in (not hooked up) and a NaN displays in the proper places. Thats the part of my case structure to either send out NaN to my displays or if there is a byte count to send to data off the string down the line to the "scan from string". I'm not useing the byte count to terminate or at least I don't want to. I want it to aways read if no data or data. If data is comeing in it comes over at once a second. On the term char can you have the LF + CR? I know on are old software writen years ago by someone who knew what they were doing had that term char to pick from. I'm trying to write a scaled down version that doesn't give the user that option.
so would adding term enable and term char below byte count work? right now I think its useing LF as default because when I look and the data when it is running the first time it is at the top of the probe and from there on out there is a blank line as if someone hit the CR. and would I end it on just the CR or LF + CR?
The program runs for awhile then stops with the error "input string does not contain data in the expected format" if you hit continue it may or maynot run for awhile longer.
05-22-2008 11:20 AM