COMM   [VDS6]

Top  Previous  Next

Syntax:

 

COMM OPEN,<port>,<speed>,<databits>,<parity>,<stopbits>

COMM CLOSE

COMM SEND,<text>

COMM SENDLINE,<text>

 

Requires:

 


EXTERNAL VDSCOM60.DLL

#DEFINE COMMAND,COMM

Description:

 

The COMM command allows a DialogScript program to communicate with an external device using a serial port. The allowed options are:
 

COMM OPEN,...

Opens the serial port for communication. Note that only a single serial port may be opened at a time. The parameters are:

<port>

Specifies the serial port to open: COM1 ... COM8

<speed>

Specifies the communication speed in bits per second. Valid values are: 110, 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, 115200

<databits>

Specifies the number of data bits. Valid values are: 4, 5, 6, 7, 8

<parity>

Specifies the parity. Valid values are: N (none), O (odd), E (even), M (mark), S (space)

<stopbits>

Specifies the number of stop bits. Valid values are: 1, 2

COMM CLOSE

Closes the serial port

COMM SEND,...

Sends a string of text to the serial port

COMM SENDLINE,...

Sends a string of text to the serial port, followed by a line feed.

 

When a serial port is open and data is received, a COMMEVENT event is generated. The script can respond to this event by using the @COMM function to obtain the data that was sent.

 

OK:

 

Set to false if an error occurs.

 

See also:

 


 

See an advanced example...