Data Chunks

The Data Chunks camera feature allows you to generate supplementary image data and append that data to every image that you acquire.

In this topic Hide

Using the Feature

How It Works

Data chunks allow you to add supplementary information to individual image acquisitions. The desired supplementary information is generated and appended as data chunks to the image data.

Image data is also considered a "chunk". This "image data chunk" can't be disabled and is always the first chunk transmitted by the camera. If one or more data chunks are enabled, these chunks are transmitted as chunk 2, 3, and so on.

The figure below shows a set of chunks with the leading image data chunk and appended data chunks. The example assumes that the CRC checksum chunk feature is enabled.

Example Chunk Set

After data chunks have been transmitted to the computer, they must be retrieved to obtain their information. The exact procedure depends on your camera model and the programming language used for your application. For more information about retrieving data chunks, see the Programmer's Guide and Reference Documentation delivered with the Basler pylon Camera Software Suite.

Additional Metadata

Besides the data chunks, the camera adds additional metadata to individual images, e.g., the image height, image width, the image ROI offset, and the pixel format used. This information can be retrieved by accessing the grab result data via the pylon API.

If all of the following conditions are met, the grab result data doesn't contain any useful information (image height, image width, etc. will be set to -1):

In this case, you must retrieve the additional metadata using the pylon chunk parser. For more information, see the code samples in the Programmer's Guide and Reference Documentation delivered with the Basler pylon Camera Software Suite.

Enabling and Retrieving Data Chunks

  1. Set the ChunkModeActive parameter to true.
  2. Set the ChunkSelector parameter to the kind of chunk that you want to enable:
  3. Enable the selected chunk by setting the ChunkEnable parameter to true.
  4. Repeat steps 2 and 3 for every desired chunk.
  5. Implement chunk retrieval in your application.
    For information about implementing chunk retrieval, see the Programmer's Guide and Reference Documentation delivered with the Basler pylon Camera Software Suite.

Data chunks can also be viewed in the pylon Viewer.

Available Data Chunks

Gain Chunk (= GainAll Chunk)

If this chunk is available and enabled, the camera appends the gain used for image acquisition to every image.

The data chunk includes the GainRawGain parameter value.

Exposure Time Chunk

If this chunk is enabled, the camera appends the exposure time used for image acquisition to every image.

The data chunk includes the ExposureTimeAbsExposureTime parameter value.

When using the Trigger Width exposure mode, the Exposure Time chunk feature is not available.

Timestamp Chunk

If this chunk is enabled, the camera appends the internal timestamp (in ticks) of the moment when image acquisition was triggered to every image.

Line Status All Chunk

If this chunk is enabled, the camera appends the status of all I/O lines at the moment when image acquisition was triggered to every image.

The data chunk includes the LineStatusAll parameter value.

Trigger Input Counter Chunk

If this chunk is available and enabled, the camera appends the number of hardware frame start trigger signals received to every image.

To do so, the camera retrieves the current value of the Counter 1 counter. On cameras with the Trigger Input Counter chunk, Counter 1 counts the number of hardware trigger signals received.

To manually reset the counter, reset Counter 1.

The trigger input counter only counts hardware trigger signals. If the camera is configured for software triggering or free run, the counter value will not increase.

Counter Value Chunk

If this chunk is available and enabled, the camera appends the number of acquired images to every image.

To do so, the camera retrieves the current value of the Counter 1 counter. On cameras with the Counter Value chunk, Counter 1 counts the number of acquired images.

To manually reset the counter, reset Counter 1.

Frame Counter Chunk

If this chunk is available and enabled, the camera appends the number of acquired images to every image.

To do so, the camera retrieves the current value of the Counter 2 counter. On cameras with the Frame Counter chunk, Counter 2 counts the number of acquired images.

To manually reset the counter, reset Counter 2.

Numbers in the counting sequence may be skipped when the acquisition mode is changed from Continuous to Single Frame. Numbers may also be skipped when overtriggering occurs.

Sequencer Set Active Chunk (= Sequence Set Index Chunk)

If this chunk is available and enabled, the camera appends the sequencer set used for image acquisition to every image.

The data chunk includes the SequencerSetActive or SequenceSetIndex parameter value (depending on your camera model).

Enabling this chunk is only useful if the camera's Sequencer feature is used for image acquisition.

Auto Brightness Status Chunk

If this chunk is available and enabled, the camera appends the status of the target brightness adjustments to every image.

Target brightness adjustments are performed whenever the Exposure Auto or the Gain Auto auto function or both are enabled.

The chunk can have the following values:

CRC Checksum Chunk

If this chunk is enabled, the camera appends a CRC (Cyclic Redundancy Check) checksum to every image.

The checksum is calculated using the X-modem method and includes the image data and all appended chunks, if any, except the CRC chunk itself.

The CRC checksum chunk is always the last chunk appended to image data.

Specifics

Camera Model Available Data Chunks
All ace 2 GigE camera models Data Chunks feature not supported
All ace 2 USB 3.0 camera models Data Chunks feature not supported
All ace GigE camera models
  • Gain All Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Trigger Input Counter
  • Frame Counter
  • Sequence Set Index Chunk
  • CRC Checksum Chunk
acA640-750um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA640-750uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA640-90um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA640-90uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA640-120um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA640-120uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA720-520um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA720-520uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA800-510um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA800-510uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA1300-200um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA1300-200uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA1300-30um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA1300-30uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA1440-220um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA1440-220uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA1600-20um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA1600-20uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA1920-25um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA1920-25uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA1920-40um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA1920-40uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA1920-40umMED
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA1920-40ucMED
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA1920-150um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA1920-150uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA1920-155um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA1920-155uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA1920-155umMED
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA1920-155ucMED
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA2040-90um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA2040-90umNIR
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA2040-90uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA2000-165um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA2000-165umNIR
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA2000-165uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA2040-55um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA2040-55uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA2040-120um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA2040-120uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA2440-35um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA2440-35uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA2440-35umMED
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA2440-35ucMED
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA2440-75um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA2440-75uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA2440-75umMED
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA2440-75ucMED
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA2500-14um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA2500-14uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA2500-60um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA2500-60uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • CRC Checksum Chunk
acA3088-57um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA3088-57uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA3800-14um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA3800-14uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA4024-29um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA4024-29uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA4096-30um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA4096-30uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA4096-30umMED
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • Auto Brightness Status Chunk
  • CRC Checksum Chunk
acA4096-30ucMED
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • Auto Brightness Status Chunk
  • CRC Checksum Chunk
acA4096-40um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA4096-40uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA4096-40umMED
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • Auto Brightness Status Chunk
  • CRC Checksum Chunk
acA4096-40ucMED
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • Auto Brightness Status Chunk
  • CRC Checksum Chunk
acA4112-20um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA4112-20uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA4112-20umMED
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • Auto Brightness Status Chunk
  • CRC Checksum Chunk
acA4112-20ucMED
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • Auto Brightness Status Chunk
  • CRC Checksum Chunk
acA4112-30um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA4112-30uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA4112-30umMED
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • Auto Brightness Status Chunk
  • CRC Checksum Chunk
acA4112-30ucMED
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • Auto Brightness Status Chunk
  • CRC Checksum Chunk
acA4600-10uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA5472-17um
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
acA5472-17uc
  • Gain Chunk
  • Exposure Time Chunk
  • Timestamp Chunk
  • Line Status All Chunk
  • Counter Value Chunk
  • Sequencer Set Active Chunk
  • CRC Checksum Chunk
All boost CXP-12 camera models Data Chunks feature not supported
All dart BCON for LVDS camera models Data Chunks feature not supported
All dart BCON for MIPI camera models Data Chunks feature not supported
All dart USB 3.0 camera models Data Chunks feature not supported
All pulse USB 3.0 camera models Data Chunks feature not supported

Sample Code

The following source code is provided as an example.

// Enable data chunks
camera.ChunkModeActive.SetValue(true);
// Select and enable Gain All chunk
camera.ChunkSelector.SetValue(ChunkSelector_GainAll);
camera.ChunkEnable.SetValue(true);
// Select and enable Exposure Time chunk
camera.ChunkSelector.SetValue(ChunkSelector_ExposureTime);
camera.ChunkEnable.SetValue(true);
// Select and enable Timestamp chunk
camera.ChunkSelector.SetValue(ChunkSelector_Timestamp);
camera.ChunkEnable.SetValue(true);
// Select and enable Line Status All chunk
camera.ChunkSelector.SetValue(ChunkSelector_LineStatusAll);
camera.ChunkEnable.SetValue(true);
// Select and enable Trigger Input Counter chunk
camera.ChunkSelector.SetValue(ChunkSelector_Triggerinputcounter);
camera.ChunkEnable.SetValue(true);
// Select and enable Frame Counter chunk
camera.ChunkSelector.SetValue(ChunkSelector_Framecounter);
camera.ChunkEnable.SetValue(true);
// Select and enable Sequence Set Index chunk
camera.ChunkSelector.SetValue(ChunkSelector_SequenceSetIndex);
camera.ChunkEnable.SetValue(true);
// Select and enable CRC checksum chunk
camera.ChunkSelector.SetValue(ChunkSelector_PayloadCRC16);
camera.ChunkEnable.SetValue(true);
// Enable Chunk Mode Active
camera.ChunkModeActive.SetValue(true);
// Select and enable Gain chunk
camera.ChunkSelector.SetValue(ChunkSelector_Gain);
camera.ChunkEnable.SetValue(true);
// Select and enable Exposure Time chunk
camera.ChunkSelector.SetValue(ChunkSelector_ExposureTime);
camera.ChunkEnable.SetValue(true);
// Select and enable Timestamp chunk
camera.ChunkSelector.SetValue(ChunkSelector_Timestamp);
camera.ChunkEnable.SetValue(true);
// Select and enable Line Status All chunk
camera.ChunkSelector.SetValue(ChunkSelector_LineStatusAll);
camera.ChunkEnable.SetValue(true);
// Select and enable Counter Value chunk
camera.ChunkSelector.SetValue(ChunkSelector_CounterValue);
camera.ChunkEnable.SetValue(true);
// Select and enable Sequencer Set Active chunk
camera.ChunkSelector.SetValue(ChunkSelector_SequencerSetActive);
camera.ChunkEnable.SetValue(true);
// Select and enable CRC checksum chunk
camera.ChunkSelector.SetValue(ChunkSelector_PayloadCRC16);
camera.ChunkEnable.SetValue(true);
INodeMap& nodemap = camera.GetNodeMap();
// Enable data chunks
CBooleanPtr(nodemap.GetNode("ChunkModeActive"))->SetValue(true);
// Select and enable Gain All chunk
CEnumerationPtr(nodemap.GetNode("ChunkSelector"))->FromString("GainAll");
CBooleanPtr(nodemap.GetNode("ChunkEnable"))->SetValue(true);
// Select and enable Exposure Time chunk
CEnumerationPtr(nodemap.GetNode("ChunkSelector"))->FromString("ExposureTime");
CBooleanPtr(nodemap.GetNode("ChunkEnable"))->SetValue(true);
// Select and enable Timestamp chunk
CEnumerationPtr(nodemap.GetNode("ChunkSelector"))->FromString("Timestamp");
CBooleanPtr(nodemap.GetNode("ChunkEnable"))->SetValue(true);
// Select and enable Line Status All chunk
CEnumerationPtr(nodemap.GetNode("ChunkSelector"))->FromString("LineStatusAll");
CBooleanPtr(nodemap.GetNode("ChunkEnable"))->SetValue(true);
// Select and enable Trigger Input Counter chunk
CEnumerationPtr(nodemap.GetNode("ChunkSelector"))->FromString("Triggerinputcounter");
CBooleanPtr(nodemap.GetNode("ChunkEnable"))->SetValue(true);
// Select and enable Frame Counter chunk
CEnumerationPtr(nodemap.GetNode("ChunkSelector"))->FromString("Framecounter");
CBooleanPtr(nodemap.GetNode("ChunkEnable"))->SetValue(true);
// Select and enable Sequence Set Index chunk
CEnumerationPtr(nodemap.GetNode("ChunkSelector"))->FromString("SequenceSetIndex");
CBooleanPtr(nodemap.GetNode("ChunkEnable"))->SetValue(true);
// Select and enable CRC checksum chunk
CEnumerationPtr(nodemap.GetNode("ChunkSelector"))->FromString("PayloadCRC16");
CBooleanPtr(nodemap.GetNode("ChunkEnable"))->SetValue(true);
// Enable Chunk Mode Active
CBooleanPtr(nodemap.GetNode("ChunkModeActive"))->SetValue(true);
// Select and enable Gain chunk
CEnumerationPtr(nodemap.GetNode("ChunkSelector"))->FromString("Gain");
CBooleanPtr(nodemap.GetNode("ChunkEnable"))->SetValue(true);
// Select and enable Exposure Time chunk
CEnumerationPtr(nodemap.GetNode("ChunkSelector"))->FromString("ExposureTime");
CBooleanPtr(nodemap.GetNode("ChunkEnable"))->SetValue(true);
// Select and enable Timestamp chunk
CEnumerationPtr(nodemap.GetNode("ChunkSelector"))->FromString("Timestamp");
CBooleanPtr(nodemap.GetNode("ChunkEnable"))->SetValue(true);
// Select and enable Line Status All chunk
CEnumerationPtr(nodemap.GetNode("ChunkSelector"))->FromString("LineStatusAll");
CBooleanPtr(nodemap.GetNode("ChunkEnable"))->SetValue(true);
// Select and enable Counter Value chunk
CEnumerationPtr(nodemap.GetNode("ChunkSelector"))->FromString("CounterValue");
CBooleanPtr(nodemap.GetNode("ChunkEnable"))->SetValue(true);
// Select and enable Sequencer Set Active chunk
CEnumerationPtr(nodemap.GetNode("ChunkSelector"))->FromString("SequencerSetActive");
CBooleanPtr(nodemap.GetNode("ChunkEnable"))->SetValue(true);
// Select and enable CRC checksum chunk
CEnumerationPtr(nodemap.GetNode("ChunkSelector"))->FromString("PayloadCRC16");
CBooleanPtr(nodemap.GetNode("ChunkEnable"))->SetValue(true);
// Enable data chunks
camera.Parameters[PLCamera.ChunkModeActive].SetValue(true);
// Select and enable Gain All chunk
camera.Parameters[PLCamera.ChunkSelector].SetValue(PLCamera.ChunkSelector.GainAll);
camera.Parameters[PLCamera.ChunkEnable].SetValue(true);
// Select and enable Exposure Time chunk
camera.Parameters[PLCamera.ChunkSelector].SetValue(PLCamera.ChunkSelector.ExposureTime);
camera.Parameters[PLCamera.ChunkEnable].SetValue(true);
// Select and enable Timestamp chunk
camera.Parameters[PLCamera.ChunkSelector].SetValue(PLCamera.ChunkSelector.Timestamp);
camera.Parameters[PLCamera.ChunkEnable].SetValue(true);
// Select and enable Line Status All chunk
camera.Parameters[PLCamera.ChunkSelector].SetValue(PLCamera.ChunkSelector.LineStatusAll);
camera.Parameters[PLCamera.ChunkEnable].SetValue(true);
// Select and enable Trigger Input Counter chunk
camera.Parameters[PLCamera.ChunkSelector].SetValue(PLCamera.ChunkSelector.Triggerinputcounter);
camera.Parameters[PLCamera.ChunkEnable].SetValue(true);
// Select and enable Frame Counter chunk
camera.Parameters[PLCamera.ChunkSelector].SetValue(PLCamera.ChunkSelector.Framecounter);
camera.Parameters[PLCamera.ChunkEnable].SetValue(true);
// Select and enable Sequence Set Index chunk
camera.Parameters[PLCamera.ChunkSelector].SetValue(PLCamera.ChunkSelector.SequenceSetIndex);
camera.Parameters[PLCamera.ChunkEnable].SetValue(true);
// Select and enable CRC checksum chunk
camera.Parameters[PLCamera.ChunkSelector].SetValue(PLCamera.ChunkSelector.PayloadCRC16);
camera.Parameters[PLCamera.ChunkEnable].SetValue(true);
// Enable Chunk Mode Active
camera.Parameters[PLCamera.ChunkModeActive].SetValue(true);
// Select and enable Gain chunk
camera.Parameters[PLCamera.ChunkSelector].SetValue(PLCamera.ChunkSelector.Gain);
camera.Parameters[PLCamera.ChunkEnable].SetValue(true);
// Select and enable Exposure Time chunk
camera.Parameters[PLCamera.ChunkSelector].SetValue(PLCamera.ChunkSelector.ExposureTime);
camera.Parameters[PLCamera.ChunkEnable].SetValue(true);
// Select and enable Timestamp chunk
camera.Parameters[PLCamera.ChunkSelector].SetValue(PLCamera.ChunkSelector.Timestamp);
camera.Parameters[PLCamera.ChunkEnable].SetValue(true);
// Select and enable Line Status All chunk
camera.Parameters[PLCamera.ChunkSelector].SetValue(PLCamera.ChunkSelector.LineStatusAll);
camera.Parameters[PLCamera.ChunkEnable].SetValue(true);
// Select and enable Counter Value chunk
camera.Parameters[PLCamera.ChunkSelector].SetValue(PLCamera.ChunkSelector.CounterValue);
camera.Parameters[PLCamera.ChunkEnable].SetValue(true);
// Select and enable Sequencer Set Active chunk
camera.Parameters[PLCamera.ChunkSelector].SetValue(PLCamera.ChunkSelector.SequencerSetActive);
camera.Parameters[PLCamera.ChunkEnable].SetValue(true);
// Select and enable CRC checksum chunk
camera.Parameters[PLCamera.ChunkSelector].SetValue(PLCamera.ChunkSelector.PayloadCRC16);
camera.Parameters[PLCamera.ChunkEnable].SetValue(true);
// Enable data chunks
Pylon.DeviceSetBooleanFeature(hdev, "ChunkModeActive", true);
// Select and enable Gain All chunk
Pylon.DeviceFeatureFromString(hdev, "ChunkSelector", "GainAll");
Pylon.DeviceSetBooleanFeature(hdev, "ChunkEnable", true);
// Select and enable Exposure Time chunk
Pylon.DeviceFeatureFromString(hdev, "ChunkSelector", "ExposureTime");
Pylon.DeviceSetBooleanFeature(hdev, "ChunkEnable", true);
// Select and enable Timestamp chunk
Pylon.DeviceFeatureFromString(hdev, "ChunkSelector", "Timestamp");
Pylon.DeviceSetBooleanFeature(hdev, "ChunkEnable", true);
// Select and enable Line Status All chunk
Pylon.DeviceFeatureFromString(hdev, "ChunkSelector", "LineStatusAll");
Pylon.DeviceSetBooleanFeature(hdev, "ChunkEnable", true);
// Select and enable Trigger Input Counter chunk
Pylon.DeviceFeatureFromString(hdev, "ChunkSelector", "Triggerinputcounter");
Pylon.DeviceSetBooleanFeature(hdev, "ChunkEnable", true);
// Select and enable Frame Counter chunk
Pylon.DeviceFeatureFromString(hdev, "ChunkSelector", "Framecounter");
Pylon.DeviceSetBooleanFeature(hdev, "ChunkEnable", true);
// Select and enable Sequence Set Index chunk
Pylon.DeviceFeatureFromString(hdev, "ChunkSelector", "SequenceSetIndex");
Pylon.DeviceSetBooleanFeature(hdev, "ChunkEnable", true);
// Select and enable CRC checksum chunk
Pylon.DeviceFeatureFromString(hdev, "ChunkSelector", "PayloadCRC16");
Pylon.DeviceSetBooleanFeature(hdev, "ChunkEnable", true);
// Enable Chunk Mode Active
Pylon.DeviceSetBooleanFeature(hdev, "ChunkModeActive", true);
// Select and enable Gain chunk
Pylon.DeviceFeatureFromString(hdev, "ChunkSelector", "Gain");
Pylon.DeviceSetBooleanFeature(hdev, "ChunkEnable", true);
// Select and enable Exposure Time chunk
Pylon.DeviceFeatureFromString(hdev, "ChunkSelector", "ExposureTime");
Pylon.DeviceSetBooleanFeature(hdev, "ChunkEnable", true);
// Select and enable Timestamp chunk
Pylon.DeviceFeatureFromString(hdev, "ChunkSelector", "Timestamp");
Pylon.DeviceSetBooleanFeature(hdev, "ChunkEnable", true);
// Select and enable Line Status All chunk
Pylon.DeviceFeatureFromString(hdev, "ChunkSelector", "LineStatusAll");
Pylon.DeviceSetBooleanFeature(hdev, "ChunkEnable", true);
// Select and enable Counter Value chunk
Pylon.DeviceFeatureFromString(hdev, "ChunkSelector", "CounterValue");
Pylon.DeviceSetBooleanFeature(hdev, "ChunkEnable", true);
// Select and enable Sequencer Set Active chunk
Pylon.DeviceFeatureFromString(hdev, "ChunkSelector", "SequencerSetActive");
Pylon.DeviceSetBooleanFeature(hdev, "ChunkEnable", true);
// Select and enable CRC checksum chunk
Pylon.DeviceFeatureFromString(hdev, "ChunkSelector", "PayloadCRC16");
Pylon.DeviceSetBooleanFeature(hdev, "ChunkEnable", true);
/* Macro to check for errors */
#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)
GENAPIC_RESULT errRes = GENAPI_E_OK;  /* Return value of pylon methods */
/* Enable data chunks */
errRes = PylonDeviceSetBooleanFeature(hdev, "ChunkModeActive", 1);
CHECK(errRes);
/* Select and enable Gain All chunk */
errRes = PylonDeviceFeatureFromString(hdev, "ChunkSelector", "GainAll");
CHECK(errRes);
errRes = PylonDeviceSetBooleanFeature(hdev, "ChunkEnable", 1);
CHECK(errRes);
/* Select and enable Exposure Time chunk */
errRes = PylonDeviceFeatureFromString(hdev, "ChunkSelector", "ExposureTime");
CHECK(errRes);
errRes = PylonDeviceSetBooleanFeature(hdev, "ChunkEnable", 1);
CHECK(errRes);
/* Select and enable Timestamp chunk */
errRes = PylonDeviceFeatureFromString(hdev, "ChunkSelector", "Timestamp");
CHECK(errRes);
errRes = PylonDeviceSetBooleanFeature(hdev, "ChunkEnable", 1);
CHECK(errRes);
/* Select and enable Line Status All chunk */
errRes = PylonDeviceFeatureFromString(hdev, "ChunkSelector", "LineStatusAll");
CHECK(errRes);
errRes = PylonDeviceSetBooleanFeature(hdev, "ChunkEnable", 1);
CHECK(errRes);
/* Select and enable Trigger Input Counter chunk */
errRes = PylonDeviceFeatureFromString(hdev, "ChunkSelector", "Triggerinputcounter");
CHECK(errRes);
errRes = PylonDeviceSetBooleanFeature(hdev, "ChunkEnable", 1);
CHECK(errRes);
/* Select and enable Frame Counter chunk */
errRes = PylonDeviceFeatureFromString(hdev, "ChunkSelector", "Framecounter");
CHECK(errRes);
errRes = PylonDeviceSetBooleanFeature(hdev, "ChunkEnable", 1);
CHECK(errRes);
/* Select and enable Sequence Set Index chunk */
errRes = PylonDeviceFeatureFromString(hdev, "ChunkSelector", "SequenceSetIndex");
CHECK(errRes);
errRes = PylonDeviceSetBooleanFeature(hdev, "ChunkEnable", 1);
CHECK(errRes);
/* Select and enable CRC checksum chunk */
errRes = PylonDeviceFeatureFromString(hdev, "ChunkSelector", "PayloadCRC16");
CHECK(errRes);
errRes = PylonDeviceSetBooleanFeature(hdev, "ChunkEnable", 1);
CHECK(errRes);
/* Enable Chunk Mode Active */
errRes = PylonDeviceSetBooleanFeature(hdev, "ChunkModeActive", 1);
CHECK(errRes);
/* Select and enable Gain chunk */
errRes = PylonDeviceFeatureFromString(hdev, "ChunkSelector", "Gain");
CHECK(errRes);
errRes = PylonDeviceSetBooleanFeature(hdev, "ChunkEnable", 1);
CHECK(errRes);
/* Select and enable Exposure Time chunk */
errRes = PylonDeviceFeatureFromString(hdev, "ChunkSelector", "ExposureTime");
CHECK(errRes);
errRes = PylonDeviceSetBooleanFeature(hdev, "ChunkEnable", 1);
CHECK(errRes);
/* Select and enable Timestamp chunk */
errRes = PylonDeviceFeatureFromString(hdev, "ChunkSelector", "Timestamp");
CHECK(errRes);
errRes = PylonDeviceSetBooleanFeature(hdev, "ChunkEnable", 1);
CHECK(errRes);
/* Select and enable Line Status All chunk */
errRes = PylonDeviceFeatureFromString(hdev, "ChunkSelector", "LineStatusAll");
CHECK(errRes);
errRes = PylonDeviceSetBooleanFeature(hdev, "ChunkEnable", 1);
CHECK(errRes);
/* Select and enable Counter Value chunk */
errRes = PylonDeviceFeatureFromString(hdev, "ChunkSelector", "CounterValue");
CHECK(errRes);
errRes = PylonDeviceSetBooleanFeature(hdev, "ChunkEnable", 1);
CHECK(errRes);
/* Select and enable Sequencer Set Active chunk */
errRes = PylonDeviceFeatureFromString(hdev, "ChunkSelector", "SequencerSetActive");
CHECK(errRes);
errRes = PylonDeviceSetBooleanFeature(hdev, "ChunkEnable", 1);
CHECK(errRes);
/* Select and enable CRC checksum chunk */
errRes = PylonDeviceFeatureFromString(hdev, "ChunkSelector", "PayloadCRC16");
CHECK(errRes);
errRes = PylonDeviceSetBooleanFeature(hdev, "ChunkEnable", 1);
CHECK(errRes);

You can also use the pylon Viewer to easily set the parameters.