riandanualdy

modbusrtu How to connect omron CP1E with modbus RTU

19 posts in this topic

Hallo, i want to connect PLC Omron CP1E to indicator weighing scale with modbusRTU connection and i have a CP1W-CIF11 module to connect indicator with CP1E. ,but I have no experience in RTU modbus communication in the PLC.

How do i start?

 

*i just need output:

1. Coil (Reference No = 0. Output bits) for input switch with address 3 (Tare).

2.Input Status (Reference No = 1) for output lamp with address 17 (stable)

3.Input register (Reference No = 3) to read data with address 5 (gross weight)

4. holding register (Reference No = 4) to write comparison data with address 17(over)

page 85 - 94 in attachment

 

 

ad4402_manual.pdf

Share this post


Link to post
Share on other sites
10 minutes ago, riandanualdy said:

Hallo, i want to connect PLC Omron CP1E to indicator weighing scale with modbusRTU connection and i have a CP1W-CIF11 module to connect indicator with CP1E. ,but I have no experience in RTU modbus communication in the PLC.

How do i start?

 

*i just need output:

1. Coil (Reference No = 0. Output bits) for input switch with address 3 (Tare).

2.Input Status (Reference No = 1) for output lamp with address 17 (stable)

3.Input register (Reference No = 3) to read data with address 5 (gross weight)

4. holding register (Reference No = 4) to write comparison data with address 17(over)

page 85 - 94 in attachment

 

 

ad4402_manual.pdf

Please check this manual below about Modbus RTU Easy Master at section 14-4 page 245 - 253

https://assets.omron.eu/downloads/manual/en/e480_cp1e_users_manual_en.pdf

Share this post


Link to post
Share on other sites
1 hour ago, riandanualdy said:

how about wiring CP1W-CIF11 if my indicator is use 3 wire (A,B,ground)?

You don't need to connect SG please follow this connection below

CP1W-CIF11     <------------>       AD-4402

RDA-  <------------>   SDA

RDB+  <------------>  SDB

If it cannot connect swap cable

CP1W-CIF11     <------------>       AD-4402

RDA-  <------------>   SDB

RDB+  <------------>  SDA

Share this post


Link to post
Share on other sites
3 hours ago, Wasan said:

You don't need to connect SG please follow this connection below

CP1W-CIF11     <------------>       AD-4402

RDA-  <------------>   SDA

RDB+  <------------>  SDB

If it cannot connect swap cable

CP1W-CIF11     <------------>       AD-4402

RDA-  <------------>   SDB

RDB+  <------------>  SDA

i done use

RDA- <--> SDA & RDB+ <--> SDB

or

RDA- <--> SDB & RDB+ <--> SDA

and i use this cx programmer, but the a641.00 value is not 1 but the a641.02 value is 1 and if i check memory a641.02 is 90.

what should i do now?
 

modbus coba coba euy (2).cxp

a641.png

d1300-d1305.png

Share this post


Link to post
Share on other sites
59 minutes ago, riandanualdy said:

i done use

RDA- <--> SDA & RDB+ <--> SDB

or

RDA- <--> SDB & RDB+ <--> SDA

and i use this cx programmer, but the a641.00 value is not 1 but the a641.02 value is 1 and if i check memory a641.02 is 90.

what should i do now?
 

modbus coba coba euy (2).cxp

a641.png

d1300-d1305.png

There are Error Code Response Timeout please check communication parameter (Baud Rate, Data Bit, Stop Bit, Parity Bit) that match setting with CP1E and AD-4402

CP1E_Modbus_01.jpg

CP1E_Modbus_02.jpg

CP1E_Modbus_03.jpg

Share this post


Link to post
Share on other sites

You should use A641.00 to A641.02 that belong to Optional Serial Port If you use A640.00 to A640.02 It is belong to Built-in RS-232 Port.

Maybe you should check program as below and clear PLC Memory (There are some random data on D1300 - D1400) and download project again.

CP1E_Modbus_05.jpg

CP1E_Modbus_06.jpg

modbus coba coba euy V 3.cxp

Share this post


Link to post
Share on other sites
17 hours ago, Wasan said:

You should use A641.00 to A641.02 that belong to Optional Serial Port If you use A640.00 to A640.02 It is belong to Built-in RS-232 Port.

Maybe you should check program as below and clear PLC Memory (There are some random data on D1300 - D1400) and download project again.

CP1E_Modbus_05.jpg

CP1E_Modbus_06.jpg

modbus coba coba euy V 3.cxp

i try your ladder diagram and i change wiring SDA- to A and SDB+ to B or SDA- to B and SDB+ to A is connected and indicator of com in CP1w-cif11 is on. yesterday i think the wiring is wrong and now is correct. but now if i check in memory d1305-d1349 it's cannot change (Screenshot_27.png), what should i do?

if i want to display data address 3,5,7, is it already correct my cx programmer?

Thank you

 

 

Screenshot_28.png

Screenshot_27.png

modbus coba coba euy V 3.cxp

Share this post


Link to post
Share on other sites

Please check that you config Modbus parameter on AD-4402 match with CIF11 parameters and set D1300 to #0001 that means Modbus slave address 1.

modbus coba coba euy V 4.cxp

Share this post


Link to post
Share on other sites
20 hours ago, Wasan said:

Please check that you config Modbus parameter on AD-4402 match with CIF11 parameters and set D1300 to #0001 that means Modbus slave address 1.

modbus coba coba euy V 4.cxp

i think cx programmer is work, and the output is in memory d1355 or more. but i have a question, why the output is just <1 second and after that back to "0", how to repair that?

thank you

Share this post


Link to post
Share on other sites

example: 5 second still "0" after that output is "1234" after < 1 second back to "0".

i just want the output "1234" stay >1 second

Edited by riandanualdy

Share this post


Link to post
Share on other sites
1 hour ago, riandanualdy said:

example: 5 second still "0" after that output is "1234" after < 1 second back to "0".

i just want the output "1234" stay >1 second

Please change D1303 to #0005 and D1304 to #0006 then check D1350 should be 1 and D1352 should be 0 and D1354 to D1359 should be data that read from AD-4402.

Please capture data monitor screen to check result.

Share this post


Link to post
Share on other sites
4 hours ago, Wasan said:

Please change D1303 to #0005 and D1304 to #0006 then check D1350 should be 1 and D1352 should be 0 and D1354 to D1359 should be data that read from AD-4402.

Please capture data monitor screen to check result.

sir, the problem is change value the memory just <1 second so i can't print screen the memory, how to show the value for >1 second ?

1 person likes this

Share this post


Link to post
Share on other sites
15 minutes ago, riandanualdy said:

this is the result of your cx programmer and i change D1303 to #0005 and D1304 to #0006  . the 4402 show the value of scale is 20,68kg

Untitled.jpg

modbus coba coba euy V 4.cxp

D1355 is #0008 D1356 is #1400 When you combine it will be #0814 that equal 2068 at decimal (use calculator in program mode).

For decimal point number read address #0001.

1 person likes this

Share this post


Link to post
Share on other sites
15 hours ago, Wasan said:

D1355 is #0008 D1356 is #1400 When you combine it will be #0814 that equal 2068 at decimal (use calculator in program mode).

For decimal point number read address #0001.

can you explain me about function of memory d1302,d1303,d1304,d1305 ?

i know this cx programmer for input register, because i still confused for coil, input status, and holding register how to use it in cx programmer?

coil work like switch, holding register is to write and read data, input status is like output lamp (indicator lamp)

Thankyou

coil status.png

holding register.png

input register.png

input status.png

Share this post


Link to post
Share on other sites
7 hours ago, riandanualdy said:

can you explain me about function of memory d1302,d1303,d1304,d1305 ?

i know this cx programmer for input register, because i still confused for coil, input status, and holding register how to use it in cx programmer?

coil work like switch, holding register is to write and read data, input status is like output lamp (indicator lamp)

Thankyou

For Function of D1300 to D1304 describe as follow

D1300 --> Slave Address

D1301 --> Function Codes (01, 02, 03, 04, 05, 06, 16)

D1302 --> Number of Communication bytes (count byte data from D1303 to Finish byte for example use D1303 and D1304 are 4 bytes [1 word = 2 bytes])

D1303 --> For Function Code 04 (Read Input Registers) are Start Address that you need to read

D1304 --> For Function Code 04 (Read Input Registers) are number of address that you need to read

For other modbus functions please check this manual first to understand about modbus data frame for each function

http://modbus.org/docs/Modbus_Application_Protocol_V1_1b3.pdf

Share this post


Link to post
Share on other sites
On 9/28/2018 at 5:10 PM, Wasan said:

For Function of D1300 to D1304 describe as follow

D1300 --> Slave Address

D1301 --> Function Codes (01, 02, 03, 04, 05, 06, 16)

D1302 --> Number of Communication bytes (count byte data from D1303 to Finish byte for example use D1303 and D1304 are 4 bytes [1 word = 2 bytes])

D1303 --> For Function Code 04 (Read Input Registers) are Start Address that you need to read

D1304 --> For Function Code 04 (Read Input Registers) are number of address that you need to read

For other modbus functions please check this manual first to understand about modbus data frame for each function

http://modbus.org/docs/Modbus_Application_Protocol_V1_1b3.pdf

Finally i can use the modbus all of them, Thank you and have a nice day

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now