Siemens S7-400 S5TIME calculation

M

Thread Starter

Moli

Hello all,
I met some problem in my problem, I want to divide a S5time type data, but I can't do it.
for example, a s5time nalue is 60s, I want to get
its one third(20s), so try I divide it by 3,
but it can't achieve it.
How can I achieve the requirement?

Thanks and regards
 
I'm not sure if I understood right, but...
S5 time data is bcd-coded 16-bit number = 4x4bcd's
KH=1234 / KT= 234.1 meens 23.4secs etc.
First 4 bits=time factor=time value multiplied by 10 rised to a power of the factor x10ms.
Complexed?
Ask more pls, if needed.
pk.
 
D

Donald Pittendrigh

Hi All

Take a look at FC33 in the IEC functions library,
it is the most elegant way of solving your problem.

Regards
Donald Pittendrigh
 
Top