Jump to content

Recommended Posts

Is there a method to create a .vlp or some portion there of programmatically - like what I would do with Allen Bradley's .L5X? That is to say, can I create a text file that represents ladder logic and import it into Visilogic?

I'm preparing to convert a rather large, but fundamentally simple, application from Omron to Unitronics.

Thanks.

Share this post


Link to post
Share on other sites

I have been wondering basically the same thing. I'm working on a program with a LOT of ladder, which has many different "components" running simultaneously. In order to have multiple components of the same type (i.e. same code) run simultaneously, I cannot simply call the same subroutine multiple times (not without setting up some kind of complicated interrupt system), so I must take a rather complex subroutine and copy/paste it to have the number of this type of component that I need. For example if I have code to run a timer and I need 12 timers, I have to copy/paste that code 12 times and change the memory locations addressed in each subroutine into a unique space to avoid overlap/interference. Obviously this is extremely tedious and error prone. Now, this is just fundamentally the way a PLC works and I have no complaints about that, but it sure would be nice to at least know the format of the .vlx files so that I could write simple scripts to generate subroutines and import them into Visilogic.

Share this post


Link to post
Share on other sites

The Creators are not going to give up the .vlx file format.  The problem of multiple copies of nearly identical code is addressed in the new UniStream product with user-defined function blocks.

 

If it makes you feel any better, I've done the copy-and-hope-you-get-all-the-replacements-right dance more than once and you just have to plow through it.  If you haven't looked into the Search and Replace feature of Visilogic you need to.  It can work on the subroutine level and does make things easier.

 

Joe T.

  • Upvote 2

Share this post


Link to post
Share on other sites

Thank you Joe, that is understandable. I haven't worked with UniStream yet, only the Vision series, and did not know that they had incorporated that feature, that's good to know

Share this post


Link to post
Share on other sites

As the PLC doesn´t run ladder simultaneously, you may use a single subroutine to execute common task passing variables to it as needed and then returning results from it. I´ve used indirect addressing to do so.

 

As Joe mentioned, there is such useful tool to search/replace. In previous visilogic versions, it did not replace operands inside some FB, but guess it´s fixed on current version.

Share this post


Link to post
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.

Guest
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...