Omron SYSMAC C200H-ASC02 Operation Manual page 73

Ascii unit
Hide thumbs Also See for SYSMAC C200H-ASC02:
Table of Contents

Advertisement

BASIC Language
USR Function
hh:mm: sets the hours and minutes (seconds 00)
hh:mm:ss: sets the hours, minutes, and seconds
<y$> is a string variable to which the current value of the time is
to be assigned.
Example:
TIME$ = "09:10:00"
PRINT TIME$
Remarks:
In the form <y$> = TIME$, TIME$ returns an eight character string in the
form: hh:mm:ss. If <x$> is not a valid string, an error message will be dis-
played.
Purpose:
To call a user-written assembly language program.
Format:
USR [<number>](<argument>)[,W]
<number> is a digit from 1 to 9 that was previously assigned to
the given assembly program with the DEF USR statement.
<x> is an argument used to pass data from the BASIC program
to the assembly program.
Example:
J = USR2(I),W
Remarks:
If <number> is omitted, the default value is zero.
If the W parameter in the USR statement is not specified, the watchdog timer
refresh will be performed as usual. If the W parameter is specified, then the
user must include a watchdog timer refresh routine in the assembly program.
The watchdog timer prevents the program from overrunning. When the set
time has run out, the ASCII Unit is reset, and the message "I/O ERR" is dis-
played on the programming console of the PC.
By refreshing the watchdog timer before its set value is up, the program can
be continuously executed.
To refresh the watchdog timer in the assembly program, execute the follow-
ing two steps every 90 milliseconds:
AIM #DF,03
OIM #20,03
The following table lists the Argument type and its corresponding Accumula-
tor code number.
Accumulator Value
2
3
4
8
Index register X contains the memory address where the argument is stored.
The address differs depending on the type of the argument as shown in the
following diagram.
Argument Type
Integer
Character
Single-precision, real number
Double-precision, real number
Section 4-2
63

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents