7-30
Section
Communications Instructions
510
Application Example
This example shows a program that transfers the contents of DM 0100 through
DM 0104 to the PC Setup area for the built-in RS-232C port (DM 6645 through
DM 6649).
00000
LD
00000
00001
@STUP(––)
000
DM
0100
---
@STUP(––)
000
DM 0100
000
00000
Address
Instruction
Operands
The settings are transferred as shown below. The Changing RS-232C Setup
Flag (SR 25312) will be turned OFF when the transfer has been completed.
The following table shows the function of the transferred setup data.
Source
word
Destination
word
Content
Function
DM 0100
DM 6645
1001
Enables the communications settings in DM
0101 and sets the communications mode to
no-protocol.
DM 0101
DM 6646
0803
Sets the following communications settings:
9,600 bps, 1 start bit, 8-bit data, 1 stop bit,
no parity
DM 0102
DM 6647
0000
No transmission delay (0 ms)
DM 0103
DM 6648
2000
Enables the end code CR, LF.
DM 0104
DM 6649
0000
(No function when DM 6648 is set to 2000.)
Flags
ER:
Indirectly addressed DM word is non-existent. (Content of *DM word is
not BCD, or the DM area boundary has been exceeded.)
The port specifier (N) isn’t 000.
In the CPM2A/CPM2C, the Communications Switch on the front of the
CPU Unit is ON.
Another STUP(––) instruction is already being executed or event proc-
essing is being performed.
The specified source words exceed the data area.
The instruction was executed from an interrupt program.
The PC Setup is write-protected.