CONTROL
Sends control information to an interface, I/O path, or widget attribute(s).
CONTROL dest [,register] ; value [,value...]
|
Usage:
|
CONTROL @Path,5;Record
CONTROL 2;Column,Line
CONTROL 1801,19;Gains(*)
CONTROL @Strip2;SET ("CURRENT AXIS":"X", "RANGE":20)
CONTROL @Slider;SET ("VALUE":Setpoint)
|
Description:
Use CONTROL to send control information to an interface or set parameters associated with an I/O
path. Information is sent by specifying a starting register and a value. If no register is specified,
register zero is used. If you specify more than one value, the register number is incremented by one
after writing each value.
If the destination is an I/O Path, information is set in the I/O path rather than being sent to the
device or file. If the destination is an interface select code (ISC), then the information is sent to the
device driver for interpretation. Consult the documentation for a particular device to find the usage
for each register.
The range of legal registers and the meaning of values written to them differ for each
interface. The Users Guide describes the CONTROL and STATUS registers for many of
the interfaces and for I/O paths.
Basic Plus
Each widget has a variety of attributes that control its appearance and behavior. The
CONTROL command is used to assign a new value to a widget attribute. The widget must
have been created previously using an ASSIGN statement. Attributes are either scalar
(may contain a single value) or vector (may be assigned an array of values) and have
values of either numeric or string type.
You can use a shorthand method to assign values to several scalar attributes without
naming them individually on the ASSIGN statement. To do this, you store all the attributes
in a string array and all the matching values in another array of the same size.
Then, when you specify both array names in the SET option of the ASSIGN statement, the
attribute named in each element of the string array will be assigned the corresponding
value in the value array. Elements of the string array that contain nothing, or nothing but
blanks, will be ignored. For example:
Attribs$(1) = "X"
Attribs$(2) = "Y"
Attribs$(3) = "WIDTH"
Attribs$(4) = "HEIGHT"
Values(1) = 5
Values(2) = 5>
Values(3) = 500
Values(4) = 300
CONTROL @Panel;SET (Attribs$(*):Values(*))
BackPorting to HP BASIC:
TransEra has added capabilities to several of the standard interfaces. The additional registers
resulting from these enhancements are always numbered 100 and above. In some instances
HTBasic can pass arrays to and from a single register. This capability is used for things like gain
control lists in data acquisition drivers. These new features are not available in HP BASIC. They
should not be used in programs that must be ported back to HP BASIC.
See Also: