beautypg.com

Argox PA-20 Basic Programming Manual User Manual

Page 91

background image

PT-Basic Programming Manual Ver. 1.00

90/143

WRITE_COM

Purpose: To send a string to the host through a specified COM port.

Syntax: WRITE_COM(N%, A$)

Example: CLS

PRINT "===COM TEST==="

PRINT "ENT TO WRITE"

SET_COM(1,1,1,2,1)

OPEN_COM(1)

WHILE INKEY$<>CHR$(13)

WEND

STR1$="Hello!!"

WHILE GET_CTS(1)=0

WEND

WRITE_COM(1,STR1$)

CLOSE_COM(1)

END

Description:

N% is an integer variable indicating which COM port the

data is to be sent to (now we only can choose 1).

A$ is a string variable indicating the string to be sent.

GET_CTS

Purpose: To get CTS level.

Syntax: A% = GET_CTS(N%)

Example: PRINT “CTS Status:”,GET_CTS(1)

Description:

A% is an integer variable to be assigned to the result.

A%

Meaning

0

Negated (Space)

1

Asserted (Mark)

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

CTS level (now we only can choose 1).