Library manual M238 system functions | 2 MB - BERGER - POSITEC
Library manual M238 system functions | 2 MB - BERGER - POSITEC
Library manual M238 system functions | 2 MB - BERGER - POSITEC
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Example<br />
<strong>M238</strong> System Functions<br />
To obtain a diagnostic on HSC and AS-Interface Expansion modules, you can use:<br />
HSCGetDiag (see Modicon <strong>M238</strong> Logic Controller, High Speed<br />
Counting, <strong>M238</strong> HSC <strong>Library</strong> Guide) Function Block for the<br />
TM200 HSC206D module<br />
ASI_MasterStatusCheck (see Modicon <strong>M238</strong> Logic Controller,<br />
Programming Guide) for the TWDNOI10M3 module<br />
The following example describes a method using GetRightBusStatus for I/O<br />
expansion bus and analog modules diagnostic:<br />
VAR<br />
(*Modules 1 to 7 conf diag = MyRightBusStatus bits 1 to 7*)<br />
MyRightBusStatus: WORD;<br />
(*Modules 1 to 7 diag codes*)<br />
ModuleError:Array [1..7] of WORD;<br />
END_VAR<br />
(*Conf diagnostic on expansion bus*)<br />
MyRightBusStatus:=GetRightBusStatus<br />
(RIGHTBUS_GET_GEN_STATUS);<br />
IF MyRightBusStatus0 THEN<br />
(*Conf mismatch detected => set an alarm, check bit values...*)<br />
END_IF;<br />
(*Get modules diagnostic; detected error if diag 0*)<br />
(*Limit the list to analog modules configured only*)<br />
ModuleError[1]:=GetRightBusStatus(RIGHTBUS_GET_STATUS1);<br />
ModuleError[2]:=GetRightBusStatus(RIGHTBUS_GET_STATUS2);<br />
ModuleError[3]:=GetRightBusStatus(RIGHTBUS_GET_STATUS3);<br />
ModuleError[4]:=GetRightBusStatus(RIGHTBUS_GET_STATUS4);<br />
ModuleError[5]:=GetRightBusStatus(RIGHTBUS_GET_STATUS5);<br />
ModuleError[6]:=GetRightBusStatus(RIGHTBUS_GET_STATUS6);<br />
ModuleError[7]:=GetRightBusStatus(RIGHTBUS_GET_STATUS7);<br />
EIO0000000364 04/2012 39