Ni 9401

Ok, I have (4) rotary encoders (1600pulses/reve) each.  I also have (2) Ni 9401's mounted in slots 5 and 6 of my C-Daq chassis.  I followed the quadrature encoder measurements: How to guide with no positive results.  I've set up a variety of tasks in MAX (count edges, frequency measure, angular postion, etc) All I really want to do is measure the angular velocity of each of the encoders.  At most I should see around 3M encoder pulses per second when the machine the encoders are mounted to is running. 
When attempting to count rising edges (on one encoder) I set up a  count edges task in MAX when I run the task and I rotate the encoder REALLY slow for 1 revolution I can get ~1600 pulses.  If I rotate the encoder fast I get a different and lower value.  Also if I rotate in a CCW direction I get one value but the CW direction will yield a diffent count result.  I am at a loss here.  I've acquired the A and B encoder signals with analog outputs and they are indeed square waves 90degrees out of phase.  
A couple other things.  I've noticed that I cannot create a task that will incorportate all 4 encoders.  Also, I was referencing the 100kHz time base initially, but the timebase cannot be used by multiple counters simultaneously.  Attempts to use the 20MHz timebase have failed.  
Any help would be greatly appreciated.  This was supposed to be a quick job and has taken alot longer than anticipated.  

Thanks for the link to the spec sheet.  I'm still a little confused
about the way you are acquiring the signal.  The 9205 has an aggregate
sample rate of 250kHz--if you are reading both A and B inputs at the
same time that would be 125kHz/ch.  To accurately characterize a square
wave you should be sampling well above Nyquist.  At what rate does the
counter begin to miss pulses?
I am still leaning
towards this being a signal integrity issue--the counters on the 9172
can count edges reliably at up to 20 MHz.  I would be interested to
know more about the cabling/shielding involved.  Are you following the
recommended connection diagram (shown below) from the RE22 specifications? 
The cDAQ-9172 product page mentions that the chassis has two counters in the Overview section--more information can be found in the 9172 User Guide and Specifications
(the counters section starts on page 40).  If you let me know which
documentation gave the impression that the 9172 posesses 4 counters I
can look into correcting it.
Also, I think I might not have been clear about the 20 MHz clock.  You cannot use this as a timebase to sample the
count register--as mentioned before this would require a data rate not
possible using USB 2.0 (I don't think you really want to acquire 640
Mbit/s per counter anyway).  The count register itself updates based
off of an 80 MHz internal timebase and will count external signals at
up to 20 MHz.  The sample clock is just the rate that you read data
from the count register, and does not affect how quickly the register
can count edges.
A 3 MHz square wave should be well
within spec for the counters aboard the 9172.  The speeds you are
talking about are not absurd for counting operations.  The fact that
you followed the devzone article
leads me to believe that you have the channels set up right.  I would
double-check your wiring and make sure to follow the recommended
termination procedure mentioned above.
Message Edited by John P on 10-13-2008 07:12 PM
John Passiak
Attachments:
encoder_term.PNG ‏5 KB

Similar Messages

  • How can I use my NI 9401 to send a 5V signal to a solid state relay?

    To start off, I am a complete novice to LabVIEW and I am working on my senior capstone project. Please, bear with me and I will try my best to help you help me.
    I am wanting to use my NI 9401 to send a voltage to a solid state relay so that I can control the temperature of a heating element. Ideally what I want to do is:
    1. LabVIEW sends voltage to relay.  
    2. Relay turns on.
    3. Heating element reaches desired temperature.
    4. LabVIEW does some sort of pulse to maintain that temperature.
    Right now I have one wire set inside of DIO 4 (or pin 20?) because I have read that 4:7 are for outputs. I also have another wire in the first COM slot (pin 1?).  I believe that these two wires will be placed in the "input signal" spots on the diagram below. 

    Your description is not very clear for me. However, usually output lines of control boards do not have a 5V signal as required by a solid state relay. The output usually is "TTL compatible" which means that it may be anywhere between 2.8V and 5.0V in high state. 
    Usually solid state relays are connected to an "open collector output". Most digital outputs can be used in this mode, too. You have to wire the (+) terminal of the relay to a 5VDC source (many boards have a 5VDC output - with limited current capacity, when using an external 5VDC source the GND terminal of the latter must be connected to GND or COM of the board). The (-) output goes to the digital output of the board. When wiring this way, logic states are inverted with respect to the relay operation. The relay will be ON when the digital output is in LOW state and will be OFF when the output is in HIGH state. 
    Check the current limit of your output line in "sink mode" and compare it with the current requirement of the relay input. Most solid state relays require 10 to 20 milli-amps at the input which is well inside the current limit of most digital outputs (usually 24 milli-amps, sometimes 48 milli-amps). 

  • Varying ON time pulse train generation using NI cRIO-9073 and NI 9401 module

    Hi,
              I am a beginner to the Labview environment.  Am using NI cRIO-9073 and NI 9401 module; and NI Labview 2013. I want to generate 64 pulses, wherein the ON time of the pulses are varying as shown below. The Pulses need to have a constant period of about 34µs. The pulses should have a constant amplitude anywhere from 5 to 10V. I am trying to do the same in FPGA interface mode but failing to do so. Please advise me..... Please also suggest pdf and video resources to learn Labview programming.
    Pulse ON Time
    18 µs
    19 µs
    20 µs
    21 µs
    22 µs
    23 µs
    24 µs
    25 µs
    26 µs
    27 µs
    28 µs
    29 µs
    30 µs
    31 µs
    32 µs
    33 µs
    33 µs
    32 µs
    31 µs
    30 µs
    29 µs
    28 µs
    27 µs
    26 µs
    25 µs
    24 µs
    23 µs
    22 µs
    21 µs
    20 µs
    19 µs
    18 µs
    17 µs
    16 µs
    15 µs
    14 µs
    13 µs
    12 µs
    11 µs
    10 µs
    09 µs
    08 µs
    07 µs
    06 µs
    05 µs
    04 µs
    03 µs
    02 µs
    02 µs
    03 µs
    04 µs
    05 µs
    06 µs
    07 µs
    08 µs
    09 µs
    10 µs
    11 µs
    12 µs
    13 µs
    14 µs
    15 µs
    16 µs
    17 µs

    t81,
    It is possible to make frequency measurements with either the 9422 or the 9425 but each will have its own limitations in the range of frequency it will be able to accurately measure.  
    A few things to know:  
    1. What are the frequency ranges for each sensor (tach and MFM)? More than just knowing Hz/kHz will be helpful.
    2. To what accuracy do you need to measure these signals?
    The 9422 supports a specialty digital configuration counter input that can be configured for frequency measurement (see link)
    http://zone.ni.com/reference/en-XX/help/372603F-01​/riohelprt/crio-9422_rt/
    The specialty mode is only available when using Scan Interface mode, not with FPGA.  
    But the max clock rate in the specifications for the 9422 is 4kHz so this may not be sufficient for the tachometer.  I believe this is the max rate at which the module will update its state no matter how fast the underlying software (RT controller) is running.
    The 9425 has a higher clock rate (~140kHz) but doesn't support the specialty digital mode mentioned above.  It is also a software timed only device but this shouldn't be a problem if you use FPGA.
    Dan

  • How to communicate with a 9401 module using 9151 expansion and 7813r PXI card

    Hi,
    I have just started working with my 7813 R-series card.  I was able to create a simple VI in which I could send and receive digital signals.  Now I would like to do something similar using my 9151 expansion chassis and 9401 C-series module.  If possible I would like to do all of this using windows (no RT for now).  Right now I am right-clicking on "my computer" in the project tree and adding new devices to find the 7813.  From there I have a rough idea of how to build a simple VI using the NI example.  However, I do not know where to look for the expansion chassis or the C-series module.  If any one could give me some advice or point to an example, that would be great.  I have seen the examples in Example Finder for the 9401, but they seem to be using a compactDAQ system as opposed to the PXI setup. 
    Thanks for the help!
    Solved!
    Go to Solution.

    Hello ACE_Lab,
    The steps you should take in order to configure your setup in the LabVIEW project window is as follows:
    Step 1...
    Step 2...This step should auto-populate with the existing PXI-7813R if it is connected. If you want to setup the target without the card connected, the you can just add a new target as follows.
    Step 3...This is the point at which you will be adding the NI-9151 expansion chassis:
    Step 4...
    Step 5...
    Step 6...If you have the module connected to the chassis, you should be able to see the module in the list:
    Step 7...If the module is not connected, you can just select "New Target or Device" from the menu in step 6 and add a new target as follows:
    An example from the Example Finder called "Digital Line Input.vi" should be a good place to start. Below is a screenshot of roughly where you need to start:
    Regards.
    Jeff L.
    Applications Engineer | National Instruments

  • Can i connect the NI 9401 to the 9162 carrier

    Hello, can I connect the NI 9401 to the USb-9162 carrier, instead of having to buy the cDAQ-9172 for just one Module ?
    ciao, grazie
    M. Petrolekas

    The NI 9401 is currently not supported for the USB-9162.  I don't know what application you have in mind but you also might want to consider some of NI's other USB devices such as the USB-6212/6, USB-6501, or any of the USB-622x or USB-625x devices.

  • Can 9401 generate the clock frequency of 20Mhz on 4 Channels in SCTL of 40MHz

    We need to use 9401 to generate the clock frequency of 20Mhz on 4 Channels
    But as per trhe data sheet 
    4 output channels........................10 MHz
    Does it means that we can get maximum frequency of 10MHz on each channel.
    Thanks

    Hello Johan!
    Bad news I am afraid….
    I assume you are using the Data Acquisition Toolbox from the Mathworks and when it comes to support on that interface I have to advice you to contact the Mathworks for assistance. We don't provide any support on their data acquisition interface since we have nothing to do with it.
    Sorry for the inconvenience this might cause you.
    Regards,
    Jimmie A.
    Applications Engineer, National Instruments
    Regards,
    Jimmie Adolph
    Systems Engineer Manager, National Instruments Northern Region
    Bring Me The Horizon - Sempiternal

  • Strange behavior with NI 9401

    Hi everyone!
    I think I have a strange problem with the NI 9401 modules.
    My hardware is a CompactRIO and I'm using Labview 8.0.
    I'm reading a 13 bit encoder with two NI 9401 modules: the first for 8 input channels and the second for the other remaining 5. input channels.
    13 bits means that the slots in the outest part of the counter are 8192 so i expect my encoder to count up/down till 8192. What instead happens is that the counter goes up to 7934, then suddenly to 7860, then from 0 to 254 and then finally to 0 again and up again to 7934 and the story always goes on like this. I put the true/false outputs of the encoder in a boolean array and then, from the boolean array to a number. (see the attacched VI)
    Here's how I devided the inputs between the two modules
    -NI 9401 2 :
    DIO0= 2^0
    DIO1= 2^1
    DIO2= 2^2
    DIO3= 2^3
    DIO4= 2^4
    DIO5= 2^5
    DIO6= 2^6
    DIO7= 2^7
    - NI 9401
    DIO0= 2^8
    DIO1= 2^9
    DIO2= 2^10
    DIO3= 2^11
    DIO4= 2^12
    When running the VI I suddenly realized that every time all the input for each modules should be true ( i.e. five leds on for the second module or eight leds on for the first) , the value of all the inputs goes immediately to 0 i.e. all the leds switch off . To make an example: I see 4 leds on for the second module but when comes the time of the fifth, all the leds switch off so it means all the inputs are false which i can't understand. I tried to change the pin assignments in order to read the same inputs from different pins and this did'nt change anything. I tried to use only 4 inputs for the second module and this didn't work. Every time all the inputs for each module should be true it goes up to (n-1) inputs true and the n inputs zero. More information about this strange behaviour: while a normal false input produces a voltage of 0.036 V the voltage I measured from the last pin that should be true and that should give me all the leds on for one module, produces instead -0.146 V.
    This is everything I tried in order to solve this problem but now I'm at a dead end.
    Could it be a kind of module setting which I didn't consider?
    Due to all the attempts I've made I excluded any disfunction of the encoder so I focused my attention to the modules.
    Does anyone of you have any idea?
    Thanks!!
    Rob_F
    Attachments:
    Prova_encoder2.lvproj ‏14 KB
    Prova_encoder2.vi ‏155 KB

    Thanks a lot JMota!
    We just sent back the encoder to the company who sells them. They want to be sure it's not a product defect or, even worse, a problem of conflict with the NI 9401.
    In the meanwhile we built up the acquisition VI for the accelerometer and the encoder. One while loop sends the accelerometer data to a DMA FIFO and another parallel while loop is used to read the encoder outputs and send these data to another DMA FIFO. I did this because I know only 1 DMA FIFO can be used for each channel. When I read the data with two FIFO.read with two parallel loops in the Real-Time I discovered that I can't make them work indipendently as i thought i.e. reading settings of one FIFO.read ( number of elements and loop timing) affects also the other FIFO.read . 
    Any explanation for this behavior?
    Thanks again JMota!

  • CDAQ 9401: 2 x CO Pulse Freq?

    Hello
    I have got a very simple application that uses cDAQ 9172 and a 9401 module in slot 5. Labview 8.2+NiDaqmx 8.7.
    The application uses two Counters out to generate PWM so there is no need to reserve the resources as for the bidirectionnal issue of the 9401 that is documented on the forum.
    For certain reasons (to treat the PWM=0% and PWM=100% border values) I need to stop and restart one task or the other and sometimes recreate the task. I have tried every single possibility that I thought about and cannot get rid of this -201133 error.
    Thanks so much for having a look at the (ugly) code attached.
    Christophe
    Attachments:
    DEBUG1 sequentiel5bisessaidernier.zip ‏257 KB

    Hello again,
    I just would like to add that the problem disappears if I add a second 9401 module in slot 6 and define counter out #1 in the first 9401 module and counter out #2 in the second 9401 module.
    What am I doing wrong in the case of both counters out sourced by the same 9401 module?
    Thanks,
    Christophe

  • NI 9401 edges counting forward/backward

    How to pragram this application: Pulses will be generated when motor moves, 9401 can count this pulse train when plugging in slot 5 or 6 of 9172. How can i accomplish this: when motor moves clockwise, the pulses count is 1,2.....100; when you chage motor direction, let it move anticlockwise, pulses count will be 100,99.....1. BTW, the motor is brushless DC motor with hall sensor.

    Hi terrycong,
    You can use an external signal to control whether a counter counts up and down.  The NI-DAQmx Express VI Tutorial shows how to set the count direction to an external source.
    If you're using a quadrature encoder, there's some how-to information for configuring those, and the example even uses your exact hardware!
    Regards,
    Kyle

  • Can I (and if so, how would I) connect two encoders (one linear and one angular) to the same chassis (NI 9401) and get their respective NI MAX tasks to run as simultaneously as possible?

    Sorry, but I am still rather new to LabVIEW and NI MAX. I connected both devices (a linear probe and an angular encoder) to my NI 9401 chassis. I figured out how to create tasks for each and get continous samples readings from each. When trying to run both in LabVIEW, I get the error saying that I cannot run multiple tasks at once. It suggests the Control Task VI, but I did not see any help in that. Any advice?
    Here is some general information, whatever it is worth: Both encoders are operating off of the same clock source, PFI4, which to my knowledge corresponds to CTR 1 A, where the angular encoder's A signal is wired in. The linear's physical channel is ctr0 and the angular's is ctr1.
    Thank you very much for taking the time to look at this and help me out!
    Solved!
    Go to Solution.

    So if I go the Edge Counter route, is there any way for the task to figure out direction of the encoders? It looks like my options are always counting up or always counting down whenever the encoder is read... For my application, I need it to read when the linear encoder goes in and when it goes out... Am I doing something incorrectly with it?
    I am using a probe to measure the contour of a part, and using a motor to spin the part, with one encoder measuring the angle of the motor and the other measuring the displacement of the probe.
    Also I am still not seeing a way to simultaneously read both devices in NI MAX... I cannot use two counter inputs from the same device at once in the same task it seems.

  • Sample rate for digital sampling (cDAQ-9172 & NI 9401)

    Hi!
    I have a cDAQ-9172 with a NI 9401 C-series module (digital). I would like to sample the digital inputs with a sample rate of e.g. 400 kHz or 200 kHz. My problem is that I can only select a the 100kHzTimebase clock, and therefore only get a 100 kHz sample rate. The 20MHzTimebase clock is too fast, since it gives me a sample rate of 20 MHz). Is it possible to get a user defined sample rate of e.g. 200 kHz, by e.g. dividing down the 20MHzTimebase clock?
    Solved!
    Go to Solution.

    The cDAQ-9172 chassis does not have an internal timing engine for digital input however you can use one of the onboard counters to generate your clock.  Set your pulse train generation counter to be one of the internal counters, such as "cDAQ1/_ctr0" and your digital input sample clock source to be /cDAQ1/Ctr0InternalOutput". 

  • NI 9401 & Status Code: -50103

    Hello Everyone,
    Software: Visual Studio 2003, VC++
    Hardware: cDAQ - 9172
    I have 2 NI 9401 modules .  1st module is configured as CO while the 2nd module is a CI.  I tried using them in a single chassis and even
    on separate chassis but I still have this problem.  Please see attachment.
    I modified the 2-separate measurement shipping example.  I included a CO task that will output a pulse to the AUX pin of the 2nd NI 9401 module.  I want to measure the time the pulse has been generated and captured by the 2nd module.   
    // Create the counter input task
    CNiDAQmxTask myTask;
    // Create the counter input channel
    myTask.CIChannels.CreateTwoEdgeSeparationChannel(physicalChannel, "", minimumValue, maximumValue, firstEdge, secondEdge,         DAQmxCITwoEdgeSeparationUnitsSeconds);
    // Create the counter output task
    CNiDAQmxTask myTask3;
    // Create the counter output channel
    myTask3.COChannels.CreatePulseChannelTime(physicalChannel3, "",  DAQmxCOPulseTimeUnitsSeconds, m_idleState, atof(initialDelayStr), atof(lowTimeStr),
    atof(highTimeStr));
    //start counter output task
     myTask3.Start(); 
    // Create a reader for the channel (counter input)
    CNiDAQmxCounterReader reader(myTask.Stream);
    // Read the data (counter input)
    double acquiredData = reader.ReadSingleSampleDouble(); 
    // Display the data (counter input)
    CNiString acquiredDataString;
    acquiredDataString << acquiredData;
    m_acquisitionResult.SetWindowText(acquiredDataString);
    Please advice.
    Thanks again,
    A
    Attachments:
    counterOutput_Reserved.JPG ‏170 KB

    Hello,
    Status code -50103 “The specified resource is reserved” could be due to a couple of different cases.  Please check if the Counter Output task (myTask3) is in finite mode.  The class CNiDAQmxTiming item DAQmxSampleQuanityMode is where you can set the task to finite or continuous.  When generating a finite pulse train, two counters are actually used and thus reserved.  Since there are only two counters available on the cDAQ (9172), the error -50103 occurs when you are trying to reserve a total of three counters by adding in the Counter Input.  If you change the CO pulse train to continuous mode, the task will only use one counter.  Please refer to this KnowledgeBase for more detailed information.
    KnowledgeBase 2VHDS879: Error -50103 With Multiple Counter Applications
    The other possibility is that the posted code is being executed multiple times or looped and the tasks are not being cleared.  Clearing the task will unreserved the task resources, so the next time the code is executed the resources will be free.  Again, please refer to this other KnowledgeBase in Case 2 for more information.
    KnowledgeBase 2WT74JMM: Causes of NI-DAQmx Error 50103 "The Specified Resource is Reserved"
     This post also seems to relate to this thread with a Counter Output instead of a Digital Output.
    Message Edited by samantham on 05-30-2008 06:06 AM
    Samantha
    National Instruments
    Applications Engineer

  • Fpga/cRIO 9401

    Hi there:
    I have a problem to use cRIO 9401 as an input for RS232. The very same code works perfectly fine in cRIO 9411, but in 9401 it shifting bits. Is there any configuration should be performed or anything else...?
    I will greatly appreciate any help.
    Oleg Finodeyev

    Hey Vishal,
    In order to set a loop time, you should make use of the "loop timer" VI, in the first frame of a sequence structure, and then the rest of the code to execute in the second frame.
    For more information on FPGA programming, I recommend that you consult our online LabVIEW 8 FPGA training materials, available here.
    Also, ordinarily the 40 Mhz clock is suitable, but it is also possible to create a derived clock. For more information on that, please consult the LabVIEW FPGA Module Help file, or this page.
    Best regards,
    Message Edited by SamboNI on 06-13-2007 06:14 PM
    -Sam F, DAQ Marketing Manager
    Learn about measuring temperature
    Learn how to take voltage measurements
    Learn how to measure current

  • Output options for NI 9401

    I am currently evaluating the CompactDAQ platform as a replacement for some of our older test equipment.  In order to interface to my existing test setup, I need a digital I/O module that can tristate its outputs.  I was looking at the NI 9401, but cannot tell from the manual if this module can do TTL high, low, and tristate.  So, my question is, can you program the 9401 to tristate it's output? 
    Thanks in advance for any info. that you can supply on this topic.
    Rob

    Rob,
    The 9401 is bidirectional, and when set to input, will function as a tristate output.  There are a couple of things to keep in mind with this module: 1) When set to input, the lines still have a weak pulldown resistor with a min. value of 45 kOhms, as specified in the manual.  2) Line direction may only be controlled in banks on the 9401.  This means that DIO 0:3 must all be set to the same direction, and 4:7 must all be set to the same direction.  I don't have enough information about your setup to know if this will provide a complete solution.
    Please post any additional questions, or more details about your application if you're still not sure whether or not this solves your needs.
    Thanks,
    Kyle Bryson
    National Instruments

  • Problem triggering NI-9234 from 9401

    I am trying to trigger a 9234 from a 9401 connected to a PLC. There are 4 input triggers connected to the first 4 channels of the 9401, corresponding to 4 phases of a test. For each phase of the test, I am looking for a trigger on a different channel. The problem is that the acquisition is triggered from any of the 4 input channels, i.e. when I specify a trigger on the first channel, PFI0, a trigger from PFI1, PFI2 or PFI3 also causes the acquisition to launch.
    In using the NI example, “Acq&Graph Voltage-Int Clk-Dig Start.vi”, I am able to reproduce this behavior. I configure the trigger source to be PFI0, Rising Edge, on the 9401. The acquisition is triggered even if the rising edge is passed on channel 1, 2 or 3. Trigger signal level is 0-5V.
    LV2011, DaqMX V9.4, Windows XP
    Attachments:
    Acq&Graph Voltage-Int Clk-Dig Start.vi ‏28 KB

    I have figured out the problem and the solution. To simulate the triggers sent by the PLC, a box was made containing 4 switches supplied by a common 5V source. Apparently, electronic noise is generated when a switch is activated and fed back though the other switches. This was causing erroneous triggers to be detected. So, I added a trigger property node, enabled the digital filter on the trigger signal with a minimum pulse width of 0.1 milliseconds (0.0001 sec). This cured the problem of triggering from any channel.
    The filtering will also be useful to help eliminate false triggers caused by electronic noise in the production environment, which has also been a problem.
    Thanks for all those who viewed and I hope this can be helpful to someone in the future.
    Joe
    Attachments:
    Acq&Graph Voltage-Int Clk-Dig Start Dig Filter.vi ‏30 KB

Maybe you are looking for

  • PSA request deletion Error

    Hi All, I have a problem for which i am not able to get the proper solution from the threads. Can anyone help me to solve this. I am getting this error "" RSDU_TABLE_DROP_PARTITION_MSS Error while creating the clone table /BIC/B0000183000" while dele

  • Hard Drive Expansion/Upgrade

    Choices, choices! I am rapidly filling up my stock Maxtor 250 GB hard drive, and I need to upgrade. I've read most of the posts in this forum, and see many potential ways to go. Hopefully, some of you experienced power users can give me some guidance

  • My iphone isn't working at all although i  replaced the battery

    Hello, I have iphone 3gs that doesn't respond for anything, includung electricity and my p.c. I had replaced the battery in a new one and the phone was working for a while, but now it doesn't work again and if my p.c recognizes the phone, the restore

  • Download SEEBURGER AS2 Adapter

    Hi All, I would appreciate if you could let me know, from where I could download the SEEBURGER AS2 adapter which will be compatible to  PI 7.10 EhP1? Regards, Ramanathan EKAMBARAM

  • HT1689 I purchased a song on my iPhone from iTunes & the song won't fully download how do I fix this issue

    I purchased a song on iTunes which will not fully download but n my music files its there but no sound HOw do I fix this issue?