# Linescan Application | Aborted image in start - stop application

**URL:** <https://forum.commonvisionblox.com/t/linescan-application-aborted-image-in-start-stop-application/152>\
**Category:** Programming Questions\
**Tags:** acquisition, linescan\
**Created:** [July 6, 2017, 2:30pm UTC](https://forum.commonvisionblox.com/t/linescan-application-aborted-image-in-start-stop-application/152 "2017-07-06T14:30:11Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![David](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/david/32/88_2.png) [@David](https://forum.commonvisionblox.com/u/David)\
**Post date:** [July 6, 2017, 2:30pm UTC](https://forum.commonvisionblox.com/t/linescan-application-aborted-image-in-start-stop-application/152/1 "2017-07-06T14:30:11Z")

</div>

HI,

I am currently working with a linescan setup (Linea GigE) and CVB 2017. The camera is connected to an encoder to synchronize the line frequency with the movement of the belt. In our application it is important that the belt can stop for a while and start moving without losing lines.

I would expect that the camera is waiting until the belt is moving again to finish the current image. So the first X lines of the image were acquiered before the stop and the rest of the image afterwards. Of course the stop-start period should be shorter than the default timeout I set in the Management Console.

Unfortunately this is not the case. The camera does acquire images without problems but as soon the belt stops the current image will be aborted and I get an unfinished image with X lines which were acquired before the stop and the rest of the image is filled with old data. With the next start of the belt the camera is acquiring images again.

I hope you can tell me what exaclty is happening here.

regards,  
David

---

<div class="post-metadata">

**Author:** ![Theo](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/theo/32/482_2.png) [@Theo](https://forum.commonvisionblox.com/u/Theo)\
**Post date:** [July 10, 2017, 8:14am UTC](https://forum.commonvisionblox.com/t/linescan-application-aborted-image-in-start-stop-application/152/2 "2017-07-10T08:14:48Z")

</div>

Hi David,

this is a very specific issue with linescan cameras and start-stop applications. Next to the “default timeout” from CVB there is a hidden “packet timeout” in the GenICam.Vin which oversees the time between the network packets which are sent by the camera. If the transfer stops the packet timeout will trigger and the current image will be transferred unfinished. Normally there is no reason why a camera should stop the transfer in the middle of an image as long there is no issue and so nobody becomes acquainted with the “packet timeout”. 😉

Of course there is this one exception you have there. The GigE Linescan camera will stop the image transfer as soon as your application stops and no more packets will be sent as long the belt is not moving. Therefore the packet timeout does not work with your application and should be deactivated.

This is a GenICam.vin setting but it is not part of the GenICam.ini. So you will have to set it each time you load your application.

You will find the “PacketTimeout” in the DataSteramPort Nodemap.

 ![](https://canada1.discourse-cdn.com/flex027/uploads/commonvisionblox/original/1X/9128e498a2c5d5ff5f13b102dac564c29e684e0b.PNG)  
[https://help.commonvisionblox.com/NextGen/14.0/md\_theory\_of\_operation\_hardware\_\_gen\_i\_cam\_\_c\_v\_b\_\_user\_guide.html](https://help.commonvisionblox.com/NextGen/14.0/md_theory_of_operation_hardware __gen_i_cam__ c_v_b__user_guide.html)

It is possible to deactivate the timeout by setting it to zero.

---

<div class="post-metadata">

**Author:** ![David](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/david/32/88_2.png) [@David](https://forum.commonvisionblox.com/u/David)\
**Post date:** [July 10, 2017, 9:17am UTC](https://forum.commonvisionblox.com/t/linescan-application-aborted-image-in-start-stop-application/152/3 "2017-07-10T09:17:13Z")

</div>

Thanks for the answer.

I will check…

---

<div class="post-metadata">

**Author:** ![David](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/david/32/88_2.png) [@David](https://forum.commonvisionblox.com/u/David)\
**Post date:** [July 10, 2017, 3:06pm UTC](https://forum.commonvisionblox.com/t/linescan-application-aborted-image-in-start-stop-application/152/4 "2017-07-10T15:06:32Z")

</div>

@Theo,

after deactivating the packet timeout my program is working as expected.

Thanks again for your help.

regards,  
David

---

<div class="post-metadata">

**Author:** ![Ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@Ben](https://forum.commonvisionblox.com/u/Ben)\
**Post date:** [June 17, 2019, 5:09am UTC](https://forum.commonvisionblox.com/t/linescan-application-aborted-image-in-start-stop-application/152/5 "2019-06-17T05:09:14Z")

</div>

Is this the same thing as the Default acquisition timeout setting in GenICam?

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/commonvisionblox/original/1X/9b5bb6f5623074fc06361bfdc1aab00ea0895747.png)

If not, what is the difference, when should you use which, and is there a way to set this second one programatically? (I’ve already found Cust::PacketTimeout)

---

<div class="post-metadata">

**Author:** ![Theo](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/theo/32/482_2.png) [@Theo](https://forum.commonvisionblox.com/u/Theo)\
**Post date:** [June 17, 2019, 8:35am UTC](https://forum.commonvisionblox.com/t/linescan-application-aborted-image-in-start-stop-application/152/6 "2019-06-17T08:35:11Z")

</div>

Hi Ben,

no, the default timeout does refer to the timeout between two images. If Image B is not acquired after the time of “Default Timeout” after Image A was acquired you will receive a timeout error. However, the Packet Timeout is a timeout between two Networkpackets. This timeout is set to 200 ms by default. So if your Linescan system does pause the image transfer (because your belt stopped) the timeout will occur. You can change the timeout only programatically. I think the “Cust::PacketTimeout” you are refering to should be the correct node.

Set it to Zero to deactivate the PacketTimeout completely.

Theo.

---

<div class="post-metadata">

**Author:** ![Ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@Ben](https://forum.commonvisionblox.com/u/Ben)\
**Post date:** [June 17, 2019, 9:12am UTC](https://forum.commonvisionblox.com/t/linescan-application-aborted-image-in-start-stop-application/152/7 "2019-06-17T09:12:32Z")

</div>

OK thanks, I’ve already set Cust::PacketTimeout, but if I also want to avoid timeouts _between_ images, is there a way to set the Default Timeout programmatically?ù

**Update** , is there any relationship between this Default Timeout and the log in GenICam Browser (which seems to always say “Acquisition started (AcquisitionTimeout= 60000 msec)” whatever the value of Default Timeout is)?

We also see:

> WARNING ::ID-\>00-01-0D-C2-56-F2::192.168.36.29|DS0 : Acquisition timeout occurred (counter= 0 ). A reason might be no or bad trigger signal. The AcquisitionTimeout is 60000 msec.

---

<div class="post-metadata">

**Author:** ![parsd](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/parsd/32/7_2.png) [@parsd](https://forum.commonvisionblox.com/u/parsd)\
**Post date:** [June 17, 2019, 10:16pm UTC](https://forum.commonvisionblox.com/t/linescan-application-aborted-image-in-start-stop-application/152/8 "2019-06-17T22:16:51Z")

</div>

With the new APIs like _Stemmer.Cvb_ the setting in the Management Console has no meaning anymore. The `.Wait` call waits forever or until acquisition is aborted and the `.WaitFor` waits for the specified amount of time.

And this is always the timeout for the method call and not anything in the acquisition engine.

---

<div class="post-metadata">

**Author:** ![Theo](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/theo/32/482_2.png) [@Theo](https://forum.commonvisionblox.com/u/Theo)\
**Post date:** [June 18, 2019, 6:30am UTC](https://forum.commonvisionblox.com/t/linescan-application-aborted-image-in-start-stop-application/152/9 "2019-06-18T06:30:31Z")

</div>

The GenICamBrowser does have his own Timeout in %CVBDATA%Applications\GenICamBrowser.xml

You can change it there if necessary. 😉

---

<div class="post-metadata">

**Author:** ![parsd](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/parsd/32/7_2.png) [@parsd](https://forum.commonvisionblox.com/u/parsd)\
**Post date:** [June 19, 2019, 8:17am UTC](https://forum.commonvisionblox.com/t/linescan-application-aborted-image-in-start-stop-application/152/10 "2019-06-19T08:17:42Z")

</div>

The timeout value is used by the classic API’s `G2Wait` call if you don’t use the `SetTimeout` function before.

---

<div class="post-metadata">

**Author:** ![Ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@Ben](https://forum.commonvisionblox.com/u/Ben)\
**Post date:** [July 19, 2019, 1:20pm UTC](https://forum.commonvisionblox.com/t/linescan-application-aborted-image-in-start-stop-application/152/11 "2019-07-19T13:20:24Z")

</div>

We have a Teledyne Linea, and even though we’ve set the Packet Timeout to 0, we’re still getting back a half-black image if we stop triggering half-way through an image. I’m wondering if this isn’t something that actually happens on the camera? Does anyone know if there’s a way to stop this? Or at least work out where it’s happening (in the camera or the driver).

---

<div class="post-metadata">

**Author:** ![Theo](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/theo/32/482_2.png) [@Theo](https://forum.commonvisionblox.com/u/Theo)\
**Post date:** [July 22, 2019, 7:25am UTC](https://forum.commonvisionblox.com/t/linescan-application-aborted-image-in-start-stop-application/152/12 "2019-07-22T07:25:28Z")

</div>

@Ben, welcome back to the forum!

No, actually this should be definately the packet timeout. Or in other words: Lets try something 🙂

Can you use the CVB Viewer and try to reproduce this behavior? The viewer does have the option (“GenICam -\> Transport Layer Nodemaps”) to access the Data Stream Port Nodemap and change the Packet timeout manually. If null does not work please try maximum and send us your findings.

---

<div class="post-metadata">

**Author:** ![Ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@Ben](https://forum.commonvisionblox.com/u/Ben)\
**Post date:** [July 22, 2019, 9:48am UTC](https://forum.commonvisionblox.com/t/linescan-application-aborted-image-in-start-stop-application/152/13 "2019-07-22T09:48:04Z")

</div>

1. Not sure how to connect the CVB Viewer, how do you connect a camera from there?
2. Using the GenICam Browser, we can connect to the camera, and modify the Packet Timeout - do we need to execute the Update settings command for this as well?
3. We can’t seem to get consistently understandable results - sometimes with the Packet Timeout set to 0 we get timeouts. Then with Packet Timeout set to non-zero we _don’t_ get timeouts. Or with a short packet timeout (I’m presuming the number is milliseconds), the timeout takes minutes.

We’re going to carry on testing, but if you have any ideas, please let me know.

---

<div class="post-metadata">

**Author:** ![Theo](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/theo/32/482_2.png) [@Theo](https://forum.commonvisionblox.com/u/Theo)\
**Post date:** [July 22, 2019, 10:58am UTC](https://forum.commonvisionblox.com/t/linescan-application-aborted-image-in-start-stop-application/152/14 "2019-07-22T10:58:25Z")

</div>

Which CVB Version do you use exactly? It seems we should countercheck this behavior.

---

<div class="post-metadata">

**Author:** ![Ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@Ben](https://forum.commonvisionblox.com/u/Ben)\
**Post date:** [July 22, 2019, 11:14am UTC](https://forum.commonvisionblox.com/t/linescan-application-aborted-image-in-start-stop-application/152/15 "2019-07-22T11:14:11Z")

</div>

![image](https://canada1.discourse-cdn.com/flex027/uploads/commonvisionblox/original/1X/04d67352abd8ba2e18f8e2d80050b0e40719d4f2.png)

---

<div class="post-metadata">

**Author:** ![Theo](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/theo/32/482_2.png) [@Theo](https://forum.commonvisionblox.com/u/Theo)\
**Post date:** [July 23, 2019, 6:32am UTC](https://forum.commonvisionblox.com/t/linescan-application-aborted-image-in-start-stop-application/152/16 "2019-07-23T06:32:05Z")

</div>

Ben, we will check this with a camera from our stock and come back to you.

---

<div class="post-metadata">

**Author:** ![Theo](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/theo/32/482_2.png) [@Theo](https://forum.commonvisionblox.com/u/Theo)\
**Post date:** [July 24, 2019, 9:27am UTC](https://forum.commonvisionblox.com/t/linescan-application-aborted-image-in-start-stop-application/152/17 "2019-07-24T09:27:20Z")

</div>

We could not reproduce the behavior. Did you restart the Acquisition after setting the parameter? Our testing made clear that this is important so that the parameter value can be updated.

However, I think the next step should be a remote session as I wrote in the PN I send you.

---

<div class="post-metadata">

**Author:** ![Ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@Ben](https://forum.commonvisionblox.com/u/Ben)\
**Post date:** [July 31, 2019, 5:22am UTC](https://forum.commonvisionblox.com/t/linescan-application-aborted-image-in-start-stop-application/152/18 "2019-07-31T05:22:57Z")

</div>

Thanks to some psychic debugging from @Theo, this is fixed.

The timeout is reset to 200ms every time you connect to a camera, so if you want it to be zero, you have to set it explicitly. I was doing this, but then disconnecting and reconnecting again!

---

<div class="post-metadata">

**Author:** ![illusive](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/illusive/32/61_2.png) [@illusive](https://forum.commonvisionblox.com/u/illusive)\
**Post date:** [July 31, 2019, 3:40pm UTC](https://forum.commonvisionblox.com/t/linescan-application-aborted-image-in-start-stop-application/152/19 "2019-07-31T15:40:33Z")

</div>

> [@Ben](#):
>
> Thanks to some psychic debugging from @Theo, this is fixed.

🤣  
that made my day…

---

<div class="post-metadata">

**Author:** ![patryk105](https://avatars.discourse-cdn.com/v4/letter/p/a4c791/32.png) [@patryk105](https://forum.commonvisionblox.com/u/patryk105)\
**Post date:** [September 10, 2019, 1:22pm UTC](https://forum.commonvisionblox.com/t/linescan-application-aborted-image-in-start-stop-application/152/20 "2019-09-10T13:22:14Z")

</div>

If I set the Packet Timeout to 0 on my Teledyne Linea, I get only completely black images. Anyone knwos a solution?

[Next page](https://forum.commonvisionblox.com/t/linescan-application-aborted-image-in-start-stop-application/152.md?page=2)
