Sign in to follow this  
Followers 0
MickeyBob

HostLink w/ CJ1M-CPU21

9 posts in this topic

I purchased an activex dll for Omron Hostlink communications. I have not been able to successfully communication with a CJ1M-CPU21 using it. I'm not sure if the problem is the COM port settings or something else. I can communicate successfully with CX-Programmer using default settings of 9600-E-7-2 and node address 0. I've tried lots of different COM settings and node addresses with the dll but it hasn't worked yet. I have port mon from sysinternals and can see the command going out the COM port as "@00RD0001000552*<CR>" for the case where the node address is 0. Is this a proper command to read D memory? Any insights would be appreciated. Thanks, Mickey Bob

Share this post


Link to post
Share on other sites
When using CX Programmer with CJ1M, which port (peripheral or Hostlink port) are you using? Both ports can be set for either Toolbus or Sysway. The command you are sending is Sysway protocol. be sure the port is set for Sysway Protocol.

Share this post


Link to post
Share on other sites
I'm using the peripheral port with CX-Programmer and the activex dll. I think the peripheral port is configured for Hostlink but to make sure, I've attached a screen shot from CX-Programmer settings dialog. Some instruction on how to change the protocol would be very helpful since I'm a newbie. tx for the reply, MickeyBob

Share this post


Link to post
Share on other sites
You may need to set DIP switch 4 to ON on the processor. (Switch PLC off when you do this) This will allow the CPU to use the new (non default) peripheral port settings. Note that you may need to change CX-programmer from Toolbus to Sysway after changing the DIP switch. Edited by Nibroc

Share this post


Link to post
Share on other sites
Nibroc is correct. Dip switch 4 must be set on for the custom settings of the peripheral port to be effective. Also be sure to power off the PLC one time after transferring the custom settings. BTW, if you set this switch to on, you will need to change your connection to CX programmer from Toolbus to Sysway in your CXP project. Any particular reason that you are not using the 9 pin RS232 port instead? It defaults to Sysway which is the protocol that you are trying to use.

Share this post


Link to post
Share on other sites
I was finally successful in getting the activex dll to talk to the CJ1M. I hooked a standard serial cable up to the RS-232C/Hostlink port. The communications parameters that worked were 9600, E, 7, 1. The documentation (i.e., CJ1 Programmable Controllers Operations Manual) is inconsistent with this. The following is copied verbatum from the manual: PortMon indicated that the dll generated an error whenever it attempted to configure the port with 2 stop bits. Also, according to the manual, when dip switch 4 is OFF, and dip switch 5 is ON, the CPU should auto-detect the communications parameters on the respective port. I tried setting switch 5 ON and could never get the activex dll to connect. I'll continue to play with the port settings to see if I can use a faster baud rate. Tx again, MickeyBob

Share this post


Link to post
Share on other sites
Jay, Thanks for the followup. I was originally using the peripheral port because I only had that cable available. Then the light bulb went off and I retrieved my standard serial cable. I also had to do a little juggling with gender-benders to get it hooked up. Once I successfully made the connection, my demo program easily found the COM parameters that worked. I've since been able to bump the baud rate to 115200 and it works fine. I've kept switch 5 off so that the PLC setup for the port would be active. I have a few different manuals that I've been digging into. Which is the appropriate one for finding the most relevant info re: port configuration for the CJ1M-CPU21? Tx, MickeyBob

Share this post


Link to post
Share on other sites
I am glad you were successful, but your conclusions are a little faulty. For the sake of future readers of this thread, I would point out that the documentation is correct. The default setting is 9600, 1,7,E,2 for the CPU RS232 port. This has been the default for Omron Hostlink since 1978. The issue comes in that some UARTs (the chip that handles serial communications) cannot handle an 11 bit format. In the late 90's, Rockwell designed a mass produced chip that limited serial framing to those standards that are 10 bit, not 11 bit. Other manufacturers adopted the standard and 11 bit is no longer possible with UARTs with a limit of 10 bit framing. Some softwares are aware of this (i.e., CX Programmer) and some (like your Active X .dll) are not. Those that are aware allow the stripping of the last bit and similuate a connection of 9600,E,7,1. Apparently, your Active X .dll is not doing this.

Share this post


Link to post
Share on other sites
CJ1M Operation Manual @ omron.com

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