MPC2000 Reference Manual [JAPANESE] [ENGLISH]
yCommandz   yCommunicationz
yUSEz
PRINT#

PRINT# 1 a$ "123\n"
PRINT# 5 COMPOWAY snd$
PRINT# 3 STR_LEN|32 a$
yFORMATz yFUNCTIONz
PRINT# [COM#] [Options] arg1 arg2 ...

transmit the string to the serial port
yEXPLANATIONz
Causing transmit characters to the serial port.
The first argument number will desegnate the serial port.
The folowing arguments as string variables, string constatns, variables will be transmited.
Print# doesn't insert any character between arguments when it is transmitting.
So a array of arguments is same as a merged string .
For an instance , 1) and 2) will give the same result.

1) PRINT# CHR$(1) "DATA" CHR$(3)


2) b$=CHR$(1)+"DATA"+CHR$(3)
PRINT# b$


yAbout Optionsz
COMPOWAY:
When constans COMPOWAY is given as a Option,
PRINT# transmits the string according to OMRON COMPOWAY format.


STR_LEN:
When the constant STR_LEN with a number is given,
PRINT# transmits the number of chacters ignoring null-code.
ADD_STR can compose the string including null-code.





--- Examples---
PRINT# 1 "ABC\r" /* Xmit "ABC[CR]" through CH1
PRINT# 1 "ABC\n" /* Xmit "ABC[LF]" through CH1
PRINT# 1 "ABC\r\n" /* Xmit "ABC[CR][LF]" through CH1
PRINT# 1 "ABC\tDEF" /* Xmit "ABC[TAB]DEF" through CH1

\r=[CR]=&H0D
\n=[LF]=&H0A
\t=[TAB]=&H09

--- An example of COMPOWAY---

COMPOWAY node_no sub_adr sid cmnd_txt$ snd$
PRINT# 5 COMPOWAY snd$

[LASTMODIFY]2012-03-21 11:05:45 [CREATEDATE]2007-09-20 22:28:00
MPC2000 Reference Manual -R5.11-   (C)2007 ACCEL Corp. all right reserved.