| MIL 10 Reference
| Customize Help
| Save Settings

MfuncControl



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
Control a user-defined MIL function context.
Syntax
void MfuncControl(
MIL_ID ContextFuncId, //in
MIL_INT64 ControlType, //in
MIL_DOUBLE ControlValue //in
)
Description

This function allows you to control the specified user-defined MIL function context.

Note that when compiling C code, it is suggested to use the type-specific versions of this particular function, rather than the standard function prototype at the top of this page. An exhaustive list of type-specific versions of this function can be found at the bottom of this page.
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 context. Depending on the control type, the context must have been allocated using a specific MIL allocation function.

ControlType

Specifies the user-defined MIL function context setting to control.

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

ControlValue

Specifies the setting's new value.

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

The table below lists possible values for the ControlType and ControlValue parameters.

The following ControlType and ControlValue parameter settings can be specified when the function context being controlled is a script-based user-defined MIL function context allocated using MfuncAllocScript().

function map For script-based user-defined MIL functions
CollapseControlType Description
ControlValue
Collapse M_ADD_SCRIPT_REFERENCE

Adds the specified DLL to the list of DLLs that are referred to during runtime.

This control type is not relevant for Python.

(summarize)
Collapse
M_PTR_TO_DOUBLE(
MIL_CONST_TEXT_PTR * String
)

Casts the address of the string identifying the path and file name of the DLL, from a MIL_CONST_TEXT_PTR to a MIL_DOUBLE.

(summarize)
Parameters

This parameter specifies the string whose address to cast.

MIL_TEXT("String") 1

Specifies the path and file name of the DLL your script/function requires to run.

Collapse M_COMPILE

Sets when the script is reloaded from disk and recompiled. INQ

(summarize)
Collapse M_MODIFIED

Specifies that the script is recompiled only if the file on disk has changed.

This is the default value.

(summarize)
Collapse M_ONCE

Specifies that the script is only compiled once.

Collapse M_DEBUG_INFORMATION

Sets if the interpreter interface DLL must generate debug information for the script.

This control type is not relevant for Python.

(summarize)
Collapse M_NO

Specifies that the script is compiled in release mode, using optimization flags.

This is the default value.

(summarize)
Collapse M_YES

Specifies that the script is compiled in debug mode, and that the necessary debug information is generated. When choosing this control value, you must specifiy the directory in which to save the debug information using the M_DEBUG_INFORMATION_PATH control type.

(summarize)
Collapse M_DEBUG_INFORMATION_PATH

Sets the path of the directory in which the compiled version of the script and other files are created, if they are relevant for the scripting language.

This control type is not relevant for Python.

(summarize)
Collapse
M_PTR_TO_DOUBLE(
MIL_CONST_TEXT_PTR * String
)

Casts the address of the string identifying the path, from a MIL_CONST_TEXT_PTR to a MIL_DOUBLE.

(summarize)
Parameters

This parameter specifies the string whose address to cast.

MIL_TEXT("String") 1

Specifies the path of the directory in which the debug information will be stored. This is also the directory in which the compiled version of the script is created.

The compiled version of the script (assembly file) will only be created in the specified directory if you choose to generate debug information using M_DEBUG_INFORMATION.

1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().

Type-specific versions of the function
void MfuncControlInt64 (MIL_ID ContextFuncId, MIL_INT64 ControlType, MIL_INT64 ControlValue)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ControlType

See ControlType of the main function for a description.

ControlValue

See ControlValue of the main function for a description.

void MfuncControlDouble (MIL_ID ContextFuncId, MIL_INT64 ControlType, MIL_DOUBLE ControlValue)
Parameters

ContextFuncId

See ContextFuncId of the main function for a description.

ControlType

See ControlType of the main function for a description.

ControlValue

See ControlValue of the main function for a description.

Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll.
ADD SCRIPT REFERENCE COMPILE MODIFIED ONCE DEBUG INFORMATION NO YES DEBUG INFORMATION PATH