Sign in to follow this  
Followers 0
Jack1995

RXD Function not functioning

11 posts in this topic

Hi, I am very new to PLC, this is my 1st time using RXD function, I am connecting my PLC (cp2e-N) to a weighing scale using RS-232c and I have try using both RXD function but i can't received any of the reading, I try @RxD after that but after receive few reading, it start to stop receive anything, wonder any problem with my program or setting. Attached is my program please help, Thanks

RXD.PNG

Setting.PNG

Share this post


Link to post
Share on other sites

I am not sure what setting a null character as the start code does.  I would set that to disable.  Instead of 2.00 I would suggest using A392.06 (Port 1 reception complete flag).  Also, what pinout are you using for the serial cable?  It is not a standard serial cable.

Share this post


Link to post
Share on other sites

Thanks  Michael, the serial cable is wired according to omron rs-232c wiring diagram. I tried with  A392.06 instead of 2.00 before but the A392.06 not being trigger, I'm not sure why but i will try with what u said and update about the status here, again thanks a lot .

Share this post


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

I am not sure what setting a null character as the start code does.  I would set that to disable.  Instead of 2.00 I would suggest using A392.06 (Port 1 reception complete flag).  Also, what pinout are you using for the serial cable?  It is not a standard serial cable.

Hi Michael, 1st of all thanks for your advise, I have tried after changing the setting as you told, it can read but not the value showing on the scale, and only read for once is there anyway to make RXD trigger by button? and I notice that the A392.06 is not being trigger, is that normal?

 

A392.06.PNG

Setting 2.PNG

Share this post


Link to post
Share on other sites

A392.06 turns on each time that new data is received.  It sounds like your scale is not constantly sending data.  Does the light blink on the serial port light?   Is it possible that your scale is not using CR+LF as a terminator?  Each time that the port sees CR+LF, A392.06 will turn on.  

Share this post


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

A392.06 turns on each time that new data is received.  It sounds like your scale is not constantly sending data.  Does the light blink on the serial port light?   Is it possible that your scale is not using CR+LF as a terminator?  Each time that the port sees CR+LF, A392.06 will turn on.  

No, the light on the serial port remains on after connect to the scale, it nvr blink. I m not sure if the sale is not using CR+LF as a terminator but i think it could be, I m currently asking the supplier bout the scale, if the scale is not using CR+LF as a terminator, does it means that it can't connect to PLC already or we can make it connect to PLC using different setting? Thanks 

 

Share this post


Link to post
Share on other sites

You can make it communicate, but you would need to know the terminator (end character(s)) or the length of the message if there is no terminator..  

Share this post


Link to post
Share on other sites
On 2/7/2020 at 9:14 PM, Michael Walsh said:

You can make it communicate, but you would need to know the terminator (end character(s)) or the length of the message if there is no terminator..  

noted, thanks michael 

Share this post


Link to post
Share on other sites

I try to use a pc software to connect to PLC to check with the function an notice, the value below A393 change every time i send a data, but the memory didn't get anything, is this normal?

 

Share this post


Link to post
Share on other sites
12 hours ago, Jack1995 said:

I try to use a pc software to connect to PLC to check with the function an notice, the value below A393 change every time i send a data, but the memory didn't get anything, is this normal?

 

This means the terminator is not the same as you have set for the serial port.  Your message must end in CR+LF  (0D0A hex) for the port to detect the end of each message and issue the RXD command.  

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
Sign in to follow this  
Followers 0