LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Method of getting 2 values simultaneously using RS232C serial communication

Solved!
Go to solution

hey, thanks for giving me your suggestion I had done according to it. Now I got a problem that when I press read button(USED WITH TIMER SO CONTINOUS VALUES ARE COMING) the value comes like this:-

S1,NT+000.000 (all torque values continously)

S1,NT+000.000

.

.

.

.

and after pressing again read button it changes

S2,NT+000.001(allspeed values continously)

S2,NT+000.001

.

.

.

and I am using now scan function with torque & rpm numeric panel.So they are showing same value not different value. like first they both show torque value and then after pressing again they both show speed value moreover value are not coming porperly in numeric panel it is coming like (1.3E-76 instead of S1,NT+000.000  & 1.2E-76 instead of S2,NT+000.001 ) I am using DOUBLE data type  I am attaching code what changes I had made it will be easy to understand for you.

 

double torque,
         rpm;
short read_cnt;
double timeout;
char devicename[30],


int CVICALLBACK ReadCallBack (int panel, int control, int event,
                              void *callbackData, int eventData1,
                              int eventData2)
{
    switch (event)
        {
        case EVENT_COMMIT:
       
            read_data[0] = '\0';
            GetCtrlVal (panel_handle, SERIAL_READ_COUNT, &read_cnt);
            GetCtrlIndex (panel_handle, SERIAL_READTERM, &read_term_index);
            switch (read_term_index)
                {
                case 0:
                    read_term = 0;
                    break;
                case 1:
                    read_term = 13;
                    break;
                case 2:
                    read_term = 10;
                    break;
                }
            if (read_term)
                bytes_read = ComRdTerm (comport, read_data, read_cnt,
                                        read_term);
            else
                bytes_read = ComRd (comport, read_data, read_cnt);
               
               
            SetCtrlAttribute(panel_handle,SERIAL_TIMER,ATTR_ENABLED,1);
           
            Scan(read_data,"%5000f>%f",&torque);
            Scan(read_data,"%5000f>%f",&rpm);
           
            RS232Error = ReturnRS232Err ();
            if (RS232Error)
                DisplayRS232Error ();
               
               
            break;
        case EVENT_RIGHT_CLICK :
            break;
        }
    return 0;
}

 

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

 switch (event)
  {
  case EVENT_TIMER_TICK:
  
  GetCtrlVal(panel_handle,SERIAL_TBOX_READ,tbox_read_data);
  CopyString (tbox_read_data, 0, read_data, 0, bytes_read);
        SetCtrlVal (panel_handle, SERIAL_TBOX_READ, tbox_read_data);
        SetCtrlVal(panel_handle,SERIAL_TORQUE,torque);
        SetCtrlVal(panel_handle,SERIAL_RPM,rpm);
 
  
  
   break;
  }
 return 0;
}

int CVICALLBACK STOPBUTTON (int panel, int control, int event,
  void *callbackData, int eventData1, int eventData2)
{
 switch (event)
  {
  case EVENT_COMMIT:
  
  SetCtrlAttribute(panel_handle,SERIAL_TIMER,ATTR_ENABLED,0);
    

   break;
  }
 return 0;
}

int CVICALLBACK TORQUE (int panel, int control, int event,
  void *callbackData, int eventData1, int eventData2)
{
 switch (event)
  {
  case EVENT_COMMIT:

   break;
  }
 return 0;
}

int CVICALLBACK RPM (int panel, int control, int event,
  void *callbackData, int eventData1, int eventData2)
{
 switch (event)
  {
  case EVENT_COMMIT:

   break;
  }
 return 0;
}

 

0 Kudos
Message 21 of 47
(3,117 Views)

Let's start by dividing the task into elementary operations:

 

  • You need to enable the timer: you don' say whether you have created a start button, but I assume so since you have a stop button. In any case, the start button must: open the port, start communications with the instrument, enable the timer
  • The timer callback must actually read the port (ComRd or ComRdTerm depending on your instrument standards)
  • Scanning also must be done into the timer callback: first read whether S1 or S2 value has been received, next scan into the appropriate variable and display on the proper indicator

In my opinion the moment has arrived when you must develop your own complete code, putting away unnecessary details that are included in the example for completness (like whethere to use termination or not: you know your instrument and it won't change standard during program execution) and use a simpler, more tailored code. Remember that the simpler is the code, the easier will be to debug it.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 22 of 47
(3,113 Views)

hey, very thanks for your help but there is a problem. I think may be due to real time, large values or data are coming through cable so the read box or numeric panel shows error "argument is too small" can you please tell me how can I use excel (dde method) to write data directly into excel sheets such that my space can be save and it will be easy to get data.

 

I had gone through dde demo but still I am confuse that where to open the excel file means in timer or in start button function and all other??

 

 

0 Kudos
Message 23 of 47
(3,089 Views)

Argument is too small error does not mean that the text box is full and is not related to the amount of data: it implies some error in coding instead; is the error constant or does it happen rarely? How fast does the instrument send measures? Would you please post your actual code so that we can take look at it?

With reference to Excel, I discourage you to go that way: this task appears to be too complicated for your cvi skills. You need to trim your actual code so that it works, next you can add another level of complication. Moreover, it is a completely different matter for which you should open a new discussion.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 24 of 47
(3,073 Views)

yeah, error is constant it is always same that argument is too small whenever I increases the value of TEXT_LENGTH it increase for e.g- suppose initial value of TEXT_LENGTH is 10000 then after running I get value and error cames that "argument is too small " value should be 29998 bytes and after increasing value to 100000 it ask for value 100001 bytes and( Instrument is sending data with speed of 9600 bps). I was asking you for excel because I have to take data into excel for analysing it further.

I am attaching code please give suggestions:-

double torque,
        rpm;
short read_cnt;
double timeout;
static char devicename[30],
     read_data[TEXT_LENGTH],
     tbox_read_data[TEXT_LENGTH],
     com_msg[500],
     msg[100];

void SetConfigParms (void);
void GetConfigParms (void);
void EnablePanelControls (int);
void DisplayComStatus (void);


#define TEXT_LENGTH     100000
#define QuitHelp        1
#define InputqHelp      2

double torque,
        rpm;
short read_cnt;
double timeout;
static char devicename[30],
     read_data[TEXT_LENGTH],
     tbox_read_data[TEXT_LENGTH],
     com_msg[500],
     msg[100];


int CVICALLBACK ConfigCallBack (int panel, int control, int event,
                                void *callbackData, int eventData1,
                                int eventData2)
{
    switch (event)
        {
        case EVENT_COMMIT:
            config_handle = LoadPanel (panel_handle, "serial.uir", CONFIG);
            InstallPopup (config_handle);

            
            if (config_flag)    
                SetConfigParms ();
            else                
                config_flag = 1;
            break; 
        }
    return(0);
}


int CVICALLBACK CloseConfigCallback (int panel, int control, int event,
                                     void *callbackData, int eventData1,
                                     int eventData2)
{
    switch (event)
        {
        case EVENT_COMMIT :
            port_open = 0;  
            GetConfigParms ();
            DisableBreakOnLibraryErrors ();
            RS232Error = OpenComConfig (comport, devicename, baudrate, parity,
                                        databits, stopbits, inputq, outputq);
            EnableBreakOnLibraryErrors ();
            if (RS232Error) DisplayRS232Error ();
            if (RS232Error == 0)
                {
                port_open = 1;
                GetCtrlVal (config_handle, CONFIG_TIMEOUT, &timeout);
                SetComTime (comport, timeout);
                EnablePanelControls (0); 
                }
            else
                EnablePanelControls (1); 
            DiscardPanel (config_handle);
            break;
        }
    return(0);
}


int CVICALLBACK ReadCallBack (int panel, int control, int event,
                              void *callbackData, int eventData1,
                              int eventData2)
{   
 
     switch (event)
        {
        case EVENT_COMMIT:
        
            read_data[0] = '\0';
            GetCtrlVal (panel_handle, SERIAL_READ_COUNT, &read_cnt);
            GetCtrlIndex (panel_handle, SERIAL_READTERM, &read_term_index);
          
               bytes_read = ComRdTerm (1, read_data, read_cnt,2);
            
            
            
            CopyString (tbox_read_data, 0, read_data, 0, bytes_read);
            SetCtrlVal (panel_handle, SERIAL_TBOX_READ, tbox_read_data);
            RS232Error = ReturnRS232Err ();
            if (RS232Error)
                DisplayRS232Error ();
                
                break;
         
            SetCtrlAttribute(panel_handle,SERIAL_TIMER,ATTR_ENABLED,1); 
            
            break;
        case EVENT_RIGHT_CLICK :
            break;
        }
    return 0;
}


int CVICALLBACK InputQCallBack (int panel, int control, int event,
                                void *callbackData, int eventData1,
                                int eventData2)
{
    if (event == EVENT_RIGHT_CLICK)
        DisplayHelp (InputqHelp);
    return 0;
}


int CVICALLBACK QuitCallBack (int panel, int control, int event,
                              void *callbackData, int eventData1,
                              int eventData2)
{	 int status=0;
    switch (event)
        {
        case EVENT_COMMIT :
        
        
        if (port_open)
                {
                outqlen = GetOutQLen (comport);
                if (outqlen > 0)
                    {
                    MessagePopup ("RS232 Message", "The output queue has\n"
                                    "data in it. Wait for device to receive\n"
                                    "the data or flush the queue.\n");
                    break;
                    }
                RS232Error = CloseCom (comport);
                if (RS232Error)
                    DisplayRS232Error ();
                }
            QuitUserInterface (0);
            break;
        case EVENT_RIGHT_CLICK :
            DisplayHelp (QuitHelp);
            break;
        }
    return 0;
}

int CVICALLBACK TIMER (int panel, int control, int event,
		void *callbackData, int eventData1, int eventData2)
{	
	switch (event)
		{
		case EVENT_TIMER_TICK:
		
		
		
		GetCtrlVal(panel_handle,SERIAL_TBOX_READ,tbox_read_data);
		CopyString (tbox_read_data, 0, read_data, 0, bytes_read);
        SetCtrlVal (panel_handle, SERIAL_TBOX_READ, tbox_read_data);
        Scan(read_data,"%5000f>%f",&torque);
        Scan(read_data,"%5000f>%f",&rpm);
        SetCtrlVal(panel_handle,SERIAL_TORQUE,torque);
        SetCtrlVal(panel_handle,SERIAL_RPM,rpm);
 
		break;
		
		
         }
	return 0;
}

int CVICALLBACK STOPBUTTON (int panel, int control, int event,
		void *callbackData, int eventData1, int eventData2)
{
	switch (event)
		{
		case EVENT_COMMIT:
		
		
		SetCtrlAttribute(panel_handle,SERIAL_TIMER,ATTR_ENABLED,0);
		   

			break;
		}
	return 0;
}

int CVICALLBACK TORQUE (int panel, int control, int event,
		void *callbackData, int eventData1, int eventData2)
{
	switch (event)
		{
		case EVENT_COMMIT:

			break;
		}
	return 0;
}

int CVICALLBACK RPM (int panel, int control, int event,
		void *callbackData, int eventData1, int eventData2)
{
	switch (event)
		{
		case EVENT_COMMIT:

			break;
		}
	return 0;
}

 

0 Kudos
Message 25 of 47
(3,061 Views)

Hi,

 

You wrote that Hyperterminal can successfully display the sensor output, is that still true?

 

If so, open Hyperterminal, adjust and connect to your COM port and after you see data coming in, go to the menu and select Transfer > Capture Text...

Type in a file path like c:\sensor.txt and hit Start.

 

Wait for some time (~1 minute) so that the file accumulates some data in it, then go to menu again and select Transfer > Capture Text > Stop 

Then send the file to the forum, so that we can see exactly how the data is formatted.

 Also do not forget to add the communication parameters (port number, baud, parity, stop bits) to your post.

 

After you do that I will write a small, simple application for you which reads the incoming stream and displays the values on the screen.

Then you can add the Excel related part by yourself.

 

It will be much easier and quicker for everybody 😉

S. Eren BALCI
IMESTEK
Message 26 of 47
(3,077 Views)

@ebalci: That's a good suggestion: at least we can understand what the instrument is actually sending, which is not clear up to now. Nevertheless, I prefer to explain some concept rather than coding myself: what one learn by thinking and studying will be in his assets for the life.

 

@vishaInit93: Some suggestions on your code

 

You are still not using the timer to read. I already told you to move the reading code (to be clear: ComRdTerm) into the timer callback, so That it is executed periodically.

 

I don't understand your scanning function: see the example String to real, skipping over non-numeric characters in the string

 

What are trying to do in the timer callback by reading the text box and appending the string untouched to it again?



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 27 of 47
(3,061 Views)

heyy, Thanks for your help the data is coming in the format like:-

COM PORT number=1

baud=9600

parity=NO

stop bit=1

T,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003

 

 

0 Kudos
Message 28 of 47
(3,031 Views)

heyy thanks for your help the data is coming like in this format:-

port number-1

baud-9600 bps

parity-NO

stop bits-1

 

T,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003
S2,NT,+0000000
S1,NT,-003.003

 

 

0 Kudos
Message 29 of 47
(3,023 Views)

hey, I tried to move reading code (ComRdTerm) into the timer callback but it always shows error that port is not open but it works proper (means not showing error) when I just use this in a read callback function.

0 Kudos
Message 30 of 47
(3,002 Views)