807
Windows OPT= Settings
The settings for the OPT= option use the following attributes and format. Note that
flow_rate is optional.
OPT="baud_rate,parity,data_bits,stop_bits[,flow_rate]"
Where
baud rate
Valid range is 300 to 115200
data_bits
Use one of three valid values: 1, 7, or 8
flow_rate
(Optional.) Valid values include: x for XON/XOFF software flow or
p for RTS/CTS physical/hardware flow. (Omit the value for "none")
parity char. Use one of three alpha characters: N for None, O for Odd parity, E for
Even parity
stop_bits
Use one of the valid values: -1 (minus one), 0 , 1, 1.5, 2.
Example:
The setting$ assigned in the Windows example below are for the serial
communications attributes: baud rate, parity (n=none), data bits (8), stop bit (1) and
flow rate (xon/xoff switch).
12540
let setting$="9600,n,8,1,x"
12550
let printer=hfn
12560
open (printer,isz=1,opt=setting$,err=13000)"COM2:"
12570
print (printer)"Title"
Format 3: Open Device in UNIX
OPEN (chan[,fileopt])dev_path$
When you OPEN the serial device using this format in UNIX, the port is opened with
the current characteristics. To change the settings, you can either set line
characteristics at the OS level before starting ProvideX or use an INVOKE directive
after you open the device:
invoke "stty 38400 -IXANY IXON IXOFF ... </dev/tty2A"
Note: WindX Tip. While it is possible to open a serial device on the client PC by using
the [WDX] tag, we recommend against doing this. Instead, we advise you to use a
CALL from the host to a [WDX] subprogram on the remote client PC. Design your
subprogram to open and control the device and its settings. You can return your results
to the host via your CALL's parameters. For more information see [WDX] Direct
See Also