No announcement yet.

CMore panel - CLICK - RS485 - MODBUS - SureServo - P3-08 and P4-07 example please.

  • Filter
  • Time
  • Show
Clear All
new posts

  • CMore panel - CLICK - RS485 - MODBUS - SureServo - P3-08 and P4-07 example please.

    Motion Control
    Hello. I do not clearly understand the steps to mask the DI's as in the manual.
    I have FF00 in P3-08 which I think enables DI's 9 thru 16.
    I have a button on the CMore that activates a C bit in the PLC.
    I want that button to activate a DI in the drive.
    I'm not sure what the SEND or RECEIVE would look like.
    Pack,or UNPACK COPY ? ? ?
    Please explain in layman's terms.
    CMore panel - CLICK - RS485 - MODBUS - SureServo - P3-08 and P4-07 example


  • #2
    I am using this function in a Productivity PLC to read the input status.
    Click image for larger version

Name:	Code snippet for MODBUS read and unpack.PNG
Views:	82
Size:	53.4 KB
ID:	129228
    I assigned the input status register to the block move in the P0 parameters. This is done early in the logic. The rest of the logic is executed and then the status is updated near the end of the ladder logic:
    Click image for larger version

Name:	Code snippet for MODBUS pack and write.PNG
Views:	57
Size:	43.6 KB
ID:	129229
    I am curious, are you continuously writing to the drive via MODBUS and parameter P2-30 = 5? If not, you will burn the EEPROM and it will stop working. Also, do you configure P3-08 one time or is it always changing? You would typically configure it once, hard wire the enables for safety reasons, and run the program to control the virtual inputs. The mask in P3-08 takes care of sorting virtual from hard wire inputs.
    I am not sure if these are the same commands in the Click, but should be something similar.
    Attached Files


    • #3
      Hi LesKlar, thanks for responding.
      I can almost read what you have there. Yes, I set P2-30 to 5 and P3-08 to FF00 before setting P2-30 to 5.
      Here is an inquiry I sent into support, maybe it will help you to help me ?

      Hi, I am still having an issue with P3-08 / P4-07 Masking the inputs to my CMore. AN-SERV-009 is a bit confusing ... to me. The ladder example on page 30 appears a bit different than the one on page 40. I do understand that DS34 at page 40 gets SENT in a block transfer at another instruction. But, on page 30 the selected bits get Copy/Packed to Hex, then sent as Hex where on page 40, the bits are packed to Hex, then copied to DS, then SENT to the parameter. Which is correct ? I have P3-08 = FF00 with C11 thru C18 assigned to buttons on the CMore. I see the lower bits change in the Data view in the plc but the servo does not respond. The above might be my problem ?

      Thanks again.


      • #4
        Are you copying those C-bits to the lower 8 bits of the word you are sending? You need to copy them to the upper 8 bits of that word. You could just Pack Copy C3-C18 into the DS or DH register you are sending.


        • #5
          Hi LRJ. Thanks.
          I set P3-08 to FF00 (selecting only the upper bits)?
          Pack C11 thru C18 to DH10 (still don't understand the differences inn the examples on pages 30 and 40 .... unless it doesn't matter)
          SEND DH10 to P4-07 (401032)
          I'm clearly missing something obvious here.
          Thanks again.


          • #6
            Packing C11-C18 into DH10 will place those bits into the lower 8 bits of the word. If you were to pack C3-C18 into DH10, then C3-C10 would occupy the lower 8 bits and C11-C18 would be placed into the upper 8 bits, where they need to be for your example. The state of C3-C10 wont matter because those bits wont get written to the drive anyway because of the FF00 mask setting.


            • #7
              That is PRECISELY what I needed to hear !
              I assumed I only needed to send enough successive C's for the DI's selected.
              So ... P3-08 = 000F, pack C1 - C4 would work.
              00F0, would need to pack C1-C8
              0F00, " C1-C12
              and, of course F000, " C1- C16
              THANK YOU LRJ !


              • #8
                Glad to see you got it. You could have also Packed C11-C18 into DH10 and then shifted the bits in DH10 left 8 places using a math instruction and then sent the drive the result of that. This would have given you the same result but that explanation seemed like it would come across as more confusing.


                • #9
                  Actually, I wish you had mentioned that as it would free up those ghost bits that I'm already using elsewhere in the ladder.
                  Can you illustrate for me what that looks like in a Click math instruction ?
                  I wont be back to the machine till Monday and would like to try this.

                  edit edit edit.....................
                  NO PROBLEM !
                  I see it in the CLICK HELP file.
                  THANKS AGAIN ! ! ! ! ! ! ! ! !
                  Last edited by Sawyer; 03-14-2020, 06:01 PM.