Jump to content

Serial Communications for Vision 120


Bruce52

Recommended Posts

In June of 2010 I downloaded the then-current version of VisiLogic and installed it on my computer. I allowed it to update the OS in my Vision-120 when it asked to. I had no trouble with the Vision until a few weeks ago when I downloaded the now-curent version 9.3.1 and allowed it to upgrade the vision 120 OS to 5.04. With the new OS my Vision 120 no longer responds correctly to a serial-port request to read MI-0. I am sending the string "/00RW000001" + CRC + <CR>. The unit used to respond back with a properly formatted string of the form "/A00RWXXXX" + CRC + <CR>. Now it responds back with strings of varying lengths and no particular formatting. Is there a workaround for this or do I need to revert back to an older OS? I really don't want to switch to UnCmDrv1.DLL since my program is written to make use of mscomm32.ocx. If I need an older OS, then which ones work? My CRC is derived per the calculation in the PCOM Protocol Description pdf and works out to be "2A" for the read request. For <CR> I use vbCr (my program is written in vb6).

Link to comment
Share on other sites

Well, I have decided to go with the DLL after all. I would still like to find an answer to my dilemma for future reference, but the DLL seems to work. The lack of thorough documentation makes it a learning experience for me, however vb6 comes with an object viewer that helps.

Link to comment
Share on other sites

  • 1 month later...

Sorry for not responding sooner but I have been in the process of moving and have spent a lot of time on the road working. I'm finally settled in with internet access again. As for my comm settings, they are OK. I can control the Vision-120 outputs via mscomm32.ocx with no problem, but for some reason the MI responses from the Vision are wrong. When I switch to the UnCmDrv1.DLL it all works fine. I have a small VB6 test program that illustrates the issue that I would be glad to post here if there is a way to do it.

Link to comment
Share on other sites

In suggesting that I could post a VB6 app here I was forgetting that it would be futile since a lot of you wouldn't have access to the VB6 programming environment and therefore could not build nor run the app for testing. Besides that, you would need my Vision-120 ladder program as well. As I said in an earlier post my app does fine as long as I use UnCmDrv1.DLL, so I will stick with it.

There are two reasons I wanted to avoid using the DLL. First, my app can use a variety of PLC's, Arduino's, Stamps, etc., and I would like to standardize on mscomm32.ocx for serial communications. Second, I want to keep my users from having to install VisiLogic just to get the drivers on their machines. For some strange reason Unitronics didn't write a com driver from scratch but rather based it on the Allen Bradley com driver without which it will not operate. Allen Bradley doesn't offer this driver free to developers so VisiLogic must be installed to get it. Since my app provides all the logic that would normally be the domain of the PLC ( I am using the Vision-120 as a simple I/O module at present ) users don't explicitly need VisiLogic for anything other than the Allen Bradley drivers. Of course, selecting a comport is made easier by VisiLogic and that could be a very good reason for installing it.

I will continue studying the command structure for reading values and try to uncover what is happening, but as long as the DLL works I won't put too much effort into it. If I find the answer I will post it.

Link to comment
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
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.