adccommunitymod (AutomationDirect) asked a question.

weigh scale help

Created Date: January 15,2011

Created By: rilver

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

Hi Guys I am trying to integrate a weigh scale into a PLC and was told best way to do this is to use the RS-232 ports on the scale indicator. would anybody have any advice on how to simply do this? the Weigh indicator i would buy has the following outputs , would this be adequate to feed info into PLC? Serial Output: EDP port: Full duplex RS-232 Printer port: Output-only RS-232 or active 20 mA current loop Both ports: 9600, 4800, 2400, 1200, 600, 300 bps; 7 or 8 data bits; even, odd or no parity would this be adequate to feed info into PLC? Any help would be appreciated.


  • adccommunitymod (AutomationDirect)

    Created Date: January 16,2011

    Created by: KPrice

    rilver, we have done a number of scale projects similar to yours. Our scales (Siemens Milltronics) used Modbus RTU as the communication protocol.

    It is not clear to me what communication protocol your scale is using.

    Is it Modbus RTU?

    Yes, the DL PLCs can easily handle Modbus RTU communications.

    We have also used ASCII communications, and the DL PLCs can also handle (limited) ASCII communications, or with the CoProc module, can handle advanced ASCII communications.

    It appears you can also use a 4-20ma current loop analog signal. But as you said, it may be best to use the communications. In our project, we used the communications (rather than the 4-20ma) because we gathered a lot more info from the scale than just weight.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: January 16,2011

    Created by: rilver

    acuuracy

    I have not purchased the scale head yet would buy whatever comm. port i can interface. Could i expect reasonable accuracy with the 4-20ma loop.

    The reason i was not going to use it (4-20ma) was i figured it would not be deadly accurate.Does anybody have any experience with scales and 4-20ma outputs?

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: January 19,2011

    Created by: plcnut

    If the cost is not an issue, and you can handle writing a little basic code, then go with the co-pro, and it will handle all of the data filtering and manipulating and then place the finished data into v-memory to be used in your program.

  • adccommunitymod (AutomationDirect)

    Created Date: January 19,2011

    Created by: KPrice

    rilver, 4-20ma loops have worked great-have been accurate-for many process variables. Our process variables do not need to be "deadly accurate ". For example, we don't care if pH reads 10.25 on transmitter and 10.27 in PLC via 4-20ma loop.

    This all depends on your application, scaling, preferences, etc., BUT for your scale I would recommend finding a scale that can communicate using Modbus. Not only will you be able to communicate the same number as the scale displays, but you will also be able to read and write other info. For example, the scale may have a daily totalizer, a year-to-date totalizer, internal clock, etc. Using Modbus, the PLC can read these exact values. Also, you may need to write to the scale: to reset clock, reset totalizer, perform zero or calibration functions, etc.

    The DL PLC can handle Modbus RTU using CPU port. Modbus TCP would need ECOM100 module. ASCII would need (probably) CoProc module and BASIC program, as plcnut says.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: January 19,2011

    Created by: Bob S BN

    I did a project a couple months ago to weigh a 21 gram part 100%. I used linear slides to push the parts on and off of this scale.

    http://www.myweigh.com/scales/medium-scales/ibalance-601-amp-m01

    This fairly low dollar scale has rs232 ASCII output that I fed into an 06 on port 2. I programmed the scale with max zero tracking (compensates for small powder build up) and programmed the output to transmit on "stable ".

    I used the ASCII boxes in the 06 to capture the scale data, and then seperate out the numerical value from the rest of the status stuff in the string.

    It took a little bit of trial and error to get that data string in and usable, but it's been working good for a couple months now.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: January 20,2011

    Created by: rilver

    Thanks alot on the replys, Have been digging on the ASCII boxes in the 06 not really getting anywhere, but am considering going with the RS-232 ASCII output if i can find somebody to do the programming for it.

  • adccommunitymod (AutomationDirect)

    Created Date: January 20,2011

    Created by: Bob S BN

    RILVER,

    Here's the first few lines of the program that I mentioned earlier. While it may not be pretty (lots of trial and error to get it to work) it does work as needed. I had a lightweight part (tested to 21.55-21.75 grams) that I needed to sort and reject out of spec. You will need to adjust the data you 're extracting if you have a different resolution (digits either side of decimal). You may also have to get into double words if you 're dealing with more than 4 digits.

    If you haven't done so before, you just copy the program text below (starting at DL06), paste into MS notepad, save, and "import " into directsoft5.

    Let me know if you have any more questions. Good Luck, Bob

    PLC 06

    // Rung 1

    // Address 0

    #BEGIN COMMENT

    "This rung is constantly polling the scale for a data string, and storing all the characters into "

    "vmem slots starting at v2000. "

    #END

    STRN C11

    AIN K0 K0 K2 V2000 K22 K0 K0 K0 C10 C11 K0 K0

    // Rung 2

    // Address 8

    #BEGIN COMMENT

    "This rung constantly grabs the first two digits (left of the decimal point) of the number "

    "displayed on the scale, converts to BCD, and stores in v2040. "

    #END

    STR SP1

    AEX V2000 K11 K4 K1 K1 K1 V2040

    // Rung 3

    // Address 14

    #BEGIN COMMENT

    "This rung constantly grabs the last two digits (right of the decimal point) of the number "

    "displayed on the scale, converts to BCD, and stores in v2050. "

    #END

    STR SP1

    AEX V2000 K14 K4 K1 K1 K1 V2050

    // Rung 4

    // Address 20

    #BEGIN COMMENT

    "This rung loads the first two numbers (BCD v2040) into the accumulator, multiplies by 100 "

    "(causing them to move left 2 places) and adds in the last two digits (BCD v2050), and "

    "outputs the new value to V2060. "

    " "

    "V2060 now contains the BCD value of the 4 digits on the scale with an implied decimal "

    "point in the middle. Now all math and comparisons and interface with an HMI can be "

    "done with BCD instructions. "

    #END

    STR SP1

    LD V2040

    MUL K100

    ADD V2050

    OUT V2060

    // Rung 5

    // Address 25

    END

    // Rung 6

    // Address 26

    NOP

    #BEGIN ELEMENT_DOC

    "C10 ", "AIN busy bit ", " ", " "

    "C11 ", "AIN done bit ", " ", " "

    "V2000 ", "ASCII in start ", " ", " "

    "V2040 ", "weight left dec ", " ", " "

    "V2050 ", "weight rite dec ", " ", " "

    "V2060 ", "part weight 2dec ", " ", " "

    #END

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: January 20,2011

    Created by: rilver

    thanks alot Bob S BN

    This is exactly what i needed, an example of how to get data out of Scale head. Hoping this will get me going.

  • adccommunitymod (AutomationDirect)

    Created Date: January 20,2011

    Created by: Bob S BN

    I programmed the scale with max zero tracking (compensates for small powder build up) and programmed the output to transmit on "stable ".

    Don't forget the scale set up I mentioned in post #6.;)

    At the very least, this should get you going on whatever scale head you start with, you'll just have to play with it all when you get the stuff.

    Of course, that's always the FUN day anyways!:D

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: January 22,2011

    Created by: rilver

    Hi Bob S BN

    I have found out that my current scale head that i have setup has the output needed to get the acsi data string into Plc Dl06. I just need a second opinion of where to connect the leads to. here is the info of my scale,

    PIN 5 ---- DATA GROUND

    Pin 3 ---- DATA OUTPUT

    Am i correct in assuming they would go to pins as follows on port 2

    Scale pin #5 to pin #7 and maybe #8 on plc

    Scale pin #3 to pin 3 on plc

    Any input on this would be very appreciated.

    Expand Post
10 of 22