Xby([expr]), Time – Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual
Page 39

Publication 1746-RM001A-US-P
Expressions and Operators 3-17
XBY([expr])
Use the XBY operator to retrieve or assign data to or from the external data
memory of the module. The argument for the XBY operator must be a valid
integer between 0 and 65535 (0FFFFH). The value assigned to the XBY operator
must between 0 and 255 inclusive. If it is not, a bad argument error occurs.
TIME
Use the TIME operator to retrieve or assign a value to the free running clock
resident in the module. After reset, time is equal to 0. The CLOCK1 statement
enables the free running clock. When the free running clock is enabled, the special
function operator TIME increments once every 5 milliseconds. The units of time
are in seconds.
When TIME is assigned a value with a LET statement (example:
TIME=100
), only
the integer portion of TIME is changed.
>CLOCK1
(enable FREE RUNNING CLOCK)
>CLOCK0
(disable FREE RUNNING CLOCK)
>PRINT TIME
(display TIME)
3.315
>TIME = 0
(set TIME = 0)
>PRINT TIME
(display TIME)
.315
(only the integer is changed)
IMPORTANT
Improper use of this operator may cause a malfunction of the
module.
Example
Result
A = XBY(0F000H)
The value in external memory location 0F00H is assigned
to variable A.
XBY(4000H) = DBY(100)
The value in internal memory location 100 is assigned to
external memory location 4000H.