Sign in to follow this  
Followers 0
ngo4life

How to set up TXD and RXD between CJ1M CPU12 and CQM1 CPU41

9 posts in this topic

Hi all, I want to use TXD and RXD instructions to send and receive data to and from CJ1M to CQM1. How do I set up CJ1M and CQM1. I want to send data through RS232 not Peripheral port. Could anyone send me an example. Please help. Thank you very much.

Share this post


Link to post
Share on other sites
Take a look at this quick start example. TXD-RXD at MrPLC.com

Share this post


Link to post
Share on other sites
Do i need to download the program to both CJ1M plc and CQM1 plc. I tried that but i did not work. I also tried to download to just CJ1M but it didn't work. The same is for CQM1. I set the parameters according to the setting stated in the program. What did i do wrong?

Share this post


Link to post
Share on other sites
The code is only an example. You will need to modify it for your application. Do you have the correct cable? Did you download the proper settings to both cpus and then cycle power on both?

Share this post


Link to post
Share on other sites
I only got it to work in sending from CQM1 to CJ1M. It does not work if i send from CJ1M to CQM1. I tried everything. Please help

Share this post


Link to post
Share on other sites
The TXD instruction on the CJ1M functions differently then that same instruction in the CQM1. You need to watch the end code setting for the port in the PLC setup. You may be getting double end codes or possibly no end code. Make sure the number of bytes value is in hex. Check the error flag and the Send Ready flags. Just a couple of things I can think of to start.

Share this post


Link to post
Share on other sites
I use the TXD-RXD CS/CJ program that you posted. The setting for end code in the plc set up is 0x000D. One thing i notice is as soon as i turn on the InitiateComm bit 0.01, the Port Ready Flag turns off right the way. This does not happen in CQM1. I have to turn off power of the CJM1 and turn it back on to turn the Port Ready Flag on.

Share this post


Link to post
Share on other sites
The Port Ready Flag turns off while the port is busy. If the flag does not turn back on, it means the instruction is still trying to send the string. Check the setup of the port in PLC Settings. Did you differentiate the TXD instruction (use the @TXD)? Is the cable correct on the CJ1 side? Are bytes received on the CQM1 side? Check the AR memory location associated with the correct port. Sounds like the instruction is working properly. It just is not able to complete. Just need to figure out why.

Share this post


Link to post
Share on other sites
I have tried all the combinations in the PLC setting dialogs of CQM1 and CJ1M but i can only tranfer data from cqm1 to cj1m but not the other way around. I ran out of idea, please help.

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