Macros generating PLC code

RheinhardtP

Lifetime Supporting Member + Moderator
Join Date
Oct 2004
Location
Perth
Posts
562
Hi All,

I am looking at creating a Macro to generate the bulk or repetitive PLC code and SCADA objects and was wondering what advise or experiences you can share on this. I will be using Unity software for PLC programming, Topserver as an IOserver and Wonderware System Platform as SCADA.

Any of you written macros for above mentioned software packages to do Bulk development?

Rheinhardt
 
I have not used any if the named software. I gave used Excel to right a lot my code that just indexed by a given amount.
Example.
XIC I:1/0 OTE O:2/0
XIC I:1/1 OTE O:2/1 h
A few simple adds and you can make a lot of code fast. The first few times you do it it will probably slower until you get used to it.
 
if you are game you can create macro's in Excel also
apart from the existing cell copy update function
 
Hi All,

I am looking at creating a Macro to generate the bulk or repetitive PLC code and SCADA objects and was wondering what advise or experiences you can share on this. I will be using Unity software for PLC programming, Topserver as an IOserver and Wonderware System Platform as SCADA.

Any of you written macros for above mentioned software packages to do Bulk development?

Rheinhardt
I have not, however I have a friend who tried. His problem is that he was spending more time changing his "boiler plate" program generator trying to stay current with the manufacturers he chose than it would take to copy-n-paste then tweak the changes. It didn't take him long to abandon this open ended approach.

This has been a desire by many but so far not practical because of the rapid changes in the industry. Look at IEC 6-1131, even it and all of its resources and supporters can't get a steady product that keeps up with technology.
 
Last edited:
I have not, however I have a friend who tried. His problem is that he was spending more time changing his "boiler plate" program generator trying to stay current with the manufacturers he chose than it would take to copy-n-paste then tweak the changes. It didn't take him long to abandon this open ended approach.

This has been a desire by many but so far not practical because of the rapid changes in the industry. Look at IEC 6-1131, even it and all of its resources and supporters can't get a steady product that keeps up with technology.

Hi guys thanks for the feedback. Russ i have seen a similar issue in the past. My idea behind this is to use it in the beginning stages and to create/import all my function blocks, repetitive work for that matter. After this the programmer can manage and program the application software as he would normally. I understand each program is different and has different requirements.

Thank you for the link Kalle i will investigate.
 
I've done it for AB PLC-5's at Wentzville for the GM plant there. It worked extremely well, cutting startup time to a fraction of what it would of been.

Once a routine was "locked in" and there weren't any more changes necessary to get it to work right, we were able to create any number of modules based on this structure that were guaranteed to work properly.

And the plant helped out by making the stop numbers correspond nicely with the internals of the PLC-5 files. So say, for stop 345, my program would use the first two digits and append a zero for the Binary file (e.g. B340), and for the starting bit number I would take the second two digits and append a zero to that (e.g. B340/450).

This made it extremely easy for Maintenance to locate a stop in the program (e.g. stop 895 could be found by searching for "B890/950").

From there the program would create all of the internals including rung comments and descriptions and all I had to do was to assign the real world I/O to it.

The resulting file would be saved as a .PC5 file and I had a second program that would allow you to select the model of PLC and "stitch" the various routines together.

From there I would import it into the 6200 software and add my drive logic.

Mine was a "Roll yer own" BASIC program, I've never tried using Excel for that.
 
Way back on the SLC platform I developed macros for creating standard code
Used excel and sendkeys that pushed the correct keystrokes into RSLogix 500
(sendkeys vanished with win XP). The macro combined a list of device IO and standard code to create the PLC program with changed Tags for each device

I was just on a large project - as a contractor, and they would generate 16 control logix programs (L5K format) each resulting ACD file was about 22Meg
They had a complete change management system and a database behind it all for each module. This was needed as there were (and had been) 20+ PLC programming engineers
Big system houses have to use this type of method but they also had one engineer that had to keep "touching" the generator code and needs changed.

Now I just look for PLC development systems that have a text import and export and use excel. I hate PLC development software that does not have text import and export.

If I had to go the sendkeys route now I would use AutoHotKey

http://www.autohotkey.com/


Note: it would be a lot of work to set up and maintain but for the very large projects this is what is required
 
I did a 16 inputs of nake and break logic in excel lastnight in no time. The trick is if you can make all of the addresses indexable by 1. This way excel does an autofill and you don't have to fight it.
The way I do mine is create the first instance then copy the rung and paste in excel.
 

Similar Topics

Somebody know how to unlock a pass protected macro in easy buider ?
Replies
0
Views
114
I am gearing back up my Rockwell and GE/Emerson setup and building my new macro keyboard. What is everyone's favorite studio 5000 and GE proficy...
Replies
0
Views
1,312
Hello, Does anyone know a Macro command in FactoryTalk View Studio to copy a Datalog database file to a USB drive or some other location? I...
Replies
2
Views
3,714
I am using FTView macros to store and load plc array values and display them on an HMI when needed. For some reason its working for every other...
Replies
0
Views
2,532
Hi I was trying to use a plc input to login into the engineering screen rather then a password , and came axross the login /log out macros can...
Replies
8
Views
7,493
Back
Top Bottom