Announcement

Collapse
No announcement yet.

How do I prevent send Modbus multiple times?

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

  • bgreer5050
    started a topic How do I prevent send Modbus multiple times?

    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

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

    Leave a comment:


  • Mike Nash
    replied
    I see I was fighting the blippity forum software at the same time as kewakl.

    Leave a comment:


  • Mike Nash
    replied
    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.

    Leave a comment:


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

    Leave a comment:


  • kewakl
    replied
    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.

    Leave a comment:


  • kewakl
    replied
    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.

    Leave a comment:


  • Ridgeline Mach
    replied
    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.

    Leave a comment:


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

    Leave a comment:


  • scott.lawrence
    replied
    I know nothing about click, but couldn't you use an = instead of >?

    Leave a comment:

Working...
X