Specifications

IP 240 Direct Data Interchange with the IP 240
11.3 Data Transfer from the S5 CPU to the IP 240
The S5 CPU can forward new data to the IP 240. To do so, you must first transfer the new data,
then you must enter the appropriate job numbers in the IP's job request register. The IP 240 sets
the DFRT bit in the status register when it has fetched this data from the transfer buffer.
To avoid errors during a data interchange between IP 240 and S5 CPU, interrupt servicing must be
disabled during data interchange.
”Write data to the IP 240”
You must make preparations for ”writing data” to the IP 240 by forwarding a byte, in which you
have entered the appropriate job number and set the high-order bit, to the job request register.
You can then write the data to the transfer buffer, then tell the IP to fetch this new data by
transferring the job number.
In position decoding mode and in counting mode, you terminate this communication cycle by
entering 1D
H
for channel 1 and 2D
H
for channel 2 in the job request register.
Terminate the communication cycle in positioning mode with 40
H
for channel 1 and for channel 2.
Warning
When using direct data interchange in position decoding or counting mode, you
must make sure that only valid data are forwarded to the IP 240, as the firmware
does not verify this data. During data transfer, data verification is normally taken
care of by standard FBs 170 and 172.
Simultaneous transfer of modified track data in position decoding mode
If you want the track data for several modified tracks to become effective simultaneously,
proceed as follows:
Transfer the first data batch with the appropriate job number to the IP 240.
Before data interchange is terminated with 1D
H
/2D
H
,
enter 40
H
in the job request register. As a result, the IP 240 sets the AFRT bit to ”1” for
the new cycle.
transfer the next batch of data with the appropriate job number to the IP 240.
Repeat for all data to be transferred ( Fig. 11.2).
As soon as you have finished data transfer, terminate data interchange with 1D
H
for channel
1
or 2D
H
for channel 2.
the modified track data become effective simultaneously .
Note
Once data has been forwarded to the transfer buffer, it is retained until it is
overwritten. In order to prevent unintentional reevaluation of old data, you must
always overwrite the entire buffer with new data.
EWA 4NEB 811 6120-02a
11-7