Rockwell Automation 1746-BAS-T SLC 500 Basic Basic-T Modules User Manual
Page 55

Publication 1746-UM004B-EN-P - December 2005
Programming Overview 4-7
Refer to the BASIC Language Reference Manual, publication
1747-RM001, for additional information on these statements.
( ) .OR. ( )
Combine the first expression with the second expression
using .OR..
2.OR.1
( ) .XOR. ( )
Combine the first expression with the second expression
using .XOR..
3.XOR.2
MTOP
Return last valid memory address.
PRINT MTOP
( ) * ( )
Multiply expressions together.
4*4
p
Store constant.
3.1415926
RND
Return a random number.
RND
SGN ( )
Return the sign of argument.
SGN (-5)
SIN ( )
Return the sine of argument.
SIN (3.14)
SQR ( )
Return the square root of the argument.
SQR (100)
( ) - ( )
Subtract one expression from another.
8-4
TAN ( )
Return the tangent of argument.
TAN (.707)
TCON
Read/assign TCON register.
TCON=10H
TIME
Read/assign the free running clock.
P. TIME
XBY ( )
Read/assign external data memory.
P. XBY (10)
( ) = ( )
Allow the first expression to equal the second expression. 10=10
( ) < ( )
Allow the first expression to be less than the second
expression.
9<10
( ) <= ( )
Allow the first expression to be less than or equal to the
second expression.
X<=10
( ) > ( )
Allow the first expression to be greater than the second
expression.
10>9
( ) >= ( )
Allow the first expression to be greater than or equal to
the second expression.
X>=10
( ) <> ( )
Allows the first expression to be unequal to the second
expression.
10<>9
Operator
Function
Examples