LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Callback cue is full

hello, when load and open the OPC directions from database, I have this error:

" the deferred callback cue is full. "

 

 

// SQL Query y conector a la tabla ...
    Fmt(sqlquery,"%s<SELECT dir FROM opc_dirs ORDER BY codigo");
    hstdb = DBActivateSQL ( conectdb, sqlquery);
                                           
    resCode = DBBindColChar (hstdb, 1, 100, OPC_DIR, &opcdirstat, "");
        // ... y obtenemos una posición a cada una de las columnas de las direcciones del OPC
     if (OPC_COM){    
        while ((DBFetchNext (hstdb)) == DB_SUCCESS){
             status = DS_Open (OPC_DIR, DSConst_ReadWriteAutoUpdate, OPC_Callback, NULL, &OPChandle[numOPC]);    <-- THIS FUNCTION GENERATE THE ERROR !!!!!
            
             if (status < 0 ){
                SetCtrlVal(panelPrincipal, PANEL_MSGS, 8); // INFO: error de --> OPC
                Fmt(buffer, "%s<[%s] OPC ERROR:  loading OPC[%d] %s\n", TimeStr(), numOPC, OPC_DIR);
                SetCtrlVal(panelLogs, LOGPANEL_TXTLOGS, buffer);
             }
             ++numOPC;
        }
    }

 

any solution to solve it ?

 

thanks.

0 Kudos
Message 1 of 3
(2,981 Views)

any solution, please ?

0 Kudos
Message 2 of 3
(2,897 Views)

The deferred callback queue holds thread callback events that are waiting to be executed. These are generated by the PostDeferredCallback function. Internally, the DataSocket library is using PostDeferredCallToThread when handling events. However, the only time these events are processed is when GetUserEvent, RunUserInterface, or ProcessSystemEvents is called.

 

How many times does your while loop execute before you receive this error? If it is opens too many new DataSocket connections before the thread has an opportunity to call ProcessSystemEvents, the queue might fill up.

 

Add a call to ProcessSystemEvents( ) in your while loop and that should fix the problem.

National Instruments
0 Kudos
Message 3 of 3
(2,827 Views)