Posted 12 Jul 2015 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
Posted 13 Jul 2015 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
Posted 13 Jul 2015 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
Posted 13 Jul 2015 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