Anexo
A.1 Código fuente del programa de usuario
OB40_OB_NUMBR : BYTE ;
OB40_RESERVED_1 : BYTE ;
OB40_IO_FLAG : BYTE ;
OB40_MDL_ADDR : WORD ;
OB40_POINT_ADDR : DWORD ;
OB40_DATE_TIME : DATE_AND_TIME ;
END_VAR
BEGIN
NETWORK
TITLE =
L
T
L
T
L
T
NO
P
NO
P
END_ORGANIZATION_BLOCK
ORGANIZATION_BLOCK OB 82
TITLE = "I/O Point Fault"
VERSION : 0.1
VAR_TEMP
OB82_EV_CLASS : BYTE ;
OB82_FLT_ID : BYTE ;
OB82_PRIORITY : BYTE ;
OB82_OB_NUMBR : BYTE ;
OB82_RESERVED_1 : BYTE ;
OB82_IO_FLAG : BYTE ;
OB82_MDL_ADDR : WORD ;
OB82_MDL_DEFECT : BOOL ;
OB82_INT_FAULT : BOOL ;
OB82_EXT_FAULT : BOOL ;
OB82_PNT_INFO : BOOL ;
OB82_EXT_VOLTAGE : BOOL ;
OB82_FLD_CONNCTR : BOOL ;
OB82_NO_CONFIG : BOOL ;
OB82_CONFIG_ERR : BOOL ;
OB82_MDL_TYPE : BYTE ;
OB82_SUB_MDL_ERR : BOOL ;
OB82_COMM_FAULT : BOOL ;
OB82_MDL_STOP : BOOL ;
OB82_WTCH_DOG_FLT : BOOL ;
86
#OB40_IO_FLAG;
MB
104;
#OB40_MDL_ADDR;
MW
106;
#OB40_POINT_ADDR;
MD
100;
0;
0;
//40 (Organization block 40, OB40)
//Reserved for system
//16#54 (input module), 16#55 (output module)
//Base address of module initiating interrupt
//Interrupt status of the module
//Date and time OB40 started
//OB40_IO_FLAG
//
//OB40_MDL_ADDR
//
//OB40_POINT_ADDR
//
//OB40_POINT_ADDR
//
//16#39, Event class 3, Entering event state,
Internal fault event
//16#XX, Fault identifcation code
//Priority of OB Execution
//82 (Organization block 82, OB82)
//Reserved for system
//Input (01010100), Output (01010101)
//Base address of module with fault
//Module defective
//Internal fault
//External fault
//Point information
//External voltage low
//Field wiring connector missing
//Module has no configuration data
//Module has configuration error
//Type of module
//Sub-Module is missing or has error
//Communication fault
//Module is stopped
//Watch dog timer stopped module
SM331; AI 8x12 Bit Getting Started 3ª parte: Termopares
Getting Started (primeros pasos), 11/2006, A5E00264195-02
: 16#54=módulo de entradas
: 16#55=módulo de salidas
: Dirección inicial del
módulo causante
: LB8 = Rebase por exceso
del límite superior
: LB9 = Rebase por defecto
del límite inferior