4-2
Section
CPM1/CPM1A Communications Functions
228
3. If an out-of-range value is set, the following communications conditions will
result. In that case, reset the value so that it is within the permissible range.
Communications mode:
Host Link
Communications format:
Standard settings
(1 start bit, 7-bit data; 2 stop bits, even parity,
9,600 bps)
Transmission delay:
No
Node number:
00
Example Program
This example shows a BASIC program that reads the status of the CPM1’s in-
puts in IR 000. For more details, refer to
4-5
Host Link Commands.
An FCS (frame check sequence) check isn’t performed on the received re-
sponse data in this program. Be sure that the host computer’s RS-232C port is
configured correctly before executing the program.
1010 ’CPM1 SAMPLE PROGRAM
1020 ’SET THE COMMAND DATA
1030 S$=”@00RR00000001”
1040 FCS=0
1050 FOR I=1 TO LEN(S$)
1060 FCS=FCS XOR ASC(MID$(S$,I,1))
1070 NEXT I
1080 FCS$=(FCS):IF LEN(FCS$)=1 THEN FCS$=”0”+FCS$
1090 CLOSE 1
1100 CLS
1110 PRINT ”SENDING COMMAND”
1120 OPEN ”COM:E73” AS #1
1130 PRINT #1,S$ + FCS + CHR$(13);
1140 CLS
1150 PRINT ”RECEIVING RESPONSE DATA”
1160 LINE INPUT #1,A$
1170 PRINT A$
1180 END
4-2-2 One-to-one NT Link Communications
Using the 1:1 NT Link, the CPM1/CPM1A PC can connected to the Program-
mable Terminal (NT Link Interface) through an RS-232C Adapter.
CPM1 PCs
OMRON Programmable Terminal
RS-232C Cable
CPM1 CPU
CPM1 CPU Unit
RS-232C Adapter