Weigh Bridge reading

Hi,

I am currently doing a project on weigh bridge software using VB6, wherein the truck weight reading before and after loading is required for computing the daily transactions. Now the problem is the loadcell indicators output is on the serial port. I am able to detect the data in between two junk characters, but it is continuously scrolling. I've tried several methods including the serial port settings, but in vain. Can any one bail me out of this problem?

Thank you in advance.
 
Please let me know what weight indicator you are using, and the
brand name of the indicator.

ashok chaudhary
 
That's the way I did it:

Define 1 character that is ALWAYS in the string send by the bridge, start counting from there to define the weight.
 
F

Fred Loveless

Usually the "Junk" characters are start and end data characters. The scale, in unsolicited mode, will send a null transaction indicating the scall is empty. This can be a blank string or a non-printable character.

We have a driver called UCON that we use for devices like this. We will set the transaction so that we are reading from the start character to the end character of the transaction. We test the second character/byte to see of it is a null transmit in which case we ignore the transaction.

When it sends a stable weight, usually a variable length ASCII string, we then update variable with the new data. You should be able to do the same thing in your VB code.

Fred Loveless
Senior Application Engineer
Kepware Technologies
 
Can you explain what you mean by "continuously scrolling"? I've had good luck extracting data from scale strings using regular expressions. Is that what you are looking for?
 
Yes, exactly. The original data, for example the weight of the truck, is in between junk characters. When I try to get this in the text box for computing, the data is not constant, rather it gets duplicated a number of times and is unstoppable.

Thanks for the reply,

Regards,
Skakum
 
I'm not sure if you are saying the reply was enough information for you or whether you are prompting me for more information. If you are expecting more help on this, post a few samples of the strings you are getting and we can suggest some regular expressions.

In my case I was able to extract usable data from strings where the strings were of variable length and had various garbage characters in them. As long as the data (e.g. something like "12.3 kg") was somewhere in the string I was able to find it 100% of the time. Variable numbers of digits, extra spaces between the digits and the units, duplicate data, etc., were no problem.

Regular expressions have been the standard method for pattern matching for several decades and its pretty hard to do a "roll your own" algorithm that's better. I'm not sure what is available for VB6 though.
 
If you can provide your mail id I'll send the screen shot of what I got on the hyperterminal.

Regards,
SKAKUM
 
Just paste the actual text here. This is a public forum, and I'm sure other people would like to see it and comment. You should be able to do one of the following:

1) cut-and-paste from the terminal into a text file.

2) log data from the terminal to a file.

3) Have your program write the data it is reading to a file. (This is the preferred method).

You need to capture some real data samples before you are going to get anywhere on this. Trying to reconstruct data samples from a screen shot is pointless.
 
Top