296
Gemini GV6K/GT6K Command Reference
[ TIM ]
Current Timer Value
Type
Assignment or Comparison
Syntax
See below
Units
Milliseconds
Range
Maximum count is 999,999,999 (approx. 11 days, 13 hours)
Default
n/a
Response
n/a
See Also
TIMINT, TIMST, TIMSTP, TTIM
Product Rev
GT6K 6.0
GV6K 6.0
The
TIM
command is used to assign the timer value to a variable, or to make a comparison against another
value. The value returned is in milliseconds.
Syntax:
VARx=<n%>TIM
where
x
is a numeric variable number, or
TIM
can be used in an expression such
as
IF(TIM<24ØØ)
. Multi-tasking: If addressing the timer of a specific task, include the
n%
prefix.
Example:
VAR1=TIM
; Timer value is assigned to variable 1
IF(TIM<1000)
; If timer value is < 1000 milliseconds, do the IF statement
VAR1=TIM + 10
; Timer value plus 10 assigned to variable 1
NIF
; End IF statement
TIMINT
Timer Value to Cause Alarm Event
Type
Timer; Alarm Event
Syntax
<a_><!>TIMINT<b>,<i>
Units
i = milliseconds
Range
b = 0 (reset and start) or 1 (stop)
i = 0 - 999,999,999
Default
0,0
Response
TIMINT: *TIMINT0,0
See Also
INTHW,
[
TIM
],
TIMST,
TIMSTP,
TTIM
Product Rev
GT6K 6.0
GV6K 6.0
The
TIMINT
command sets the timer value upon which the Gem6K drive will trigger an Alarm Event. The
time value at which the alarm event will occur is specified by the second field in the command.
NOTES
•
To use
TIMINT
, you must first issue the
INTHW.21-1
command to enable checking for the
alarm event.
•
When using multi-tasking, this feature only works with the timer for Task zero.
The
TIMINT
command also determines if the timer is to be stopped when the value is reached, or if the
timer is to be reset and started again. If the timer is to be stopped upon reaching the alarm value, a one
should be specified for the first field. If the timer is to be reset and restarted upon reaching the alarm value,
a zero should be specified for the first field. By specifying a zero in the first field, an alarm will occur
repeatedly.
Example:
INTHW.21-1
; Enable checking for the timer-driven alarm event
TIMINT1,10000
; Trigger alarm once after 10000 ms, do not restart the timer
TIMST0
; Reset and start timer
www.comoso.com
Содержание Gemini GT6K
Страница 24: ...www comoso com ...
Страница 40: ...www comoso com ...
Страница 344: ...www comoso com ...
Страница 350: ...www comoso com ...