Solved

My Application Program (VB.NET) and Marking System!

Posted on 2004-10-04
7
926 Views
Last Modified: 2008-02-01
Hi, All Expert!

I need to develop a project using VB.NET which is using RS232 communicate with Marking System. The purpose is to sent a data/text to Makring System to punch out a text.
Anybody have experince doing this type if project?

Now I have found the tools to open the serial COM port.
http://ourworld.compuserve.com/homepages/richard_grier/NETCommOCX.htm
http://franson.biz/serialtools/ 

I have a problem to understand this Marking System Protocol, it is using the "Extended Protocol" which is provides 2 way communication WITH error checking. Using Extended Protocol we can have 'Message Format", Response Format, Message Types, and the Block Check Code (BCC) Calculations.

Message Format
=============
Message from the host computer to the marker are transmitted in the following format:

SOH TYPE [##] STX [DATA] ETX [BCC] CR


Response Format
===============
The marker may respond to the host computer in one of two way

1. If the host transmission is error free, the market response with an ackowledge (ACK) message in the form:

SOH TYPE [##] ACK STX [DATA_TEXT] ETX BCC CR

2. If am error is encountered, the marker responds with a negative-acknowledge(NAK) message in the form:

SOH TYPE [##] NAK STX [DATA_TEXT] ETX BCC CR
SOH  = ASCII start of header character(001H)

Frankly speaking I dont have idea how to I use these protocol to sent a data from host/PC to Marking System vis RS232, I only manage open a COM port and sent some test, like above SOH TYPE....i got no idea how to write it.

How I can use "SOH TYPE [##] NAK STX [DATA_TEXT] ETX BCC CR" in my VB.net programming?

I can't found any books to explain for me and also can't find any example/sample from website.

I hope that those have experience in this kind of project please help me or give some tips, or can tell me where can I find information?

I am sorry if this topic is not related, but I trying to ask, hope can solve my problems.

Thank you.

Thanks


 
0
Comment
Question by:kaifong78
  • 4
  • 3
7 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 12223319
Communications : Extended Protocol
http://www.infosight.com/extpro.htm

Look at the Control Character Definitions section.

Bob
0
 

Author Comment

by:kaifong78
ID: 12223428
I have this Extended Protocol Manual also, but I dont know how to I use it in VB.net. Any others example?
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 12225833
BTW, there is a free community version of the Sax.NET serial comm driver that is simple to use in the VB.NET 2003 Resource Kit (if you have 2003):

MSDN:  The Visual Basic .NET Resource Kit
http://msdn.microsoft.com/vbasic/vbrkit/default.aspx

You need to find the complete character sequence to send, but I believe that this is a simple task.  The difficult one is finding the correct characters.

Bob
0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 

Author Comment

by:kaifong78
ID: 12233852
Hi,

Sax.NET Serial Coomunucation Driver is correct name in VB.NET 2003 Resource Kit? I can't find it!
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 250 total points
ID: 12239814
Sax.NET Free Component:
C:\Program Files\Visual Basic .NET Resource Kit\Application\Content\Third Party Components\FREE .NET Controls\SAX.NET

Bob
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 12251381
How it coming, are you making any progress?

Bob
0
 

Author Comment

by:kaifong78
ID: 12255895
Hi,

I have go through the SAX.NET, but I think I won't use it because need to buy, hehehe. I using the Rs232.vb (class) from Microsoft, it is free.  I found that most of them are same, so just use the Rs232 classes from Microsoft.

Now I manage to sent "Text" to the Marking System, others I still don't know. Like

Message Format -> SOH TYPE [##] STX [DAT_TEXT] ETX [BCC] CR
Reponse Format -> SOH TYPE [##] ACK [DAT_TEXT] ETX BCC CR
                         -> SOH TYPE [##] STX [DAT_TEXT] ETX BCC CR

I still don't know how to use it.

May I know are you a Programmer? Have you done this kind of project before? Where are you from?




0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question