Jump to content

You CAN Copy/Paste between projects, but not quite as easily as you hope. Here's how.


Recommended Posts

  • MVP 2023

Hi all, you may already know this trick but I only recently twigged to it.  I was again exploring ways of doing copy/paste trying to find a method that works.  Previously I have carefully used the subroutine export import method but it is fraught with issues that can make it a minefield.

The easiest way of explaining things was to do a small video of what I did.  I had 2  .vlps I worked with, one done for a 130 and the other for a 570.  I initially show the 2 vlps names and with the SAME elements but different names and properties.  I then copy the 3 rungs from the 130 and then paste them into the 570 without leaving the program....that is the real trick.

It's not as good as being able to do the action between instances, but it appears to work, and work well.  Note how the newly pasted info appears to take up all the correct references in the destination project.  This is a major advantage.  I haven't fully explored all of this yet and there might be a pitfall somewhere.  I'm simply posting the initial result of some experimenting I did this morning.  Others' thoughts and comments welcomed!  If you already do this method then you can hit me with Joe's foam bat and call me Dumbo, but it was one of those oh doooh revelations this morning.  Because you can't do it between instances, I guess the brain had always thought it wasn't possible between projects...but leave the program running and don't do anything at all b/n the actions, and it is.

Perhaps use something like VLC to slow things down if you lose track of what's going on, and how the elements differ.

cheers, Aus

  • Like 1
Link to comment
Share on other sites

  • MVP 2023

I've had a further play with this and it would appear that you don't even need to have the files compiled and saved.  I changed a bit of ladder in the source file, copied it and then opened into the destination file, telling the program I didn't want to save the changes made in the source.  The paste still worked fine, complete with taking up local references.  But obviously the destination file needs to be saved each time, to leave it with pastes intact.

cheers, Aus

Link to comment
Share on other sites

  • MVP 2023

I thought this possibility was known for a long time :). Thanks Aus for describing it here on the forum.

I would like to add that in the visilogic project, all routines can be exported for transfer to another project, but this is not available for the ! Main Module. Therefore, from the beginning of using VisiLogic, I transferred the ! Main Module to another project using the copy-paste method.

However, it should be noted that the names of subroutines and displays that do not exist in the new project disappear and must be entered manually.

Link to comment
Share on other sites

  • MVP 2023
14 hours ago, kratmel said:

all routines can be exported for transfer to another project,..............................the names of subroutines and displays that do not exist in the new project disappear and must be entered manually.

But it must be noted that any elements/names that do exist in the destination project get stomped on by the import.  This is the main failing of using the subroutines method.  It works fine if there is absolutely no other reference to any element in the destination.  If there is, you have to go through your entire project with a fine comb, checking and adjusting, which is often far more work than simply writing it all again.

Link to comment
Share on other sites

  • MVP 2023

In general, we must understand that any acceleration of the PLC programming process - copying or export import requires concentration and attention. Pre-allocating the variables for the project on paper and replacing the inappropriate variables before copying or exporting-importing simplifies the task, but again, attention, attention and more attention to this process.

Everyone who has been programming in Visilogic for some time - creates his own style and acts as he likes.

I developed a project template for all the PLCs I used. Accordingly, creating a new project means renaming the template and supplementing the standard functionality with the necessary modules from other projects. The only problem is the different number of variables available in different models and the number of inputs and outputs. However, this was also overcome by choosing the weakest PLC as the basic one in terms of resource allocation.

Link to comment
Share on other sites

  • 3 months later...
  • MVP 2023

Further fuel for the great Copy/Paste saga.

Over the last few days I've been tidying up a whole lot of Structs and associated source/destination operand names in 2 projects that link via UniCan.  I found something that surprised me.  I always run 2 instances to make this sort of thing easier to do, as I have the collect in one plc and extract on the other side by side.  I have discovered that I can copy the operand names "en masse" and paste them into the other project with both instances running all the time.  This is completely contrary to what you experience trying to do the same with ladderwork.

Try a run of 8 operands.  Drag down over the descriptions.  Don't do anything except click Copy in the box that comes up.  Then in the other instance select the same number of operand Description blocks.  Click Paste and voila.  They're there.  The number of them pasted relates to the number of blocks you've selected in the destination.....only select 4 and the first 4 of the copy go in, select 8 and 8 go in.  But they are THERE with NO stuffing around!

So the question arises....why can't this be done with ladderwork?  A quick play reveals that the text is being copied as text, in that you can put it into any sort of text based file.   But as to why the same sort of thing can't apply to memory for clipboard use for whatever data layout/construction is used for ladderwork etc is beyond my puter knowledge.  There is obviously some sharing going on, but not all.

Ho Hum!!    😵

Cheers, Aus

Link to comment
Share on other sites

  • MVP 2023
1 hour ago, Ausman said:

So the question arises....why can't this be done with ladderwork?  A quick play reveals that the text is being copied as text, in that you can put it into any sort of text based file.   But as to why the same sort of thing can't apply to memory for clipboard use for whatever data layout/construction is used for ladderwork etc is beyond my puter knowledge.

Because in your example you are using the Windows Clipboard that is built into Windows. It understands text and some graphics files, but nothing else. To copy ladder functions would require an application-specific memory space shared between two instances of VisiLogic. However, each instance of VisiLogic runs in its own memory space and the operating system prevents the sharing of information.

You can copy ladder functions by copying them in one project file, closing that file and opening another then pasting.

Link to comment
Share on other sites

  • MVP 2023

Ahh yes, I know all that, but I guess my gripe derives from the fact that I have lots of older plc programs that let me cut and paste willynilly b/n instances, and I find it frustrating that they can do it but Visi can't.  Perhaps because they're older they work in a format that is understood by Windows.  But the issue of being able to copy whatever you want to the clipboard is still a valid point.  So what if it's gobbledeegook?  If you paste it into the other instance that uses the same gobbledeegook, it should paste it perfectly.  It's just data.

It's not that important, just one of many little gripes that sometimes cause more teeth grinding than desirable. Straw that breaks the camel's back type stuff.

cheers, Aus

Link to comment
Share on other sites

  • MVP 2023
4 hours ago, Ausman said:

It's not that important, just one of many little gripes that sometimes cause more teeth grinding than desirable.

To me, this is the one feature above all others that I most want to see implemented in VisiLogic. The ability to have two projects open side-by-side and copy & paste between them would save me a ton of time.

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.