FpRapidData Constructor (RapidData, Int32) |
Initializes a new instance of the
FpRapidData class for an array data.
Namespace:
ABB.Robotics.Tps.Windows.Forms
Assembly:
ABB.Robotics.GTPU (in ABB.Robotics.GTPU.dll) Version: 6.5.129.0
Syntax
Exceptions
Examples
This example shows how to access the RAPID Data edit value dialog using an array.
To be able to use the dialog you must create some objects.
private ABB.Robotics.Controllers.Controller controller;
private ABB.Robotics.Controllers.RapidDomain.Rapid rapid;
private ABB.Robotics.Controllers.RapidDomain.Task task;
private ABB.Robotics.Controllers.RapidDomain.Module module;
...
controller = new ABB.Robotics.Controllers.Controller();
rapid = controller.Rapid;
In this example we are creating a generic method for accessing the dialog.
In the calling routine the array indexes must be compliant with the array data defined in RAPID.
int[] arrayIndex = new int[3];
arrayIndex[0] = 1; arrayIndex[1] = 1; arrayIndex[2] = 1;
launchRapidEditDialog("T_ROB1","MainModule",MyArray3Dim,arrayIndex);private void launchRapidEditDialog(string taskName, string moduleName, string anyDataArray, int [] arrayIndex)
{
task = rapid.GetTask(taskName);
if (task != null)
{
module = task.GetModule(moduleName);
if (module != null)
{
using (ABB.Robotics.Controllers.RapidDomain.RapidData data = module.GetRapidData(anyDataArray))
{
if (data != null)
{
try
{
ABB.Robotics.Tps.Windows.Forms.FpRapidData ui =
new ABB.Robotics.Tps.Windows.Forms.FpRapidData(data, arrayIndex);
ui.ShowMe(this);
}
catch (System.Exception e)
{
}
}
}
}
}
}
See Also