Posted 17 August 2010 - 01:48 PM
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
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.
Posted 18 January 2011 - 12:20 PM
I will post my code here when the program will be ready (I still have some bugs in my code).
Posted 20 January 2011 - 10:18 AM
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
Posted 08 February 2011 - 07:13 AM
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 Error
Posted 04 December 2011 - 05:16 AM
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?
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.
Posted 08 December 2011 - 04:36 AM
Iíve been using your tool PCCom.SerialCommunication Version 220.127.116.11
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.
Posted 05 January 2012 - 11:07 AM
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.
<Removed email per site policy>
This post has been edited by macosxnerd101: 22 January 2012 - 11:35 AM
Posted 22 January 2012 - 06:30 AM
hi you can download it from this link:
search page for:
Posted 08 March 2012 - 03:03 PM
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,