Openname, Output (controller mode) – Measurement Computing Personal488 rev.3.0 For DOS & Windows 3.Xi User Manual
Page 350

III. COMMAND REFERENCES - 15. Command References
15B. Driver488/SUB, W31, W95, & WNT
Personal488 User’s Manual, Rev. 3.0
III-335
// Normally, your program would be off doing other work, for
// this example we will just hold here for a short time.
For(result = 0; result 30000; result++) {
printf(“Result is %06d\r”, result);
}
printf(“\n\n”);
qsk(xfered, Spoll(wave16));
qsk(x, Close(wave14));
qsk(x, Close(wave16));
qsk(x, Close(ieee0));
}
OpenName
SYNTAX
DevHandleT pascal OpenName(char *name);
name
is the name of an interface or external device.
RETURNS
Device handle associated with the given name, or -1 if error.
MODE
Any
BUS STATE
None
SEE ALSO
MakeDevice, Close
EXAMPLES
dmm = OpenName(“DMM”);
Open the external device DMM
dmm = OpenName(“IEEE:DMM”);
Specify the interface to which the external
device is connected
The
OpenName
command opens the specified interface or external device and returns a device handle
for use in accessing that device.
Output (Controller Mode)
OutputX
SYNTAX
long pascal OutputX(DevHandleT devHandle, char *data, long
count, bool last, bool forceAddr, TermT *terminator, bool
async, int *compStat);
devHandle
refers to either an interface or an external device. If
devHandle
refers to an external device, the
OutputX
command acts on the hardware
interface to which the external device is attached.
data
is a string of bytes to send.
count
is the number of bytes to send.
last
is a flag that forces the device output terminator to be sent with the data.
forceAddr
is used to specify whether the addressing control bytes are to be
issued for each Output command.
terminator
is a pointer to a terminator structure that is used to set up the input
terminators. If
terminator
is set to
0
, the default terminator is used.
async
is a flag that allows asynchronous data transfer.
compStat
is a pointer to an integer containing completion status information.
RETURNS
-1 if error, otherwise, the number of characters transferred
MODE
CA
BUS STATES
With interface handle: REN (if SC and AutoRemote), *ATN, ATN
With external device handle: REN (if SC and AutoRemote),
ATN
•MTA, UNL, LAG, *ATN, ATN
SEE ALSO
Enter, Term, TimeOut, Buffered, EOL (Sub-Chapter 15A)
EXAMPLES
term.EOI = TRUE;
term.nChar = 1;
term.EightBits = TRUE;
term.termChar[0] = ‘\r’;
data = “U0X”;
count = strlen(data);
bytecnt=Output(timer,data,count,1,0,&term,0,&stat);