Jump to content

Something I had not noticed before


dannyt

Recommended Posts

Hi,

I just noticed something today that I had not seen before and it somewhat surprised me.

This is using LabVIEW 8.2.1 and I noticed that when in a case statement the scan for string does not read the format string if it passed in from outside.

Is this expected behaviour and the same in the newer version of LabVIEW ?

cheers

Dannyt

post-7256-1221556189.jpg?width=400

Link to comment

QUOTE (Antoine Châlons @ Sep 16 2008, 05:31 AM)

I agree the code LOOKS wrong but since that code never execustes (false constant driven state) it can't (?) produce wrong results. Imagine trying to write a "tester" that finds an error in non-executing code.

Ben

Link to comment

I've confirmed this behavior in LV 7.0 and 8.6.

I tried using some of the other structures (flat sequence and timed loop) and they seem to behave like the 'For Loop'. The conditional structure has the same problem. It seems that the ability of the scan from string function to see outside of a Boolean controlled structure is limited or somehow different.

Don't know if it's a bug (present in 7.0 until today) but it's not necessarily a behavior that one would expect :thumbdown:

( NOTE: A search of the dark side indicates that this is a known behavior, and NI does not necessarily consider it a bug. You could report it if it bothers you... )

Link to comment

QUOTE (Phillip Brooks @ Sep 16 2008, 07:14 AM)

...

( NOTE: A http://forums.ni.com/ni/board/message?board.id=170&message.id=190463&query.id=38753#M190463' target="_blank">search of the dark side indicates that this is a known behavior, and NI does not necessarily consider it a bug. You could report it if it bothers you... )

Nice follow-through Phillip!

Ben

Link to comment

QUOTE (Phillip Brooks @ Sep 16 2008, 12:14 PM)

( NOTE: A http://forums.ni.com/ni/board/message?board.id=170&message.id=190463&query.id=38753#M190463' target="_blank">search of the dark side indicates that this is a known behaviour, and NI does not necessarily consider it a bug. You could report it if it bothers you... )

Thank you for that link Phillip, it was an interesting read. I had another look at the detailed help to see if it was obvious something I missed, but to me it looks like as of LabVIEW 8.2.1 the documentation has not been updated.

cheers

dannyt

Link to comment

QUOTE (dannyt @ Sep 16 2008, 02:10 AM)

This is using LabVIEW 8.2.1 and I noticed that when in a case statement the scan for string does not read the format string if it passed in from outside.

Is this expected behaviour and the same in the newer version of LabVIEW ?

Definitely expected behavior. LabVIEW sometimes reads a constant format value as a help. If you care about the data types, you shouldn't rely on that but should wire in a default value for each output.

Link to comment

QUOTE (jdunham @ Sep 16 2008, 05:10 PM)

Definitely expected behavior. LabVIEW sometimes reads a constant format value as a help. If you care about the data types, you shouldn't rely on that but should wire in a default value for each output.

It would be ok if the output adapted to the format constant when VI is run. Then it should not show dbl as the datatype, it should show generic or similar.

Link to comment

QUOTE (Ton @ Sep 16 2008, 11:35 PM)

Oh. Guess I'll have to go tell my boss: "Yeah, I heard from the customers. Seems they don't want it. So I'm welding this can shut again. No, I don't have a clue what LV 10.5 will do for a headline feature now, but they clearly don't want this one."
Link to comment

QUOTE (Aristos Queue @ Sep 17 2008, 06:54 AM)

Oh. Guess I'll have to go tell my boss: "Yeah, I heard from the customers. Seems they don't want it. So I'm welding this can shut again. No, I don't have a clue what LV 10.5 will do for a headline feature now, but they clearly don't want this one."

?? Please explain.....

Reference to Dynamic dispatch? Can't be since it's already in.... Hmmm.

Shane.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.