LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Minor scan from string bug

x-posting from LAVA...

1.  Drop a scan from string primitive on the BD.
2.  Create a constant format string from the primitive.
3.  Type in something useful, like "%s".  The output type adapts.
4.  Make the label visible on the format string constant.  Change the label text, and the output types return to "dbl".  Recompiling (in most forms) re-adapts the outputs to the correct types.

Strange that changing the label (which is apparently largely cosmetic) changes the apparent functional output type.

This problem is a bit worse in 7.1 than in 8.20, since not all types of recompile will re-adapt the outputs.

Joe Z.
0 Kudos
Message 1 of 22
(5,346 Views)
Ha!  How strange!
Oooh nooo, not another Scan From String problem! Smiley Surprised
Sometimes, you gotta wonder...
 
Hey, I'm using LV7.1 and, if the SFS output is wired (before or after), the label-change has no effect - other than label change.  Same, if only Default input is wired.  Are my results different than yours?
 
Cheers.
 
"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 2 of 22
(5,337 Views)
Hi tbd,

I think you're correct.  I discovered the problem when it came up in a typeless connection.  Just not thorough enough on the testing!

For a trivial example of what I was seeing, change the labels in the attached examples (one in 7.1, one in 8.2).

Guess it's not version dependent after all!

Joe Z.
Download All
0 Kudos
Message 3 of 22
(5,311 Views)
This was reported to R&D (# 45EC8SVB) for further investigation. Thanks for the feedback!
Cheers,

Matt Pollock
National Instruments
0 Kudos
Message 4 of 22
(5,280 Views)

Hi fellas,

I dont want to start a new thread for this new buggy thing, since this also has been reported in 2007 only.

In LV 7.1, the Scan from String function doesnt allow me to get the same integer type [ Unsigned/Signed ] output consecutively. I ve attached the VI & the screen shots for reference. No use even if U specify in the Format String input of the function about the datatypes you wish to convert.

Please go thro' this & clarify me if this is really a serious bug.

The workaround is to get everything as Dbl itself & then convert them as per your wish using the converters available in the Numeric -->> Conversion pallette.

- Partha ( CLD until Oct 2024 🙂 )
Download All
Message 5 of 22
(5,181 Views)
The VI & one more screenshot.
- Partha ( CLD until Oct 2024 🙂 )
Message 6 of 22
(5,180 Views)
Sorry. The attachments are here...
- Partha ( CLD until Oct 2024 🙂 )
Download All
Message 7 of 22
(5,180 Views)

Hi All,

Sorry for adding seperately again...

Can anybody please confirm this behaviour in LV 8 & upwards... ?! I'm in LV 7.1 still. Smiley Sad

Just curious to know whether this has been reported already & got fixed in it... Smiley Wink

The context help clearly states that, " Scans the input string and converts the string according to format string."

Thats why I added this buggy thing in this thread itself.

- Partha ( CLD until Oct 2024 🙂 )
Message 8 of 22
(5,177 Views)
This is no bug, or at leat I don't see it.


You tell the function to grap an integer. It gets "1", and .0000 1.000 remains open.
Then you tell it to grap a float. It gets ".00000". Just like it should.


It's tricky, you got me puzzled for a while. But it's no bug. And it still is like this in LV8.2, or at least it should be.


Regards,


Wiebe.
Message 9 of 22
(5,153 Views)


wiebe@CARYA wrote:
This is no bug, or at leat I don't see it.

You tell the function to grap an integer. It gets "1", and .0000 1.000 remains open.
Then you tell it to grap a float. It gets ".00000". Just like it should.

Hi Wiebe,

I wrote that, in LV 7.1, the Scan from String function doesnt allow me to get the same integer type [ Unsigned/Signed ] output consecutively.

I didnt mean to grab an Int & a Float alternately consecutively... I said to scan & try to get Integers only [ Unsigned/Signed ] consecutively.

First, see the attached screenshots carefully once again to get what I meant.

Then update here if you still get correctly ( if Scan passes )... Smiley Wink

I'm quite sure, it'll FAIL.

Waiting for your test results...

- Partha ( CLD until Oct 2024 🙂 )
Message 10 of 22
(5,139 Views)