9188 sample clock for Example VI

Hi,
   I'm trying to run the Example VI: "Gen Event for Ext Signal" on Labview 10 with the NI cDAQ 9188. I'm getting an error (see below). I tried fixing this error by changing the code from "Hardware Timed Signal Point" to "Continuous" but then it seems my sample clock doesnt work. Any ideas what's going on?
>>>>>>>>
Error -200077 occurred at Property Node DAQmx Timing (arg 3) in DAQmx Timing (Sample Clock).vi:2->Gen Event for Ext Signal.vi
Possible reason(s):
Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.
Property: SampQuant.SampMode
Requested Value: Hardware Timed Single Point
You Can Select: Finite Samples, Continuous Samples
Task Name: _unnamedTask<296B>
>>>>>>>>>>

Hi there roto,
Does the following link help?
NI-DAQmx Hardware-Timed Single Point Support for Oversample Clock Timed Devices: http://zone.ni.com/devzone/cda/pub/p/id/1325
Best,
Ryan C.
Applications Engineer
National Instruments

Similar Messages

  • Using a Counter to error-check External Sample Clock

    Hi all,
    I am newish to labview and am working on a data acquisition project. I've managed to get the basics under control, but here's my situation and question...
    -- I am using the S-6123 card to capture and record data on two or more AI channels.  I am using a rotary encoder to generate a pulsetrain that I am using via PFI0 as the sample clock for recording the AI data.
    -- This rotary encoder gives 720 pulses per revolution and an index pulse once per revolution.
    -- In my data acquisition, I am pulling 1440 samples at a time with the DAQmx "read" function.
    I have been experimenting with counters and can get the RPM out of the pulse trains well enough, however I was wondering...
    Is there some way to use the 2 counters on the card (and signal routing of the two pulse trains) to double-check that the 1440 samples I take correspond to two exact revolutions, and that I'm not getting ahead of or behind the rotation of the encoder due to missing clock pulses or reading false pulses. I have a couple of ideas on how to attempt to do it, but to me they don't seem very reliable or efficient, so I thought I'd put it to the experts to point out of there is a more obvious way of doing it.
    I have attached a pdf of the specifications of the encoder family, the pulses that will be output are on the right hand side of page 2.
    With many thanks in advance,
    Peter
    Message Edited by mumech on 07-22-2008 01:05 AM
    Attachments:
    REncoder Specs.pdf ‏312 KB

    Thanks very much for your reply. I had come across the use of counters with angular encoders but hadn't quite thought of the concept in this way.
    I will have to experiment a bit over the next day or to see what this is capable of, the examples seem quite comprehensive, however I'm not sure if I will run into issues due to the fact that I am using the rotary encoder as the sample clock for my analogue data.
    Would I indeed be able to compare these values (ideally check the position of the encoder after each set of data acquisition) without a "third party" sample clock common to both? (which isn't appropriate for this application)
    If I was only running at low speeds, I might be able to implement this by simply checking the position of the encoder after each read of the data. However, at higher speeds there might be synchronization issues due to the buffering of the analogue data. So when getting the measurement from the encoder counter chances are the analogue data was acquired at an earlier time.
    I know I haven't worded this very well, but how might I synchronise this error checking method?

  • External sample clock encoder

    hello,
    my problem is very urgent, I have to sample 3 analog input synchronised to an encoder. How can use the channel from the encoder and use them to generate a external sample clock for acuiring the analog signals?how can I phisically attache the wire from the encoder to the digital line?and how the vi should be??my encoder has A, Anot,B,Bnot channel, but eventually with a circuit I can get just A and B. I have a PCI6221.
    Please is very urgent!!

    Hi orsogna,
    see the example Cont Acq&Graph Volt-Ext clock in the Labview Example Finder.
    About wirings, you have to connect our encoder signal (A signal is good) to a PFI input in order to correctly read the TTL signal.
    Ciao!
    Simone S.
    Academic Field Engineer - Med Region

  • Using AI Sample Clock to Trigger Counter Samples

    My basic question is:  Is the ai\SampleClock signal only active while an analog input task is running?
    The details are:
    I have an X-series PCIe-6321 multifunction DAQ card.  It is controlling a SCXI chassis and has a SCXI-1180 and SCXI-1302 so I can control analog inputs of the chassis as well as access the 4 counter  on the card.  My application requires that I use all 4 counters to measure a frequency input signal and synchronize the samples to the analog input signals.  I have created 5 tasks, 1 for the AI and 1 for each counter.
    I am using LabVIEW 8.6.1 with the latest NI-DAQ drivers on and 64-bit Vista OS 
    1. Are there any driver or hardware restrictions that would cause this solution not to work? 
    2. Can I use the ai\SampleClock as in input sample clock for each of the frequency tasks?  If I do this will the sampling start be syncronized?  I.e. if I start each of the frequency tasks first, will they wait until the AI task is started before they start sampling?
    3. If that doesn't work, do I need to route the sample clock from the AI task to a PFI line (PFI1) and then use that as input to the frequency task sample clock? 
    I usually do option 3 when synchronizing two cards in  PXI chassis and only use the software task start in stead of of synchronizing on a digital start, since the sample clock will control the samples anyway.  I need to know if the same behaviour works with the scenario above.
    Thanks,
    Bob
    Prolucid Technolgies Inc. 
    Solved!
    Go to Solution.

    Hi Bob,
    I can confirm that the ai/SampleClock will only be active while the AI task is running.  As far as the other questions go:
    1.  You'd have to provide more information about what you looking to do exactly, but there is no problem with routing the sample clock of the Analog Input task to be used with the Counters.  I would read through the section of the X Series User Manual that discusses sample-clocked frequency measurements (starting on page 7-16) for some more information about what is actually going on during this configuration to make sure it suits your requirements. 
    The frequency of the signal to be measured should be at least twice as fast as the sample clock of your AI task.
    2.   You can indeed route the signal to all four tasks at the same time (you can refer to the Device Routes page in MAX to double-check routing restrictions).  The sampling will be synchronized provided the four counters are started before the AI task, but the counters will be armed at different times unless you configure an Arm Start Trigger (see page 7-45 of the X Series User Manual).  I would consider using the ai/StartTrigger if you wish to do this. 
    The effect of not arming the counters at the same time would be a different number of periods to average on each counter for the very first sample (assuming averaging is enabled).  This might not be a big concern but I just wanted to point it out.
    3.  The routes are available internal to the board so external routing isn't necessary, you can just specify to use the AI Sample clock for the clock of each counter and the routes will be made for you.  If you prefer to export the signal on a PFI line and route it back in on a different PFI line this option is also available to you but shouldn't be necessary.
    I hope this helps you get started.  I'd make sure to take a look at chapter 7 of the X Series User Manual if you get a chance since it describes how all of the counter configurations work in more detail.  If you have any related questions don't hesitate to post back.
    Best Regards,
    John
    Message Edited by John P on 12-01-2009 07:52 PM
    John Passiak

  • Implicit counter and sample clock together

    Hi,
    I am using Labview with a NI DAQPad-6015 to measure temperatures (4 thermocouple channels) and control via a duty cycle (at constant pulse frequency).
    The VI I built contains a sample clock for setting measurement rate and an implicit timer to drive the "pulse frequency counter output".
    In this way, the measurement rate is slowed by the implicit timer (I guess, as the measurement VI alone runs with the properly timing).
    How to overcome this matter?
    Thanks in advance
    Gianluca 

    here is the VI I built for acquisition and control.
    The bottom loop acquires and sends signals, while the top loop averages measurements and write all into a file.
    Freq_duty_cycle.vi allows me to change on the fly both frequency and duty cycle of pulse.
    HBridge.vi is the control for a H bridge I drive to invert current direction to a load. 
    Attachments:
    HBridge.vi ‏12 KB
    temp_acq_4channels_peltier_control_Hbridge.vi ‏71 KB
    Freq_duty_cycle.vi ‏14 KB

  • Selecting sample clock frequency for NI 4472

    HelIo:
    I have been using NI 4472 DSA on a PCI slot for reading accelerations. I was reading the NI 4472 User Manual and under "Selecting your sample clock frequency", it specify two increments (95.37 uS/s for Fs<51.2 kS/s and 190.7 uS/s for Fs>51.2 kS/s). Can you explain what these increments mean? I understand the sampling frequency, but what does this time increment mean?
    Also, it says "If you do not specify a rate at a multiple of the increment, NI-DAQ will automatically choose the next higher step for you". Dose that mean I cannot specify any random value for Fs? Dose it have to be a certain multiplication. Please explain this for a novice to Labview/DAQ.
    Thanks a lot in advance.

    Hello MiamiVipul,
    Those statements in the User Manual mean that the PCI-4472 only has a finite set of sample rates that it can produce.  The allowable sample rates are given by 51.2 kS/s - k * 95.37 uS/s or 51.2 kS/s + k * 190.7 uS/s, where k is an integer.  As you can see, the step size is quite small, so you still have a lot of flexibility. 
    As an example, if you specify a sample rate of exactly 51.2 kS/s, that would be fine.  However, if you try to set the sample rate to something between 51,200 S/s and 51,199.990463 S/s (51.2 kS/s - 95.37 uS/s), the driver will automatically coerce that sample rate to next highest allowable rate, or 51.2 kS/s.  In order to find out the exact value that the driver is using, you can read the from the DAQmx Timing Property "Sample Clock:Rate" as shown below:
    I hope this helps!
    Best regards,
    Message Edited by Jarrod B. on 01-04-2007 09:03 AM
    Attachments:
    ReadSampleRate.JPG ‏6 KB

  • Max. rate for sample clock source

    Hi,
    thinking of a future application for digital event counting (similar to
    the Count Digital Events-Buffered-Continuous-Ext Clk example ) we have
    two questions:
    What's the maximum rate applicable to the sample clock  source
    terminal  (in our case the external signal has rates up to 500kHz)?
    Why needs the sample clock rate to be specified as the signals at the
    source terminal determine when a sample is written to the buffer?
    Thanks a lot for any answer!

    Hi Werner
    For rates about 500kHz it must be work and you need the sample clock rate because you can also choose other rates to read the buffer.
    regards
    Manuel

  • PCI-6281 How to use80 mHZ timebase for A/d and D/A sample clocks

    Does anyone know how to use the 80 mHZ internal clock as the timebase for my A/D and D/A sample clocks rather than the default 20 mHZ timebase?
    I am using straight NI-DAQmx version 8.3 with C code. No Lab View, no Measurement Studio.
    I have an application which uses the D/A to generate a sequence that is collected by the A/D.  The D/A is clocked out at an integral multiple of the A/D clock.  In order to maintain this integral relationship I can only use a limited set of Sample Clock Timebase Divisor pairs (as returned by DAQmxGetSampClkTimebaseDiv).  This means that am further from my desired base frequency than normal.  For example, using the degault 20 mHZ timebase, if I want a 2000 hz center fequency, the closest I can get is 2003.205 hz.
    I cannot find anyway to use the 80 mHZ internal clock as the timebase for my A/D and D/A sample clocks.  If I could, it would be possible to get closer to my desired center frequency.

    Post is responded to in the multifunction DAQ forumn.
    PCI-6281 How to use80 mHZ timebase for A/d and D/A sample clocks
    Have a good one.
    Michael D
    Applications Engineering
    National Instruments

  • Wait for Next Sample Clock error, or 'How do I put this VI on a diet'?

    Hello!
    In the attached VI I've been running since June, I have all the functionality I need.  No questions there at all, thanks to much time and help from this board!
    My nagging problem is that any time I use the PC for other minor tasks other than Labview, it will display the following error:
    209802 occurred at DAQmx Wait For Next Sample Clock.vi:1
    A search earlier in the month indicated that it could have been a result of my old and outdated PC; I've since replaced it with a brand-new dell dimension 1100.  Celeron 2.53ghz with 1.00gb of ram.  Should be enough to service Labview and other minor tasks (automatic antivirus updating and also maintenance tasks).  However, any time any other program opens or even if the screen is scrolled around on Labview quickly, I get that same error.
    Resource usage when idle, with nothing but this VI running is 5-10%, all labview.  Upon scrolling the VI, it quickly jumps to the 58-60% and above mark and soon throws that error.
    I know that there's a lot of code here that can be cleaner--I know that even though it's functioning correctly, there could be a less resource-hogging way to go about it.  Can anyone give me any suggestions on how to make this VI a little 'lighter'?
    Thanks so much in advance,
    Ralph
    Still confused after 8 years.
    Attachments:
    Currently Running 063006.vi ‏899 KB

    Hi Ralph,
    The wait.vi waits until the amount of time has passed. While the wait on next ms.vi uses some kind of quotient and remainder on the computer time until the remainder passed zero.
    In this way you can synchronize 2 loops, and somehow it is less time-consuming. The only difference you will see is in the first run!
    There you see a smaller amount of time:
    Message Edited by TonP on 10-04-2006 04:21 PM
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!
    Attachments:
    Example_BD.png ‏2 KB

  • Can I use a substitute for the Sample Clock?

    I have three different analog inputs coming from one device (PCI-6221).  Two inputs are running at the same sample rate while the third needs a faster sample rate and a trigger.  I have these seperated as two seperate tasks but my problem is they both use the sample clock.  Can I use a substitute for the sample clock on the third channel?
    I am running LabVIEW 8.2 on Windows XP.
    Thanks in advance for your help.
    Ron Deavers, CLD

    Hi programmindragon,
    I understand you are trying to
    configure your PCI-6221 to sample on multiple channels, while having
    different rates and triggers for the channels. Unfortunately, you can
    only configure one analog input task to run at once and all the channels in
    the task must share the same configurations, including the sample clock
    and trigger. This is due to the fact that all the channels are
    multiplexed to a single amplifier and ADC on the device. Thus, you will
    not be able to configure the two inputs at one rate and use a different
    clock rate and trigger for the third input. Is it possible to sample at the
    maximum rate on all channels and decimate the data that you don't need on the certain
    channels, as well as share the same type of triggering? Hopefully you will be able to run your application with the same configuration across multiple channels, otherwise you may need multiple DAQ devices. Please let me know if you have any further questions related to this issue.
    Regards,
    Daniel S.
    National Instruments

  • "External sample clock" and "Rate" for digital input acquisition

    Dear all,
    I want to acquire digital input (21 bits with external clock = 50 kHz) with a PCIe-6343 NI board. Using the  DAQ assistant under Labview, I selected the advanced timing with the sample clock time parametrized as External. However, it is also possible to select the Rate of the acquisition. In my case, i want to get the data at the rising edge of the external clock signal, so at a frequency of 50 kHz.  How can I do that ? I just need to put a Rate of 50 kHz ?
    thanks for your help.
    Cedric 

    Cedric,
    dddsdsds wrote: 
    [...]In my case, i want to get the data at the rising edge of the external clock signal, so at a frequency of 50 kHz.  How can I do that ?[...]
    You answered your question already. If you want to use an external clock, you have to configure the timing source of your task to be external. In order of proper buffer configuration, you should enter 50kHz as rate in addition to the external configuration, but this will not influence the speed of the acquisition (since it is "clocked" externally!)
    hope this helps,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • DAQ Assistant, Analog Signal to Analog Comparison Event for sample clock

    I am using a PCI-6071E and DAQmx.  I would like to use an analog signal on PFI0 to trigger Analog Comparison Event to be used as the sample clock in DAQ Assistant.  Is this possible and if so, how? 

    Hi Ben,
         You can use your analog signal on a PFI0 line as you are intending.  A few pitfalls of doing so are listed in this article.  Additionally, this Developer Zone article explains what you are trying to do, and gives and example that you may find helpful.  Have a good one!
    aNItaB
    Applications Engineer
    National Instruments
    Digital Multimeters

  • Can buffered digital edge detection only be performed using an external sample clock?

    I am working on an application where I need to measure the speed (rpm) of a motor as it starts up using the output of its built in hall effect sensor.  The sensor should output 2 pulses per revolution of the motor.  My plan is to count the pulses from when the counter (counter 1) is armed to when it is up to speed. Looking at the M series manual, the CVI (v8.5.1) help, and the examples it appears that this can only be done using an external sample clock.  Is there a way to route an internal sample clock to the appropriate terminal on the counter so that I do not need to add additional hardware?
    I am currently using a PCI-6289, but the final application will use a CDaq-9188 chassis (using one of the the built in 32-bit counters).
    Thank you for your assistance.

    Thank you for your input.
    However, I did forget to mention one detail of the application.  I need to buffer the edge counts so that I can graph the speed of the motor as it starts up.  I need to be able to acquire the edge counts at reqular intervals so that I can determine how fast the motor was rotating at each point.  So far I have not been able to find an example of doing this without and external sample clock.  As I mentioned, in the final application I will be using the 32-bit counters on a CDAQ-9188 chassis.  The only thing I can think of at this point is to generate a pulse out of the second counter and use that as the sample clock.  Will this work?

  • Buffered event counting. Why can't I explicitly sequence generating the Sample Clock Pulse and reading the counters?

    At irregular occasions I need to grab counts from several counters, and buffering the counts must be done simultaneously for all counters. I'm modeling my approach after zone.ni.com/devzone/cda/tut/p/id/5404 which someone kindly pointed out in an earlier thread. However, that example only uses one counter, and you can't test the synchronization with only one counter, so I am using two counters configured the same way, and they're wired to a single benchtop signal generator (for example at 300 kHz).
    What I want to do, I can test in a loop with a somewhat random wait in it. I want to drive a hardware digital output line high for a few ms and then low again. The hardware line is physically connected to terminals for my timing vi's Sample Clock Source and so will cause them to buffer their counts for later reading. After I pulse this line, when I know new good buffered counts await me, I want to read both my counters. If their bufferings are simultaneous, then each counter will have counted the same number of additional counts since the last loop iteration, which I can check by subtracting the last value sitting in a shift register and then subtracting the two "additional counts" values and displaying this difference as "Diff". It should always be 0, or occasionally +1 followed immediately by -1, or else the reverse, because buffering and a count could happen practically at the same moment.
    When I do this using a flat sequence to control the relative timing of these steps, so the read happens after the pulse, the counters often time out and everything dies. The lengths of time before, during, and after the pulse, and the timeout value for the read vi, and the size of the buffer and various other things, don't seem to change this, even if I make things so long I could do the counting myself holding a clipboard as my buffer. I've attached AfterPulse.vi to illustrate this. If I get 3 or 10 or so iterations before it dies, I observe Diff = 0; at least that much is good.
    When I use two flat sequences running in parallel inside my test loop, one to control the pulse timing, and the other to read the counters and do things with their results, it seems to work. In fact, Diff is always 0 or very occasionally the +/- 1 sequence. But in this case there is nothing controlling the relative timing such that the counters only get read after the pulse fires, though the results seem to show that this is true. I think the reads should be indeterminate with respect to the pulses, which would be unreliable. I don't know why it's working and can't expect it to work in other environments, can I? Moreover, if I set some of the pulse timing numbers to 1 or 2 or 5 ms, timeouts start happening again, too. So I think I have a workaround that I don't understand, shouldn't work, and shouldn't be trusted. See SeparateSequence.vi for this one.
    I also tried other versions of the well-defined, single sequence vi, moving the counter reads to different sequence frames so that they occur with the Sample Clock Source's rising edge, or while it is high, or with the falling edge, and they also often time out. I'll post these if anyone likes but can't post now due to the attachment limit.
    Here's an odd, unexpected observation: I have to sequence the reads of the counters to occur before I use the results I read, or else many of the cycles of this combine a new count from one counter with the one-back count from the other counter, and Diff takes on values like the number of counts in a loop. I though the dataflow principle would dictate that current values would get used, but apparently not so. Sequencing the calculations to happen after the reads fixes this. Any idea why?
    So, why am I not succeeding in taking proper control of the sequence of these events?
    Thanks!!!
    Attachments:
    AfterPulse.vi ‏51 KB
    InSeparateSequence.vi ‏49 KB

    Kevin, thanks for all the work.
    >Have you run with the little execution highlighting lightbulb on? -Yes. In versions of this where there is no enforced timing between the counter and the digital line, and there's a delay inserted before the digital line, it works. There are nearly simultaneous starts on two tracks. Execution proceeds directly along the task wire to the counter. Meanwhile, the execution along the task wire to the digital high gets delayed. Then, when the digital high fires, the counter completes its task, and execution proceeds downstream from the counter. Note, I do have to set the timeout on the counter longer, because the vi runs so slowly when it's painting its progress along the wires. If there is any timing relationship enforced between the counter and the digital transition, it doesn't work. It appears to me that to read a counter, you have to ask it for a result, then drive the line high, and then receive the result, and execution inside the counter has to be ongoing during the rising line edge.
    >from what I remember, there isn't much to it.  There really aren't many candidate places for trouble.  A pulse is generated with DIO, then a single sample is read from each counter.  -Yup, you got it. This should be trivial.
    >A timeout means either that the pulse isn't generated or that the counter tasks don't receive it. - Or it could mean that the counter task must be in the middle of executing when the rising edge of the pulse arrives. Certainly the highlighted execution indicates that. Making a broken vi run by cutting the error wires that sequence the counter read relative to the pulse also seems to support that.
    >Have you verified that the digital pulse happens using a scope? -Verified in some versions by running another loop watching a digital input, and lighting an indicator, or recording how many times the line goes high, etc. Also, in your vi, with highlighting, if I delete the error wire from the last digital output to the first counter to allow parallel execution, I see the counter execution start before the rising edge, and complete when the line high vi executes. Also, if I use separate loops to drive the line high and to read the counter, it works (see TwoLoops.vi or see the screenshot of the block diagram attached below so you don't need a LV box). I could go sign out a scope, but think it's obvious the line is pulsing given that all these things work.
    >Wait!  I think that's it!  If I recall correctly, you're generating the digital pulse on port0/line0...  On a 6259, the lines of port 0 are only for correlated DIO and do not map to PFI. -But I'm not using internal connections, I actually physically wired P0L1 (pin 66) to PFI0 (pin 73). It was port0/line1, by the way. And when running some of these vi's, I also physically jumper this connection to port0/line2 as an analog input to watch it. And, again, the pulse does cause the counter to operate, so it clearly connects - it just doesn't operate the way I think it is described operating.
    For what it's worth, there's another mystery. Some of the docs seem to say that the pulse has to be applied to the counter gate terminal, rather than to the line associated with the sample clock source on the timing vi. I have tried combinations of counter gate and or sample clock source and concluded it seems like the sample clock source is the terminal that matters, and it's what I'm using lately, but for example the document I cited, "Buffered Event Counting", from last September, says "It uses both the source and gate of a counter for its operation. The active edges on the gate of a counter is used to latch the current count register value in a hardware register which is then transferred via Direct Memory Access...". I may go a round of trying those combinations with the latest vi's we've discussed.
    Attachments:
    NestedSequences.png ‏26 KB

  • Number of samples read is not equal to number of AI Sample Clock pulses - why?

    Dear Community,
    I am using several PXI-4472s for acquisition and at the same time I am routing the AI Sample Clock signal to a PXI-6608 counter/timer card so that I can time stamp each sample.
    Unfortunately I am finding that I always get more AI Sample Clock pulses than samples, so I don't know which time stamp corresponds to which sample. Why is that?
    For acquisition I am using something very much like the following DAQmx Sync and Stream example:
    Sync and Stream.vi
    After stopping the tasks, I use DAQmx Read vi again to read whatever samples might be left in the buffer, but that request always comes back empty. I can't figure out if there are AI Sample Clock pulses at the beginning of the task that don't actually acquire any data, or if I have data left over in the buffer after I stop the task that I am not reading properly.
    Any help would be greatly appreciated!
    Cas

    Cas,
    DSA boards (like the 4472) differ from standard DAQ devices. While most DAQ devices use a relatively common type of ADC known as a sequential approximation ADC, a DSA device uses a more specialized ADC known as a Delta-Sigma ADC for its measurements. Delta-Sigma ADCs allow for very precise measurements, and this precision is accomplished by oversampling (frequently 128x or 256x the sampling rate that is being used).
    The above is a very brief explanation of the DSA board's inner workings. It is discussed in more detail in the document linked below. If after reading that tutorial, you still have questions, please post back so that this forum can assist you.
    Synchronization with Dynamic Signal Acquistion (DSA) Products with DAQmx
    Best of luck with your application.
    Regards,
    Jed R.
    Applications Engineer
    National Instruments

Maybe you are looking for