By using labels of control tab as controllers of case Structure

Hi all

I have a basic question.

I want to use the tab control label string as a trigger for structure options case. Sorry for the download is not my program because it's too complicated.

I wonder how can I extract the label (the page name string) strings in order to be used as initiators for various cases of a box structure.

I appreciate your time in advance.

Kind regards

Arman

That makes no sense at all. It is simply wire the control to a case statement. It is an enum and the case statement admits that. With a right click, you can create a folder for each tab.

Tags: NI Software

Similar Questions

  • How to use the 3 buttons to control the transitions in my case structure?

    Hello world

    I hope that this will be an easy fix... Although I can't get out?

    I'm building a state machine inside a while loop with the following States:

    1. idle system.

    2 PCI self-cal.

    3. run DAQ and do my treatment.

    4. stop the vi.

    I can't do that with the help of an enum no problem (with the State 1. System idle as the while loop initialization status)... But I really want to have is 4 buttons on the front panel, one for each of the 4 States, so that the user needs to do is press the button corresponding to the State they want to and the appropriate transition multibordure... For example, when the vi runs first, the idle state is on... When the user is ready can then press 2 for a self-cal... Is auto-cal is ok, they hit key 3 for data acquisition... Once completed the acquisition of data the user can hit the 4 button to stop the vi...

    My problem is that I need the current key to pick up when another button is hit...

    Any suggestions?... It kills me!

    Thank you

    Jack

    Here's what I had in mind. You can easily add conditions so that code runs only once after a change of control, for example.

  • How is it possible to change the 1 tab to Page 2 and page 3 page, etc. by using a Boolean control?

    Hi Sir,

    I created a 4-page tab control. How is it possible to change the 1 tab to Page 2 and page 3 page, etc. by using a Boolean control?

    Thank you vey much Mr. It worked

  • Using the same control appeal return of different tabs

    Hello

    I am fairly new to this bare with me for a second...

    I have a situation were I use several tabs with the same exact command buttons in each of them.  Given that the buttons have the same function I want to use the same reminder.  I understand that each TAB is considered as an expert group and has its own Panel of handle.

    My problem is I want the call to make the difference between the button OK of TAB1 and TAB2.  The handle Panel sent back, the call is (from what I can tell) the Panel handle for the tab which is great, but it doesn't have a constant right having at it in the header file.  How sure that TAB1 always has the Panel handle 2 and TAB2 has always handle Panel 3, etc...

    Example: When I click on OK in TAB1 handle Panel sent to the btnOK is = 2 recall.  If I click OK in TAB2 is the handful of Panel = 3.  I want to move to the OK button, but do not want to use hard coded in full.

    int CVICALLBACK btnOK (int command face, int, int event, void * callbackData, int eventData1, int eventData2)

    {

    switch (event)

    {

    case EVENT_COMMIT:

    switch () {}

    case 2:<----I don't="" want="" a="" number="" here="" but="" a="">

    "do this."

    case 3:

    "do this."

    };

    }

    return 0;

    }

    The easy solution would be to have a reminder for each of the buttons.  If it's the only way to go if it's what I'll do, but I am interested in what you think.

    Thank you!

    Hello

    I see at least three ways to get what you want.

    Solution A: depend on constant tab page name (as you can get it back by giving the handle from Panel)

    In the callback, insert this code:

    name char [64];

    GetPanelAttribute (name of Panel, ATTR_CONSTANT_NAME),
    If (! strcmp (name, PAGE1)) {}

    Code for the first page of the tab

    }

    Else if (! strcmp (name, PAGE2)) {}

    Code for the second tab page

    }

    ... code additional pages

    Solution B: based on the attributes of the tab

    int parent, index;

    GetPanelAttribute (Panel, ATT_PANEL_PARENT, & parent);

    GetActiveTabPage (parent, PANEL_TAB, &index);)

    switch (index) {}

    case 0:

    Code for the first page of the tab

    break;

    case 1:

    Code for the second tab page

    break;

    ... Add the code to additional pages

    }

    Solution c: use the callbackData for buttons

    This solution requires code in two different program sections

    * During the loading of the Panel with the tab control

    int pnlH;

    GetPanelHandleFromTabPage (Panel, PANEL_TAB, 0, &pnlH);)

    SetCtrlAttribute (pnlH, PAGE1_BUTTON, ATTR_CALLBACK_DATA, (void *) 1);

    GetPanelHandleFromTabPage (Panel, PANEL_TAB, 1, &pnlH);)

    SetCtrlAttribute (pnlH, PAGE2_BUTTON, ATTR_CALLBACK_DATA, (void *) 2);

    ... and so on

    * In the recall button

    switch (callbackData (int)) {}

    case 1:

    Code for the first page of the tab

    break;

    case 2:

    Code for the second tab page

    break;

    ... Add the code to additional pages

    }

  • In the new window of the tab, I get a full screen of a site, and I do not see the gear of NEW CONTROLS TAB

    In a new tab (+) window, I get a full screen of the Bing site, and I do not see the gear of NEW CONTROLS TAB.
    I tried dragging one bookmark in this window and then had this site full-screen. But when I exit Firefox and restart it, it is by default to the Site of Bing - I HATE BING
    I do not see the gear for new tab controls, and so I can't put it: 'display your top sites '.
    I uninstalled Firefox and installed the latest version - I found myself with the same thing, I had - including my homepage and exactly the same problem - your help would be appreciated

    What do you see on the page, just nothing?

    Could you come back: config, filter using newtab again once and if browser.newtab.url is bold claims to be 'set of users", right click and click Reset in the menu bit

    If you open a new tab, which solve this problem?

    Edit: sorry for typo's fault: browser.newtab.url

  • GPF using the Table control

    Hello world

    We use a table control to display the log files. Each row of the table represents a log file entry. In addition to that we have put in place

    Some filter chopsticks (string tonalite) to speed up filtering. This means that only the entries corresponding to these substrings are shown. So whenever the filter options

    changed to renew the contents of the table.

    This is done by DeleteTableRows, looking for entries to display, InsertTableRows and SetTableCellRangeVals.

    It works very well.

    But if we remove all the contents of the table (caused by the filter options) and then hit a button (even if the focus is on the table) you get a GPF on ProcessSystemEvents.

    This occurs only after inserting a large number of rows in the table before deleting all the. For example, a table with 5000 x 2 (rowsxcolumns) reduced to 0x2.

    1 create a table with 5000 x 2 (rows x columns) control elements.

    2 remove all lines

    3. press tab until the control panel to get the focus.

    4. hit Enter for example

    => Crash

    Someone has an idea? We have already 'dimmed' CTRL, but this is not enough to avoid that the focus on the table by pressing the tab key. So, which leads to an accident as well.

    Thanks for the help

    Philipp

    Yes, it is a known issue (396240), although it is not actually on time last updated known issues. Unfortunately there is no good solution, other than just by waiting for a version corrected to be released, which should happen soon.

    Luis

  • EVENT_MOUSE_POINTER_MOVE and controls tab

    Is there a way to get EVENT_MOUSE_POINTER_MOVE events in a callback whenever the user moves the mouse on a panel that is part of a tab control?  Basically, I don't see a way to set a reminder Panel for panels that are made inside a tab control, which would be possible using the old EasyTab way of doing things.  Can I set a reminder Panel for tab control panel is on, but the recall seems does not have EVENT_MOUSE_POINTER_MOVE event when the mouse is on the tab control.  I put a reminder on the control tab itself, but it seems only to receive EVENT_MOUSE_POINTER_MOVE events when the mouse is over the edge of the control.  It seems that there is something obvious I'm missing here, but I cannot understand what it is.  Thank you!

    You can get the handle to the desired tab group and then install a reminder Panel for this Panel. I have attached a sample program. I hope this helps.

  • Tab control tab

    My goal is more

    When I press the tab A tab control test, the B tab should disepear in the test tab control and only the tab should be visible in the control tab of test2 (not grayed out). The same thing can happen when B are pressed, wil say will be visible only.

    In other words, I want to use a tab control to control other tabs visible tabcontrols

    Problem solved here.

    (Do not create another new thread on the same topic.  He loses popular time because you do not give them the advantage of seeing what happened on the issue already.)

  • How can I add a page control tab at run time?

    Hello

    I'm trying to add pages in the control tab in run mode, but I can't because it must be in edit mode.

    Here are the steps that I have:

    1. run the application.

    a. the application reads a txt file and it translated into a table with the number of rooms; [201, 202, 203, 204]

    b. the application takes this array and puts in place of the pages after how it is in the table and names must be the same as the numbers. (Now the program will start to collect information to fill the pages.

    c. the user can now change between pages. (Each page will have a table that will be updated with new information at run time)

    Is this possible or have you another solution?

    Grateful for answers.

    No, you cannot add pages, just as it is not really supported to add commands or the lights either (well, unless you plan to have always installed LabVIEW and not only the execution engine. If this is the case you can self-generate tabs etc. with VI Scripting pages).

    You can use an image control to "simulate" additional tabs, the orders or the lights, but normally it is possible to find a different and easier solution.

    In your case, it seems that all the pages have the same controls on them, it would be just the content that would change. So what you really want is a way to navigate between the 'rooms' availability You could add a list next to the tab control box, fill the list box with the availability of the rooms and the value of the list box to select the content to display on the tab of single page beside him, or you can use a menu drop-down. If you do not like these alternative presentations of the room options then you can generate the tabs in an image control and have a tab control page below which showed the content of the tab selected in the image control. That's a lot of work.

    Another option would be to create Let's say 10 pages in edit mode and then have the arrows under the control that allowed the user to navigate through the available rooms in groups of 10 (still is not really necessary to individual indicators on each page you don't need to make them on page... something to get this must simply move the indicators and controls on the tab control with the) arrow keys Cela will give you a black frame behind them, but in run mode, it will look as if they are on each page). In this way, you could have the appearance tab and navigation without having to simulate the tabs with an image control. The fact that many other graphical interfaces have such navigation of two levels means that the user will still find intuitive to use.

  • Put option on the page does not work in the Easy Print VI Panel, controls tabs are not displayed

    Found two problems with the screw of report generation:

    (1) in the Panel of VI feel easy (report generation) or the Documentation.vi, the layout options don't work (dug in the sub - VI and found that they are not connected to anything).

    (2) If you have the controls or the lights in a tab control and try to use the Easy Print VI Panel or Documentation.vi with the option to include controls in the report, they do not appear. The only indications/commands that appear are those that are displayed on all tabs (that is to say, to create a control and move it over the tab control so that it appears on every page).  There's a Subvi (Expand_control_ref_with_nested_controls.vi) which is called to handle the nested controls (IE, grapes, berries, etc...), but it should have a case to handle the controls tab.

    Hey Sajosie,

    Dig into the Sub - VI you are right in saying that the Options available to the user input is not connected to anything for most cases. However, in the case of failure to "Quick Print" Layout Options are used to change the layout of the report. In help for this VI, he mentions that this entry is ignored for the report "Standard reports" and "HTML" options However, it does mention that this ignorance of Layout Options is expected for the 'word' or 'Excel' reports.

    Especially regarding the controls and indicators in the report which appear on the tab controls, I can make a product suggestion to do this kind of design more compatible with the mere impression VI Panel façade or Documentation.

  • Control tab Keypress event

    Hello

    I use a tab control and that you may not know how to handle the following situation.

    We know that when you use a tab control we can jump from tab to tab by pressing .

    When I hold the last tab to jump to other conbtrol and not the first.

    Unfortunately, in this situation does not generate an EVENT_KEYPRESS.

    Is there a way to handle this situation?

    I believe that I have found a workaround. You can use InstallWinMsgCallback to install a reminder for the Panel and locate the WM_KEYDOWN message. It's a little more complicated because you will not receive any eventData1 and eventData2 tell you what key and the modifier is used, then you must check separately for the control key (I use a global flag to specify if CTRL is pressed).

    In hand, you will need to install the callback as follows:

    InstallWinMsgCallback (panelHandle, WM_KEYDOWN, MyCallback, VAL_MODE_INTERCEPT, NULL, &postHandle);
    
    ...
    //in clean-up
    RemoveWinMsgCallback (panelHandle, WM_KEYDOWN);
    

    Then, in the reminder, use the following code:

    int CVICALLBACK MyCallback (int panelHandle, int message, unsigned int *wParam, unsigned int *lParam, void* callbackData)
    {
        int lastTab, control, pageIdx, nextCtrl;
        switch(message)
        {
            case WM_KEYDOWN:
                if(*wParam == VK_CONTROL)
                {
                    ctrlDown = 1;
                }
                else if(*wParam == VK_TAB)
                {
                    if ((control = GetActiveCtrl(panelHandle)) == PANEL_TAB)
                    {
                        GetActiveTabPage (panelHandle, control, &pageIdx);
                        GetNumTabPages   (panelHandle, control, &lastTab);
                        if(pageIdx == lastTab - 1)
                        {
                            GetCtrlAttribute (panelHandle, PANEL_TAB, ATTR_NEXT_CTRL, &nextCtrl);
                            SetCtrlAttribute(panelHandle, PANEL_TAB, ATTR_CTRL_INDEX, pageIdx);
                            SetActivePanel(panelHandle);
                            SetActiveCtrl (panelHandle, nextCtrl);
                            return 1;
                        }
                    }
                }
                break;
            case WM_KEYUP:
                if(*wParam == VK_CONTROL)
                    ctrlDown = 0;
        }
        return 0;
    }
    

    Note: You must call SetActivePanel before SetActiveCtrl to transfer the focus in the tab to the Panel.

  • How to use Labview to control the motorized turntable?

    Hello

    I am new to Labview and do a project that requires the use of labview to control the motorized turntable (XYZ axes). I need to use the Labview programming and have no idea at all. Need help, thank you very much!

    Lei,

    Everything said by others is correct and to do because they describe, at a given time. But I always approached these projects of motion control first by looking at the 'motion controller' (I hope you have a) and 'drivers' (what you need) between the computer/LabVIEW and engines decide what communications will be required for these devices and get an idea of the syntax of command and the language to use with them.  In some cases, the controller and the motor driver are integrated in a single unit. Heck, in some cases, they are even integrated with each engine.

    The motors can be the stepper motors or perhaps servomotors.

    In the case of drivers stepper (devices that provide power electronics to run the engines), many of them are run using only two control signals for digital called 'step' (a pulse train) and 'direction' (high-low level) and if it is possible to generate directly with the PC, it's an order of magnitude easier (if you have not already a library of available motion control to manage the generation of these signals and) the execution of the stepper motors) of having a "Motion Controller" between the PC and the "motor".  Engine drivers step by step usually can be configured that current engine and the size of the stage and sometimes for the other plus-moteur/driver-parameter setting. The configuration of these can be made with jumpers, switches or, for some drivers, with orders ASCII on some sort of port of communication, but in general these are values you download the installer once at the beginning and then never touch again if you do not need generally to have a full time available on their change communication path.

    In the case of the actuator drivers (once again the devices that provide power electronics to run the engines), many use a +/-10V control input analog signal, and, again, while it is possible to generate the signal directly with the PC hardware, a separate axes controller is usually much simpler and more robust.  In the case of a servo system, there is also a signal back to an encoder or resolver attached to the engine to be used by any device will exercise the motion controller in the system.  There are once again associated with the driver configuration parameters (and controller in this case, since it is part of the servo feedback loop) which must be configured at the start but once set up properly, they rarely need to be changed again.

    A movement controller which is separated from the PC often manage several drivers, and can often coordinate a movement between them. It will load the rise up/down of the engine speed as that changes. It will be followed by position of each motor. The servo system, but it will take the feedback signal and use it to adjust the speed/position/torque of the engine. The motion controller also deal with race and home or index of signals is usually on most lines of movement and provide information of the State of the switch to the PC.   To run the motor controller is then just a matter of chaining a set commands of (usually ASCII) to indicate how fast to run and how far to go (and direction) and by sending a command "do it." Then, ask you to keep track of the status of the process and the States of the switches.

    In many cases the builders of controllers of movement are a primitive way to communicate with the controllers of a PC with no additional software other than what they offer. With this you can at least have an idea of how different the controller commands and responses they produce. That you can start to build sequences of commands to perform the actions you want.

    You can then add LabVIEW to the mix and to understand how you can get it to send sequences of similar orders on the paths of communication that are available and respond intelligently to the information it receives in return for motion control.

  • Spy ++ will be able to read label VB controls

    Spy ++ will be able to read label VB controls. We try to read the version number on the box about our Vb app using spy ++. But we have not managed to bring this fact.

    Hello

    Your question is more advanced is usually asked to Microsoft Community.

    Try an appropriate MSDN forum:

    http://social.msdn.Microsoft.com/forums/en-us/category/VisualStudio

    Don

  • Controls tabs flashing when Invisible

    A little history: I have a tab control that contains several controls of void and this control tab is located at the top of a vision acquisition screen. While the program is running, the user can hit 'h' key to hide all the controls, so that the user can see the screen for the acquisition of any vision. I came across a bug which, in don't break my app, is really annoying. What happens is that when the user presses the 'h' key, all the controls disappear as expected (I do this by using the property node 'visible' to the tab control), but once per second the controls on the tab flash on the screen and then disappear again. Still, these are the controls inside the tab, tab no it's me. The tab it's self is invisible as expected. Has anyone else seen this before?

    Just guessing here, but I've seen funny things with the tab controls, especially when working with the visibility property.  I suspect that 'under the hood' LabVIEW uses the visibility property to get the tabs to work.

    In your example I (notied that you write the property each iteration.)  It's not too big, a method and can lead to some ineffecintcies.  Also, when the objects overlap on the FP an update to any object overlaping requires all objects to cool off, so you can lose a lot of time processor that could bog down your CPU. A possible workaround, you can try is to add a loop secod with an event inside structure to capture only changes to the visible Boolean value.  Another thing to try would be hitting the visible property of the objects in the tab directly.  This excerpt is a reasonable example.

  • Is redundant control tab in my case?

    Hi all

    I use the tab for the first time control in labview.

    Basically, I just want to put this control on the front to make things to look better and in order, but it seems more than a decoration, but a control in the block diagram, I'm not sure if there is a way to remove that from block diagram but stay in front panel.

    Any idea is appreciated,

    Thank you very much

    Kunsheng - Chen

    I use controls tab to organize my front panel and doing nothing with it on the block diagram.  It's not a big deal (at least for me) to throw right on the side the block diagram of the road.

Maybe you are looking for

  • NET Framework on Satellite L500 error message

    I have just boupght a Satellite L500 and installed some software from my old laptop. Whenever I start I noew to get an error message telling me I need NET. version 2 of the Framework. I tried this download from Microsft site but my phone tells me tha

  • Problem of CPU for the 90-100% svchost.exe

    When I bring my task manager, I see that svchost.exe has a really high CPU usage, it just started a few days ago and im not sure what is wrong. I tried updates automatic disableing and also I remember having the same problem with an older computer of

  • I forgot my password for my account password protected

    So here's the deal- 8 months ago my laptop no longer, just out of the blue. I tried to fix it, and nothing happened. The other night, a friend came to an end, we try it for fun and it worked. Great! OK so I have a password protected account and I can

  • Google Earth has stopped working!

    Have used Google Earth for a long time but yesterday it stopped working. Have removed and reinstalled but with no result. Using Windows 7.

  • Endpoints NAT and tunnel

    I have two ASA firewall on different subnets, each with their own internet connection.  An ipsec tunnel is set up between my company and another company that ends on one of my ASA firewalls.  The remote end of the tunnel will not support a second end