LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

To transfer data via RS 232 port & perform read/ write to file automatically

I'm a student currently doing my B.Tech (Enginering) project.
 
I'm new to the worldd of Labview
 
Kindly help me in "How to a) extract data from a text file in the PC & transfer it via RS232 to a microcontroller
                                           b) Recieve data from a microcontroller & store it in a text file "
 
The above procedures must be done automatically....ie. once the program is executed, no manual intervention is allowed
 
Kindly help me as i'm new to LABVIEW
 
Rgds
 
Krishnakumar G
0 Kudos
Message 1 of 4
(3,332 Views)
I am not going to write the VI for you becuase it should nto take too long to develop.  Jsut take it in baby steps.  Determine what code you need for you microcontroller (what microcontroller are you using, is there a forum for that microcoroller that may have some code on how to communicate via rs232), look at the examples shipped with labview on serial communication (there are a number of them, simple and complex but not hard to figure out), and then look at the examples to read/write from a text file.  Then you can start combing them all into one application.

After you do that and start a VI, then come back and post your question/problems you are having with the VI and we can help you further.  The forums are a great place to get help, I use them all the time, but you cant have everyone write the whole code for you, plus you learn it a lot better when you try it urself (and it will help understand parts of code that the LV community creates for you if you need it).

Kenny


Kenny

Message 2 of 4
(3,325 Views)

Thank you sir for your valuable advice.

I tried using the example & "getting started manuals". I managed to read data from a text file to a string control.

While trying to write to a text file from a string control more than once, the program warns me "whether i need to replace my file"

For my project, the entire writing process should be automatic...the program must be able to automatically write data to a text file (replacing the old contents every time).

 

 

0 Kudos
Message 3 of 4
(3,288 Views)


Krishnakumar wrote:

For my project, the entire writing process should be automatic...the program must be able to automatically write data to a text file (replacing the old contents every time).



The VI "kit" available in this post will do what you ask. Some assembly required. Smiley Very Happy
(and the rest of the thread may be useful when it comes to doing the RS232 communications)
0 Kudos
Message 4 of 4
(3,276 Views)