| MIL 10 Reference
| Customize Help
| Save Settings

MsysIoAlloc



See also
Availability
Available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Not supported on:
Not supported on Matrox CronosPlus
Not supported on Matrox GPU processing driver
Not supported on Matrox GigE Vision driver
Not supported on Matrox IEEE 1394 IIDC driver
Not supported on Matrox Iris GT
Not supported on Matrox Morphis
Not supported on Matrox Morphis QxT
Not supported on Matrox Orion HD
Not supported on Matrox Radient eCL
Not supported on Matrox Radient eV-CXP
Not supported on Matrox Solios eA/XA
Not supported on Matrox Solios ecl/xcl/ev-cl
Not supported on Matrox USB3 Vision driver (requires Update 19)
Not supported on Matrox Vio
Fully supported on:
Fully supported on Host system

For any information regarding a MIL system added during a MIL Update, see the MIL system’s release note

Not available on Non-Matrox computer
Not available on Matrox 4Sight-X
Not available on Matrox Supersight
Available on Matrox 4Sight GP
function map Function map
Examples
Previous
Synopsis
Allocate a MIL I/O command list.
Syntax
MIL_ID MsysIoAlloc(
MIL_ID SysId, //in
MIL_INT64 IoCmdListNum, //in
MIL_INT64 Type, //in
MIL_INT64 CounterSrc, //in
MIL_ID *IoCmdListSysIdPtr //out
)
Description

This function allocates a MIL I/O command list and initializes it. An I/O command list allows you to schedule commands to change the state of a bit of an I/O command register at a specified time or counter value. You can route the state of the bit, for example, to an auxiliary output signal to control a connected device at a required moment.

To schedule commands, the I/O command list uses an internal counter to count clock ticks or transitions that occur on a signal specified as the counter source. When allocating an I/O command list, you must specify the counter source that will be used to schedule commands. The counter source can be either a clock, which allows you to schedule commands in time, or a specified signal, which allows you to schedule commands based on the number of transitions that occur on the signal. The latter case allows you to schedule commands, for example, based on the positional information provided by the output signal of a rotary decoder. To schedule commands with the I/O command list, use MsysIoCommandRegister().

To modify or inquire I/O command list settings, use MsysIoControl() and MsysIoInquire(). When an I/O command list is no longer required, you should free it using MsysIoFree().

[Matrox-4sight-GP]

This function is only available on Matrox 4Sight GPm.

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
SysId INQ

Specifies the identifier of the MIL system on which to allocate the I/O command list.

function map For specifying the system
CollapseValue Description
MIL system-specific
tooltip (†)
Collapse M_DEFAULT_HOST

Specifies the default Host system of the current MIL application. This Host system must have been allocated on Matrox 4Sight GPm.

(summarize)
a
Collapse MIL system identifier

Specifies a valid system identifier, previously allocated using MsysAlloc().

[Matrox 4Sight GP]

The system must be a Host system allocated on the Matrox 4Sight GPm platform.

(summarize)
a
IoCmdListNum INQ

Specifies the index of the I/O command list to allocate. Note that you cannot allocate a command list with the same index as one that has already been allocated. This parameter can be set to one of the following values:

function map For specifying the I/O command list's index
CollapseValue Description
MIL system-specific
tooltip (†)
Collapse M_DEFAULT

Same as M_IO_COMMAND_LIST1.

a
Collapse M_IO_COMMAND_LIST1

Allocates the first I/O command list.

a
Collapse M_IO_COMMAND_LIST2

Allocates the second I/O command list.

a
Type INQ

Specifies the type of I/O command list to allocate. This parameter can be set to the following value:

function map For specifying the type of I/O command list
CollapseValue Description
MIL system-specific
tooltip (†)
Collapse M_IO_COMMAND_LIST

Specifies a general I/O command list.

a
CounterSrc INQ

Specifies the signal to use as the counter source. The counter source will affect the units that you should use to specify, for example, when a registered command should be executed (MsysIoCommandRegister()). This parameter can be set to one of the following values:

function map For specifying the counter source
CollapseValue Description
MIL system-specific
tooltip (†)
Collapse M_DEFAULT

Same as M_CLOCK.

a
Collapse M_AUX_IOn

Specifies to use auxiliary input signal n as the counter source, where n is the number for one of the auxiliary input signals. When specifying this counter source, schedule commands in terms of number of transitions that occur on the input signal. To change which signal transition will increment the counter, use MsysIoControl() with M_IO_COMMAND_COUNTER_ACTIVATION (by default, it is set to low-to-high transitions).

[Matrox 4Sight GP]

For the Matrox 4Sight GPm, n can be a value from 8 to 15.

(summarize)
a
Collapse M_CLOCK

Specifies to use your hardware's clock signal as a counter source. When specifying this counter source, schedule commands in terms of seconds.

The specified number of seconds will be internally converted to the same units as the clock. To inquire the frequency of the clock signal, use MsysIoInquire() with M_CLOCK_FREQUENCY.

(summarize)
a
Collapse M_ROTARY_ENCODERn

Specifies to use the output of rotary decoder n as the counter source, where n is the number of the rotary decoder. When specifying this counter source, schedule commands in terms of number of transitions that occur on the rotary decoder's output signal (MsysControl() with M_ROTARY_ENCODER_OUTPUT_MODE).

[Matrox 4Sight GP]

For the Matrox 4Sight GPm, n can be either 1 or 2.

(summarize)
a
IoCmdListSysIdPtr

Specifies the address of the variable in which to write the I/O command list identifier. Since the MsysIoAlloc() function also returns the I/O command list identifier, you can set this parameter to M_NULL.

If allocation is successful, the I/O command list's identifier is written into the variable. If allocation fails, M_NULL is written into the variable.

Return value
The returned value is the I/O command list identifier if the allocation is successful. If allocation fails, M_NULL is returned.
Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll.
DEFAULT HOST DEFAULT IO COMMAND LIST1 IO COMMAND LIST2 IO COMMAND LIST DEFAULT AUX IOn CLOCK ROTARY ENCODERn