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

We appreciate your patience as we improve our online experience.

Example Code

Get Section of Waveform Channel in DIAdem

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit


  • Diadem

Code and Documents




This VB script will create a new waveform channel from a section of another channel while keeping the time data intact.



The VB script follows this KnowlegeBase article. This example is a workaround because DIAdem does not save the time data when you make a new channel from a section of waveform data. The next edition will include using the cursors or flags to identify what section of the Waveform channel to duplicate.



  • DIAdem


Steps to Implement or Execute Code

  1. Open in DIAdem SCRIPT
  2. Change constants as needed
  3. Load channel you with to take a section of
  4. Set Active Channel Group in Data Portal
  5. Run script
  6. See new channel that is generated by the script



 **This document has been updated to meet the current required format for the NI Code Exchange.**


Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.