Reads an item of the Rapid data array
Namespace:
ABB.Robotics.Controllers.RapidDomain
Assembly:
ABB.Robotics.Controllers (in ABB.Robotics.Controllers.dll) Version: 6.5.129.0
Syntaxpublic IRapidData ReadItem(
params int[] index
)
Parameters
- index
- Type: SystemInt32
Index of the item.
Return Value
Type:
IRapidDataReturns a
IRapidData instance that contains the value of the item.
Exceptions
ExamplesThis example reads each item of an robtarget array and adds the value to a listbox.
private void ShowRobtargetArrayValues(Conroller c)
{
try
{
RapidData rdRobtarget = c.Rapid.GetRapidData("T_ROB1","MyModule","rt_array");
for (int i = 5;i > 0;i--)
{
RobTarget rtValue = (RobTarget) rdRobtarget.ReadItem(i);
listBox1.Items.Add(rtValue.ToString());
}
}
catch (GeneralException ee)
{
}
catch (System.Exception ee)
{
}
finally
{
if (rdRobtarget != null)
rdRobtarget.Dispose();
}
}
See Also