| Customize Help
| Save Settings

MsysIoAlloc



Function Map
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/GPm]

On a Matrox 4Sight GPm computer, this function is only available if a MIL Host system was previously allocated. It is not available on a Matrox 4Sight GP.

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
Click to summarizeValue Description MIL system-specific
tooltip (‡)
Click to summarize M_DEFAULT_HOST

Specifies the default Host system of the current MIL application.

a
Click to summarize MIL system identifier

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

(summarize)
a t
U28
w
U53
z
MIL system specific
[This is only applicable to Matrox 4Sight GP/GPm platform]

On a Matrox 4Sight GPm computer, this function is only available if a MIL Host system was previously allocated. It is not available on a Matrox 4Sight GP.

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
Click to summarizeValue Description MIL system-specific
tooltip (‡)
Click to summarize M_DEFAULT

Same as M_IO_COMMAND_LIST1.

a t
U28
w
U53
z
Click to summarize M_IO_COMMAND_LIST1

Allocates the first I/O command list.

a t
U28
w
U53
z
Click to summarize M_IO_COMMAND_LIST2

Allocates the second I/O command list.

a w
U53
z
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
Click to summarizeValue Description MIL system-specific
tooltip (‡)
Click to summarize M_IO_COMMAND_LIST

Specifies a general I/O command list.

a t
U28
w
U53
z
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
Click to summarizeValue Description MIL system-specific
tooltip (‡)
Click to summarize M_DEFAULT

Same as M_CLOCK.

a t
U28
w
U53
z
Click to summarize 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).

(summarize)
a t
U28
w
U53
z
MIL system specific
[This is only applicable to Matrox 4Sight GP/GPm platform]

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

a

For the Matrox Indio, n can be a value from 8 to 15.

w
U53

For the Matrox Concord PoE, n can be a value from 2 to 7.

z

For the Matrox Iris GTR, n can be a value from 3 to 6.

t
U28
Click to summarize 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 t
U28
w
U53
z
Click to summarize 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).

(summarize)
a t
U28
w
U53
z
MIL system specific
[This is only applicable to Matrox 4Sight GP/GPm platform]

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

a

For the Matrox Iris GTR, n must be 1.

t
U28

For the Matrox Concord PoE, n can be either 1 or 2.

z

For the Matrox Indio, n can be either 1 or 2.

w
U53
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 M_AUX_IOn M_ROTARY_ENCODERn