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 :-

60 comments

  1. pkb // November 26, 2010 at 11:30 PM  

    Great Work buddy.

  2. Anonymous // January 4, 2011 at 6:18 PM  

    SIR,

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

  3. Injy // January 4, 2011 at 6:22 PM  

    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.....?

  4. Anonymous // January 4, 2011 at 9:30 PM  

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

  5. Anonymous // January 4, 2011 at 9:34 PM  

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

  6. FYP // January 4, 2011 at 9:37 PM  

    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.

  7. Injy // January 4, 2011 at 9:56 PM  

    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.

  8. Anonymous // January 4, 2011 at 9:56 PM  

    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

  9. Injy // January 4, 2011 at 10:06 PM  

    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.

  10. Anonymous // January 4, 2011 at 10:11 PM  

    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

  11. Anonymous // January 4, 2011 at 10:16 PM  

    d1303 - address of register to read + 1
    d1305 - CRC

    what does it mean +1, crc

  12. Anonymous // January 4, 2011 at 10:35 PM  

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

  13. Injy // January 4, 2011 at 10:55 PM  

    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..

  14. FYP // January 4, 2011 at 11:15 PM  

    What HMI Controller name . You dont need it :)

  15. Anonymous // January 4, 2011 at 11:19 PM  

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

  16. Anonymous // January 4, 2011 at 11:47 PM  

    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 .

  17. FYP // January 4, 2011 at 11:52 PM  

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

  18. Anonymous // January 4, 2011 at 11:58 PM  

    i tried out c-series, it doesnt work.

  19. Anonymous // January 5, 2011 at 12:06 AM  

    send me plc and hmi sample program.

  20. Injy // January 5, 2011 at 12:16 AM  

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

  21. Anonymous // January 5, 2011 at 12:26 AM  

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

    thank you.May i know you name.

  22. AT // January 5, 2011 at 12:35 AM  

    We are Automation Talk Team.

  23. Anonymous // January 6, 2011 at 4:20 PM  

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

  24. Anonymous // January 6, 2011 at 4:36 PM  

    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........

  25. FYP // January 6, 2011 at 4:46 PM  

    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

  26. Injy // January 6, 2011 at 4:50 PM  

    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.

  27. AT // January 6, 2011 at 6:21 PM  

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

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

  28. Anonymous // January 6, 2011 at 9:34 PM  

    Ya sure.... i will do........

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

  29. Anonymous // January 10, 2011 at 5:17 PM  

    how to communicate OMRON K3HB with DELTA DVP PLC

  30. Injy // January 10, 2011 at 5:51 PM  

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

  31. Anonymous // January 10, 2011 at 5:55 PM  

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

  32. Anonymous // January 11, 2011 at 11:43 AM  

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

  33. Injy // January 11, 2011 at 10:14 PM  

    @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.

  34. Anonymous // March 3, 2011 at 11:26 AM  

    how to use the interrupt instruction in omron cj2m plc

  35. Anonymous // March 3, 2011 at 11:33 AM  

    send sample program using schedual interrupt and inbuilt interrupt.

    i am using cj2m plc

    regards,
    p.lovin

  36. Anonymous // March 6, 2011 at 10:24 PM  

    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

  37. Injy // March 7, 2011 at 12:07 AM  

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

  38. ccapl // September 8, 2012 at 7:26 PM  

    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?

  39. R.ARUNACHALAK Kani // October 8, 2012 at 6:00 PM  

    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...

  40. FYP // October 8, 2012 at 10:22 PM  

    Hi R.ARUNACHALAK Kani,

    See below link.

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

  41. Siddu B M // October 19, 2012 at 1:10 PM  

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

  42. FYP // October 19, 2012 at 5:58 PM  

    Yes, why not.

  43. malkeet singh // October 20, 2012 at 10:31 AM  

    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

  44. FYP // October 20, 2012 at 6:21 PM  

    @Malkeet > You are communicating through which protocol ??

  45. deathster // October 23, 2012 at 4:02 PM  

    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.

  46. FYP // October 23, 2012 at 6:33 PM  

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

  47. deathster // October 23, 2012 at 7:26 PM  

    Yeah 4th switch off.

  48. FYP // October 23, 2012 at 9:42 PM  

    @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.

  49. deathster // October 25, 2012 at 3:16 PM  

    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.

  50. deathster // October 25, 2012 at 4:03 PM  

    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).

  51. deathster // October 25, 2012 at 4:23 PM  

    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?)

  52. FYP // October 25, 2012 at 6:33 PM  

    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.

  53. kamal sanwal // March 20, 2013 at 12:12 PM  

    SIR,

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

  54. FYP // March 20, 2013 at 3:18 PM  

    @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

  55. Andres Silva // November 18, 2013 at 6:15 AM  

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

  56. Pawan Bahuguna // November 18, 2013 at 10:33 AM  

    Andres Please check above steps.

  57. Andres Silva // November 20, 2013 at 7:07 AM  

    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 ?.

  58. Anonymous // May 22, 2014 at 7:07 AM  

    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

  59. Sukanta Nayak // May 30, 2014 at 2:28 PM  

    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

  60. Anonymous // June 15, 2014 at 1:19 AM  

    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

Post a Comment

Free Business and Tech Magazines and eBooks