LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Start an application after receiving a character sent by a PIC microcontroller

Hello everyone,
I need your help.
I'd like my LV application to start after it had received the character AB sent by a microcontroller.
I've controlled the output of the microcontroller (oscilloscope) and it's endeed sending the right character.
After my application started I'd like it to send the character BC to the microcontroller.
 
Please could you have a look at my code (attachment). Is there anything wrong?  Any suggestion?
 
Thanks for your help.
Kabanga
0 Kudos
Message 1 of 8
(3,325 Views)

Hi Kabanga,

what do you thing doesn´t work? Did you check the output of your read serial function? Could it be that there is a carriage return line feed on the end of your received data?

Mike



Message Edited by MikeS81 on 04-10-2008 02:55 PM
0 Kudos
Message 2 of 8
(3,323 Views)
Hi!
   Sorry if I'm too naive, but how do you connect your Micro to LabView? Via RS232 port / UART? Have you put an interface circuit between 5V TTL (or 3.3 maybe) I/O of your micro and +12 V / -12 V RS232 interface to adapt levels?

   Right now I'm unable to analyze your code, so I'm guessing...

graziano
0 Kudos
Message 3 of 8
(3,321 Views)

Hi Mike

I don't know what is going wrong. Do you think I should disable the "Termination Char" of the "VISA Configure" ?

I thought there is something wrong with my code. I'm not experienced in LabView.

 

Hi Graziano,

yes there is an interface between  the microcontroller and  RS232.  This is a special electronic component that is called MAX232.

 

Best regards
Kabanga

0 Kudos
Message 4 of 8
(3,313 Views)
Hi Kabanga,
see the attached vi. You can check what you receive with it. Hope it helps.
Mike
0 Kudos
Message 5 of 8
(3,303 Views)
Hi Mike,
thanks a lot. That helped very much !!!!
The received data are saved in the array. That's great !!!
 
Best regards
Kabanga
0 Kudos
Message 6 of 8
(3,298 Views)
Note: The VISA Configure Serial Port should be placed outside the loop. There is little poing in configuring the serial point each time you perform the read. That will simply slow things down.
0 Kudos
Message 7 of 8
(3,292 Views)
thanks for the tip !!!
 
Kabanga
0 Kudos
Message 8 of 8
(3,289 Views)