CLICK C2 Modbus RTU to slave device (port 2, RS-232)

I am attempting to use the CLICK modbus feature to Send or Receive with a slave device (Cool Muscle CM2 servo motor). All of the parameters and settings in the CM2 motor appear fine, and I can communicate serially between an app on my laptop (PuTTY) and the motor.

 

However, no matter how many ways I try, all attempts at Modbus Send or Receive requests to the motor fail. The CLICK Modbus instruction will light the "error" status and never "success".

Note: The PLC is using RS-232 rather than RS-485.

 

I do not have a specific question and after 25 hours of attempts I have run out of options to try.

So my broad question: what reference material can I review that might educate me enough on the CLICK Modbus so I can resolve this? I have read everything available from AutomationDirect, I've seen every YouTube video, etc.

 

Thank you!


  • ADC_Tech_03 (AutomationDirect)

    1: Is the Modbus instruction in the logic returning an error code?

     

    2: Describe the adapter in use or wiring from the Click RJ-12 (Port 2) to the CM2. Diagrams are welcomed.

  • CLICK343CMORE810 (Customer)

    No error code returned. Using FC3, and the ladder rung FC3 shows the "receiving" status ON all the time. The "success" and "error" outcomes are always OFF.

    If I force the "receiving" flag to OFF, after a moment it comes back ON. Back ON, even if the FC3 is not being triggered on its input.

    The RS-232 Port 2 is wired correctly. Common to common, Rx to Tx, Tx to Rx. The slave device (servo motor) has only these 3 wires to connect.

     

    The slave motor DOES successfully perform Modbus responses, when connected to my laptop which can send a command over Modbus.

    Also, if I connect the PLC to my laptop, and use a Python program to look for serial communication on the laptop port... it sees nothing.

     

    Expand Post
  • ADC_Tech_03 (AutomationDirect)

    We're going to need more info and project files. I'd like you to open a support case on this. Can I send you a support email?

  • Todd Dice (Customer)

    How are you managing the comms?

     

    This was something that bit me when I first used a Click in 2013.

     

    Each SEND and RECEIVE instruction must be managed so they are not triggered simultaneously.

     

    I use a one-shot rising of SC5 to trigger a counter and use the current value of said counter in a compare equals instruction as a condition to enable each SEND and RECEIVE.

     

    Also, some devices prefer a slower baud rate, like 9600, for example.

     

    Good luck!

    Expand Post
  • CLICK343CMORE810 (Customer)

    Thanks for the suggestion. The SEND and RECEIVE are set to follow one after the other with no collisions. When I reduce my program down to just 1 RECEIVE, I still have the issue.

     

    I have a USB/serial cable that works perfectly fine for Modbus communication between my laptop and the servo motor... but apparently is NOT working between the CLICK PLC and my laptop. When I use the AutomationDirect cable (phone line with blue converter), I can receive communication from the PLC perhaps all the time (with one laptop communication app) and maybe 30% of the time with another laptop app.

     

    Ultimately I do not NEED to communicate to the laptop (I'm only using it to test the communication) but I do need to talk Modbus between the PLC and my servo motor. So, I'm making a custom cable (shielded) with RJ12 on one side and a connector on the other that mates with the motor.

     

    Lastly the Tx and Rx LEDs on the PLC blink very weakly, looking visually. Is that normal? Other LEDs on the PLC (like for Ethernet) are much brighter.

    Expand Post
  • OkiePC (Customer)

    Here's a 3 second video of a Click Plus with the RS485 transmit LED (from a project on my test bench). It isn't connected to anything, but in my experience, the brightness has been about the same as the RS-232 port with or without a device connected.

    I would think the LED brightness shouldn't be reduced unless there's something wrong with the hardware. The duration of the flashes is quite short. My program is polling VFDs for Modbus Holding registers. First it tries to write 2 registers and then read 14 registers, then repeats. 9600 baud, by the way.

    Expand Post
    • CLICK343CMORE810 (Customer)

      Thanks for the video. I think my LED flashing is not as bright, but can't be sure.

       

      Anyway, I found a workaround and "fixed" the issue.

       

      When communicating Modbus from my laptop to the servo motor, with a USB/serial converter, it communicates fine.

      When I use that same cable to attempt communication from the PLC (host) to my laptop (slave), does NOT work.

      When I use a homemade cable from the PLC port to my servo motor, does NOT work.

       

      If I use the Automation Direct cable, with the laptop to the PLC, it works.

      When I replace the homemade cable (which required multiple connectors in series from the RJ12) with a new homemade continuous cable with connectors only at each of the cable (and a shielded cable)... the PLC will talk Modbus to the servo motor.

       

      So, when I was having issues every cable was "right", and every wire went to the proper terminal. But apparently the Click serial port is marginal in its ability to communicate with cables that work perfectly fine with other serial devices. My PLC program was fine.

      Expand Post
10 of 13