LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview PDA+ menu ring control

I am not sure if this is specific to labview 7.1 and the PDA module.
I have a <b>ring menu</b> that essentially has 6 options and is wired to a case structure. This is all wired within a while loop and executes fine when asked to. The problem is that I have to tape the execute button like 3-4 times before it is executed. I am not sure what is going on. I've attached a screenshot so you guys can get an idea of what I am dealing with.
Download All
0 Kudos
Message 1 of 7
(2,898 Views)

Without seeing the actual VI my guess would be that the Execute CMD button has a latched boolean action. This means that after you press the button, it is read once as T (and the ring value goes into the SR) and then it is reset to F. Assuming the F case just passes the value of the SR, you now need to press the boolean again in order for the True case to execute, this time with the internal case doing what you wanted.

Why are you using the SR? Why not wire the ring directly into the case?
Another improvement would be to use an event structure to detect a value change for the ring or the boolean. If you do it for the ring, you won't even need the boolean.

If this didn't help you, post the actual VI.

To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).


___________________
Try to take over the world!
0 Kudos
Message 2 of 7
(2,893 Views)
I've attached the VI..  thank you for those links for reading material. I've gone through the labview course I & II lab manuals already. But I am new to labview programming in general, so thanks.
0 Kudos
Message 3 of 7
(2,881 Views)

My guess seems to be correct - your boolean button is set to a latch action (you can set the action by right clicking the contol and selecting Mechanical Action). A latch action means that the button will be reset after its terminal was read.

So what happens is this: You click the button and the True>-1 case is executed, but because the button returns to being false, then in the next loop the False case is executed and the SR gets -1 again. If you click the button quickly a number of times, the True case will execute twice in a row and the correct value will be read from the SR.

My suggestion for the easiest solution would be the same as last time - get rid of the shift register. Wire the ring directly into the input of the inner case and the code will execute in the same iteration as when you click the button.


___________________
Try to take over the world!
0 Kudos
Message 4 of 7
(2,872 Views)
Thank you, that worked really well. Do you know by any chance if in labview 8.0 pda module their will be support to execute another vi within a vi?
0 Kudos
Message 5 of 7
(2,860 Views)


@GHernandez wrote:
Do you know by any chance if in labview 8.0 pda module their will be support to execute another vi within a vi?

I'm not sure what you mean by that. You're already calling VIs inside your VI (for example, the PDA get date\time...). If you want to see the VI's front panel, you can already do that now - just go into File>>VI Settings>>Window Appearance>>Customize and change the one about Show FP when called to true (you should also set it to close). This should hopefully be covered in those tutorials.

If you're asking about dynamically calling VIs, I think the answer is no.


___________________
Try to take over the world!
0 Kudos
Message 6 of 7
(2,842 Views)
I apologize for not being clear. Indeed i meant calling vi's  dynamically.
0 Kudos
Message 7 of 7
(2,828 Views)