Simatic S7 doubt

sayahan2003

Member
Join Date
Jun 2006
Location
Calgary
Posts
185
Dear frineds,
I have 2 question:
1-look at the following codes:

A "Feed_pump_A_start"
A #Enable_Motor
= #Start_Fulfilled
A(
O "Feed_pump_A_stop"
ON #Enable_Motor
)
= #Stop_Fulfilled
As you know, there is 2 coils:1- Start_Fulfilled
2- Stop_Fulfilled
We can write these codes in one network in STL but if we want to write it in LAD, we have to write it in two netwoks.Is it correct?if yes, Why?

2- Sometimes, when I try to convert a STL program to LAD or FBD, I can't do it and nothing will happend.Please tell me why and is there any way to doing this.Becaue STL is difficult for me and I have to convert it to LAD or FBD.

Thanks
 
Step 7 has rules on how it displays the code in ladder, if the code does not pass these rules then it will not display in ladder only STL or CSF.

Two seperate pieces of code break these rules so it will not display in ladder.

If you want it to display in ladder, why are you writing in STL? why don't you write in ladder?
 
Sayahan, you have assigned 2 coils #Start_Fulfilled and #Stop_Fulfilled with different logic in one network. LAD doesn't support this. If you want to write STL code which is convertible to LAD you must divide it in 2 networks.
Nevertheless you can assign more than one coil in one network - but only if condition for it's assignment is the same. This example you can convert to LAD. I suggest you write in STL for more understanding but in convertible manner.

NETWORK 1
A "Feed_pump_A_start"
A #Enable_Motor
= #Start_Fulfilled
= M100.0
NETWORK 2
O "Feed_pump_A_stop"
ON #Enable_Motor
= #Stop_Fulfilled
= M100.1
 
Hej You Can Do It This Way!

STL_To_LAD.JPG
 
PeterW said:
Step 7 has rules on how it displays the code in ladder, if the code does not pass these rules then it will not display in ladder only STL or CSF.

Two seperate pieces of code break these rules so it will not display in ladder.

If you want it to display in ladder, why are you writing in STL? why don't you write in ladder?
Dear Peter
Thank you for your help.
I did not write it in STL.it was an example and i tried to undrestand it.
 
Dear Peter
You told that there are some rules to converting STL to LAD.Can you tell me what are these rules or where can I find them?
 
Apart from the odd example they have where they show the network in both ladder and STL, I don't believe there are written guidelines. Its more trial and error.

The thing with your previous question as well, why do you want to show more than one coil on the same network anyway, neat if your logic gives you the opportunity, but why create an extra flag to do it??

I've seen this done repetitvely in code, for what reason I have no idea, it does not improve the view and it adds to the scantime??

In my early days way back when, I used to write some ladder as complex as I could then switch view to STL, to see how it is done. Then remove and change to get rid of the extra's included just to view in ladder (the NOP's, sometimes switching things mid network, etc) and see that the logic still worked fine without the extras included for ladder representation.
 

Similar Topics

Dear friends I have 2 questions: 1- When we design a FB and when we create an IDB for this FB, information in IDB will automatically...
Replies
5
Views
3,164
Dear friends I have another doubt in simatic S7.As you know, when we define A function or function block, sometimes we define some Input or output...
Replies
8
Views
3,095
Dear friends I'm tring simatic s7.So, Would you please explain me what is diffrence between M(memory) and L(local).for example M0.0 and L0.0 and...
Replies
8
Views
3,861
HI i would like to know how to get a variable that will store the amount of times a program has been executed. The issue is I have 3 DBs for 1 FB...
Replies
2
Views
82
Dear sir, I am using SIMATIC 300, CPU 315-2DP , (6ES7 315-2AF03-0AB0) VIPA 603-1CC21 A1.0 RAM 32KB, Firmware=V4.0.8 The problem Im using MPI...
Replies
2
Views
164
Back
Top Bottom