Jump to content

Serial Communications for Vision 120


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

  • 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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...