How to configure MODBUS in Omron PLC CP1E

MODBUS is used for serial communication protocol used for communicating the Modbus supporting devices with PLC. Before configuring Modbus in CP1E let us understand a little about MODBUS. What is MODBUS? Modbus is implemented using the RS485 port and communication between the Master and slaves is through the data format .In Modbus network 32 slaves can be connected with a unique node ID from 1 to 247 .There are many varaiation of Modbus like Modbus RTU , Modbus ASCII , MOdbus TCP etc.
But MOdbus RTU is mostly used to communicate with PLC.
To setup Modbus Communication in Omron CP1E , we have to make some settings .
First of all CP1W-CIF11 is required i.e RS485 Port and u have to set it DIP switches .Since it will be a 2 wire connection so put all the DIP SWITCHES ON except Dip Switch number 4 . See below table to know DIP switch Setting for MODBUS Communication :-

NOTE- Click On the photo for a clear view.
Also take a look that how CP1W-CIF11 RS485 port looks . At the front side it has 5 terminals for the connection and at the back side it has DIP switches . Front side has 1)RDA- 2)RDB+ 3)SDA- 4) SDB+ 5) FG namely. Connect two wire on 1 and 2 or 3 and 4 , and shield to FG . Remember always use shielded cable in MODBUS communication.
Connect as shown in below Diagram. Connect the other end of wires to the device which u want to communicate in MODBUS. Always remember connect "+" with "+" and "-" with "-" .

NOTE- Click On the photo for a clear view.
Now all the necessary hardware settings are down , Now we just need to do some settings in PLC. Just Open CX-Programmer and select CP1E model . After go to Project Workspace and right click on settings , select serial-option port tab and in mode select MODBUS RTU Master and baud rate as supported by the slave side . Remember baud rate should be same at both the sides . After making these settings save it and download settings to PLC and re-power PLC. Hurry !! now yours CP1E is ready for Modbus Communication , all you need is that connect the slave modbus devices which u wish to connect in MODBUS network .See below picture for settings.

NOTE- Click On the photo for a clear view.
After all these settings yours CP1E is ready to communicate in MODBUS but now you have to write the Program for communication in a standard data format . In Modbus the standard format is :-
Device address --- function code --data -----error check

All the Modbus supporting device follow this standard format. In Cp1E fixed DM words are defined for sending these data format to slave devices .
DM1300-DM1399 are used for this purpose , once you write the desired format then just on the system bit A641.0 to send the above query to the desired slave device.
We will discuss it in depth in the next posts as how to communicate with drives , HMI , Energy Meter etc in MODBUS with our PLC and how to read & write data in them .
So Keep reading here and if u have any doubts you can Contact US or leave a comment and we will get back to you as early as possible. Dont forget to SUBSCRIBE for such more posts.
Subscribe to Automation-Talk by Email.

Advertisements :-

61 comments:

  1. SIR,

    I WANT TO COMM. CP1E WITH DELTA HMI.SEND ME THE PROGRAMMING TO SET THE DATA IN PLC

    ReplyDelete
  2. yes surely we will help you .... send us the detail ...which delta hmi you are using and how you want to communicate ....in modbus or via rs232 serial.....?

    ReplyDelete
  3. i am using dop-a series hmi and omron cp1e plc. want to communicate thro modbus rs 485.

    ReplyDelete
  4. delta make dop-as series HMI and omron cp1e-n30 series plc

    ReplyDelete
  5. I think you should not have any problem in there communication.
    Just connect your CP1E Modbus Connector CIF11 to Delta HMI Modbus port i.e positive to positive and negative to negative.

    ReplyDelete
  6. Its clearly mentioned in the post about the connection and dip switch settings of CIF 11 ,
    which data you want to set in PLC??
    if you want PLC program ....we will make it for you ...which data words of HMI you want to read/write ...just send their address ....we will make a PLC Program Accordingly .....also tell urs mail id ....
    meanwhile see our otherpost under MODBUS we have expalined more overthere ....
    is urs connection in MODBUS OK?? first assure that and then proceed.

    ReplyDelete
  7. i have done external wiring as you mentioned above. but i do not know, to do programming in plc ladder .ie. to set d1300 - d1399

    ReplyDelete
  8. well as explained clearly in post, there is a fixed query format in MODBUS for read/write purpose , you have to accordingly set data in them for example to read u have to write...
    d1300- node id
    d1301- function code of read (o3)
    d1302 - number of bytes to read (o4)
    d1303 - address of register to read + 1
    d1304 - Number of address to read (02)
    d1305 - CRC
    move the data usig mov instruction
    example
    open cx programmer
    press I and type MOV #1 d1300 and so on for remaining .
    and turn on a641.0 to send query ....
    may be it will help you.

    ReplyDelete
  9. External connection OK. cp1e cif11 comm.indicator flikering.

    # modbus standard format-send me one example

    # delta hmi dop-as series- controller name(PLC-Master)

    #mail id:lovindhas@intechgroup.in

    ReplyDelete
  10. d1303 - address of register to read + 1
    d1305 - CRC

    what does it mean +1, crc

    ReplyDelete
  11. d1305 - CRC......what is crc. tell me the hmi controller name.....

    ReplyDelete
  12. CRC is for error check ...if you dont write this then also ok ...no problem .....
    Generally in MODBUS when we read the dat from slave device then we add 1 in address of register ..well it depends on slave characteristic also ...whether too add or not ...but most of cases we have to add 1 and subtract 1 while writing the value..

    ReplyDelete
  13. What HMI Controller name . You dont need it :)

    ReplyDelete
  14. thank you. what must be the base port controller in hmi dop as series.(screen editor software)

    ReplyDelete
  15. hmi controller name......
    mentioned below are omron, modbus subdivison controllers
    ex:omron-c series
    -cj1 series
    -tpm1a
    modbus-ascii(master)
    -984 rtu(master)
    -rtu 2w (master)
    -ascii hex address(master)
    -rtu hex address(master)
    -ascii nw (master)
    -rtu nw (master)
    -ascii(slave)
    -rtu (slave)
    -tcp/ip

    in which......i want to select on particular controller. then only it work correctly. pls sort out this .

    ReplyDelete
  16. Ok Means your HMI software needs controller Name.
    Please choose C series Controller. CPM1A should work.

    ReplyDelete
  17. i tried out c-series, it doesnt work.

    ReplyDelete
  18. send me plc and hmi sample program.

    ReplyDelete
  19. Try rtu hex address(master)
    you can select this if c series does'nt work...

    ReplyDelete
  20. ok. i will try this......will come back soon.

    thank you.May i know you name.

    ReplyDelete
  21. We are Automation Talk Team.

    ReplyDelete
  22. hi
    communication done. ok.
    one thing, time delay in transmitting the data and
    receving data. what problem..............?

    ReplyDelete
  23. ABLE TO COMMUNICATE.
    THANKS FOR YOUR TEAM

    ON ISSUE.
    TIME DELAY WHILE SENDING/ RECEVING DATA.
    WHILE CHECKING ERROR LOG, I FOUND CRC ERROR.
    HOW TO SOLVE........

    ReplyDelete
  24. We generally don't use CRC.
    As you have said. You will require some time delay in reading and writing in Data register as you cannot read and write data same time from DM1300

    ReplyDelete
  25. to solve time issue problem
    open cx-programmer -- go to settings --select serial option port ---on the left hand bottom side ...response time out is there make it minimum
    also connect shield to FG terminal in CIF11 port.
    delay generally is due to noisy environment , so use shielded cable and connect to FG.

    for CRC ISSUE ... see the manual of DELTA hmi ..it will be there ...if not then try putting CRC AS 778D ..not sur it will work or not as every slave device has its own crc ...so better read manual carefully.

    ReplyDelete
  26. If you like ours blog ...spread it among all automation engineers ....

    Learn --->> Share ---->> Innovate

    ReplyDelete
  27. Ya sure.... i will do........

    once again thanks for your team......
    Regards,
    P.Lovin

    ReplyDelete
  28. how to communicate OMRON K3HB with DELTA DVP PLC

    ReplyDelete
  29. let us know how u want to communicate ... through RS232 or ....device net .. compo way ? which port u have at plc side?

    ReplyDelete
  30. THRO COMPO WAY......... RS485 IN DELTA PLC

    ReplyDelete
  31. thro compoway--------Com port 2, rs 485 in Delta PLC.

    ReplyDelete
  32. @Anonymous
    Use Shielded Cable , connect + of Delta Rs485 with terminal B and - with terminal A.

    Command Frame as :-

    STX - O2 (hexadecimal)
    Node No. - Which U set in K3HB
    Sub Address - Put this as 0.
    SiD - Put this also as 0.
    FINS-mini Command text :- Here write text command.
    ETX :- Put this 0.
    BCC :- It will be value resulted from EX-or Operation of values of STX to ETX.

    ReplyDelete
  33. how to use the interrupt instruction in omron cj2m plc

    ReplyDelete
  34. send sample program using schedual interrupt and inbuilt interrupt.

    i am using cj2m plc

    regards,
    p.lovin

    ReplyDelete
  35. Hi,please i need help.
    I want to connect with a rs485 device with a cp1e with cif11 instaled,i've configured the cif11.
    the frame for this device is:
    SOH ASCII
    ID
    COMMAND
    DATS
    CHEKSUM
    EXT ASCII

    HOW CAN I MAKE THE CHECKSUM? AND WHERE IS THE CHECKSUM? D1305? D1306?
    AND WHERE THE STOP? 03

    ReplyDelete
  36. CRC you can find in slave device manual.
    CRC will be in the last word of your query to slave device.

    ReplyDelete
  37. I will connect plc omron CP1L premises inverterfrenics use rs-485 interface, how to make a ladder and settings in omron plc and settings in the inverter?

    ReplyDelete
  38. HI..
    I HAVE TO COMMUNICATE OMRON PLC WITH DELTA DOP B SERIES HMI THROUGH RS232, ANY ONE HELP ME HOW TO GIVE ADDRESS IN DELTA HMI FOR OMRON PLC...

    ReplyDelete
  39. Hi R.ARUNACHALAK Kani,

    See below link.

    http://www.automation-talk.info/2011/06/delta-hmi-to-plc-modbus-communication.html

    ReplyDelete
  40. pls let me know...omron CP1E-N30DR-A will work as slave with SCADA?

    ReplyDelete
  41. sir, i want to communicate omron drive(3g3m2) with omron plc, i don;t know the basics setting , so please give me a link from where i can startup , and communicate it for first time , so please help me

    ReplyDelete
  42. @Malkeet > You are communicating through which protocol ??

    ReplyDelete
  43. What could be reasons for A641.02 error flag (CP1E case)? Is it wrong wiring? Wrong communication settings? I am trying to make CP1E-N (Modbus Easy via CP1W-CIF11) and Toshiba VFNC3 (Modbus RTU) speed drive communicate with eachother but get this error flag all the time. Cabling should be correct, I have tried with different comm settings, no result.

    ReplyDelete
  44. @Deathster > Have you set your CP1W-CIF11 connector.

    ReplyDelete
  45. @deathster Hope you are using correct serial option port setting as shown in above image. The setting should be same in PLC and as well as in modbus RTU you are using. Please also check for any loose wiring if its is OK, then you can do a polling test.

    Also if every thing seems fine from PLC end then please check your drive for Modbus setting. You may have to power on and off after saving settings in drive.

    ReplyDelete
  46. Same problem with CP1E and MX2, can not get them to communicate /A641.02 is on) although port/software/physical settings are done properly. COMM led is not blinking at all. I did com port reset A526.01, no result, still no communication.
    I started to think whether CP1W-CIF11 is defect and connected with Weintek HMI (via same port but Hostlink protocol and this way I get communication between CP1E and HMI, so CP1W-CIF11 is ok).
    Confused.

    ReplyDelete
  47. D1352 has 0004hex message which means there is no comm board (there is!) or comm mode is not Modbus-RTU Easy Master (both CP1E and MX2 have same settings).

    ReplyDelete
  48. Is there any place where I could get explanation of error codes. I mean explanation what has caused it and possible remedies. I am doing some progress and now I get 88hex error (it means exception response from slave but what has caused this?)

    ReplyDelete
  49. Please check http://2.bp.blogspot.com/-qTMkY-2S35I/UIk4CRAJ_kI/AAAAAAAAFz8/GDefO8TI_KM/s1600/CP1E%2BDM.png for DM Words.


    I we are missing some thing. It should be working. Please read how to set MX drive modbus setting. We also have same issue once.

    ReplyDelete
  50. SIR,

    I WANT TO COMM. CP1E WITH CONZERV EM6433(ENERGY METER).SEND ME THE PROGRAMMING TO READ THE DATA IN PLC...PLEASE REPLAY ASAP

    ReplyDelete
  51. @Kamal,

    Please check below link. I am sure it will help you.

    http://www.automation-talk.info/2010/12/conzerv-energy-meter-em6436-modbus.html

    ReplyDelete
  52. How can I do for have my CP1E-NA20 as a Modbus SLAVE ??

    ReplyDelete
  53. I did it, but as you can see the article explains only the Master side configuring the serial port as MODBUS RTU MASTER. How about the client (slave) side? How can I configure a PLC CP1E as Client ?.

    ReplyDelete
  54. Hi can you help me? i done modbuss connection using omron cp1e and plc can read pv value from temperature controller. how can i do to plc read data for sv from TC. Thank you

    ReplyDelete
  55. can you explaine how to communicate omron cp1e n60 plc with delta vfd-L series with programme or with example
    my mail id
    sukantanayak1979@gmail.com

    thank you

    ReplyDelete
  56. I want to use a cp1e nn0 plc with mach3.
    any programs or with examples that can help me will be appreciated.
    owenpattrick@yahoo.com
    Thanks

    ReplyDelete
  57. please send me the addressing of all the parameters for modbus communication in omron cp1h plc to communicate with any ac drive... and also the format in which we have to write the program

    ReplyDelete

Get New Updates

Enter your email address:

Delivered by FeedBurner

Receive all updates via Facebook. Just Click the Like Button Below