EthercatSlaveStateFlags
- Namespace
- ZCore
This enumeration is used to represent a bitdecoded state that can be set for an ethercat-slave device. Since this is a flags enumeration, several bits may be present at a given time. Use boolean algebra to check for bits, rather than integer comparison.
IF (ethercatSlave.EthercatStateFlags() AND EthercatSlaveStateFlags.NotPresent) > 0
THEN
Abort('The ethercat-slave device is not present in the fieldbus');
ELSIF (ethercatSlave.EthercatStateFlags() AND EthercatSlaveStateFlags.Op) > 0
THEN
_logger.Trace('Ethercat-slave device is present and operational');
END_IF
ยดยดยด
This enumeration is used in [EthercatStateFlags](xref:ZCore.IEthercatSlave#EthercatStateFlags).
<h4 class="section">Fields</h4><dl class="parameters">
<a name="Init"></a><dt><code>Init</code> = <code>16#0001</code></dt>
<a name="PreOp"></a><dt><code>PreOp</code> = <code>16#0002</code></dt>
<a name="Bootstrap"></a><dt><code>Bootstrap</code> = <code>16#0003</code></dt>
<a name="SafeOp"></a><dt><code>SafeOp</code> = <code>16#0004</code></dt>
<a name="Op"></a><dt><code>Op</code> = <code>16#0008</code></dt>
<a name="Error"></a><dt><code>Error</code> = <code>16#0010</code></dt>
<a name="InvalidVendorProduceCodeRevisionNoOrSerialNo"></a><dt><code>InvalidVendorProduceCodeRevisionNoOrSerialNo</code> = <code>16#0020</code></dt>
<a name="InitializationCommandsError"></a><dt><code>InitializationCommandsError</code> = <code>16#0040</code></dt>
<a name="Disabled"></a><dt><code>Disabled</code> = <code>16#0080</code></dt>
<a name="LinkOk"></a><dt><code>LinkOk</code> = <code>16#0000</code></dt>
<a name="NotPresent"></a><dt><code>NotPresent</code> = <code>16#0100</code></dt>
<a name="NoCommunication"></a><dt><code>NoCommunication</code> = <code>16#0200</code></dt>
<a name="MissingLink"></a><dt><code>MissingLink</code> = <code>16#0400</code></dt>
<a name="AdditionalLink"></a><dt><code>AdditionalLink</code> = <code>16#0800</code></dt>
<a name="Port0"></a><dt><code>Port0</code> = <code>16#1000</code></dt>
<a name="Port1"></a><dt><code>Port1</code> = <code>16#2000</code></dt>
<a name="Port2"></a><dt><code>Port2</code> = <code>16#4000</code></dt>
<a name="Port3"></a><dt><code>Port3</code> = <code>16#8000</code></dt>
</dl>