Synopsis
Control the specified digitizer.
Format
void MdigControl(DigId, ControlType, Value)
MIL_ID DigId; | Digitizer identifier |
long ControlType; | Control Type |
double ControlValue; | Control value |
Description
This function allows you to control various aspects of the digitizer.
The DigId parameter specifies the identifier of the digitizer.
The ControlType parameter specifies the digitizer feature to control. The following control types are available.
ControlType | Description |
M_GRAB_SCALE | Control the vertical and horizontal scaling factors when grabbing data with MdigGrab or MdigGrabContinuous. |
M_GRAB_SCALE_X | Control the horizontal scaling factor when grabbing data with MdigGrab or MdigGrabContinuous. |
M_GRAB_SCALE_Y | Control the vertical scaling factor when grabbing data with MdigGrab or MdigGrabContinuous. |
M_GRAB_MODE | Control the synchronization when grabbing data with MdigGrab . |
M_GRAB_FIELD_NUM | Control the number of fields to grab when grabbing data with MdigGrab. |
M_GRAB_FRAME_NUM | Control the number of frames to grab when grabbing data with MdigGrab. |
M_GRAB_START_MODE | Set the grab start mode to odd, even or any field: M_FIELD_START_ODD, M_FIELD_START_EVEN (M_DEFAULT), or M_FIELD_START. |
M_GRAB_HALT_ON_NEXT_FIELD | Stop grabbing as soon as possible, whether the last frame is valid or not. M_ENABLE, M_DISABLE or M_DEFAULT (same as M_DISABLE). |
M_GRAB_TRIGGER_SOURCE | Set the source of the grab trigger. |
M_GRAB_TRIGGER_MODE | Set the hardware trigger activation mode. |
M_GRAB_TRIGGER | Set the grab trigger detection state: M_DEFAULT, M_ENABLE, M_DISABLE, or M_ACTIVATE. |
* Note: If using a software trigger, M_ACTIVATE starts a grab immediately; if using a hardware trigger, M_DISABLE temporarily stops a continuous grab.
M_SOURCE_SIZE_X | Set the width of the input signal capture window. |
M_SOURCE_SIZE_Y | Set the height of the input signal capture window. |
M_SOURCE_OFFSET_X | Set the X offset of the input signal capture window. |
M_SOURCE_OFFSET_Y | Set the Y offset of the input signal capture window. |
The ControlValue parameter specifies the value associated with the specified control type:
- For the scaling-control types (M_GRAB_SCALE…), ControlValue specifies the scaling factor (reduction or enlargement). Typically, supported values are 0.25, 0.5, and 1.0. For example, if ControlValue is set to 0.5 for the M_GRAB_SCALE_X control type, the source image is reduced by a factor of two, and only every second column is written to the image buffers, starting from the left. If ControlValue is set to M_FILL_DESTINATION, the scaling factor is calculated to fill the destination buffer, if the hardware supports it. If ControlValue is set to M_FILL_DISPLAY, the scaling factor is 1 but, during a continuous grab operation with the buffer selected on the display, the grab is scaled to fit the size of the display, if the hardware supports it.
- For the M_GRAB_MODE control type, ControlValue can be set to either:
M_SYNCHRONOUS (default) |
Synchronize your application with the end of a grab operation (i.e., wait until a grab has finished before returning from the grab command). |
M_ASYNCHRONOUS | Do not synchronize your application with the end of a grab operation, but return immediately after initiating the grab start. |
Note, if in M_ASYNCHRONOUS mode, you can use MdigGrabWait to force your application to wait until a grab in progress has finished.
- For ControlType M_GRAB_FIELD_NUM or M_GRAB_FRAME_NUM, ControlValue specifies the number of fields or frames, respectively, to grab.
- For ControlType M_GRAB_TRIGGER, ControlValue can be set to:
M_ENABLE | Enable trigger detection. |
M_DISABLE | Disable trigger detection. |
M_DEFAULT | The trigger state from the .dcf file or, if none, M_DISABLE. |
M_ACTIVATE | Start the grab immediately (for software trigger). |
{bmc bm1.BMP} For ControlType M_GRAB_TRIGGER_SOURCE, ControlValue can be set to:
M_NULL | The trigger is inactive. |
M_DEFAULT | Same as .dcf (if any) or M_NULL. |
M_SOFTWARE | Use software trigger. |
M_HARDWARE_PORT0 | Use hardware trigger connected to port 0. (the most common connection for analog) |
M_HARDWARE_PORT1 | Use hardware trigger connected to port 1. (the most common connection for digital) |
M_HARDWARE_PORT_CAMERA | Use hardware trigger connected to the same port as the selected camera (MIL-determined). |
M_HSYNC | Trigger on each hsync signal. |
M_VSYNC | Trigger on each vsync signal. |
M_TIMER1 | Trigger on timer 1 signal. |
- For ControlType M_GRAB_TRIGGER_MODE, when using a hardware trigger, ControlValue can be set to:
M_EDGE_RISING | Low to high signal variation (valid with exposure) |
M_EDGE_FALLING | High to low signal variation (valid with exposure ) |
M_LEVEL_LOW | Minimum signal level (not valid with exposure) |
M_LEVEL_HIGH | Maximum signal level (not valid with exposure) |
M_DEFAULT | The trigger mode in the .dcf file or, if none, M_EDGE_RISING. |
See also
Thanks. A lot of facts!
diflucan