Sign in to follow this  
Followers 0
Aslinger

Rslogix5000 And Vb

9 posts in this topic

I've tried posting the messages written below on Rockwell Automation's site but it doesn't seem to be very active. This forum seems to be heavily used, however. Post #1 I have developed VB code for automating RSLogix500. This has been very helpful to me. However, RSLogix5000 has no VB interface. Will it ever? What are the plans? How much longer will it be? I recently heard about the .L5K export files and, yesterday, began researching it. I am beginning to think that RSLogix5000 will only use these export files instead of VB. Would it be worth investing my time to learn RSLogix5000 automation via XML or should I wait a little longer for the VB interface? I suppose a decision was made to go the XML route vs. VB. Is there a website with info and examples of RSLogix5000 automation via XML? I have printed and begun reading the "Logix5000 Controllers Import / Export" reference manual. I read somewhere about utilizing an XML development tool. Which one works best for RSLogix5000? On the other hand, can I just use VB to create the .L5K / .L5X files? Which is easier? I have so many questions about this. Thanks for any response! Post #2 I have learned a little since reading more of the reference manual. It seems that the .L5K files are not XML. Instead, only the .L5X are XML. Therefore, I can use VB to create the .L5K files. I'm already doing something similar to this with AutoCAD .SCR files. However, it would be nice to skip the .L5K file creation and just use VB directly with RSLogix5000, like I do with RSLogix500. Anyone out there using VB to create the .L5K files? How goes it? When will RSLogix5000 with VBA be available? If it is going to be a long time, I'll put in the time to write VB code to create the .L5K files. I just hate to do this if RSLogix5000 with VBA is coming soon!

Share this post


Link to post
Share on other sites
The LK5 file is pretty much a text file so I don't see any reason that you couldn't create it with VB. I've never developed any VB to create an application so could you explain to me the advantage of doing this?

Share this post


Link to post
Share on other sites
************ We have projects with a lot of I/O. A current SLC program I'm working on has 32 motor starters, 60 photoeyes, 24 prox switches, other misc inputs, 24 SV outputs, etc. I've got a larger one to do after this one. For almost every input, we create diagnostic rungs (some simple, some complex). It is time consuming and error prone to do this manually. So, we use VBA (RSLogix500 Pro is required) to create the rungs and generate descriptions with symbols. Using VB will speed up the logic development, reduce errors, and help to standardize logic among the various engineers. ************

Share this post


Link to post
Share on other sites
Like I said I haven't used VB to edit the LK5 file but I have edited them. The only suggestion I really have is I would do my I/O configuration and user defined tags in RsLogix 5000. For the little time it takes to do this part I don't think it would be work writing code for plus the configuration can vary quite a bit from module to module. Then use you VB code to do your ladder rungs and paste them in. I have never used it before but have you looked at the structured text editor. Might be easier to paste the Vb into then you would not have to convert it back to compile and verify the program

Share this post


Link to post
Share on other sites
Hi, Even I have the same application. You can create an L5K file in VB and then import into your application. The L5K file is a simple text file and you can use streamwriter function. I have a sample code written in Visual basic 2005 to create a L5K file if you are intrested I can share it with you. There is a simple format that you have to follow to create these files. Please find attached the format file which I have created. If you use a stream writer function to create logic in similar fashion you can then import the project in LOGIX 5000 And if you have found other ways please let me know L5KFormat.xls

Share this post


Link to post
Share on other sites
The *.L5K format has been part of RSLogix 5000 for a decade, but it changes every version and the only things RSLogix does with it is open and close entire projects. The *.L5X format is better documented (see 1756-PM019 and 1756-RM084) and used for more things (like routine and program import/export). Tools that externally work on RSLogix 5000 like the DeviceNet Tag Generator and RSLogix Architect use the L5X mechanism as their underpinnings. If I was building tools in VB (or python or perl or anything else) for Logix, I would concentrate on the XML-like *.L5X format.

Share this post


Link to post
Share on other sites
*.L5X only works for ver. 17, correct?

Share this post


Link to post
Share on other sites
Hi .......just joined and found this old thread. Did you ever perfect this method of code generation? I've just started working with RS Logix 5000 and need to find a way to generate a base project based on specific data. Having looked briefly at the LK5 file, it looks like this is the method to use and generate it via excel to form the basic project, and then add the stitch code to suit. Could you please offer me any advice on pitfalls etc you had and possibly send me examples of your excel files to get me started?

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