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

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.
Solved!
Go to Solution.

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.
Attachments:
Count bits.vi ‏25 KB

Similar Messages

  • Directly convert the analog signals into digital without passing through FPGA

    To whom it may concern,
    I am using a SCB-68 board R-series and I have a couple of technical questions:
    In my system at the moment 8 analog channels are connected to the 8 input analog ports and then data are sent to a FPGA (PXI system 7852R). I am planning now to add other 4 channels to the system. Since over the total 12 channels I just need a very fast acquisition mode (using the FPGA) for 6 of them, while the other 6 can be sampled in a ms scale, I was wondering if you can suggest me something that I can use to directly convert the analog signals into digital and in this way used many unused digital signals provided with this model.
    Thanks in advance.

    yes it is correct, what do you need is:
    software + (pc) + PXI + cable + chassis + C-series module
    With embedded controllers, there’s no need for an external PC
    With PXI remote control kits, you can control PXI systems directly from desktops, laptops, or server computers.
     What Is PXI?
    To configure a complete PXI System please go to: Build Your PXI System

  • How to split digital waveform channels?

    Hi , could you please let me know how can I split the digital channels of a digital waveform(Let's say the digital waveform has 6 channels ) and graph them seperately.
    It is very easy to split analog waveform signals ( acquired using N channel N sample) but I don't know how to do it for digital waveforms. 

    tintin_99 wrote:
    Let's say I have acquired the digital signal at 1MS/s / Now I want to decimate the number of samples to 1kS/s. Again I know how to do it for analog signal using the decimate function. Do you know a way to do it on a digital signal?
    Decimation make sense only to ANALOG signals, as ANALOG signal are continuous and can have any value (within defined range) on the other hand, DIGITAL signals can have just two states (0 or 1), so when you talk about decimating a DIGITAL signal, you need to come up with an algorithm, how you want to knock off the sample data points (say every alternate sample)....!!
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.

  • Convert digital waveform to array

    Hello,
    I posted a problem before Christmas regarding data acquisition and accessing the hardware buffer on a 6562 card. I managed to figure out that problem but now I'm stuck when I try manipulating the data I obtain. (The original problem can be seen here: http://forums.ni.com/ni/board/message?board.id=70&​thread.id=7926)
    Briefly, my application is clocking and synchronising an ADC board and then looking at the raw ADC data that comes back from the board. To provide synchronisation I am sending a sync pattern on one data line and using a second line to send a "start of frame" indicator, a '1' bit when I know that the board is synchronised. This line otherwise only sends ‘0’s. This cable is wired back into the NI card and LabView. All data sent uses the NI-SHDIO Generation Express VI and I'm using the Acquisition Express VI in parallel with the Generation VI to capture the raw ADC data when it comes off the ADC board. Since I am acquiring both the ADC data and the frame indication data (which I am looping by connecting that output DIO to an input DIO), the digital waveform essentially contains 2 arrays and I can view these from a graph indicator within LabView.
    No problems so far. In order to manipulate the data and look at individual frames I am writing the ADC data to file. To extract the digital data from the digital waveform I am using the following VIs:
    -Get Waveform Components
    -Get Digital Data Components
    -Write to Binary File
    To view and manipulate the data I read it into Matlab and this is where I can tell that something's not right. When I read the file into a variable in Matlab, the variable becomes a 1D double array of 40,008 elements. This seems very odd, considering the Acquisition VI only takes 20,000 samples. When I look at the 1D array more closely it looks like the two arrays have been cross added in some fashion. The 1D array certainly doesn't match either of the two arrays visible in the graph indicator inside LabView. I can understand if the file is reading one array after the other (20,000 + 20,000 almost equals 40,008 after all) but that doesn't appear to be the case.
    I would greatly appreciate some help on how I can extract the two data lines either using Matlab or LabView. Currently it looks like LabView is making a hash of things whenever I try to manipulate or extract the two arrays from the digital waveform. I have tried a multitude of different VIs and ideas but nothing appears to work.
    The most straight forward way would be using the "Converting Digital Waveform to Binary VI" but it can't handle two arrays within the same waveform. (The result looks like the two arrays exclusively OR’d together). To combat this I tried running two Acquisition Express VIs in parallel (one for ADC data, the other for the frame info) but got an error message referring to invalid handles. I presumed this meant that I can't run two acquisition VIs simultaneously, judging from forum posts of users facing the same error message.
    Sorry for the long post but I feel that I needed to fully explain the problem. I'm attaching my LabView code.
    Thank you for reading,
    Christian
    PS. GenAcq2.vi is my code. Waveform_GenAcq2_Cfg.hws is sent by the first Generation VI; Waveform_GenAcq2_shorter_frame_indicators.hws by the second Generation VI.
    Attachments:
    CodeAndWaveforms.zip ‏126 KB
    GenAcq_Screenshot.JPG ‏83 KB

    The extra "8" is being caused by the fact that the "Write to Binary File" VI has a "prepend array or string size" input. Its default is true, and in your case you have it unwired, so you get the array size prepended. As for the rest of your issue, what are your Matlab commands to read a file? The following example VI, which generates a digital waveform and saves it to file,
    can be correctly read into Matlab using the following commands:
    fid = fopen('c:\temp\digData.bin','r');
    F=fread(fid, [256,8], 'uchar');
    Message Edited by smercurio_fc on 01-18-2008 05:26 PM
    Attachments:
    Example_VI_BD.png ‏11 KB

  • How to send digital waveform to the DAC?

    How to send digital waveform, obtained by Function Generator.vi to the Digital-Analog Converter? What kind of subVIs I have to use for this? I have LabView_5.0 on MacOS.

    The 6032 is not a GPIB board. It is a DAQ board board and has 2 16-bit analog outputs, 8 16-bit outputs (16 single-ended), and 8 digital i/o lines. I don't know what you mean that a MIO16/LPM16 is connected to it. There are a lot of example VIs that ship with LabVIEW. Select Find Examples from the help menu and look under Hardware Input and Output. LabVIEW 7 has some under DAQmx>Analog Generation and older versions of LabVIEW have them under DAQ>Analog Output.

  • I2C Digital Waveform Library Timing Parameters

    Does anyone know how the cluster of "I2C Timing (ns)" is being done in the following code?  It is an abridged version of the example VI "HSDIO I2C - Hardware Compare.vi" downloaded from here.  It uses the I2C Digital Waveform Reference Libarary.
    The time on the X-Axis does not seem to be any help, and the front panel parameters are very cryptic in their naming system.  Does anyone know what all those numbers mean and how it correlates to the actual times (dt) between each point?
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    If someone helped you out, please select their post as the solution and/or give them Kudos!
    Solved!
    Go to Solution.

    I finally found where the parameters are specified.  They can be found in the UM10204 I2C-bus specification and user manual.
    Under the current revision 5, it is found in Table 10 on page 48:
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    If someone helped you out, please select their post as the solution and/or give them Kudos!

  • Equivalent of Split Signals for digital waveform

    Hi , I read multi digital waveforms in a loop and I would like to split the channels. For analog waveform I can simply use split signals control. How about digital waveform, is there any equivalent for digital channels?

    You can use firstly "Digital to Boolean Array VI" to get a 2D boolean aray equivalent of Digital Waveform samples...!!
    But remember at this step, the sampling rate information (dt) will be lost (after you've converted the digital waveform to 2d array of boolean)...
    Now next, if I'm not wrong, here each column would represent different waveforms...!!
    At last, you can use "Boolean Array to Digital VI" to convert 2d array of boolean back to digital waveform...!! You will require dt (sampling rate info) here at this step...!!
    Additionaly to extract sampling rate info from the digital waveform, before you convert it to boolean array, you can use "Get Waveform Components (Digital Waveform) Function"
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.

  • JTAG Digital Waveform transfered using USB or parallel port ?

    Hi all
    I was wondering if there is a way to send JTAG Digital Waveforms generated by LabVIEW into a parallel port or USB port.  I know that there is a way to use DAQmx devices with JTAG Digital Waveforms where DAQmx drivers take JTAG Digital Waveforms and transfer that into physical signals which is then send to UUT.  I really am in a need to try to mimic whatever a DAQmx can do to make that happen with a parallel port or usb port. I would really appreciate if you can help me it is very urgent.
    Thanks

    Hi Cristopher
    I do really appreciate for a quick response. I am full aware of the fact that NI products for digital waveform generation will do the job, plus it is easier to implement them. However my goal is to use an inexpensive device that can generate external timing and my JTAG library and make .exe files from my final code and distribute that setup for several computers in factory. So buying several digital waveform generators from NI for each PC in factory will be a very expensive option. I think now you have a better picture why I am trying to find another inexpensive way to implement these digital waveforms using JTAG library. It would be ideal if I can use parallel port with some external timing to do the trick but I am really not sure where to start. Cirstopher I would really appreciate if you can come up with any suggestions in regards to this problem that I am having.
    Thanks again.

  • How to count number of NI digitizers installed [NI-DAQmx Base]

    I'm the author of a cross-platform scientific data acquisition/analysis program (C++ using Qt: Windows and OS X). I'm just getting started on adding support for NI digitizers. It's tougher than I was expecting - there's so few helpful code examples. On Mac OS X I'm stuck with NI-DAQmx Base. I'd be very grateful if someone could help me with a couple of basic questions...
    1) How do you determine if the computer has an NI digitizer installed?
    1a) Is there a way to count the number installed?
    2) How do you synchronize things so that the input and output streams start at the same sample point?
    Thanks,
    John.
    Dr John Clements
    Lead Programmer
    AxoGraph Scientific

    Hi John,
    DAQmx base does not have property nodes, therefore we cannot
    programmatically determine information about the cards. We typically refer to
    our high-speed scopes (51xx series) as digitzers, in which case, there are no
    drivers for MAC. Our other DAQ cards, E-Series (60xx) and M-Series (62xx) work
    with DAQmx base according to the readme.
    If you are using a DAQ card, I would like a bit more clarification about question 2. When you say start at the same sample point, do you mean start simultaneously so that the input and output start at the exact same point in time? If so, I may suggest triggering them both off of the same digital line.
    David L.
    Systems Engineering
    National Instruments

  • How to Count number of words in a file....

    Hi Experts,
    I have uploaded the text file, from the application server, like this: 
    call function 'GUI_UPLOAD'
      exporting
        filename = LV_ip_FILENAME
      tables
        data_tab = LT_FILETABLE.
    The text file contains some number character words....  like "sap labs india..... "
    Now, I wanted to count number of words in an internal table  LT_FILETABLE....  can anybody help me?

    Hi,
    Special Characters in Regular Expressions
    The following tables summarize the special characters in regular expressions:
    Escape character
    Special character Meaning
    Escape character for special characters
    Special character for single character strings
    Special character Meaning
    . Placeholder for any single character
    C Placeholder for any single character
    d Placeholder for any single digit
    D Placeholder for any character other than a digit
    l Placeholder for any lower-case letter
    L Placeholder for any character other than a lower-case letter
    s Placeholder for a blank character
    S Placeholder for any character other than a blank character
    u Placeholder for any upper-case letter
    U Placeholder for any character other than an upper-case letter
    w Placeholder for any alphanumeric character including _
    W Placeholder for any non-alphanumeric character except for _
    [ ] Definition of a value set for single characters
    [^ ] Negation of a value set for single characters
    [ - ] Definition of a range in a value set for single characters
    [ [:alnum:] ] Description of all alphanumeric characters in a value set
    [ [:alpha:] ] Description of all letters in a value set
    [ [:blank:] ] Description for blank characters and horizontal tabulators in a value set
    [ [:cntrl:] ] Description of all control characters in a value set
    [ [:digit:] ] Description of all digits in a value set
    [ [:graph:] ] Description of all graphic special characters in a value set
    [ [:lower:] ] Description of all lower-case letters in a value set
    [ [:print:] ] Description of all displayable characters in a value set
    [ [:punct:] ] Description of all punctuation characters in a value set
    [ [:space:] ] Description of all blank characters, tabulators, and carriage feeds in a value set
    [ [:unicode:] ] Description of all Unicode characters in a value set with a code larger than 255
    [ [:upper:] ] Description of all upper-case letters in a value set
    [ [:word:] ] Description of all alphanumeric characters in a value set, including _
    [ [:xdigit:] ] Description of all hexadecimal digits in a value set
    a f
          v Diverse platform-specific control characters
    [..] Reserved for later enhancements
    [==] Reserved for later enhancements
    u2192 More
    Special characters for character string patterns
    Special character Meaning
    Concatenation of n single characters
    {n,m} Concatenation of at least n and a maximum of m single characters
    {n,m}? Reserved for later enhancements
    ? One or no single characters
    Concatenation of any number of single characters including 'no characters'
    *? Reserved for later enhancements
    + Concatenation of any number of single characters excluding 'no characters'
    +? Reserved for later enhancements
    | Linking of two alternative expressions
    ( ) Definition of subgroups with registration
    (?: ) Definition of subgroups without registration
    1, 2, 3 ... Placeholder for the register of subgroups
    Q ... E Definition of a string of literal characters
    (? ... ) Reserved for later enhancements
    for more details please refer the following,
    [http://help.sap.com/abapdocu_70/en/ABENREGEX_SYNTAX_SIGNS.htm]
    [http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/902ce392-dfce-2d10-4ba9-b4f777843182?QuickLink=index&overridelayout=true]
    Thanks,
    Renuka S.

  • How to count number of edges using PXIe-6363 Counters

    Hello,
    I am trying to count number of edges in a test signal in a 50 ms duration. I am using PXIe-6363 card and connecting the test signal to CTR 0 SRC (PFI 8). Is it a correct connection? What else do I need hardware-wise to make a correct set up for this application?
    Thanks
    Jeet
    Solved!
    Go to Solution.

    Hi Jeet,
    When you say interrupt signal, do you mean a pulse that will pause your counter task? If that is the case, and you want to pause your task with a digital pulse, you need to use the DAQmx Trigger Property Node and set that to Pause, Trigger Type. As you said, you can connect that signal coming from the chip to any PFI line and then set that line as the source of the property node.
    There is an example that you can use that does exactly what I just described. This example is called Count Digital Events-Pause Trig.vi, and you can find it by going to Help>Find Examples..., then on the NI Example Finder window go to the Browse tab and navigate in the folders to Hardware Input and Outpout\DAQmx\Counter Measurements\Count Digital Events.
    Regards.
    Jorge
    Applications Engineer
    National Instruments
    Certified LabVIEW Associate Developer (CLAD)

  • Counting number of processor?

    Hello
    Can I count number of CPU using java? Is there any library which has this ability? Thank you very much in advance.
    Regards,
    Tinnapat C.

    In the forthcoming version of J2SDK 1.5 there will be a package named java.lang.management, and an interface called OperatingSystemMXBean. One of its methods returns the number of CPUs available to the instance of the JVM running.
    It depends on the processor count reported by the operating system. If you have a Pentium 4 with hyperthreading enabled your operating system reports 2 "logical" CPUs although you know that you have just only a physical CPU chip in your machine. As I haven't tested the "getAvailableProcessors" method in a HT machine I can't say exactly the result, if the getAvailableProcessors returns the number of logical CPUs or physical CPUs.
    (Obviously if you have a machine with 32 CPUs but you're running in a "domain" or a "virtual machine" that do not expose all CPUs to your process, or if some of the CPUs are disabled (it's a common fact among IBM server machines - the CPU chips are physically present, but don't work - just pay for the additional CPUs and they will unlock them), the JVM will report a smaller number. It depends in the hardware.)
    public interface OperatingSystemMXBeanThe management interface for the operating system on which the Java virtual machine is running.
    A Java virtual machine has a single instance of the implementation class of this interface. This instance implementing this interface is an MXBean that can be obtained by calling the ManagementFactory.getOperatingSystemMXBean() method or from the platform MBeanServer method.
    int getAvailableProcessors()
    Returns the number of processors available to the Java virtual machine.

  • How to count number of sales orders generated in a month in SAP SD

    Hi SD Gurus,
    I have a very strange query from client. I have to count the number of sales order created in a month for a z report. For example 30 in Jan, 25 in Feb etc. Could anyone suggest me How to count number of sales orders generated in a month in SAP SD.
    Regards
    Vinod Kumar

    Hi,
    Goto the T.Code "SE16" or "SE16n" or "SE11".
    Enter the table name as VBAK
    Enter the created on date as the starting date of the period and to date as the end date.
    Enter.
    Click on "Number of Entries".It will tell you the number of entries created in a particular period.
    If you want a report,goto the T.Code "VA05n".
    Regards,
    Krishna.

  • How to Count Number of completed line items in past 6 months / 12 months ?

    How to Count Number of completed line items in past 6 months / 12 months ?
    Hi,
    I am trying to count "Number of Completed Line Items in Purchase Order Document" for my Key Figure ZPO_CNT.
    Purchase Order document = ZEBELN
    Line Item = ZEBELP.
    I need to find and count if the Line Item has been received in the past 6 months from today and similarly in the past 12 months.
    I have "Delivery Completed" field, ELIKZ.
    So, based on this would I be able to calculate it in Query Designer?
    If so, Please let me know how

    Hello Deva
    If youe want to calculate the completed line item for last 6 or 12 month then i think u will be displaying the query data for these montrhs...create a customer exit to give you date range and restric it in filter area....
    Now Choose any of the below option
    1. I would suggest to implement an additional key figure "counter" in cube and fill values with one for which delivery is completed.
    Now use calculated key figure in Query Designer based on logic
    IF counter = 1 THEN counter ELSE 0
    OR
    2. create a formula variable based on ELIKZ and use replacement path variable, it will display you no. of docs for which delivery is completed....
    Award points if it solves your problem
    Revert back in case of further assistance...
    Thanks
    Tripple k

  • How to count Number of  completed instances

    Hi all,
    I have one issue regarding *"How to Count Completed instances"* in SOA...
    How can i count the number of completed instances for a interface...Any idea or suggestion plzzzzzz....
    Thanks,
    Raj

    Hi Dariel Pérez ,
    By executing the Querey I'm able to get the State and num_cube instances but when I call this Query in BPEL by using DB adapter I get the following error
    BINDING.JCA-12563 Exception occured when binding was invoked. Exception occured during invocation of JCA binding: “JCA Binding execute of Reference operation ‘CountReq’ failed due to: Pure SQL Exception. Pure SQL Execute of SELECT (CASE WHEN STATE=1 THEN ‘OPEN AND RUNNING’ WHEN STATE=2 THEN ‘OPEN AND SUSPENDED’ WHEN STATE=3 THEN ‘OPEN AND FAULTED’ WHEN STATE=4 THEN ‘CLOSED AND PENDING’ WHEN STATE=5 THEN ‘CLOSED AND COMPLETED’ WHEN STATE=6 THEN ‘CLOSED AND FAUTED’ WHEN STATE=7 THEN ‘CLOSED AND CANCELLED’ WHEN STATE=8 THEN ‘CLOSED AND ABORTED’ WHEN STATE=9 THEN ‘CLOSED AND STALE’ WHEN STATE=10 THEN ‘NON-RECOVERABLE’ ELSE STATE || ” END) AS STATE, COUNT(*) AS NUM_OF_CUBE_INST FROM CUBE_INSTANCE GROUP BY STATE; failed. Caused by java.sql.SQLSyntaxErrorException: ORA-00911: invalid character . The Pure SQL option is for border use cases only and provides simple yet minimal functionality. Possibly try the “Perform an operation on a table” option instead. This exception is considered not retriable, likely due to a modelling mistake. To classify it as retriable instead add property nonRetriableErrorCodes with value “-911″ to your deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers. “. The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.
    Any Suggetions.
    Thanks
    Mani

Maybe you are looking for

  • My iPad wont let me download apps bc security questions, but when I try to make them it freezes

    Every time I try to download an app it tells me I need to update my security questions, but once I click to make the questions the box goes white. So I'm not sure how to fix it

  • Distortion when connecting to recie

    Hi, When I connect my computer speaker to my audigy card, everything is fine. When I connect to my receiver to the line out of the audigy card, I get a lot of distortion. I try changing the speaker setting, for 2 speakers, to 4 speaker, to 5 speakers

  • Condition type date should be same to the pricing procedure date

    hi i have an problem the problem is that condition type date is not same to the pricing procedute date details of the problem 1. created a sales order the pricing date is 01.04.2006 2. when i go conditions in the sales order, as i go for details of t

  • Why no contacts app in iPhone 5S?

    I just got an iPhone 5s.  When I am in my phone app, I have a contacts tab with all of my contacts but I don't have a contacts app anywhere on my home pages nor in the dock.  Does the 5s not have a contacts app?

  • How do I download products I have already bought?

    I took my computer back to MSFT to get rid of a virus and lost the Adobe program in the process. In the past the downloading was done from the list of products I have already bought. Today, there is no download button. How do I download products I al