TIA V13 multi instance timers

barryoc

Lifetime Supporting Member
Join Date
Nov 2009
Location
Kilkenny
Posts
148
Hi all,

I'm struggling to use iec timers in the static area of an fb. LD gave this example for step 7 v5.x which i've used many times with no problem. I cant find a similar example for tia. Can someone share how to do this in tia?

Thanks,
Barry.
 
Was in a rush earlier and hadnt time to explain further.

What i have done so far in TIA v13. (CPU 1212C V4.0) I think the cpu is one issue.


  1. Created an FB and inserted a TON_TIME in the static block interface area.
  2. Saved the blocked and called it in OB1.
  3. Dragged a TON from the timer operations to the program area of this FB.
  4. For the timer IN I used the IN that was created in the instance DB
  5. For the PT I used the PT that was created in the instance DB, and set to 5 seconds.
  6. In an FC I have an input to turn on the IN of the required timer, but timer will not start. I also tried this in an FC with same result.
Can someone point me in the right direction.


Thanks,
Barry.
 
Barry,

when i add a timer to a FB, i just drag and drop it, and then it will prompt me with questions about how I want it to be used (single/multi).

I've never written it into the static area prior to drag/drop.

I attached a picture of a simple FB I put together for one of my projects.

I call this fb in two different instances of the program, with different setpoints etc.

hopefully this helps some, Im a little foggy on what your doing with steps 3/4

Capture.jpg
 
As dwoodlock describes it, drag-and-drop the IEC timer into the rung you where you want the timer.
A prompt will appear where you will be asked if you want a single instance or multi instance. Be sure to select multi instance.
The timer will be added to the declaration area immediately, but it will get some default meaningless name, so change the name in the declaration as the first thing.
See attached image.

TIA_IEC_timer_lad.jpg
 
Thanks Guys,

I have attached screen shots of the ladder in Step 7 V5.5 that I'm trying to replicate. Maybe this will explain things better.

V5.5 images code works.

FB interface is common for both methods in TIA

FB Ladder and FC ladder work in TIA

FB Ladder1 and FC ladder1 do not work. The timer wont start.

Thanks for taking the time guys.

FB V5.5.jpg FC V5.5.JPG FB Ladder.PNG FB Interface.jpg FB Ladder1.PNG
 
Last edited:
The timer wont start because the setpoint is zero (T#0s).
Edit: actually one can gleen from the screenshot that the setpoint is 25 seconds. Not sure what goes wrong for you. I suggest you start all over.

The v5.5 sample for the FB is not correct either, since the preset time pin "PT" on the "Bell" timer is fed itself (!).
So dont copy this to TIA since it is a wrong way in v5.5 as well.

You have to decide if the timer must have a fixed setpint, or a variable setpoint.
If fixed setpoint, simply specify a time in TIME format, i.e. T#5S for 5 seconds.
If variable setpoint, you must forward another variable to the PT pin on the IEC timer.
Also, in TIA there is a more simple representation which you can use if you dont need to use the expired time value (ET pin). See my example.
 
Last edited:
Thanks Jesper,

I had an inkling the 5.5 version may not be correct. In v5.5 the PT is variable from HMI so I'm changing the PT using a global DB which i then move this value into the instance DB PT. I use the ET to display remaining time on the HMI. Image attached. The maths is there because I enter time in seconds and milliseconds for this timer. All other timers are minutes and seconds, that's the reason for the multiply by 1 in this rung.

DB11 is global DB and DB14 is instance DB for all Timers.


I think I will start a new project and see how that goes.

Variable PT.jpg
 
Last edited:
You are "overlinking" everything...
When you call the timer with its instance DB "pause_time", it is all linked. IN is already "pause_time".IN, Q is "pause_time".Q etc..

Leave PV and ET empty, link your HMI directly to db14."pause_time".PV and db14."pause_time".ET, and link the Ms directly to IN and Q in the T_ON call.
 
Thanks guys,

The v5.5 program was my first one written 5 or 6 years ago. Just trying to convert it to tia. Hopefully i can learn tia and improve on my programming.
 

Similar Topics

I am working on a program that was developed in 2015 for an S7-300 safety PLC. The new copy of this machine uses an S7-1500 safety plc. We were...
Replies
4
Views
1,789
Hi Guys, Please, I'm in need of TIA Portal v13 SP1 The V13 I saw can't open a Comfort panel HMI file. Can any one help? It will be much...
Replies
13
Views
5,231
Hey guys, So I successfully added a new Leuze barcode scanner to my existing profinet network and now I'm trying to add HW_Submodules to my new...
Replies
3
Views
3,221
Hey guys, so I'm having issues going online with a plc using TIA V13. I feel like I must be missing something basic in my understanding. New to...
Replies
6
Views
1,869
Trying to add new logic using TIA V13 and when I try to download I get this message that I attached. This machine is running constantly. Will I...
Replies
14
Views
1,979
Back
Top Bottom