Saia-Burgess Controls AG
Manual I/O-modules for PCD1 │ PCD2 series │ Document 27-600 – Release ENG09 │ 2019-05-01
8-18
PCD2.W380 & PCD3.W380
Module in PG5 environment
8
8.3.4.2
With direct access
The module allows direct access with RDP commands.
Here an IL program example to read the input values, the module errors and the
out of range status:
Declaration of a mask:
; Mask declaration (top of the file)
Mask1Byte
EQU
R
; Load the vlaue 255 in the mask to keep only
; the least significant byte (in XOB16 or in COB)
LD MASK1Byte
255
Commands for reading module data:
; 4 bytes (dword) : RDP command for ANALOGUE_INPUT_x
RDP
IO.Slos0.IOAccess.ANALOGUE_INPUT_0
R
0
RDP
IO.Slos0.IOAccess.ANALOGUE_INPUT_1
R
1
RDP
IO.Slos0.IOAccess.ANALOGUE_INPUT_2
R
2
RDP
IO.Slos0.IOAccess.ANALOGUE_INPUT_3
R
3
RDP
IO.Slos0.IOAccess.ANALOGUE_INPUT_4
R
4
RDP
IO.Slos0.IOAccess.ANALOGUE_INPUT_5
R
5
RDP
IO.Slos0.IOAccess.ANALOGUE_INPUT_6
R
6
RDP
IO.Slos0.IOAccess.ANALOGUE_INPUT_7
R
7
; 2 bytes (dword) : RDPW command for MODULE_ERRORS
RDPW
IO.Slos0.IOAccess.MODULE_ERRORS
R
8
; 1 byte : RDPW command with mask for OUT_OF_RANGE
RDPB
IO.Slos0.IOAccess.OUT_OF_RANGE
R
9
AND
R
9
MASK1Byte
R
9
The type of read data for each “register” is the same than using media mapping.
The mask after the command RDPB is only for the comfort. The RDPB command
has an integrated 2-complement conversion. If the channel 7 is out of range, the
bits 8 to 31 of the register R 9 are setting to ‘1’. To avoid this phenomenon, a mask
can be placed to keep only the desired data on R 9 and the bits 8 to 31 stay ‘0’.
The register MODULE_ERRORS must be read cyclically even if they are not used
in the user program.