Download C Programmer`s Toolkit for PACSystems User`s Manual, GFK

Transcript
3
Macros for accessing the %I, %Q, %AI, %AQ Diagnostic memory
Definitions used with macros that access Analog Input DIAGNOSTIC memory(s)
HI_ALARM_MSK
0x02
LO_ALARM_MSK
0x01
AI_OVERRANGE_MSK 0x08
AI_UNDERRANGE_MSK 0x04
Definitions used with macros that access Analog Output DIAGNOSTIC memory(s)
AQ_OVERRANGE_MSK 0x40
AQ_UNDERRANGE_MSK 0x20
Diagnostic memory macros
Note:
Discrete diagnostic memory is organized so that there is one fault bit per
discrete memory location. Analog diagnostic memory is organized so that
there is one byte of memory for each analog input or output channel (for
example there is one diagnostic byte associated with the analog input %AQ1).
For analog diagnostic memory, use the mask definitions above to determine
the type of analog fault for a particular analog input or output channel.
BIT_TST_I_DIAG(x)
BIT_TST_Q_DIAG(x)
IB_DIAG(x)
QB_DIAG(x)
AIB_DIAG(x)
AQB_DIAG(x)
AI_HIALRM(x)
AI_LOALRM(x)
Note:
AIB_FAULT and AQB_FAULT are non-zero for conditions that set a fault
contact or generate a fault entry in the I/O fault table such as Overrange,
Underrange.
AIB_FAULT(x)
AQB_FAULT(x)
AI_OVERRANGE(x)
AI_UNDERRANGE(x)
AQ_OVERRANGE(x)
AQ_UNDERRANGE(x)
Macros for accessing RACK/SLOT/BLOCK fault information
See descriptions of the corresponding functions in the ‖Reference Memory Functions‖
section on page 3-86.
3-26
RACKX(r)
rackX(r)
page 3-98
SLOTX(r,s)
slotX(r,s)
page 3-99
BLOCKX(r,s,b,sba)
blockX(r,s,b,sba)
page 3-100
RSMB(x)
rsmb(x)
page 3-101
C Programmer’s Toolkit for PACSystems* User’s Manual – January 2012
GFK-2259E