aci.Obj_Type

SUMMARY

Get the type of a data object

SYNTAX

aci.Obj_Type((<object number>|<point id>))

ARGUMENTS

object number (type:number)
A data object number
point id (type:string)
The name of a data object

RETURN VALUES

1 (type:number)
Returns the type of the given data object. Possible values are elements of the global table OBJ_TYPE:
OBJ_TYPE.MP_BIN_STS_1 binary mesuring point with N states
OBJ_TYPE.MP_BIN_STS_2
OBJ_TYPE.MP_BIN_STS_3
OBJ_TYPE.MP_BIN_STS_4
OBJ_TYPE.MP_BIN_STS_5
OBJ_TYPE.MP_BIN_STS_6
OBJ_TYPE.MP_BIN_STS_7
OBJ_TYPE.MP_BIN_STS_8
OBJ_TYPE.MP_ANA_LIM_0 analogue measuring point with N limits
OBJ_TYPE.MP_ANA_LIM_1
OBJ_TYPE.MP_ANA_LIM_2
OBJ_TYPE.MP_ANA_LIM_3
OBJ_TYPE.MP_ANA_LIM_4
OBJ_TYPE.MP_ANA_LIM_5
OBJ_TYPE.MP_ANA_LIM_6
OBJ_TYPE.MP_ANA_LIM_7
OBJ_TYPE.PO_BIN binary process object
OBJ_TYPE.PO_ANA analogue process object
OBJ_TYPE.SO system object
OBJ_TYPE.REF reference object
Note:
this value will never be returned by Obj_Type() because a reference object always returns the type of the referenced object. Use aci.Obj_IsRefObj() to decide whether an object is a reference object or not
OBJ_TYPE.PV_BIT Bit-PV
OBJ_TYPE.PV_U08 PV, unsigned, 8 Bit
OBJ_TYPE.PV_S08 PV, signed, 8 Bit
OBJ_TYPE.PV_U16 PV, unsigned, 16 Bit
OBJ_TYPE.PV_S16 PV, signed, 16 Bit
OBJ_TYPE.PV_U32 PV, unsigned, 32 Bit
OBJ_TYPE.PV_S32 PV, signed, 32 Bit
OBJ_TYPE.PV_F32 PV, float, 32 Bit
OBJ_TYPE.PV_STR String-PV
OBJ_TYPE.PV_S5T PV, S5-Timer
OBJ_TYPE.PV_IEC PV, IEC-Timer
nil the type could not be determined, normally because the object does not exist.

EXAMPLES

for objnum = 0, 65535, 1 do --for all objects
	local type = aci.Obj_Type(objnum)
	if  type == OBJ_TYPE.SO then
		-- do something only for system objects
	end
end
		


Syntax Notation
[aaa]
aaa is optional (zero or one occurences)
(aaa|bbb)
aaa exclusive or bbb
(aaa)*
aaa may occur indefinitely often or may be omitted
(aaa)+
aaa may occur indefinitely often but at least once
(aaa)m..n
aaa may occur from m to n times