Map.DataTypeGet
Returns the data type of a controller variable.
This property cannot be saved to flash memory.
Version History
Introduced in MPX 2.0.
Result
Mpx.DataType
Arguments
Overload 1
|
Argument |
Type |
Description |
enumMap |
Mpx.Map |
The enumeration for which the data type will be returned. |
|
Overload 2
|
Argument |
Type |
Description |
enumMap |
Mpx.Map |
The enumeration for which the data type will be returned. |
index |
UInt32 |
Index associated with the enumeration. |
|
Overload 3
|
Argument |
Type |
Description |
enumMap |
Mpx.Map |
The enumeration for which the data type will be returned. |
index1 |
UInt32 |
First index associated with the enumeration. |
index2 |
UInt32 |
Second index associated with the enumeration. |
|
Common Exceptions
|
Error |
Occurs when... |
ObjectNotEnabled |
The Map object is currently not enabled. |
Parameter |
Specified index or indices are invalid. |
|
Visual Basic
Syntax
Function DataTypeGet(enumMap As Mpx.Map) As Mpx.DataType
Function DataTypeGet(enumMap As Mpx.Map, index As UInt32) As Mpx.DataType
Function DataTypeGet(enumMap As Mpx.Map, index1 As UInt32, _
index2 As UInt32) As Mpx.DataType
Sample Code
|
Dim dType1 As mpx.DataType Dim dType2 As mpx.DataType Dim dType3 As mpx.DataType
'Map.NullInput enumeration does not need additional indices dType1 = _ controller.Map.DataTypeGet(mpx.Map.NullInput)
'Map.ActualPosition enumeration takes 1 additional index of 'the axis number (axis #0 in this example) dType2 = _ controller.Map.DataTypeGet(mpx.Map.ActualPosition, 0)
'Map.SqNodeAnalogIn enumeration takes 2 additional indices of 'node number and analog input number '(node #0 and analog input #1 in this example) dType3 = _ controller.Map.DataTypeGet(mpx.Map.SqNodeAnalogIn, 0, 1)
|
Sample Application
C#
Syntax
Mpx.DataType DataTypeGet(Mpx.Map enumMap);
Mpx.DataType DataTypeGet(Mpx.Map enumMap, uint index);
Mpx.DataType DataTypeGet(Mpx.Map enumMap, uint index1, uint index2);
Sample Code
|
Mpx.DataType dType1; Mpx.DataType dType2; Mpx.DataType dType3;
//Map.NullInput enumeration does not need additional indices dType1 = controller.Map.DataTypeGet(Mpx.Map.NullInput);
//Map.ActualPosition enumeration takes 1 additional index of //the axis number (axis #0 in this example) dType2 = controller.Map.DataTypeGet(Mpx.Map.ActualPosition, 0);
//Map.SqNodeAnalogIn enumeration takes 2 additional indices of //node number and analog input number //(node #0 and analog input #1 in this example) dType3 = controller.Map.DataTypeGet(Mpx.Map.SqNodeAnalogIn, 0, 1);
|
See Also
StringGet
Enumerations
DataType
Map
|