Announcement

Collapse
No announcement yet.

weigh scale help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • weigh scale help

    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.

  • #2
    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.

    Comment


    • #3
      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?

      Comment


      • #4
        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.
        Circumstances don't determine who we are, they only reveal it.
        Jason Wolthuis

        Comment


        • #5
          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.

          Comment


          • #6
            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...ce-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.
            Bob

            Comment


            • #7
              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.

              Comment


              • #8
                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
                Bob

                Comment


                • #9
                  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.

                  Comment


                  • #10
                    Originally posted by Bob S BN View Post
                    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!
                    Bob

                    Comment


                    • #11
                      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.

                      Comment


                      • #12
                        rilver, yes, I would try:

                        scale pin #5 to PLC port2 pin #7
                        scale pin #3 to PLC port2 pin #3

                        and jumper:

                        PLC port2 pin #4 to PLC port2 pin #5

                        If the scale is a >50ft or if noise is an issue, look at using RS232/485 converters, FA-ISOCON for example. B&B Electronics also carries converters, 4850TLED for example.

                        Comment


                        • #13
                          rilver, right, you are receiving data INTO the PLC - no need for pin4-to-pin5 jumper - works without jumper. But OK with jumper - ZL-CMA15 has jumper built-in.

                          Comment


                          • #14
                            Hi Guys
                            I got the ACSI RS-232 into port 2 on DL06 plc alright, works okay but the stream bounces back and forth between numbers. The proper numbers come up when using the program that Bob S BN posted above but i get 3 different # alternating back and forth. not just displaying the # on scale head screen. I tried changing the sample rate on scale head, got better but still alternating. any ideas as to what this could be. thanks

                            Comment


                            • #15
                              Bob S BN's program requires that the weight information be in a specific format. The numeric part of the string received must be 4 digits followed by a decimal point followed by 4 digits.

                              Can you post what a typical received string looks like? That may be part of the problem.
                              thePLCguy

                              Bernie

                              Comment

                              Working...
                              X