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.
This function is only available on Matrox 4Sight GPm.
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 | ||||||||||||||||||||||||||||||||||||
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 | ||||||||||||||||||||||||||||||||||||
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. (more details...) |
† | a | ||||||||||||||||||||||||||||||||||||
M_NONE |
Specifies no operation is performed. (more details...) |
† | a | ||||||||||||||||||||||||||||||||||||
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. (more details...) |
† | a | ||||||||||||||||||||||||||||||||||||
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. (more details...) |
† | 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_REFERENCE_VALUE_CURRENT |
Specifies to schedule the command relative to the current moment (that is, the moment MsysIoCommandRegister() is called). |
† | a | ||||||||||||||||||||||||||||||||||||
Value |
Specifies the time or counter value relative to which to schedule the command. (more details...) |
† | a |
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 with M_CLOCK as the counter source, specify the delay in seconds. Otherwise, specify it in number of counter increments.
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. (more details...) |
† | a |
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 | ||||||||||||||||||||||||||||||||||||
M_INVALID |
Specifies that the moment at which to execute the command had elapsed when the function was executed. |
† | a | ||||||||||||||||||||||||||||||||||||
M_UNKNOWN |
Specifies that the function encountered an error and could not schedule the command. |
† | a |
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |