Learn the number of pulses created in a finite pulse train

Hello
I am using the PCI-6602 Board to produce a finite number of pulses with counter0.
I want to know how many pulses that are already created by the counter, while my program is running and show this number on an indicator on the front panel of my VI.
What is the best way to do this with LabVIEW?
Of course I can use another counter to count the pules and route the output of counter0 to its input.
However I wonder if it is possible to solve the problem without using another counter, because DAQmx internally already uses a second counter to produce the finite pulse train so it should be possible to read this counter, isn't it?
Thanks for every help.

However, I wonder where I can get such detailed Information about the internal functionallity of the DAQ-devices and the DAQmx driver?  Please let me know where you get this information from. (So that I can avoid using this forum in the future)
Speaking just for myself --- the source has been generally the school of hard knocks. I started doing a lot of special timer/counter work right around the Y2K timeframe. The legacy driver now known as traditional NI-DAQ was then the only game in town.   The programming and terminology under trad. NI-DAQ tends to require you to understand the hardware at a lower level.  The programming used more counter-specific terminology like Gate and Source signals.
So for a lot of this stuff, I came into DAQmx with a good understanding of the low-level hardware capabilities, and I just needed to tromp around a bit to find the right syntax.  Consequently, I'm not much help for pointing you toward info sources as I haven't relied on them much.  Meanwhile, good luck with the self-teaching but don't feel compelled to "avoid using this forum in the future."
-Kevin P.
Message Edited by Kevin Price on 11-01-2007 10:04 AM

Similar Messages

  • How to find the number of references created for a given  object ??

    How to find the number of references created for a given object in a big application environment.
    That means, if i give any object name (of my application) as input, then how can i find the[b] number of references created for that particular object ??

    Please do not post the same question multiple times.
    As for your original question, there is no direct way to do it.
    Especially not the way you phrased it,
    since objects don't have "names".
    Applications also don't have "names".
    They have classes and instances.
    Also, there are 2 related issues, and I'm not sure which one is the one you asked.
    #1. Finding the number of references to the same object.
    Eg.
    Map<String,String> a = new HashMap<String,String>();
    Map<String,String> b = new HashMap<String,String>();
    Map<String,String> c = a;In this case, there are only 2 objects.
    The first object has (at least) 2 references pointing to it.
    The second object has (at least) 1 reference pointing to it.
    (There may be more, if the HashMap library keeps
    references to these things, or if the HashMap object has
    some internal cyclic references...)
    If you're asking this, then it can't be done.
    It's an active research topic in universities
    and software research labs, called "alias analysis".
    Type it in google, and you'll see people are working hard
    and having little success so far.
    #2. Finding the number of instances created from a class.
    In this case, what you have to do is to add a counter to
    the constructor of the class. Every time an object is constructed,
    you increment the counter. Like this:
       class MyClass
           public static int counter = 0;
           public MyClass( )  { counter++; }
        // Then later in your program, you can do this:
        MyClass a = new MyClass();
        MyClass b = new MyClass();
        System.out.println(MyClass.counter); // It should show 2Note: you won't be able to do this to every class in the system.
    For every class you care about, you have to modify its constructor.
    Also: when an object is deleted, you won't always know it
    (and thus you won't always be able to decrement the counter).
    Finalizers cannot always work (read Joshua Bloch's
    "Effective Java" book if you don't believe me), but basically
    (1) finalizers will not always be called, and
    (2) finalizers can sometimes cause objects to not be deleted,
    and thus the JVM will run out of memory and crash

  • How to use counters of PCI 6251 to count the number of pulses

    Hello,
    I have inputs from an optical encoder {pulse train} and i need to count the number of pulses for a short period of time to estimate the speed of the DC motor. Could you please tell me how to use the counters in PCI 6251 DAQ. I found something on DAQ STC, whichs says the input pulse should be connected to PF0 {ctr source}, but i have query where do i get the output {number of pulses counted in a particular period of time}.
    Looking for your reply.
    Thanks & Regards,
    bsnr

    Hi bsnr,
    Thanks for the post!
    In MAX (Measurement and Automation Explorer), if you find the device (DAQmx devices) and right-click, you can select pinouts - which should contain a table telling you which pins are what PFI lines.
    Then, in labVIEW, you need to generate some code to use the choosen coutner in a task to count digital edges. If your not sure on this, go to Help>>Find Examples>>Hardware I/O>>DAQmx>>Counters.. and take a look at some of the code provide.
    ps. It seems (maybe just your wording), but your expecting the counter output pin to provide the number of counted edges - this isn't the case.  
    Please let me know what you think?
    Kind Regards, 
    Kind Regards
    James Hillman
    Applications Engineer 2008 to 2009 National Instruments UK & Ireland
    Loughborough University UK - 2006 to 2011
    Remember Kudos those who help!

  • How to change the frequency of pulse train on the fly using an array of values?

    Hi all!
    First I want to thank U for the great job you are doing for this forum.
    Iam still busy trying to control a stepper motor, by sending pulses from my E-series 6024 to a compumotor s6- stepper Driver. I've managed to get it working. I desperately need to control the motor using the values from an array. I believe we can use two approaches for that:
    1st - I can get an array of the "numbers of pulses". Each element must run for 10 milliseconds. Using that we can calculate the array of frequencies to send the number of pulses within 10 milliseconds for each specific element. Could we use the arrays of "number of pulses" and frequencies in a "finite pulse train " and up
    date with each element every 10 millisecond?
    2nd - Or Could we use of the frequency array in a "continuous pulse train vi" and update it every 10 milliseconds?
    Please note that I must use the values as they are.
    Can someone please built a good example for me? Your help will be appreciated.
    Regards
    Chris
    Attachments:
    number_of_steps.txt ‏17 KB
    frequency.txt ‏15 KB

    Tiano,
    I will try to better explain the paragraph on LabVIEW. The original paragraph reads ...
    "While in a loop for continuous pulse train generation, make two calls to Counter Set Attribute.vi to set the values for "pulse spec 1" (constant 14) and "pulse spec 2" (constant 15). Following these calls you would make a call to Counter Control.vi with the control code set to "switch cycle" (constant 7). The attached LabVIEW programs demonstrate this flow."
    You can make two calls to Counter Set Attribute or you can make a call to Set Pulse Specs which, if you open this VI, you will see that it is just making two calls to Counter Set Attribute. What you are doing with the Counter Set Attribute VIs is setting two registers called "pulse s
    pec 1" and "pulse spec 2". These two registers are used to configure the frequency and duty cycle of your output frequency.
    The example program which is attached to this Knowledge Base demonstrates how to change the frequency of a continuous generation on the fly. Why continuous? Because changing the frequency of a finite train would be easy. When the train completes it's finite generation you would just change the frequency and run a finite train again. You would not care about the time delay due to reconfiguration of the counter.
    If you would like to change the frequency of the pulse train using a knob, this functionality will have to be added in the while loop. The while loop will be continuously checking for the new value of the knob and using the knob value to set the pulse specs.
    LabVIEW is a language, and as with learning all new languages (spoken or programatic) there is a lot of learning to be accomplished. The great thing is that LabVIEW is much easier than mo
    st languages and the learning curve should be much smaller. Don't fret, you'll be an expert before you know it. Especially since you're tackling a challenging first project.
    Regards,
    Justin Britten

  • How to find out the number of threads created under java vm at runtime

    our application seems to have hit the max number of threads that can be created under vm and the vm will just hang after that. that behavior seems to be consistent from an article that I read earlier.
    I wonder any way that java app can find out the number of threads currently created under vm?
    thanks in advance!

    If you are not starting an extra thread group you can use the Thread.activeCount method. But this willnot return all the threads, as there are some jvm threads, i.e. garbage collector. Also if you are running on a Unix type operating system then you can send a signal to the jvm to give you a thread dump, i think the signal is sighup.
    If the application is hanging i would of thought that you have a deadlock situation rather then the JVM not being able to create new threads, roughly how many threads should be running ??

  • Learning the number of books you sold?

    I have self-published two books, but all I can find is the sales rankings compared to all the books here. I'd like to know how to view the number of books I've sold.

    Hello OceanWaves - go to My Projects and click on the My Revenue button.  You will see sales for the past 4 weeks. You can also adjust the start and end dates to view specific time periods.

  • Reducing the precision of the number datatype while creating a M view

    Hi,
    I am trying to create a materialized view using the query
    create materialized view mv1 as select cast(empno-7000 as number(3)) empno, sal from emp
    where empno > 7000;
    But after creating the mv the description is shown as below
    SQL> desc mv1
    Name Null? Type
    EMPNO NUMBER
    SAL NUMBER(7,2)
    I need the result empno number(3) instead of number
    Is that possible.
    Poulose

    hey, it worked for me:
    SQL> select * from v$version
    2 /
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
    PL/SQL Release 9.2.0.6.0 - Production
    CORE     9.2.0.6.0     Production
    TNS for Compaq Tru64 UNIX: Version 9.2.0.6.0 - Production
    NLSRTL Version 9.2.0.6.0 - Production
    SQL>
    SQL> create materialized view
    2 num_cast
    3 as select cast (1000 - 700 as number(3)) empno from dual
    4 /
    Materialized view created
    SQL> desc num_cast
    Name Type Nullable
    EMPNO NUMBER(3) Y
    SQL>
    I have a feeling that your oracle version is lower then 9
    Amiel.

  • How to count the number of objects created...

    How many String objects will be created(With explanation please...)
    String s1="abc";
    s1.concat(s1);
    s1.replace('a','z');
    Any help on this will be highly appreciated.
    Thanks

    anox wrote:
    To give this thread a little more value:
    Is there a way to know how many objects were generally created/in use by your program?No. Unless you cound accessing debug information (I'm not even sure you can find it there).

  • Number of document created in th backend in the classic scenario?

    Dear Experts,
    Could you please tell me the number of document and its details created in the ECC backend in the below cases?
    1. Case 1:
    Define backend objects:Purchase requistion created if no stock available.
    Is it correct that the system will create two documents here? The first document will be Purchase Requisition
    ( from the classic scenario) and then a purchase order has to be triggered manually from the PR?
    2. Case 2:
    Define backend objects: Purchase Order if data complete, otherwise Purchase requisition.
    Here, if all the data are complete and the system directly creates Purchase Order in the ECC backend system. From the shopping cart in SRM, one can see only ECC backend purchase order, no purchase requistion. If i check the Purchase Order in ECC backend system, I donot see any purchase requistion with reference to the Purchase Order.
    Could you please help here? What are the number of documents created here? It is one or two (both purchase requisition and Purchase Order).
    Is it not a violation of standard classic scenario if only one document is created?
    Thanks and regards,
    Ranjan

    Hi,
    In other words in the shopping cart is approved
    1) If the source is assigned  -It will create a P.O in  the backend  (Classic)
    2) If the source is NOT assigned  -It will create a P.R in the backend (Classic) .. you have to assign a  source
    Regards
    G.Ganesh Kumar

  • Define the number of single retriggerable pulses

    Hi everybody!
    I generate single retriggerable pulses using a PCI-6602 and BNC-2121 Box (sent to my spectrometer) for my data aquisition.
    For every trigger signal one spectra is aquired by our spec. It is very important to have a defined number of spectra, therefore I have to define the number of pulses in a retriggerable single pulse task.
    Unfortunatly it isn't possible to use a pulse train instead because the jitter of my source is to high so that each pulse has to be retriggered.
    Is there a way to do this?
    Thank you very much for your help!

    Hi Konradeo,
    it is a little bit difficult to understand, what du you want to accomplish. It would much more easier for me and the other forum user, if you could provide use your LabVIEW-Code and a sketch, what du you want to output with your PCI-6602.

  • Finite pulse train generation​... how to count number of pulses?

    hi guys,
    this has probably been solved a hundred times but i just couldnt find it!!
    i have a pulse train generation happening on my ni usb-6211... using FREQ OUT, using a divisor on this, and routing it to PFI4.
    id like to update my VI so i can specify the number of pulses....
    im pretty much a noob at this stuff so any help would be greatly appreciated!! thanks!
    dan
    Attachments:
    pulse train generation.vi ‏25 KB

    Hi,
    No problem at all, we are here to help. What I’m going to do first is to point you to a bunch of examples for that might give you a better insight of the capabilities of the card in terms of finite pulse generation. What you should be looking at is called retriggerable pulse generation and here are some examples to look at: Retriggerable Finite Pause Trigger Digital Pulse Train Generation, Creating a Delayed, Retriggerable and Finite Pulse Generator, DAQmx - Retriggerable Pulse Train Generation - LabVIEW - CVI - ANSI C - VB.NET - C#.NET and Retriggerable Finite Pulse Train with Changing Pulse Specs.
    Let me know it helps
    Jaime Hoffiz
    National Instruments
    Product Expert
    Digital Multimeters and LCR Meters

  • Set number of pulses default 5

    Hello, 
    I have just begun to learn LABVIEW. I would like to ask you for help. 
    I need code for these quistions (not DAX). please help me.
    Thanks,
    1 Set the number of pulses. Default 5 pulses.
    2 Set the duration of the pulse. Default 0.5 (s).
    3 Set the number of points per pulse. Defualt 500 points/pulse

    Hi,
    I have been studing in a colege in Haydarabad of India. This is my toturial. I tried t build the VI but I could not. Please help me to code this. Here is the ful toturial.
    Specification
    To design a VI that can also be used as a Sub VI in another VI.
    The title of the VI will be Pulse Generator.
    The output from the VI will be of the type Analogue Waveform and be capable of being displayed on an appropriate Waveform Graph.
    The Analogue waveform will represent a continuously adjustable single pulse or multiple pulse train.
    The inputs to the VI will perform the following functions:
    1)      Set the number of pulses. Default 5 pulses.
    2)      Set the duration of the pulse. Default 0.5 (s).
    3)   Set the number of points per pulse. Default 500 points/pulse.
    4)   Set the pulse height. Default 5 (V)
    5)   Set the Offset (-5 to 5). Default 0 (V)
    6)   Set the lead in time as a percentage of the pulse width. Default 10%
    7)   Set the lag out time as a percentage of the pulse width. Default 20%
    8)   A check box that will invert the pulse.

  • How to find out the user list that created by someone?

    Hi all:
    Now I want to develop a program that can find out the user list created by someone.
    such as :
    John create 3 user in SAP ,they are u1,u2,u3.
    Susan create 2 user in SAP , they are s1,s2.
    I input the the parameter such as John , the program can give me the list :u1,u2,u3.
    Could you tell me which table should I use in this program?
    Thanks .
    Elisa.

    Hi Ling,
    As per my understanding, you are looking for listing down the number of Users created by a particular users of the System. Like a System Administrator has created some 30 users. If this is correct, then you can use the table
    USR02 - Logon Data (Kernel-Side Use). This table has 2 fields which are of importance - BNAME - User Name in User Master Record & ANAME - Creator of the User Master Record. You can query the ANAME with the username of the system and you will get the resultant users.
    But I would reccomend to search the Table for a standard class, function module or RFC or BAPI so that you can reuse the same and need not to develop from the scratch.
    Hope this will help.
    Thanks,
    Samantak.

  • How to find the number of references to an object in a big application

    How to find the number of references created for a given object in a big application environment.
    That means, if i give any object name (of my application) as input, then how can i find the[b] number of references created for that particular object ??

    Please don't post the same question multiple times.
    I've answered your question in the other thread here:
    http://forum.java.sun.com/thread.jspa?messageID=4312939

  • DAQmx - Measuring only the pulses w/o pauses of a pulse train

    Hi everyone,
    I've got a problem which I hope you can help me with.
    I'm using a NI 4461 PXI DAQ-card on a PXI realtime system and LabView 8.5.
    I'd like to measure a pulse train @ 1900 Hz with very low duty cycle. In order to reduce the aquired data, I want to measure not the whole train but only the pulses leaving out the pauses in between. I set up the task to aquire a certain amount of pulses (100) at the maximum sampling rate (204,8 kHz) with a definite numbers of samples per pulse (50) and using an available trigger line to trigger the measurement of the individual pulses. I thought to set the Read out butter size to (number of pulses) * (samples/pulse) = 5000 to be able to first measure the high frequency pulses and read them out after the number of pulses is reached.
    But unfortunately it's not working at all.
    Could you tell me, how to configure a task to do that job, please?
    Thanx in advance,
    Ralf

    Hi Ralf,
    Thanks for posting your question here. Are you still working on that issue? When you have done this, do you use the DAQmx-VIs or do you use a DAQmx-Assistant to configure the acquisition? There is also a website helping you to begin this ni.com/gettingstarted or this tutorial.
    Feel free to post any other questions here regarding this topic.
    Regards
    TomBaum

Maybe you are looking for

  • Open order  and open delivary should include in credit exposure

    hi expert, 1-hi expert my client requirment is if there is open sales order or open delivery credit exposure should be updated.please help me on issue and  guide me to configure.for static . EX:if i create sales order and save it the net value of sal

  • How would I create a link to download an image to the harddrive from within edge?

    I'm using this code in an on-click event currently, but it just opens the image in a new page, it doesn't download the file to the user's computer. window.open("URL HERE", "download", "_blank"); I also tried using this code on a text-box, but it didn

  • About message position

    Hi I defined message in message pool ,the default it appeared in left-corner of IE browser ,how to change the message position . Use some method of java or change some attribute? Best Regard Yan

  • Cannot find time machine

    I bought the Time capsule over Christmas.  Set it up and it worked fine.  a month ago it kept telling me cannot back up time machine.  I reset it to factory settings after I tried everything else on line to fix it.  I have set it up and now I cannot

  • Ouch My Friggin' Ears!

    I am doing the certified trainer course for STP in a couple of weeks and was working through the Apple Pro training book when I came across this. When you set noise print on a mono file then open the noise reduction HUD then hit the preview (play) bu