plcforum.uz.ua

International PLC Forum
It is currently Thu Nov 23, 2017 12:52 am

All times are UTC + 3 hours




Post new topic Reply to topic  [ 17 posts ] 
Author Message
 Post subject: [?]: Ladder sequence
PostPosted: Fri Jan 18, 2008 11:35 am 

Joined: Wed Sep 06, 2006 1:07 pm
Posts: 40
Location: Slovenia
I would apreciate the knowledge of programming tricks.
One of the mostly used and needed type of program in PLC is a sequencer.
I would like to open a discussion about how to make the best possible sequence in ladder diagram.

As I know there are two tecniques for defining each step of a sequence:
1. using self retaining contacts
2. using integer number as a step

Anybody have a good solution for using it in S7?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 23, 2008 11:11 pm 

Joined: Tue Nov 06, 2007 1:59 am
Posts: 107
Location: Croatia
...I usualy use integer value in one parameter...
...with this solution u can always be shore in which step are you, and you can easly show state on HMI.. :wink: :wink:


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 28, 2008 2:12 pm 

Joined: Wed Sep 06, 2006 1:07 pm
Posts: 40
Location: Slovenia
I have been using self retainig coils until now, I never use set/reset coils for coding steps as it's seen in many tutorial examples, anyway I have made the new type of sequence using integers. Here is a first valutation of problems and features using integers vs. self-retaining coils:
1.Self-retaining coils: It is good when debugging program (monitoring), all steps are reset simply by removing consense bit. Steps are defined with bits (BOOL) and they could be stored localy in function block, so you can copy-paste FB for each new sequence. It's diffcult to make branches and jumps from one step to another.
2.Integers: It's easy to jump and branch. The integer has to be defined in M area, so you have to redifine variables for each new sequence. If a sequence has more than 32 steps you have to expand with another DINT. When monitoring is not cool.

Any suggestion?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 28, 2008 11:47 pm 

Joined: Tue Nov 06, 2007 1:59 am
Posts: 107
Location: Croatia
..I somtime have step controll with S or R bits, but only in small projects...
...in biger projects I always use Int, first I make sequential charts for tehnologie, and after that I choose which step will be marked with wich value of that int parameter..
...If I have couple of lines I use more of int parametrs..

..If some project is same for long time, I invest time to make some standard blocks of sequential steps and just insert in project when i need :D :D :D


Top
 Profile  
 
 Post subject: Sequencers
PostPosted: Wed Mar 12, 2008 6:51 pm 

Joined: Sun Oct 01, 2006 3:17 pm
Posts: 53
Location: Europe
Hi,

In S7 you can use S and R for the steps, the first step Sets a bit and the second step Resets that bit and in the mean time Sets another bit.
There is also Graph, you just add as many steps you need, Siemens does it almost all for you...
Nedjeljko could you show us a little more on how you program it with integer value in one paramter?
Regards
Maxime


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 12, 2008 7:13 pm 

Joined: Tue Nov 06, 2007 1:59 am
Posts: 107
Location: Croatia
Code:
Netw_1
//------------------------------

 A     "Parametri".AUTO
      AN    "Parametri".Stop_Req
      A     "Parametri".Pasterizacija_Req
      A(   
      O(   
      L     0
      L     "Parametri".Pasterizacija_status
      ==I   
      )     
      O     "Parametri".Recirkulacija
      )     
      FP    #temp
      =     L     20.0
      A     L     20.0
      JNB   _001
      L     1
      T     "Parametri".Pasterizacija_status
_001: NOP   0
      A     L     20.0
      BLD   102
      R     "Parametri".Pasterizacija_Req
//-----------------------------------------------
Netw_2
//-----------------------------------------------
   A     "Parametri".AUTO
      A(   
      L     1
      L     "Parametri".Pasterizacija_status
      ==I   
      )     
      A     "LSH11_IDB".QOUT
      A     "LSH21_IDB".QOUT
      A     "LSH31_IDB".QOUT
      A     "LSH41_IDB".QOUT
      A     "LSH51_IDB".QOUT
      A     "LSH61_IDB".QOUT
      FP    #temp_1
      JNB   _002
      L     2
      T     "Parametri".Pasterizacija_status
_002: NOP   0
//-----------------------------------------------
Netw_3
//-----------------------------------------------
    A(   
      A     "Parametri".AUTO
      A(   
      L     2
      L     "Parametri".Pasterizacija_status
      ==I   
      )     
      L     S5T#18S
      SD    T      9
      AN    "Parametri".AUTO
      R     T      9
      NOP   0
      LC    T      9
      T     #T9_WORD
      A     T      9
      )     
      FP    #temp_2
      JNB   _003
      L     3
      T     "Parametri".Pasterizacija_status
_003: NOP   0
//-----------------------------------------------
Netw_4
//-----------------------------------------------
   A(   
      A     "Parametri".AUTO
      A(   
      L     3
      L     "Parametri".Pasterizacija_status
      ==I   
      )     
      L     S5T#2M
      SD    T     10
      AN    "Parametri".AUTO
      R     T     10
      NOP   0
      LC    T     10
      T     #T10_WORD
      A     T     10
      )     
      FP    #temp_3
      JNB   _004
      L     4
      T     "Parametri".Pasterizacija_status
_004: NOP   0
///...................................................................


This is one example, where is used one parameter "INT" "Parametri".Pasterizacija_status ..

when I start in this case pasteur...buton for start move value 1 to int parameter "Parametri".Pasterizacija_status when that step is ower (Netw1), I made move value 2 to int parameter "Parametri".Pasterizacija_status

...each network here represent one step, after step is finish (conditions), they move value in int "Parametri".Pasterizacija_status

and thats all
:P :P :P


Top
 Profile  
 
 Post subject: Nedjeljko
PostPosted: Thu Mar 13, 2008 3:41 pm 

Joined: Sun Oct 01, 2006 3:17 pm
Posts: 53
Location: Europe
What is your native language?
Your code looks very interesting!

grtz
Maxime


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 13, 2008 4:07 pm 

Joined: Tue Nov 06, 2007 1:59 am
Posts: 107
Location: Croatia
my native language is Croatian...why you ask!?

If you have any question about this or step functions just shoot...

...I usualy use blocks with stepover bools... :wink:


Top
 Profile  
 
 Post subject: Graphcet
PostPosted: Thu Mar 13, 2008 5:08 pm 

Joined: Sun Oct 01, 2006 3:17 pm
Posts: 53
Location: Europe
Nejeljko, I just wondered because of the language which is used in your program, that's all :D.
Why not using Graph from Siemens?

grtz
Maxime


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 13, 2008 5:19 pm 

Joined: Tue Nov 06, 2007 1:59 am
Posts: 107
Location: Croatia
...yea...graph is solution for all step functions...
...but i have no knowlege about s7Graph...I know that is simple to learn, but I have no time to invest for learning...

..are you use Graph in your projects?! In couple weeks I planing to put all steps in new projects with s7 Graph...

...question about graph:
- Which DB and FC i must to put in project for S7graph
- When i define steps and transitions - I must to put some timers into steps?! Last try to make s7 graph steps I missout with some timers in steps...after that Im quit with investigation for s7 graph, so I made own FBs for couple mashine which wie sale...


Top
 Profile  
 
 Post subject: Graph
PostPosted: Thu Mar 13, 2008 6:29 pm 

Joined: Sun Oct 01, 2006 3:17 pm
Posts: 53
Location: Europe
Nedjeljko,

Probably you allready have some Graph installed on your system.
You add a Function Bolck and choose language GRAPH.
So you will get in GRAPH editor, which hasn't much to do with PLC programming anymore.
Still you need some logical skills.
As for normal FB's you choose your own DB to write to.
For example you take FB10 and DB10, easy to search for they have the same name.
Then you can call FB10, DB10 from anywhere, from a FC or a FB. You get then a block call whith a DB, just as normal. And there you can put some conditions into to start or whatever, just get the documentation and read what you need to use.
When you're in the GRAPH editor, the right side you have the actions, so you put a timer there.
It says Add New Element -> Action, you get an empty box with 2 parts and right-click on it, go for Object Properties. You get a window, go to the lower part of it and select an Operator: Event for example S1 - Step is activated and Instruction: TL, TD or TR which all are timers :D
The rest is up to you and your creativity.

It's better to say to your boss to take some time to learn or get some training. If you can't, you will loose time searching anyway but it will be on the time from the customer which is more expensive than the time off your boss.
Now and then people need to sharpen their skills by taking classes or further education.

grtz
Maxime


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 13, 2008 7:08 pm 

Joined: Tue Nov 06, 2007 1:59 am
Posts: 107
Location: Croatia
...no my boss understand that wie need to put graph into the projects...but you know how is - customer wants this in that time, and plus more 10 customers....that is much works to do...

...so In next two mount wie will crash that hustle...so I will in future use Graph for shore...

...Thanks for explanation...I will invest my time for investigate that...If Ill have question, I will free to ask you..Ok?

Thanks


Top
 Profile  
 
 Post subject: Questions about Graph
PostPosted: Fri Mar 14, 2008 10:53 am 

Joined: Sun Oct 01, 2006 3:17 pm
Posts: 53
Location: Europe
Nedjeljko,

You can always ask, it's for both of us a learning process. You can teach me stuff and the other way around.
If you have problems, i'll try to help you out!

grtz
Maxime


Top
 Profile  
 
 Post subject: graph
PostPosted: Fri Mar 14, 2008 1:38 pm 

Joined: Sun Oct 01, 2006 3:17 pm
Posts: 53
Location: Europe
Nedjeljko,

Do you use only 1 db to write this program: T "Paramteri".Pasterizacija_status?

grtz
Maxime


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 14, 2008 2:08 pm 

Joined: Tue Nov 06, 2007 1:59 am
Posts: 107
Location: Croatia
...yes ...for example..I use one DB (Shared) for Pasteuer...in that DB I have all information about process parameters (Status, Recipie) and bools for conditions...
...DB has a name "Paramteri" and parameter (INT) in to that DB has a name Pasterizacija_status....that is one parameter for All steps in mashine...
...with that Im allways shore where is position of production...so I can easly put indication on HMI :wink:


Top
 Profile  
 
PostPosted: Thu Aug 06, 2009 4:53 am 

Joined: Fri Feb 06, 2009 2:46 am
Posts: 10
Location: Philippines
hi Nedjeljko

i read your example program. unfortunately and i'm sorry i can't convert it to ladder format. can i ask you a favor can you convert for me and how DB you use looks like. i try to figure your program for a month to see the programming tricks but unfortunately i failed. rigth now i'm starting to study programming in stl format because almost our plc used in our company is been converted to siemens for uniformity and for the training purposes. it would be great help for me your proram to develop a new techinque. i only used self retaining coil but when i read your forum here i'm very interested on your programming techniques. i never been seen using integer in programming tricks and i'm sure it will help me in troubleshooting purposes. it's not stated in sitrain powerpoint that my friends give to me and maybe i can't acquire it in sitrain training center. pls share to me 8)

best regard


Top
 Profile  
 
 Post subject: Re: [?]: Ladder sequence
PostPosted: Sat Jan 15, 2011 8:26 pm 

Joined: Tue Nov 06, 2007 1:59 am
Posts: 107
Location: Croatia
...Im sory for long time no answer...I didnt see your post. Sory again.
If you need something just send me email: nedjeljko.vranic[at]atip.hr


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ] 

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by International PLCforum® Forum Software © PLCforum
Mobile version