Introduction.
Introduction.
Introduction.
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Workshop PG5<br />
Resources<br />
Timer Example:<br />
You have a high signal on Input 4. On the rising edge of this signal you want<br />
to send a high signal out, output 65. This signal will have a duration of 2,5<br />
seconds.<br />
Integer value:<br />
Load the timer:<br />
LD T 1<br />
25<br />
Value displayed by the<br />
output "t" of the<br />
XPluse FBox<br />
Binary value:<br />
Value displayed by the output Q<br />
Instruction list program: FUPLA program:<br />
Solution:<br />
COB 0 ;organization block 0<br />
0 ; time out time<br />
STH I 4 ;If input 4<br />
DYN F 12 ;sees a rising edge<br />
LD T 1 ; load the timer1<br />
25 ; with 2,5 seconds<br />
STH T 1 ;copy timer state<br />
OUT 0 65 ;to the output O65<br />
ECOB<br />
(FBox: Time related, Exlusive Pulse)<br />
Technical stuff:<br />
Time constants<br />
Timers in the SAIA PCD are decremented at a rate defined by the “Software<br />
settings” “Timer” “Timebase”(normally 100ms). The actual time defined by a<br />
constant which is loaded into a Timer changes if the “Timebase” is changed.<br />
This means that if the “Timebase” setting is changed, then all Timer load values<br />
must also be changed. To overcome this problem, the “time” data type can<br />
be used to declare Timer load values. If a time value is used, then the linker<br />
calculates the actual Timer load value according to the “Timebase” settings.<br />
Format:<br />
T#nnnS|MS<br />
Examples: DelayTime EQU T#100MS ;100 milliseconds<br />
OneDay EQU t#86400s ;86400 seconds<br />
© Saia-Burgess Controls Ltd. Page 3-8