Sign in to follow this  
Followers 0
CJH

'Bulk' ASCII edit in RS Logix 500

9 posts in this topic

I have just taken over some fairly convoluted and unfortunately somewhat amateurish code. My biggest problem is the guy didn't use contacts or relays (can you believe it!) by choice, but instead used whole integer registers as flags. For example: EQU N7:0 1 instead of XIC N7:0/0 and MOV 0 N7:0 instead of OTU N7:0/0 This happens all over this code, and it's a nightmare to debug, since you can't see the 'live' status of the bits when you're online, and you have to peer at the MOV and EQU instructions to see if you're looking for true/false or lathcing/unlatching. What I want to know is (and I doubt, but thought I'd check with the gurus here anyway) is if there's a way of exporting the actual program as ASCII, doing find and replaces of the above in notepad or some such, and then reimporting into RS Logix 500? So far, I've only seen how to export the database and symbol descriptions etc, not the program itself.

Share this post


Link to post
Share on other sites
i do most of the programming in excel then dump generated code to plc. try this: write few rungs of logic in RSL500, select them, click Ctrl+C, open notepad for example and paste it... you can paste modified code back to ladder editor (make sure rung opens as text field) just double click on rung number and you will see the ascii representation (see picture). if multiple rungs are being pasted, each will have to start with SOR and end with EOR (start and end of rung).

Share this post


Link to post
Share on other sites
Thanks! It's a step closer, but still not quite what I'm looking for, because this method obviously won't work across program files (26 so far, and counting!) I am intrigued by your Excel programming, though :) What benefits do you gain by doing it that way? Is that for writing loops and whatnot?

Share this post


Link to post
Share on other sites
In fact that piece of code was created in excel. I had to record few inputs over period of time and the table length limit was preventing use of just a single instruction per record. It was temporary only so not much of comments there but notice the limit values in each LIM instruction... This is only part for just one of three variables (all with same index). Excel helps me do everything, write sequence, organize memory, backup, restore and gerate code, alarms, comments etc. I think it saves me a lot of time compared to direct entering in RSL500 for example, it ensures less errors (like computation of the limits), commenting is a breeze etc. And if I have to pass project to someone else, I guess I won't have to explain much.

Share this post


Link to post
Share on other sites
CJH, Try saving your program as a "library file". You should be able to open this file in Notepad and search and replace as needed. Then you can open the library file and bring it back into RSLogix. Good luck,

Share this post


Link to post
Share on other sites
Thanks, Mellis! This is just what I was looking for. I can't believe I didn't try the library option. At least this way I got the idea of Excel programming, too :)

Share this post


Link to post
Share on other sites
I've done this multiple times. Save it as a library file and open it in MSWord. Do the search and replace and other editing. Save. Then import the library back into Logix500.

Share this post


Link to post
Share on other sites
Library Files will also edit in EXCEL. You can also write a program in Notepad or Excel and use Symbols rather than I/O labels. Importing the Symbol definitions and the program is complete.

Share this post


Link to post
Share on other sites
Generating ladder in Excel is awesome! I had to do an automated warehouse PLC program - lots of distributed drives & a master PLC - and was able to program the bulk of the straight moves & standard corners using an Excel macro. Then I could concentrate on programming the decision making points. Saved me a whole lot of typing & possible carpal tunnel problems.

Share this post


Link to post
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
Sign in to follow this  
Followers 0