Updates the persistent data of the module with their real values. As this cannot be done while
the task is executing any call in
ExecutionState Started will be disregarded and false will be returned.
Namespace:
ABB.Robotics.Controllers.RapidDomain
Assembly:
ABB.Robotics.Controllers (in ABB.Robotics.Controllers.dll) Version: 6.5.129.0
Syntax Return Value
Type:
BooleanReturns true if the operation generated a change of the module, else false.
Exceptions Examples
In this example a check is done each time the task is stopped to find out whether the values of the persistent
variables of the module are in sync with the real values in the controller. If not a SyncPers call is made.
using ABB.Robotics;
using ABB.Robotics.Controllers;
using ABB.Robotics.Controllers.RapidDomain;
...
Controller c = new Controller();
Rapid r = c.Rapid;
Task t = r.GetTask("T_ROB1");
t.ExecutionStateChanged += new ABB.Robotics.Controllers.RapidDomain.ExecutionStateChangedEventHandler(t_ExecutionStateChanged);
...
private void t_ExecutionStateChanged(object sender, ABB.Robotics.Controllers.RapidDomain.ExecutionStateChangedEventArgs e)
{
try
{
if (e.ExecutionState == ExecutionState.Stopped)
{
modules = t.GetModules();
for(int i = 0; i < modules; i++
{
bool sync = modules[i].PersInSync;
if(sync == false)
{
bool updated = modules[i].SyncPers();
}
}
}
}
catch (GeneralException ge)
{
}
catch (System.Exception se)
{
}
}
See Also