The power entry panel is the main AC power input to the ATECCGEN2 rack. It consists of a three-phase AC power supply or a single-phase AC power supply depending on the rack variant. You can take sensor readings to monitor the status of AC power supply for a particular power phase.

Reading the Sensors on the Single-Phase Power Entry Panel

IAteCoreSession ateCoreSession; 
try 
{ 
	// To create an object of IAteCoreSession. 
	ateCoreSession = await AteCoreSession.CreateAteCoreSessionAsync(hostname, password); 
	// Get the object of Power Entry Panel component 
	IPowerPanelEntry powerPanelEntry = ateCoreSession.PowerEntryPanel; 
 
	Console.WriteLine("Power panel entry name: {0}", powerPanelEntry.Name); 
	Console.WriteLine("Power panel entry location: {0}", powerPanelEntry.Location); 
	Console.WriteLine("Power panel entry vendor name: {0}", powerPanelEntry.VendorName); 
	Console.WriteLine("Power panel entry model name: {0}", powerPanelEntry.ModelName); 
 
	foreach (var temperatureSensor in powerPanelEntry.TemperatureSensors) 
	{ 
		Console.WriteLine("Temperature sensor name: {0}", await temperatureSensor.Name); 
		Console.WriteLine("Temperature sensor reading: {0} degree C", await temperatureSensor.ReadSensorAsync()); 
	} 
 
	if (powerPanelEntry.PowerSupplyPhaseType == PowerSupplyPhaseType.SinglePhase) 
	{ 
		// Only one powerPhase object (phase A) in the PowerPhases array 
		// in powerPanelEntry for single-phase 
		IPowerPhase powerPhase = powerPanelEntry.PowerPhases[0]; 
 
		if (PowerState.On == await powerPhase.GetPowerPhaseStateAsync()) 
		{ 
			int numberOfSensors = powerPhase.VoltageSensors.Length; 
			Console.WriteLine("Power phase type: {0}", powerPhase.PhaseType.ToString()); 
 
			// The number of sensors are same across all sensor type in power phase object 
			for (int i=0; i<numberOfSensors; i++) 
			{ 
				Console.WriteLine("Voltage sensor reading: {0} V", await powerPhase.VoltageSensors[i].ReadSensorAsync()); 
				Console.WriteLine("Current sensor reading: {0} A", await powerPhase.CurrentSensors[i].ReadSensorAsync()); 
				Console.WriteLine("Temperature sensor reading: {0} degree C", await powerPhase.LineFrequencySensors[i].ReadSensorAsync()); 
			} 
		} 
	} 
 
} 
catch(Exception ex) 
{ 
	Console.WriteLine(ex.Message); //Print the exception message. 
} 
finally 
{ 
	if (ateCoreSession != null) 
	{ 
		// To close the session. 
		ateCoreSession.Dispose(); 
	} 
} 

Reading the Sensors on the Three-Phase Power Entry Panel

IAteCoreSession ateCoreSession; 
try 
{ 
	// To create an object of IAteCoreSession. 
	ateCoreSession = await AteCoreSession.CreateAteCoreSessionAsync(hostname, password); 
	// Get the object of Power Entry Panel component 
	IPowerPanelEntry powerPanelEntry = ateCoreSession.PowerEntryPanel; 
 
	Console.WriteLine("Power panel entry name: {0}", powerPanelEntry.Name); 
	Console.WriteLine("Power panel entry location: {0}", powerPanelEntry.Location); 
	Console.WriteLine("Power panel entry vendor name: {0}", powerPanelEntry.VendorName); 
	Console.WriteLine("Power panel entry model name: {0}", powerPanelEntry.ModelName); 
 
	foreach (var temperatureSensor in powerPanelEntry.TemperatureSensors) 
	{ 
		Console.WriteLine("Temperature sensor name: {0}", await temperatureSensor.Name); 
		Console.WriteLine("Temperature sensor reading: {0} degree C", await temperatureSensor.ReadSensorAsync()); 
	} 
 
	if (powerPanelEntry.PowerSupplyPhaseType == PowerSupplyPhaseType.SinglePhase) 
	{ 
		// Only one powerPhase object (phase A) in the PowerPhases array 
		// in powerPanelEntry for single-phase 
		IPowerPhase powerPhase = powerPanelEntry.PowerPhases[0]; 
 
		if (PowerState.On == await powerPhase.GetPowerPhaseStateAsync()) 
		{ 
			int numberOfSensors = powerPhase.VoltageSensors.Length; 
			Console.WriteLine("Power phase type: {0}", powerPhase.PhaseType.ToString()); 
 
			// The number of sensors are same across all sensor type in power phase object 
			for (int i=0; i<numberOfSensors; i++) 
			{ 
				Console.WriteLine("Voltage sensor reading: {0} V", await powerPhase.VoltageSensors[i].ReadSensorAsync()); 
				Console.WriteLine("Current sensor reading: {0} A", await powerPhase.CurrentSensors[i].ReadSensorAsync()); 
				Console.WriteLine("Temperature sensor reading: {0} degree C", await powerPhase.LineFrequencySensors[i].ReadSensorAsync()); 
			} 
		} 
	} 
 
} 
catch(Exception ex) 
{ 
	Console.WriteLine(ex.Message); //Print the exception message. 
} 
finally 
{ 
	if (ateCoreSession != null) 
	{ 
		// To close the session. 
		ateCoreSession.Dispose(); 
	} 
}