Sign in to follow this  
Followers 0
jmkeene

C_Hostlink Demo error '8005' Port Already Open

4 posts in this topic

I'm an admitted newbie; I have a CJ1M and CX Programmer SW with which I'm turning a few relays on and off. The system is so simple that I decided to write serial control strings to the PLC through a Visual Basic interface. I came across the C_Hostlink demo in this forum (thanks ... the FCS calculation alone is a Godsend) and I thought this would be an easy way to test my commands. However, when I run the application, I get an '8005' Port Already Open error. My question is this: I realize that both CX Programmer and C_Hostlink are trying to use COM1 at the same time ... is there a mode or setting that releases the serial port from CX Programmer so that the PLC can receive the control commands ? I've tried the Program, Monitor, and Run modes but I still get the error upon running C_Hostlink. Thanks for the insight ... this site is a great resource.

Share this post


Link to post
Share on other sites
That is not going to be possible. What is possible is the DDE manager found in CX Server. You could use this with VBA to run concurrent programs. See the following link: CX Server DDE Manager Example @ MrPLC.com

Share this post


Link to post
Share on other sites
Hi jmkeene, You can only use a address of COM port for only one programmer at a time. Are you sure that your CX-Programmer is disconnected from PLC? Some version of CX-Programmer (eg. V4.0) is not close COM port even we disconnected (work offline). Some way to resolve this: 1. Restart your computer and don't run CX-Programmer, let run your VB application 2. After CX-programmer is switch to "Work offline" , no need to restart your computer, if you have SYSWIN software, run it, connect to PLC and then disconnect, Com port will be released. After that, you run your VB. Hope useful to you.

Share this post


Link to post
Share on other sites
If you channel both appications through CX-Server, it is possible to have several applications run at the same time because CX Server manages the com port. Try DDE manager. If it is very important to you, you also might purchase CS Server Lite which allows Active-X hooks to VB. See links below: CX Server Lite Examples @ MrPLC.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