beautypg.com

Communication port commands, 17 communication port commands – Argox PA-20 Basic Programming Manual User Manual

Page 89

background image

PT-Basic Programming Manual Ver. 1.00

88/143

3.17 Communication port commands

CLOSE_COM

Purpose: To terminate communication and disable a specified COM

port.

Syntax: CLOSE_COM (N%)

Example: CLOSE_COM(1)

Description:

N% is an integer indicating which COM port is to be disabled

(now we only can choose 1).

OPEN_COM

Purpose: To enable a specified COM port and initialize

communication.

Syntax: OPEN_COM (N%)

Example: OPEN_COM(1)

Description:

N% is an integer variable indicating which COM port is to be

enabled (now we only can choose 1).

SET_COM

Purpose: To set parameters of a specified COM port.

Syntax: SET_COM(N%, Baudrate%, Parity%, Data%,

Handshake%)

Example: SET_COM(1, 1, 1, 2, 1)

Description: Several key arguments as below:

N%:

1: RS-232 (now we only can choose 1)

Baudrate%:

Baud rate

1: 115200 2-3: 57600

4: 38400 5: 19200

6: 9600 7-8: 4800

Parity%:

Parity

1:None 2:Odd

3:Even

Data%:

Data bits

1: 7 bits 2: 8 bits

Handshake%: Flow control

1: None

2: Auto Flow control