Timer events – Industrial Data Systems IDS Scale Basic User Manual

Page 44

Advertising
background image

Scale Basic 4.2E

Reference

Timer Events

Purpose 1: to trigger a scale basic function after a set time interval.
Purpose 2: to wait an interval of time inside a scale basic function.

Remarks
: Timers are activated using the Scale Basic instruction: Timer on [t]. When a timer is

activated, the time interval is set into the timers countdown register. The countdown register
decrements by 1 every 0.1 seconds. When the countdown reaches 0 the Scale Basic function
is executed. There are 5 timer records that contain the following data:
Time interval [P0]

time interval in tenths of a second (x0.1sec). Max = 6553.0 sec.

Execute Function[P1] the scale basic function to execute when time-out occurs.
Timers 1-4 must be reactivated with a Timer on instruction to begin again. Timer 5 is an
auto-reload timer.


Timer5: automatically reloads after it counts down to 0. This provides more accurate timing of

repetitive events (such as pulse outputs, speed calculations, interval timing, etc.). Timer5
continues cycling until the Timer off, 5 instruction is executed.


Example Purpose 1: trigger user function 7 after a 1 minute time-out. Configure timer 1:

Time interval

600

1 minute = 60.0 seconds

Execute Function

User7

execute user function 6


Example Purpose 2: display a message for 2 seconds then display Gross weight. Configure

timer 1:

Time interval

20

set for 2.0 seconds

Execute Function

User1

execute user function 1


Fn. 1 Prompt, ERROR

Display ‘ERROR

Timer on, 1

turn on timer 1

Loop1

While

If Timer1

Timer 1 is on

Next1

Wait

End

if

End

While

Display,

Gross

Display

Gross

weight


Example Timer5: Pulse relay output 1 at 0.2 second intervals.

Configure F1 key to execute user function 10.

Configure Timer5 to execute function 10 after a 0.2 second time-out.

Time interval

2

set for 0.2 seconds

Execute Function

User10

execute user function 10


Fn10 If, Flag1

if Flag 1 is on

Flag off, 1

turn off flag 1

Relay off, 1

turn off relay 1

Else

Else

Advertising