callback in CVI 9 Panel

Hello

I very frequently use the CTRL + P (Control Panel of callback function) to check the arguments to function etc. Doing so opens the Panel of the service as a new tab which covers all my code, even if the Panel itself would need much less space. I remember that in previous versions, before the tabs (nice), this kind of a pop-up Panel that could be moved. Made culinary, I remember that it was possible to see the code and the funtion Panel - is it still possible with the new structure of the tab and how?

Thank you very much

Wolfgang

Hello Wolfgang,.

Assistance in the source window is dependent on the position of your cursor.  When your cursor is in a position to enter the information for the "Maximum number of iterations" parameter, the help you gave is shown.

NickB

National Instruments

Tags: NI Software

Similar Questions

  • Is it possible to change the values of particular #define of the various controls in CVI.

    In my application, I have different panels to file single .uir. When I save the .uir file, I get the same values of #define for different controls in different panels. For this reason, I am not able to use these #defines block switch. Is it possible to change the values of #define according to my condition.

    Hi, a little more Wolfgang post. It is the combination of the Panel to manage and control the unique ID: as you know, you can load the same panel more than once, so even if you recover the full chain of PANEL_CONTROL you have duplication. items that exactly identifies a particular control in a particular group are the combination control panel manage AND panel_control ID.

    On the one hand which guarantees more flexibility to your application, you can design only a few panels and reuse them whenever you want, even having some of them loded several times in the same instant. On the other hand, as you have discovered, there is the possibility (Finally, almost certain) duplicated in your app ID.

    To resolve the problem of duplicated IDS you can act in two ways:

    1. If you know that no Panel is never loaded several timer in your application, you can retrieve the name of constant of Panel with GetPanelAttribute (panelHandle, ATTR_CONSTANT_NAME, string); and to distinguish between the name of constant, then switch between control ID

    2. If you happen to have duplicate panels you will need to store each panelHandles in the non-volatile variables, switch between them and then switch between the control ID

    An alternative might be to use Panel callbackData attribute and assign a significant value during the loading of the Panel, other callbackData finally from a control ID. Something like this:

    Loading panels:

    panelHandle = LoadPanel (0, "myfile.uir", PANEL1);

    SetPanelAttribute (panelHandle, ATTR_CALLBACK_DATA, (void *) 1);   Assign different callbackData in each instance

    During the failover between controls:

    void * cbkd;

    GetPanelAttribute (panelHandle, ATTR_CALLBACK_DATA, &cbkd);)
    Switch (cbkd (int)) {}
    case 1: / / elements of the PANEL1
    switch (command) {}
    case PANEL1_NUMERIC:

    your code here
    break;
    case PANEL1_STRING:
    your code here
    break;
    }
    break;
    case 2:
    // .....
    break;
    }

    One final note: it seems to me that all this is necessary in a very limited situation, where you have the same callback called on various panels/controls. Whenever the reminder is unique to a specific panel or controls on a single panel you don't need to work that way.

  • General protection fault with tabs and toolbars to the output of the application

    Hello

    It seems that if you have a tab control

    .. .and that tab has a tab with a child Panel control

    .. .and this child Panel has a sign callback function

    .. .and this same child Panel also has a toolbar

    .. .and you do not throw the toolbar when the application closes

    .. .and you do not throw the child Panel when the application closes

    .. .and you do not throw the Panel with the tab control when the application closes

    .. .the application will crash with a general protection fault after the return of the main function.

    Certainly, I consider really cela a bug so as much as there were several things wrong with the code I was working with in order to hit it (and once I set the application everything is fine), but it still took me a little time to track down, so I hope this post can someone put some time in the future.

    I have attached a small sample application that illustrates this problem on my PC in the case where an engineer OR wants to take a peek.  I'm under CVI 2012 SP1 on Windows 7 64 bit.  Thank you.

    I see that I was a little involuted in my previous answer. At Telegraph and hopefully more clear:

    • As indicated in aid, after the chaining of the callback function to the Panel, Panel callbackData should not be modified
    • (solution 1) If you just install a reminder rather than chaining one new this problem is not present
    • I suspect that the instrument of the toolbar handles callbackData parameter Panel. If this is true, you can:
    • Install the toolbar to a panel that does not have a chained reminder (solution 1), or
    • Install the toolbar BEFORE chaining (solution 2) recall: as you can see in the code for ChainPanelCallback, the instrument takes care of callbackData existing and manage correctly in all situations, including the Panel throwing
  • Crash when you press the [...]

    I got various random crashes when you press the button [...] in the various 9.0.1, CVI function panels but I have not found a model so far.

    1. open Control Panel function for SetCtrlAttribute
    2. for "Attribute of control", press the button [...] and select the item of «Format"under «Format and precision...» "found under"control settings.
    3. press the button [...] to 'value of the attribute.  For me, he won every time CVI.

    Thanks in advance for any help!  If all goes well, there is a quick fix that I find this feature very useful.

    Hello

    It is a known issue with CVI 9.0.1.  This link should fix the problem for you.  Let me know if it does not work.

    NickB

    National Instruments

  • Function editor does not support the pointer to the digital type

    Am I missing something or is it true that the CVI function Panel Editor does not support specifying a type parameter as a pointer of type number?

    I see no reason why he wouldn't or shouldn't.  It supports the pointer to char.  And it supports a table name (which, in C, is a pointer to the first element of the array).

    I guess I could use the array form as a pointer, but surely it's confusing when dealing with a simple pointer to a numeric scalar type.

    I am using the function Panel Editor only for the purpose of creating a dictionary of type so I can call functions DLL in VB.  Y at - he know somewhere how CVI types could are mapped to the VB types when you use the type dictionary?   for example, what happens if I use an unsigned int in a function parameter (VB does not support unsigned integers)?

    Menchar

    Hi Menchar,

    To create a pointer to an integer as a parameter to a function panel, you have two different options.

    First of all, all output parameters are defined as the default pointers.  So if you create an output parameter of type "int", he creates a ' int *' parameter.

    Second, if you want it to appear in the entry list, you can create a data type in CVI which will appear at the bottom of the list.  Data types to change your data types, go to the Options"(you must have a function Editor tab open and selected Panel to make this option available).  Enter the name of the type (in this case ' int * ') and click the Add button.  The new "int *" option should now appear at the bottom of the list.

    Third, you can use the array form (int []), but as you say, which can be confusing for other people looking at the code.  Or the other of the two first options are better choices.

    As for your second question, here's a link to a page MSDN showing types in Visual Basic and their representations .NET: http://msdn.microsoft.com/en-us/library/47zceaw7 (VS.80) .aspx.  This allows to make a comparison between VB and ANSI C data types.  For example, to ask on unsigned integers, and this site shows that Visual Basic has an Integer type (-2,147,483,648 through 2,147,483,64) and an unsigned return, UInteger (between 0 and 4 294 967 295).  From what I can tell, VB has signed versions of all its digital representations.  You can then take this with a list of ANSI C data types to convert between the two.  A list of ANSI C data types can be found here: http://www.exforsys.com/tutorials/c-language/c-programming-language-data-types.html

  • Graphic CVI axis only updated when the Panel is active, but updated waveform is in the inactive Panel

    Hello

    I have a problem when I want to save a screenshot of the Panel with the GetPanelDisplayBitmap & SaveBitmapToPNGFile functions. The screenshot of the Panel is done when the Panel is hidden or inactive. Thus drawing events don't have facts.

    Please take a look at the attached screenshots:

    (1) manual measurement and life-saving operation, the saved data is ok

    (2) measure hidden and functioning economy, the saved data is not correct, the axis were not my updates

    (3) bring the Panel forward, axis had been updated

    Is it possible to force an update of the axis without back panel to the front or set it as active panel?

    Best regards

    Vitali

    1)

    2)

    3)

    I think that it is a bug of the CVI.

    This is how it works:

    -SetCtrlAttribute (Panel, control, ATTR_ZPLANE_POSITION, 0);  without this step the axes will be not updated!

    -for each channel {PlotWaveform ;} (.)

    - ...

  • How can I build a dll containing that a callback function, the callback function is used in CVI.

    Hello

    Case is that LABVIEW receive external data and produce an interrupt, then sends the data to the CVI.

    Can I generate a dll containing a callback function, use the callback function in CVI. Or there is a better way?

    Thank you


  • CALLBACK functions in cvi

    Hello

    Need a simple clarification on the use of the callback function.

    I have 3 function keys different as reminder starting test, brake test, quit smoking.

    Whenever the start test button is pressed by EVENT_COMMIT, he asked some functions and performs the same. in the middle of the execution of this function, I need to stop the test by pressing the stop test button or I leave the interface. How can I do this?

    I am facing problem like once I press the Start button, that I get another button controls until all the functions available on the inside button start is filled.

    Thanks in advance

    Sleep (1000) and not to call ProcessSystemEvents () are the reasons!

    1. Sleep () completely blocks the program until the time has expired. It is recommended that you don't call him for long intervals!
    2. If you do not (ProcessSystemEvents) you cannot have a stop button

    Try to change the code this way:

    int requestToStop;    This set at the module level

    int CVICALLBACK Btn_Start_Test (int, int int event, control panel,
    void * callbackData, int eventData1, int eventData2)
    {

    switch (event) {}
    case EVENT_COMMIT:

    requestToStop = 0;    Clear the flag to stop and start the test
    If (Tree_getselectedChilditems())

    MessagePopup ('Info', 'operator stopped the test!');

    on the other
    MessagePopup ("Info", "TEST COMPLETED successfully");
    break;
    }
    return 0;
    }

    int btn_stop_test (int, int int event control panel CVICALLBACK,
    void * callbackData, int eventData1, int eventData2)
    {
    switch (event) {}
    case EVENT_COMMIT:
    requestToStop = 1;
    XL_KillWindowsProcess ("EXCEL." EXE"); not exactly excel file, it can be any file that is currently running
    break;
    }
    return 0;
    }

    int Tree_getselectedChilditems (void) //double testcaseno)
    {
    int noOfItems; int val, I have;  int index;
    int noOfChild, index = 1;
    char treelabel [500] = {0};
    char charval; char TCno [100];
    Select int;  char testno [100] = {0};

    tini double;

    for (error = GetTreeItem (panelHandle, PANEL_TREE, VAL_CHILD, 0, VAL_FIRST, VAL_NEXT_PLUS_SELF, VAL_MARKED, &index);))
    index > = 0 & error<=0;error =="" gettreeitem(panelhandle,="" panel_tree,="" val_all,="">
    (index, VAL_NEXT, VAL_MARKED, & index))
    {
    GetTreeCellAttribute (panelHandle, PANEL_TREE,
    index: 0, ATTR_LABEL_TEXT, treelabel);
      
    Scan (treelabel, "%s", TCno);
    strcpy (testcaseno, TCno);
      
           
    Sleep (1000);     Replace this line with the following code
    tini = Timer ();
    While (timer() - tini)< 1.0)="">

    ProcessSystemEvents ();

    If the breach (RequestToStop);     The operator are

    }
      
    readTestcasesheet (ExcelWorkbookHandle, ExcelWorksheetHandle, testcaseno);
    Fmt(treelabel,"%s","");

    If the breach (RequestToStop);     Judgment of the operator
    }
     
     
    Return requestToStop;
    }

  • CVI 8.1 Distribution Edit Panel installer problem.

    I have a marked RED of Fulcrum OR reports on the CVI 8.1 Distribution Edit Panel. When I ignore it, the distribution kit is produced, installed and the program works correctly.

    But what is the cause of this error? I've attached a picture in a word doc.

    Mert, I got the NIReports.msm from a WIN98 CVI 6.0 computer used by our supplier. Good thing I stored his old computer. I copied on my development machine and the construction/Panel is now happy. Thanks for the answers! Scott Youngren

  • .onActivate callback for object Panel

    Hello.

    I'm working on a user interface that uses a lot of eventListeners. I would like to add and remove depending on the State of the window.

    To do this, I use reminders:

    .onActivate

    .onDeactivate

    The script below works like a charm when it is run from file > Scripts > run Script file...

    When recorded in the Scripts/ScriptUI Panels/scriptname.jsx and then run it from the window menu in AE, the recall of .onActivate doesn't seem to work.

    In any case not when right clicking on the window.

    But when you click on the first button, the .onActivate callback is triggered.

    The recall of .onDeactivate works as expected; he get is triggered when I click on another part of the interface of AE.

    Any ideas?

    {
    function safeEventWindow(thisObj){
      var win = thisObj instanceof Panel ? thisObj : new Window('palette',"Safe Event Window",undefined,{resizable:true})
      win.alignChildren = ['fill','fill']
      var mGrp = win.add('panel',undefined,'PANEL!')
      mGrp.minimumSize = [200,200]
      var btn1 = win.add('button',undefined,"I'm just a button, man.")
      btn1.alignment = ['center','center']
      btn1.onClick = switchText
      var txt1 = mGrp.add("StaticText",undefined,"\\^___________^/")
      txt1.alignment = ['center','center']
      txt1.hide()
    
    
      // FUNCTIONS
      function switchText(event){
      var state = txt1.visible
      if(state) txt1.hide()
      else txt1.show()
      }
    
    
      function mWin_refresh(){
      win.layout.layout(true)
      win.layout.resize()
      }
    
      // EVENT HANDLERS & FUNCTIONALITY
    
    
      function startMouseListeners(event){
      $.writeln("startingMouseListeners")
      mGrp.addEventListener("mouseover",switchText)
      mGrp.addEventListener("mouseout",switchText)
      }
      function stopMouseListeners(event){
      $.writeln("stoppingMouseListeners")
      mGrp.removeEventListener("mouseover",switchText)
      mGrp.removeEventListener("mouseout",switchText)
      }
    
    
      win.onActivate = startMouseListeners
      win.onDeactivate = stopMouseListeners
      win.onResizing = mWin_refresh
    
    
      //__INIT__
      if(win instanceof Window){
      win.show()
      win.center()
      }
      mWin_refresh()
    }
    
    
    //__INIT__
    safeEventWindow(this)
    
    
    }
    

    Checked the AE CC2014, windows 7: onActivate does not work, onActivate only triggered when activating a widget (the button), but not the Panel.

    Note: you should care when adding event listeners to a group/Committee: 'mouseover', and 'mouseout/mouseouthandler()' can trigger for both the Panel AND the static text (when it is visible)

    Is that what you want?

    Xavier

  • How to set portrait and fashion in 2010 Panel landscape labwindows cvi

    Hello

    I wanted to just adjust the panels for potrait and landscape mode, but what is the best way to do.

    Thank you

    There is no 'portrait' or 'landscape' mode for the panels, but you can set the size of the Panel just at your convenience using SetPanelSize. Then, you probably also need to arrange the controls in the Panel... so it could a be a good idea to design two panels, a landscape and one for portrait mode, load and display only.

  • Manufacturing of Panel of labwindows CVI as Labview Subvi

    Dear all,

    Does he know how to use LWCVI in Labview.

    I had developed LWCVI according to program GUI. Now, I want to use in labview, where I also want to use the value of some digital commands to the CVI group.

    Is it possible to call and use the LWCVI program in LABVIEW.

    -Vishnu


  • How to cancel a callback function when it is run in CVI?

    Hi, guys.

    I am a user of LabVIEW and intesrting in CVI recently.

    See my attached that question please. It's so easy in LabVIEW, but it bothers me for several days.

    NUM would increase 1 and 1 second per iteration delay after clicking the run button.
    My question is,
    Is it possible to interrupt the function of Run_callback by clicking on the Stop button when the loop is running?
    If Yes, could you please help modify my example.

    Thank you.

    Hello-

    To answer your question, indirectly, a better way to achieve what you are looking for is maybe thanks to the use of a timer.  You could place a timer on your UIR and set the interval to 1 second.  This timer calls a routine in your code at the interval that you set.  Then you just select or clear reminders for the run button and switch to stop timer.  I modified your example and attached it below.  Let us know if you have any questions!

    NickB

    National Instruments

  • How to get out of the callback function key before it complete the LabwindowsCVI

    Hi all

    In my program I use the command button (called SCAN) to analyze the setting on the serial port. When I press SCAN button callback fuction starts to send command on the series for the scan on the serial port setting. There are 99 order send and read. It takes about 3 minutes. It works very well. Now, I want to stop scanning and exit the callback function that is called by the button SCAN. Now when I press the SCAN button that it completes all 99 recommend and control then come to the interface user. So I'm not able to stop and get out of this loop. Y at - it a why to exit this loop if the user wants to get out? otherwise it will finish the scan.

    -Vishnu

    Hello

    I'll give you 3 options:

    1. If you want to go programaticly you can use simple break when stopping 'event' occur.

    2. If you want to go with a Cancel button, you can use this post:

    http://forums.NI.com/T5/LabWindows-CVI/few-general-CVI-questions-how-the-compiler-works/m-p/1440984

    where I already asked that it is not the recommended option for the panels.

    3. the best option is to use the multi threading separate each button in thread...

  • panels and multithreading - what features can I call from another thread.

    I am writing a program (Windows XP, LabWindows/CVI 2010) that has several threads. The main thread generates and manages most of the panels, but not all. Is there a list of what control panel functions are thread-safe and which are not? Reading the help file and the different positions, the functions of set value are safe; game-attribute functions are NOT. (I found that calling (SetPanelAttribute) with ATTR_TITLE will be locked permanently a program!). What about calliing a command callback function? (Via the CallCntrlCallback() function). It seems to work very well so far, but I can't find anything definitive.

    I do a lot of multi-thread applications, so I have a few ideas for you.  Unfortunately, I have not tried to do many of the changes of attributes specific threads lower panel.

    I'm very careful about how I handle the wire "solidity", dealing with the variables in an asynchronous way, as much as possible, to avoid the use of blocking and incorrect values of the variables.

    But there are certainly many things simply cannot make you the son of the daughter.  Things like question popups and launch other threads cannot be done simply.  As long as you understand that the best place to do something is in the main thread, and then a girl thread can use PostDeferredCall (...), do something in the main thread

    In the thread of your daughter, you can insert this call:

    PostDeferredCall (launchNewThread, 0);

    And then this call performs this function in the main thread:
    void CVICALLBACK launchNewThread(void *callbackData)

    {
    CmtScheduleThreadPoolFunction (threadPoolHandle, NewThread, NULL, NULL);
    }

    Or you can insert calls from parameter of the attribute panel inside the function above, I suppose, to safely run in the main thread.

    Hoe, that helps...

    -Gary

Maybe you are looking for

  • Your opinion about Satellite L775-111

    Someone at - it what model or able to give comments about it. It seems a reasonable price for its construction. 729 what other i5 17 inches could I get with the dedicated graphics card Thank youGeoff

  • HP Officejet Pro L7580 for Mac 10.5.8 scanning

    When I click on applications Image captures the message - no image capture device connected, but I think that I followed the procedure of connection.  Can you advise, thanks.

  • error-2555 with PDM

    Hi Forum, I converted my project to LV2009 SP1. It appeared that two of my screws which contained tdms screw storage display message error-2555 during execution. It would bother me not but error all the ins and outs are connected and caught by the ro

  • Comparar imagenes

    Hola a todos, Tengo una pregunta, veran tengo una base datos compuesta imagenes en mi pc y lo quiero what are yo tomo una foto nueva y compare me con todas las fotos that I have on the basis of data y el program Québec tells me that if esta efectivam

  • When I try to connect to my router wirelessly from my laptop and the room, he asks for my network key and I don't know what it is.

    my brother used to all our computer equipment set up and he died last year. Well when I moved and tried to get into my new place it will not allow me without a network/wpa key. I know that I am trying to connect to my router and not my neighbors beca