![]() |
IDS peak comfortC v1.13.0
|
An IO channel refers to the physical line through which the camera communicates with other devices for input and output operations. IO channels are used to synchronize operations, and control functions like triggering, flashing or indicating custom states. More...
Enumerations | |
| enum | peak_io_channel { PEAK_IO_CHANNEL_INVALID , PEAK_IO_CHANNEL_NONE , PEAK_IO_CHANNEL_SOFTWARE , PEAK_IO_CHANNEL_TRIGGER_INPUT , PEAK_IO_CHANNEL_FLASH_OUTPUT , PEAK_IO_CHANNEL_GPIO_1 , PEAK_IO_CHANNEL_GPIO_2 , PEAK_IO_CHANNEL_LINE_0 , PEAK_IO_CHANNEL_LINE_1 , PEAK_IO_CHANNEL_LINE_2 , PEAK_IO_CHANNEL_LINE_3 , PEAK_IO_CHANNEL_LINE_4 , PEAK_IO_CHANNEL_LINE_5 , PEAK_IO_CHANNEL_LINE_6 , PEAK_IO_CHANNEL_LINE_7 } |
| peak IO channel More... | |
| enum | peak_io_direction { PEAK_IO_DIRECTION_UNKNOWN , PEAK_IO_DIRECTION_INPUT , PEAK_IO_DIRECTION_OUTPUT , PEAK_IO_DIRECTION_ANY } |
| peak IO channel direction More... | |
| enum | peak_io_type { PEAK_IO_TYPE_INVALID , PEAK_IO_TYPE_UNKNOWN , PEAK_IO_TYPE_TRI_STATE , PEAK_IO_TYPE_OPTO_COUPLED , PEAK_IO_TYPE_LVTTL } |
| peak IO channel type More... | |
Functions | |
| peak_access_status | peak_IOChannel_GetAccessStatus (peak_camera_handle hCam, peak_io_channel ioChannel) |
| Query the io channel access status. | |
| peak_status | peak_IOChannel_GetListForDirection (peak_camera_handle hCam, peak_io_direction direction, peak_io_channel *ioChannelList, size_t *ioChannelCount) |
| Get the list of supported io channels for the given direction. | |
| peak_access_status | peak_IOChannel_Direction_GetAccessStatus (peak_camera_handle hCam, peak_io_channel ioChannel) |
| Query the io channel direction property access status. | |
| peak_status | peak_IOChannel_Direction_Get (peak_camera_handle hCam, peak_io_channel ioChannel, peak_io_direction *direction) |
| Get the io channel direction. | |
| peak_access_status | peak_IOChannel_Type_GetAccessStatus (peak_camera_handle hCam, peak_io_channel ioChannel) |
| Query the io channel type property access status. | |
| peak_status | peak_IOChannel_Type_Get (peak_camera_handle hCam, peak_io_channel ioChannel, peak_io_type *type) |
| Get the io channel type. | |
| peak_access_status | peak_IOChannel_Level_GetAccessStatus (peak_camera_handle hCam, peak_io_channel ioChannel) |
| Query the io channel level property access status. | |
| peak_bool | peak_IOChannel_Level_IsHigh (peak_camera_handle hCam, peak_io_channel ioChannel) |
| Get the level of the io channel. | |
| peak_status | peak_IOChannel_Level_SetHigh (peak_camera_handle hCam, peak_io_channel ioChannel, peak_bool high) |
| Set the io channel level. | |
| peak_access_status | peak_IOChannel_Inverter_GetAccessStatus (peak_camera_handle hCam, peak_io_channel ioChannel) |
| Query the io channel inverter property access status. | |
| peak_status | peak_IOChannel_Inverter_Enable (peak_camera_handle hCam, peak_io_channel ioChannel, peak_bool enabled) |
| Enable/Disable the io channel inverter property. | |
| peak_bool | peak_IOChannel_Inverter_IsEnabled (peak_camera_handle hCam, peak_io_channel ioChannel) |
| Get the enabled status of the io channel inverter property. | |
| peak_access_status | peak_IOChannel_NoiseFilter_GetAccessStatus (peak_camera_handle hCam, peak_io_channel ioChannel) |
| Query the io channel noise filter property access status. | |
| peak_status | peak_IOChannel_NoiseFilter_Enable (peak_camera_handle hCam, peak_io_channel ioChannel, peak_bool enabled) |
| Enable/Disable the io channel noise filter property. | |
| peak_bool | peak_IOChannel_NoiseFilter_IsEnabled (peak_camera_handle hCam, peak_io_channel ioChannel) |
| Get the enabled status of the io channel noise filter property. | |
| peak_status | peak_IOChannel_NoiseFilter_Duration_GetRange (peak_camera_handle hCam, peak_io_channel ioChannel, double *minNoiseFilterDuration_us, double *maxNoiseFilterDuration_us, double *incNoiseFilterDuration_us) |
| Get the current range of valid io channel noise filter duration values. | |
| peak_status | peak_IOChannel_NoiseFilter_Duration_Set (peak_camera_handle hCam, peak_io_channel ioChannel, double noiseFilterDuration_us) |
| Set the io channel noise filter duration. | |
| peak_status | peak_IOChannel_NoiseFilter_Duration_Get (peak_camera_handle hCam, peak_io_channel ioChannel, double *noiseFilterDuration_us) |
| Get the io channel noise filter duration. | |
An IO channel refers to the physical line through which the camera communicates with other devices for input and output operations. IO channels are used to synchronize operations, and control functions like triggering, flashing or indicating custom states.
IO channels can have different electrical formats, such as Tri-State, opto-coupled, or LVTTL. The type of the format may vary across different channels, depending on the camera model.
The following sample code shows how to query a list of all IO channels and determine the direction for each channel.
The IO channel of a camera can serve as a trigger input, flash output, or to indicate a user-defined level (see example below).
The example code below demonstrates how to read the current level of a specific IO channel and set it to HIGH.
Additional configuration options for the IO channel include a noise filter to debounce noisy signals and a signal inverter.
The following example code shows how to query the noise filter duration for a specific IO channel, set it to its minimum value and then enable the noise filter.
| enum peak_io_channel |
peak IO channel
The io channel specifies the channel at which a certain signal or event is received or transmitted. It is used for several features like trigger and flash.
Not all channels are applicable for all features.
| Enumerator | |
|---|---|
| PEAK_IO_CHANNEL_INVALID | Invalid io channel. Use this value for the initialization of variables of type peak_io_channel. |
| PEAK_IO_CHANNEL_NONE | None. No channel configured. |
| PEAK_IO_CHANNEL_SOFTWARE | Software. The signal or event is initiated by a software function. |
| PEAK_IO_CHANNEL_LINE_0 | Line 0. The signal or event is initiated by an electrical signal at the cameras Line 0 connector. Refer to the camera datasheet for a specific pinout overview. |
| PEAK_IO_CHANNEL_LINE_1 | Line 1. The signal or event is initiated by an electrical signal at the cameras Line 1 connector. Refer to the camera datasheet for a specific pinout overview. |
| PEAK_IO_CHANNEL_LINE_2 | Line 2. The signal or event is initiated by an electrical signal at the cameras Line 2 connector. Refer to the camera datasheet for a specific pinout overview. |
| PEAK_IO_CHANNEL_LINE_3 | Line 3. The signal or event is initiated by an electrical signal at the cameras Line 3 connector. Refer to the camera datasheet for a specific pinout overview. |
| PEAK_IO_CHANNEL_LINE_4 | Line 4. The signal or event is initiated by an electrical signal at the cameras Line 4 connector. Refer to the camera datasheet for a specific pinout overview. |
| PEAK_IO_CHANNEL_LINE_5 | Line 5. The signal or event is initiated by an electrical signal at the cameras Line 5 connector. Refer to the camera datasheet for a specific pinout overview. |
| PEAK_IO_CHANNEL_LINE_6 | Line 6. The signal or event is initiated by an electrical signal at the cameras Line 6 connector. Refer to the camera datasheet for a specific pinout overview. |
| PEAK_IO_CHANNEL_LINE_7 | Line 7. The signal or event is initiated by an electrical signal at the cameras Line 7 connector. Refer to the camera datasheet for a specific pinout overview. |
| enum peak_io_direction |
peak IO channel direction
The io channel direction specifies the flow of the signal. An io channel can either be
If configurable, the channel direction is set automatically to input when calling peak_Trigger_Enable, or to output when calling peak_IOChannel_Level_SetHigh or peak_Flash_Enable.
| Enumerator | |
|---|---|
| PEAK_IO_DIRECTION_UNKNOWN | Unknown io direction. Use this value for the initialization of variables of type peak_io_direction. |
| PEAK_IO_DIRECTION_INPUT | Input. The io channel is used / usable as input. |
| PEAK_IO_DIRECTION_OUTPUT | Output. The io channel is used / usable as output. |
| PEAK_IO_DIRECTION_ANY | Input or Output. The io channel is used / usable as input and / or output respectively. |
| enum peak_io_type |
peak IO channel type
The io channel type specifies the electrical format of the physical line. An io channel type can either be
The type may vary across different channels, depending on the camera model.
| Enumerator | |
|---|---|
| PEAK_IO_TYPE_INVALID | Invalid io type. Use this value for the initialization of variables of type peak_io_type. |
| PEAK_IO_TYPE_UNKNOWN | Unknown io type. The type of the io channel is unknown. |
| PEAK_IO_TYPE_TRI_STATE | Invalid io type. The io channel is currently in Tri-State mode (not driven). |
| PEAK_IO_TYPE_OPTO_COUPLED | Invalid io type. The line is galvanically isolated using an optocoupler to protect the camera and the PC against surges. Only DC voltages may be applied to the physical lines or pins. |
| PEAK_IO_TYPE_LVTTL | Invalid io type. The line is currently accepting or sending LVTTL level signals. |
| peak_status peak_IOChannel_Direction_Get | ( | peak_camera_handle | hCam, |
| peak_io_channel | ioChannel, | ||
| peak_io_direction * | direction ) |
Get the io channel direction.
Reads the current direction for the specified io channel.
| [in] | hCam | The camera handle. |
| [in] | ioChannel | The io channel. |
| [out] | direction | The direction. |
direction is an invalid pointer or ioChannel is an invalid channel. hCam is an invalid camera handle. | peak_access_status peak_IOChannel_Direction_GetAccessStatus | ( | peak_camera_handle | hCam, |
| peak_io_channel | ioChannel ) |
Query the io channel direction property access status.
Provides the current access status for the direction property for the specified io channel.
This function implements the Access Status Query principle.
| [in] | hCam | The camera handle. |
| [in] | ioChannel | The io channel. |
If the function indicates an error by returning PEAK_ACCESS_INVALID, these are the possible errors:
ioChannel is an invalid io channel. Check peak_io_channel. hCam is an invalid camera handle. | peak_access_status peak_IOChannel_GetAccessStatus | ( | peak_camera_handle | hCam, |
| peak_io_channel | ioChannel ) |
Query the io channel access status.
Provides the current access status for the specified io channel.
This function implements the Access Status Query principle.
| [in] | hCam | The camera handle. |
| [in] | ioChannel | The io channel. |
If the function indicates an error by returning PEAK_ACCESS_INVALID, these are the possible errors:
hCam is an invalid camera handle. ioChannel is an invalid io channel. Check peak_io_channel. | peak_status peak_IOChannel_GetListForDirection | ( | peak_camera_handle | hCam, |
| peak_io_direction | direction, | ||
| peak_io_channel * | ioChannelList, | ||
| size_t * | ioChannelCount ) |
Get the list of supported io channels for the given direction.
Queries the list of supported io channels for the given direction. If direction is set to PEAK_IO_DIRECTION_ANY, the list contains all input and output channels. If direction is set to either PEAK_IO_DIRECTION_INPUT or PEAK_IO_DIRECTION_OUTPUT, the list only contains channels that can be used as input or output.
This function implements the Two Staged Data Query principle.
| [in] | hCam | The camera handle. |
| [in] | direction | The direction. |
| [out] | ioChannelList | Pointer to a user allocated array buffer to receive the io channel list. If this parameter is NULL, ioChannelCount will contain the current number of io channels. The required size of ioChannelList in bytes is ioChannelCount x sizeof(peak_io_channel). |
| [in,out] | ioChannelCount |
|
ioChannelList is not NULL and the value of *ioChannelCount is too small to receive the expected amount of data. ioChannelCount is an invalid pointer. hCam is an invalid camera handle. | peak_status peak_IOChannel_Inverter_Enable | ( | peak_camera_handle | hCam, |
| peak_io_channel | ioChannel, | ||
| peak_bool | enabled ) |
Enable/Disable the io channel inverter property.
Sets the io channel inverter property to enabled or disabled.
| [in] | hCam | The camera handle. |
| [in] | ioChannel | The io channel. |
| [in] | enabled | The desired enabled status. PEAK_TRUE for enabled, PEAK_FALSE for disabled. |
ioChannel is an invalid channel. hCam is an invalid camera handle. | peak_access_status peak_IOChannel_Inverter_GetAccessStatus | ( | peak_camera_handle | hCam, |
| peak_io_channel | ioChannel ) |
Query the io channel inverter property access status.
Provides the current access status for the inverter property for the specified io channel.
This function implements the Access Status Query principle.
| [in] | hCam | The camera handle. |
| [in] | ioChannel | The io channel. |
If the function indicates an error by returning PEAK_ACCESS_INVALID, these are the possible errors:
ioChannel is an invalid channel. hCam is an invalid camera handle. | peak_bool peak_IOChannel_Inverter_IsEnabled | ( | peak_camera_handle | hCam, |
| peak_io_channel | ioChannel ) |
Get the enabled status of the io channel inverter property.
Queries whether the io channel inverter property is currently enabled or disabled.
This function implements the Enabled Status Query principle.
| [in] | hCam | The camera handle. |
| [in] | ioChannel | The io channel. |
| peak_access_status peak_IOChannel_Level_GetAccessStatus | ( | peak_camera_handle | hCam, |
| peak_io_channel | ioChannel ) |
Query the io channel level property access status.
Provides the current access status for the level property for the specified io channel.
This function implements the Access Status Query principle.
| [in] | hCam | The camera handle. |
| [in] | ioChannel | The io channel. |
If the function indicates an error by returning PEAK_ACCESS_INVALID, these are the possible errors:
ioChannel is an invalid io channel. Check peak_io_channel. hCam is an invalid camera handle. | peak_bool peak_IOChannel_Level_IsHigh | ( | peak_camera_handle | hCam, |
| peak_io_channel | ioChannel ) |
Get the level of the io channel.
Queries whether the io channels level is currently high or low.
This function implements the Boolean Status Queries principle.
| [in] | hCam | The camera handle. |
| [in] | ioChannel | The io channel. |
| peak_status peak_IOChannel_Level_SetHigh | ( | peak_camera_handle | hCam, |
| peak_io_channel | ioChannel, | ||
| peak_bool | high ) |
Set the io channel level.
Writes the desired io channel level for the specified io channel. Changes the channel's direction to output if neccessary.
| [in] | hCam | The camera handle. |
| [in] | ioChannel | The io channel. |
| [out] | high | The level to set. |
ioChannel is an invalid channel. hCam is an invalid camera handle. | peak_status peak_IOChannel_NoiseFilter_Duration_Get | ( | peak_camera_handle | hCam, |
| peak_io_channel | ioChannel, | ||
| double * | noiseFilterDuration_us ) |
Get the io channel noise filter duration.
Reads the current io channel noise filter duration for the specified io channel.
| [in] | hCam | The camera handle. |
| [in] | ioChannel | The io channel. |
| [out] | noiseFilterDuration_us | The noise filter duration in microseconds. |
noiseFilterDuration_us is an invalid pointer or ioChannel is an invalid channel. hCam is an invalid camera handle. | peak_status peak_IOChannel_NoiseFilter_Duration_GetRange | ( | peak_camera_handle | hCam, |
| peak_io_channel | ioChannel, | ||
| double * | minNoiseFilterDuration_us, | ||
| double * | maxNoiseFilterDuration_us, | ||
| double * | incNoiseFilterDuration_us ) |
Get the current range of valid io channel noise filter duration values.
Queries the current range of valid values for the io channel noise filter duration for the specified io channel.
The range of valid io channel noise filter duration delay values may depend on the camera configuration and the camera status.
| [in] | hCam | The camera handle. |
| [in] | ioChannel | The io channel. |
| [out] | minNoiseFilterDuration_us | The minimum noise filter duration value in microseconds. |
| [out] | maxNoiseFilterDuration_us | The maximum noise filter duration value in microseconds. |
| [out] | incNoiseFilterDuration_us | The noise filter duration value increment in microseconds. |
minNoiseFilterDuration_us, maxNoiseFilterDuration_us, and incNoiseFilterDuration_us is an invalid pointer or ioChannel is an invalid channel. hCam is an invalid camera handle. | peak_status peak_IOChannel_NoiseFilter_Duration_Set | ( | peak_camera_handle | hCam, |
| peak_io_channel | ioChannel, | ||
| double | noiseFilterDuration_us ) |
Set the io channel noise filter duration.
Writes the desired io channel noise filter duration for the specified io channel.
| [in] | hCam | The camera handle. |
| [in] | ioChannel | The io channel. |
| [out] | noiseFilterDuration_us | The noise filter duration to set in microseconds. |
noiseFilterDuration_us is out of range. Check the range of valid values via peak_IOChannel_NoiseFilter_Duration_GetRange. ioChannel is an invalid channel. hCam is an invalid camera handle. | peak_status peak_IOChannel_NoiseFilter_Enable | ( | peak_camera_handle | hCam, |
| peak_io_channel | ioChannel, | ||
| peak_bool | enabled ) |
Enable/Disable the io channel noise filter property.
Sets the io channel noise filter property to enabled or disabled.
| [in] | hCam | The camera handle. |
| [in] | ioChannel | The io channel. |
| [in] | enabled | The desired enabled status. PEAK_TRUE for enabled, PEAK_FALSE for disabled. |
ioChannel is an invalid channel. hCam is an invalid camera handle. | peak_access_status peak_IOChannel_NoiseFilter_GetAccessStatus | ( | peak_camera_handle | hCam, |
| peak_io_channel | ioChannel ) |
Query the io channel noise filter property access status.
Provides the current access status for the noise filter property for the specified io channel.
This function implements the Access Status Query principle.
| [in] | hCam | The camera handle. |
| [in] | ioChannel | The io channel. |
If the function indicates an error by returning PEAK_ACCESS_INVALID, these are the possible errors:
ioChannel is an invalid channel. hCam is an invalid camera handle. | peak_bool peak_IOChannel_NoiseFilter_IsEnabled | ( | peak_camera_handle | hCam, |
| peak_io_channel | ioChannel ) |
Get the enabled status of the io channel noise filter property.
Queries whether the io channel noise filter property is currently enabled or disabled.
This function implements the Enabled Status Query principle.
| [in] | hCam | The camera handle. |
| [in] | ioChannel | The io channel. |
| peak_status peak_IOChannel_Type_Get | ( | peak_camera_handle | hCam, |
| peak_io_channel | ioChannel, | ||
| peak_io_type * | type ) |
Get the io channel type.
Reads the current type for the specified io channel.
| [in] | hCam | The camera handle. |
| [in] | ioChannel | The io channel. |
| [out] | type | The type. |
type is an invalid pointer or ioChannel is an invalid channel. hCam is an invalid camera handle. | peak_access_status peak_IOChannel_Type_GetAccessStatus | ( | peak_camera_handle | hCam, |
| peak_io_channel | ioChannel ) |
Query the io channel type property access status.
Provides the current access status for the type property for the specified io channel.
This function implements the Access Status Query principle.
| [in] | hCam | The camera handle. |
| [in] | ioChannel | The io channel. |
If the function indicates an error by returning PEAK_ACCESS_INVALID, these are the possible errors:
ioChannel is an invalid io channel. Check peak_io_channel. hCam is an invalid camera handle.