10-01-2006 11:42 PM
10-02-2006 12:14 AM
10-05-2006 08:02 PM
I have created and ascii object, set the com port settings, checked "monitor com port", and tried inserting an expression that is connected to the ascii object. The format for com port string is:
<STX><POL><WWWWWWW><SP><Units><SP><Mode><SP><Status><CR><LF>
1 STX Start of Text Character (ASCII 02)
2 Polarity “-“ for Negative , Space for Positive
3 - 9 W Weight String (Padded with spaces, includes decimal point) Least Significant Digit
10 Space ASCII 32
11 -12 Units “KG” = Kilograms “LB” = Pounds
13 Space ASCII 32
14 - 15 Mode “GR” = Gross weight “NT” = Net weight
16 Space ASCII 32
17 Status Space=Valid, “O”=Over, “M”=Motion, “-“=Negative
18 CR Carriage Return (ASCII 13)
19 LF Line Feed (ASCII 10)
The scale is setup as a continuous feed to the comport and we can see the data when we use hyperterminal. The only information we need is characters 2-9 which is polarity and weight. We would use the Mid(string,2,8) function and then convert the text to a numeric somehow, but we can't display the string to be able to use the Mid fubction. We have no online help as this is a remote location and we have tried to understand the help menu and experimented but with no luck. Thanks for taking the time to look at this!
Kevin
10-06-2006 10:14 AM
10-13-2006 12:05 AM
I figured it out, I just had to create an Ascii object and configure the port settings, click on "monitor serial port", create and expression using mid(ascii.response,2,8) and that was it. No configuration of request strings or response strings was needed. Thanks for the help!
Kevin