Timer off / timer on (n) 225 [n] / 224 [n – Industrial Data Systems IDS Scale Basic User Manual

Page 33

Advertising
background image

Scale Basic 4.2E

Reference

Timer off / Timer on

(n)

225 [n] / 224 [n]

Purpose: to activate / de-activate a timer.

Remarks: the active timers are scanned by the event monitor. When an active timer counts

down to 0 (times out) it activates a scale basic function and de-activates itself. Timer off 0
turns off all timers. NOTE: timer 5 is a special timer. It is an ‘auto-reload’ timer. When it
times out, it automatically restarts itself, and then executes a scale basic function. The Timer
off instruction must be executed to turn off timer 5.


Example: keyboard key F1 activates function 1. Function 1 starts a relay output cycle where

relay 1 turns on in 5 second intervals. Relay 1 turns off based on the number of tenths of
seconds entered into Memory1.

Timer1:

Time:

1

time interval = 0.1 seconds

Function User3

execute function 3: turn off relay 1


Timer2: Time:

20

time interval = 2.0 seconds

Function: Resume

execute Resume (used for Prompt pause)

.

Timer5: Time:

50

time interval = 5.0 seconds

Function: User2

turn on relay1, turn on timer 1


Fn. 1: All off

Begin with all setpoints, timers, and relays off.

Prompt “ONTIME”

prompt for on time data entry.

Timer On, 2

turn on prompt pause timer

Suspend suspend

for

2

seconds

Dp adjust, Memory1, 1

set memory1 for 1 decimal position

Get data, Memory1

get ON time

If not Clear key

if NOT Clear key

Timer on 5

turn on timer 5 (auto-reload timer)

Goto

User2

GOTO

user

function

2

End

if

end

if

End

End

of

function


Fn. 2: Relay on, 1

Turn on relay 1

Timer on, 1

Turn on timer 1

Copy Memory2, Memory1 copy ON time to Memory2

End

End of function: note timer 5 restarts itself.


Fn. 3: Dec Memory2

subtract 1 from ON time interval

If Positive

If ON time > 0

Timer

on,

1

re-activate

timer

1

Else

Else

Relay off, 1

Turn off relay 1

End

if

End

if

End

End

of

function

Advertising