LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tabbing "sticking"

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

 

 

0 Kudos
Message 1 of 8
(3,165 Views)

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...

 

Tab.JPG

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...  

 

Smiley Mad

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 8
(3,158 Views)

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

 

0 Kudos
Message 3 of 8
(3,152 Views)

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:

CycleThroughStates.png

Some style points:

  • Show the label of a property node so you know which control you are reading/writing
  • Don't use the 'terminate button' to stop a VI, I would advice to use the 'Front panel.close?' event, but that means you should show your title bar. I would definitly hide the toolbar buttons in a running application.

Ton

 

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 4 of 8
(3,143 Views)

 


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.

 

Message 5 of 8
(3,126 Views)

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.

 

 

0 Kudos
Message 6 of 8
(3,117 Views)

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

0 Kudos
Message 7 of 8
(3,085 Views)

 


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. 😮

 

0 Kudos
Message 8 of 8
(3,080 Views)