Autoremote, Buffered – Measurement Computing Personal488 rev.3.0 For DOS & Windows 3.Xi User Manual
Page 330
![background image](https://www.manualsdir.com/files/797818/content/doc330.png)
III. COMMAND REFERENCES - 15. Command References
15B. Driver488/SUB, W31, W95, & WNT
Personal488 User’s Manual, Rev. 3.0
III-315
The
Arm
command allows Driver488 to signal to the user specified function when one or more of the
specified conditions occurs.
Arm
sets a flag corresponding to each implementation of the conditions
indicated by the user.
Arm
conditions may be combined using the bitwise
OR
operator.
Once an interrupt is
Arm
ed, it remains
Arm
ed until it is
Disarm
ed, or until Driver488 is reset. BASIC
automatically suppresses light pen interrupt detection during the execution of an interrupt service
routine, so the interrupt service routine is never re-entrantly invoked. In languages that explicitly poll
the light pen status, polling should not be done during the interrupt service routine.
If Pascal or C is being used, the
OnEvent
function must be called. This function acts similar to the
ON PEN
command in BASIC. When the
Arm
ed condition occurs, the
OnEvent
function calls a
function specified by the user.
AutoRemote
SYNTAX
int pascal AutoRemote(DevHandleT devHandle, bool flag);
devHandle
refers to either an IEEE 488 hardware interface or an external device.
If
devHandle
refers to an external device, the
AutoRemote
command acts on
the hardware interface to which the external device is attached.
flag
may be either
OFF
or
ON
RETURNS
-1 if error.
When the flag is non-zero, AutoRemote is enabled; a zero flag
disables the function.
MODE
SC
BUS STATES
None
SEE ALSO
Local, Remote, Enter (see EnterX), Output (see OutputX)
EXAMPLE
errorcode = AutoRemote(ieee,ON);
The
AutoRemote
command enables or disables the automatic assertion of the Remote Enable (
REN
)
line by
Output
. When
AutoRemote
is enabled,
Output
automatically asserts
REN
before transferring
any data. When
AutoRemote
is disabled, there is no change to the
REN
line.
AutoRemote
is on by
default.
Buffered
SYNTAX
long pascal Buffered(DevHandleT devHandle);
devHandle
refers to either an IEEE 488 hardware interface or an external device.
If devHandle refers to an external device, the
Buffered
command acts on the
hardware interface to which the external device is attached.
RETURNS
-1 if error, otherwise long integer from 0 to 1,048,575(2
20
-1)
MODE
Any
BUS STATES
None
SEE ALSO
Enter (see EnterX), Output (see OutputX)
EXAMPLE
result = Buffered(ieee);
printf(“%ld bytes were received.”,result);
The
Buffered
command returns the number of characters transferred by the latest
Enter
,
Output
,
SendData
, or
SendEoi
command. If an asynchronous transfer is in progress, the result is the number
of characters that have been transferred at the moment the command is issued. This command is most
often used after a
count
ed
Enter
,
EnterN
,
EnterNMore
, etc., to determine if the full number of
characters was received, or if the transfer terminated upon detection of
term
. It is also used to find out
how many characters have currently been sent during an asynchronous DMA transfer.