10-09-2010 12:45 AM
Hello All
The two attached vi's are identical except for one change in the pane mouse down event frame. The output of the quotient&remainder is connected to 1) a tab control value property node and 2) a tab control value(sgnl) property node.
The result is that the vi doesn't perform the way its intended which is a combination of the both. viz....tab through each page with a pane mouse down event. When the last page of the tab control is reached the code in here should work, unless interrupted by a pane mouse down event.
Could somebody please explain to me the different operations happening here, and how to correct it?
Thanks in advance
10-09-2010 01:25 AM - edited 10-09-2010 01:27 AM
First i need to know what your intention to give five minutes delay?.... Why did you hide the Stop button in the front panel?.... How you are planning to stop the loop...? What exactly you want to achieve by using the Value signaling...
Be clear with your coding and when you are using a while during testing you should always have an external stop button accessible eventhough the while loop is controlled by some events... And giving that much of delay will make the other events go un noticed...
10-09-2010 01:47 AM
Br.anand
None of your questions are relevant to my query.
It matters not what the five minute delay is used for, just accept that it is used. Same goes for all the other issues you raised.
My question was....why is the behaviour of the two vi's different based on the property node.
The intent of what the vi is supposed to do was also made clear in my OP. No other information is relevant or necessary.
Ray
10-09-2010 03:22 AM
Probably because you didn't connect the feedback through every event case (notice the 'Use default value' glyph on the output tunnel of the event structure). However it's not nessecary to use the feedback node:
Some style points:
Ton
10-09-2010 03:03 PM
rayclout wrote:My question was....why is the behaviour of the two vi's different based on the property node.
As Ton mentioned, all you need to do is wire the shift register across in the "tab changed" event case. Right now, whenever the tab event fires, the shift register value resets to zero, thus going to the second page again on the next mouse click. Forever.
10-09-2010 04:00 PM
Looking once more at your "...discard1.vi", there are still a few things that don't make sense.
I have no idea why you do all these signaling properties on the "boolean", because there is no associated event(!), so it does not make a difference from writing to a plain value property or even a local variable of it. If something needs to get written in virtually all cases, place the code after the events structure. No locals or value properties needed. (I assume the boolean is just a stand-in and that in the real code something more significant happens once page 4 is reached. Right now the boolean is hidden whenever it is off, so we would not know the difference anyway ;)))
It is really painful to debug a program that has fancy windows and scaling option. I would wait with that until the code is mature. As a last step you could hide the stop button and deal with program shutdown is a customized way. This looks like e.g. a museum display that reverts if unattended for a few minutes, so that long timeout is fine.
You can wire the tab wire directly to a case structure and it will act like an enum. No need for comparisons with diagram constants and such.
10-11-2010 12:34 AM
Ton
Silly,silly omission on my part. I should have picked that one up. I used the probes and was wondering why the probe wasn't showing a reset of the register.
Thanks for pointing it out.
altenbach
I use the boolean indicator as a visual debugger. It makes it easier for me to debug if I can see from an indicator alongside the probe window.
But......fancy windows and scaling option??????? can't see where I've done this. My FP is pretty plain in fact
Thnaks for your interest in my work guys.
Regards
Ray
10-11-2010 01:37 AM
rayclout wrote:I use the boolean indicator as a visual debugger. It makes it easier for me to debug if I can see from an indicator alongside the probe window.
Then it would have been easier to place it next to, instead of on the tab control, else you won't be able to see it most of the time ;).
rayclout wrote:But......fancy windows and scaling option??????? can't see where I've done this. My FP is pretty plain in fact
I work on a laptop and your front panel was way bigger than my screen, with lots of empty greyspace around the tab control. Your tab control was set to scale with the front panel, so once I resized the front panel to better fit my screen, the tab control got tiny and nearly unusable. It's like herding cats. 😮