A 2nd counter on a USB6008 using DIO's?

hi,
Quick question is it possible to built code in Labview, that would act as a second counter, using digital I/O's?
I want to count the number of pulses for two difference pulse trains, and the use the number of pulses to determine the position of the 2 stepper motors?
Any help greatly appreciated!
Peter

Peter,
You can certainly count pulses from a digital input line in software.  However, the DI lines on the USB6008 are software timed and have a fairly low update rate.  Without looking it up, I think the rate is ~100 Hz.  If your pulses can ever occur much faster that, you will miss pulses and lose track of your position.
Lynn 

Similar Messages

  • PWM signal from Accelerometer by using DIO of PIC-MIO-16E-4

    I am a new beginner to use digital signal acqusition. The accelrometer send the pulse width modualated signal and I need to use DIO line instead of counter. I wonder how I can measure the pulse width, + duty, and -duty.

    Hi Gino,
    If you plan to use the digital inputs of the PCI-MIO-16E-4 then you will be limited to software timing since the digital inputs are asynchronous and dependent on software calls. This means your fastest rates are roughly 100-1000Hz (computer dependent). Since you also want to sample a period at least 5 to 10 times so that you can get a somewhat accurate representation of the duty cycle and the pulse width, you are further limited to the signal being slower than 10-200Hz.
    However, if this is acceptable then you only need to create a loop and sample your digital inputs at the desired loop speed and perform calculations to determine the duty cycle.
    How you would determine the pulse width and duty cycle is everytime you take a digital measureme
    nt you also use "Count Ticks (ms).vi" in LabView to count the time between each call to this VI. You simply add these times while the reading is high and you have the high dutycycle. Do the same for low and then add the two together.
    Hope that helps.
    Ron

  • Error message when using counter indicating need to use faster timebase

    I'm attempting to use the two onboard counter timers on my DaqPad 6015 with a SC2345 carrier.
    The program initially runs as expected, but once in a while I get an error message that reads as follows:
    "2 consecutive active edges of the input signal occured without a counter timebase edge."
    "Use a faster counter timebase"
    I have only attempted to read this signal at two known frequencies: 15 and 20 Hz.
    Can anyone advise as how to correct this or how to change the counter timebase?
    I'm using the built in Express Daq Assistant to create the code to read the frequency so that part is pretty straight forward.
    This command is however inside of a case structure, so each time it reads it is possible to reset or miss the first leading edge of the signal.
    Thanks,
    Patrick

    Hi Patrick,
    It sounds like the program is lagging when you attempt to read the gate of this counter. 15 Hz seems slow in comparison to the specs of the counter, but if your VI is slow by 7/100th of a second the program will thrown an error. I recommend probing the counters to determine where in the program the error occurs.
    Michael K.
    | Michael K | Project Manager | LabVIEW R&D | National Instruments |

  • I've installed Photoshop Elements 12 from a CD onto my PC laptop. I'm thinking about buying a tablet, so was wondering if (a) can I install on a 2nd device (b) can I use the serial number online as I won't beable to install from a CD, and (c) will I beabl

    I've installed Photoshop Elements 12 from a CD onto my PC laptop. I'm thinking about buying a tablet, so was wondering if (a) can I install on a 2nd device (b) can I use the serial number online as I won't beable to install from a CD, and (c) will I beable to choose a mac, after the initial was on a PC???? Thanks Martin

    A single user license allows for having activated installations on two machines. An Elements license allows for either platform in many cases (recently not the case from what I've seen).  If you have the disc, see if it contains the Mac installation files... if it does then you should be able to install them via a download as well.  I cannot answer with certainty for the last question since it relies on the previous question.  Personally, I would not let an inexpensive piece of software dictate an expensive hardware purchase decision.

  • How do I configure a counter to generate pulses using DAQmx?

    How do I configure a counter to generate pulses using DAQmx?
    Is says in the DAQmx C reference help
    "CtrnInternalOutput—The signal at this internal terminal is where the pulsed or toggled output of the counter appears. The output of a counter pulses or toggles when the counter reaches terminal count. When counting down, the counter reaches terminal count when the count reaches zero. When counting up, the counter reaches terminal count when the counter rolls over. To configure the counter to toggle or generate pulses, use the Export Signal function/VI with Counter Output Event as the signal name."
    I've tried this but can't get it to work, I may have the parameters wrong or something. The DAQmxExportSignal() function is very unintuitive to me. Here is my counter config code...
    int ret = 0;
    ret = DAQmxCreateTask("",&task_);
    errorMsg(ret);
    if (ret != 0)
    throw ret;
    // Configure the counter
    ret = DAQmxCreateCOPulseChanTicks( task_, "Dev1/ctr0", "", "/Dev1/PFI8", DAQmx_Val_Low, 0, divider, divider );
    errorMsg(ret);
    ret = DAQmxCfgImplicitTiming( task_, DAQmx_Val_ContSamps, 1000 );
    errorMsg(ret);
    // Change to pulse mode
    ret = DAQmxExportSignal( task_, DAQmx_Val_CounterOutputEvent, "/Dev1/Ctr0InternalOutput" );
    errorMsg(ret);
    // Start the counter
    ret = DAQmxStartTask(task_);
    errorMsg(ret);
    The above code works fine, in toggle mode, if I just comment out the DAQmxExportSignal() part.
    HELP!!!
    Stefan

    The problem is due to the DAQmxExportSignal call.  By default, when you create a counter output pulse train task, the driver will automatically set the output of the counter to toggle when the count for each high ticks and low ticks expire.  The driver also automatically routes the signal present at Ctr0InternalOutput terminal (the output of the counter internal to the device) to the Ctr0Out terminal (the I/O pin available externally).  Using the line
     ret = DAQmxExportSignal( task_, DAQmx_Val_CounterOutputEvent, "/Dev1/Ctr0InternalOutput" );
    will tell the driver to tristate the Ctr0Out terminal and not output the signal to the external I/O pin.  Using the DAQmxExportSignal function is generally only useful if you want to route the signal to some other terminal internal to the board without having the output show up on the external connector, route the signal to some other external pin other than the default pin, or if you want to have the output show up at multiple locations. 
    If you want to change the output behavior from toggle to pulse, you need to use the DAQmxSetExportedCtrOutEventOutputBehavior function.  However, this is generally only useful if all you care about are edges (not the duty cycle of the pulse train), and you want to generate higher frequency signals.  For example, with a 20 MHz timebase as the source of your counter, you can only generate a 5 MHz pulse train by default.  This is because the minimum value for the low and high ticks parameter is 2 (20 MHz / 4 = 5 MHz).  By changing the output behavior form toggle to pulse, you can generate a pulse train at 10 MHz since the output is now pulsing instead of toggling.  However, the width of each pulse is not programmable so you will no longer have a 50% duty cycle signal.  I don't remember exactly what the width of each pulse is, but I believe it's in the neighborhood of 50 - 100 nanoseconds in width.  I hope this information helps.

  • Why is the word count different when I use word count from the tools menu to the number at the bottom of my mac word document

    Why is the word count different when I use word count from the tools menu to the number at the bottom of my mac word document

    This forum is for Apple's defunct office suite 'AppleWorks' - since the word count is not in the places you mention I assume you are talking about Microsoft Word? Though it's just possible someone in this forum might also use Word and know the answer, you would stand a higher chance of getting an answer in Microsoft's own forums. You could also try asking in the forum applicable to your operating system - Lion, Mavericks or whatever - on the reasonably chance of finding someone familiar with Word.

  • Get particular item count in sharepoint list using designer Workflow

    How to get specific item count in sharepoint list using designer Workflow 2013.
    For Example 
    Title  Count
    x        1
    y        1
    x        2
    x        3

    HI Thiru,
    Can you please elaborate your problem. Is that Title and count are your list columns you want to fetch the value of count column based on title?
    If my interpretation in not wrong, then it's not possible in SPD with the case you have mentioned in your question as Title='x' is having 3 different entries and SPD activity will always return first matching item and ignore the rest with warning message.
    Regards,
    Brij K

  • Get the connected users count from sql server using powershell

    Hi,
    I am working on SharePoint 2013,I am having SQL server 2012.
    I want to get the Connected Users count from  sql server using power shell.
    Can any one please let me know how to implement.
    Thanks in advance.
    Regards,
    Phani Kumar R

    Sorry Tom, I dont like to hear "There is no way" :-(
    There is always a way in computer to get what you need (at least it is good as Rule of thumb). I am not sure we will find it here (in a voluntary supporting forum).
    Now we (or better the architect of their system) should think of the way :-)
    Of course doing so in the forum, while we do know the system and only got a glimpse on what is needed, is not the best idea. I will point some issues which can be related to a solution. Those are not a solotions as it is but something we can use for a solution
    once something look in the right way.
    * A web connects counter is one of the easier thing to do. The basic idea is just to use the connect event and the disconnect event an adding 1 or removing 1 from the counter. This is best to do in the application using static variable as any way the second
    the application is down the counter can be go to hell as we know there is no one connect (there for a counter do not use database usually). Using a web dot-net (or asp 3) application this is done most of the time using the global.asa/global.asax file, which
    include the application and session events. for example using the method Session_Start
    protected void Session_Start(object sender, EventArgs e) {
    // Code that runs when a new session is started
    * IIS have a build-in loging system where we can log each and every request/response or only logins users. There is lot we can do with this log files including data mining. Using small bulk insert script we can use the SQL agent to insert those logs to the
    database and get the information we need.
    * any web developer i want to believe know about the Fiddler application which we use to monitor traffic. A proxy is not the only way to to monitor traffic (it is not good for our case as this is in the client side), there are several option in the server
    side.
    * SQL trigger on logon can be use to get information on who is loging on and can be logging only specific source (like our sharepoint IP or any sharepoint application). This information (what is the application which connect to the server can be retrive
    in several solution without using a trigger as well)
    *** (I'll be brief ... I'm getting bored... probably the reader feel the same)
    * using extended events and/or profiler we can monitor any connection and save the data or just remember it in shared (static) variable (this
    blog show how to do it by the way). Again we can monitor specific application or use any filter in order to get only the sharepoint users
    .... and i can continue for several days more :-) ...
    "If there is a willing, then there's a way"
    "If you can't do it, Then someone else probably can"
    "Never say never"
    I hope this help somehow :-)
    [Personal Site] [Blog] [Facebook]

  • An app counting minutes and data use. Please help!!!

    An app counting minutes and data use. Please help!!!

    Here's one, there are others in the App store:
    http://itunes.apple.com/us/app/data-usage/id386950560?mt=8
    However, since your carrier is the one that bills you, the only stats that matter are your carrier's. Some carrier's offer apps that provide this info, see if yours does.

  • "no row count was produced" error using mqsl commands through Access

    "no row count was produced" error using mqsl commands through Microsoft Access. This sql statement works when I use in in the Access program but it does not work when I try and put it through Access using my Java program. Here is the block of code that I have that does the search.
    public static Game searchRecord(String search) throws SQLException{
    String query = "SELECT* " + "FROM gamefields WHERE SKU = '" + search + "' ORDER BY SKU ASC";
    Game lastGame = new Game(gamefields.getString(1),
    gamefields.getString(2),
    gamefields.getString(3),
    gamefields.getString(4),
    gamefields.getString(5),
    gamefields.getString(6),
    gamefields.getString(7),
    gamefields.getDouble(8));
    Statement statement = connection.createStatement(); //Creates connection
    //statment to database
    statement.executeUpdate(query); //Executes the delete query and Updates the database
    statement.close();
    close();
    open();
    return lastGame;

    When you use the code from java, you access access (!) through the ODBC interface. Things can be different in ODBC and Jet. When you use PrepareadStatements, you should be on the save side:
    public static Game searchRecord(String search) throws SQLException
    String query = "SELECT * FROM gamefields WHERE SKU = ? ORDER BY SKU ASC";
    PreparedStatement statement = connection.prepareStatement(query);
    statement.setString(1,  search);
    ResultSet rs = statement.executeQuery(query);
    if(rs.next()
    // if a row retuned extract the details here
    rs.close();
    statement.close();
    return lastGame;
    }

  • TS1646 I recharg my i count but i cant use it

    I recharg my i count but i cant use it

    What do you mean that you cannot use it on your iPhone. What is happening when you try?

  • Store Counter Number in BODS using Global/Local Variable

    Hi All,
    Anyone done before adding a counter integer field into a table based on key via BODS?
    Example:
    Table 1 (contains just 1 field) <-Input:
    Key 1
    Key 1
    Key 2
    Key 2
    Key 2
    Table 2(contains 2 fields with INT as the 2nd field) <-Output:
    Key 1      1
    Key 1      2
    Key 2      1
    Key 2      2
    Key 2      3
    I was wondering if populating the Local Variable or Global Variable might work but from my understanding, inside the Data Flow , it's not possible to increase the variable value ($count = $count + 1).

    Hi Maurice,
    Thats a good idea!!
    I had currently implemented a solution where i use Variables and Customize Functions to solve the problem.
    Will give a try and see if your solution produce the same result.
    Tim

  • How to I Produce Serial Data Stream Using DIO Channel

    I would like to output to a "serial to parallel" circuit (74HC194 (Universal Shift Register IC)circuit) for the purposes of increasing my digital I/O off of my DAQPad-6020E. Does anybody have an example of outputting a data stream (both a clock and a "data out" stream)? All I would need is a clock edge after every output bit, but since I am new to producing vi's, I was hoping that someone would be able to give an example of an approach to take.
    The closest thread I found on the message board was a request to produce a PWM signal. My signal does not have to be that precise since I will be latching every new data bit with an independent clock edge.
    Thanks to anyone out there considering this problem.
    ThisRock

    Hello,
    Because the DAQPad-6020E does not have hardware timed DIO, you will be forced to output software timed digital data. Are you using LabVIEW 7.1? If so, one approach would be to generate an output counter pulse and use that to time a Timed Loop in LabVIEW. That way, for every output pulse of the counter, the timed loop would iterate. If you place your digital write VIs in that loop, you will output a digital value for every rising/falling edge of the counter output.
    Does this answer your question? If not, please give a little more detail about the Universal Shift Register IC and what it would require from your DO lines.
    Regards,
    Sean C.

  • How to count pulses from 2encoders using 6014e

    i need to count the output of 2 encoders simultaneously using 6014E. i dont worry about the direction and i just need the total count.

    nnio,
    Connect phase A of the Quadrature Encoder to the SOURCE of the counter to be used and connect phase B to the corresponding DIO up/down line (DIO 6 if phase A is connected to the source of counter 0, or DIO 7 if phase A is connected to the source of counter 1).
    With this method you can connect phase A and B of your first encoder to counter 0 and phase A and B of your second encoder to counter 1.
    How Do I Use a Quadrature Encoder with My Data Acquisition Board?
    http://digital.ni.com/public.nsf/websearch/C6C6632A54DBA7DD86256275005E18E2?OpenDocument
    Quadrature Encoder with DAQ STC (E-Series Boards)
    http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B45EACE3E9AD56A4E034080020E74861&p_node=DZ52326&p_submitted=N&p_rank=&p_answer
    =&p_source=External
    Regards,
    Justin Britten
    Applications Engineer
    National Instruments

  • Help Counting Vowels and Consonants using a class

    I'm currently working on a class project where I need take a user inputed string and count how many vowels and/or consonants are in the String at the user discretion. I have the main logic program working fine. However, the trouble I'm running into is how to take the string the user inputed and pass that data into the class method for counting.
    Here is the code for the program:
    package vowelsandconsonants;
    import java.util.Scanner;
    public class VowelConsCounter {
        public static void main(String[] args) {
            String input; //User input
            char selection; //Menu selection
            //Create a Scanner object for keyboard input.
            Scanner keyboard = new Scanner(System.in);
            //Get the string to start out with.
            System.out.print("Enter a string: ");
            input = keyboard.nextLine();
            //Create a VowelCons object.
            VowelCons vc = new VowelCons(input);
            do {
                // Display the menu and get the user's selection.
                selection = getMenuSelection();
                // Act on the selection
                switch (Character.toLowerCase(selection)) {
                    case 'a':
                        System.out.println("\nNumber of Vowels: " +
                                vc.getNumVowels());
                        break;
                    case 'b':
                        System.out.println("\nNumber of consonats: " +
                                vc.getNumConsonants());
                        break;
                    case 'c':
                        System.out.println("\nNumber of Vowels: " +
                                vc.getNumVowels());
                        System.out.println("Number of consonants: " +
                                vc.getNumConsonants());
                        break;
                    case 'd':
                        System.out.print("Enter a string: ");
                        input = keyboard.nextLine();
                        vc = new VowelCons(input);
            } while (Character.toLowerCase(selection) != 'e');
         * The getMenuSelection method displays the menu and gets the user's choice.
        public static char getMenuSelection() {
            String input;  //To hold keyboard input
            char selection;  // The user's selection
            //Create a Scanner object for keyboard input.
            Scanner keyboard = new Scanner(System.in);
            //Display the menu.
            System.out.println("a) Count the number of vowels in the string.");
            System.out.println("b) Count the number of consonants in the string.");
            System.out.println("c) Count both the vowels and consonants in the string.");
            System.out.println("d) Enter another string.");
            System.out.println("e) Exit the program.");
            //Get the user's selection
            input = keyboard.nextLine();
            selection = input.charAt(0);
            //Validate the input
            while (Character.toLowerCase(selection) < 'a' ||
                    Character.toLowerCase(selection) > 'e') {
                System.out.print("Only enter a,b,c,d or e:");
                input = keyboard.nextLine();
                selection = input.charAt(0);
            return selection;
    class VowelCons {
        private char[] vowels;
        private char[] consonants;
        private int numVowels = 0;
        private int numCons = 0;
        public VowelCons(String str) {
        public int getNumVowels() {
            return numVowels;
        public int getNumConsonants() {
            return numCons;
        private void countVowelsAndCons() {
            for (int i = 0; i < total; i++) {
                char ch = inputString.charAt(i);
                if ((ch == 'a') || (ch == 'A') || (ch == 'e') || (ch == 'E') || (ch == 'i') || (ch == 'I') || (ch == 'o') || (ch == 'O') || (ch == 'u') || (ch == 'U')) {
                    numVowels++;
                } else if (Character.isLetter(ch)) {
                    numCons++;
    }The UML given to me by my instructor calls for the counting method to be private. Being that I'm not too familiar with Java syntax I did not know if that may cause a problem with passing the user's input into that method.

    Well the only compilers i get are due to the code:
    private void countVowelsAndCons() {
            for (int i = 0; i < total; i++) {
                char ch = inputString.charAt(i);
                if ((ch == 'a') || (ch == 'A') || (ch == 'e') || (ch == 'E') || (ch == 'i') || (ch == 'I') || (ch == 'o') || (ch == 'O') || (ch == 'u') || (ch == 'U')) {
                    numVowels++;
                } else if (Character.isLetter(ch)) {
                    numCons++;
        }However, that is due to the fact that i have no data for those variables to use. I'm pretty much stuck on how to get the string the user inputs into that method shown above so the code can perform the task of counting the vowels and consonants.
    If i comment out the code within that function the program compiles and will allow me to enter the string and use the options but since i can't figure out how to pass the input to the counting method the program returns 0 for everything.

Maybe you are looking for

  • Oracle patch set 10.1.0.4  or patch #3895738

    I need to apply either Oracle patch set 10.1.0.4 or patch #3895738 (on top of 10.1.0.3) for Sun Solaris as suggested by Metalink Note: 283107.1 I cannot find either one by using Metalink Patches search. Where can I find them?

  • I should qualify for Education Pricing... correct?

    I am not a student currently enrolled in college, nor a teacher.  I have, however, been working for the New York State Department of Education in P-16 EMSC & OHE (Elementary, Middle, Secondary and College & Office of Higher Education) in the Office o

  • Problem with my WLAN(N93)- need help.

    Hello guys, just recently with WLAN got problem. each time i want to start web browsing this message pop-up.. 'web:already in use'. actually what is the problem?

  • Log4J and OAS 10.1.2.0.2

    Greetings, all! I've searched this forum and the OC4J forum and have not found any clues to help with my log4j woes. I'm hoping someone may have encountered similar issues and can share their thoughts. I am developing a web application and would like

  • Cap 6.1 - Error with .flv videos in quiz

    I have 5 .flv videos in a quiz and they used to work flawlessly. I had some install/uninstall/subscription issues and inadvertently updated captivate from 6.0 to 6.1 (dont know if this is the issue) and ever since I have had errors. The error is easi