FC33 S5TI_TIM Block in S7

tulip

Member
Join Date
Oct 2005
Location
ist
Posts
236
How can I convert from Real format to S5Time format ?For example:
1.000 ----> 1s ---> S5T#1S
0.9 ----> 0.9S ----> S5T#900MS
0.825 ----> 0.825S ---> S5T#825MS....ETC.
 
Hello,
Code:
L #YourTime                // real format
L 1000.0
*R
RND                           // here you get DINT in ms.
T #YourTime_in_ms

      CALL  "TIM_S5TI"   // FC 40 from Standart library -> IEC functions
       IN     :=#YourTime_in_ms
       RET_VAL:=#S5_time_output

Regards.
 
Last edited:
Thanks for asap reply but I use FC33 S5TI_TIM .I will be use output of this block in FB41 Continuous_C pid block as TI parameter.FC40 block convert TIM_S5TI.
 
FB41 TI parameter is a TIME, not an S5TIME.

Just use SKHODRANS suggestion how to convert a REAL in seconds to a TIME in milliseconds. Ignore the TIM_S5TI call which is not needed.
 

Similar Topics

I would like to use the external clock source function to display time on a 15" C-more EA9 panel. The source would be a Logix processor. When I...
Replies
2
Views
1,346
Hi, Trying to get my head around the TIM instruction on a Omron CP1E plc. The maximum set valve is 9999 which is only 9.9 seconds. (BCD ) What if...
Replies
12
Views
3,531
I have an older CQM1H-CPU21 with cs-programmer 4.0. I have a TIM instruction and I'm trying to lower the time. The value for the timer is stored...
Replies
5
Views
2,196
hello to all I set a timer in omron plc(CPM2A) to count seconds but I have problem here!! time in omron plc is faster than I expect ! I know TIM...
Replies
7
Views
3,166
We inherited a WinCC system which comprises a ST7 driver. However a near station we have connected to it over fiber optic therefore we have direct...
Replies
0
Views
2,392
Back
Top Bottom