Thread: Function conflict, reference static VI

Hello community,

Sorry if this has already been answered before, but I spent an hour looking. I try to learn a little more about using subVIs to clean up my code.

I'm trying to connect a static VI reference of a Gaussian function I made to the non-linear curve Fit.vi, but I get a cut wire that says "feature conflict".

When I create constants for the release of my Gaussian VI and the entrance to the Fit.vi curve nonlinear, they are clearly different classes.

Could someone show me how to change my Gaussian VI to match the class correctly? I would be very happy.

Thank you

-Patrick

Your Subvi model needs a connector model that is identical to the model. Start with the model mentioned in the help and change only the code, not existing controls and indicators. Simply leave it unplug unused terminals, do not delete.

Tags: NI Software

Similar Questions

  • SetCtrlVal used during the Thread function works causes memory leaks

    I am writing a program that works if... Or not work if... - see the next lines... :-)...

    The program includes a section, mostly GUI - and User Interaction.

    The other part is a DLL. In the DLL we readings on an external consultant controller RS232. Sometimes the controller card needs (called how much) time and this time must pass then the result can be read card controller... and so on...

    Blocking is not GUI-user-program for the expectation of the return value of the DLL functions (which need a few seconds to be finished) I start a thread in the DLL with

    CmtScheduleThreadPoolFunction (DEFAULT_THREAD_POOL_HANDLE, THREAD_FunctionX, & tmpTFP, NULL);

    with "tmpTFP" as an instance of type "TYPE_THREAD_FUNCTION_PARAMETERS":

    typedef struct
    {
    //
    int IntVal1;                // 1. Integer-Wert
    int IntVal2;                // 2. Integer-Wert
    int IntVal3;                // 3. Integer-Wert
    int IntVal4;                // 4. Integer-Wert
    int IntVal5;                // 5. Integer-Wert
    //
    int IntBuffer1 [32];            // 1. Integer-buffer (aktuell genugt einer)
    //
    Double DblVal1;                // 1. Double-value
    Double DblVal2;                // 2. Double-value
    Double DblVal3;                // 3. Double-value
    Double DblVal4;                // 4. Double-value
    Double DblVal5;                // 5. Double-value
    //
    char CharVal1;                // 1. (Single)- Tank-Wert
    char CharVal2;                // 2. (Single)- Tank-Wert
    char CharVal3;                // 3. (Single)- Tank-Wert
    char CharVal4;                // 4. (Single)- Tank-Wert
    char CharVal5;                // 5. (Single)- Tank-Wert
    //
    char CharBuffer1 [1024];        // 1. Char buffer (akutell einer genugt)
    //
    } TYPE_THREAD_FUNCTION_PARAMETERS;

    In the GUI-user program - I get fast by default-return value of the thread start function.

    Then I asked the DLL (some global state variables are used for this) when it is finished.

    According to the map-controller (RS232) contacted the waiting time depends on the 'mood' of the controller card.

    In the DLL-mark of the GUI-user-program routine now everything works fine - without using "SetCtrlVal!"

    In my GUI, there is a text box of the info/comment for messages. If I do a few outputs user using 'SetCtrlVal' I always errors, caused by the false "TYPE_THREAD_FUNCTION_PARAMETERS"-values in the service of thread. "» If I set a breakpoint at the beginning thread-function I see mostly erroneous values in my transfer structure variables. If I put a breakpoint in the thread-function-calling 'CmtScheduleThreadPoolFunction (...)"and at the beginning of the thread values are (mostly) correct!

    I tried several and different things - but:

    If I ONLY (!)  Commenting on the (!) of a line with "SetCtrlVal", the program works, all States are asked out of the DLL.

    If I replace the "SetCtrlVal" with a written record-file function clean everything works fine and after completing the program I can look at the log file and see all the user information. BUT with 'SetCtrlVal' instead or set or (...) it does not work.

    My description is maybe not entirely clear, but believe me: only ONE line the «SetCtrlVal "line - should be commented out to let the program run properly!»

    Because if the line "SetCtrlVal"is program-user-GUI, after the call to the thread in the DLL, the DLL-memory seems to be corrupted by the call "SetCtrlVal" in the user-GUI program.»

    Best regards

    F.

    There may be a problem in your structure that your variable is set.

    You said that, after the address of the variable in the thread function the appellant one ends. Now, as you can read help each value passed in parameter threadFunctionData of the layed function must point to an area of memory that persist when the fuction is running: If your variable is defined at the level of the functions it is not valid when the thread runs since the appellant finished and released its local memory.

    Your approach with a global variable is a valid alternative, but if it is the solution, you will find data passed to the thread function must be valid for all his life.

  • Thread thread function ID vs ID

    Hello

    I'm afraid I don't really understand the difference between a thread ID and an ID of service of thread or formulated differently, what is the purpose of the thread ID and why both are needed?

    For example, use CmtScheduleThreadPoolFunction returns a thread ID function, which is used later to get a thread ID.

    Function calls such as PostDeferredCallToThread, the identifier of the thread is necessary, which can be obtained only for the thread underway through CmtGetCurrentThreadID, in the contrary case, to know the ID of thread function to get the thread what ID... seems a bit complicated

    -Why can't I use the function thread ID only?

    Thank you in advance for the explanation...

    Wolfgang

    I think the analogy works, but use of "thread-ID function" Wolfgang is a bit mixed upward:

    employee == thread (has a thread ID)

    task is function thread (a thread ID of function)

    The thread pool maintains a lot of idle threads that are sitting around waiting for work (walking on the intended function). When a thread finishes its task, it is not destroyed; It just goes back in a State of inactivity waiting for more work. For this reason, it makes sense that the thread ID persists. On the other hand, if the same function is scheduled to run repeatedly, every time that it runs, it will have a new ID of thread function. A thread function ID represents a particular instance of a service running on a ThreadPool thread.

    A. Mert

    National Instruments

  • VI = external dll function pointer reference?

    So I'm porting this simple program in C in LabVIEW. It receives signals of a haptic (Sensable Phantom Omni) material. It should be simple, but it showed several complications. (been stuck for 2 weeks )

    I managed to import the material with all its functions DLL (using LV 8.2, because 8.5 and 8.6 Assistant sucks).

    But there is a function whose argument is a function pointer:

    hUpdateHandle = hdScheduleAsynchronous (updateDeviceCallback, 0, HD_MAX_SCHEDULER_PRIORITY);

    I already have the corresponding VI to updateDeviceCallback (which is a (void *) who don't really use and returns an int).

    hdScheduleAsynchronous is part of the API of the material (I'm not kidding with her, and I know what's inside), and as first argument expects a function pointer.

    Can I use the node reference to open VI to get the "pointer" for my VI and then feed him as an argument for the external DLL? How to properly mount the ref VI data type in a function pointer?

    Although DLL probably uses the C calling convention and then Visual C like prefixing underscore before the exported name. Node to call library of LabVIEW bypasses that you entered because when he's trying to GetProcAdress a function name, and the operation fails, it automatically retries with the name of function with added underscore. For your own "Wrapper"DLL", you will have to do something similar, or use the right name.

    But while the reminder THAT DLL is indeed must be written in C to avoid trouble, functions to load the library and GetProcAddress can be easily implemented directly in LabVIEW by using the node library call. It lets more easily play you with such things as the function names.

    Rolf Kalbermatter

  • function addEventListener references child in movieclip. How can I stop this?

    I built a custom designed checkBox. The movieclip in the library and drag on the chronology of my .swf. I use CS4 & AS3. I use procedural AS3 rather than OO AS3.

    The box movieclip a child movieclip inside so I can apply a filter drop shadow to some of the graphics.

    When I put an eventlistener on the custom checkbox it works fine, but when I try to reference the movieclip checkbox inside the eventlistener function, the event.target.name refers to the child movieclip (just a chart with a drop shadow filter).

    From my reading, it looks like to the spreading function down to the child movieclip, but I don't want to do that.

    How do I

    A. reference the parent movieclip?

    or

    B. stop the eventlistener of reproducing down to the child movieclip?

    I tried to use stopPropagation(); but it did not prevent the function of runoff event.target.name down to the child movieclip.

    Here's what looks like AS3.

    The statement displays trace "step3_mc.cbEmail_mc.instance25" instead of what I need "step3_mc.cbEmail_mc".

    step3_mc.cbEmail_mc.addEventListener (MouseEvent.CLICK, fnc_cbClick);
    step3_mc.cbAgree_mc.addEventListener (MouseEvent.CLICK, fnc_cbClick);

    function fnc_cbClick(event:MouseEvent):void {}

    trace ("fnc_cbClick:" + event.target.name + "" + event.target.currentFrame);

    If (event.target.currentFrame < 3) {event.target.gotoAndPlay ("cbOn") ;} else {event.target.gotoAndPlay ("cbOff") ;}
    }

    Use event.currentTarget.name to get the name of the desired instance (which is the instance assigned to the event listener). If you use event.target.name, the name of the instance, hence the click origin is traced, which may or may not be what you want.

    TS

  • Please tell us how to remove the 'message thread function' in the column 'Object' of my Inbox.

    Hello!
    For some reason, the column of the object on the Inbox of my e-mail account now has the topics of conversation. I have no idea how the son got there - and you would appreciate the help in eliminating these threads.
    Thanks a lot for your help.

    In the main menu bar:
    View (Alt - V) - sort by - Unthreaded

  • Static class functions: PLS-00801: internal error [phd_get_defn:D_S_ED:LHS]

    Any ideas why this would generate an internal error - referring to a static class function in the constructor of this class parameter signature?

    Test case (on 11.2.0.2) as follows:
    SQL> create or replace type TMyObject is object(
      2          id      integer,
      3          name    varchar2(30),
      4  
      5          static function DefaultID return integer,
      6          static function DefaultName return varchar2,
      7  
      8          constructor function TMyObject(
      9                  objID integer default TMyObject.DefaultID(), objName varchar2 default TMyObject.DefaultName()
     10          )return self as result
     11  );
     12  /
    
    Type created.
    
    SQL> 
    SQL> create or replace type body TMyObject is
      2  
      3          static function DefaultID return integer is
      4          begin
      5                  return( 0 );
      6          end;
      7  
      8          static function DefaultName return varchar2 is
      9          begin
     10                  return( 'foo' );
     11          end;
     12  
     13          constructor function TMyObject(
     14                  objID integer default TMyObject.DefaultID(), objName varchar2 default TMyObject.DefaultName()
     15          )return self as result is
     16          begin
     17                  self.id := objId;
     18                  self.name := objName;
     19                  return;
     20          end;
     21  
     22  end;
     23  /
    
    Type body created.
    
    SQL> 
    SQL> declare
      2          obj     TMyObject;
      3  begin
      4          obj := new TMyObject();
      5  end;
      6  /
    declare
    *
    ERROR at line 1:
    ORA-06550: line 0, column 0:
    PLS-00801: internal error [phd_get_defn:D_S_ED:LHS]
    If static class functions are removed from the manufacturer and applied to the place inside the body of the constructor, it works without error. Similarly, you can call the constructor with the functions of the static class as parameters, without causing an internal error.
    SQL> create or replace type TMyObject is object(
      2          id      integer,
      3          name    varchar2(30),
      4  
      5          static function DefaultID return integer,
      6          static function DefaultName return varchar2,
      7  
      8          constructor function TMyObject(
      9                  objID integer default null, objName varchar2 default null
     10          )return self as result
     11  );
     12  /
    
    Type created.
    
    SQL> 
    SQL> create or replace type body TMyObject is
      2  
      3          static function DefaultID return integer is
      4          begin
      5                  return( 0 );
      6          end;
      7  
      8          static function DefaultName return varchar2 is
      9          begin
     10                  return( 'foo' );
     11          end;
     12  
     13          constructor function TMyObject(
     14                  objID integer default null, objName varchar2 default null
     15          )return self as result is
     16          begin
     17                  self.id := nvl( objId, TMyObject.DefaultID() );
     18                  self.name := nvl( objName, TMyObject.DefaultName() );
     19                  return;
     20          end;
     21  
     22  end;
     23  /
    
    Type body created.
    
    SQL> 
    SQL> declare
      2          obj     TMyObject;
      3  begin
      4          obj := new TMyObject();
      5  end;
      6  /
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    SQL> declare
      2          obj     TMyObject;
      3  begin
      4          obj := new TMyObject(
      5                          objID => TMyObject.DefaultID(),
      6                          objName => TMyObject.DefaultName()
      7                  );
      8  end;
      9  /
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    Had a look on support.oracle.com and turned toward the top of the specific remarks concerning the use of the static class functions in the signature of the constructor parameter. Known issue? Any other solution in addition to the above?

    Hello

    There is a bug: ""Bug 8470406: CREATING an OBJECT INSTANCE FAILS WITH the ERROR PLS-00801 IN 11 GR 1 material ", it shows the behavior in 11 g but not to the point 10.2." It gives exactly the symptoms you see also, move to the body and it works. But he gave no solution/patch.

    Herald tiomela
    http://htendam.WordPress.com

  • subVIs does not function when it is called by main secondary to vi

    Hi all

    I have a main.vi that loads the façade into a secondary four subVIs when selected. Like most applications, everything works fine up to come to build the project (.exe). Program works as expected when run it from .exe but when all the vi.lib functions (for example reading png Subvi) is included in one of the subVIs called, the façade is loaded correctly, but the Subvi is not running and the invoke node (perform a VI generates error 1003).

    I've included the subVIs in 'Always include' in the specification to build under the heading Source files.

    Help, please

    Thank you

    I made a significant change to your "called" sub - VI (I created an icon for it - you'll see why it's important in a minute) and again your main VI.  This code snippet is saved in LabVIEW 2015, but it is simple enough that you should be able to recreate it in any LabVIEW version you are using.

    I like to use references static VI (the first thing on the block diagram) because, especially if they are associated with a Subvi with an icon, they provide a mnemonic, robust and easy to get a lot of useful sub - VI 'properties' (for example the path) without worrying about the execution environment.  In particular, they work very well with the Start function Asynchronous Call, I think it's much simpler to use than the VI server method.  I'll walk you through it...

    1. Start with a static reference of VI to the Subvi to run asynchronously.  If your Subvi has an icon, it will appear (as shown here) in the body of the static VI reference, which makes it slightly better documented.  Notice the Red Star on top of the static reference - which indicates a reference strictly - type (right click and choose strictly typed), you need to the asynchronous call start.
    2. This reference gets first wired to a property node - the unusual appearance of the node ('VI Interface Type 2') comes from the strictly typed reference.  We choose the Path property.
    3. The path gets plugged into an open VI reference function.  Because we use asynchronous Start Call (Forget), we specify Option 0 x 80 (glance using reference VI open for further explanation).  We also wire the Strict Type of step 1 at the entrance to this function Type.
    4. The VI reference resulting is wired to Start Asynchronous Call, which starts the called sub - VI.
    5. We also spend it to Insert Secondary VI method, which shows the sub - VI running in the Sub panel.
    6. Now, we interact with the sub - VI in the Sub panel as much as we want to.
    7. In the main routine, we now run the while loop, waiting simply Stop pressing.  I placed a 100 msec waiting here to give priority to the Subvi.
    8. When leaving us, we remove the sub - VI of the Sub panel, he abandoned and get out.  I see no need to put a function exit here - if you want to automatically close the main façade, just do it.

    Bob Schor

    P.S. - I've tested (LabVIEW 2015) and it works fine.

  • Boolean (reference), and boolean are incompatible

    Hello

    I have a sub VI who receives a reference to a Boolean input.

    I need this reference to monitor the State of the Boolean input throughout the operation of the Sub VI.

    The entrance is a stop button. The VI is supposed to frequently check the condition of the stop button, and in case it is true, stop its actions.

    I put the refnum class be boolean, as follows (your language may vary):

    In order to get the value of the reference, I just click on-> create-->--> the value property node.

    It is the way I learned to get the properties of things.

    It creates one of these smaller blocks of property node.

    However, this value is not usable. When I try to connect it to an OR logical operator, LV complains of incompatible types.

    Aparently a Boolean value (reference) can be compared to a Boolean value.

    That makes no sense to me.

    Could someone there explain please?

    Why is there a difference?

    There is another option available:

    Make a right-click on the reference-> create-> property for the (strict) Boolean class-> value.

    This creates a regular block of property node, with a Boolean value can be used.

    This value is preset to display the correct properties.

    What I got to the entrance of the this thread property node reference?

    Or is this 'connected' to the reference in the same way as the other node 'Wireless '?

    Please see image below which shows the two ways to retrieve the value:

    Thank you for your help

    Hi max,.

    your property node type 'A' is not for a Boolean control, it seems to represent a reference as the value.

    Edit: you have created a property node for your reference control. The "value" of this reference control will be of type 'reference' - no matter what the reference should point to. You need to connect cable a property node generic in the palette of functions to your control reference!

    When you want to use 'generic' property nodes: right-click your Boolean control and "create-> reference. For this reference, you can create a control to get a reference appropriate control!

  • Reference open vi

    Hello

    can someone tell me why LabVIEW does not execute the function "open reference vi" when I interact with for example the context menu? I have attached a picture for more understanding.

    Kind regards

    Thomas

    "Root loop."

    See here.

    in order to keep things straight avoid the conditions of race, dogs and cats living together, there are some operations that take place in what he calls for 'root loop' that everything else is blocked. See the link I provided and then on the link sinned this thread.

    Ben

  • Cannot find the function in the dll library

    I'm trying to use the function I build in a C++ of Labview "Call library function" dll, but it cannot find the name of the function "Add" or "divide". Attached my .dll, file .cpp and screws, could you help me to find out where is the problem?

    The only function exported in your original of the CPP file is the

    add_num()
    

    function. Declare the object as static methods does not export them. It just creates methods of objects that do not have an implicit object as the first parameter pointer and so these functions cannot reference the data object members (but your class has none yet).

    Essentially if you intend to do all your static class methods, using a class is actually pretty meaningless. You would be better with simple standard C functions as your add_num() function is.

  • Two threads in a Panel

    Hello
    I am developing a vision with CVI application that loads the files. VBAI after login... the application interface has two positions (left and right)... I want the two buttons START calls the same function CVICALLBACK (Inspection)... and this function call the function ThreadFunction and its parameter's thread (thread number)...
    I said two tables of the elements to control the two threads and I worked on these tables in the treatment ThreadFunction function...
    Now, I didn't understand how I spend the number of thread for the CVICALLBACK inspection function, in fact, when I click START on left position inspection begins on the left, where it starts on the right, also, if I click on the two positions, she sailed on two positions...
    Thank you for your help, it's urgent

    #include 
    #include 
    #include 
    #include 
    #include 
    #include "toolbox.h"
    #include "nivision.h"
    #include "VBAIInterfaceC.h"
    #include "ann.h"
    
    static int panelHandle;
    static CmtTLVHandle tlvHandle = 0;
    static volatile int exiting = 0;
    
    static int Tab_serial_num[2]={PANEL_SERIAL_NUM,PANEL_SERIAL_NUM2};
    static int Tab_inspec_name[2]={PANEL_INSPECTION_NAME,PANEL_INSPECTION_NAME2};
    static int Tab_inspec_butt[2]={PANEL_INSPECT_BUTTON,PANEL_INSPECT_BUTTON2};
    static int Tab_ecr_acc_stat[2]={PANEL_ECR_ACC_STAT,PANEL_ECR_ACC_STAT2};
    static int Tab_led_metro_stat[2]={PANEL_LED_METRO_STAT,PANEL_LED_METRO_STAT2};
    static int Tab_led_vert_stat[2]={PANEL_LED_CPL_VERT_STAT,PANEL_LED_CPL_VERT_STAT2};
    static int Tab_led_rouge_stat[2]={PANEL_LED_CPL_ROUGE_STAT,PANEL_LED_CPL_ROUGE_STAT2};
    static int Tab_led_jaune_stat[2]={PANEL_LED_CPL_JAUNE_STAT,PANEL_LED_CPL_JAUNE_STAT2};
    static int Tab_lcd_off_stat[2]={PANEL_LCD_OFF_STAT,PANEL_LCD_OFF_STAT2};
    static int Tab_lcd_on_stat[2]={PANEL_LCD_ON_STAT,PANEL_LCD_ON_STAT2};
    static int Tab_main_window[2]={PANEL_MAIN_WINDOW,PANEL_MAIN_WINDOW2};
    static int Tab_test_stat[2]={PANEL_TEST_STATUS,PANEL_TEST_STATUS2};
    static int Tab_text_error[2]={PANEL_ERROR_TEXT,PANEL_ERROR_TEXT2};
    
    void DisplayError(VBAIError error);
    void ButtonStatDisplay(void);
    void IndicatorStat(int ind, bool32 stat ) ;
    static int CVICALLBACK ThreadFunction (int thread) ;
    
    /*static int SetupApplication (void);
    static int ShutdownApplication (void);*/
    
    int main (int argc, char *argv[])
    {   
    
        if (InitCVIRTE (0, argv, 0) == 0)
            return -1;  /* out of memory */
        if ((panelHandle = LoadPanel (0, "ann.uir", PANEL)) < 0)
            return -1;
    
    ...;
    
        ...;
    
        DisplayPanel (panelHandle);
        RunUserInterface ();
        DiscardPanel (panelHandle);
    
    if (stepResults != NULL)
        free (stepResults);
        vbaiCloseConnection (session, 1)  ;
    
        return 0;
    }
    
    void DisplayError(VBAIError error)
    {
        ...;
    
    void IndicatorStat(int ind, bool32 stat )
    {
        ...;
    }
    
    int CVICALLBACK INSPECTION (int panel, int control, int event,
            void *callbackData, int eventData1, int eventData2)
    {
        VBAIError error = VBAIErrorSuccess;
    
        switch (event)
        {
            case EVENT_COMMIT:
    
                !!!!!!!!! The problem !!!!!!!!!!                       
    
            break;
    
        }
        if (error)
            DisplayError(error);
        return 0;
    }
    
    static int CVICALLBACK ThreadFunction (int thread)
    {   
    
    ....;
    
            while(!exiting){
    
                    SetCtrlAttribute(panelHandle,Tab_inspec_name[thread],ATTR_DIMMED,0);
    
                         ;
    
                            switch(i) {
                            case 0: IndicatorStat(Tab_ecr_acc_stat[thread],inspectionStatus);
                                     break;
    
                            case 1: IndicatorStat(Tab_led_metro_stat[thread],inspectionStatus);
                                    break;
    
                            case 2: IndicatorStat(Tab_led_vert_stat[thread],inspectionStatus);
                                    break;
    
                            case 3: IndicatorStat(Tab_led_rouge_stat[thread],inspectionStatus);
                                    break;
                                   ;
    
                            case 4: IndicatorStat(Tab_led_jaune_stat[thread],inspectionStatus);
    
                                   break;
    
                            case 5:IndicatorStat(Tab_lcd_off_stat[thread],inspectionStatus);
    
                                   break;
    
                            case 6: IndicatorStat(Tab_lcd_on_stat[thread],inspectionStatus);
    
                                   break;
    
                         }
    
                         Delay(0.5);
                         ...;
    ...;
    ...;
    

    Hi schweini,.

    Your thread function prototype doesn't seem correct.

    His entry should be a void pointer, not an integer.

    To switch to the thread of your button on which it started, you can use this setting.

    But you will need to pass a pointer to a valid variable.

    In your feed, you will get the value of the data pointer dereferencing.

    Here's a code sample (nickname).

    See if it makes sense.

    //in your Start callback
    static int start; //static is crucial here
    
    switch (event)
    {
      case EVENT_COMMIT:
        start = (control == PANEL_START_1 ? 1 : 2);
        CmtScheduleThreadPoolFunction (pool, ThreadFunction, &start, &funcId);
      break;
    }
    
    //in your thread function
    int CVICALLBACK ThreadFunction (void *data)
    {
      int which_side;
    
      which_side = *((int*)data);
    
      while (!exiting)
      {
        if (which_side == 1)
        {..}
        else
        {..}
      }
    }
    
  • Threads and passing parameters to it

    Hello everyone,

    now I play with sons and I am wondering how to change the setting to the thread function.

    I created a thread function is

    void CVICALLBACK (char id [], char value []) doThread

    {

    do something

    }

    and I want to call the thread like this

    CmtScheduleThreadPoolFunction (DEFAULT_THREAD_HANDLE, doThread(FIX_ARG1,FIX_ARG2), NULL, & threadID);

    But somehow, it does not work. How can I pass strings to the thread function?

    Thank you all...

    Common to pass data to a thread is to pick everything up in a structure, and then past the address of this structure to the function that installs the thread. Then tapped him, cast the parameter passed to a pointer of type structure, and you can then reference the data. As:

    typedef struct {}

    int executed;

    Short flag;

    char string [32];

    } structThread, * pstructThread;

    ...

    structThread tData;

    ...

    tData.run = 1;

    CmtScheduleThreadPoolFunction (..., & tData,...)

    ...

    int MyThread (void * param) {}

    pstructThread td = param (pstructThread);

    so that {(td-> run)

    ...

    }

    return 0;

    }

    JR

  • Problems with functions and scope

    I have a 'createBoard' function declared under "compositionReady".  I can call from anywhere in the compositionReady with a simple "createBoard()";  I can even assign on the fly to the dynamic symbols with «newSymbol.bind ("click", function () {createBoard () ;});»

    However, if I set the click event to call the function of a static symbol or element on the stage, it always gives me a "JOURNAL: Javascript error in the handler! Type of event = element"error.  I tried all of the following conditions:

    createBoard();

    sym.getComposition () .getStage () .createBoard ();

    sym.getComposition () .getStage () .getSymbolElement () .createBoard ();

    sym.getComposition ().getSymbolElement("Stage").createBoard ();

    this.createBoard ();

    and one handful of others.  Most of the people is to scour the forums of edge animate an excerpt.

    Someone at - it a glimpse of what I'm doing wrong?

    Here's the code for compositionReady:

    ------------------------------------------

    Edge symbol: "internship."

    (function (symbolName) {}

    Symbol.bindElementAction (compId, NomSymbole, 'document', 'compositionReady', function (sym, e) {})

    FUNCTIONS:

    Function to create the Board of Directors.

    function createBoard() {* SNIP *}

    ...

    ------------------------------------------

    and here's the code for the static symbol:

    ------------------------------------------

    Symbol.bindElementAction (compId, NomSymbole, "${_title} ', 'click', function (sym, e) {})

    Insert the code for the mouse, click here

    sym.getComposition () .getSymbolElement () .createBoard ();

    });

    End of binding edge

    -----------------------------------------

    Hello

    Your function is available, and is availablewithin the compositionReady. You have defined a local function.

    If you want to use this function on a click event, you must add a prefix: 'sym '.

    Therefore, you declare sym.createBoard () on compositionReady rather than createBoard().

    Then, using your action, click, call using: sym.createBoard (); Your action, click the symbol on the stage.

    You can download an example here: http://forums.adobe.com/thread/1099475?tstart=0. See post #6, click new file attached v4.

    ------------------------------------------

    Edge symbol: "internship."

    (function (symbolName) {}

    Symbol.bindElementAction (compId, NomSymbole, 'document', 'compositionReady', function (sym, e) {})

    FUNCTIONS:

    Function to create the Board of Directors.

    sym.createBoard = function () {* SNIP *}

    ...

    later, you call using:

    sym.createBoard ();

    ------------------------------------------

    and here's the code for the static symbol:

    ------------------------------------------

    Symbol.bindElementAction (compId, NomSymbole, "${_title} ', 'click', function (sym, e) {})

    Insert the code for the mouse, click here

    Here, you must call using:

    sym.createBoard ();

    });

    End of binding edge

    -----------------------------------------

    ==> You can also use sym.setVariable () and sym.getVariable () to set and get a global function.

    Dashboard API:

    function localFunction () {console.log ("called myFunc is: localFunction()") ;}}

    sym.setVariable ("MyFunc", localFunction);

    ==> More info on global functions: see here.

  • Reference FPGA broken son

    Hello

    I use a Subvi to pass some parameters from the host to the FPGA using the function "read/write control."

    The Subvi takes a "FPGA reference In" as the input and provides a "FPGA reference Out" output.

    The problem is that whenever I have a few changes to the FPGA code (for example, I change the type of an input/output), the wires entering the Subvi are marked as broken since the reference FPGA has changed.

    Now, I know that I can solve the problem by opening the Subvi, right-click on the FPGA reference and configure it. But this must be done manually and I want my Subvi to automatically detect any change.

    Is it possible to do?

    Thank you

    Dragis says:

    You can create a typedef and to use this type for your subvis controls/indicators. You will need to manually configure the typedef, but at least, just do it in one place.

    You need to manually configure the FED type.  You need create the def type once and replace all your existing references with her.  Then on the block diagram, find the function of reference FPGA VI open and right-click to set it up.  At the bottom of this box, you will see an option "Bind to Type Definition".  Check, then enter the path to the type definition, that you have created.  Close the dialog box.  The type definition will now automatically update to reflect changes to the FPGA VI.  See:ttp://zone.ni.com/reference/en-XX/help/371599E-01/lvfpgahosthelp/fpga_using_subvis_in_host_vis/ for more information and if you use a LabVIEW 2009, follow the instructions in http://digital.ni.com/public.nsf/allkb/2906287B989006EA862576AB005BE08E

Maybe you are looking for

  • Flashblock 1.5.18 blocking some sites

    I see that Flashblock has been updated, however, there are still problems with it. Some sites, for example AOL, WTOP, etc. that video by default in HTML format and play will no longer work if Flashblock is enabled, even if these sites are added to th

  • went to iTunes movies!

    I recently changed computers (HD is dead) and just passed on my account, iTunes and none of my films/concerts and music are playable.  Names of the concerts are there but it's when you try to play he could not locate the file and I confirmed that I w

  • Is Satellite A105-S2101 supports Bluetooth?

    I've had this laptop for school back in ' 06. Has served me well so far... When I got it, he says it was bluetooth technology. I even used the tool of bluetooth in class a few times the connection to the cell someones (with permission of course). I h

  • I have a hp psc 750 how can we change the analysis of toDOC JPEG setting?

    Hi, I use Windows XP and I have a HP psc750 printer and I am trying to scan documents in my computer. But it only scans in a JPEG file how do I chang it to do the DOC or both?

  • How to change the default player on windows 7?

    I want everything to go on my drive of M (usually either drive D, but my father named M for some reason any). I just got a new game and am running Windows 7 over XP for the first time. I want to download everything I have to by default go straight on