LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Running a porgram with Network variables will not run properly on another comp

Hi all

i have a program that communicates with another program using network variables. i am using cvi 2012sp1, the program works fine on the computer i developed the program on. I copied the entire project file over to another computer with the same operating system windows xp sp3 and deelopemnt enviroment cvi 2013sp1. After i compiled the program on the other computer the program runs extreemly slow where it is usless.

Are there any special windows updates that need to be installed that tie into the network variables

both computers have 2012 distribution managers, the same DAQmx program

the only thing different between the two computers are some winodws updates.

0 Kudos
Message 1 of 16
(4,902 Views)

Hi,

 

Is it possible to try this program on the first computer but with 2013 or on the second with 2012? This could rule out differences between versions. Also could you describe exactly what happens when it runs extremely slow?

Evan See
National Instruments
0 Kudos
Message 2 of 16
(4,875 Views)

Hi Evan

i removed the 2013 runtime engine from the computer that has the problem and put the same runtime engine 2012sp1 as the other computer that is running properly, but this did not solve the problem. A Brief description the the program is that it is reading a DAQ and and displaying the data on a graph, the network variables are tied to another program that is transmitting data to this program at a rate of 25ms to a buffered writter and displaying the information on screen.

The problem that is occuring is when the program in running in debug mode thru cvi the screen freezes immediatly, and the after 10 sec or so the DAQ Error occurs where the data was not read and data has been over written. if i restart the program and stop the process before the DAQ error the process is always in the same function call for the 25ms Network variable read, the process is called by a PostDeferredCall.

If i run the debug program without CVI attached it runs ok as far as i can tell, the DAQ is reading and the graphs are getting updated, and the data being recieved looks ok but it will only run for a day or sometimes hours before the previous error as described earlier occurs.

Is the Data being sent to fast and clogging up the program?

0 Kudos
Message 3 of 16
(4,847 Views)

Do you have the error code number or message that you receive when it appears to freeze? That would help narrow down what might be happening in he background.

Evan See
National Instruments
0 Kudos
Message 4 of 16
(4,814 Views)

Hi Evan

the first error that i get when running in debug in CVI is: Library function error(return value == -117(0xffffff8b)) the deferred callback queue is full, this happens averytime it starts in cvi debugging

 

Running in debug outside CVI enviroment i increased Readrate of the DAQ to trigger the error:

Library function error(return value ==-200279(0xfffc1a9)) attempted to read samples that are no longer avaliable, the requested sample was previously avaliable but has since been oveer written

 

code on program with Problems

Check(CNVCreateSubscriber (NetworkVariablePathToDaqMotorEventTimes,ToDagMotorRuntimeDataCallback,StatusCallback,0,CNVWaitForever,0,&Handle_ToDaqMotorRuntime));

static void CVICALLBACK ToDagMotorRuntimeDataCallback(void *handle, CNVData data, void *callbackData)
{
    if(!data)
        return;
    if(PostDeferredCall(updateMotorRuntimeValuesDeferredCallback,data)<0)
        CNVDisposeData(data);
}

void updateMotorRuntimeValuesDeferredCallback(void * callbackData)
{
//    mtrEventTimes[0]=mtrOnTime;
//    mtrEventTimes[1]=mtrOffTime;
//    mtrEventTimes[2]=totalMtrRunTime;
//    mtrEventTimes[3]=adrRunTime;
//    mtrEventTimes[4]=eventOnTime;
//    mtrEventTimes[5]=eventOffTime;
//    numRows=6;
    unsigned long numDim;
    double mtrOnTime=0, mtrOffTime=0, eventOnTime=0, eventOffTime=0, adrTime=0,totRunTime=0;
    double mtrEventTimes[6]={0};
    int err=0;      
    unsigned nDim=0;
    size_t dim[1]={0};
    CNVDataType type;
    CNVData data=(CNVData)callbackData;
    if(!data)
        return;
    CNVGetDataType(data,&type,&numDim);
    if(type == CNVDouble && numDim==1)
    {
      CNVGetArrayDataValue (data, CNVDouble, mtrEventTimes, 6);
      totRunTime=(((mtrEventTimes[2])/60)/60);        //estimated total runtime
      err = SetCtrlVal(panelIdle,PANELIDLE_NUM_MTR_ON_TIME, mtrEventTimes[0]);
      err = SetCtrlVal(panelIdle,PANELIDLE_NUM_MTR_OFF_TIME, mtrEventTimes[1]);
      err = SetCtrlVal(panelIdle,PANELIDLE_NUM_TOTAL_RUNTIME, totRunTime);
      err = SetCtrlVal(panelIdle,PANELIDLE_NUM_ADR_TIME, mtrEventTimes[3]);
      err = SetCtrlVal(panelIdle,PANELIDLE_NUM_EVENT_ON, mtrEventTimes[4]);
      err = SetCtrlVal(panelIdle,PANELIDLE_NUM_EVENT_OFF, mtrEventTimes[5]);
    }
    CNVDisposeData(data);
}

0 Kudos
Message 5 of 16
(4,809 Views)

Are you doing anything different between running in the CVI environment versus debugging outside? Also when you say "Running in debug outside CVI enviroment" did you build a debuggable executable or are debugging in another method?

 

For the first error, I would refer to this thread.

 

For the second error you mentioned you increased the read rate, which if increased fast enough should cause this error.

Evan See
National Instruments
0 Kudos
Message 6 of 16
(4,780 Views)

For debuggin outside CVI enviroment all i am doing is running the debug.exe of the program, if the program stops then i attach the process to the program

For debuggin inside CVI all i am doing is clicking the run button in cvi and letting it run inside cvi.

0 Kudos
Message 7 of 16
(4,778 Views)

I also added a processSystem events at the end of the call back and it didnt make a difference

0 Kudos
Message 8 of 16
(4,766 Views)

Where are the network variable hosted that you are working with? Are they all local on the computer you are debugging with or are you running then on the original development machine?

Evan See
National Instruments
0 Kudos
Message 9 of 16
(4,759 Views)

Hi Evan

I have multiple test benches and each test bench is a stand alone bench, the program is not configured to talk to the other benches.

i am using as a network ID  of ////localhost for all the network variables

The programs that are talkiing to each other are on the same computer.

I have one computer that i had the programs developed on that is running both programs in CVI debug mode with no problem where the two programs are talking to each other on that one computer.

The other computer that has the same (hardware and software configuration) i transferred the programs from the devolpment computer and ran both in debug and also with only the reciever in debug, the sender does not seem to hang or freeze, just the recieving program again both programs are talking on the local host computer.

 

0 Kudos
Message 10 of 16
(4,744 Views)