Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

reading timestamp of dalsa genie M1400

Hi,
 
I'm working with a Dalsa Genie M1400 and IMAQdx Drivers 3.0.1.
It was no problem to install the camera and to grab images. But an error window appears if I stop the grab (in MAX or in an VI). The error code is 0xBFF69002, invalid parameter, and appears only if the frame rate is higher than 8Hz from max. 15. I'm able to catch the error within LV but I would like to know where the problem arise and how I can avoid it.
 
The second problem I have is to read out the timestamp info from the images. Therefor I use the IMAQ get custom keys and IMAQ read custom info VIs. At the beginning I thought that the I had a general failure in the VI. But I tried the program with a Dalsa Genie M650 with equal settings and had no problems. The internal counter rose up in each frame with the programmed frame rate.
When I tried it again I with the M1400 I developed that the I read out timestamps from the internal camera counter but only from the first two acquired frames. The time difference ot these two timestamps matches exactly with the adjusted frame rate.
The first frame has the correct timestamp number. So the second frame. But the third, fourth and fifth frame has has also the timestamp of the second acquired frame. The sixth frame has the timestamp from the first again. Then once again four frames with the time stamp of the second frame and so on.
 
The technical support of the distributor suggested to update the framework from 1.20 to 1.30. Furthermore the Dalsa Firmware Manager updated the device firmware from 18567 to the current running 24499. This firmware is also running on the tested M650.
 
Are there any solutions for the problem?
Thanks, Christian
0 Kudos
Message 1 of 14
(5,636 Views)

Hi Christian,

I don't have access to a Genie so I can't try it out myself. My guess is that the camera is returning some sort of error when we try to stop the acquisition. I've never seen this problem on any other camera so I can't say for sure.

Regarding the timestamp problem on the M1400, it sounds like a problem with the camera. Given that your application gets correct timestamps from the M650, it sounds like the M1400 is just returning bogus values for the timestamps. You'd probably have to talk to Dalsa or your distributor to see if they have any fix available for the camera to make it work correctly.

-Eric

0 Kudos
Message 2 of 14
(5,627 Views)

Hi Eric,

I've already tested the program to read out the timestamp infos with a similar M1400 from a new camera delivery to the distributor. Now I have two Dalsa Genie M1400 which shows the same confusing timestamp behavior I tried to describe in the first message.

The distributor had tested the M1400 with the genicam standard but without NI LabView and got correct timestamp infos for both camera types (M1400 and M640).

Do you have any idea if the problem could be in the NI IMAQdx driver or only in any of my attribute settings? I have still no idea why it works with the M640 but not with the M1400 although I used the same attribute settings.

Additional I've added some screen shots (I used a modified version of your timestamp program) of the failure and the MAX settings.

 

Thanks, Christian

0 Kudos
Message 3 of 14
(5,539 Views)
Hi Christian,
 
I'm not familiar with the software Dalsa may provide and that appeared to get correct timestamps. Is it possible that while it is using GenICam to access the features it is still using a proprietary transport protocol instead of the standard GigE Vision protocol? That is what carries the timestamp information for each frame and is where the problem would seem to lie.
 
A configuration problem in the camera's features could also be at fault potentially. The timestamp counter on the camera could be getting reset internally by the camera. I believe there are some cameras that can be configured to make modifications to the timestamp counter (reset, increment, etc) based on user-configurable events. Perhaps the default settings the camera is using (which may get overridden by the other software) is causing it on the 1400?
 
Can you query a property node for the Lost Packets counter? If the header packets containing the timestamps were getting lost those counters should increment. That could potentially cause you to not get that information but I believe you would get 0's for the timestamps if that were the case.
 
Are you using the High Performance Driver? If you are not, you could capture a short packet capture of a few frames of data (using something like Ethereal/Wireshark) and attach it and I could verify if the timestamps look bogus there as well. If you are using the High Performance Driver, let me know and I can walk you through how to disable it so you can try the capture.
 
-Eric
0 Kudos
Message 4 of 14
(5,535 Views)
Hi Erik,
 
at first thanks for your support.
 
I've allways watched for the packet resend value. But there was never a resend necessary.
Now I'm going to organise the M640 to try the program again and to check the settings.
 
I'm not sure if I use the high performance driver. If I'm thinking right the this driver is included in the IMAQdx driver and it depends only on the used NIC (see http://zone.ni.com/devzone/cda/tut/p/id/5651 and http://zone.ni.com/devzone/cda/tut/p/id/5750).
Although I have an Intel Pro/1000 (GT and PF) I'm not sure if I realy use this high perf. driver and if not where to adjust or install it.
 
A few tests with your timestamp program and some modifications showed that only the first two frames inlcude timestamp infos. I grabbed 10 images with a sequence grab an read out the additional infos with parts of your VI's. Only the first two images had 4 infos (lost packets, actual height, timestamp high, timestamp low) were all other frames had only the lost packet info. Furthermore the number of timestamps in an iteration is similar to the used size of the internal ring buffer (e.g. buffer size is 5, fist timestamp value is x, 2nd, 3rd 4th and 5th is y, 6th is x, ....).
 
I would like to use the timestamp info to ensure that I read out equal frames from an hardware triggered stereo system. But if the problem holds on I'll try to manage it on an other way. Nevertheless I'm interested where the problem is.
 
Christian
0 Kudos
Message 5 of 14
(5,531 Views)
Hi Christian,
 
I have a few questions/clarifications based on what you said so far:
 
-You checked for resends, but did you also look at the cumulative lost packets property node entry? If for some reason the camera was not reporting resend capability correctly it won't even try to do resends.
 
-The High Performance driver will be listed in device manager under the network interfaces section. You should see either an Intel Pro/1000 or an entry for the High Performance driver. You can select properties on the device, go to the driver tab, and select a different driver. You should have a choice between the two drivers. You can only get a packet capture of the image data if you are using the standard driver for your network card, not the NI one.
 
-When you mentioned that only the first 2 images in a sequence of 10 had the fully-populated info, do you mean the custom data was completely missing? Or do you mean that the values of the other members were 0 or something like that. You should be seeing the same information populated in all of them.
 
-What kind of acquisition are you using? You mentioned that you did a 10-image sequence, but then you mentioned that the timestamps started missing after going through the number of buffers in the ring. You only have a ring of buffers that get re-used in a continuous acquisition (using the Grab VIs). If you use the Sequence VIs it uses a buffer list as large as the number of buffers you are acquiring total. I'm not sure how the buffer list size in a continuous acquisition would affect the timestamp data, so I'm thinking it was just a coincidence. Can you increase the buffer count to something like 50 and see if you see the same behavior? Also, can you try the same with a Sequence example as well?
 
-It sounds like you are making an interesting system. However, I'm not sure if these timestamps are necessarily going to be that useful for you. Firstly, the timestamps come from an internal clock in each camera. If you have multiple cameras, the clocks will eventually drift out-of-sync since they will be incrementing at ever-so-slightly different rates. Since you are already hardware-triggering the cameras (presumably from the same signal), then you should be assured that the images will be in sync with each other. The only thing you may need to worry about is if you end up skipping an image on one but not the other. There are two ways this could happen, and both are avoidable if you are careful in your design. The first is that your image processing loop could be too slow and so you end up not being able to process every image that comes in all the time. If you ask the Grab VIs for the "Next" image, then you could easily see this. If instead you ask for specific buffer indices each time you can have better control over ensuring you get synchronized buffers each iteration. The second possibility is if you are using a buffer ring size that is too small you can run into a situation where a particular buffer has to be completely skipped and never even gets saved into the ring. Images that get skipped in this manner do _not_ get counted in the buffer indices. Thus if you skip a buffer in this manner on just one of the cameras, there will now be an offset in the synchronized indices between the two cameras. You can check for this with the Lost Buffers property. However, this does not come up normally except in extreme cases with high frame rates and very small buffer lists (like 1-2 images). If you make the buffer list be say 10 images or more, there is very little chance of this happening.
 
Hope this helps,
Eric
0 Kudos
Message 6 of 14
(5,505 Views)

Hi Eric

 

…complete the timestamp questions…

- During all image acquisitions I looked for the lost packets with the property node entry. If I remember well I never had a packet lost since I watched that entry.

 

- There is a difference when using a sequence or a usual grab. As I have posted if I use a sequenz of 10 images and 10 buffers only the first 2 images have all 4 keys. All other images have only 1 key for the lost packet info. If I use your program (IMAQ grab) to acquire images and read out the timestamp info I get always 4 entries/keys which I can read out with the VI IMAQ read custom data.

 

- In the images I’ve added can you see the results of the different acquisition methods. The size of the ring buffer affects only on the grab method and especially the periode when the first frame timestamp info appears in the custom data (see added screenshots).

 

Thanks for the suggestions how to avoid grabbing different images of the buffers. Currently I’m using a methode where I ask for the last buffer number and then chose a specific buffer, according to the result of the request. If there is a skipping/difference then I use the smaller buffer number. Tests of watching a ms-timer showed that I never got different frames when using that methode. So I will stop the whole timestamp problem, although it would be interesting where the failure is.

 

Thanks a lot for the interesting proposals and advices.

 

Christian

0 Kudos
Message 7 of 14
(5,467 Views)
Hi Christian,
 
Thanks for your extensive investigation into this matter. We have been able to replicate the issue in-house as well. Based on our findings the problem will only affect certain combinations of several parameters and only when using the generic driver instead of the High Performance driver on an Intel-based card. It also will only affect the image metadata like timestamps, not the image data itself. Since you mentioned you had an Intel Pro/1000 GT and PT in your system you should be able to use that driver and it will fix the timestamp issue. If you need help switching to that driver please let me know. Our next release of IMAQdx should have this issue resolved as well.
 
I believe you had an open service request regarding this problem as well. This issue has been filed under id number 4HAGPRQ7 if you need to refer to it.
 
Thanks,
Eric
0 Kudos
Message 8 of 14
(5,456 Views)
Hi Eric,
 
your are right if you think that I need help switching the driver to the high performance one. I looked in the web an also the at the windows archiv for that driver but haven't found the correct. I only found the three listed at the last jpgs.
 
As I know from the literature its favourably to use the high performance driver to increase the sending performance and lower the usages of the CPU. So would be nice if you can give some instructions.
 
Christian
0 Kudos
Message 9 of 14
(5,451 Views)
Hi Christian,
 
If had the card installed when you ran the Vision Acquisition installer it should have installed the driver. However, if you installed the card afterwards or it did not install for some other reason, you should be able to go to Device Manager, find the Intel card you are using, right click it and select Update Driver. Select the option "Install from a List or specific location" and then select "Don't search. I will choose a driver to install." On the next page you should see the NI driver along with the Intel driver, which you should be able to select and use. You will need to do this with each adapter if you have more than one.
 
Another option which I believe may work would be to re-run the installer and select Repair install. I think that should try re-installing the driver as well.
 
Hope this helps,
Eric
0 Kudos
Message 10 of 14
(5,449 Views)