Read weight from an rs232 scale

M

Thread Starter

Mostaza

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
 
I
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
 
Top