Solved

Best way to handle data being sent over a serial COM

Posted on 2016-10-28
5
31 Views
Last Modified: 2016-11-22
what is the best way to handle data that is being sent over from a Serial COM.

Is there a property that I can reference in the COM control class that can check it for me. I do have a checksum to the device.

I was thinking of a try catch finally statement to add however not sure what property to look for in the COM control.

Thanks,
0
Comment
Question by:cmdolcet
  • 3
  • 2
5 Comments
 
LVL 33

Accepted Solution

by:
ste5an earned 500 total points
ID: 41865156
You  have the serial port itself with its port settings when you open it. The rest depends on the device, whether its firmware supports a high-level protocol with a checksum option. In this case you need either to handle it your self or check whether there is a library from the manufacturer.
0
 

Author Comment

by:cmdolcet
ID: 41867085
OK so lets say I handle it myself, what are some suggestions on how I can do that?

Try Catch statements?
0
 
LVL 33

Expert Comment

by:ste5an
ID: 41875758
No. "High level" means that in the transmitted data contains an checksum. So the questions are: What device is it? And what does the manual says about this?
0
 

Author Comment

by:cmdolcet
ID: 41889634
The device will send back a NAK or ACK if the command has been accepted then I guess that would answer my question. Would that be the best way to handle things, is listen back for the reply and then make a decision to send again if a NAK occurs?

Thanks,
0
 
LVL 33

Expert Comment

by:ste5an
ID: 41894239
Yup. Send your command. Then wait for an answer..
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Calling web service and its methods dynamically 2 39
Help with sorting data in Listbox using VB.NET 3 53
Help with Syntax 9 26
Variable Event ? 3 22
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…
A short film showing how OnPage and Connectwise integration works.

914 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now