Getting Safety Interlock Status
- Updated2025-08-04
- 1 minute(s) read
Call IsInterlockClosedAsync to read the signal state for safety interlocks monitored by the RCU. Call IsInterlockDipSwitchClosedAsync to read the DIP switch state for the safety interlocks monitored by the RCU.
Get the Interlock Connection Status
IAteCoreSession ateCoreSession;
try
{
// To create an object of IAteCoreSession.
ateCoreSession = await AteCoreSession.CreateAteCoreSessionAsync(hostname, password);
// Loop through the enum values of Interlock
foreach (Interlock interlock in Enum.GetValues(typeof(Interlock)))
{
bool isClosed = await ateCoreSession.IsInterlockClosedAsync(interlock);
Console.WriteLine("The {0} is closed: {1}", interlock, isClosed);
}
}
catch(Exception ex)
{
Console.WriteLine(ex.Message); //Print the exception message.
}
finally
{
if (ateCoreSession != null)
{
// To close the session.
ateCoreSession.Dispose();
}
}
Get the Interlock DIP Switch States
IAteCoreSession ateCoreSession;
try
{
// To create an object of IAteCoreSession.
ateCoreSession = await AteCoreSession.CreateAteCoreSessionAsync(hostname, password);
// Loop through the enum values of InterlockDipSwitch
foreach (InterlockDipSwitch dipSwitch in Enum.GetValues(typeof(InterlockDipSwitch)))
{
bool isClosed = await ateCoreSession.IsInterlockDipSwitchClosedAsync(dipSwitch);
Console.WriteLine("The {0} is closed: {1}", dipSwitch, isClosed);
}
}
catch(Exception ex)
{
Console.WriteLine(ex.Message); //Print the exception message.
}
finally
{
if (ateCoreSession != null)
{
// To close the session.
ateCoreSession.Dispose();
}
}