LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Testing Code

Hi Al S I got A question. Im testing one of the comports on my computer to the loop back test with my code, onces it reads the data the code stops on the standard I/o

 

screen. Do you have any ideal why?

 

Also I have a LED indicator and for some reason its not changing colors when im doing my loop back test. I have debug it. but its not seeming to work for some reason.

 

could i get some assistance. 

 

 

Im also receiving a NON-FATAL RUN-TIME ERROR:   "chiller.c", line 320, col 30, thread id 0x00001460:   Library function error (return value == -99 [0xffffff9d]). I/O operation timed out
 

you will see in the attachment below
0 Kudos
Message 1 of 6
(3,647 Views)

Darnell:

 

Your post did not include the file which generated the error: chiller.c 

0 Kudos
Message 2 of 6
(3,637 Views)

ok i reposted

 

Hi Al S I got A question. Im testing one of the comports on my computer to the loop back test with my code, onces it reads the data the code stops on the standard I/o

 

screen. Do you have any ideal why?

 

Also I have a LED indicator and for some reason its not changing colors when im doing my loop back test. I have debug it. but its not seeming to work for some reason.

 

could i get some assistance. 

 

 

Im also receiving a NON-FATAL RUN-TIME ERROR:   "chiller.c", line 320, col 30, thread id 0x00001460:   Library function error (return value == -99 [0xffffff9d]). I/O operation timed out
 

you will see in the attachment below
0 Kudos
Message 3 of 6
(3,627 Views)

ok SKIP MESSAGE THREE,  I FIX THAT PROBLEM. MY NEXT THAT I ENCOUNTER IS ON MY GUI I HAVE A SET POINT, BASICALLY IM TRYING TO ENTER THE TEMPERATURE

 

AND AFTER I ENTER THE TEMPERATURE I WANT THE TEMP TO DISPLAY ALONG WITH MY SP=\r.  remember im trying to set the temp to the instument.

 

so from my gui when i enter in the temp ,in my printf statement it suppose to print temperature i enter along with SP=\r. 

 

you will see in the attachment. im just doing the loopbacl right now before get to the instrument.

0 Kudos
Message 4 of 6
(3,621 Views)

ok SKIP MESSAGE THREE,  I FIX THAT PROBLEM. MY NEXT THAT I ENCOUNTER IS ON MY GUI I HAVE A SET POINT, BASICALLY IM TRYING TO ENTER THE TEMPERATURE

 

AND AFTER I ENTER THE TEMPERATURE I WANT THE TEMP TO DISPLAY ALONG WITH MY SP=\r.  remember im trying to set the temp to the instument.

 

so from my gui when i enter in the temp ,in my printf statement it suppose to print temperature i enter along with SP=\r. 

 

you will see in the attachment. im just doing the loopbacl right now before get to the instrument.

0 Kudos
Message 5 of 6
(3,620 Views)

AL S i complish it last nite , i had to put in some time last nite and just break everything down.

 

I have it to where if i enter a number from the gui it will return SP=(any number i set).

my question is ,is this the way to do it where in i should get a response back. is the instrument going to recognize how i got i

got set up ?is this the correct below. just need a little assistance.

 

//CopyString (tbox_read_data, 0, send_data, 0, temp_setting);
// printf("%s=%d",tbox_read_data,temp_setting);
        

 

 

         int TEMP_SETTING (int in,int out)
{
   
int b ;
int temp_setting=0;  //atoi(send_data);
char send_data[1000]={0};

                        
             OpenComConfig (1, "COM4", baudrate, parity, databits, stopbits, inputq, outputq); //RS232 CMD


           
            GetCtrlVal (chiller, in, &temp_setting);
           
            //send_data[temp_setting]='\r';
           
            //temp_setting=StringLength(send_data);
            strcat(send_data,"\r");

           
            bytes_sent=ComWrt(1,"SP=",4);           
           
                   
        
                
             bytes_read = ComRd (1, send_data, 4);
                  if (bytes_read<0)
                {
                    bytes_read=temp_setting;
                strcat(send_data,"\r");
                }
                    

 

           CopyString (tbox_read_data, 0, send_data, 0, temp_setting);
            printf("%s=%d",tbox_read_data,temp_setting);
       
           printf("%s""%d",tbox_read_data,temp_setting);

           
            //break;
           
            //case EVENT_RIGHT_CLICK:
               
                           
           
    return 0;           
               }

0 Kudos
Message 6 of 6
(3,600 Views)