2.4.5.7. - Miscellaneous
reconfig-
Reconfigures the hardware.
This command obtains any modified configuration
information,
including hardware devices and types, CAMAC slot assignments
and motor parameters and settings,
from
the
config
and
settings
files.
The sequence of events is as follows:
First, spec waits for all asynchronous activity
(moving and counting) to finish.
It then does a
sync of the motor controller registers,
comparing them with the internal program positions.
Next, all open devices are closed.
The
config
file is then read to obtain the configuration information, and the program
opens and possibly does hardware
presence tests on the selected devices.
Finally,
the internal program motor positions are updated from the
settings
file
and then resynchronized with the motor hardware.
set_sim(how)-
If
how
is 0, simulate
mode is turned off.
If
how
is 1 (or positive), simulate mode is turned on.
In either case
the program waits for moving and
counting to finish before changing the mode, and the function
returns the previous
mode (0 or 1).
If
how
is -1 (or negative)
the function returns the current value of simulation mode without
changing it.
Whenever simulation mode is turned off, the motor
settings file is reread to restore the motor positions.
Simulation mode cannot be turned off if spec was invoked
with the
-s flag.
wait()-
Waits for all asynchronous activity to complete.
Returns
true .
wait(flag)-
If
flag
has bit one set (1), waits for moving to finish.
If
flag
has bit two set (2), waits for counting to finish.
If
flag
has bit three set (4), waits for
other data acquisition (multi-channel scaling, for example)
to finish.
If
flag
has bit five set (32), the function returns
true if any of the activities flagged by the first three
bits are active, otherwise it returns
false . Thus
wait(35) (or
wait(0x23)) returns
true if either counting or moving is active.
stop()-
Stops all asynchronous activity.
Returns
true .
stop(flag)-
If
flag
has bit one set (1), stops all motors that are moving.
If
flag
has bit two set (2), stops the timer, counters and
any other data acquisition (multi-channel scaling, for example).
|