LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with COM Callback

Hi,

you have just to put a breakpoint and to see the value of the event. After that, you can say if I'm right...but I'm sure that's the problem.
0 Kudos
Message 11 of 12
(748 Views)
I have modified the COMCallback in this way:

void COM_Callback(int portNo, int eventMask, void *data)
{
unsigned char i,pacchetto[6];
unsigned int DeltaZCHigh;
double valori_input[5];
double valori_out[3];

if ((eventMask & LWRS_RXFLAG)&&(GetInQLen (2)>5))
{
pacchetto[5]=0;
for (i=0;i<5;i++) pacchetto[5]+=pacchetto[i]=ComRdByte (2);
if ((ComRdByte (2))!=pacchetto[5]) tx_err();
DeltaZCHigh=(pacchetto[4]<<8)+pacchetto[3];
//DeltaZCHigh=DeltaZCHigh-(10000-DeltaZCHigh);
SetCtrlVal (panelHandle, PANEL_NUMERIC, (DeltaZCHigh*1E-06));
leggi_valori(valori_input);
Calcola_vera(valori_input,valori_out);
visualizza(valori_out);
}
}

Now it see
ms that all correctly works, even if I have tried the program only for an hour. Now I'll test it more time... and I hope to have no surprises. For now thank you very very much.
0 Kudos
Message 12 of 12
(748 Views)