| Customize Help
| Save Settings

MfuncControl



Function Map
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 using a C compiler (not a C++ or other compiler), 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 which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
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
Click to summarizeControlType Description
ControlValue
Click to summarize 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. INQ

(summarize)
Click to summarize
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.

Click to summarize M_COMPILE

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

(summarize)
Click to summarize M_MODIFIED

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

This is the default value.

(summarize)
Click to summarize M_ONCE

Specifies that the script is only compiled once.

Click to summarize M_DEBUG_INFORMATION

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

This control type is not relevant for Python. INQ

(summarize)
Click to summarize M_NO

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

This is the default value.

(summarize)
Click to summarize 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)
Click to summarize 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. INQ

(summarize)
Click to summarize
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 when using a C compiler
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