cekann

Micro800

5 posts in this topic

OK I know you guys are out there... I'm working with a Allen Bradley Micro820 and I'm trying to read ASCII from a scale. I kinda figured out how to extract it "the hard way" by switching BYTEs from the ASCIILOCADDR data file. Is there an easier way? Thanks

Share this post


Link to post
Share on other sites
Howdy neighbor! Where in York are you? Are you having trouble with the communications part, or converting the data into a usable form after you get it? If it's the conversion, you can use the MID instruction to pull out the data part of the string, and one of the data conversion instructions (ANY_TO_REAL, for example) to convert it to a number you can use for math, compare, display, etc.

Share this post


Link to post
Share on other sites
Dillsburg!? I work in Emigsville. Anyway I'm trying to read ASCII from a scale. I'm using ARL which puts data into ASCIILOCADDR as individual Characters as BYTEs. I need to have 7 characters (String?) to get the value to change to UINT so I can compare the scale-measured value against preset constants. Does that make sense?

Share this post


Link to post
Share on other sites
I've been doing some work for a client over on Willow Springs Lane recently, not too far from there. My base is in Dillsburg, but I get around. What you say makes sense. The ASCIILOCADDR is a BYTE array, and you need a string for the conversion. You can either convert it yourself, or download Rockwell's function block. Go to here: http://ab.rockwellautomation.com/Programmable-Controllers/Micro800#resources and click the link for the sample code library. Then search for and download the "ASCII_INPUT_TO_STRING" user defined function block. Import into CCW and away you go!

Share this post


Link to post
Share on other sites
Cool. Thanks I'll check it out.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now