Initializi​ng menu ring elements in array
I know that it is possible to initialize the elements of a menu ring using the property STRINGS[]. I have an array of 16 menu rings for labeling DAQ channels, and need to initialize the rings based of the set of available sensors (ie some sensors are retired, or out for calibration, new ones purchased). Is there a way to expose this property for an array of menu rings?
thanx
lmd2
Lawrence M. David Jr.
Certified LabVIEW Architect
cell: 516.819.9711
http://www.aleconsultants.com
[email protected]
This seems to work, but I don't know how it would behave in a compiled application.
Use a property node to get the Array Element.Reference.
From the front panel, select the ring inside the array and Create Reference (switches to BD and places a constant)
Use 'To More Specific Class' to convert the array Element Reference to a menu ring ref using the constant from above.
Set the strings Property.
Message Edited by Phillip Brooks on 04-01-2008 08:35 AM
Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.
"You are what you don't automate"
Inplaceness is synonymous with insidiousness
Attachments:
Menu Ring Array Strings.png 29 KB
Similar Messages
-
Hello,
I've got an array of menu rings and I want to programmatically change the
menu ring in each array element. For a menu ring, there is a property
available called 'Strings' that I can change, but how do I make it change
for all the elements in the array?
Thanks,
PeterYou can create a property node for the element-type of your array. Any changes you make to the properties (including the "Strings") will apply to all elements. Create the property node by right-clicking on the menu ring inside the array on the front panel. The pop-up menu should have a "Create" option from which a sub-menu branches. Select Property Node from the sub-menu. You can also use control references to get at the menu ring's properties.
Daniel L. Press
PrimeTest Corp.
www.primetest.com -
Populating Strings[ ] on a menu ring
I have a menu ring inside of a cluster. The cluster is embedded in an array. So essentially I have an array of clusters where each cluster has just a menu ring inside of it. I'm trying to programmatically populate the Strings[ ] property for each menu ring, for every array position. The Strings[ ] property for each menu ring will be different for each array position.
I can't see any way to do this programmatically? There seems to be no way to access the Strings property when the menu ring is embedded in this manner.I tried that long time ago, no way until some geeks will find a way ....
My workaround: Since I wanted it for a configuration setup screen, I made a seperate popup window for the selection.
Greetings from Germany
Henrik
LV since v3.1
“ground” is a convenient fantasy
'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ' -
Dynamically changing elements in an array of menu ring controls
I have an array (32 rows, 5 columns) of menu ring controls. When a menu selection is made in the first column of any given row, the contents of the menu ring for the subsequent columns (same row) may change. If this is possible, how would you do it? Thanks.
Solved!
Go to Solution.jschichl wrote:
For example, if I had a menu ring of 1,2,3,4. I want to write some logic that says when 4 is selected, then menu ring in the next row changes to 5,6,7,8.
A ring is just a number as far as LabVIEW is concerned, so the underlying cluster need only store numbers, not rings.
In the example I posted in a linked thread, where controls are moved around on top of a table, you need only one ring control. Each time you show that ring, you can assign a new set of strings and values to it, using the Strings and Values property. You can decide what set of strings to show based on the existing data in the cluster, which will get updated each time you change the value in a cell of the table. Does that make sense? I don't have time right now to put together a more detailed example than what I've already uploaded in other threads, and it's only a small change to that.
You update the menu ring at the time the user wants to select a value from it, not at the time the user changes the value that determines what set of menu items to show. -
Attaching binary arrays to a menu ring
I have been playing around with the menu rings and can't seem to get it to do the function that I want. I am looking to making a pull-down menu for some user options for different resoultion modes for an intrument. So for example one option will be "2 eV" and with this option on I need to send 011 to a instrument. Should I store it as a binary string or array, and how can I do that?
Thanks in advanceDo you always need to send a number to the instrument? If so do it this way:
For the menu ring go to its Properties >> Edit Items. In this dialog you can enter the displayed text and the assosiated number. So yo can pair 2eV with 11. The terminal will give you the number. From your example I assume that the instrument will see the number as text with three digits. Use the "Format into string" function. Set the format string to "%03d" which will give a number with three digits padded with 0 to the left. Inthe example choosing 2eV will give 11 from the terminal and "011" as result from the Format function.
Waldemar
Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions -
Hi All,
I have an app (LabVIEW 7) where I use a menu ring to keep the last 5
files used. During runtime it updates and accesses fine. My problem
comes when I start the program.
I save the last 5 files used to the .ini and reload them on startup.
After the program starts my ring is populated and automatically checks
(and displays) the first name in the list. The program has not
processed any file at this point, the default is to wait for the user
to select a new file or a recent one from the ring. However, since
the first item is checked, if the user tries to select it it never
triggers the "Value Changed" event.
So how can I initialize a ring with data but set it to no selection so
that the first time a file is picked it triggers a value
changed
event?
Thanks in advance for any info.
Gc.Menu rings are unsigned so you can't set it to -1 as one would do for a listbox e.g.
If you want to do this with a menu ring, you could add an entry as option 0; it could be empty or be named "No file selected"...e.g. That way you'll detect the change. OR you could check the value when the control reports a mouse or key event instead.
I normally use a standard menu for this, have the last opened files available in a section under a File menu, just as typical in other applications (including LV).
MTO -
How do I modify multiple Menu rings in a loop?
I would like to modify the Strings of 15 Menu Rings in a loop as follows:
Calculate new values
Start For Loop
Write new values to property node Menu ring(N) / Strings[]
End loop
I want to have one poperty node in the loop, whos' reference (or link) gets modified, to point to a different Menu Ring for each iteration of the loop. In other words, without having 15 different property nodes.
Is it possible?
Thanks.You can create a reference for each control (right click->create...), then build these references into an array using build array, then iterate over the array in a for loop using auto-indexing.
You can do the same for the arrays of strings, but because the arrays can probably have different lengths, you should put each 1D array into a cluster and build a 1D array of the clusters. This is because a 2D array can not have a different number of elements in each row.
If you do this kind of thing often, you can save time on creating the reference by using this.
Try to take over the world! -
Hi
I need a help,I have attached my program.
My problem is from the menu ring control if i select D1 the indicator turns on,further if i select anyother options from contol the indicator corresponding to new option turns on and the previous turns off but i need both to be on. Also i like to do if i select D1 it should be disabled(or changed to different colour---so that there is no option to selcet it again until i reset it manually).
Pls attach if there is any ex prgs.
Attachments:
DSC.vi 15 KBHi Veeru,
you change the index of your array between 0 and 1 for every element. Do you want a binary display? If yes you switch the on color of your LEDs to blue and off to black. Then you can use the attached code.
Hope it helps.
Mike
Message Edited by MikeS81 on 06-20-2008 01:10 PM
Attachments:
Unbenannt1.PNG 3 KB -
How to disable multiple items in menu ring?
Hi I have a difficulty understanding on how to disable the items in the menu ring control. I need to know so that I will enable some items for the future products for testing. And why is the first item disabled? How can I disable the right items?
Attachments:
disabled_items.vi 23 KBYour vi works perfectly :
you are disabling the menu items wich correspond to the elements of the 1D array :
-if the array is empty, no element is disabled;
-if the array contains 1 element, for instance = 3, the forth (3+1) menu item will be disabled. If the array element equal zero, then the first menu item will be disabled;
- if the array contains 2 elements, then two corresponding menu items will be disabled, and so on...
Chilly Charly (aka CC)
E-List Master - Kudos glutton - Press the yellow button on the left... -
How do you individually strikeout text in a menu ring?
I have a menu ring with a list of options for the user. Once the option has been ran, I want the text in the menu ring to reflect this by being "strikedout"... I don't want it disabled, just incase the user wants to rerun the option but I want the menu ring to mark which options have been chosen. Is it possible to individually strikeout text in a menu ring - just like you can individually disable items using the appropriate property node?
Blindon,
Elements in the menu ring are array elements. Each element in array must have the same font (This is a limitation of the definition of an array). So, you can only set all elements to be strikedout, not individual ones. (with the property node)
Zvezdana S. -
Currently still on Labview 2011 (upgrading within a few weeks to 2012 SP1) I have the following bug:
If a Menu Ring is disabled and has a "normal" (non-empty) value it will keep its contents (meaning: shown text will remain) when you overwrite StringsAndValues[] with an empty array.
I was unable to find anything about it either officially fixed / known or on this forum, meaning it will probably still be there in the latest version.
Can someone please verify to see if this bug indeed (still) exists in the latest Labview version?
Solved!
Go to Solution.Thanks, though I fail to see why a Menu Ring can not be empty. Imo there should NOT be an error message, but just a plain empty control (or indicator).
I use the Menu Ring to show and allow (if there are other types available) to change a subtype of an electronic product. The control typically does so for released products, meaning I filter out products (and subtypes) still under development (or still undefined). The list can thus be empty. People busy with development have a setting available to also show (and change to / from) these new or (as of yet) unknown types and products. When there are no elements (in this case: subtypes) or only one the control is disabled.
I looked further into this and at no point does Labview mention, force or coerce a user to have at least one element in a (Menu) Ring. -
Move element in array individually
Hello
I'm trying to make a vi that could move individual element in an array
What I did was, I have a pict ring in an array so that I can have as many picture that I need
But the problem is, if I want to move the picture, I'll end up moving the whole array
Is there any way that I could try, to be able to move only the element?
In the vi that I attached, if I link Node-TCP-FTP, I can then move those 3 at the same time
I'd like to be able to produce several of Node-TCP-FTP so that I can connect the nodes to each other later
I'm trying to make each Node-TCP-FTP pair to be independent so that user can move it wherever they like before connecting node-node
I tried using array, but it gets mix up in the end
It won't be a good thing if I limit the number of Node-TCP-FTP pair that the user can make if I were to use separate ring for each of it
Is there any other way that I could try? or is it possible to move the selected element from the array so that I can make an array of Node, TCP, FTP instead of what I've done?
Thanks
Attachments:
subitemMove1.vi 67 KBYour description is very confusing to me. You talk about having arrays and multiple inpdependent pairs of these objects, but you only have one set of objects set up and they don't have anything to do with arrays.
I think you should probably be working with picture controls rather than picture rings. Search the forums, I think Ben had a large nugget on working with pictures.
PS. There is no such word as "traffics". It should be "traffic". -
Database output into menu ring
hello
I'm doing a application where the input of a menu ring needs to be the output of a database query when the VI has already launched (real-time).
my database for now, just has two fields: id and transducer name. i have no trouble getting those values from the db. my problem is that the menu ring input needs to be done using the property node (stringsandValues[]). I've tried to construct an array of 2D but i keep getting error of mismatched types.
I really don't know what else to try. I would like if somebody could make a small example in constructing the type of data that i need or point me to somewhere where that is explained.
thanks in advance,
AdaoMonteiro
PS: does anybody know how to convert a whole column of dynamic variant to data. In my program I'm converting each value at a time in a cycle.Just to clarify, the values are U16 by default, but of course you can change the representation if the ring. In this case the input should match the ring representation.
You only need the "Strings And Values" property if your values are arbitrary. If they are just 0, 1, 2, 3, 4, ... etc. you can write the "strings" property as 1D array of strings. It's simpler.
Anyway, to create the correct "String and Values" input, you could use something like the two alternatives in the attached image, the example at the bottom uses a 2D array of strings, transpose as needed.
Message Edited by altenbach on 06-13-2005 08:57 AM
LabVIEW Champion . Do more with less code and in less time .
Attachments:
StringsAndValues.png 8 KB -
Need help with menu ring or listbox control.
Hi,
I would like a menu ring style of control that does the following. Initially, items will be put into the control through a string array. That is no problem. But,in addition to being able to select any of the existing items, I would like the user to be able to enter a new item. Is this possible with any of the menu or listbox controls? I prefer the menu type controls as I like how when you click on the control you get a pop up of the items in the list, as opposed to the listbox where you have to scroll. Thanks for any help.Not as such, but one alternative would be a combination of the menu ring and
a string. Place the string above the menu ring. When people select something
from the menu ring it's copied to the string and selected. When people type
something into the string, it's added to the menu ring if it's not already
there and again it's selected.
Bear in mind though that if a menu ring gets too large I suspect a scrollbar
will appear in it when it's popped up.
sal wrote in message
news:[email protected]..
> Hi,
>
> I would like a menu ring style of control that does the following.
> Initially, items will be put into the control through a string array.
> That is no problem. But,in addition to being able to select any of
> the existi
ng items, I would like the user to be able to enter a new
> item. Is this possible with any of the menu or listbox controls? I
> prefer the menu type controls as I like how when you click on the
> control you get a pop up of the items in the list, as opposed to the
> listbox where you have to scroll. Thanks for any help. -
How to retrieve the label of a menu ring when i know its Value ?
I have defined a menu ring with 5 items:
LabelHi.
You need to create a property node of the menu ring, and index the
array that you obtain with the value of the menu ring, as shown in the
attached picture.
Hope this helps.
Alejandro
Attachments:
GetLabelOfMenuRingItem.jpg 38 KB
Maybe you are looking for
-
How do I switch my iPod's "home computer?"
I need to know how to switch my ipod nano's "home computer." Currently, I get all of my podcasts and upload photos from my IBM laptop. But I recently got a Dell desktop that I want to use as my primary iTunes machine. How can I switch so that my Dell
-
Issue regarding consecutive run for an Interface
hi all, i have an issue regarding an interface if this Interface is a initial run for the file, you have to populate all the data of the people. That is , unlike other interfaces where we send only the latest record, in this interface we need to send
-
Cannot open >pdf files..Keep getting gray screen with following message "error trying to open file..if adobe reader is running exit and try again 15.3"
-
Minutes, Seconds not displaying correctly in BIP server
Hello: I am on standalone Release 10.1.3.4 I use the below code to generate my dates in my RTF template. <?xdoxslt:sysdate('DD-MON-YYYY HH:MI:SS')?> It works correctly the first time, we run this report from the BIP server....... but from then onward
-
Hi all, Can we find out, whether material is procured externally or internally manufactured from <b>BOM</b>.Please reply urgently. regards, Shyam