S7 timer doubt

  • Thread starter Eduardo Herrera
  • Start date
E

Thread Starter

Eduardo Herrera

hi ! I have declared in DB70 a variable called time with type s5time..
Now.. I want to assign that time to timer100 preset.. but I can´t I´ve tryed the next db70.dbw# and db70.dbd#,,, where # is the address..
it keeps on error...

can somebody help me?

thanks

 
Z

Zan Von Flue

hi
The 100 is not enough information. The address for the timer is db70.dbw#. The number in this address needs to follow the S5 programming form. The form should be:
X X X X (hex word)
| (BCD code)
| from 0 0 0 - 9 9 9
|
---time base either
0=0.01s
1=0.1s
2=1s
3=10s
this is why the time can only be between 10ms and 9990s. produce a BCD number (with the function) and OR the time base.
this should work.
The S7 time is 32 bit. I don't know the form, if needed.
Later
zan
 
Z

Zan Von Flue

>I have declared in DB70 a variable called time with type s5time..Now.. I want to assign that time to timer100 preset.. but I can´t I´ve tryed the next db70.dbw# and db70.dbd#,,, where # is the address.. it keeps on error...>

Hi Zan again
After reading your question again it could also be (morelikely), when your typing the 100 in the DB editor, DB70, (and DATA view) try typing a 's' afterward to signify seconds-- or 'ms' for milliseconds.
later
zan
 
Top