Reading Data From Serial Port For Barcode Scanner

Aug 28, 2009

I am developing a Winforms application which read barcode from barcode scanner. It's an Human wedge scanner. This will work if I placed the cursor in any textbox or notepad. But i don't want like that. Reason is that it's cordless scanner. If some want to scan some thing in store they will move around, so there is possibility of screen saver coming or system gets locked if that happens the barcodes wont capture, but the user who is scanning the barcodes won't know this thing.

So i am reading the data using serial port communication and my scanner sending the data character by character, Not a whole string. so for that I wrote the following code. Thsi code will works if i am writing to any textbox. But it is not working if want to store it in any global string. Only first character is storing in the string. The below code is working perfectly fine. but if want to save the string in Global String variable instaed of textbox the only first character in the string is storing.

[Code]...

View 1 Replies


ADVERTISEMENT

Serial Port Barcode Scanner Delegate Sub Firing Twice Per Barcode Scan?

Aug 2, 2010

I am using Richard L. Grier's Enhanced Serial Port dll to read input from a serial port barcode scanner I notice that the datareceived event fires only once per barcode scan, but the delegate sub fires twice per barcode scan. Once for 1st half of Barcode , 2nd for 2nd part of barcode This makes it hard to capture the full barcode so it can be passed to routines in my vb.net 2008 windows application In Richard's example 'Test Enhanced Port' program he sends it to a textbox using .selectedtext and it works fine Richards Delegate code ......................

Public Delegate Sub DisplayData(ByVal Buffer As String)
'This delegate routine marshals receive data from the receive thread context DataReceived to the Windows Form STAThread context
Private Shared Sub Display(ByVal Buffer As String)

[code]....

I am trying to set a variable to the full barcode to pass to routines, instead of writing to a textbox but am not having any success

View 8 Replies

Communications :: Serial Port Input For Barcode Scanner?

Nov 11, 2008

i need to create an application where input are to be received by the barcode scanner.However, i am not suppose to use the textbox to do so. However i need to use the serial port to do so. Any one know how am i able to do that?

View 1 Replies

Reading Barcode Scanner Data?

Mar 11, 2010

I'm building an application that reads barcode scanning data into multiple forms and textboxes. At the moment, to handle that data I have created a large nested if statement that checks to see which object has focus so that the scanned data is placed there and focus moves down to the next object:

Private Sub HandleData(ByVal TheReaderData As Symbol.Barcode.ReaderData)
'Scanning Data into frmGetCount
If frmName.Name = "frmGetCount" Then

[code].....

This is just for one of 5 forms I am currently developing. I am looking for a way to make this code much more dynamic and re-usable by removing the hard-coded objects name

View 2 Replies

Read The Data From Barcode Weight Scales By Serial Port And TcpIp Port?

Nov 27, 2010

I'm mohammed from Oman ,I'm visual studio.net programmer How I can Read the Data From Barcode Weight scales By Serial port and TcpIp port

View 7 Replies

Reading Serial Port Read Data From Serial Port?

Aug 16, 2011

i am a absolute beginner and i want to use vb to receive data from micro controller through serial port using rs232 standards, i found this code to receive the data serially, can any one tell me where should i paste this code, so that the data received will be displayed in message box.Private Sub DataReceived(ByVal sender As System.Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) HandlesSerialPort1.DataReceived

[Code]...

View 9 Replies

Read Barcode Using A Scanner Through A Serial Input(com1)

May 10, 2010

I'm trying to read barcode using a scanner through a serial input(com1). Below you will see the code I'm working with, when I scan the barcode the code goes through the datareceived event and doesnt add the read barcode to the listbox. However when I use hyperterminal and scan the barcode it reads and displays the barcode.

[Code]....

View 4 Replies

USB Barcode Scanner Reading?

Oct 4, 2010

We are using USB barcode scanner to scan material barcode labels. These labels are from our vendors. We does not have control over the label generation. We are using USB barcode scanner for scanning purpose. We want to capture USB barcode scanner output. Normally the scanner returns output in the place holder in which the cursor present.But we do not put writable text box for the cursor. Instead of write allowable text box we want to put locked or readonly text box in the screen and want to capture scanner value.How can we do?Assume that our barcode scanner does not support serial ports.

View 6 Replies

Forms :: Reading Barcode From Scanner

Nov 5, 2010

I want to use a barcode scanner to read barcode and appear in textbox. This is my first project involve barcode.

View 6 Replies

Application That Accept The Reading From Barcode Scanner ?

Feb 10, 2012

I would like to do the application that accept the reading from Barcode scanner. What barcode scanner I should use? And, vb.net can support on that and work well?

View 6 Replies

Reading Hex Data Through The Serial Port?

Oct 27, 2009

I am having a little trouble receiving data via the serial port. I can send just fine. I am using Serial Port object.

Basically my data expected is in the form of: [0x43 0x35 0x64 0x35...] broken up into bytes. I tried using the SerialPort.Read() function but can't get it to work.

View 8 Replies

IO - Reading Data From A Serial Port In VS2010

May 10, 2011

After searching around I am still having issues with reading data from a serial port in VB.Net/VS2010. I know the Serial Port works, I can write to the port fine but when reading from it, nothing happens. I have only been programming for the last 3 weeks so am still trying to get my head around it all.

[Code]...

View 1 Replies

Serial Data Port Reading From Swiping?

Nov 28, 2009

how to write a code for reading serial port using vb.net with the combination of c#.

Note : (Its just reading data from the swipe).

View 1 Replies

VS 2010 Reading Data From Com / Serial Port?

Apr 3, 2012

Private Sub receive_data(ByVal sender As System.Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived
Dim aBuffer(255) As Byte
Do While SerialPort1.BytesToRead > 0

[code]....

Basically, what I am trying to do is everytime I receive data from the serial port, I turn that data into an array (aBuffer) and I then call another sub using that info.The problem I'm having is that everytime I receive data, the array only fills up to the first 8 bytes! This isn't a problem when I receive smaller packets of 6 bytes but anything else gets chopped off.

What is really frustrating is that it seems quite fickle. I've read somewhere that this happens because the computer is handling the bytes received faster than they are being put in the buffer?? Not really sure but if I put a couple of breakpoints during debug, sometimes the array fills up correctly... Note the maximum size of any one incoming message would be 255 bytes.

View 4 Replies

VS 2010 Reading Hex Data From Serial Port

Apr 23, 2010

This is an amateur radio project. I have a TNC (modem) that receives a digital stream (AX.25) from my radio. The TNC decodes the AX.25 frames and translates them to KISS frames (the protocol used between the TNC and the PC, see documentation here: [URL] It sends the data as HEX values.

What I'm looking for on the serial stream is the beginning of a data frame marked by 0xC0 0x00 and ending with 0xC0. Should be easy. Using serialport.readbyte() I should get binary data that I can convert to hex and look for the beginning of a data frame and then convert the subsequent data to ascii, as it will be text from a chat session.

Just to try it out and see the raw data coming from the port, I use teraterm or realterm and capture the data and it's a mix of junk (control frames and what not) and valid text. When I display the same data in a text box in VB I get data that look like this:

[Code].....

View 5 Replies

Opening Serial Port And Reading Ok Response Data

Dec 21, 2010

Is there any other way to access a serial port using visual basic.net 2010? I followed the steps in this site, [URL] but I just got this output Open the serial port. Send the attention command to the modem. Wait for data to come back to the serial port... and stopped there. I can't get the Read the OK response data in the serial port. Close the serial port. And I was thinking, because it is very much easy to access serial port in vb6, so can I just use vb6 and then connect to visual basic.net? it is like a language inside a language.

View 3 Replies

Plot Graphic While Reading Data From Serial Port

Mar 24, 2012

Currently, I am using a VB.NET to read data from serial port. when i open the serial port, the data is read and plotting the graphic at the same time

View 2 Replies

Reading Serial Port - Cannot Get Read Data Back

Jan 13, 2009

Using 2008 VB.Net trying to do serial communications. I have a Scantron scanner I can send data to it, but I can not get read data back sent to my serial port. I have tried ReadLine, ReadByte, etc. but i'm not capturing anything, and I don't understand the DataReceived event. [Code]

View 15 Replies

VS 2008 Reading And Writing Data To A Serial Port

May 25, 2009

reading and writing data to a serial port. the settings for the port are correct (from manual of device):

[Code]...

View 1 Replies

Reading Data From Serial Port And Converting To Double Format?

Apr 3, 2012

I am using a VB.NET(VS2010) to read data from serial port. I have 8-bit data to collect through rs232. This data is represented numbers. What reading method should I use and how to convert it to double format?

View 3 Replies

Using Serial Port Scanner On Multiple Forms?

Aug 26, 2009

Currently the scanner is in a module (code below). I put it at that level because when I had it in a class and instantiated the class from the main form, no other forms except the main form would fire the DataReceived event. Well, unfortunately that's the case for the module-level as well.Here's the code for the Scanner:

Code:
Imports System.Threading
Imports System.IO.Ports

[code]......

View 6 Replies

VS 2010 - Reading Data From Serial Port And Outputting To Screen And Access Db?

May 1, 2011

I have conquered the problem of the database however what i need is the serial port data sent to a database and outputted on screen however i keep getting cross thread errors ..

Imports System.Data.OleDb
Imports System
Imports System.ComponentModel
Imports System.Threading

[code]....

View 3 Replies

Make A Program That Will Use A Barcode Scanner Well Ofcourse To Scan A Barcode

Nov 27, 2009

I am a student and I am about to make a program that will use a barcode scanner well ofcourse to scan a barcode. My problem is i don't know what library to use and what certain things i need to do so that when i am going to scan a barcode it'll be something like show it on a textbox and pull something from the database. i've actually research some. i've seen mscomm1 (not so sure about that) and POS for .net (haven't fully understood its use) were those will help me develop my program?i have a metrologic ms9520 Voyager barcode scanner. and i am going to create a program for it in vb2005.

View 1 Replies

Communications :: Rs232 Cr & Lf - Barcode Scanner That Is Sending The Software Data

Apr 26, 2011

Im using VB2008... Net framework 3.0. Basically I have a barcode scanner that is sending the software data...Everything is working fine if I interface the scanner as a keyboard wedge and set the scanner suffix as 'Enter'...In the software I have an event handler on keypress.down...

If keycode.Enter then
.....
.....
....
etc.

However as a RS232 interface I cant get the same result? Hyper terminal reads it perfectly. I've tried all the keypress options but it doesnt work (I assume because it's not actually a key press). when the textbox recieves the CR/LF from RS232? The scanner that does keyboard wedge interfacing is not an option as it is far too expensive for my project.

View 3 Replies

Reading From A Serial Port?

Feb 22, 2008

I am working on barcode reading software. Runs ok, but reads at the most 8 characters at a time. How can I get it to read the entire barcode rather than in pieces?

Here is a snippet of my code

Imports System.Data.SqlClient
Imports System.IO.Ports
Public Class Form1

[Code]....

View 4 Replies

Can't Open A Serial Port For Reading?

Aug 10, 2009

I am trying to open a GPS device on a serial port but no matter what I try I just keep getting an IOException. This is on a pocket PC BTW.

[Code]...

View 2 Replies

Communications :: Reading From Serial Port?

Dec 16, 2008

i am using serial communication to read from a plc.The plc will send a string :&H3A as a header byte then C(which is a variable that contains data)I want to read and mask out the header byte.I use the following code but cannot read anything.

Private Sub btnread_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnread.Click
Msg = SerialPort1.ReadExisting
count = Val(Mid(Msg, 1, 2))
Lblno.Text = count

[Code]...

View 1 Replies

Reading From Serial Port Into A String

Oct 22, 2009

For starters I'm using VB 2008 express edition.I have code that writes a string out of a serial port.My issue is that the machine sends data back and I don't know how to catch it.This is my latest attempt at creating an array of characters to create a string later but doesn't work.[code]

View 2 Replies

Reading Serial Port Using .net 2008?

Oct 2, 2011

I have microcontroller interfaced with serial port of my computer. In my microcontroller I have 2000 sample data and my primary target is to read those data. Now I can read those data in hyper terminal, but when it comes to my application it doesnt show anything.

Private Sub sp1_DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles sp1.DataReceived
sp1.Open()
MsgBox(sp1.ReadExisting())
End Sub

this simple code block should show me the data.But it doesnt.data format coming Microcontroller is in this following formate :

nitialization successful !,1023
Starting sampling process... 1023,1023 1023,1023
0,2 1023,1023 1023,1023 1023,1023 212,686 1023,1023 1023,1023
1,5 1023,1023 1023,1023 1023,1023,659 213,689 1023,1023 1023,1023

now, I dont understand why it doesn't read anything :NB: SP1 has a baudrate of 19200,Databits 8 and no parity,COM1 port. I aisnt sure whether I will be needing a buffer or not

View 1 Replies

Reading String From Serial Port

Mar 2, 2010

I do not have much experience with VB.What I need to do is to read a serialport as a hexadecimal string.I've done this with the MSCommlib, but now want to convert to system.io.ports.The equipment wich is connected to the serialport is a RFID card-reader, so the application haft to detect when it is receveing data, and then continue on.[code]

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved