08-27-2012 06:56 AM
I ran across a problem today which caught me off guard.
I wanted to save a comma seperated list of SI-formatted values to a file for reading in later. SI format (100u instead of 0.0001) is easier to read, even without physical units.
Problem is that I can't read them in any more. As soon as there are more than one entry in an in0put string, Scan from String seems to fail with the %p formatter.
Can someone see if I'm not completely insane?
Shane.
08-27-2012 08:34 AM
You are not crazy. I remember running into this issue in 2011. I want to say I had the problem in 8.6 as well. I think in the end, I just used a different format.
08-27-2012 08:56 AM
Do a spreadsheet string to array and convert each with %p, it should work.
A quick test showed that %p worked well with 1 value, but not any more.
/Y
08-27-2012 10:26 AM
@crossrulz wrote:
You are not crazy. I remember running into this issue in 2011. I want to say I had the problem in 8.6 as well. I think in the end, I just used a different format.
Well I've already changed the code to use a different format, but why (logically) should this conversion fail? There are no SI units which use a comma, right? The same problem occurs with semi-colon separated values and space-separated values...
I would call it a bug. Or at least if it's intended behaviour I need a good reason why.
Shane.
08-27-2012 10:43 AM - edited 08-27-2012 10:44 AM
Intaris wrote:I would call it a bug. Or at least if it's intended behaviour I need a good reason why.
I fully agree. I could not come up with anything remotely logical as to why it wouldn't work.
Here's an approximation of what I was trying to do (once upon a time). Bacially, I wanted whole units with SI notation. Ended up with some weird resuts.
08-30-2012 06:17 AM
Hi guys,
thank you for your post. it seems like, that there is some inconsistence in the behaviour here.
I fully agree with you and I will contact our R&D department to look for an answer.
Best regards,
08-30-2012 10:44 AM
Hello everyone,
Abduelkerim has filed a Corrective Action Request on this behavior (CAR #368645), but I wanted to make a quick post about some experimenting I did with your VIs this morning. It appears that if there are two spaces after a SI modifier that the Scan From String VI behaves more like we would expect. I've attached screenshots of this below. The important thing to note is that every blank area you see is actually two spaces instead of one. I was unable to find this behavior documented anywhere, so I'm adding it to the CAR as well. In the meantime, hopefully people who stumble across this thread will find this information useful.
08-30-2012 08:40 PM
Drew,
This is a long shot, but is there any possiblilty that this issue may be related to the units issue which has been discussed in the past few days? Sorry, I did not take the time to search for that thread.
Lynn
08-31-2012 01:25 AM
Lynn,
this is broken in LV 8.5 as well (which I'm currently using), so I think it's been around for a long time.
Shane.
08-31-2012 07:50 AM
Unfortunately, I agree with Shane. I'm pretty sure I did a thorough search of CARs for this and came up empty, but if they kick it back for being a duplicate, I'll update the CAR # to this thread. Since it's been around so long, there's a good chance we might have missed something in our search.