ModuleCreateRapidData Method (String, String, Boolean, StorageType, Int32) |
Creates a new RAPID data in the module according to specified parameters.
Namespace:
ABB.Robotics.Controllers.RapidDomain
Assembly:
ABB.Robotics.Controllers (in ABB.Robotics.Controllers.dll) Version: 6.5.129.0
Syntax public bool CreateRapidData(
string dataName,
string dataType,
bool bLocal,
StorageType type,
params int[] dim
)
Parameters
- dataName
- Type: SystemString
Name of the RAPID data instance. - dataType
- Type: SystemString
Name of the data type of the RAPID data instance. - bLocal
- Type: SystemBoolean
True if the RAPID data instance is to be declared as local, false if global. - type
- Type: ABB.Robotics.Controllers.RapidDomainStorageType
The storage type of the instance, see StorageType - dim
- Type: SystemInt32
An array with the length of each dimension.
Return Value
Type:
BooleanReturns true if a new RAPID data instance was successfully created. Otherwise false.
Exceptions Remarks The range of the dimension is from 0 to 3, if it is null or the length of dim is 0 a non-array RAPID data will be created.
Data type can be a built-in type or a user defined type.
Examples This example creates a RAPID array and a simple RAPID data of num type.
using ABB.Robotics;
using ABB.Robotics.Controllers;
using ABB.Robotics.Controllers.RapidDomain;
...
Controller c = new Controller();
Task[] allTasks = c.Rapid.GetTasks();
Task firstTask = allTasks[0];
Module mod = _task.GetModule("Conveyor");
mod.CreateRapidData("SubPath2", "pointtype", false, StorageType.Pesistent, 2, 2);
mod.CreateRapidData("count", "num", false, StorageType.Pesistent);
...
See Also