Link to home
Start Free TrialLog in
Avatar of kaifong78
kaifong78

asked on

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

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


 
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Communications : Extended Protocol
http://www.infosight.com/extpro.htm

Look at the Control Character Definitions section.

Bob
Avatar of kaifong78
kaifong78

ASKER

I have this Extended Protocol Manual also, but I dont know how to I use it in VB.net. Any others example?
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
Hi,

Sax.NET Serial Coomunucation Driver is correct name in VB.NET 2003 Resource Kit? I can't find it!
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
How it coming, are you making any progress?

Bob
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?