05-12-2015 02:42 AM
Hi everyone,
I've got some functionalities i'd like to implement on my VI and i think it could be made using property nodes but i can't figure out how to use it. Maybe you could help me out ?
I've got a "expert mode" boolean on my front panel that makes a hidden 2nd tab window visible, but i'd like it to not only make it visible but also to automatically switch tabs. For instance i'm on my 1st tab window where the "expert mode" is located and when i push it the 2nd hidden tab window comes in front of the 1st, until i push this "expert mode" boolean again (or another button).
The other issue i want to deal with asap is that i want to "grey" some of the buttons of my MMI (i mean i want to make them un-usable until the settings are done for instance). For information they are part of an event structure atm, i don't know if it makes it harder or impossible to achieve. How can i do this ?
Thank you by advance,
Clement Z.
Solved! Go to Solution.
05-12-2015 02:58 AM - edited 05-12-2015 02:59 AM
Hi Orbieu,
See attached what you asked for...
It is some basic operation.
BR,
Vincent
05-12-2015 03:11 AM
It's true that it looks basic but when you don't know where to look at it's not easy.
Anyway thank you about the grey-ing it was really helpful !
About the automatic tab window change, is it possible ? And if it is, how to do it ?
Clement Z.
05-12-2015 03:13 AM - edited 05-12-2015 03:14 AM
Hi Orbieu,
but also to automatically switch tabs
Write the correct value to a local variable of the tab control…
part of an event structure atm, i don't know if it makes it harder or impossible to achieve
Using an event structure to handle UI actions makes it easier to achieve!
05-12-2015 03:15 AM - edited 05-12-2015 03:17 AM
Hi,
I suggest you to do free class NI makes available in their website.
Tabpage property node attached. You can also use it connecting to a local variable.
BR,
Vincent
05-12-2015 03:44 AM
Thank you for your help so far, but i'm gonna need you for a problem i failed to solve trying to realize this function.
Attached is the VI i'm working on.
Two things are bugging me :
_ when i hide the second tab window with the "PageVis" property node, i can't click the "mode expert OFF" button
_ my graph is not displaying unless i activate an event
How do i solve this ?
Clement Z.
05-12-2015 03:59 AM
Hi Clement,
when i hide the second tab window with the "PageVis" property node, i can't click the "mode expert OFF" button
As the "OFF" button is located on that 2nd page you will never be able to click it when you hide the 2nd page.
Seems like a very big flaw in your design…
my graph is not displaying unless i activate an event
Because you did not use the TimeOut event! So the event structure will block until a registered event occurs!
You should put your property nodes inside the event structure: IF user event THEN change setting by property node!
THINK DATAFLOW!
05-12-2015 04:03 AM
Hi,
Your VI (even if it is poor documentated) does what u asked for...
You can't click on your button since you have disabled and grey out the tabpage !
About your graph, it is what you are asking to do.
Try to build your VI with errors connectors to trace any errors which could occur. Think dataflow !
Try to handle how to stop your VI with the event structure...
BR,
Vincent
05-12-2015 04:29 AM
OK for the tab window visibility, it was indeed quite dumb, i just needed to put the tabs in non visible item mode.
However, i do not get how to use the timeout. Should i put all my code into the timeout for it to run when no other event is called ?
Same goes for the error flow. All i can see it to link the different error in/out of all the blocks in my block diagram, with maybe an error handler at the end, but i don't get what information i could get from it.
Anyway thank you for the help you've provided !
Clement Z.
05-12-2015 04:40 AM - edited 05-12-2015 04:41 AM
I suggest you to try out tutorials or just read the context help.
Timeout will not run in your case because it is default value is -1. If you put 200 into in, every 200ms, your timeout code gonna execute.
Try out to create your application with a pattern like attached. I think it could help you a lot !
BR,
Vincent