Click or drag to resize

ModuleCreateRapidData Method (String, String, Scope, 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
C#
public bool CreateRapidData(
	string dataName,
	string dataType,
	Scope scope,
	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.
scope
Type: ABB.Robotics.Controllers.RapidDomainScope
The scope of the instance, see Scope
type
Type: ABB.Robotics.Controllers.RapidDomainStorageType
The storage type of the instance, see StorageType
dim
Type: SystemInt32
The length of each dimension.

Return Value

Type: Boolean
Returns true if a new RAPID data instance was successfully created. Otherwise false.
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");
//Create a RapidData array of 2 dimensions. Length of first dimension is 2, length of second dimension is 5.
//pointtype is user defined data type and its definition is in another module.
mod.CreateRapidData("SubPath2", "pointtype", false, StorageType.Pesistent, 2, 5);
//The following code creates a simple rapid data instance.
mod.CreateRapidData("count", "num", false, StorageType.Pesistent);
...
See Also