From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Strange VI behavior after switching tab pages in tab control (even though no code is executed after switching pages)

TST & Ben:

If I cut and paste the identical block of code where the property node errors were seen and place it on blank new VI (and run), there are no errors. I even copied the original XY graphs over and then created the references from these to see if maybe the XY graphs are somehow corrupted. Any clue on this? I called this property_node_test.vi and it is in the test.llb, and you can try it.

ps. I am attaching an even more simplified version of the code, which now does not work even with Procedure A above (plot colors and legend behavior inconsistent). I can only believe this has something to do with the property nodes and am thinking of trying to do this without references (use straight property nodes). However, that then precludes me from using references. What do you think?

Sincerely,

Don
0 Kudos
Message 11 of 18
(987 Views)
I'm sorry, Don, I'm still having trouble digesting your VI. The problem was less with the FP and more with the code - A big program with events, references and subVIs is just harder to understand, especially if you don't know the system. It's very hard to detect a problem if you're not sure what's the proper operation of the code in the first place.
That said, the fact that you copied the code to another VI and the errors stopped suggests that the VI was corrupted. Personally, I recieved errors from your last version too. I can't tell if they're the source of the problems, but I think that is definitely something worth checking out.
Here is what I did come up with - the errors in the initialize case come from setting the legend size to 0. Set it to 4 and there are no errors. Then, the errors when changing tabs are in two of the property nodes in locations_compare_set_plots.vi - The bottom one outside the case and the top right one in case 3. I'm not sure why those two, but you may want to start by playing with those. I saw that their refs aren't strict, so you could start by using To More Specific Class. If that doesn't help, look further into them.

___________________
Try to take over the world!
Message 12 of 18
(969 Views)
I will continue to look into this and post my conclusions. I have a family emergency in the near term and will be signing off for now. Thanks for your help....Don
0 Kudos
Message 13 of 18
(962 Views)
Hi Folks:

In fact it was the error 1077 that TST pointed out that has led to solving my problems. See the thread:

http://forums.ni.com/ni/board/message?board.id=170&message.id=117426

where I narrowed things down even further. The final post by me shows the easy solution that will avoid someone else going through this. All my XY graphs now work fine and plot legends show up just as they should, even with switching tab pages as detailed earlier and reported not to work. Problem Solved!

Sincerely,

Don
0 Kudos
Message 14 of 18
(942 Views)
Actually, if you look here, you will see I suggested setting the number to 4. I didn't know this affected the actual number of plots, so at least I learned that.

I think the real moral of the story is to leave auto error handling enabled. It never hurts to know when there's an error. If you want to avoid the popups, just wire the error out terminals into something.

___________________
Try to take over the world!
Message 15 of 18
(936 Views)
I was thinking about the error handling yesterday too. I normally build a custom error handler into my code which sends errors to an error case. This is why I normally do not have 'automatic error handling dialogs' enabled. I do have it in this application. However, I have been sloppy about wiring the error clusters associated with property nodes. And I got burned on it this time. Thanks again for your help; I needed another set of eyes for this one.

Sincerely,

Don
Message 16 of 18
(921 Views)
If you do error handling, the errors won't popup, so there is no reason to turn auto handling off. The only case I can think of where this will make a difference is when you DON'T do error handling AND you don't want to see the errors (although I can't see why), so my suggestion is to always leave it on - if you do error handling it won't bother you and if you don't it will alert you to that.

___________________
Try to take over the world!
0 Kudos
Message 17 of 18
(915 Views)
Great point. I used to disable the automatic error dialogs and not wire error clusters for property nodes for the reason that I believed the property node errors were basically insignificant. Definitely learned something here.

Sincerely,

Don
0 Kudos
Message 18 of 18
(907 Views)