Jump to content

Programmatically Create Projects

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.


Link to comment
Share on other sites

  • 1 year later...

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.

Link to comment
Share on other sites

  • MVP 2023

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

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.