For Next Help

set-csg

Member
Join Date
Nov 2006
Location
ILIGAN CITY
Posts
42
Hi Everybody,

Can you give a specific example on how FOR NEXT INSTRUCTION is use or applied in an industrial setting. I know how these particular instruction operates but I cannot relate it on how this one is applied on actual plant or factory operation.

Pls. help me, if you have a specific program as far as FOR NEXT in S7 200 is concern, that would be find if you can share that to me.

set-csg
 
Set,

Suppose you had a plant that had 10 storage tanks, each with a level sensor with an analog output. Your HMI screen has room for only one level display at a time. Using a For-Next Loop, you can create a routine that reads the value of each tank and displays it for 5 seconds, then moves to the next tank, until all 10 have been displayed. Then the For-Next loop repeats.

For I = 1 to 10,
Display Tank (I)
If Timer (1) >= 5 sec, then Next I

I will leave it up to the students to fill in the details!
 
Last edited:

Similar Topics

For Next Help Hi Everybody, Can you give a specific example on how FOR NEXT INSTRUCTION is use or applied in an...
Replies
2
Views
1,957
I've got this start screen where the user has to enter their username and password. The username and password feature works fine. However, I want...
Replies
7
Views
1,434
Anyone know what the little green triangle on SCREEN 3 means ? See picture Thanks
Replies
2
Views
457
What do you guys think of this representation for on/off contacts? C003 is on, then others are off. I have never seen the logic represented in...
Replies
5
Views
1,799
Is it possible to get a report about used digital inputs on GE Proficy? I want to set what inputs are available.
Replies
3
Views
1,082
Back
Top Bottom