Announcement

Collapse
No announcement yet.

How do I prevent send Modbus multiple times?

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


  • How do I prevent send Modbus multiple times?

    I want to send a Modbus message once every 10 seconds. I have a timer T4 with a set point of 11. The way I am sending the Modbus message now is when TD4 > 9 I call the Send command. I have an application listening and it receives several messages every 10 seconds as the scan of the ladder happens several times within a second. I have attached an image of the relevant 3 rungs. How do I make sure my Click program only sends one message every 10 seconds? Click image for larger version

Name:	Capture.JPG
Views:	36
Size:	106.2 KB
ID:	105492


  • #2
    I know nothing about click, but couldn't you use an = instead of >?

    Comment



    • #3
      I tried using =. The PLC still sends the Modbus message several times every time the timer elapses.

      Comment



      • #4
        Eliminate rung 3 as it's unnecessary. Add a normally closed T4 as a condition to your timer in rung 1. As Scott wrote, use a TD4 = 9 as your compare in rung 2.
        If you've done the very best you can, worrying won't make it any better - Walt Disney

        Comment



        • #5
          See help topic CL181 - Modbus timing chart at the bottom of the topic

          You need to give a pulsed trigger or else the SEND command will send as many times as it can during the 1 second while TD4 == 9
          you can try this

          ---------------------------------------------FIRST CODE SECTION

          Code:
                  TD4     9                  C101
          ------------]=[---------------------( )
          
                     C101                     |
          ------------]^[---------------------+ SEND
                                              |
                                              |
                                              |
          or


          ---------------------------------------------SECOND CODE SECTION
          Code:
                  TD4     9     C102          |
          ------------]=[--------]/[----------+ SEND
                                              |
                                              |
                                              |
          Code:
          
                  TD4     9    SENDING        C102         -----------------THIS IS NOT SUPPOSED TO BE A SEPARATE CODE SECTION
          ------------]=[----+---] [----+-----(S)
                             | SUCCESS  |
                             +---] [----+
                  TD4     9                  C102
          ------------]<>[--------------------(R)
          
          Sending will go true when the instruction STARTS
          Success will go true when the instruction is successful
          Either way, C102 will be set, inhibiting any further SEND during SECOND '9'
          WHY IS THIS FORUM breaking the last CODE section into TWO SECTIONS

          ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ?????????????????????????????????????????????????? ????????????????????
          It also breaks all these ??'s into groups.
          I guess the forum devs know better what I want than I do. THANKS
          Last edited by kewakl; 04-01-2017, 04:00 PM.

          Comment



          • #6
            Lovely, the forum has again decided that it MUST remove a single SPACE from the start of lines

            Be nice, don't fuss at the forum devs. don't complain too loudly, it hasn't helped since the change to this forum software.
            Last edited by kewakl; 04-01-2017, 03:53 PM.

            Comment



            • #7
              Originally posted by Ridgeline Mach View Post
              Eliminate rung 3 as it's unnecessary.
              ...and potentially problematic

              Comment



              • #8
                Click image for larger version

Name:	CLICKsend.png
Views:	17
Size:	13.4 KB
ID:	105503

                I think this is what is being suggested. (I hate this forum software. I would never use a product this bad for an industrial environment and it reflects poorly on Automation Direct.)

                And aside from the forum software, the SEND instruction dialog seems to conflict with the ladder display, especially Mstr Addr and Master.

                Comment



                • #9
                  I see I was fighting the blippity forum software at the same time as kewakl.

                  Comment



                  • #10
                    Also, the help file on Send labels both examples as continuously at the bottom, but the first example is actually for a single send.

                    Comment

                    Working...
                    X