Toshiba S20LP Network Card User Manual


 
59
6 F 3 B 0 3 5 6
(8) PC link protocol transmission program
This section presents a sample program that uses PC link protocol transmission.
This program creates increment data within the local station and writes it to the remote
station's registers. Next it reads out the same area and compares it with the data within the
local station to check that the function succeeded.
Remarks
Make a point of understanding the content before writing programs that use the S20LP-
station. The sample programs present basic examples of S20LP-station usage, and should
be reviewed carefully before use in an actual system.
Sample transmission parameter construct
A 2102H
Module designation. S20LP, channel 1, target station No.2
A+1 CMD = 0000H
Command number: 0000H
A+2 Transfer Size = 64
1) Transfer register data length: 64 words
A+3 Register type (self-station) = 0004H
2) Local station register type code: D register
A+4 Leading address (self-station)
=1000
3) Local station leading address: 1000
A+5 Register type (target-station)
=0004H
4) Remote station register type code: D register
A+6 Leading address (target-station)
=1000
5) Remote station leading address: 2000
A+7 Response time limit = 100
6) Response time limit: 10 seconds
Sample register construction
RW090 : Execution count designation (1 to 32767)
RW091 : Operation when a comparison error occurs (continue : 0, stop : 1)
RW092 : Transfer register data length (1 to 128 words)
RW093 : Write time transfer source register type (self-station)
RW094 : Write time transfer source leading address (self-station)
RW095 : Write time transfer destination register type / read time readout source register
type (target-station)
RW096 : Write time transfer destination leading address / read time readout source leading
address (target-station)
RW097 : Read time storage register type
RW098 : Read time storage register leading address
This ladder program is executed by turn on the R0520 A contact.