timer trigger in s7300

mostafah

Member
Join Date
Apr 2007
Location
tehran-iran
Posts
26
hello everybody

i need a timer to start when an output rises to 1.
so i wrote this simple lines:

A Q 8.1
L S5T#5S
SP T 2

but i see that it starts only first time and after the first time, never starts!!!!!!!!!!!!

has any body an idea to help me?

Mostafa
Havaeji
 
Mostafa,

your code looks OK to me, but you don't state where it is programmed. I think you have probably used T2 in another spot in your program or you're using this code in a block which isn't called every program cycle. These are the only reasons I can think of why this code wouldn't work everytime.

Kind regards,
 
jvdcande said:
Mostafa,

your code looks OK to me, but you don't state where it is programmed. I think you have probably used T2 in another spot in your program or you're using this code in a block which isn't called every program cycle. These are the only reasons I can think of why this code wouldn't work everytime.

Kind regards,
Dear Jean
you are right, it's block is not called every cycle.
I hope it solve my problem.thank you,will tell you the result.

Mostafa
Havaeji
 
Dear jean
i wrote this code:

A Q 8.1
L S5T#5S
SP T 2

for each timer in one block that is alled each cycle.
Half of timers work properly, but those that are triggered by falling edge of outputs, like this:

AN Q 8.1
L S5T#5S
SP T 7

have the last problem.(works only once!!!!!!!!!!!!!!)
can you solve it again?

Mostafa
Havaeji
 
Dear Mostafa
I've write the following program and test it on simulator

A I0.0
FP M0.0
L S5T#2S
SE T0
A T0
=Q8.2

The output q8.2 goes on for 2s with positive edge of I0.0
Am I understand right?
or you need another idea!
 
Hi
Try incorporating falling edge of output like this:
A Q 0.0
FN M 150.0
S M 150.1

A M 150.1
L S5T#3S
SP T 5

A T 5
FN M 150.2
R M 150.1

Just a tip...
 
jvdcande said:
Mostafa,

your code looks OK to me, but you don't state where it is programmed. I think you have probably used T2 in another spot in your program or you're using this code in a block which isn't called every program cycle. These are the only reasons I can think of why this code wouldn't work everytime.

Kind regards,

Are you sure what you call each timer only once. Try to recheck your program.
 
dear mohamedzoba

when i trigger a timer with an input like i 0.1, it works well.
but i want to trigger my timer with AN OUTPUT. In this case, when the output is falling, it works only once!!!!!!!
if you have time, please write this code and test by simulator:
AN Q 8.1
L S5T#5S
SP T 7
if you find the problem,and then its solution, please tell me.

Mostafa
Havaeji
 
Mostafah,

with only snippets of code it's very hard to do troubleshooting. Please post the entire program and I'm sure we'll find the problem.

Kind regards,
 
mohamedzoba said:
i wrote the following statments on package and test it with simulator

an q8.0

l s5t#5s

sp t0
ok!
how you change the status of q 8.0 and then trigger the timer?
if you reset q 8.0 according to result of a comparison, you see my problem. if you want, i can send my whole program.
 
hi again dear mohamedzoba​


since your email addres is restricted i paste the blocks here.​
please note this explanation:​
I calculate a value(a power) and if it is more than a predefined value,i set some output subsequently and in order from q 8.1 to q 8.5.​
if it is less than a predefined value, i reset them from q 8.5 to q 8.1.each set or reset must be done after 5 second from previous set or reset. functions 21 to 24 are like 20 and are not here. functions 31 to 34 are like 35 and are not here.​
thank you in advance.​






OB1 - <offline>​







Block: OB1 "Main Program Sweep (Cycle)"​






Network: 1






CALL "ANALOGS"​

Network: 2​

A I 0.7​

S Q 8.0​

L S5T#10S​

SP "T1"​

Network: 3​

CALL "timers"​

Network: 4​

CALL "RESIDUE"​

Network: 5​

CALL FC 20​






Page 2 of 2​





Network: 6












CALL FC 21​

Network: 7​

CALL FC 22​

Network: 8​

CALL FC 23​

Network: 9​

CALL FC 24​

Network: 10​

CALL FC 30​

Network: 11​

CALL FC 31​

Network: 12​

CALL FC 32​

Network: 13​

CALL FC 33​

Network: 14​

CALL FC 34​






FC1 - <offline>​





"ANALOGS" ANALOG PROCESSING






Network: 1

L PIW 320​

ITD​

DTR​

L 3.616898e-003​

*R​

L 0.000000e+000​

+R​

T MD 100​

Network: 2​

L PIW 322​

ITD​

DTR​

L 3.616898e-003​

*R​

L 0.000000e+000​

+R​

T MD 104​

Network: 3​

L PIW 324​

ITD​

DTR​

L 3.616898e-003​

*R​

L 0.000000e+000​

+R​

T MD 108​

Network: 4​

L PIW 326​

ITD​

DTR​

L 3.616898e-003​

*R​

L 0.000000e+000​

+R​

T MD 112​







SIMATIC ATS9\SIMATIC 300(1)\CPU 315\...\FC1 - <offline> 07/12/2008 09:09:58 AM












Page 2 of 2​







Network: 5












L PIW 328​

ITD​

DTR​

L 3.616898e-003​

*R​

L 0.000000e+000​

+R​

T MD 116​

Network: 6​

L PIW 330​

ITD​

DTR​

L 3.616898e-003​

*R​

L 0.000000e+000​

+R​

T MD 120​







SIMATIC ATS9\SIMATIC 300(1)\CPU 315\...\FC10 - <offline> 07/12/2008 09:10:16 AM












Page 1 of 1​







FC10 - <offline>​




















"comparison"

























NP Real 0.0 nominal power​

RP Real 4.0 residue power​

OUT 0.0​

C Bool 8.0 consumer​








Block: FC10​




















Network: 1












L #RP //RESIDUE POWER​

L #NP //NOMINAL POWER​

>R​

= #C​







SIMATIC ATS9\SIMATIC 300(1)\CPU 315\...\FC11 - <offline> 07/12/2008 09:10:40 AM












Page 1 of 1​







FC11 - <offline>​




















"timers"


















Data Type Address Comment






























Network: 1












O "T1"​

O "T2"​

O "T3"​

O "T4"​

O "T5"​

O "T6"​

O "T7"​

O "T8"​

O "T9"​

O "T10"​

O "T11"​

= M 0.1​







SIMATIC ATS9\SIMATIC 300(1)\CPU 315\...\FC12 - <offline> 07/12/2008 09:10:55 AM












Page 1 of 1​







FC12 - <offline>​




















"RESIDUE"

































Name Data Type Address Comment






































L MD 90 // MAX ALLOABLE POWER USE​

L MD 100 // EM. USERS CONSUMPTION​

-R​

L MD 104 // COMPRESSOR1 CONSUMPTION​

-R​

L MD 108 // COMPRESSOR2 CONSUMPTION​

-R​

L MD 112 // PUMP1 CONSUMPTION​

-R​

L MD 116 // PUMP2 CONSUMPTION​

-R​

L MD 120 // ADDITIONAL LIGHTING CONSUMPTION​

-R​

T MD 124 // RESIDUE POWER​







SIMATIC ATS9\SIMATIC 300(1)\CPU 315\...\FC20 - <offline> 07/12/2008 09:11:09 AM












Page 1 of 1​







FC20 - <offline>​



































Name Data Type Address Comment





















Block: FC20​




















Network: 1












A I 0.7​

AN M 0.1​

JCN a​

L MD 124​

L 0.000000e+000​

<=R​

JC a​

A Q 8.1​

JC a​

CALL "comparison"​

NP:=1.000000e+002​

RP:=MD124​

C :=Q8.1​

A Q 8.1​

L S5T#5S​

SP "T2"​

A "T2"​

= M 0.1​

a: BEU​







SIMATIC ATS9\SIMATIC 300(1)\CPU 315\...\FC30 - <offline> 07/12/2008 09:11:28 AM












Page 1 of 1​







FC30 - <offline>​












































IN 0.0












OUT 0.0​

IN_OUT 0.0​

TEMP 0.0​

RETURN 0.0​

RET_VAL 0.0​







Block: FC30​




















Network: 1












A I 0.7​

AN M 0.1​

JCN a​

L MD 124​

L 0.000000e+000​

<=R​

JCN a​

AN Q 8.5​

JC a​

CALL "comparison"​

NP:=1.000000e+002​

RP:=MD124​

C :=Q8.5​

A Q 8.5​

FN M 0.7​

= M 0.6​

A M 0.6​

L S5T#5S​

SE "T7"​

A "T7"​

= M 0.1​

a: BEU

 

Similar Topics

Good morning guys, I'm searching for a Timer relay which accomplishes the "flasher" condition in the photo attached, however, I need the ability...
Replies
2
Views
396
Hello all, I am trying to improve my skills, so I decided instead of moving a value into every single .PRE of an array of timers, I thought I...
Replies
6
Views
236
I confess, I always have a little frustration trying to accomplish tasks in CCW that are simple in Studio 5000. My latest task is with timers...
Replies
5
Views
345
Hi, I am attempting to turn on an output for one second, every thirty seconds, but am having some trouble. I have a XIC with S:1/15 (first pass)...
Replies
9
Views
454
Hello everybody, Since my experience is mainly with AB ladder I am having little bit of a problem with EasySoft.. Does anyone knows is there a...
Replies
4
Views
763
Back
Top Bottom