ModuleGetRapidData Method |
Gets a
RapidData object that references a RAPID data instance in the robot controller.
Namespace:
ABB.Robotics.Controllers.RapidDomain
Assembly:
ABB.Robotics.Controllers (in ABB.Robotics.Controllers.dll) Version: 6.5.129.0
Syntax public RapidData GetRapidData(
params string[] rapidData
)
Parameters
- rapidData
- Type: SystemString
An array of strings, which specifies where in the RAPID domain the RAPID data is declared.
Return Value
Type:
RapidDataA
RapidData object to access the RAPID data. If the RAPID data instance does not exist, the return value is
null.
Exceptions Remarks Examples This example uses the GetRapidData method in two different ways, first a
RapidData
object representing RAPID data declared in a module is created. Then a
RapidData object representing
RAPID data declared in a routine is created. If the values of these two objects are equal true is returned, else false.
private bool CompareValues(Module m,string stModVar,string stRoutName,string stRoutVar)
{
RapidData rd1;
RapidData rd2;
bool result = false;
try
{
rd1 = m.GetRapidData(stModVar);
rd2 = m.GetRapidData(stRoutName,stRoutVar);
result = (rd1.Value.ToString() == rd2.Value.ToString());
}
catch (GeneralException ee)
{
}
catch (System.Exception ee)
{
}
finally
{
if (rd1 != null)
rd1.Dispose();
rd1 = null;
if (rd2 != null)
rd2.Dispose();
rd2 = null;
}
return result;
}
See Also