riandanualdy

HOW TO CONNECT PLC OMRON CP1E TO RS485 DEVICE (CLEAR)

35 posts in this topic

Posted (edited)

Hallo, i want to connect Omron PLC CP1E use CP1W-CIF11 to AD4329A with RS485 communication. 

my wiring is

CP1w-CIF11     AD4329A

SDA-                  SDA & RDA

SDB-                 SDB & RDB

and until now, i cant get data from AD4329A. Do you have any clue for this project?
 

Thank you
Riandanu

PLC to 4329A coba.cxp

ad4329aex.pdf

Screenshot_1.png

Screenshot_2.png

Edited by riandanualdy

Share this post


Link to post
Share on other sites

Posted (edited)

On 4/20/2019 at 3:16 PM, Wasan said:

@riandanualdy Maybe you need to adjust DIP switch on CP1W-CIF11 in pin 2 and 3 to on for use RS-485 2 wire.

https://www.support-omron.fr/telechargements/documentations/2017-10-06%20-%2015-19-10%20-%201425040277/CP1W-CIF11%20W471-E1-01.pdf

Sure i done adjust DIP switch pin 1,2,3 ON and 4,5,6 OFF, but still cant get the data.

Is that the setting of PLC Settings and ladder diagram is true? because im not sure about that.

Edited by riandanualdy

Share this post


Link to post
Share on other sites

@riandanualdy I think you use stream mode If you have USB to RS-485 converter you should connect with weigh scale then press print button and check that data are out to hyperterminal (or similar software) or not. If not maybe you should use commnication command mode (F41 = 3).

Share this post


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

@riandanualdy I think you use stream mode If you have USB to RS-485 converter you should connect with weigh scale then press print button and check that data are out to hyperterminal (or similar software) or not. If not maybe you should use commnication command mode (F41 = 3).

I use 4 cable,

CP1W   4329A

RDA      SDB

RDB      SDA

SDA      RDA

SDB      RDB

and i attach the screenshot of cx programmer

but still i cant get the data from weighing scale if i push print (Manual Print Mode).

Screenshot_3.png

Share this post


Link to post
Share on other sites

@riandanualdy I have seen D10 have data value entry and complete flag A382.14 is on. You should monitor value at Memory on the left menu then check at D10 on text mode to monitor data.

CP1E_ASCII_Monitor_00.jpg.a61506f04f16a9

CP1E_ASCII_Monitor_01.thumb.jpg.45acc534

Share this post


Link to post
Share on other sites
1 minute ago, Wasan said:

@riandanualdy I have seen D10 have data value entry and complete flag A382.14 is on. You should monitor value at Memory on the left menu then check at D10 on text mode to monitor data.

CP1E_ASCII_Monitor_00.jpg.a61506f04f16a9

CP1E_ASCII_Monitor_01.thumb.jpg.45acc534

This is the memory D10. Actually the output from 4329A is ST,GS,+00001.3 kg (example).

Screenshot_4.png

Share this post


Link to post
Share on other sites

@riandanualdy Maybe you should clear PLC memory and connect with weight module then push print button and check data again.

Share this post


Link to post
Share on other sites
48 minutes ago, Wasan said:

@riandanualdy Maybe you should clear PLC memory and connect with weight module then push print button and check data again.

i done clear PLC memory and push print and check data again in D10 output still 00 but A394 is 16 and i think A394 is true because total data is 16,

 

Screenshot_5.png

Screenshot_6.png

Share this post


Link to post
Share on other sites

The manual that you attached for the AD4329 does not mention any ability to support RS485.  It only shows RS232.  Are you sure that it supports RS485?  Are you using a converter between the AD4329 and the CP1E to change from RS232 to RS485?

Share this post


Link to post
Share on other sites
11 hours ago, Michael Walsh said:

The manual that you attached for the AD4329 does not mention any ability to support RS485.  It only shows RS232.  Are you sure that it supports RS485?  Are you using a converter between the AD4329 and the CP1E to change from RS232 to RS485?

This is manual book for RS485

OP-03-AD4329A.docx

Share this post


Link to post
Share on other sites

Posted (edited)

@riandanualdy You should set dip switch 1 on CP1W-CIF11 to Off because you don't have terminate resistor at weigh sensor. Then you should use set F-47 value to be 1 for use RS-485.

Edited by Wasan

Share this post


Link to post
Share on other sites
50 minutes ago, Wasan said:

@riandanualdy You should set dip switch 1 on CP1W-CIF11 to Off because you don't have terminate resistor at weigh sensor. Then you should use set F-47 value to be 1 for use RS-485.

i done change dip switch all of them is OFF and change F-47 to 1.  and still cant get the data, just get from A394 is &16 and its true because total of data is 16 digit.

Share this post


Link to post
Share on other sites

For testing purposes, change your ladder rung to this:

RXDsample.jpg.275c9bdb5ba3406fd7a1051b48

and let us know what happens.

Or, put a bit in place of the P_1s contact that you are not using elsewhere and turn it on manually when A394 = 16.  Then check D10 (or D0 as I have done above).

Share this post


Link to post
Share on other sites

Posted (edited)

9 hours ago, Michael Walsh said:

For testing purposes, change your ladder rung to this:

RXDsample.jpg.275c9bdb5ba3406fd7a1051b48

and let us know what happens.

Or, put a bit in place of the P_1s contact that you are not using elsewhere and turn it on manually when A394 = 16.  Then check D10 (or D0 as I have done above).

Hello Mr Michael, I done checking D0 and data is same with AD4329a, but maybe sometimes if i push manually repeatly, A392.12 is on, A392.14 is off and can't get data and i think cant send data again after a392.12 is on.

but my question is what different with your ladder diagram and my ladder diagram before? can you explain to me?

Screenshot_7.png

Screenshot_8.png

Edited by riandanualdy

Share this post


Link to post
Share on other sites

What is different is that the P_1s bit is a one-shot (differentiate UP).  It is only on for one scan.  Right click on the contact and choose differentiate up. 

My thought is that using the P_1s bit will allow the code to clear out the buffer.  For some reason, A392.14 is staying on, so the RXD instruction is only executed one time.  There is clearly data in the buffer since A394 = 16, so the P_1s bit would empty out the buffer.  Perhaps your device is sending multiple versions of the same string?  See if there is a setting to have it only send one at a time.  You could also connect this up to a PC with an RS232 adapter to look at it with a Hyperterminal like progam to see what your device is sending.

Share this post


Link to post
Share on other sites

Posted (edited)

14 hours ago, Michael Walsh said:

What is different is that the P_1s bit is a one-shot (differentiate UP).  It is only on for one scan.  Right click on the contact and choose differentiate up. 

My thought is that using the P_1s bit will allow the code to clear out the buffer.  For some reason, A392.14 is staying on, so the RXD instruction is only executed one time.  There is clearly data in the buffer since A394 = 16, so the P_1s bit would empty out the buffer.  Perhaps your device is sending multiple versions of the same string?  See if there is a setting to have it only send one at a time.  You could also connect this up to a PC with an RS232 adapter to look at it with a Hyperterminal like progam to see what your device is sending.

Mr. @Michael Walsh i think if i push print randomly with that ladder diagram, A392.12 is ON, A392.14 is OFF and must restart PLC again if want to send data (A392.14).

And if i use Stream Mode (Send Data Continously), i think can't use this ladder diagram.

any solution so i can compare the weight data (just number) like this picture and ladder diagram?

Thank you

4329A TO CP1E MOV DATA.cxp

Screenshot_9.png

Edited by riandanualdy

Share this post


Link to post
Share on other sites

@riandanualdy Maybe you should restart communication port by set value to A526.01 after read data.

Share this post


Link to post
Share on other sites
On 4/27/2019 at 0:12 AM, Wasan said:

@riandanualdy Maybe you should restart communication port by set value to A526.01 after read data.

its working i think, i try use stream mode (send data repeatly) the memory can save data from weighing scale but sometimes A392.12 is ON and cant go off again,

And i read A392.12 description is ON when a communications error has occurred at the serial option port. The port must be restarted when this flag turns ON.

What is port address for me to restarted when A392.12 is ON?

Screenshot_10.png

Screenshot_11.png

Share this post


Link to post
Share on other sites

I agree with the above suggestion. The P_1s suggestion was just for testing purposes.  I do not propose that you keep it that way.  

Share this post


Link to post
Share on other sites

Posted (edited)

20 hours ago, Wasan said:

@riandanualdy You should set A526.01 to On for reset Option Serial Port. Maybe you should use program like this.

 

CP1E_RXD_01.thumb.jpg.33bcb616513461657e

 

For more information please check at this manual at page 242.

 

http://www.edata.omron.com.au/eData/PLCs/CP1/W480-E1-08.pdf

@Wasan @Michael Walsh yeah i done try your ladder diagram, and its working.

How about the TXD? if i use command mode and the example of command is MTCrLf or MZCrLf.

i done try to create ladder diagram, but i think its not working at all, but i think PLC done send data because if i change 0.02 to On the led in CP1W-CIF11 is blinking.
Thank you

 

 

Screenshot_10.png

Screenshot_11.png

Edited by riandanualdy

Share this post


Link to post
Share on other sites

@riandanualdy First you should set D10 and D11 before TXD. For the last parameter of TXD you set at 2 bytes that means you send only "MT" (1 words or 1 D = 2 bytes = 2 Chars) If you need to send with <CR><LF> you should adjust to [TXD D10 #0200 &4]. If it is not correct maybe you should swap data to #544D and #0A0D.

Share this post


Link to post
Share on other sites
On 4/30/2019 at 9:41 AM, Wasan said:

@riandanualdy First you should set D10 and D11 before TXD. For the last parameter of TXD you set at 2 bytes that means you send only "MT" (1 words or 1 D = 2 bytes = 2 Chars) If you need to send with <CR><LF> you should adjust to [TXD D10 #0200 &4]. If it is not correct maybe you should swap data to #544D and #0A0D.

I think i dont have a problem with command Zero and Tare, but if i use command RWCrLf to get weighing data the output is random not like stream mode or manual print mode, normally the output is ST,GS,+0000825 kg CrLf.

What should i do if i want to get the normally data?

Screenshot_1.png

rs485 CP1E - AD4329A.cxp

Screenshot_2.png

Screenshot_3.png

Screenshot_4.png

Share this post


Link to post
Share on other sites

Posted (edited)

@riandanualdy I think there are some data are echo-back at your CP1W-CIF11 maybe you should try to send other command that no data response (Zero, Tare etc.) and check that D register at RXD (I guess that you use D60) recieve data or not.

Edited by Wasan

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