From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Counting number of 1's present in digital waveform obtained by converting the pulse signals.

Solved!
Go to solution

Hello,

I am using Analogtodigital.Vi for converting the pulse sequences into digital.signals.I am able to get the digital waveform representaion of the pulses.

But how to count the number of 1's present in the converted digital waveform.I want to count the number of 1's present in the converted digital waveform.

 

Thanks in Advance.

0 Kudos
Message 1 of 3
(2,549 Views)
Solution
Accepted by topic author GoviRe

Did you try opening the block diagram of Analog to Digital.vi? 

 

It creates an uncompressed 2D array of 1s and 0s which represents the 16-bit binary A/D conversion of each element in the Y array of the input waveform. You can use the DWDT Digital to Boolean Array.vi to convert to a 2D array of booleans. Then convert the booleans to 1,0 and sum the array of integers. The sum should be the count of 1s in the digital waveform.

 

Lynn

 

Note: The attached VI is saved back to version 8.6. When I saved it for Previous Version a warning was generated about possible differences in versions. Let me know if it does not work, and what version of LV you are using.

0 Kudos
Message 2 of 3
(2,538 Views)

Thankyou,Its working for me.

0 Kudos
Message 3 of 3
(2,511 Views)