Error getting tags :
error 404Error getting tags :
error 404 open driver | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
open driver
Expander triangle
open driver driverName [for [text | binary] {update | read | write}]
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Establishes a connection to a device so you can send data to it or get data from it.

open driver "/dev/cu.modem" for binary write
open driver (line 3 of it) for text read
open driver "COM2:" -- equivalent to open file "COM2:"

Additional Comments
Expander triangle

Use the open driver command to communicate with USB devices, devices attached to a serial port other than the modem and printer port, and other peripheral devices.


The driverName specifies the name of a device driver that's installed on the system.


If you don't specify binary or text mode, the driver is opened in text mode. (For most devices, you should use binary mode.)

Use the for read form to open the driver for reading. If the driver is opened for reading, you can use the read from driver command to get data from the device, but you can't send data to it.

Use the for write form to open the driver for writing. If the driver is opened for writing, you can use the write to driver command to send data to the device but you can't read from it.

Use the for update form to open the driver for both reading and writing. If the driver is opened for update, you can use both the read from driver and write to driver commands to send data to the device or get data from it.

If the driver does not exist, the result function is set to "Can't open that file." On OS X and Unix systems, you can obtain a list of available devices by reading the file "/dev/tty".

Note: On Unix systems, devices can be addressed as part of the file system. This means that on such systems, the following two statements are equivalent:

open driver driverName

open file "/dev/driverName"

Tip: Because OS X is based on Unix, you can use the open filecommand, as mentioned above, as a replacement for open driver on OS X systems.

On Windows systems, the open driver command is equivalent to the open file command when the driverName is COM1:, COM2:, etc.

If the device is a serial port, you can set the serialControlString property to specify the speed, parity, and other settings. Set the serialControlString before using the open driver command.

Changes to Revolution:

Support for using serial drivers with OS X systems was added in version 2.0.

User Comments
Expander triangle