Technical data
Linkage with PLC
CP 486 ⋅ 00/14 VIPA GmbH 147
6.4.2.2 Read a Single Element from the PC
With this function a single data type (bit, byte, word,...) can be read from the PC. The function is
just starting the job and does not wait for the PC to execute it, but returns immediately, to where it
was called. Therefore the data can be read not before the function 'status call' was executed (see
there).
Register
high In low Out
AX $21 typ status
BX size bst
CX adr
DX - bit
typ element area (type) of data for single element in PC (DB, MB, ...)
size code of data size (bit, byte, ...)
bst module number, is to be set only for data area (type) DB or DX
if data area (type) is absolute, the higher order bits of adr are here.
adr initial address in area
bit Bit-number if element size is bit or semaphore.
status < 0 error code because of an error
error numbers of PC are summed up with FFF0h
1..127 job number to call status
Note:
This function does not return data! If the job status is 'finished without error', the data can be passed
by calling the function status call.
To ensure, that a finished reading job will not be overwritten with a new job before data are passed,
the job is blocked. 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 AT with
the address specified. If no status call is executed, the job remains blocked, and possibly no further
read jobs can be started, even if all jobs in the bank are finished.