Technical data

Linkage with PLC
150 VIPA GmbH CP486 00/14
6.4.2.5 Write a Block to the PC
With this functions a whole data block can be transmitted to the PC. When calling, a pointer to the
data block is to be specified. The function writes the data to the bank and returns immediately to
where it was called. There is no delay for the PC to read the data. Subsequently the data block is
competely available in the CP and could be overwritten for example.
Register
high In low Out
AX $31 typ status
BX size bst
CX adr
DX len
SI offset
DS segment
typ data type of data for block element in PC (DB, MB, ...)
size data size of block data
0F(hex) data block of bytes
1F(hex) data block of words
2F(hex) data block of doublewords
bst module number where DB, DX, FB is relevant,
contains at typ = absolute the high-bits of adr
adr initial address in the area
len number of data in words !!
offset offset of block address (in AT)
segment segment of block address (in AT)
status < 0 error number because of error
128 job number to call status
Note:
For reasons of executing an automatical adjustment of data during the transmission, the type of the
data in a block (bytes, words, doublewords) has to be specified. One block can only contain data of
the same type. Concernig words and doublewords for every single data, an exchange of the bytes is
executed correspondingly.
A block write job can only be started, if bank 3 is empty, that means, no variable write jobs and no
block write job may be in processing status.
A block write job is blocking the bank. After starting a job, its status is to be checked as long as the
job is finished with or without error. If the status of the job is 'finished without error', data will be
copied to the PC with the address specified. If no status call is executed, the job remains blocked,
and possibly no further read jobs can be started.