cDAQ 9178 simultaneous independent loops counters?

I have a cDAQ 9178 wherein I am scanning in various mainly analog channels, but also unique sending digital outputs. These tasks are started during the execution of the program and basically scan continuously, filling variables according to the needs.

In addition to this, I needed to count impulses and the only way I managed to do that work was to begin the task of counter when necessary, and then stop it. This happens at the same time (within a state machine) and works very well.

Now, I want to add a second counter, which will take place if necessary (same scenario, task of beginning, read the pulses, work stoppage).

So in summary, I have to:

Main outputs and analog loop, digital inputs, tasks began before the great loop and continuously, work stopped only after the termination of the program. (works fine)

Counter task began when necessary, stopped when necessary, of the main inside while loop. (works fine).

2nd job counter starts when necessary... (I was wondering if it will work)?

Should it be a problem?

Jeff

Hi Jeff,

I don't think that you will have problems with that.  To test this, I took an example of the meter and it - create two tasks, each using a counter of the device even duplicated and I has not encountered any errors.  That said, the best way to check for your application would be to add a second straightforward and test it.  As long as it works, there is no problem even if your final configuration can be much more complex.

Kind regards

Trey C.

Tags: NI Hardware

Similar Questions

  • Difference between the cDAQ-9174 and cDAQ-9178

    I have several cRIO-9081.  Each cRIO-9081 running NOR-DAQmx 15.5.  On four of the cRIO-9018 we show you cDAQ - 9178 with 8 modules.  Everything just worked.  On the fifth cRIO-9018, we tried to connect a cDAQ-9174.  The aircraft appeared in the Windows Device Manager and MAX, but MAX has indicated that the aircraft was missing (error-88705) and that Windows can't find a driver for the instrument.

    We then plugged a cDAQ-9178 in the fifth cRIO and everything just worked.

    What is the difference between a cDAQ-9174 and cDAQ-9178 other than the number of the module support?

    Paul

    Hi Paul,.

    It seems it could be a driver problem! What DAQmx version you have installed on two computers? Reinstall the latest version may be worth it because it looks like there may be corruption. You can find the latest version here: http://www.ni.com/download/ni-daqmx-15.5/5901/en/

    You can manually associate the device driver, here: http://digital.ni.com/public.nsf/allkb/5B80CAAA64413B4C86256C5E0000C1A7

    There are modules connected to the cDAQ chassis?

    Also, sometimes, this can happen if you do not restart your computer after the installation of the NOR-DAQmx driver. Restart your computer after the driver installation will allow you to reserve the device successfully. Here are a few others not to try:

    • Check the charger to device OR to see if it is running

    • Reset the service OR charger

    • Reset the MAX Configuration database

    • The system power cycle

  • Slow outputs analog on the cDAQ-9178

    My control of the C language application calls the DAQmx API 200 times per second to update some AOs, using the following call:

    DAQmxWriteAnalogF64 (taskHandle,

    1, TRUE, 0.0, DAQmx_Val_GroupByScanNumber, data, NULL, NULL);

    On a system with a single chassis cDAQ-9178 and two modules OR 9264 AO, it works correctly with a task of up to 4 channels. If I add channels to the AO job, the flow slows down below 200 Hz (5 ms). Here are the times:

    Chans ms

    8 6.8

    16 13.4

    32 26.9

    How can I write 1 sample per channel, more than 32 channels, all 5 ms? It's a control application that meets the entries, so I can't write several samples per call.

    Thank you.


  • How to give the option to the user to select the measures of temperature or voltage with NEITHER cDAQ-9178

    Hello. I wrote two programs for the NOR cDAQ-9178 that work perfectly, but now I would like to combine... and users the ability to perform a measurement of the temperature (module NI 9214) or a measure of tension (NI 9201 module). I tried to use an Enum to a case Structure control, where the

    user can choose either 'Measure the temperature', or 'Measure the tension', but during execution of the program, only the before user input panel opens and the program stops. Could someone please look at the code below and give me advice on the placement of my two programs in a structure of case? Each program contains two screws... a Subvi user input and a measure vi. Is it possible for me to drag the temperature and tension screw in the structure of matter? Thank you.

    FYI - I am reposting this, because I couldn't get tethering to work on my previous post

    I found my solution. I had to right click on the Subvi vi... 'Subvi node Setup' and select set the front panel

  • Bad analog output help Every_N_Samples-NI-9263 cDAQ-9172 chassis (works with cDAQ-9178 chassis)

    Hello

    The NOR-9263 analog output voltage geberation works correctly with the cDAQ-9178 chassis but gives wrong result using the chassis NOR cDAQ-9172.

    In the attached code example, a single cycle of a sine wave is composed of 40000 samples and came out in the background using Every_N_Samples at a rate of production of 5000 samples per second.

    The output buffer size is set to 10000 samples.

    Prepare us the buffer writing 10000 samples 1, then write the remaining data in the background using the Every_N_Samples callback.
     
    Bug: Using the cDAQ-9172 chassis, to the 5000 s/s sampling rate with the help of an external field (or through closure to another HAVE), we observed that 1 10000 samples came out twice, followed by the rest of the waveform. The last 10000 samples are never exits. If you are working properly, we would expect to see 1 full cycle of a sine wave.

    The bug does not occur with the chassis NOR cDAQ-9178. I use the driver NIDAQmx v9.2.1f0 on Windows XP
    The bug does not happen with simulation devices, so you will need to use harwdare real to reproduce.

    Please find attached an example of code C based on the example program OR "ContGen - IntClk.c" to reproduce this bug.

    Thank you

    whemdan,

    The MathWorks

    Hi whemdan,

    By default, DAQmx regenerate old samples if no new data is available.  To give the correct behavior, you can:

    Use DAQmxSetWriteRegenMode to disable the regeneration (DAQmx_Val_DoNotAllowRegen).  In most cases, this is recommended if new data are written continuously in the buffer as the build is in progress.

    If you just need to generate 40 k samples, you can write them just all at once, rather than in 10 pieces of k (the code you attached probably is just an example, so I'll assume that you have a reason to write the data into segments in your actual code).

    I think the difference in behavior between 9172 and 9178 can if explained by the different way, buffering is set up on each product.  The 9172 uses a buffer of 8 k (on the STC2) in all cases (source).  The 9178 uses an 8 k of memory buffer (on the STC3) If you use regeneration shipped, but uses the 127 samples FIFO cartridge, if you use no on-board regeneration (source).

    Then... on the 9172 8191 samples are immediately transferred to the FIFO.  By default, the hardware is going to request new data when the FIFO is less to fill (this is configurable with DAQmxSetAODataXferReqCond).  I'm not sure what the transfer data request size is in your case (you can set the maximum value with DAQmxSetAOUsbXferReqSize), but obviously it is bigger than the other 1809 samples that you have not yet sent to the Board of Directors of your first entry.  At this point, the pilot will regenerate 10 existing k samples so that sufficient data will be available to meet the demand of data transfer.

    The 9178 however use the FIFO of 127 smaller samples so you will not have the same behavior in your case.

    In summary, the behavior is explainable by the difference of material.  If you want to avoid to regenerate old samples, you should ban the regeneration using DAQmxSetWriteRegenMode.

    Best regards

  • Connect a cRIO-9081 a cDAQ-9178

    I want to connect a cDAQ-9178 chassis to a cRIO-9081USB port.

    The cRIO-9081 has Windows Embedded 7 on it.  I wrote a LabVIEW FPGA program that is loaded in the cRIO FPGA.  Once started the FPGA, FPGA ignores basically on the side of Windows, very minimal data exchange.

    I want to use the side WIndows to run a program cDAQ.  I have to do it this way because the cRIO has 7 modules inside and the cDAQ has 7 modules.

    Whenever I insert the 14.5 of NOR-DAQmx CD into a CD drive on the cRIO, I see that the cRIO drivers.  How can I get the cDAQ drivers installed?

    I was able to work around the problem by copying the DAXmx on a USB and install from there.

  • new cDAQ-9178 chassis was smaller than the cDAQ-9172 old buffer?

    Digital waveform features:

    Waveform acquisition (DI) FIFO for cDAQ-9172: 2047 samples

    Waveform acquisition (DI) FIFO for cDAQ-9178: 127 samples per slot

    This means that the new HW (9178) has a much smaller than the old buffer (9172)!

    I want to run a correlation over generation/acquisition at 2 MHz with 2000 samples. Does this mean that the new chassis will not be able to acquire the whole of the data (I use a NI 9401 module inside the chassis)?

    FIFO sizes are misleading and not a true indicator of the chassis supporting the streaming is not the single buffer.  We did some tests comparing the latest and cDAQ-9172 chassis.  You will not notice the difference, especially with your application to a finished task of 2 000 samples at 2 MHz.  With 2 000 samples, you can run your DI task on your chassis cDAQ-9178 at 10 MHz if you wanted without problem (don't try with continuous or even finished tasks).

    The only time where the FIFO size really comes into play is when you run a primary task at high rates, say > 5 MHz, even if it is system dependent.  At these speeds a FIFO that is deeper 2 000 samples you buy only tens or hundreds of additional microseconds when Windows jitter is measured in milliseconds.

    I would be very surprised if there is a practical application that worked on a cDAQ-9172 chassis which did not work on newer USB cDAQ chassis.

  • Why NEITHER cDAQ-9178 isn't in the DAQmx device simulated in MAX?

    Hi all

    I want to create a device that simulated for cDAQ-9178. But Max, I could not find it. It lists only NOR cDAQ-9172. I have the version of NOR-DAQmx 8.9.5.

    Thank you

    Raja

    LV 2009

    Hello Dennis,.

    NEITHER cDAQ-9178 is listed under DAQmx 9.0.2 supported device.

    Thank you

    Raja

  • cDAQ-9174 cannot use the counters of 3 or 4

    Hello

    I try to display the entry of a potentiometer and 3 encoders of Quad.  I have a CDAQ-9174 with a 9215 OR (for the POT) in the slot 1, 9411 or in slot 2 and a NI 9401 in the Groove 3 (soon to another NOR 9411 when it happens).

    If I run the example 'Measure angular Position.vi' on each individual encoder (by selecting either modules on counter 0), I can see all three encoders work properly (exit count increments and decrements as expected)

    If I run the Test panels able and automation, I see all three encoders switch their respective 2 channels each.

    But when I change 'measurement Position.vi"to have all three separate entries (I copied the task of creating and all its entries twice, then expanded the while loop to have three different DaqMX Read vi, then 2 clearer spots on the right side (output) at all in a loop), I see only 2 encoders increment and decrement.

    I do not use Index Z entries, I changed the type of decoding to X 2 for all three.  I tried to change that, but I especially get the same result (2 encoders working, is not 1).

    I changed the encoders are the use of counters to 0, 1, and 2.  Only the assigned to counter 2 encoder does not work.

    I tried to use meter 3 - same problem.

    Is there a way to confirm that the cDAQ-9174 counters all work?  I tried all three in the test panels and they seem to be good?

    A cDAQ-9174 can manage 2 Quad encoders using 2 signals of each (A and B signals - A for metering, B for management)?

    I have something configured incorrectly?  If you use two Modules of entry at the same time, is it some additional configuration that must be done?

    Really appreciate some help here.

    Thank you

    Sam

    Yes, we use the 9.0.2 version drivers and no there is no error message.

    Turns out we had wired it incorrectly for Counter 2 use.  Being on the second module, I thought we had wire the same way the first module has been wired - not realizing that counters need a provision of the specific pins.

    Thank you for looking into this.

  • cDAQ-9178 & NI 9401 - ASM: incremental Rotary encoder works is not beyond a certain frequency

    I use a chassis with a NI 9401 DIO module 9178 cDAQ.  I'm trying to convert the output of a rotary incremental encoder ASM (in radians) to rpm.

    Sensing head (PMIS4-20-50-240kHz-TTL24V-Z0-2M-S)

    Snap ring (PMIR7N-20-50-M-20)

    The encoder outputs 2500 pulses per rev (output 5V TTL).  The maximum speed which will see the encoder is 2800 rpm, which is equivalent to 2800 RPM * 2500ppr/60 = 116,667.67 Hz in terms of frequency.

    Since the NI 9401 of the operations specifications:

    Maximum of the input signal switching frequency by the number of input channels, by channel

    8 input channels... 9 MHz
    4 input channels... 16 MHz
    2 input channels... 30 MHz

    I use only 1 channel, so I'm assuming that the 9401 should be more than capable of handling the 116kHz which the ASM encoder is spit.

    Everything works fine until about 2100 RPM (~ 87, 500 Hz) but then I begin to see a drop in rpm, followed by a flattened behavior, then a slight increase. But never more than 2100 RPM.  Our test unit is inspected for other reasons at the moment so I can't produce a plot of the behavior (I can reupload later).  I think this must be a matter of aliasing with the meter or something of the sort.  I have a digital filter set in place with a minimum of 4.0E pulse width - 6.  It is two times smaller than the width of minimum pulse at a frequency of 116kHz (0.0000085714).  I don't think this should have an impact on the calculation.

    Any suggestions? This value of RPM is essential to our application.

    Thanks in advance,

    -MB

    brown_ktr wrote:

    I have a digital filter set in place with a minimum of 4.0E pulse width - 6.  It is two times smaller than the width of minimum pulse at a frequency of 116kHz (0.0000085714).  I don't think this should have an impact on the calculation.

    A 116 kHz frequency, the period is ~8.57 us, but the pulse width half duty cycle of 50%.  Ascent/descent time factor, and it is quite possible that 4 US is too long for your encoder signal.

    The shape of this graph supports this theory, if we consider that there is variation in the exact pulse of each encoder pulse width.  The shortest pulse is ignored when the filter starts to kick in, and the speed of ROTATION increases pulses longer and longer are ignored then as well.

    Try to decrease the minimum pulse of digital filter (US 2 or even 1 US) width and see how it goes.

    Best regards

  • How to create a chart using two independent loops while?

    Hello world

    I'm currently developing a program for the acquisition of data. In this program, I have two independent, while loops that each output a number of type double with each iteration of the loop. I am able to successfully create two independent waveform graphs (data / time) for each of the loops when placed inside. However, I now want to create a live data xy chart (the output of a loop is x and the output of the other is there).

    I have a problem, that the distinct nature of loops... When I try to extract data outside of the loop (naturally), it is not refresh with each iteration of the loop causing the graph xy does not work in the way I intend. Is there an easy way to solve this problem? If more clarification is needed, please let me know!

    David

    If the two loops are not synchronized, exactly how do you do the xy graph, where each point, by definition, must have a value of each loop.

    1. updated when updates or the other value and combine with the last value from the other loop?
    2. updated on a constant basis with the current value of each loop?
    3. ... There are many other possibilities.

    #2 is the easiest. Simply create a third loop with a reasonable time and graph the two values via local variables. You probably also should limit the history of ranking somehow.

  • How to upgrade a shift with two independent loops while register?

    Hello everyone, I have a panel with two clusters with indicators control... a left and a right. I have messages from serial port, and I'm currently updating the left and the right within their own while loops. I have a single variable, which must be updated based on updates on both sides. Basically, I need follow the last selection update on each side... If I had 1, 2 and 4 on the left side and 3 on the right side... I would need to follow 4 was the latest updated the register shift variable for uses more in my vi. Can someone give me an idea how to upgrade this a variable based on two while loops that run independently in the same sequence context? Thanks in advance, cayenne

    Thank you both of you for the suggestion.

    I managed to find a way to get the values that I needed without EI... but I read the link to the Nugget in their subject, and I can't expect a use for them in the future.

    Cayenne

  • No simultaneous while loops

    Right, I have a two part program. The first generates a sine wave and exporting to an external device. The second part takes a camera input and performs calculations on the data and exports it in a spreadsheet.

    The problem I have is that the data is not saved with the frame rate of the camera (17fps), but at the level of the loop the first loop (10 per second). When I run the program separately camera part, I get the full 17 per second.

    I wish that both parties in a VI.

    So my question is, how can I get loops to run at the same time no?

    I would include my VI there a lot of complicated functions that do support any sense, but I think my question is fairly general. I'll be happy to give more details.

    Thanks to anyone who can give me some advice on this.

    James


  • Stopping at two simultaneously while loops in a sequence

    I'm under two loops while at the same time. A while loop is used to produce a square using the acquisition of data USB of NOR-6343 wave. The another while loop contains my main code. I make sure that my square wave while loop stops after the hand while the loop is over. I used the function "To highlight the Excution" to see if my code is excuting in order and the way I expected to and it seems to do, but when I hit the button stop the square wave while loop stops so that the main while loop always ends excuation. The main while loop takes a series of measures using the data acquisition Toolbox, so I need to make sure that the square wave is being emitted during the execution of the loop of mian.

    Currently to work around this problem, I wired a constant numberic (101) inside the large loop for a numberic out indicator. And I used a cheque codition "Equal" in the square wave while loop and set it so that this loop stops when he sees the value. This seems to work and made sure my square wave still series, while the main loop is excuting finishing. Even if it works, I want to know if there is a better way. Attached are a couple of screenshot of the loops.

    I vote for using a notification utility.  You must order the loop at the end.  Do a front panel indicator to stop a loop is not a good practice.

  • Impossible to read signals off cDAQ 9178 with executable file

    Hello

    I built a Vi read analog inputI with a NI 9201 module and make an executable file to run on a pc differnent. on the build computer, everything works fine.

    on the other pc, I installed the engines of execution. I can run the executable, but I don't get the analog input signals. When I look into the MAX I can see the DAQ hardware and even use panels of test to measure these entries.  with the executable, I am able to edit the output of a module 9265 signals.

    I use the latest version of labview software.

    Thanks for your help!

    I solved it by exporting the form of MAXIMUM for the secondary PC configuration files.

    Best regards

    JORT.

Maybe you are looking for