Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > General Electronics Chat


General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion?

Reply
 
Tools
Old 21st April 2006, 09:10 AM   #1
Default rs232 problem

i had write a vb program that can receive serial data, now i want to display the data at text box and within 10 lines then save it as text file, can anyone guide me??? thank
handsprince is offline  
Old 21st April 2006, 09:13 AM   #2
Default Re: rs232 problem

Quote:
Originally Posted by handsprince
i had write a vb program that can receive serial data, now i want to display the data at text box and within 10 lines then save it as text file, can anyone guide me??? thank
Check the mscomm component.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 21st April 2006, 11:22 AM   #3
Default

thank for your reply Nigel, i had wrote the vb program, my program can receive the serial data and display it . how can i make my program to auto save every 10 receive data into a text file.thank
handsprince is offline  
Old 21st April 2006, 11:38 AM   #4
Default

Quote:
Originally Posted by handsprince
thank for your reply Nigel, i had wrote the vb program, my program can receive the serial data and display it . how can i make my program to auto save every 10 receive data into a text file.thank
How about a timer component?, or counting the data then saving it?.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 21st April 2006, 01:20 PM   #5
Default

Quote:
Originally Posted by handsprince
thank for your reply Nigel, i had wrote the vb program, my program can receive the serial data and display it . how can i make my program to auto save every 10 receive data into a text file.thank
no problem at all.. y can't u count the received data .? i presume u know how to open a file (or is that the question ops: ?) it would be better to buffer the entire data first (for 10 receives) then flush them to file , rather that (opennig and ) writing at each receive.
__________________
Gods own Country
Incredible !ndia

www.flickr.com/photos/_akg/

"Give a man a fish, and he will eat for a day. Teach that man to fish, and he will eat for a lifetime."
akg is offline  
Old 21st April 2006, 05:25 PM   #6
Default

thank you akg, now my program is display the receive data on a label. and now i want to change it to display on text box and save the it as a textfile. what can i do???
handsprince is offline  
Old 21st April 2006, 06:24 PM   #7
Default

If your are having trouble with VB, maybe look at powerbasic.com, the PC/CC program is more like a DOS console program.
mramos1 is offline  
Old 22nd April 2006, 11:02 AM   #8
Default

Quote:
Originally Posted by handsprince
thank you akg, now my program is display the receive data on a label. and now i want to change it to display on text box and save the it as a textfile. what can i do???
not clear what u intend ..
replace label1.text to text1.txt
the file open command is like file number = Open <filename> <filemode> , u may have to refer msdn
__________________
Gods own Country
Incredible !ndia

www.flickr.com/photos/_akg/

"Give a man a fish, and he will eat for a day. Teach that man to fish, and he will eat for a lifetime."
akg is offline  
Old 23rd April 2006, 01:04 PM   #9
Default

receiving is as simple as (taken from working program):

Code:
Private Sub MSComm1_OnComm()
  Text1.Text = Text1.Text + MSComm1.Input
End Sub
but the most common problem is that people forget to change Rtreshhold to 1. Default value of 0 means no received characters would be returned to program. To change this setting go to MSComm properties...
panic mode is offline  
Reply

Tags
problem, rs232

Thread Tools
Display Modes




All times are GMT. The time now is 12:46 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker