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 A+1 A+2 A+3 A+4

A+5

A+6

A+7

2102H

CMD = 0000H

Transfer Size = 64

Register type (self-station) = 0004H

Leading address (self-station)

=1000

Register type (target-station)

=0004H

Leading address (target-station)

=1000

Response time limit = 100

Module designation. S20LP, channel 1, target station No.2 Command number: 0000H

1)Transfer register data length: 64 words

2)Local station register type code: D register

3)Local station leading address: 1000

4)Remote station register type code: D register

5)Remote station leading address: 2000

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.

59

Page 60
Image 60
Toshiba S20LP instruction manual PC link protocol transmission program, Remarks