| MIL 10 Reference
| Customize Help
| Save Settings

MfuncParam



See also
Availability
Available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
None.
Synopsis
Register a parameter.
Syntax
void MfuncParam(
MIL_ID ContextFuncId, //in
MIL_INT ParamIndex, //in
const void *ParamValuePtr, //in
MIL_UINT ParamType, //in
MIL_INT NumOfItems, //in
MIL_INT64 MilObjectType, //in
MIL_INT Attribute //in
)
Description

This function allows you to register a parameter of any data type to the current user-defined MIL function. The MfuncParam() function should be called in the master function after a call to MfuncAlloc() and before a call to MfuncCall().

MfuncParam() calls an explicitly named type-specific variation of this function. For example, to register a MIL_INT, it calls MfuncParamMilInt(). Note that, for execution efficiency, you can call the appropriate, explicitly named, type-specific variation of MfuncParam() directly. When registering parameters using the explicitly named type-specific variation of MfuncParam(), you must use that function's specific signature, found below.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
ContextFuncId

Specifies the identifier of the user-defined MIL function.

ParamIndex

Specifies the index of the parameter within the user-defined MIL function's parameter list. The index of the first parameter is considered to be one.

ParamValuePtr

Specifies the address of the array or variable to register.

Note that for non-arrays, you must pass a reference to the variable. For arrays, you just pass the array name.

ParamType

Specifies the parameter type of the parameter in the user-defined MIL function. Parameter types include data types, arrays of data types, void pointers, strings, and file names.

See the Parameter associations section for possible values that can be specified.

NumOfItems

Specifies the size of the data pointed to by the ParamValuePtr parameter.

When the data is an array, the size is the number of elements. When the data is a string, the size is the number of characters in the string. When the data is a pointer, the size is in bytes. For all other types of data, set this parameter to M_DEFAULT.

This value must be greater than 0 in all cases other than M_DEFAULT.

See the Parameter associations section for possible values that can be specified.

MilObjectType

Specifies the type of the MIL object when the data type of the parameter of the user-defined function is MIL_ID. The available object types are divided into two groups. When the specified object is of a type listed in the first group, you can specify a single or multiple object type(s) from this group. The object types of the second group cannot be used in combination with each other.

When the data type of the parameter of the user-defined function is not MIL_ID or an array of MIL_ID s, set MilObjectType to M_NULL.

The following value specifies the type of MIL objects that the MIL identifier type parameter will accept. Any value in this table can be combined with one or more values in this table. For example, if the MIL object is expected to be of type M_ARRAY or M_COUNT_LIST, set the MilObjectType parameter to M_ARRAY + M_COUNT_LIST.

function map For specifying the type of MIL object accepted by the MIL identifier type parameter (one or multiple)
CollapseValue Description
Collapse M_APPLICATION

Specifies a MIL application context allocated using MappAlloc().

Collapse M_ARRAY

Specifies a MIL array buffer allocated using MbufAlloc2d() with M_ARRAY.

Collapse M_COUNT_LIST

Specifies a MIL count list result buffer allocated using MimAllocResult() with M_COUNT_LIST.

Collapse M_DIGITIZER

Specifies a MIL digitizer allocated using MdigAlloc().

Collapse M_DISPLAY

Specifies a MIL display allocated using MdispAlloc().

Collapse M_EVENT

Specifies a MIL event allocated using MthrAlloc() with M_EVENT.

Collapse M_EVENT_LIST

Specifies a MIL event list result buffer allocated using MimAllocResult() with M_EVENT_LIST.

Collapse M_EXTREME_LIST

Specifies a MIL extreme list result buffer allocated using MimAllocResult() with M_EXTREME_LIST.

Collapse M_FIND_ORIENTATION_LIST

Specifies a MIL find orientation list result buffer allocated using MimAllocResult() with M_FIND_ORIENTATION_LIST.

Collapse M_GRAPHIC_CONTEXT

Specifies a MIL graphics context allocated using MgraAlloc().

Collapse M_GRAPHIC_LIST

Specifies a MIL graphics list allocated using MgraAllocList().

Collapse M_HIST_LIST

Specifies a MIL histogram list result buffer allocated using MimAllocResult() with M_HIST_LIST.

Collapse M_IM_CONTEXT

Specifies a MIL image processing context allocated using MimAlloc().

Collapse M_IMAGE

Specifies a MIL image buffer allocated using MbufAllocColor() with M_IMAGE.

Collapse M_KERNEL

Specifies a MIL kernel buffer allocated using MbufAlloc2d() with M_KERNEL.

Collapse M_LOCATE_PEAK_1D_RESULT

Specifies a MIL locate 1D peak result buffer allocated using MimAllocResult() with M_LOCATE_PEAK_1D_RESULT.

Collapse M_LUT

Specifies a MIL LUT buffer allocated using MbufAlloc2d() with M_LUT.

Collapse M_PROJ_LIST

Specifies a MIL project list result buffer allocated using MimAllocResult() with M_PROJ_LIST.

Collapse M_SEQUENCE_CONTEXT

Specifies a MIL sequence context allocated using MseqAlloc().

Collapse M_STAT_LIST

Specifies a MIL MimStat() result buffer allocated using MimAllocResult() with M_STAT_LIST.

Collapse M_STAT_MULTIPLE_RESULT

Specifies a MIL MimStatMultiple() result buffer allocated using MimAllocResult() with M_STAT_MULTIPLE_RESULT.

Collapse M_STRUCT_ELEMENT

Specifies a MIL structuring element buffer allocated using MbufAlloc2d() with M_STRUCT_ELEMENT.

Collapse M_SYS_IO_CONTEXT

Specifies a MIL system I/O context allocated using MsysIoAlloc().

Collapse M_SYSTEM

Specifies a MIL system context allocated using MsysAlloc().

Collapse M_WAVELET_TRANSFORM_RESULT

Specifies a MIL wavelet transform result buffer allocated using MimAllocResult() with M_WAVELET_TRANSFORM_RESULT.

The following value specifies the type of MIL objects that the MIL identifier type parameter will accept. No value in this table can be combined with any other value in this table, though a value in this table can be combined with one or more values from the above table.

function map For specifying the type of MIL object accepted by the MIL identifier type parameter (only one)
CollapseValue Description
Collapse M_3DMAP_ALIGNMENT_RESULT

Specifies a MIL 3D reconstruction result buffer allocated using M3dmapAllocResult() with M_ALIGNMENT_RESULT.

Collapse M_3DMAP_DEPTH_CORRECTED_DATA

Specifies a MIL 3D reconstruction result buffer allocated using M3dmapAllocResult() with M_DEPTH_CORRECTED_DATA.

Collapse M_3DMAP_GEOMETRY

Specifies a MIL 3D geometry object allocated using M3dmapAlloc() with M_GEOMETRY.

Collapse M_3DMAP_LASER_CALIBRATION_DATA

Specifies a MIL 3D reconstruction result buffer allocated using M3dmapAllocResult() with M_LASER_CALIBRATION_DATA.

Collapse M_3DMAP_LASER_CONTEXT

Specifies a MIL 3D reconstruction context allocated using M3dmapAlloc() with M_LASER.

Collapse M_3DMAP_PAIRWISE_ALIGNMENT_CONTEXT

Specifies a MIL pairwise 3D alignment context allocated using M3dmapAlloc() with M_PAIRWISE_ALIGNMENT_CONTEXT.

Collapse M_3DMAP_POINT_CLOUD_CONTAINER

Specifies a MIL 3D reconstruction result buffer allocated using M3dmapAllocResult() with M_POINT_CLOUD_CONTAINER.

Collapse M_3DMAP_STAT_RESULT

Specifies a MIL 3D reconstruction result buffer allocated using M3dmapAllocResult() with M_STAT_RESULT.

Collapse M_BEAD_CONTEXT

Specifies a MIL bead context allocated using MbeadAlloc().

Collapse M_BEAD_RESULT

Specifies a MIL bead result buffer allocated using MbeadAllocResult().

Collapse M_BLOB_FEATURE_LIST

Specifies a MIL blob analysis feature list allocated using MblobAllocFeatureList().

Collapse M_BLOB_RESULT

Specifies a MIL blob analysis result buffer allocated using MblobAllocResult().

Collapse M_CAL_CONTEXT

Specifies a MIL calibration context allocated using McalAlloc().

Collapse M_CAL_FIXTURING_OFFSET

Specifies a MIL fixturing offset object allocated using McalAlloc() with M_FIXTURING_OFFSET.

Collapse M_CODE_CONTEXT

Specifies a MIL code context allocated using McolAlloc().

Collapse M_CODE_MODEL

Specifies a MIL code model allocated using McodeModel() with M_ADD.

Collapse M_CODE_RESULT

Specifies a MIL code result buffer allocated using McodeAllocResult().

Collapse M_COL_MATCH_CONTEXT

Specifies a MIL color analysis context (for matching) allocated using McolAlloc() with M_COLOR_MATCHING.

Collapse M_COL_MATCH_RESULT

Specifies a MIL color analysis result buffer (for matching) allocated using McolAllocResult() with M_COLOR_MATCHING_RESULT.

Collapse M_COL_RELATIVE_CALIBRATION_CONTEXT

Specifies a MIL relative color calibration context allocated using McolAlloc() with M_COLOR_CALIBRATION_RELATIVE.

Collapse M_EDGE_CONTOUR

Specifies a MIL edge contour context allocated using MedgeAlloc() with M_CONTOUR.

Collapse M_EDGE_CREST

Specifies a MIL edge crest context allocated using MedgeAlloc() with M_CREST.

Collapse M_EDGE_RESULT

Specifies a MIL edge result buffer allocated using MedgeAllocResult().

Collapse M_MEAS_CONTEXT

Specifies a MIL measurement context allocated using MmeasAllocContext().

Collapse M_MEAS_MARKER

Specifies a MIL measurement marker allocated using MmeasAllocMarker().

Collapse M_MEAS_RESULT

Specifies a MIL measurement result buffer allocated using MmeasAllocResult().

Collapse M_MET_CONTEXT

Specifies a MIL metrology context allocated using MmetAlloc() with M_CONTEXT.

Collapse M_MET_DERIVED_GEOMETRY_REGION

Specifies a MIL metrology derived geometry region object allocated using MmetAlloc() with M_DERIVED_GEOMETRY_REGION.

Collapse M_MET_RESULT

Specifies a MIL metrology result buffer allocated using MmetAllocResult().

Collapse M_MOD_GEOMETRIC

Specifies a MIL Model Finder context allocated using MmodAlloc() with M_GEOMETRIC.

Collapse M_MOD_GEOMETRIC_CONTROLLED

Specifies a MIL Model Finder context allocated using MmodAlloc() with M_GEOMETRIC_CONTROLLED.

Collapse M_MOD_RESULT

Specifies a MIL Model Finder result buffer allocated using MmodAllocResult() with M_DEFAULT.

Collapse M_MOD_SHAPE_RESULT

Specifies a MIL Model Finder result buffer allocated using MmodAllocResult() with M_SHAPE_CIRCLE.

Collapse M_MUTEX

Specifies a MIL mutex allocated using MthrAlloc() with M_MUTEX.

Collapse M_OCR_FONT

Specifies a MIL character recognition font context allocated using MocrAllocFont().

Collapse M_OCR_RESULT

Specifies a MIL character recognition result buffer allocated using MocrAllocResult().

Collapse M_PAT_MODEL

Specifies a MIL pattern matching model allocated using MpatAllocModel().

Collapse M_PAT_RESULT

Specifies a MIL pattern matching result buffer allocated using MpatAllocResult().

Collapse M_REG_EDOF_CONTEXT

Specifies a MIL registration context allocated using MregAlloc() with M_EXTENDED_DEPTH_OF_FIELD.

Collapse M_REG_EDOF_RESULT

Specifies a MIL registration result buffer allocated using MregAllocResult() with M_EXTENDED_DEPTH_OF_FIELD_RESULT.

Collapse M_REG_STITCHING_CONTEXT

Specifies a MIL registration context allocated using MregAlloc() with M_STITCHING.

Collapse M_REG_STITCHING_RESULT

Specifies a MIL registration result buffer allocated using MregAllocResult() with M_STITCHING_RESULT.

Collapse M_SELECTABLE_THREAD

Specifies a MIL selectable thread allocated using MthrAlloc() with M_SELECTABLE_THREAD.

Collapse M_SHAPE_CIRCLE

Specifies a MIL Model Finder context allocated using MmodAlloc() with M_SHAPE_CIRCLE.

Collapse M_STR_CONTEXT

Specifies a MIL string context allocated using MstrAlloc().

Collapse M_STR_RESULT

Specifies a MIL string result buffer allocated using MstrAllocResult().

Collapse M_THREAD

Specifies a MIL thread context object allocated using MthrAlloc() with M_THREAD.

Collapse M_USER_OBJECT_1 +

Specifies a MIL object from group one of the user-defined object types allocated using MfuncAllocId() with M_USER_OBJECT_1.


You must specify a combination value from the following table:
(summarize)
Collapse M_USER_OBJECT_2 +

Specifies a MIL object from group two of the user-defined object types allocated using MfuncAllocId() with M_USER_OBJECT_2.


You must specify a combination value from the following table:
(summarize)
Combination constant for M_USER_OBJECT_1; M_USER_OBJECT_2.

You must add the following value to the above-mentioned values to set the offset.

The offset allows you to distinguish between the different object types of the same group (for example, M_USER_OBJECT_1 + 0x0001).

function map For distinguishing between the different object types
CollapseCombination value Description
Collapse Value

Specifies the offset within the selected object type group. The value must have only one of its 16 least significant bits set.

(summarize)
Attribute

Specifies whether the parameter will be used for data input or to store new data.

When registering a const array type parameter, Attribute must be set to M_IN.

See the Parameter associations section for possible values that can be specified.

The following values specify to call type-specific variations of MfuncParam() that register parameters that handle primitive MIL data types, such as, MIL_DOUBLE, MIL_INT, and MIL_UINT64, as well as strings, void pointers and file names.

Unless otherwise specified, when specifying values from this table, you must set the NumOfItems parameter to M_DEFAULT, the MilObjectType parameter to M_NULL, and the Attribute parameter to M_NULL.

function map For registering a primitive data-type parameter in a MIL user-defined function
CollapseParamType Description
NumOfItems
Attribute
Collapse M_PARAM_TYPE_MIL_DOUBLE

Specifies to call MfuncParamMilDouble(), which then registers a type MIL_DOUBLE parameter for the current user-defined MIL function.

(summarize)
Collapse M_PARAM_TYPE_MIL_INT

Specifies to call MfuncParamMilInt(), which then registers a type MIL_INT parameter for the current user-defined MIL function.

(summarize)
Collapse M_PARAM_TYPE_MIL_INT32

Specifies to call MfuncParamMilInt32(), which then registers a type MIL_INT32 parameter for the current user-defined MIL function.

(summarize)
Collapse M_PARAM_TYPE_MIL_INT64

Specifies to call MfuncParamMilInt64(), which then registers a type MIL_INT64 parameter for the current user-defined MIL function.

(summarize)
Collapse M_PARAM_TYPE_MIL_UINT

Specifies to call MfuncParamMilUint(), which then registers a type MIL_UINT parameter for the current user-defined MIL function.

(summarize)
Collapse M_PARAM_TYPE_MIL_UINT32

Specifies to call MfuncParamMilUint32(), which then registers a type MIL_UINT32 parameter for the current user-defined MIL function.

(summarize)
Collapse M_PARAM_TYPE_MIL_UINT64

Specifies to call MfuncParamMilUint64(), which then registers a type MIL_INT64 parameter for the current user-defined MIL function.

(summarize)

The following values specify to call type-specific variations of MfuncParam() that register parameters that handle arrays of primitive MIL data types, such as, MIL_DOUBLE, MIL_INT, and MIL_UINT64.

When specifying values from this table, you must set the NumOfItems parameter to the number of items in the array, and you must set the MilObjectType parameter to M_NULL.

function map For registering a primitive data-type array parameter in a MIL user-defined function
CollapseParamType Description
NumOfItems
Attribute
Collapse M_PARAM_TYPE_ARRAY_MIL_DOUBLE

Specifies to call MfuncParamArrayMilDouble(), which then registers a parameter of the current user-defined MIL function that handles an array of type MIL_DOUBLE.

(summarize)
Collapse Attribute

This parameter should be set to one or both (M_IN + M_OUT) of the following values.

(summarize)
Collapse M_IN

Specifies that the array passed to ParamValuePtr is used for data input.

Collapse M_OUT

Specifies that the array passed to ParamValuePtr is used to store new data from the user-defined function.

Collapse M_PARAM_TYPE_ARRAY_MIL_INT

Specifies to call MfuncParamArrayMilInt(), which then registers a parameter of the current user-defined MIL function that handles an array of type MIL_INT.

(summarize)
Collapse Attribute

This parameter should be set to one or both (M_IN + M_OUT) of the following values.

(summarize)
Collapse M_IN

Specifies that the array passed to ParamValuePtr is used for data input.

Collapse M_OUT

Specifies that the array passed to ParamValuePtr is used to store new data from the user-defined function.

Collapse M_PARAM_TYPE_ARRAY_MIL_INT32

Specifies to call MfuncParamArrayMilInt32(), which then registers a parameter of the current user-defined MIL function that handles an array of type MIL_INT32.

(summarize)
Collapse Attribute

This parameter should be set to one or both (M_IN + M_OUT) of the following values.

(summarize)
Collapse M_IN

Specifies that the array passed to ParamValuePtr is used for data input.

Collapse M_OUT

Specifies that the array passed to ParamValuePtr is used to store new data from the user-defined function.

Collapse M_PARAM_TYPE_ARRAY_MIL_INT64

Specifies to call MfuncParamArrayMilInt64(), which then registers a parameter of the current user-defined MIL function that handles an array of type MIL_INT64.

(summarize)
Collapse Attribute

This parameter should be set to one or both (M_IN + M_OUT) of the following values.

(summarize)
Collapse M_IN

Specifies that the array passed to ParamValuePtr is used for data input.

Collapse M_OUT

Specifies that the array passed to ParamValuePtr is used to store new data from the user-defined function.

Collapse M_PARAM_TYPE_ARRAY_MIL_UINT

Specifies to call MfuncParamArrayMilUint(), which then registers a parameter of the current user-defined MIL function that handles an array of type MIL_UINT.

(summarize)
Collapse Attribute

This parameter should be set to one or both (M_IN + M_OUT) of the following values.

(summarize)
Collapse M_IN

Specifies that the array passed to ParamValuePtr is used for data input.

Collapse M_OUT

Specifies that the array passed to ParamValuePtr is used to store new data from the user-defined function.

Collapse M_PARAM_TYPE_ARRAY_MIL_UINT32

Specifies to call MfuncParamArrayMilUint32(), which then registers a parameter of the current user-defined MIL function that handles an array of type MIL_UINT32.

(summarize)
Collapse Attribute

This parameter should be set to one or both (M_IN + M_OUT) of the following values.

(summarize)
Collapse M_IN

Specifies that the array passed to ParamValuePtr is used for data input.

Collapse M_OUT

Specifies that the array passed to ParamValuePtr is used to store new data from the user-defined function.

Collapse M_PARAM_TYPE_ARRAY_MIL_UINT64

Specifies to call MfuncParamArrayMilUint64(), which then registers a parameter of the current user-defined MIL function that handles an array of type MIL_UINT64.

(summarize)
Collapse Attribute

This parameter should be set to one or both (M_IN + M_OUT) of the following values.

(summarize)
Collapse M_IN

Specifies that the array passed to ParamValuePtr is used for data input.

Collapse M_OUT

Specifies that the array passed to ParamValuePtr is used to store new data from the user-defined function.

The following values specify to call type-specific variations of MfuncParam() that register parameters that handle const arrays of primitive MIL data types, such as, MIL_DOUBLE, MIL_INT, and MIL_UINT64, as well as const pointers and const strings.

Unless otherwise specified, when specifying values from this table, you must set the NumOfItems parameter to the number of items in the array, and you must set the MilObjectType parameter to M_NULL.

function map For registering a const array of primitive data-types parameter in a MIL user-defined function
CollapseParamType Description
NumOfItems
Attribute
Collapse M_PARAM_TYPE_CONST_ARRAY_MIL_DOUBLE

Specifies to call MfuncParamConstArrayMilDouble(), which then registers a parameter of the current user-defined MIL function that handles a const array of type MIL_DOUBLE.

(summarize)
Collapse Attribute

Specifies the following.

(summarize)
Collapse M_IN

Specifies that the array passed to ParamValuePtr is used for data input.

Collapse M_PARAM_TYPE_CONST_ARRAY_MIL_INT

Specifies to call MfuncParamConstArrayMilInt(), which then registers a parameter of the current user-defined MIL function that handles a const array of type MIL_INT.

(summarize)
Collapse Attribute

Specifies the following.

(summarize)
Collapse M_IN

Specifies that the array passed to ParamValuePtr is used for data input.

Collapse M_PARAM_TYPE_CONST_ARRAY_MIL_INT32

Specifies to call MfuncParamConstArrayMilInt32(), which then registers a parameter of the current user-defined MIL function that handles a const array of type MIL_INT32.

(summarize)
Collapse Attribute

Specifies the following.

(summarize)
Collapse M_IN

Specifies that the array passed to ParamValuePtr is used for data input.

Collapse M_PARAM_TYPE_CONST_ARRAY_MIL_INT64

Specifies to call MfuncParamConstArrayMilInt64(), which then registers a parameter of the current user-defined MIL function that handles a const array of type MIL_INT64.

(summarize)
Collapse Attribute

Specifies the following.

(summarize)
Collapse M_IN

Specifies that the array passed to ParamValuePtr is used for data input.

Collapse M_PARAM_TYPE_CONST_ARRAY_MIL_UINT

Specifies to call MfuncParamConstArrayMilUint(), which then registers a parameter of the current user-defined MIL function that handles a const array of type MIL_UINT.

(summarize)
Collapse Attribute

Specifies the following.

(summarize)
Collapse M_IN

Specifies that the array passed to ParamValuePtr is used for data input.

Collapse M_PARAM_TYPE_CONST_ARRAY_MIL_UINT32

Specifies to call MfuncParamConstArrayMilUint32(), which then registers a parameter of the current user-defined MIL function that handles a const array of type MIL_UINT32.

(summarize)
Collapse Attribute

Specifies the following.

(summarize)
Collapse M_IN

Specifies that the array passed to ParamValuePtr is used for data input.

Collapse M_PARAM_TYPE_CONST_ARRAY_MIL_UINT64

Specifies to call MfuncParamConstArrayMilUint64(), which then registers a parameter of the current user-defined MIL function that handles a const array of type MIL_UINT64.

(summarize)
Collapse Attribute

Specifies the following.

(summarize)
Collapse M_IN

Specifies that the array passed to ParamValuePtr is used for data input.

The following values specify to call type-specific variations of MfuncParam() that register a string or file name parameter.

Unless otherwise specified, when specifying values from this table, you must set the MilObjectType parameter to M_NULL.

function map For registering a string or file name type parameter in a MIL user-defined function
CollapseParamType Description
NumOfItems
Attribute
Collapse M_PARAM_TYPE_CONST_MIL_TEXT

Specifies to call MfuncParamConstMilText(), which then registers a parameter of the current user-defined MIL function that handles a const string.

(summarize)
Collapse NumOfItems

Specifies one of the following.

(summarize)
Collapse M_DEFAULT

Specifies for MIL to auto-calculate the number of characters in the string.

Collapse Value

Specifies the number of characters in the string.

Collapse Attribute

Specifies the following.

(summarize)
Collapse M_IN

Specifies that the object passed to ParamValuePtr is used for data input.

Collapse M_PARAM_TYPE_FILENAME

Specifies to call MfuncParamFilename(), which then registers a parameter of the current user-defined MIL function that handles a file name.

(summarize)
Collapse NumOfItems

Specifies one of the following.

(summarize)
Collapse M_DEFAULT

Specifies for MIL to auto-calculate the number of characters in the string.

Collapse Value

Specifies the number of characters in the string.

Collapse Attribute

Specifies one of the following.

(summarize)
Collapse M_IN

Specifies that the parameter of the current user-defined MIL function will be registered for file reading only.

Collapse M_OUT

Specifies that the parameter of the current user-defined MIL function will be registered for file writing only.

Collapse M_PARAM_TYPE_MIL_TEXT

Specifies to call MfuncParamMilText(), which then registers a parameter of the current user-defined MIL function that handles a string.

(summarize)
Collapse NumOfItems

Specifies one of the following.

(summarize)
Collapse M_DEFAULT

Specifies for MIL to auto-calculate the number of characters in the string.

Collapse Value

Specifies the number of characters in the string.

Collapse Attribute

This parameter should be set to one or both (M_IN + M_OUT) of the following values.

(summarize)
Collapse M_IN

Specifies that the array passed to ParamValuePtr is used for data input.

Collapse M_OUT

Specifies that the array passed to ParamValuePtr is used to store new data from the user-defined function.

The following values specify to call type-specific variations of MfuncParam() that register pointer parameters, including arrays and const arrays of pointers.

Unless otherwise specified, when specifying values from this table, you must set the MilObjectType parameter to M_NULL.

function map For registering a pointer type parameter in a MIL user-defined function
CollapseParamType Description
NumOfItems
Attribute
Collapse M_PARAM_TYPE_CONST_DATA_PTR

Specifies to call MfuncParamConstDataPointer(), which then registers a parameter of the current user-defined MIL function that handles a const data pointer.

(summarize)
Collapse NumOfItems

Specifies the number of bytes in the pointer.

Collapse Attribute

Specifies the following.

(summarize)
Collapse M_IN

Specifies that the object passed to ParamValuePtr is used for data input.

Collapse M_PARAM_TYPE_DATA_PTR

Specifies to call MfuncParamDataPointer(), which then registers a parameter of the current user-defined MIL function that handles a data pointer.

(summarize)
Collapse NumOfItems

Specifies the number of bytes in the pointer.

Collapse Attribute

This parameter should be set to one or both (M_IN + M_OUT) of the following values.

(summarize)
Collapse M_IN

Specifies that the object passed to ParamValuePtr is used for data input.

Collapse M_OUT

Specifies that the object passed to ParamValuePtr is used to store new data from the user-defined function.

The following values specify to call type-specific variations of MfuncParam() that register parameters that handle a MIL_ID, including arrays and const arrays of MIL_ID s.

When registering MIL_ID parameters, you must specify a value for MilObjectType.

function map For registering a MIL identifier type parameter in a MIL user-defined function
CollapseParamType Description
NumOfItems
Attribute
Collapse M_PARAM_TYPE_ARRAY_MIL_ID +

Specifies to call MfuncParamArrayMilId(), which then registers a parameter of the current user-defined MIL function that handles an array of type MIL_ID.

(summarize)
Collapse NumOfItems

Specify the number of elements in the array.

Collapse Attribute

This parameter should be set to one or both (M_IN + M_OUT) of the following values.

(summarize)
Collapse M_IN

Specifies that the objects referenced in the array passed to ParamValuePtr are used for data input.

Collapse M_OUT

Specifies that the objects referenced by the MIL_ID passed to ParamValuePtr are used to store new data from the user-defined function.

Collapse M_PARAM_TYPE_CONST_ARRAY_MIL_ID +

Specifies to call MfuncParamConstArrayMilId(), which then registers a parameter of the current user-defined MIL function that handles a const array of type MIL_ID.

(summarize)
Collapse NumOfItems

Specify the number of elements in the array.

Collapse Attribute

Specifies the following.

(summarize)
Collapse M_IN

Specifies that the objects referenced in the array passed to ParamValuePtr are used for data input.

Collapse M_PARAM_TYPE_MIL_ID +

Specifies to call MfuncParamMilId(), which then registers a type MIL_ID parameter of the current user-defined MIL function.

(summarize)
Collapse NumOfItems

This parameter must be set to M_DEFAULT.

Collapse Attribute

This parameter should be set to one or both (M_IN + M_OUT) of the following values.

(summarize)
Collapse M_IN

Specifies that the object referenced by the MIL_ID passed to ParamValuePtr is used for data input.

Collapse M_OUT

Specifies that the object referenced by the MIL_ID passed to ParamValuePtr is used to store new data from the user-defined function.

You can add one or more of the following values to the above-mentioned values to specify the optional settings for a MIL identifier type parameter.

When you register a MIL identifier type of parameter, the user-defined function will throw an error if a value other than a MIL_ID is passed to it. There are, however, non-standard identifier values that can be accepted. The values specified below specify which non-standard identifier values are valid in addition to a MIL_ID.

There is also the optional of specifying that a MIL identifier will not be internally modified or compensated during the execution of the user-defined function.

function map For specifying optional settings for a MIL identifier type parameter
CollapseCombination value Description
Collapse M_ALLOW_DEFAULT_ID

Specifies that this parameter will accept M_DEFAULT as a valid MIL_ID.

Collapse M_ALLOW_NULL_ID

Specifies that this parameter will accept M_NULL as a valid MIL_ID.

Collapse M_AS_VALUE

Specifies that this parameter will accept any valid MIL_ID, but will not internally modify it. This means different things depending on if this value is added to M_IN or M_OUT.

For a MIL identifier type parameter set to M_IN, the buffer specified by the user is used as the source of information for the user-defined function. When that source buffer is on a different system, the MIL identifier for that buffer is internally modified if the content of the buffer needs to be copied to another system for processing. This modification is called compensation.

If your application uses the MIL identifiers exactly as specified by the user, your application could crash by inadvertently pointing to a buffer whose content has been copied to another buffer with a compensated MIL identifier. You can avoid this by adding M_AS_VALUE to M_IN when registering your parameter. This has the effect of keeping the specific value of the MIL identifier specified by the user, without compensating it.

For a MIL identifier type parameter set to M_OUT, the buffer specified by the user is used as the destination of information for the user-defined function. When you register this parameter without M_AS_VALUE, the user must specify the MIL_ID of a previously allocated buffer. When the user-defined function is called, the content of that destination buffer will be filled with new data.

When you register this parameter as M_OUT + M_AS_VALUE, the user must specify a pointer. When the user-defined function is called, the pointer will be filled with a MIL_ID. The MIL_ID could be, for example, a newly-allocated buffer or the result of an inquire.

(summarize)

You can add one or more of the following values to the above-mentioned values to specify the image buffer type, if MilObjectType is set to M_IMAGE.

If you specify an M_IMAGE object (from the ParamValuePtr parameter) that does not correspond to any of the type(s) selected from the values listed below, an error is returned. If none of the values specified below are added, any M_IMAGE object will be accepted. Note that you cannot specify any of the following if the MilObjectType parameter is set to a combination of values.

function map For specifying the type of image buffer when the MilObjectType is set to M_IMAGE
CollapseCombination value Description
Collapse M_DISP

Specifies that the buffer can be displayed.

Collapse M_GRAB

Specifies that the buffer can have data grabbed into it.

Collapse M_PROC

Specifies that the buffer can be processed.

Type-specific versions of the function
void MfuncParamArrayMilDouble (MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_DOUBLE *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValuePtr

See ParamValuePtr of the main function for a description.

NumOfItems

See NumOfItems of the main function for a description.

Specifies the number of elements in the array.

Attribute

See Attribute of the main function for a description.

void MfuncParamArrayMilId (MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_ID *ParamValuePtr, MIL_INT NumOfItems, MIL_INT64 MilObjectType, MIL_INT Attribute)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValuePtr

See ParamValuePtr of the main function for a description.

NumOfItems

See NumOfItems of the main function for a description.

Specifies the number of elements in the array.

MilObjectType

See MilObjectType of the main function for a description.

Attribute

See Attribute of the main function for a description.

void MfuncParamArrayMilInt (MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_INT *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValuePtr

See ParamValuePtr of the main function for a description.

NumOfItems

See NumOfItems of the main function for a description.

Specifies the number of elements in the array.

Attribute

See Attribute of the main function for a description.

void MfuncParamArrayMilInt32 (MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_INT32 *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValuePtr

See ParamValuePtr of the main function for a description.

NumOfItems

See NumOfItems of the main function for a description.

Specifies the number of elements in the array.

Attribute

See Attribute of the main function for a description.

void MfuncParamArrayMilInt64 (MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_INT64 *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValuePtr

See ParamValuePtr of the main function for a description.

NumOfItems

See NumOfItems of the main function for a description.

Specifies the number of elements in the array.

Attribute

See Attribute of the main function for a description.

void MfuncParamArrayMilUint (MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_UINT *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValuePtr

See ParamValuePtr of the main function for a description.

NumOfItems

See NumOfItems of the main function for a description.

Specifies the number of elements in the array.

Attribute

See Attribute of the main function for a description.

void MfuncParamArrayMilUint32 (MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_UINT32 *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValuePtr

See ParamValuePtr of the main function for a description.

NumOfItems

See NumOfItems of the main function for a description.

Specifies the number of elements in the array.

Attribute

See Attribute of the main function for a description.

void MfuncParamArrayMilUint64 (MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_UINT64 *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValuePtr

See ParamValuePtr of the main function for a description.

NumOfItems

See NumOfItems of the main function for a description.

Specifies the number of elements in the array.

Attribute

See Attribute of the main function for a description.

void MfuncParamConstArrayMilDouble (MIL_ID ContextFuncId, MIL_INT ParamIndex, const MIL_DOUBLE *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValuePtr

See ParamValuePtr of the main function for a description.

NumOfItems

See NumOfItems of the main function for a description.

Specifies the number of elements in the array.

Attribute

See Attribute of the main function for a description.

void MfuncParamConstArrayMilId (MIL_ID ContextFuncId, MIL_INT ParamIndex, const MIL_ID *ParamValuePtr, MIL_INT NumOfItems, MIL_INT64 MilObjectType, MIL_INT Attribute)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValuePtr

See ParamValuePtr of the main function for a description.

NumOfItems

See NumOfItems of the main function for a description.

Specifies the number of elements in the array.

MilObjectType

See MilObjectType of the main function for a description.

Attribute

See Attribute of the main function for a description.

void MfuncParamConstArrayMilInt (MIL_ID ContextFuncId, MIL_INT ParamIndex, const MIL_INT *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValuePtr

See ParamValuePtr of the main function for a description.

NumOfItems

See NumOfItems of the main function for a description.

Specifies the number of elements in the array.

Attribute

See Attribute of the main function for a description.

void MfuncParamConstArrayMilInt32 (MIL_ID ContextFuncId, MIL_INT ParamIndex, const MIL_INT32 *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValuePtr

See ParamValuePtr of the main function for a description.

NumOfItems

See NumOfItems of the main function for a description.

Specifies the number of elements in the array.

Attribute

See Attribute of the main function for a description.

void MfuncParamConstArrayMilInt64 (MIL_ID ContextFuncId, MIL_INT ParamIndex, const MIL_INT64 *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValuePtr

See ParamValuePtr of the main function for a description.

NumOfItems

See NumOfItems of the main function for a description.

Specifies the number of elements in the array.

Attribute

See Attribute of the main function for a description.

void MfuncParamConstArrayMilUint (MIL_ID ContextFuncId, MIL_INT ParamIndex, const MIL_UINT *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValuePtr

See ParamValuePtr of the main function for a description.

NumOfItems

See NumOfItems of the main function for a description.

Specifies the number of elements in the array.

Attribute

See Attribute of the main function for a description.

void MfuncParamConstArrayMilUint32 (MIL_ID ContextFuncId, MIL_INT ParamIndex, const MIL_UINT32 *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValuePtr

See ParamValuePtr of the main function for a description.

NumOfItems

See NumOfItems of the main function for a description.

Specifies the number of elements in the array.

Attribute

See Attribute of the main function for a description.

void MfuncParamConstArrayMilUint64 (MIL_ID ContextFuncId, MIL_INT ParamIndex, const MIL_UINT64 *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValuePtr

See ParamValuePtr of the main function for a description.

Specifies the value of the type MIL_UINT64 parameter.

NumOfItems

See NumOfItems of the main function for a description.

Specifies the number of elements in the array.

Attribute

See Attribute of the main function for a description.

void MfuncParamConstDataPointer (MIL_ID ContextFuncId, MIL_INT ParamIndex, const void *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValuePtr

See ParamValuePtr of the main function for a description.

NumOfItems

See NumOfItems of the main function for a description.

Specifies the number of elements in the array.

Attribute

See Attribute of the main function for a description.

void MfuncParamConstMilText (MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_CONST_TEXT_PTR ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValuePtr

See ParamValuePtr of the main function for a description.

NumOfItems

See NumOfItems of the main function for a description.

Specifies the length of the string in characters, including the null terminator.

Attribute

See Attribute of the main function for a description.

void MfuncParamDataPointer (MIL_ID ContextFuncId, MIL_INT ParamIndex, void *ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValuePtr

See ParamValuePtr of the main function for a description.

NumOfItems

See NumOfItems of the main function for a description.

Specifies the size of the data, in bytes, pointed to by ParamValuePtr.

Attribute

See Attribute of the main function for a description.

void MfuncParamFilename (MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_CONST_TEXT_PTR ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValuePtr

See ParamValuePtr of the main function for a description.

NumOfItems

See NumOfItems of the main function for a description.

Specifies the length of the string in characters, including the null terminator.

Attribute

See Attribute of the main function for a description.

void MfuncParamMilDouble (MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_DOUBLE ParamValue)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValue

Specifies the value of the type MIL_DOUBLE parameter.

void MfuncParamMilId (MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_ID ParamValue, MIL_INT64 MilObjectType, MIL_INT Attribute)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValue

Specifies the value of the type MIL_ID parameter.

MilObjectType

See MilObjectType of the main function for a description.

Attribute

See Attribute of the main function for a description.

void MfuncParamMilInt (MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_INT ParamValue)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValue

Specifies the value of the type MIL_INT parameter.

void MfuncParamMilInt32 (MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_INT32 ParamValue)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValue

Specifies the value of the type MIL_INT32 parameter.

void MfuncParamMilInt64 (MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_INT64 ParamValue)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValue

Specifies the value of the type MIL_INT64 parameter.

void MfuncParamMilText (MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_TEXT_PTR ParamValuePtr, MIL_INT NumOfItems, MIL_INT Attribute)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValuePtr

See ParamValuePtr of the main function for a description.

NumOfItems

See NumOfItems of the main function for a description.

Specifies the length of the string in characters, including the null terminator.

Attribute

See Attribute of the main function for a description.

void MfuncParamMilUint (MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_UINT ParamValue)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValue

Specifies the value of the type MIL_UINT parameter.

void MfuncParamMilUint32 (MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_UINT32 ParamValue)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValue

Specifies the value of the type MIL_UINT32 parameter.

void MfuncParamMilUint64 (MIL_ID ContextFuncId, MIL_INT ParamIndex, MIL_UINT64 ParamValue)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ParamIndex

See ParamIndex of the main function for a description.

ParamValue

Specifies the value of the type MIL_UINT64 parameter.

Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll.
APPLICATION ARRAY COUNT LIST DIGITIZER DISPLAY EVENT EVENT LIST EXTREME LIST FIND ORIENTATION LIST GRAPHIC CONTEXT GRAPHIC LIST HIST LIST IM CONTEXT IMAGE KERNEL LOCATE PEAK 1D RESULT LUT PROJ LIST SEQUENCE CONTEXT STAT LIST STAT MULTIPLE RESULT STRUCT ELEMENT SYS IO CONTEXT SYSTEM WAVELET TRANSFORM RESULT 3DMAP ALIGNMENT RESULT 3DMAP DEPTH CORRECTED DATA 3DMAP GEOMETRY 3DMAP LASER CALIBRATION DATA 3DMAP LASER CONTEXT 3DMAP PAIRWISE ALIGNMENT CONTEXT 3DMAP POINT CLOUD CONTAINER 3DMAP STAT RESULT BEAD CONTEXT BEAD RESULT BLOB FEATURE LIST BLOB RESULT CAL CONTEXT CAL FIXTURING OFFSET CODE CONTEXT CODE MODEL CODE RESULT COL MATCH CONTEXT COL MATCH RESULT COL RELATIVE CALIBRATION CONTEXT EDGE CONTOUR EDGE CREST EDGE RESULT MEAS CONTEXT MEAS MARKER MEAS RESULT MET CONTEXT MET DERIVED GEOMETRY REGION MET RESULT MOD GEOMETRIC MOD GEOMETRIC CONTROLLED MOD RESULT MOD SHAPE RESULT MUTEX OCR FONT OCR RESULT PAT MODEL PAT RESULT REG EDOF CONTEXT REG EDOF RESULT REG STITCHING CONTEXT REG STITCHING RESULT SELECTABLE THREAD SHAPE CIRCLE STR CONTEXT STR RESULT THREAD USER OBJECT 1 USER OBJECT 2 PARAM TYPE MIL DOUBLE PARAM TYPE MIL INT PARAM TYPE MIL INT32 PARAM TYPE MIL INT64 PARAM TYPE MIL UINT PARAM TYPE MIL UINT32 PARAM TYPE MIL UINT64 PARAM TYPE ARRAY MIL DOUBLE IN OUT PARAM TYPE ARRAY MIL INT IN OUT PARAM TYPE ARRAY MIL INT32 IN OUT PARAM TYPE ARRAY MIL INT64 IN OUT PARAM TYPE ARRAY MIL UINT IN OUT PARAM TYPE ARRAY MIL UINT32 IN OUT PARAM TYPE ARRAY MIL UINT64 IN OUT PARAM TYPE CONST ARRAY MIL DOUBLE IN PARAM TYPE CONST ARRAY MIL INT IN PARAM TYPE CONST ARRAY MIL INT32 IN PARAM TYPE CONST ARRAY MIL INT64 IN PARAM TYPE CONST ARRAY MIL UINT IN PARAM TYPE CONST ARRAY MIL UINT32 IN PARAM TYPE CONST ARRAY MIL UINT64 IN PARAM TYPE CONST MIL TEXT DEFAULT IN PARAM TYPE FILENAME DEFAULT IN OUT PARAM TYPE MIL TEXT DEFAULT IN OUT PARAM TYPE CONST DATA PTR IN PARAM TYPE DATA PTR IN OUT PARAM TYPE ARRAY MIL ID IN OUT PARAM TYPE CONST ARRAY MIL ID IN PARAM TYPE MIL ID IN OUT ALLOW DEFAULT ID ALLOW NULL ID AS VALUE DISP GRAB PROC