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 The example below creates a
RapidData object of the RAPID data instance
reg1,
which is declared in the RAPID task
T_ROB1 in the
USER module. The value of
reg1 is written to a textbox.
private void DisplayValueOfReg1()
{
RapidData rdReg1;
try
{
if (_controller == null)
_controller = new Controller();
rdReg1 = _controller.Rapid.GetRapidData("T_ROB1","USER","reg1");
Num nValOfReg1 = (Num) rdReg1.Value;
textBox1.Text = nValOfReg1.ToString();
}
catch (GeneralException ee)
{
}
catch (System.Exception ee)
{
}
finally
{
if (rdReg1 != null)
rdReg1.Dispose();
}
}
See Also