# Working with 3D-Cameras of Automation Technology in CVB

**URL:** <https://forum.commonvisionblox.com/t/working-with-3d-cameras-of-automation-technology-in-cvb/532>\
**Category:** Programming Questions\
**Tags:** acquisition, genicam, gigevision, documentation\
**Created:** [August 23, 2018, 9:42am UTC](https://forum.commonvisionblox.com/t/working-with-3d-cameras-of-automation-technology-in-cvb/532 "2018-08-23T09:42:09Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![Simon](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/simon/32/847_2.png) [@Simon](https://forum.commonvisionblox.com/u/Simon)\
**Post date:** [March 4, 2022, 11:01am UTC](https://forum.commonvisionblox.com/t/working-with-3d-cameras-of-automation-technology-in-cvb/532/19 "2022-03-04T11:01:13Z")

</div>

**Reading TriggerStatus from Chunk Data**

refering to the previous post from @Arno on Reading Chunk Data, reading the “TriggerStatus” is a bit tricky.

TriggerStatus is defined as:

```auto
public byte TriggerStatus;

```

While TriggerStatus is an 8-bit value it contains the information of 6 elements:

```auto
#define CHUNKACQINFO_TRIGGERSTATUS_BIT_TRIGGER_OVERRUN 
#define CHUNKACQINFO_TRIGGERSTATUS_BIT_RESOLVER_CNT_UP 
#define CHUNKACQINFO_TRIGGERSTATUS_BIT_IN0 
#define CHUNKACQINFO_TRIGGERSTATUS_BIT_IN1 
#define CHUNKACQINFO_TRIGGERSTATUS_BIT_OUT0 
#define CHUNKACQINFO_TRIGGERSTATUS_BIT_OUT1 

```

Extracting the information from TriggerStatus as byte will result in a decimal value between 0 ant 255.  
From this the information on the 6 status elements can already be read unambiguous. For interpretation reasons it might be easier to convert the decimal number to a binary number.

In our example we receive that decimal byte value of 193 from the TriggerStatus Chunk value.  
Decoded to binary the value can be read like this:  
11000001  
Each bit is now describing the status of one of the 6 elements. The logic is set to the following:  
Out1 = high, Out0 = high, In1 = low, In0 = low, -, -, EncoderStatus = off/back, TriggerOverrun = true.

The EncoderStatus is described by the following:

1. If no Encoder is used: EncoderStatus = 0
2. If an Encoder is used:
  - Encoder Status = 0: Encoder is moving backward.
  - Encoder Status = 1: Encoder is moving forward.

---

_[View the full topic](https://forum.commonvisionblox.com/t/working-with-3d-cameras-of-automation-technology-in-cvb/532)._
