Connect two controls in LabVIEW? - labview

I have two boolean elements or swritches.
When I turn on the first one, the second one should switch off and vice versa.
So, I am trying to make elements both indicators and controls.
I read that I have to turn on the Digital Display which is under the visible items submenu but there is no such option.
Could you please help me figure this out?
Thanks in advance.
I am new in LabVIEW, so if this question has already been answered or if it is a stupid question, I am sorry.

If you want one control on the block diagram with two different user indicators, you should use an XControl, I created a simple example here.
UPDATE: Added a demo VI to the example /UPDATE
If you want two control on the block diagram with two different user indicators, you should use user event and local variables to control the two states:
You can only have 'Digital Display' with a gauge or some kind of numeric control

Related

Condition in Event Structure Labview

Hi Guys,
I have in my labview project the needs to use the same prev/next buttons with different tab controls, so I tried to put the value change of those buttons in an event structure but I would to put in AND condition the availability of the current tab.
Any Idea??
Thank you very much.
Guido
You have to consider using Dynamic Registering for Events: http://zone.ni.com/reference/en-XX/help/371361K-01/lvhowto/dynamic_register_event/
You should create Dynamic event register and when tab control state is enabled/visible you will generate user event.
For example please refer to NI Example Finder and open "User Event Generation.vi"
Hope this helps!
If you use property nodes for the tab controls, you can use the equality primitive to confirm whether the currently active tab is the one your event should handle. By adding more checks or processing, you can eliminate false positives.
Example
Apologies for the bad wiring, the snippet tool mutated the block diagram.

VB.NET - How to Create Information Box

I'm creating a form that will display a long list of properties and their associated value. I'd like to display them in a sort of table-like control. Something with heading values at the top and a list of organized data underneath it. Something like these:
I realize those 2 examples aren't exactly the same but I'm flexible on what I produce as long as it gives a similar effect. My question is, how do I create a list like that? Is there a control in the Visual Studio toolbox that will produce this effect?
I'm sure there's something similar that easy to find but I can't figure out what to call that control so my searches haven't turned up anything useful.
Any help would be greatly appreciated. Thanks!
A combination of ListView and TabControl controls could be used to emulate what you're showing above. See the links for ListView and TabControl to help you get started.
Yes, there are windows form controls that provides this functionality.
For the tabbed windows use the TabControl:
For the different lists use a ListView control in the mode Details - which means a list with columns:
For the second feature, the ListView control has the Group features:
In order to group items togheter set the group for the chosen item(s):
All of this can be of course done programatically. There are good tutorials on MSDN and Channel9.

Creating oscilloscope controls with LabVIEW

I am creating simple application in NI LabVIEW - Lissajous Curves from signal generated by NI Elvis.
I have already added Osciloscope control and connected it to the XYGRaph. But I would also like to have some values that could be changed. I would like to have options to set values like in this image:
How can I Add them to my project?
Thanks in advance
The two highlighted controls look like 'Dial' controls which can be found on the 'Numeric' palette on the 'Modern' control palette (also in 'Classic' and 'Silver' depending on you LabVIEW version).
Looking at the Vertical Position control this has the numeric indicator visible which can be show by right clicking on the dial, and from the menu move across 'Visible Items' and select 'Digital Display'.
The Scale Volts dial looks to have some kind of drop down menu which I guess would have pre-set values. You could use an enumerated data type for this and code you user interface event structure to sync these two. Your user interface event structure could also update the properties of the graph (use a Property Node from the 'Application Control' Pallet of the 'Programming' section of the Block Diagram 'Functions Pallet') to change the displayed range (Scale Volts).
Have you looked at the example code from the image block diagram?
The two highlighted boxes are known as Knob controls. There are a variety of controls for changing values in LabView.
Please see the below figure to understand what I am trying to explain.
This is how you get the knob controls:
http://i.stack.imgur.com/sICHw.png
How to assign the values to the min and max of the control can be changed from the knobs property. Right click -> property. see below
http://i.stack.imgur.com/wxfsC.png
If you have any further questions, don't fail to read up the help from Labview. Its quite useful and very demonstrative.

Best way to select from a list - aren't the two listboxes getting a little old?

How many times have we seen this type of selector:
List Box Selector http://geekswithblogs.net/images/geekswithblogs_net/dotNETvinz/MoveItemsListBox.jpg
I was just about to start creating this in a WinForms app, when I thought that others may have some ideas for doing this better. We need it to sort - so the right hand list will need up/down buttons. But this seems so old school. I love devexpress components, and was thinking of asking them if they would consider adding a component that handles this functionality with a slick UI.
I am thinking that a graphical representation of the objects, and a graphical representation of the listboxes - that would be a more intuitive way to move items around.
Has anyone seen an open source project like this?
If a CheckListBox won't suffice (and it usually will), then the "modern" approach would be to use a ListView or similar component with a "Transfer" column. Render the button inline in that column, one for each row, so that it only takes one click to move an item from one to the other.
You see this everywhere in Vista, usually with hyperlinks as opposed to buttons. Instead of clicking on an item and then choosing an action, you click the action at the item level.
I wouldn't go overboard with slickness as it can impair functionality, but the dual-listbox screen is definitely old-school.
Also, if there's a very large amount of data to manage, it helps to provide a progressive search at the bottom of one or both lists.
I have done this type of selection using (essentially) a single CheckListBox that displays each item as an image. Part of the image looks like a LED, which is on (bright) if the item is selected or off (dark) if it is not selected.
This works well if you have a reasonable amount of data to select from, and also works well in a multi-column format if you can predict that the options will have reasonably similar lengths.
Allow users to drag items in/out of list 2, and also drag to reorder in list2.
(All items dragged out of list2, and dropped anywhere outside the list, get put back into list 1, in their correct place in the list by alphabetical or natural order.)
You can merge the two list boxes into one with the help of groups (LVGF_GROUPID flag): one group for selected and one for not selected.
You can also implement group membership changes with drag-drop between them. This way single drag-drop can move an item into the other group at the appropriate position, saving most/all of the other buttons.
Additionaly the bottom of each group can have one pseudo item with help text (i.e. "Drag items here to...") that is visible only when relevant.

limit selections in a listbox in vb.net

I am creating a web control in vb.net that contains a list box. I know that I am able to choose a selection mode of Single or Multiple, but I am interested in limiting a Multiple selection to a predetermined size. For example preventing a user from selecting more than 3 items.
I have tried adding a Validator to the list box, which might be a way forward, but was wondering if there was a way of changing the selection mode to something a bit different than just the two specified ones.
Any ideas or suggestions would be greatly appreciated
Edit: Unfortunately due to project limitations I am unable to use Javascript on this problem. very annoying I know!
You could try handling one of the SelectedIndexChange events. With multiple selection, each time this event fires you can check how many items have already been selected. If it is more than you want, have the handler deselect the one that was just selected. You could also put up a little red label under the listbox saying "Sorry, no more than [n] selections allowed."
EDIT:
Just noticed you said WEB. Same theory applies, but it would have to be done using Javascript.
On the SelectedIndexChanged event, write a short piece of code that will check the number of selected items and if it is greater than your desired amount, unselect the new selection (or unselect the oldest one, or however you wish this to operate).