Ok I uploaded the project again so let's see if this resolves the issue. It was created with WinRar (as was the first one) and I was able to download and open it.
Serial Port Communication in VB.Net
#33 Guest_Babdoo*
Posted 17 August 2010 - 01:48 PM
Great tutorial! Thanks a lot!!
I am not able to open the file though. I am using winrar to extract, but the extracted file is too small and doesn't open in VB. Can you please re-upload it or email it to me at <email snip>. Would really appreciate it.
I am not able to open the file though. I am using winrar to extract, but the extracted file is too small and doesn't open in VB. Can you please re-upload it or email it to me at <email snip>. Would really appreciate it.
#34 Guest_Don Pierman*
Posted 03 November 2010 - 11:29 AM
Thanks so much for the very thorough tutorial. I got the files unzipped OK and the duplicate PCCom deleted The conversion to VB.Net2010 indicated it converted with no problem but when I run it it does not show that it is receiving data. When I close the Comm port the Open button is no longer available, my baud rate appears twice and the default port number is now visible.
My settings are OK when I use RealTerm and data in byte (Hex) format comes through so I am sure the port is active.
Any advice would be greatly appreciated.
Thanks,
Don Pierman
My settings are OK when I use RealTerm and data in byte (Hex) format comes through so I am sure the port is active.
Any advice would be greatly appreciated.
Thanks,
Don Pierman
#35 Guest_Abhishek Singh*
Posted 07 January 2011 - 10:47 AM
U r the man,
Owsam code ,
I need Exactly 1,
I learn lots of thing from it,
i salute u dear.
Owsam code ,
I need Exactly 1,
I learn lots of thing from it,
i salute u dear.
#36 Guest_Andrew*
Posted 18 January 2011 - 12:20 PM
Thank you very much for this example. I have to do a project for university and I must control a stepper motor, but I didn't know what I am doing wrong. Now I saw where I made the mistake (I am trying for more than a week to read the data from a microcontroller, but thanks to your example I solved)
Thank you!
I will post my code here when the program will be ready (I still have some bugs in my code).
Thank you!
I will post my code here when the program will be ready (I still have some bugs in my code).
#37 Guest_Oriol*
Posted 20 January 2011 - 10:18 AM
First of all, thanks for this GREAT code.
This is for those out there that have the same problem as i had.
To prevent the Richtextbox from loosing it's content everytime a message is received change the DoDisplay Sub with the following:
Cheers
This is for those out there that have the same problem as i had.
To prevent the Richtextbox from loosing it's content everytime a message is received change the DoDisplay Sub with the following:
Private Sub DoDisplay(ByVal sender As Object, ByVal e As EventArgs)
_displaywindow.Selectionstart = Len(_displaywindow.Text)
_displaywindow.SelectionLength = 0
_displaywindow.SelectionFont = New Font(_displaywindow.SelectionFont, FontStyle.Bold)
_displaywindow.SelectionColor = MessageColor(CType(_type, Integer))
_displaywindow.AppendText(_msg)
_displaywindow.ScrollToCaret()
End Sub
Cheers
#38 Guest_gpaska*
Posted 08 February 2011 - 07:13 AM
Is it possible to read image data from the port?
I managed to
- Establish a connection with the port
- Open it
- Send message to the barcode scanner to capture an image
- Return the data on the port
- Read the port data into a byte array
but now i'm stack i can re-create the image (it's a bitmap) to save it or display it.
Anyone that can give a hand?
I managed to
- Establish a connection with the port
- Open it
- Send message to the barcode scanner to capture an image
- Return the data on the port
- Read the port data into a byte array
but now i'm stack i can re-create the image (it's a bitmap) to save it or display it.
Anyone that can give a hand?
Dim img(SP.BytesToRead) As Byte
SP.Read(img, 0, img.Length)
Dim ms As New System.IO.MemoryStream
ms.Write(img, 0, img.Length)
Dim bmp = New Bitmap(ms) //Parameter is not valid Erro
r
#39 Guest_Ava Ellyza*
Posted 27 February 2011 - 07:18 AM
Can you help me about how to send/receive MMS with vb.net
Thx
Thx
#40
Posted 04 December 2011 - 05:16 AM
SJH, on 28 July 2008 - 01:47 PM, said:
Thanks for your excellent tutorial on serial communications in VB.NET.
I wrote my own before coming across yours and while they both run, each has the same problem handling continuous data, i.e.- dropped characters (six to eight) about every 128 or so received.
Read somewhere that this was a bug in .Net. now going back to 2005 version. Have you heard anything?
/Steve
I wrote my own before coming across yours and while they both run, each has the same problem handling continuous data, i.e.- dropped characters (six to eight) about every 128 or so received.
Read somewhere that this was a bug in .Net. now going back to 2005 version. Have you heard anything?
/Steve
Thanks for your excellent discussion and sample code.
Just wondering if this is indeed an issue.
I've opened your application in VS 2010 I am reading a serial port that is attached to a set of scales. It is generating a continuous stream of data. It seems that it is dropping characters. I saw this comment and i thought I'd ask if it had been identified as an issue.
Thanks
#41
Posted 08 December 2011 - 04:36 AM
Greetings Richard
I’ve been using your tool PCCom.SerialCommunication Version 1.0.0.0
It’s been a great help in being able to understand how to read data from the serial port.
I’ve got it working and the data is fine but I would like to add some additional functionality which would include a graphing function that would show the progress of data being supplied from the serial port.
My son is an engineer and wants to measure and control the flow of fibreglass resin from a storage vessel that is opaque and they cannot see the level, however they can weigh it and based on the weight of the vessel they can determine the volume of fluid left.
I am trying to add another form to your application but no matter what I do I cannot add the Microsoft chart control to it. It is dimmed out.
If I create a new application I can add a chart to it so the functionality is available within my vs 2010 environment.
I’ve quite bit of experience with VB6 but have only just started experimenting with visual studio 2010
I was just wondering if anyone would be so kind as to point me in a direction that might solve this issue.
Thanks
I’ve been using your tool PCCom.SerialCommunication Version 1.0.0.0
It’s been a great help in being able to understand how to read data from the serial port.
I’ve got it working and the data is fine but I would like to add some additional functionality which would include a graphing function that would show the progress of data being supplied from the serial port.
My son is an engineer and wants to measure and control the flow of fibreglass resin from a storage vessel that is opaque and they cannot see the level, however they can weigh it and based on the weight of the vessel they can determine the volume of fluid left.
I am trying to add another form to your application but no matter what I do I cannot add the Microsoft chart control to it. It is dimmed out.
If I create a new application I can add a chart to it so the functionality is available within my vs 2010 environment.
I’ve quite bit of experience with VB6 but have only just started experimenting with visual studio 2010
I was just wondering if anyone would be so kind as to point me in a direction that might solve this issue.
Thanks
#42
Posted 05 January 2012 - 11:07 AM
I downloaded your PCCOM.SerialCommunications Version 1.0.0.0
I imported it into Microsoft Studio Version 10.
Other than one syntax error, it loaded and ran. I connected my PC to another PC using a null modem cable. Using hyperterminal I can go to either keyboard, type and see the characters on the other PC.
Using your program on my PC and hyperterminal on the other, I can use your SEND button and send text to the other PC and hyperterminal will display the characters. I cannot send from hyperterminal and see them in your program.
I noticed the comport_DatReceived is a Private Sub and assume that if characters where in the buffer, they would display somewhere via the DisplayData routine. I guess the ‘e’ is an event handler of some kind.
In debug mode, the DataReceived routine does not appear to get called. Can someone get me on the right track?
The code I am developing will need to keep reading in small chunks of data from the comm. port and send some back eventually. The PCCOM code looks fantastic, I just need to get it working on my PC.
HELP !
Thank you,
Rob Sobol
<Removed email per site policy>
I imported it into Microsoft Studio Version 10.
Other than one syntax error, it loaded and ran. I connected my PC to another PC using a null modem cable. Using hyperterminal I can go to either keyboard, type and see the characters on the other PC.
Using your program on my PC and hyperterminal on the other, I can use your SEND button and send text to the other PC and hyperterminal will display the characters. I cannot send from hyperterminal and see them in your program.
I noticed the comport_DatReceived is a Private Sub and assume that if characters where in the buffer, they would display somewhere via the DisplayData routine. I guess the ‘e’ is an event handler of some kind.
In debug mode, the DataReceived routine does not appear to get called. Can someone get me on the right track?
The code I am developing will need to keep reading in small chunks of data from the comm. port and send some back eventually. The PCCOM code looks fantastic, I just need to get it working on my PC.
HELP !
Thank you,
Rob Sobol
<Removed email per site policy>
This post has been edited by macosxnerd101: 22 January 2012 - 11:35 AM
#43
Posted 22 January 2012 - 06:30 AM
Louisda16th, on 18 November 2007 - 05:32 AM, said:
Great tutorial PsychoCoder!
Thanks. Just one tiny problem. For some reason, I cannot download the attachment.
hi you can download it from this link:
http://forum.masterd...luetooth-51982/
search page for:
SerialPortCommunication_VBNet2.zip
#44
Posted 08 March 2012 - 03:03 PM
Hi,
First off thanks to all that contribute to this site and sites like these. As a casual user trying to learn a new skill, it is invaluable to have as a resource. Kudos.
Now, I am brand new to writing programs on Windows, and so I am trying out VB.NET via Visual Basic Express. To that end, I borrowed the Serial Comm code that PsychoCoder posted as a starting point for my program. It worked very well, thank you very much.
Basically, I am using it to communicate with a small PIC processor via a serial port. In the package, PsychoCoder creates a class to handle the comm that seems to pipe the output from the stream buffer to a control (textbox). From what little i know of serial comm, that clears the buffer. So the data only exists at that point as line in the text box. I would like to get the data first and then let it display. Not sure how to go about that without breaking the class definition.
Essentially, I send out a command to my PIC, it responds with a status string, I want to capture that to act on, and then display what came in. Hoping there is something I may not know about that can help.
Thanks in advance,
EvoDave
www.evodesign.com
First off thanks to all that contribute to this site and sites like these. As a casual user trying to learn a new skill, it is invaluable to have as a resource. Kudos.
Now, I am brand new to writing programs on Windows, and so I am trying out VB.NET via Visual Basic Express. To that end, I borrowed the Serial Comm code that PsychoCoder posted as a starting point for my program. It worked very well, thank you very much.
Basically, I am using it to communicate with a small PIC processor via a serial port. In the package, PsychoCoder creates a class to handle the comm that seems to pipe the output from the stream buffer to a control (textbox). From what little i know of serial comm, that clears the buffer. So the data only exists at that point as line in the text box. I would like to get the data first and then let it display. Not sure how to go about that without breaking the class definition.
Essentially, I send out a command to my PIC, it responds with a status string, I want to capture that to act on, and then display what came in. Hoping there is something I may not know about that can help.
Thanks in advance,
EvoDave
www.evodesign.com
|
|







MultiQuote


|