MIL_ID IoCmdListSysId, | //in |
MIL_INT64 Operation, | //in |
MIL_INT64 Reference, | //in |
MIL_DOUBLE DelayFromReference, | //in |
MIL_DOUBLE Duration, | //in |
MIL_INT64 BitToOperate, | //in |
void *CommandStatusPtr | //out |
This function adds (registers) a command to the I/O command list to change the state of a specified bit of the I/O command register at a specified moment (time or counter value). To route the state of an I/O command register bit to an output signal, use MsysControl() with M_IO_SOURCE before you change the state of the bit.
When adding a command, you must specify when it must be executed. If the command list was allocated using MsysIoAlloc() with M_CLOCK, specify the time at which to execute the command in seconds after a specified reference time; otherwise, specify it in number of counter increments after a specified reference counter value. For example, if you want to execute a command 50 msecs after the moment MsysIoCommandRegister() is called, you would specify M_REFERENCE_VALUE_CURRENT as the reference time and 0.05 seconds as the amount of time after this reference time to execute the command.
When adding a command to change an I/O command register bit such that a pulse is generated on the associated signal, two commands are actually added; one command to transition the signal at the specified moment and one command to transition the signal back to its original state after the specified pulse duration. Note that if you want to specify the duration of the pulse in seconds, but MsysIoAlloc() with M_CLOCK is not set as the counter source, use a timer to generate the pulse and the I/O command list to trigger the timer (generation of the pulse); schedule an M_IMPULSE command instead and use the affected I/O command register bit as the trigger source of the timer.
Multiple commands can be scheduled to execute at the same time or counter value, as long as the commands are affecting different I/O command register bits. If a command has been registered with the I/O command list to affect a specific I/O command register bit, and you attempt to add a different command to affect the same bit at the same specified time or counter value, the original command will be overwritten.
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.
Specifies the command to add to the I/O command list to change the state of the specified I/O command register bit. This parameter can be set to one of the following values:
For specifying the command to register
|
|||||||||||||||||||||||||||||||||||||||
Value | Description |
MIL system-specific tooltip (‡) |
|||||||||||||||||||||||||||||||||||||
M_EDGE_FALLING + |
Specifies that the command will change the specified bit such that the associated signal will transition from high to low, if it is high. |
‡ | a | t U28 |
w U53 |
z | |||||||||||||||||||||||||||||||||
M_EDGE_RISING + |
Specifies that the command will change the specified bit such that the associated signal will transition from low to high, if it is low. |
‡ | a | t U28 |
w U53 |
z | |||||||||||||||||||||||||||||||||
M_IMPULSE + |
Specifies the command will change the specified bit such that the associated signal will produce the shortest possible active-high pulse on the specified I/O command list bit. An active-high pulse is a low-to-high signal transition followed by a high-to-low signal transition. Unlike M_PULSE_HIGH, the Duration parameter must be set to M_DEFAULT and a single command producing the shortest possible pulse is generated. This operation should not be output to external devices since it might be filtered out as noise. It can, however, be used to trigger internal hardware devices, such as timers. (summarize)Specifies the command will change the specified bit such that the associated signal will produce the shortest possible active-high pulse on the specified I/O command list bit. (more details...) |
‡ | a | t U28 |
w U53 |
z | |||||||||||||||||||||||||||||||||
M_NONE + |
Specifies no operation is performed. This operation can be used to cancel a command previously added to the I/O command list. (summarize)Specifies no operation is performed. (more details...) |
‡ | a | t U28 |
w U53 |
z | |||||||||||||||||||||||||||||||||
M_PULSE_HIGH + |
Specifies to add two commands to the I/O command list, an M_EDGE_RISING and an M_EDGE_FALLING command, to change the specified bit such that the associated signal will produce an active-high pulse. An active-high pulse is a low-to-high signal transition followed by a high-to-low signal transition; specify the length of the pulse using the Duration parameter. Note that if the signal is already high, it will remain high for the specified duration and then transition to low (unless a command is added to transition it to low earlier). (summarize)Specifies to add two commands to the I/O command list, an M_EDGE_RISING and an M_EDGE_FALLING command, to change the specified bit such that the associated signal will produce an active-high pulse. (more details...) |
‡ | a | t U28 |
w U53 |
z | |||||||||||||||||||||||||||||||||
M_PULSE_LOW + |
Specifies to add two commands to the I/O command list, an M_EDGE_FALLING and an M_EDGE_RISING command, to change the specified bit such that the associated signal will produce an active-low pulse. An active-low pulse is a high-to-low signal transition followed by a low-to-high signal transition; specify the length of the pulse using the Duration parameter. Note that if the signal is already low, it will remain low for the specified duration and then transition to high (unless a command is added to transition it to high earlier). (summarize)Specifies to add two commands to the I/O command list, an M_EDGE_FALLING and an M_EDGE_RISING command, to change the specified bit such that the associated signal will produce an active-low pulse. (more details...) |
‡ | a | t U28 |
w U53 |
z |
You can add one of the following values to the above-mentioned values to specify that the operation will be automatically added to the I/O command list upon the change of an I/O command register.
For automatically adding operations to the I/O
command list
|
|||||||||||||||||||||||||||||||||||||||
Combination value | Description |
MIL system-specific tooltip (‡) |
|||||||||||||||||||||||||||||||||||||
M_AUTO_REGISTER |
Specifies to automatically add the specified command to the I/O command list every time the latch used as a reference ( M_LATCHn) is triggered. (summarize)Specifies to automatically add the specified command to the I/O command list every time the latch used as a reference ( M_LATCHn) is triggered. (more details...) |
‡ | a | t U28 |
w U53 |
z | |||||||||||||||||||||||||||||||||
MIL system specific | |||||||||||||||||||||||||||||||||||||||
[This is
only applicable to Matrox 4Sight GP/GPm platform]
On a Matrox 4Sight GPm platform, this value is only available if MIL 10 update 51 (or later) is installed. It is not available on a Matrox 4Sight GP. |
‡ | a | |||||||||||||||||||||||||||||||||||||
M_AUTO_REGISTER_CANCEL |
Specifies to stop automatically adding the specified command to the I/O command list every time the latch used as a reference ( M_LATCHn) is triggered. (summarize)Specifies to stop automatically adding the specified command to the I/O command list every time the latch used as a reference ( M_LATCHn) is triggered. (more details...) |
‡ | a | t U28 |
w U53 |
z | |||||||||||||||||||||||||||||||||
MIL system specific | |||||||||||||||||||||||||||||||||||||||
[This is
only applicable to Matrox 4Sight GP/GPm platform]
On a Matrox 4Sight GPm platform, this value is only available if MIL 10 update 51 (or later) is installed. It is not available on a Matrox 4Sight GP. |
‡ | a |
Specifies the reference time or counter value to which the delay is added. This parameter can be set to one of the following values:
For specifying the reference timestamp
|
|||||||||||||||||||||||||||||||||||||||
Value | Description |
MIL system-specific tooltip (‡) |
|||||||||||||||||||||||||||||||||||||
M_LATCHn |
Specifies to schedule the operation relative to the current value of reference latch n, where n is a number from 1 to 4. Note that M_LATCHn must be used with either M_AUTO_REGISTER or M_AUTO_REGISTER_CANCEL. (summarize)Specifies to schedule the operation relative to the current value of reference latch n, where n is a number from 1 to 4. (more details...) |
‡ | a | t U28 |
w U53 |
z | |||||||||||||||||||||||||||||||||
MIL system specific | |||||||||||||||||||||||||||||||||||||||
[This is
only applicable to Matrox 4Sight GP/GPm platform]
This is only available on Matrox 4Sight GPm, where n is a number from 1 to 4. |
‡ | a | |||||||||||||||||||||||||||||||||||||
For the Matrox Iris GTR, n can be a value from 1 to 2. |
‡ | t U28 |
|||||||||||||||||||||||||||||||||||||
For the Matrox Concord PoE, n can be a value from 1 to 4. |
‡ | z | |||||||||||||||||||||||||||||||||||||
For the Matrox Concord Indio, n can be a value from 1 to 4. |
‡ | w U53 |
|||||||||||||||||||||||||||||||||||||
M_REFERENCE_VALUE_CURRENT |
Specifies to schedule the command relative to the current moment (that is, the moment MsysIoCommandRegister() is called). |
‡ | a | t U28 |
w U53 |
z | |||||||||||||||||||||||||||||||||
Value |
Specifies the time or counter value relative to which to schedule the command. This is typically a previously inquired time or counter value. You can inquire the time or counter value at a specific moment during the execution of your program using MsysIoInquire() with M_REFERENCE_VALUE. Additionally, if using a latch that has previously saved the time or counter value upon a hardware event, you can inquire this using MsysIoInquire() with M_REFERENCE_LATCH_VALUE or within the scope of a system hook-handler function using MsysGetHookInfo() with M_REFERENCE_LATCH_VALUE. (summarize)Specifies the time or counter value relative to which to schedule the command. (more details...) |
‡ | a | t U28 |
w U53 |
z |
Specifies the delay to add to the reference time or counter value; the sum of the two establishes the specific moment that the command is executed. If the I/O command list was allocated using MsysIoAlloc() with M_CLOCK as the counter source, specify the delay in seconds. Otherwise, specify it in number of counter increments.
Note that, if the command list was allocated for an M_CLOCK operation and commands are set to M_AUTO_REGISTER, this parameter's value should be at least twice the clock period. To learn the length of the clock period (in Hz), use MsysIoInquire() with M_CLOCK_FREQUENCY.
Specifies the duration of the pulse if the command specified with Operation is M_PULSE_HIGH or M_PULSE_LOW. If the I/O command list was allocated with M_CLOCK as the counter source, specify the delay in seconds. Otherwise, specify it in number of counter increments. When adding other types of commands, set this parameter to M_DEFAULT.
Specifies the bit of the I/O command register to affect with the command. This parameter can be set to the following value:
For specifying the bit of the I/O command register to
operate
|
|||||||||||||||||||||||||||||||||||||||
Value | Description |
MIL system-specific tooltip (‡) |
|||||||||||||||||||||||||||||||||||||
M_IO_COMMAND_BITn |
Specifies that the command must affect bit n of the I/O command register, where n can be a value of 0 to 7. Note that, if you need to route the state of the bit to an auxiliary signal, use MsysControl() with M_IO_SOURCE before you change the state of the bit. When performing multiple automatically registered operations (using M_AUTO_REGISTER), each automatically registered operation must affect a unique I/O command register bit; otherwise, the last automatically registered operation will override the previous that affects the same register bit. (summarize)Specifies that the command must affect bit n of the I/O command register, where n can be a value of 0 to 7. (more details...) |
‡ | a | t U28 |
w U53 |
z | |||||||||||||||||||||||||||||||||
MIL system specific | |||||||||||||||||||||||||||||||||||||||
For the Matrox Iris GTR, n can be a value from 0 to 3. |
‡ | t U28 |
Data type: address of a MIL_INT
Specifies the address in which to write whether the command was successfully added to the list. You can set this parameter to M_NULL if this information is not required.
This parameter can return one of the following values:
For returning the status of the command
registration
|
|||||||||||||||||||||||||||||||||||||||
Value | Description |
MIL system-specific tooltip (‡) |
|||||||||||||||||||||||||||||||||||||
M_NULL |
Specifies that the function successfully scheduled the command. |
‡ | a | t U28 |
w U53 |
z | |||||||||||||||||||||||||||||||||
M_INVALID |
Specifies that the moment at which to execute the command had elapsed when the function was executed. |
‡ | a | t U28 |
w U53 |
z | |||||||||||||||||||||||||||||||||
M_UNKNOWN |
Specifies that the function encountered an error and could not schedule the command. |
‡ | a | t U28 |
w U53 |
z |
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |