Urgend Step 7 programming problem

userxyz

Member
Join Date
May 2002
Location
any
Posts
2,768
I have a little programming problem.

I use timers to pump product to our printerline (carpet industry), some tanks needs 12 seconds, some 10, some less, this was all tested at the moment we did the last software update. But, we have a problem. The problem is that I didn't set the timers retentive. Now that I did that, this happens: when the CPU starts-up, the timer continue it's time where the cpu stopped. That's no good. When the CPU start's up, nothing may functioning. Therefore, this question...

Can a timer presetvalue be variable ?

My idea is: when the cpu goes in stop at restarts, that u need to start again with a button, and then the timer must go on.

Can I write to a preset value of a timer ? How would u guys do this ?
 
Hello Combo;
here is one way to do it, using DB variables:


Then implement the logic required to select the adequate preset for your operation. Just remember that you can use a S5Time variable anywhere in your logic to setup a preset for a Simatic timer. For IEC timers (SFB3, 4 and 5) the variable format must be TIME (T#..).

Hope this helps,
Daniel Chartier
 
Great hel^p

You are a great help, with SFB4 I can do what I want. It works fine. The only thing a need to ask, I need to make a multiple DB for SFB4 in an FB, because I made one block for 3 tanks (groeped); there are 15 tanks.

How can I make a multiple DB for the SFB4 ?

Then it shall work perfectly.

;)
For test I entered 20000 at the time input of the SFB4; 20000 ms = 20secs, when IN1 is high and the block is enabled, it works fine. The variable for the time value's are written in a shared DB, I made this DB retentive in the hardware configuration, so far it works, thanks for your help, if u have the time, can u take a look how to implement a DB in an FB (multiple use of an FB)

:(

Thanks

Regards, :rolleyes:

CoMBo
 
Hello Combo;
I'm not exactly sure what you are trying to do, but this is how you can implement Multiple Instances of an FB:

Look at the online help in Step 7, (search for Multiple Instances, for example) for mor einfo.
Hope this helps,
Daniel Chartier

mult_inst.jpg
 
Hello Combo;
Sorry for the delay in answering you.

Once you have gone through the procedure shown in my earlier post, save your FB (FB6 in my example). When you call it (in OB1, for example) you will be asked to generate an instance DB (DB60 in my case). Look at how DB60 is configured (in Data View):
Hope this helps,
Daniel Chartier

mult_inst_db.jpg
 

Similar Topics

I am having a step7 v5.4 program where the blocks are encrypted and locked. And the manufacturer is stopped the support. Is there any ways to...
Replies
2
Views
168
Good Morning, Hoping someone with some Siemens experience can give me a hand with this one. Customer has a S7-200 cpu, which has a 6GK7...
Replies
0
Views
243
HI! HOW COULD I OBTAIN THE NAMES OF THE STEPS OF A ROUTINE IN SFC LANGUAGE IN STUDIO5000? Or is there a system variable that gives me those...
Replies
0
Views
339
I'm just trying to figure out the right method of adding a DO card to an existing rack. It's not the *next* open slot, but I have to move the AO...
Replies
5
Views
543
Hi Siemens Experts, I am hoping someone can shed some light on my issue. I have uploaded the code from a S7-300 (317-2PN/DP) using Step 7...
Replies
9
Views
656
Back
Top Bottom