06-25-2012 05:13 AM
Hello everyone,
I need to send data continuously using serial communication to microcontroller for a user specified time...Any suggestions plzzzzz??????
Solved! Go to Solution.
06-25-2012 08:25 AM
Put the transmission of data in a WHILE loop
06-25-2012 09:26 AM
How much code have you written do far?
Have you got anything working? Your question is so broad that it is hard to suggest anything...
Did you try communicating with the microcontroller using a terminal emulator (ie: HyperTerm).?
Have you looked at the serial communication examples?
There are litterally 10000 posts of this forum with examples for using LabVIEW with the serial port.
And what do you mean by continuously send data to the microcontroller? What time intervals is the data sent? What size? Termination? What data rate? etc?
You need to provide details...
06-25-2012 11:18 PM
I need to transmit characters a,b,c,d depending on what user selects an option in the front panel..The user will enter a time according to his wish...i need to send that character continuously for that fix time and after that it should stop sending that character...Any suggestions????
06-25-2012 11:46 PM
Well, you need to open your VISA connection for one. Then you will need to add a loop. You will also need a Wait inside the loop to control the delay and timing. An alternative would be to use a timed loop.
06-26-2012 04:16 AM
HI Maati
Use the example VIs. Basic Serial Read Write.VI should help you.
Use a timed loop to set the period at which the read write should happen.
06-26-2012 07:47 AM
Or go to this link as it provides answers to many questions about serial communication:
It's an old post, but still usefull. Maybe I should take the time to write a nugget about it.
06-26-2012 07:50 AM - edited 06-26-2012 07:52 AM
Here's one that I like and is easy to modify. You can copy the snippet directly into your block diagram:
http://forums.ni.com/t5/LabVIEW/Reading-time-interval-of-serial-port/m-p/1529140#M568806
In case I didn't provide this link, it has some interesting stuff...
http://forums.ni.com/t5/LabVIEW/Change-Baud-Rate/m-p/276265#M146432