Converting Ladder Diagram to Structured text

I want to convert a Ladder Diagram to Structured text. Does anyone know if there is a tool or program to do this automatically?

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I wrote something years ago for my MS to convert ladder diagrams to HLL source code. The output is generated using templates, so you should be able to make it output structured text. The ladder diagram editor is in Scheme and the code generator is in C. You're welcome to use it if you like:
http://www.visi.com/~grante/ladder.pdf ftp://ftp.visi.com/users/grante/stuff/led.tar.gz
--
Grant Edwards grante Yow! I want EARS! I
at want two ROUND BLACK
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote:

I have an existing ladder diagram that I want to convert to Structured Text. I don't want to re-write the whole ladder-diagram in another program. I wrote the ladder diagram in Allen Bradley RSLogix5000.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
The point was not that the program would work for you as is, but that you could modify it to produce blocks of ST in response to each ladder element instead of producing blocks of code in response to each ladder element.
If you're not comfortable programming, consider hiring a programmer to make the tool do what you want it to do.
-Mike-
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

If he doesn't want to re-enter the ladder diagram(s), he would also have to figure out how to convert it from the existing format into the net-list format understood by the code-generator.
--
Grant Edwards grante Yow! Half a mind is a
at terrible thing to waste!
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Check out Mathcad explorer. Although mathsoft stopped providing this, one could always easily find copies floating around the net! http://www.physics.bcit.ca/bpointon/tutorialstart.html
http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=download+mathcad+explorer

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Mike Halloran wrote:

That brings the problem back to where it started... How to convert the existing ladder diagram into 'something else' (Structured Text or C) I want to run the PLC-code on a PC, so I have to translate the PLC-code (ladder diagram) to something that can be compiled on the PC (C or basic). And the program has to be exactly the same, so I don't want to rewrite the program in C, but I want to convert it with a tool.
Maaike (is a 'she', not a 'he' :))
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
snipped-for-privacy@imtech.nl (Sunny) wrote in message Mike Halloran wrote:

I had a similar situation with an old OMRON PLC program, but never found a "convertor", so I just re-wrote the program. Please post if you do find such a "convertor".
You mention above you need a "convertor" because you intend to run your PLC-code on a PC. If your open to other methods besides C or basic, then you may be interested in products similar to those offered at www.softplc.com, which basically emulate a PLC via software on a PC.
I've been pleased to find that some newer PLC programming software includes conversion ability between different IEC 1131-3 programming languages (structured list, ladder, function block).
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Sort of. It brings the problem to "how to get a net-list" of the ladder diagram. A net-list is logically the same as a ladder diagram[1], but the chances are probably slim that your existing toolset can save the ladder diagram in a net-list format that could be easily converted to the form expected by the code generator I wrote.
[1] A net-list contains only the information on connections between objects in the ladder diagram and doesn't contain any "graphical" info on where objects were located on the page.

And you don't want to re-draw the ladder diagram either...

Sorry about that. One sometimes wishes that English had a formal gender-neutral third person pronoun that one could use when speaking of somebody with whom one is not familiar.
--
Grant Edwards grante Yow! .. the HIGHWAY is
at made out of LIME JELLO and
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I guess it all depends on the programming software you used to build the ladder. If you developed the ladder program in anything but an IEC61131-3 environment then you're probably out of luck.
If you used a true IEC61131-3 package, you should be able to save the ladder as a FB, then import that FB as IL/LD/ST..etc.
I you used a non 1131-3, like RS Logix, then I know of now way to do what you ask.
- CH

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I build it in RSLogix5000. And the help-file of RSLogix5000 says:
"The RSLogix 5000 Enterprise Series environment offers an easy-to-use, IEC61131-3 compliant interface" But I don't know how to save the ladder as a FB. Maybe anybody can help me with that?
Maaike

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.