Please enable JavaScript to view this site.

IDS peak 2.10.0 / uEye+ firmware 3.34

IDS Peak comfortSDK, genericSDK, IPL, and AFL developer manuals are external documents. Please contact us if you need them.

You can use the automatic reconnect feature for Vision cameras (GV and U3 models) or via the uEye transport layer (UI models) if the physical connection has been interrupted and restored, e.g. in the event of voltage problems. If the reconnect function is enabled, the camera is automatically reopened. If you have set that a UserSet is to be loaded when the camera starts up, the previous status of the camera is also restored.

Fig. 278: Camera connection is disconnected

Fig. 278: Camera connection is disconnected

Fig. 279: Camera connection is restored

Fig. 279: Camera connection is restored

If you change the IP address of a camera, the camera is automatically restarted and the ID loses its validity. You must update the camera list and search for the camera again, as the reconnect feature cannot be used in this particular case.

hint_info

If you make a change to the network adapter, we recommend to stop all running applications and to restart the applications after the change.

Settings in the transport layer

The reconnect feature is enabled or disabled for all cameras in the system via ReconnectEnable.

Reconnect is currently disabled by default for uEye+ cameras (GV and U3 models).

Reconnect is enabled by default for uEye cameras (UI models) and cannot be disabled.

 

Reconnect

Restore
image acquisition

Restore parameters

enable

disable

via UserSet

automatic

GigE Vision Transport Layer

Socket (GEV)

check

check

check

check

error

GigE Vision Transport Layer

Kernel (GEVK)

check

check

check

check

error

USB3 Vision Transport Layer

(Windows - U3VK)

check

check

check

check

error

USB3 Vision Transport Layer

(Linux - U3V)

check

check

check

check

error

uEye Transport Layer

check

error

check

error

check

IDS peak Cockpit

check

check

check

check

error

IDS peak comfortC

check

check

check

check

error

IDS peak genericC++

check

check

check

check

error

IDS peak genericC#

check

check

check

check

error

IDS peak genericPython

check

check

check

check

error

For the reconnect, you can use ReconnectRemoteDeviceAcquisitionRestartEnable to set whether the image acquisition should start automatically after the connection has been restored.

Module / category

Node

Description

System / ReconnectControl

ReconnectEnable

Enables or disables the reconnect feature.

ReconnectRemoteDeviceAcquisitionRestartEnable

Indicates whether the image acquisition of the RemoteDevice is automatically restarted after reconnection.

ReconnectRemoteDeviceConfigurationRestoreEnable

Indicates whether the configuration of the RemoteDevice is restored after reconnection.

RegisteredReconnectEventsCount

Number of registered "EVENT_REMOTE_DEVICE_CONNECTION_STATUS_CHANGE" events.

LocalDevice / ReconnectMonitor

ReconnectActive

Indicates whether the reconnect feature is enabled or disabled.

RemoteDeviceConnected

Indicates whether the RemoteDevice is currently connected.

RemoteDeviceDetachmentCount

Number of RemoteDevice detachments since the device was opened.

RemoteDeviceReattachmentCount

Number of RemoteDevice reattachments since the device was opened.

You can register callbacks either in the DeviceManager or in the interface. Events are only transmitted from the time of registration. If no callbacks are registered, the event is lost.

Enabling reconnect and logging events on/off (genericSDK)

genericC++

void OnSystemFound(const std::shared_ptr<const peak::core::System>& foundSystem)
{
  // Note: it's recommended to check whether the node is accessable
  auto nodeMap = foundSystem->NodeMaps().at(0);
  nodeMap->FindNode<peak::core::nodes::BooleanNode>("ReconnectEnable")->SetValue(true);
}
 
void OnDeviceDisconnected(const std::shared_ptr<peak::core::DeviceDescriptor> deviceDescriptor)
{
  // Handle disconnected device accordingly using the deviceDescriptor.
}
 
void OnDeviceReconnected(const std::shared_ptr<peak::core::DeviceDescriptor> deviceDescriptor, peak::core::DeviceReconnectInformation reconnectInformation)
{
  // Handle reconnected device accordingly using the deviceDescriptor and reconnectInformation.
}
 
auto& deviceManager = peak::DeviceManager::Instance();
 
// We use the system found callback to enable the reconnect
auto systemFoundCallbackHandle = deviceManager.RegisterSystemFoundCallback(OnSystemFound);
 
// Register disconnected and reconnect device events
auto deviceDisconnectedCallbackHandle = deviceManager.RegisterDeviceDisconnectedCallback(OnDeviceDisconnected);
auto deviceReconnectedCallbackHandle = deviceManager.RegisterDeviceReconnectedCallback(OnDeviceReconnected);
 
// Update the device manager to find systems and devices
deviceManager.Update();
 
// Everything is now set up correctly and you can continue with your application code here.
 
// Remember the unregister the callbacks when they are no longer needed or when the application is shut down
deviceManager.UnregisterSystemFoundCallback(systemFoundCallbackHandle);
deviceManager.UnregisterDeviceDisconnectedCallback(deviceDisconnectedCallbackHandle);
deviceManager.UnregisterDeviceReconnectedCallback(deviceReconnectedCallbackHandle);  

Enabling reconnect (comfortSDK)

comfortC

peak_interface_technology interface_technologies[] = { peak_interface_technology_GEV, peak_interface_technology_U3V, peak_interface_technology_UEYE };
 
peak_CameraList_Update(nullptr);
for (size_t i = 0; i < sizeof(interface_technologies) / sizeof(peak_interface_technology); i++)
{
  peak_access_status access_status = peak_Reconnect_GetAccessStatus(interface_technologies[i]);
  peak_bool current_state = PEAK_FALSE;
  if (PEAK_IS_WRITEABLE(access_status))
  {
      peak_status enable_status = peak_Reconnect_Enable(interface_technologies[i], PEAK_TRUE);
      if (enable_status != PEAK_STATUS_SUCCESS)
      {
          printf("peak_Reconnect_Enable returned with: %d", enable_status);
      }
  }
  else if (PEAK_IS_READABLE(access_status))
  {
      current_state = peak_Reconnect_IsEnabled(interface_technologies[i]);
  }
  else
  {
      // the feature is not available
      continue;
  }
  printf("peak_interface_technology: %d, state=%d\n", interface_technologies[i], current_state);
}

Messages for disconnecting and reconnecting (comfortSDK)

comfortC

peak_MessageQueue_EnableMessage(hMessageQueue, NULL, PEAK_MESSAGE_TYPE_DEVICE_RECONNECTED);
peak_MessageQueue_EnableMessage(hMessageQueue, NULL, PEAK_MESSAGE_TYPE_DEVICE_DISCONNECTED);
 
// #peak_MessageQueue_WaitForMessage and #peak_Message_Type_Get
if (messageType == PEAK_MESSAGE_TYPE_DEVICE_RECONNECTED)
{
  peak_message_data_device_reconnected reconnectedData;
  peak_Message_Data_DeviceReconnected_Get(hMessage, &reconnectedData);
  ...
}
else if (messageType == PEAK_MESSAGE_TYPE_DEVICE_DISCONNECTED)
{
  peak_message_data_device_disconnected disconnectedData;
  peak_Message_Data_DeviceDisconnected_Get(hMessage, &disconnectedData);
  ...
}

© 2024 IDS Imaging Development Systems GmbH