ControllerDateTime Property |
Gets or sets current date and time in the controller.
Namespace:
ABB.Robotics.Controllers
Assembly:
ABB.Robotics.Controllers (in ABB.Robotics.Controllers.dll) Version: 6.5.129.0
Syntax public DateTime DateTime { get; set; }
Return Value
Type:
DateTimeA
DateTime object.
Exceptions Examples This example retrieves the controller name and the current date and time and displays the information
in a
GTPUMessageBox .
private void DisplayNameNnTime(Controller myControllerRef)
{
string name = myControllerRef.Name;
DateTime now = myControllerRef.DateTime;
string text = string.Format("Name of controller is: {0}\r\nCurrent date is: {1}\r\n and the time is: {2}:{3}",name,
now.Date.ToString(), now.Hour, now.Minute);
GTPUMessageBox.Show(this,
new MessageBoxEventHandler(MyMessageBoxEventHandler),
text,
"System Information",
System.Windows.Forms.MessageBoxIcon.Asterisk,
System.Windows.Forms.MessageBoxButtons.OK);
}
See Also