Member Login
member
passwd
remember me on
this computer.

- join now -
- forgot username or password? -

Jump to a Date

Sponsored Communities
Cool stuff
Select a topic of interest:
...and press:
Neat Stuff
Control.com Stuff

Visit our shop for nerds in control lifestyle products.

Fortune
The District of Columbia has a law forbidding you to exert pressure on
a balloon and thereby cause a whistling sound on the streets.
RSS Feed
RSS feed Use this link to get an RSS feed of the Control.com article flow, for private, non-commercial use only:
www.control.com/rss/
To get a personalized feed, become a member at no cost.
Select a Page Style
Select one of the following styles:
- BluFu
- Classic
(cookies required)
advertisement
from the forum department...
Read weight from an rs232 scale
Programming languages. topic
Posted by Mostaza on 23 July, 2009 - 5:08 pm
Hello, my name is charlie and I am from Argentina.

I have successfully connected my scale to my PC using an RS 232 serial port using a simple program (for ex simpleserial on www.simpleserial.com) using VS 2005 C#.

The problem begins when I want to manipulate the string that I have created to capture the incoming scale reading. I want to use a string.substring() function to get a piece of the incomming string and I get a warning sign that says: "ArgumentOutOfTangeException was unhandled by user code" and Index and length must refer to a location within the string. Parameter name: length."

I can display the string in a multiline text box, but I dont know how to manipulate that string.

If anybody could help me please. I can send u pic of the output in the multiline text box and the code I use.

My mail is carloscaraccia [at] hotmail.com

Thanks for your time.

Carlos


Posted by Ian Finlay on 17 October, 2009 - 5:44 pm
Hi Carlos,

post you string manipulation code here or send to me and see what can be done.

Do you also have data capture from the port using something like portmon? this would be handy to know the protocol for the peripheral your talking to.

Ian Finlay
www.earthed.net.au
Freelance SCADA/C++/C#/VB/.NET

Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2009 Nerds in Control, LLC. All rights reserved.

Users of this site are benefiting from open source technologies, including PHP, MySQL and Apache. Be happy.

Advertisement
Our Advertisers
Help keep our servers running...
Patronize our advertisers!