
Chapter 2 Specification of Communication port for CPU module
2 – 41
(B) Sample program
The following shows a simple program which communicates between one master station and three slave
stations using RS-485.
[1] Mounting the module
(a) Master station side
Power supply
EHV-CPU
16-point output
0 1
Mounts the 16-point output module in the slot 1 of the
basic base.
(b) Slave station side
Power supply
EHV-CPU
16-point input
16-point output
0 1
Mounts the 16-
oint input module in the slot 0 of the basic
base, and the 16-point output module in the slog 1 of the
basic base.
[2] Assigning internal output
A sample program is created using the following assignments. In actual cases, change the I/O number etc.
according to the application.
(a) Assigning internal output in the master station side
I/O No. Usage
WM 100 to 10E TRNS 0 command
Parameter area (s to s+14)
R 000 to 00B TRNS 0 command
Communication control bit area (t to t+11)
100 Transmission data setting completion flag
WR 0000 to 001F Transmission data area (32-word)
0100 to 011F Receiving data area (32-word)
4000 Slave station number for communication
4001 Number of slave stations
WL 001 to 003 Storage area for receiving data
Comentarios a estos manuales