Skip to Main Content
Centre d’assistance Cognex
LogoLogo

Setting GigE Camera Features Programmatically in Cognex Designer Script

This article explains how to set camera features in Cognex Designer scripts

28/02/2025

Details

You can use the below code in a Cognex Designer script to set a GigE camera feature:

var fifo = (Cognex.VisionPro.ICogAcqFifo)$System.GetInternalObject("Devices.<myCamera>");
Cognex.VisionPro.ICogGigEAccess gige = fifo.FrameGrabber.OwnedGigEAccess;
gige.SetFeature("<featureName>","<featureValue>");

 

Notes:

  • <myCamera> should be replaced by the actual camera name
  • <featureName> should be replaced by the feature name that needs to be set
  • <featureValue> should be replaced by the value that needs to be written to the given feature

Ressources connexes