S5 plc, timer value

steen.bill

Member
Join Date
Sep 2002
Location
Denmark
Posts
21
Hi All...

Siemens S5 STEP5 software.

How can i transfer the current timer status to a DW?
I would like to read current value for calculating timers preset.
 
Bill,

very simple. If you want it in KF format (Integer) then you use the instructions
L Tx
T DWy
If you want the value in a timer format (KT) then you use
LC Tx
T DWy

It's all in the manual!

Kind regards,

Jean Pierre Vandecandelaere
 
S5

Hello Jean.

I know. That are for preset a timer, i want to read a current timer value, not to write/load a preset.

Ex.
A I 6.0
L KT 100.2
SD T2

When I 6.0 are 1,
i would like to read the current value in T2 (from 100 --> 0)
How this?
If i use T DW i get ei. KT 100.2

Bill
 
Bill has the correct approach for you. You need to know that the load instruction is unconditional in S5. So you will have to get tricky with the timer read. For example:

A I6.0............If the input is on
jc=read...........go do the timer read....else
l kf 0............get a zero and
t dw x............clear the count register
beu...............then end
READ:
l T...............get the timer value
t dw x............and save in the count register.
be................then end

This just an example of how I would handle your task. There are as many ways to do this as there are programmers. You may not want to clear the count register and just leave the last value or set it to full count but keep in mind once you take to loading the value conditionally you will have to manage that data when you are not scanning the timer.

Regards
Lenny
 
Last edited:
Hi,

Sorry to say, I can't help you, 'cause no Siemens experience.

I'm not going to start another thrashing - bear in mind - I love all PLC's.

Just wan't to thank Miss.ACC . I can imagine how miserable my life would be, without you.
 

Similar Topics

Hi there I'm guessing this is a straightforward one but after much experimenting I've been unable to find an answer. The software is TIA V16...
Replies
5
Views
2,376
hello to all I have a HMI and in this HMI I have numeric entry that I inter value. and in the gmwin I have a timer(TON) that at PT part I want...
Replies
1
Views
1,604
Hello All, I am fairly new to the Mitsubishi software and I ran through the tutorial and pretty much have my entire program written except for...
Replies
1
Views
1,652
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
616
Hi! i'm just wondering did there is any chance to change Set Time(TV) on Siemens plc timer without step 7 using c# or python if timer not set in...
Replies
1
Views
1,263
Back
Top Bottom