How to get a signal triggered by TIMER (under Board user) using GetUserEvent() event

Hello

I want to use GetUserEvent() inside a loop for the TIMER event, rather than use the calllback RunUserInterface() and TIMER to vote.

but it seems that GetUserEvent() can not get the TIMER event. Is there something I should note before using GetUserEvent()?

I use a button (PANEL_Add) switch TIMER ON / OFF, the time interval is 1 second and TIMER is initially DISABLED.

PANEL_LED indicates the State of the TIMER POWER indicator.

PANEL_LED did turn after I click on the command button, but the value of the counter has not changed anyway when the TIMER is activated.

Thank you for answering ~.

Here is my code

==================================================================

int main (int argc, char * argv [])
{
error int = 0;
int done = FALSE;
int eventPanel;
int eventCtrl;
int panelHandle;
unsigned int Count = 0;
flag of the int = 0;
 
/ * initialize and load resources * /.
If (InitCVIRTE (0, argv, 0) == 0)
Returns - 1;
If ((panelHandle = LoadPanel (0, "Timer.uir", PANNEAU)))<=>
Returns - 1;
 
/ * display of the control panel and run the user interface * /.
DisplayPanel (panelHandle);
While that (is FALSE) {}
        
GetUserEvent (1, & eventPanel, & eventCtrl);

Switch (eventCtrl) {}
case PANEL_Add: flag = (flag == TRUE)? FALSE: TRUE;
SetCtrlAttribute (panelHandle, PANEL_TIMER, ATTR_ENABLED, flag);
SetCtrlVal (panelHandle, PANEL_LED, flag);
break;

case PANEL_TIMER: SetCtrlVal (panelHandle, PANEL_Counter, Count ++);
If (Count > 19)
Count = 0;
break;
}
}

/ * Cleanup * /.
DiscardPanel (panelHandle);
CloseCVIRTE ();
return 0;
}

and here's the .h file

==================================

#include

#ifdef __cplusplus
extern "C" {}
#endif

#define PANEL 1
#define PANEL_Counter 2
#define PANEL_Add 3
#define PANEL_LED 4
#define PANEL_TIMER 5

#ifdef __cplusplus
}
#endif

Hello

According to aid GetUserEvent Gets the next validation event or an event defined by the programmer of the GetUserEvent queue. A validation event occurs when the user changes the State of a hot water or validate controls or selects a menu item.

Place the events defined by the programmer in the GetUserEvent queue by calling QueueUserEvent.

Because the timer does not generate a validation event, you must call QueueUserEvent; to do this, you will need to use the TimerCallback function that you don't like... I see no other way than to use the timer callback function

Tags: NI Software

Similar Questions

  • How to get the functionality of the Plugin BB10 webworks development using phonegap.

    Hi all

    How to get the functionality of the Plugin BB10 webworks development using phonegap.

    Thank you all

    Here is a link to the documentation specifically: http://docs.phonegap.com/en/2.6.0/guide_plugin-development_index.md.html

    We will update the things little when we adopt a more close relationship with Cordova.

  • someone has any idea how to get Apple to allow apps that EFFECTIVELY controls the use of the children?

    I'm just frustrated.

    I have a child of 12 years and a house full of i-products.   The problem arises because I want to allow him to use a planning application and some other apps education during school time, but not the games and the wifi and so on.     We got the House and I would continue to allow the use of the i-device to school, but it doesn't seem to be an app that will enough allow me to the things of the lock upwards.    I don't have the time to constantly monitor, it's ridiculous.

    Sometimes there are ideas as to the allow him to use educational applications and its music from itunes, but not anything about wifi, or any other games or Web sites.    There are other times where I'd like it to be allowed to use iMessage and not much else.

    The problem is that there is something out there that allows this level of control.    Apple has rolled out their "our Pact" that does not come close, but it's a start.     And no other control parental app or program allows control level "app." they will allow you to lock all applications (which are not integrated in the iOS) or not, but I can not choose.     Restrictions are unnecessary and won't allow me to lock the wifi or not to allow the addition of new locations of wifi.

    It's to the point that they I need to new devices, I'll phase out home iOS devices, unless I can get a control.

    Someone at - it a have a way around this?    Someone has any idea how to get Apple to listen to?

    For an application to the time-, you can use guided access

    Use access guided with iPhone, iPad and iPod touch - Apple

  • Satellite A210-14 t: how to get the Fn keys to work under XP?

    Anyone has a solution how can I get the 'Fn' - key to work under Windows XP?

    Will there be a version of the Windows XP drivers in the near future?

    Thank you

    I imagine that you will not be able to get the keys FN works on XP because the XP drivers are not available at this time.
    Seems that you have to wait and hope ;)

  • How to get the content of the list item selected ListView using CPP?

    Hello

    I do a simple application, get the content of the list item selected ListView using CPP, in the main.qml file, I created a listview using XMLDataModel and I got the selected listview using dataModel.data (row) .attributeNameInXmlfile in qml. content as in the same way the ListView using cpp.please help me I want to get the content of the listitem selected.

    Here is my code

    hand. QML

    import bb.cascades 1.0
    
    Page {
        content: Container {
            id: mainContainer
            objectName: "container"
            // property alias selectedText: selectedTextField.text
            //property alias deselectedText: deselectedTextField.text
            ListView {
                objectName: "listView"
                dataModel: XmlDataModel {
                    source: "models/items.xml"
                    id: model
                }
                listItemComponents: [
                    ListItemComponent {
                        type: "item"
                        StandardListItem {
                            title: ListItemData.title
                        }
                    }
                ]
            }
            TextField {
                id: selectedTextField
                objectName: "selectedTextField"
                text: ""
            }
            TextField {
                id: deselectedTextField
                objectName: "deselectedTextField"
                text: ""
            }
        }
    }
    

    App.cpp

    #include "app.hpp"
    
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    using namespace std;
    
    using namespace bb::cascades;
    QObject *textFieldSelected ;
    QObject *textFieldNotSelected;
    QObject *list;
    App::App() {
        QmlDocument *qml = QmlDocument::create("main.qml");
        AbstractPane *root = qml->createRootNode();
        list = root->findChild("listView");
        textFieldNotSelected = root->findChild("deselectedTextField");
        textFieldSelected = root->findChild("selectedTextField");
        QObject::connect(list,SIGNAL(selectionChanged (QVariantList, bool)),this,SLOT(changeText(QVariantList, bool)));
        Application::setScene(root);
    }
    
    void App::changeText(QVariantList indexPath,bool selected) {
    
    }
    

    App.HPP

    #ifndef APP_H
    #define APP_H
    
    #include 
    #include 
    #include 
    
    /*!
     * @brief Application GUI object
     */
    class App : public QObject
    {
        Q_OBJECT
    public:
        App();
    public slots:
    void changeText(QVariantList ,bool );
    
    };
    
    #endif // ifndef APP_H
    

    Try this.

    void App::changeText(QVariantList indexPath,bool selected) {
        XmlDataModel *model = (XmlDataModel *)list->dataModel();
        QVariantMap map = model->data(indexPath).toMap();
        // map is your data in QVariant
        qDebug() << map["title"].toString();
    }
    
  • How to get a ledger_id before release of the report by using FND_PROFILE. Value

    Hi all, I am developing a customized using 10 g generator report. How can I get Ledger_id before release of the report by using FND_PROFILE. VALUE(). I tried with this V_LEDGER_ID: = FND_PROFILE. VALUE('GL_SET_OF_BKS_ID'). But it does not work. Please let me know how to get the legder_id using FND_PROFILE. VALUE before release of the report. Thanks, I'm glad.

    What version of oracle apps?

    have you used the user exist in your report?

    Try using the outputs of the user and P_CONC_REQUEST_ID

  • How to get the signed version of the Widget customized by using getDocuments?

    Hello

    How can I get the signed version of the Widget customized by using getDocuments? It seems that we can get that by specifying email at getDocuments method call, but it seems to work. It always returns the original document widget but not signed. Any help will be appreciated.

    p.s.: It works very well when obtaining documents created using the 'sendDocument' method but not with documents created with 'createPersonalUrlWidget '.

    Hello JunaidAnwar,

    You provide the key Widget Parent document created? If this is the case, then getDocuments will return the original Widget created and not signed.

    In order to retrieve the signed copy (child Widget Parent), you must first obtain the keys to document associated with signed Widgets. You can retrieve first of all by the getFormData method and provide the key Parent Widget in the application code. In response, you will receive all the keys of the document signed Widget instance as well as form data.

    Now, use the keys of the document received in getDocuments () in order to obtain signed PDF.

    Let me know if that helps!

    -Usman

  • How to get the data center moref moref VM in c# using

    Hi all

    Could someone tell how to get managedobjectreference of data center using the VM moref? or any other easy way is? If anyone has examples of code in c# please share with me?

    Thank you

    Vijaya

    You can get the data center in which the virtual machine resides by the following search:

    VM Moref-> Parent (vmFolder)

    Moref folder VM-> Parent (data center)

    Parent of the virtual computer object will always be the vmFolder and the vmFolder object will always be a data center.

    For more details on the model of article inventory of vSphere, take a look at this blog post - http://www.doublecloud.org/2010/03/vsphere-inventory-structure-deep-dive/

  • How to get custom java UCM service - connected on the user id?

    I wrote a personalized service for the AAU 10 x content server.
    How to get login name of the current user from my java code of personal service?

    I use m_binder.getLocal ("userName") but it returns null :(

    SerializableAttribute public class CheckLicense extends Service
    {
    public void IsValid()
    get DataException, ServiceException
    {
    User String = m_binder.getLocal ("userName"); < = returns null
    ...
    }
    }

    Try with m_binder.getLocal ("dUser");

    Kind regards
    Boris

  • How to get the name of the Group of the user?

    Hi all

    I need filter the data by the user. I will put some users in a group, put an another users in Group B.
    But how can I get the name of the Group of the user on the web?

    Create all the users you need in the RPD under Security in the administration tool. Create the required groups and assign users to their respective groups. Now you can apply data filters, interrogate the limits on groups etc. that apply to all users in the groups. From your question, I see that you are asking how to see groups in the web. Assuming that you are asking for what groups a user is assigned to, you can create a new analysis report / and drag any column in the report. Open the formula column and put this code here: VALUEOF (NQ_SESSION. GROUP). This will show you the list of groups that the user belongs to.

    Let me know if you need anything that anyone else.

    Thank you
    -Laurence.

  • How to get the role name of the OIM 11 g using the API

    Hello
    I have a scenario in which I create role/group of OIM 11 g & she gets supplied with AD [= works great] & other party it is when I remove role in OIM 11 g then it should
    removed from the AD. I wrote the postprocess event handler to achieve this goal.
    In the authoring part of role I get all the parameters by using "orchestration.getParameters ()"; but when I delete the role then "orchestration.getParameters ();" is empty, so I'm
    Unable to get the name of the role.
    Is there a way to get the role name when you remove roles by using the API?

    Thank you
    Rahul Shah

    Hello

    To implement using pre-wet the handler rather post-processing.

    Kind regards
    Ralu

  • How to get what the current backlight time-out is set?

    Hi all

    Work in 4.2.1. I would like to be able to arbitrarily increase the backlight time-out and restore it to what the user he had initially set when I'm done. Looking at the API of backlighting (i.e. backlighting. getTimeoutDefault()), apparently I'm only able to recover the default delay, which - as I understand - would be different from the time delay set by the user.

    So my question: How can I get the _current_ time-out setting? Otherwise, looks like that I would not be able to always set the time-out period back to what the user had selected through their setting of BB menu.

    Thanks for your comments!

    There is no BlackBerry API that provides the setting specified by the user backlight time-out.

  • How to get the field at any time a vertical field Manager?

    Hi guys. In the application, that I'm working on, I came across a bit of a challenge.

    Basically I have a vertical field Manager ful of custom components.

    Basically this custom components, draws the user name, some other info and pictures of the user related to their account.

    It all works very well, but what I'm trying to do is to get the exact field on the vertical field Manager at any time. You see, while it displays the image of the user, I download from a Web server (and it will display a picture by default while it is downloading). So what I'm trying to do is go to the correct custom component of the vertical field each time Manager, so I can quickly change the image is correct, once I get the correct uploaded image. The manager of vertical field is called via the standard method.

      VerticalFieldManager vfm = new VerticalFieldManager(VERTICAL_SCROLL|VERTICAL_SCROLLBAR) {
    
    protected void sublayout(int w, int h) {
        super.sublayout(480, Math.min(240, 360)); 
    
    }
    
    };
    
    for(int i=0; i< contacts.length; i++)
    {
    //Contacts is an array of my custom component. I am just calling it
    contacts because it basically is a list of contacts.
    vfm.add(contacts[i]);
    }
    
    add(vfm);
    

    Everything works well for me except a way to get the correct field on the vertical field manager. So that I can

    Run it in a contact, and then reset the image.

    Can anyone help with this?

    Thank you

    I suggest that you give to your download manager - a reference to the contact that you update, if networking is done, you can refresh it.

    except if you develop for a device of some I would be careful with the absolute values like 480 btw

  • How to get relief to work semaphore time-out when expires?

    Continuous backup fail with a semaphore timeout period ending?

    Hello

    see if this information helps you

    How to make a backup of your data

    http://www.vista4beginners.com/how-to-backup-your-data

    How to restore your files

    http://www.vista4beginners.com/how-to-restore-files

    the 1st link below is how do the backup complete pc

    http://www.bleepingcomputer.com/tutorials/tutorial145.html

    and that is how do to recover the backup complete pc

    http://www.bleepingcomputer.com/tutorials/tutorial144.html

    If you have problems, it's in here is a forum for microsoft specifically for backup issues

    http://social.technet.Microsoft.com/forums/en-us/WindowsBackup/threads

  • How to get the "SETTINGS" at the time I opened FIREFOX?

    I clicked on SETTINGS and asked a white page. I want the back page that has ' HISTORY, DOWNLOADS, etc. when I open FIREFOX.»

    You're talking about the internal Homepage topic: Home?

Maybe you are looking for