Saia-Burgess Controls AG
Manual for PCD2.W745 and PCD3.W745
│
Document 26-796 E
NG06 │ 2018-10-12
Programming
Programming with series xx7
3
3-11
Example
The access time to the module is quite long (ca. 1 ms for 4 channels). In order to
read only an updated actual value see the following Step
®
7-Example:
// Read status byte before the temperature value will be read
L PEB 300
// Status byte CH0
T MB 300
// save in auxiliary variable
// Temperature value
U M 300.6
// New value available
SPBN NoRd
L PEW 304
// Actual value CH0
T MW 304
// save in MW
NoRd: NOP 0
Peripheral definition
The configuration of the peripheral modules is done in the peripheral definitions data
block (DB1, DB511 or DB1023).The structure is as follows:
Modulx : STRUCT //PCD2.W745
kenn: WORD:= W#16#0122;
PANr: INT:= 0;
InCnt:
INT:= 12;
OutCnt:
INT:= 0;
InBase:
INT:= 300;
OutBase:
INT:= 300;
Conf_0:
BYTE:= B#16#0;
Conf_1:
BYTE:= B#16#0;
Conf_2:
BYTE:= B#16#0;
Conf_3:
BYTE:= B#16#0;
END_STRUCT;