hello to every one

im making a GUI in labview and i want to take serial data in labview im new in labview so plz help me

thanks for replyng

thanks 4 replyng i take a simple example com port read and write its working & i undertstand how its work but i face a little problem i hope u solve it
1) VISA: (Hex 0xBFFF0015) Timeout expired before operation completed.------------?????
2) how to segregate the input coming data from microcontroller which sends the 8-bit data. i send the code of my controller can u tell me how to seprate the sensing data in lab view to show the respective behaviour


#if defined(__PCM__)
#include <16F877.h>
#fuses XT,NOWDT,NOPROTECT,NOLVP
#use delay(clock=4000000)
#use rs232(baud=300, xmit=PIN_C6, rcv=PIN_C7)
#endif

void main() {
long a1,a2,a3;
long c2,c3;
//int32 x,u;
setup_port_a( ALL_ANALOG );
setup_adc( ADC_CLOCK_INTERNAL );
a1=0;
a2=0;
a3=0;
do {
//temperature data
set_adc_channel(0);
delay_us(10);
a1 = Read_ADC();
delay_us(10);
delay_us(5);
printf("temp%03Lu",a1);
if(a1 <= 35)
{ output_high(PIN_B1);
output_low(PIN_B0);
}
else if(a1 > 35)
{ output_low(PIN_B1);
output_high(PIN_B0);
}
//Humidity data
set_adc_channel(1);
delay_us(10);
a2 = Read_ADC();
c2 = a2-42;
delay_us(5);
printf("humd%03Lu",c2);
if(c2 <= 40)
{ output_high(PIN_B3);
output_low(PIN_B2);
}
else if(c2 > 40)
{ output_low(PIN_B3);
output_high(PIN_B2);
}
//Level data
set_adc_channel(2);
delay_us(10);
a3 = Read_ADC();
c3 = a3-27;
delay_us(5);
printf("leve%03Lu",c3);
if(c3 <= 25)
{ output_high(PIN_B5);
output_low(PIN_B4);
}
else if(c3 > 25)
{ output_low(PIN_B5);
output_high(PIN_B4);
}

} while (TRUE); //end do
} // end main


plz reply & thanks in advance

thanks 4 replyng i take a simple example com port read and write its working & i undertstand how its work but i face a little problem i hope u solve it
1) VISA: (Hex 0xBFFF0015) Timeout expired before operation completed.------------?????
2) how to segregate the input coming data from microcontroller which sends the 8-bit data. i send the code of my controller can u tell me how to seprate the sensing data in lab view to show the respective behaviour

#if defined(__PCM__) 
#include <16F877.h> 
#fuses XT,NOWDT,NOPROTECT,NOLVP 
#use delay(clock=4000000) 
#use rs232(baud=300, xmit=PIN_C6, rcv=PIN_C7)   
#endif 
 
void main() { 
   long a1,a2,a3; 
   long c2,c3; 
   //int32 x,u; 
   setup_port_a( ALL_ANALOG ); 
   setup_adc( ADC_CLOCK_INTERNAL ); 
    a1=0; 
    a2=0; 
    a3=0; 
do { 
   //temperature data  
       set_adc_channel(0); 
       delay_us(10); 
       a1 = Read_ADC(); 
       delay_us(10); 
       delay_us(5); 
       printf("temp%03Lu",a1); 
       if(a1 <= 35) 
       { output_high(PIN_B1); 
       output_low(PIN_B0); 
       } 
  else if(a1 > 35) 
       { output_low(PIN_B1); 
       output_high(PIN_B0); 
       }
//Humidity data 
      set_adc_channel(1); 
      delay_us(10); 
      a2 = Read_ADC(); 
      c2 = a2-42; 
      delay_us(5); 
      printf("humd%03Lu",c2); 
      if(c2 <= 40) 
      { output_high(PIN_B3); 
      output_low(PIN_B2); 
      } 
     else if(c2 > 40) 
      { output_low(PIN_B3); 
      output_high(PIN_B2); 
      } 
  //Level data 
      set_adc_channel(2); 
      delay_us(10); 
      a3 = Read_ADC(); 
    c3 = a3-27; 
      delay_us(5); 
      printf("leve%03Lu",c3); 
      if(c3 <= 25) 
      { output_high(PIN_B5); 
      output_low(PIN_B4); 
      } 
     else if(c3 > 25) 
    { output_low(PIN_B5); 
       output_high(PIN_B4); 
       } 
 
  
 
   } while (TRUE);      //end do 
}     // end main

plz reply & thanks in advance

This article has been dead for over six months. Start a new discussion instead.