Announcement

Collapse
No announcement yet.

I need two Click! PLCs to talk to each other - how?

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


  • I need two Click! PLCs to talk to each other - how?

    I am in an interesting situation...

    I have a couple of UV curing units. I'll cut to the chase. One is a four color, stand alone; the other is a six color master that drives a two color slave via a RS-485 link for a total of eight colors (these units are right next to each other but they would be ridiculously large if they were together). They are factory equipped with Mitsubishi FX-2N-64 PLCs and F940GOT HMIs. These were made in England, used in The Netherlands, and now they are in our plant, in the USA. The are almost 20 years old, the manufacturer has been less than helpful, to say the least - "Those units were designed for 400 volts, 50 hz and they will NOT work on 480 volts 60 hz. They're 20 years old and obsolete, so you should scrap them and we'll be happy to sell you ones that will work on your power." I don't accept that. Just the new UV units cost more than the presses and everything else we got in the deal. It's not going to happen. And the units DO work just fine (at least good enough for us) on 480 volts 60 hz. They work quite well.

    I had a problem with one of the HMIs, so I set up one of them - a 4-color stand alone unit, with a Click PLC with i/o modules and a EA3-T6CL HMI. It works excellent. I have the HMI screen designed in a way that makes sense, properly interfaced to the machine that it is connected to, and it works just like it is supposed to.

    The eight color worked good too, with the Mitsubishi control system - until last week when a backup battery failure caused the master PLC to get "stupid" and it will no longer talk to the slave nor the HMI properly. I do not have programming software nor cables for the Mitsubishi, nor am I able to get the program from the OEM. Temporarily I have the Mitsubishi PLC that I saved from from the four color in the six color master; the crisis is abated but it is not fully functional, and if it gets stupid too we're dead in the water.

    I plan on reworking the system with another EA3-T6CL HMI and Click PLCs, but I'm not sure how to get them to talk to each other. I already have the program written for the master, which was essentially the four color program expanded, and the slave would also be simple, the four color program shrunk down to two colors.

    How do I get the master to tell the slave which outputs to use, and how do I get the slave to tell the master what inputs are active? Also, the slave will not always be needed (in fact most of the time it won't), so I need to be able to tell the master if the slave is operating (and therefore transfer data), and if the slave is not operating (don't worry about data from the slave). The slave is essentially only going to be used as an I/O extension, it just has to report to the master, and it has to operate the outputs as the master instructs it to.

    Those previous two paragraphs may be confusing - am I better off with the logic for the slave on the slave PLC and just transferring the global information back and forth, or should I put the logic for all eight lamps on the master and use the slave just for I/Os? Assuming the slave is physically turned on by the operator, the HMI controls the operation of the slave (and the master)

    I'm thinking I may need to set up the data transfer as a subroutine, then turn the subroutine on or off. But I've never written a PLC program for PLC to PLC data transfer.

    Also, would the DV-1000CBL be appropriate to connect the two Click PLCs together?


  • #2
    Copy the desired output states into DH registers.
    SEND those DH registers to the slave CLICK. You copy those DHs to YDs -- AFTER VERIFYING THAT IT IS SAFE TO DO SO!
    RECEIVE the XD registers from the slave into the master. analyse the received data to determine if the slave is at the appropriate state/doing what is intended.
    Consider a heartbeat so that the slave cannot continue operating without continuous ok from master.



    No idea about the DV-1000CBL.

    Comment



    • #3
      A PLC can read and write data on a Click with either serial or ethernet modbus.

      The modbus addresses can be seen in the Address Picker. Click the check box the Display Modbus Address at the bottom right.

      Using modbus to send data to a slave Click allows for it to be used as remote I/O or run it own code with the data being supplied by the master.

      If the HMI and Click PLC's were ethernet, you could also have the screen talking to each PLC and may not need to have plc to plc modbus communication.

      Don't know on the cable, have always used the three terminal RS-485 port when using serial modbus.

      Comment



      • #4
        I've been in the communication/receive and send instructions. Am I correct in assuming that "master" is this unit and "slave" is the other one? I have a total of six lines Slave -> Master and twelve lines Master -> Slave. All are simple on/off signals and speed is no issue, if I could get one scan/second that would work. 10ms/scan will work just as well, it's not that important. Do I need to set send/receive on both sides, i.e. the master and the slave side?

        Roger, the master has some global functions that affect both, such as the cooling blower and the air pressure ok and output to the shutter valve, so having the HMI controlling these independently is not an option.

        Comment



        • #5
          There is no requirement that the slave SEND anything.
          The master can simply READ (from the slave) anything that the master needs.

          In scaling up, the master can SEND/RECEIVE from any slave unit.


          Start simple. In master just read the slave's 1 second clock (SC7) and send the masters 1 second clock to the slave.
          Click image for larger version  Name:	snd-rcv.png Views:	1 Size:	92.6 KB ID:	111780
          In the master's dataview, the C100 bit should be toggling - ~ 1/2 second interval(*) - because of the master's SC7 bit being sent.
          In the slave's dataview, the C100 bit should be toggling - ~ 1/2 second interval(*) - because of the slave's sc7 bit being received.


          (*) there may be variations in the c100 bits timing from comms delays, etc.
          Last edited by kewakl; 03-09-2018, 05:34 AM.

          Comment



          • #6
            I would like to read C60 through C65 from the slave and replace whatever is in the master with what it reads from the slave; and I want to take whatever is in C68-C79 in the master and use it to replace whatever is in C68-C79 in the slave. In the slave I can convert the Cs to the various Xs and Ys.

            Does it look like this might do the trick?

            Click image for larger version

Name:	ghost click m-s.jpg
Views:	1
Size:	173.8 KB
ID:	111806

            Comment



            • #7
              seems so, just Not on port 2, if triggered as is.
              port 2 - cant read/write at same time
              try down edge on receive rung

              if you add more comms, you should think about interlocking the instructions -with success/error bits.

              Comment



              • #8
                Originally posted by kewakl View Post
                seems so, just Not on port 2, if triggered as is.
                port 2 - cant read/write at same time
                try down edge on receive rung

                if you add more comms, you should think about interlocking the instructions -with success/error bits.
                How long does a success/error bit last? Just through one cycle or until it is turned off by an opposing bit?

                Comment



                • #9
                  Originally posted by DetroitSound View Post

                  How long does a success/error bit last? Just through one cycle or until it is turned off by an opposing bit?
                  See timing charts on help topic CL181 and CL182
                  Send, status stays (on) until the instruction is re-enabled
                  Receive, status stays (on) while the instruction is enabled

                  note: (on) means IF the success or fail bit goes ON during execution of the instruction, it will go OFF at the described event

                  Comment



                  • #10
                    Originally posted by RogerR View Post
                    A PLC can read and write data on a Click with either serial or ethernet modbus.

                    The modbus addresses can be seen in the Address Picker. Click the check box the Display Modbus Address at the bottom right.

                    Using modbus to send data to a slave Click allows for it to be used as remote I/O or run it own code with the data being supplied by the master.

                    If the HMI and Click PLC's were ethernet, you could also have the screen talking to each PLC and may not need to have plc to plc modbus communication.

                    Don't know on the cable, have always used the three terminal RS-485 port when using serial modbus.
                    I'm going with the RS-485. Am I correct in thinking that + on the master goes to - on the slave and vice-versa, or does it connect + to + and - to -? I believe I have my master, slave and HMI programs worked out.

                    Comment



                    • #11
                      + --> +
                      - --> -

                      Comment



                      • #12
                        Originally posted by kewakl View Post
                        + --> +
                        - --> -
                        Thank you.

                        Comment



                        • #13
                          Removing the offending rung resolved the issue and it now works properly as far as the master/HMI is concerned. Now my only issue is getting the two PLCs to talk to each other over the RS-485 Port 3 link. Nothing I've tried so far has worked.
                          What does your code look like, what does it do? Can you post (or pm) your code (master and slave)?

                          Comment



                          • #14
                            Attached to this message is a zip file containing my current programs, HMI and master and slave. The HMI programming isn't complete, but it is complete enough to work. The Click programming is complete but doesn't communicate. I will polish up the HMI programming at a later date.

                            The link between the master/slave is with a shield cable, twisted pairs, + to + and - to - using a pair, SG to SG using a third wire. None of the +, - or SG wires are grounded nor connected to anything else. It was formerly used for a full duplex RS-422 link between the original Mitsubishi FX2N PLCs.

                            Are terminiating resistors needed? The Mitsubishi had 330 ohm resistors at both ends on the TX and RX pairs (4 resistors total), I could install them here.


                            GEW Update 3-30-18.zip
                            Attached Files
                            Last edited by DetroitSound; 03-31-2018, 10:48 AM. Reason: Adding another thought.

                            Comment



                            • #15
                              Originally posted by DetroitSound View Post
                              Are terminiating resistors needed? The Mitsubishi had 330 ohm resistors at both ends on the TX and RX pairs (4 resistors total), I could install them here.
                              probably not needed for two devices -- if you have a short run


                              Check your slave ID. It looks like the master is node 2 and you are attempting to read/write from/to node 2

                              Comment

                              Working...
                              X