Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

HOWTO load / write an imaqDx configuration file programmatically ( without using MAX )

I am looking for a way to load / save / replace an ICD file programmatically, without using NI MAX.
( My application written in DotNet, has to manage many different configuration of a camera. The camara comfiguartion
must change during execution ! )

I think, there is a way to do this, by saving in my application all the writable attributes of a camera
and write them down before using it.

But i thing, this is already done by the open camera command, using the configuration stored in the ICD file.

I would prefer to call methods like ....

  • imaqDx.saveCameraConfiguration ( Icdfilepath )
  • imaqDx.loadCameraConfiguration ( IcdFilePath )
To solve my problem qwickly, is it possible to copy / replace directly the ICD files ???


0 Kudos
Message 1 of 4
(3,894 Views)
Hello,

The way of changing the camera parameters depends on which kind of camera you are using.
For a FireWire camera, you can use IMAQ function and for a camera link camera (which has absolutely nothing to see with FireWire) you can send serial commands to the camera (also using the IMAQ serial write).

My advice would be not to have 2 icd files, but to make VI that sends commands to set camera configuration. If your camera is a camera link Basler camera, I can send you some example VIs I use in my applications.

Hope this helps.

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 4
(3,892 Views)

I have found the answer of my question.

I started to solve my problem by saving / restoring by myself all the writable attributes of my cameras, and

at the end of my developpement i have found the folowing two methods located in the ImaqDx api.

----> ReadAttributes( session , pathToMyPersonnalIcdFile )

----> WriteAttributes( session , pathToMyPersonnalIcdFile )

 

Message 3 of 4
(3,890 Views)
Hi,
You can't change icd file on the fly but you can modify attributes from the loaded icd file. These modifications will not be permanent.
There currently isn't a way to programmatically load an icd file.
Manuel


Message Edité par ManuelR le 12-04-2007 10:26 AM
Manuel R
AE dans une autre vie
Message 4 of 4
(3,864 Views)