BASIC commands
PROGRAMMING MANUAL
144
Revi
si
on 3.0
3.2.258 TAN
/i
3.2.259 THEN
See
IF..THEN..ELSE..ENDIF
.
3.2.260 TICKS
/i
3.2.261 TIME
/i
Type
Mathematical function
Syntax
TAN(expression)
Description
The
TAN
function returns the tangent of the expression. The expression is
assumed to be in radians.
Arguments
•
expression
Any valid BASIC expression.
Example
>> print TAN(PI/4)
1.0000
See also
N/A
Type
Task parameter
Syntax
TICKS
Description
The
TICKS
parameter contains the current count of the task clock pulses.
TICKS
is a 32-bit counter that is decremented on each servo cycle.
TICKS
can be written and read. It can be used to measure cycles times, add time
delays, etc.
Each task has its own
TICKS
parameter. Use the
PROC
modifier to access
the parameter for a certain task. Without
PROC
the current task will be
assumed.
Arguments
N/A
Example
delay:
TICKS = 3000
OP(9,ON)
test:
IF TICKS <= 0 THEN
OP(9,OFF)
ELSE
GOTO test
ENDIF
See also
N/A
Type
System parameter
Syntax
TIME
Description
Returns the time from the real time clock. The time returned is the number of
seconds since midnight 00:00:00.
Arguments
N/A
Example
No example.
See also
N/A
I52E-EN-03.book Seite 144 Freitag, 29. Juni 2007 11:55 11