dannyt Posted September 17, 2008 Report Share Posted September 17, 2008 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 Quote Link to comment
Antoine Chalons Posted September 17, 2008 Report Share Posted September 17, 2008 Here is what I get in LV 8.5.1 : Quote Link to comment
LAVA 1.0 Content Posted September 17, 2008 Report Share Posted September 17, 2008 QUOTE (Antoine Châlons @ Sep 16 2008, 05:31 AM) Here is what I get in LV 8.5.1 : http://lavag.org/old_files/monthly_09_2008/post-7452-1221557534.png' target="_blank"> 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 Quote Link to comment
JiMM Posted September 17, 2008 Report Share Posted September 17, 2008 This is LV 7.1. Quote Link to comment
Phillip Brooks Posted September 17, 2008 Report Share Posted September 17, 2008 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: Download File:post-949-1221563501.vi (LV 8.6) ( 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... ) Quote Link to comment
LAVA 1.0 Content Posted September 17, 2008 Report Share Posted September 17, 2008 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 Quote Link to comment
dannyt Posted September 17, 2008 Author Report Share Posted September 17, 2008 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 Quote Link to comment
jdunham Posted September 17, 2008 Report Share Posted September 17, 2008 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. Quote Link to comment
Anders Björk Posted September 17, 2008 Report Share Posted September 17, 2008 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. Quote Link to comment
LAVA 1.0 Content Posted September 18, 2008 Report Share Posted September 18, 2008 QUOTE (Anders Björk @ Sep 16 2008, 09:25 PM) 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. Ow LabVIEW with http://en.wikipedia.org/wiki/Late_binding' rel='nofollow' target="_blank">late binding. Please don't open that can of worms. Ton Quote Link to comment
Aristos Queue Posted September 18, 2008 Report Share Posted September 18, 2008 QUOTE (Ton @ Sep 16 2008, 11:35 PM) Ow LabVIEW with http://en.wikipedia.org/wiki/Late_binding' rel='nofollow' target="_blank">late binding.Please don't open that can of worms. 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." Quote Link to comment
Phillip Brooks Posted September 18, 2008 Report Share Posted September 18, 2008 QUOTE (Aristos Queue @ Sep 17 2008, 12: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." Does this mean that NI will finally replace those useless palettes with Quick Drop and the "LabVIEW Ribbon" (aka the garrote)? Will 'Spoolie' will finally make his debut? Where do I renew my SSP?! :laugh: Quote Link to comment
shoneill Posted September 18, 2008 Report Share Posted September 18, 2008 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. Quote Link to comment
crelf Posted September 18, 2008 Report Share Posted September 18, 2008 QUOTE (neB @ Sep 16 2008, 06:55 AM) I agree the code LOOKS wrong but since that code never execustes (false constant driven state) it can't (?) produce wrong results. Ahhhh - but it doesn't look wrong to the trained eye The structure has that cute striped background which shows that not only is that code never run, but it's actively stripped from the code at compile time. More info: Fuzzy Wires and Constant Folding in LabVIEW. QUOTE (Ton @ Sep 17 2008, 12:35 AM) LabVIEW with http://en.wikipedia.org/wiki/Late_binding' rel='nofollow' target="_blank">late binding. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.