From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

imaqdx timestamp .NET

Hello community,
in our company we develop a c# application which uses the IMAQDX driver to acquire images from a GigE camera(e.g. JAI CM-140GE).
At the moment we use (ImaqdxSession).Acquisition.GetLastImageData(ref byte[ ]) to access the image data.

I try to read the image related timestamp but due to the rare documentation for IMAQDX via .Net I only found examples for LabView.
Does anybody knows how to access the image meta data, especially the "timestamp" value, via IMAQDX / Vision Acquisition Software and .NET?

Thanks,
best regards

Andreas

0 Kudos
Message 1 of 4
(5,274 Views)

@Andreas_G wrote:

Hello community,
in our company we develop a c# application which uses the IMAQDX driver to acquire images from a GigE camera(e.g. JAI CM-140GE).
At the moment we use (ImaqdxSession).Acquisition.GetLastImageData(ref byte[ ]) to access the image data.

I try to read the image related timestamp but due to the rare documentation for IMAQDX via .Net I only found examples for LabView.
Does anybody knows how to access the image meta data, especially the "timestamp" value, via IMAQDX / Vision Acquisition Software and .NET?

Thanks,
best regards

Andreas


If it can be done in LabVIEW, then you need to translate it to C#.

 

Perhaps you can post the VI?

0 Kudos
Message 2 of 4
(5,269 Views)

Hi nyc,
thanks for your response. Yesterday I found out that (ImaqdxSession).Acquisition.GetLastImage( VisionImage) supplies a VisionImage which has a CustomData property of type CustomDataDictionary.
This CustomDataDictonary contains the keys IMAQdxReceiveTimestampLow, IMAQdxReceiveTimestampHigh, IMAQdxTimestampLow and IMAQdxTimestampHigh.
Accessing this Dictionary returns an object that I tried to cast to an Int32 and also to a String, but i got a "System.Runtime.Serialization.SerializationException". All descriptions I found declares that the value of "TimestampLow" and "TimestampHigh" is of type Int32.
I also firured out that the library I need for the VisionImage (NationalInstruments.Vision.Common.dll) type is only available in 32Bit structure (http://zone.ni.com/reference/en-XX/help/372636F-01/mstudiowebhelp/html/64bitsupport/  and  http://www.ni.com/pdf/manuals/373085j.pdf)

Actually we develop a x64 application without problems while using (ImaqdxSession).Acquisition.GetLastImageData(ref byte[ ]) .

Is there any other way to access the timestamp value without using this library?


The LabView code I found at this thread:
http://forums.ni.com/t5/Machine-Vision/Timestamping-of-images-in-NI-IMAQdx/m-p/445132

Unfortunately we don't have a LabView licene at our department, so I cant have a lock at.

Best regards,
Andreas

0 Kudos
Message 3 of 4
(5,253 Views)

http://zone.ni.com/reference/en-XX/help/372636F-01/mstudiowebhelp/html/64bitsupport/#32Assembly64Pro...

explains how to use 32-bit assembly in a 64-bit project

 

 

You can download and use LabVIEW for 40 days!

I am not sure how long of an evaluation there is for IMAQdx software.

 

 

0 Kudos
Message 4 of 4
(5,248 Views)