05-20-2015 01:54 PM
Thanks for hanging in with this, Jim.
I have made your changes, still doesn't work for me.
A probe placed on the selector line is always an empty string (not "Not Executed") indicating that the Get Menu Selection is probably not getting the menu data.
Highlight execution just shows the Read Menu constantly pinging the selector terminal through the GMS.
An interesting sidelight: I asked another fellow locally to see it he could run it like you did and it won't work for him either. He's running 2013 same as me except I've got SP1 installed and he doesn't. May I ask which version you're running?
05-20-2015 02:01 PM
@Kilo_Watts wrote:
May I ask which version you're running?
2014. I can test your VI in LV2010 if you'll back-save and post it, but I don't suspect a version issue.
05-20-2015 02:17 PM
OK, thanks, the 2010 version is attached (I hope, never did a back save before)
It does seem odd, though, that two different 2013 installations (different S/Ns) can't run this thing and you can in 2014.
05-20-2015 02:27 PM
LV2010 says that VI is version 13. Please post your menu file, too.
Just to be sure, you went through this when making your menu?
05-20-2015 02:33 PM - edited 05-20-2015 02:36 PM
Attatched is a 2013 version which uses the event structure. It also will recreate the menu as you click on it, based on the current color selection. So if the color is Blue the item to change it to Blue isn't an option.
EDIT: Here is a snippet
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
05-20-2015 03:04 PM
Yes, I did complete the menu editor screen for all three "Tags".
When I first saved the new menu I chose the save it "with the control" option instead of creating a separate file. I have since saved it as a separate file and it is attached with a .txt extension, the forum choked on .rtm, so you'll need to change it back. Saving as a separate file didn't help, still won't change colors.
Took another shot at saving a 2010 version, and it is also attached.
Thanks.
05-21-2015 06:19 AM
What we've had here was a failure to communicate. You're setting the custom right-click menu of the control (I missed that) but reading the custom menu of the VI (Current VI's Menubar); your VI doesn't have a menubar. It's no wonder it doesn't work. Your control menu did come in your VI, though.
I don't believe you can get a reference to the control's menu but, as mentioned earlier, an Event structure is really the way to go.
05-21-2015 10:28 AM
That's really slick, Hooovahh, thanks for sharing. Best of all....it works!
05-21-2015 11:07 AM
I appreciate your ongoing help with this and agree with your analysis of reading the wrong menu, but NI seems to think it should work in this application note:
http://zone.ni.com/reference/en-XX/help/371361K-01/lvconcepts/customizing_vis/
Check out the last sentence in the second paragraph under "Creating Menus" and then their proposed vi on the second page. Unless, of course, I'm just misinterpreting their instructions.
Also, didn't you get it to work once you built a menu? How did you build that menu?
05-21-2015 11:33 AM
Before you hie off and reinstall things, you might consider learning the first rules of DataFlow programming:
1... A structure does not execute until ALL its input wires have data available.
2... No output leaves the structure until EVERYTHING in the structure has executed.
(Yes the FLAT SEQUENCE appears to violate rule #2, but it's really a collection of individual structures, so it gets away with it.)
Your example code has one loop which copies a boolean button value to a boolean indicator (at 32,000,000 times per second on my computer), while checking for a STOP button every time.
Trust me, you don't need to check 32M times per second to get a decent response time.
So, when does that output become available? Apply rule 2.
But the OUTPUT of that loop is the INPUT of your larger loop.
So when does the big loop start? Apply rule 1.
Appl
Blog for (mostly LabVIEW) programmers: Tips And Tricks