Falcons75

Siemens S5 to Controllogix conversion

12 posts in this topic

I'm in the process of converting an old Siemens S5 project (with no comments!) to ControlLogix.

My first question is in the S5 there is the odd instruction with a '#' in it:

- -] [ - - - - (#) - - - - ] [ - - - - -(F00.1)

In old logix the # means a file, what does it mean in Siemens speak? :-)

 

My next question, I have the rockwell document for structured text and also for converting S5 to logx, is there any other resource that would help me understand Siemens structured text?

 

As I chip away at the project I'll be posting more questions. Thanks in advance for your help.

Siemens #.JPG

Edited by Falcons75
typo

Share this post


Link to post
Share on other sites

The instruction, from the S7 series, is a midline output. I have not verified this in the S5 literature but Siemens is pretty good at maintaining instruction functionality. Below is a screenshot of the help for this instruction from the S7 software.

5702867fc31f8_S7MidlineOutput.thumb.png.

Share this post


Link to post
Share on other sites

I'm not very good with STL, etc hence the next question... :-)

I have this in S5:

does it equate to this in ladder:

 

Whats the difference between a '=' and 'S'? Do we use =  for coils/RLO and S for bits/flags?

 

Share this post


Link to post
Share on other sites

Here's another attempt at the pictures...;-)

 

S5 #2.JPG

S5 #3.JPG

Share this post


Link to post
Share on other sites

There are four equivalent rungs in the STL code you show:

570806ad19cc6_S5Conversion.png.0061fb63b

Share this post


Link to post
Share on other sites

Am I right in assuming that netwroks 3 to 5 would require a reset similar to a flip flop?

Share this post


Link to post
Share on other sites

Next challenge :-)

My attempt at multiple nests...

S5 #4.JPG

S5 #5.JPG

Share this post


Link to post
Share on other sites
On 4/8/2016 at 3:34 AM, Falcons75 said:

Whats the difference between a '=' and 'S'? Do we use =  for coils/RLO and S for bits/flags?

The logic to turn the '=' output on or off is contained in the same rung. The output simply follows the logic of the rung. If the logic evaluates as true then the output is on for as long as the logic is evaluated true. If the logic evaluates as false then the output is off for as long as the logic is evaluated false. The '=' instruction can be used with I, Q, M, L, and D address areas.

The 'S' instruction (set or latch on) must be paired with an 'R' instruction (reset or latch off). The logic to turn the '(S)' output on or off is contained in two rungs. One rung to "set" the output on and one rung to reset the output off, '(R)'. When the "set" logic is evaluated as true then the output is turned on and remains on, even if the evaluation logic becomes false. The output is only turned off (reset) if the "reset" logic is evaluated as true. Sometimes the order of the "set" and "reset" logic becomes very important. If the scan order is to evaluate the "set" logic first and then the "reset" logic, this is equivalent to an SR function (set/reset). If the scan order is to evaluate the "reset" logic first and then the "set" logic, this is equivalent to an RS function (reset/set). It is good programming practice to keep the "set" and "reset" logic rungs in consecutive rungs, regardless of their order (S/R or R/S). The 'S' and 'R' instructions can be used with I, Q, M, L, and D address areas.

7 hours ago, Falcons75 said:

Am I right in assuming that netwroks 3 to 5 would require a reset similar to a flip flop?

Yes.

7 hours ago, Falcons75 said:

Next challenge :-)

My attempt at multiple nests...

S5 #4.JPG

S5 #5.JPG

This logic is not correct. Also, timer T21 is an off-delay type. The time value and time constant for T21 are stored in DW21. The time value and time constant for T4 are stored in DW4. Without knowing what these values are it is not possible to determine what the total time values are for T21 and T4. I would highly recommend that you contact someone who is proficient in converting S5 logic. It will probably be expensive but it will be correct.

Share this post


Link to post
Share on other sites

Thaks, Pop for your input. We've asked an integrator for costs but in the mean time I thought I'd give it a crack. Since I posted I've gone through and sense checked all the timers. Most of the conversion is done, its just these multiple nests are proving more challenging. The timer values will be added later once I'm happy with the code. The manuals I've gone through talk about single instruction which has helped with comparators, etc but I get stuck with these nests :shrug:

Share this post


Link to post
Share on other sites

I can show you the steps I would take but I do not certify it to be correct. I used the Siemens S7 software because it does the conversion between STL and LAD. I recognize that the ControLogix software will handle the timers a little differently. And you may be able to insert timer T21 without any problem. If you can, you will not need to create the additional rung that I have created. I have not created this logic in ControLogix so I cannot comment more on this. Best of luck for the remainder of your project!

570cfb773ac12_S5ConversionStep1.thumb.pn

570cfb7983bd8_S5ConversionStep2.thumb.pn

Notice that NW4 will now convert between STL (above) and LAD (below) views directly in the Siemens software.

570cfb7d22eda_S5ConversionStep3.thumb.pn

The easiest way to resolve this is to create an additional rung of logic just to drive the timer, T21.

570cfb7586937_S5ConversionStep4.png.6f02

Share this post


Link to post
Share on other sites

Fantastic Pop. I'll have a look at getting it into ControlLogix. Thanks very much for your help.

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