Chapter 6 RAPID!
Commands
WCDMA Options Version 6.20
183
PRINT
or OUTPUT
Notes:
The SCPI port may only be opened once. If you try to
open the previously opened SCPI port, a runtime error
will occur.
All other ports may be opened several times with differ-
ent parameters as long as the file handles are different.
Examples
This example opens the GPIB0 port.
gpib=FREEFILE
OPEN "GPIB0:addr=25,sec=0,time=10,
eoi=1,srq=1,end=13" AS #gpib
PRINT #gpib, "Output to GPIB"
INPUT #gpib, ingpib$
CLOSE #gpib
The program segment below opens a serial interface.
com2=FREEFILE
open-
com$="COM2:baud=9600,bits=8,stop=1,
parity=1,xonoff=0"
opencom$=opencom$ +
"time=10,end=10,flush=1,wait=1"
open opencom$ as #com2
PRINT #com2, "Output to serial port
2"
INPUT #com2, incom2$
CLOSE #com2
Syntax
PRINT #fileNo [USING formatstring ,] exp
[ [TAB[n];] [BYTE(m)] ] [{ ,|; exp} ]
or
OUTPUT #fileNo [USING formatstring ,] exp
[ [TAB[n];] [BYTE(m)] ] [{ ,|; exp} ]
Parameters
exp is a numeric or string expression.
fileNo is a numeric expression resulting in a positive inte-
ger (the so-called file handle).
formatstring specifies the output format to be used,
e.g. the number of decimal places.
n is an optional parameter giving the distance between
the previous and this tabulator position.
m is the decimal representation of the ASCII character to
be printed.