473,800 Members | 2,602 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

RS232 class

Hi,

Do you know some good RS232C class? There is one in
VB.NET 101 Examples, but I think it is poor.

1.
I can't for e.g. read into my application all data
received. I must tell how many bytes I would like to
read. If I specify too many exception occures, if too
less there are still some data in buffer.

2.
I use a GPS receiver which send data by RS232. Every line
end with codes 10 and 13. I would like to read from RS232
Class one, or more such lines of data. But full lines! I
have noticed that this class gives me what it has -
sometime partial data.
Is it a spoecific thing about RS232 serial transmition or
only of this class?

Thanks.

Przemo
Nov 21 '05 #1
3 2332
Hi,

I use a GPS receiver which send data by RS232. Every line
end with codes 10 and 13. I would like to read from RS232
Class one, or more such lines of data. But full lines! I
have noticed that this class gives me what it has -
sometime partial data.
Is it a spoecific thing about RS232 serial transmition or
only of this class?
<<

This is normal. Just append new data to a string buffer, and use the
Substring method to determine if the CRLF is present -- if it is, then
process the buffer up to the CRLF, and retain the balance for the next set
of data that you receive.

I have a .NET DecodeGPS example class in my book (and a .NET serial class).
See below.

Also, you may be interested in getting the (free) Visual Basic .NET Resource
Kit from Microsoft (do a search for it). I contains a serial class from Sax
Software that is quite complete.

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002.
Nov 21 '05 #2
* "Przemo" <p.**********@d eltatrans.pl> scripsit:
Do you know some good RS232C class? There is one in
VB.NET 101 Examples, but I think it is poor.


Thomas Scheidegger's Serial Port FAQ (in German)
<URL:http://groups.google.c om/groups?selm=O2U yhTLvDHA.1680%4 0TK2MSFTNGP12.p hx.gbl>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #3
Przemo,

Will you be so kind not to multipost. Now you have three very good answers
one in the newsgroup dotnet.general and two in the newsgroup languages.vb.

However readers of those newsgroup sees only one or two.

Use instead of this crossposting, than everybody sees three answers and can
use those. (crossposting sending one message to more newsgroup in one time).

Thanks in advance.

Cor

Do you know some good RS232C class? There is one in
VB.NET 101 Examples, but I think it is poor.

1.
I can't for e.g. read into my application all data
received. I must tell how many bytes I would like to
read. If I specify too many exception occures, if too
less there are still some data in buffer.

2.
I use a GPS receiver which send data by RS232. Every line
end with codes 10 and 13. I would like to read from RS232
Class one, or more such lines of data. But full lines! I
have noticed that this class gives me what it has -
sometime partial data.
Is it a spoecific thing about RS232 serial transmition or
only of this class?

Thanks.

Przemo

Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
7827
by: Dan | last post by:
I wnat to see in browser an status from an device connected on rs232 port The java class for read from serial port is: //Serial.java import java.io.*; import java.util.*; import java.lang.*; import javax.comm.*;
6
7644
by: Przemo | last post by:
Hi, Do you know some good RS232C class? There is one in VB.NET 101 Examples, but I think it is poor. 1. I can't for e.g. read into my application all data received. I must tell how many bytes I would like to read. If I specify too many exception occures, if too less there are still some data in buffer.
0
2199
by: Jason T | last post by:
I've downloaded and installed the '101 Visual Basic and C# Code Samples' from http://www.microsoft.com/downloads/details.aspx?familyid=08e3d5f8-033d-420b-a3b1-3074505c03f3&displaylang=en I have used the 'Framework - Using the COM Port' sample, from a windows forms application, and it works perfectly. I have also use the 'Framework - How-To MSMQ' sample with no problems at all.
6
9136
by: Ken Breit | last post by:
I am using the RS232.vb class to talk to the serial port. The problem I am having is when I try to read if anything is on the comm port. I call the read method, with the number of bytes I am expecting to read. As long as I know the length of the command that I will be getting on the input of the port it works great. The problem is when I don't know how long the data I am receiving is. If I request more bytes than I know I am getting...
8
2064
by: Terry Olsen | last post by:
I'm trying to use the RS232 class that was in the Platform SDK (i think). Has anyone else used this with events successfully? Here's what i've got: ====================== Public WithEvents bbsPort As Rs232 = New Rs232 With bbsPort .BaudRate = baud .DataBit = dataBits .Parity = parity .Port = comPort
2
1453
by: Mika M | last post by:
Hi! My application uses Rs232-class, which was shipped with "101 VB.NET Samples\Framework - Using the COM Port". I need to sent certain kind of string into peripheral equipment attached to COM1-port , and after receiving this string of my application this equipment should return string back into my application. Is it possible by using this Rs232-class to get return string after sending string into COM-port first? I haven't succeeded...
2
3625
by: KCUK | last post by:
I have created a software to receive data from an equipment through RS232 communication. It is a simple application of the RS232 class. The software does receive strings from the equipment every time an event is triggered on it. The Expecting reading data is expected like this example: {Rd,d:02123579ABCDEF000098EB18, ......... If so, I can retrieve wanted data from this returned string. However, the Actual reading data is rather not...
4
5506
by: Dave Harry | last post by:
I found the RS232 class from MS's 101 VB samples. Writing to the port works fine. (I've got hyperterminal on the other comm port and a crossover cable between COM1 and COM2) The port is opened with: Public switchcom As New Rs232 switchcom.Open(2, 57600, 8, Rs232.DataParity.Parity_None, Rs232.DataStopBit.StopBit_1, 512)
5
3035
by: =?Utf-8?B?Q2hyaXN0aWFuIEhhdmVs?= | last post by:
Hi, how can I access the RS-232 hardware interface using C# and .NET2.0 to send and receive messages to a hardware component? Christian
0
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10279
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10036
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9092
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7582
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6815
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5473
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4150
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2948
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.