Example Code

Round All Values in a Numeric DIAdem Channel to a Specified Decimal Place Using DIAdem SCRIPT

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 ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview
This program open a certain URL with Open URL in Default Browser VI


Description
This is Gold Rings, when you change the picture, then it will open a certain URL.


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

1.Change the picture

2.Run the VI

 

 

 

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

 

 

Daniel Dorroh
National Instruments

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

Comments
SEVEN_X
Member
Member
on

The following code faster.

  Call Calculate("truncChannel=Round(dataChannel,3)", _
    Array("dataChannel", "truncChannel"), _
    Array(Data.Root.ChannelGroups(1).Channels("dataChannel"), _
      Data.Root.ChannelGroups(1).Channels.Add("truncChannel", DataTypeFloat64)))

FelixHC
Member
Member
on

In my case (channels in group 1, rounds to 3 decimals), the following code is simple and very fast:

ChnCalculate("Ch(""[1]/TruncChannel"") = Round(Ch(""[1]/DataChannel""),3)")