An external sample clock between sharing arrangements

I need to acquire samples of 2 separated Renault M series (PCI-6254).  My master device receives a sample of 8 on PFI0 KHz clock.  Is it possible at the root of this clock of the master to the slave via a RTSI cable device?

I looked through the forum and the sample programs, but have only seen examples in which the master clock on board the aircraft happened to the slave.

It is possibe to synchornize device slave the master clock to external sampling of the device?

Thank you

ANT1

ANT1,

Fortunately, most of the time something that can be done in DAQmx in LabVIEW can be done in ANSI C using the appropriate function calls.  I have listed the following steps of the program example LabVIEW and retouched to remove anything that it is not suitable for the DAQmx configuration.  I'm sure it should work for you.

Steps to follow:
1 create a channel of analog input voltage for the master and the slave.
2 set the synchronization parameters.  For the master, select the source of the external sample clock.  Set the source AI/SampleClock of the master for the slave device.   (Note: sample of the master clock is automatically routed through the cable RTSI.)
3. for the slave, set the Source of the trigger to the AI/StartTrigger of the master device.  This will ensure that both devices start sampling at the same time.  (Note: the trigger is automatically redirected via the RTSI cable.)
4. call the start task to start the acquisition.  (Note: start slave task before the master task.)
6. read all waveform data.
7. call the clear task to stop the acquisition and clear the task.

So, essentially, the value of the task of the slave to the top in the same way as you would for the synchronization of clocks on board, but configure the task to master as you would for an external clock.  This will automatically share the external clock and trigger on the line of the RTSI.

Tags: NI Hardware

Similar Questions

  • Measurement error of the County of edge by using the external sample clock

    Hello

    I'm trying to measure the number of edges (rising) on a square wave at 5 kHz with a generator function on a device of the NI PCIe-6363. I configured a channel of County of front edge of counter at the entrance of the PFI8 device. I use an external sample clock that is provided by the output of the meter of a NI USB-6211 housing channel. If I acquire for 10secs then ideally I would expect to see a total of 50000 edges measured on the meter inlet channel. However, my reading is anywhere between 49900 and 50000.

    When I use the internal clock of time base to measure the edges, the measure is accurate and almost always exactly 50000. I understand that when you use the external sample clock, the precision of the measurements is subject to noise level of the clock signal. However, I checked the clock signal is stable and not very noisy. Any reason why there is an error of measurement and how tolerance should I expect when using an external sample clock compared to when you use the internal time base clock?

    Also, what is best clock Frequency (with respect to the frequency of the input signal) when using an external clock?

    Thank you

    Noblet

    Hi all

    Thanks for all your sugggestions. I was using an input signal with a function generator which had a range of 8V. It turns out that the reduction of the amplitude to 5V solves the problem. I was able to get accurate numbers with the 6211 external clock.

    Thank you

    Noblet

  • External sample clock change takes a lot of time on the SMU-5186

    Hello

    I use the external Lv - niScope EX Clocking.vi example to define SMU-5186 using an external sample clock.  However, it takes a long time, 5-6 minutes, before I can get the first block of data acquisition.

    Then I run the example 'niScope EX Acquisition.vi Configured' to switch to dashboard clock. There are also 5 to 6 minutes on the first acquisition.

    I think maybe the SMU-5186 made some calibration when I change the source of the clock.

    Anyway is to ignore the calibration? Or make it faster?

    Thank you very much

    Yiming

    Yiming,

    Delays in acquisition are caused by calibration routines that must be performed on the engine to sample (ADC) every time that changes sampling rate.  This ensures our justified precision specifications.

    I don't know if you've noticed also calibration of Power-Up, which will take 5-10 minutes to complete when the unit is turned on.  This is mentioned in our specifications at page 18:

    http://www.NI.com/PDF/manuals/373257b.PDF#page=18

    I hope this helps.

    Nathan

  • NI6602 pulse width measurement: do I have to use an external sample clock?

    Hello

    In the example .NET 4 "MeasPulseWidthBuf_SmplClk_Cont", it is said in the comments that:

    An external sample clock should be used.

    Hi mola.

    This specific example measures of sample-clocked pulse width.  This type of measure is supported only on new hardware such as the X series cards and will not run on the 6602.

    Your application that you have linked uses Implicit timing, which means that the signal is using the sample clock.  In other words, at the end of each pulse duration which can be measured, the sample is deterministic locked in.  So you end up with a table in the buffer of each pulse width which is seen by the meter.

    Best regards

  • Synchronization of analog and digital output with the external sample clock

    Hello

    First of all sorry for my English, I will try to explain what I want to do.

    I want my PCIe-6321 to send two custom signals (modification sawtooths) on a mirror controller. I would also like to generate output with my card at the beginning of each tooth of saw. Everything must be synchronized with an external k-clock signal of 100 kHz. The idea is that whenever the PCI receives a trigger to external clock, it sends two analog output voltages and when he received 1024 clock ticks it will also send a pic of triggering TTL. What I do is first prepare the map and after that in a loop sending and modifing the output values of the two signals and at the same time send a digital signal Boolean in each arch, so when's done it 1024 iterations of the loop I send an event to the digital port. Attached you can see.

    The problem is that I don't know how to synchronize both. Can I use the sample clock just to the analog output? I can use sample for the two outputs clock, or do I need to use the output of the meter? If don't know how to use it here.

    If I do nothing else bad/wrong, I would be grateful for feedback.

    Thanks in advance,
    Pablo

    I don't know how but I find the solution. I'm generating more than a positive value (as I was triggered maybe very fast the oscilloscope has been absent there). If I put the sample clock of digital output to use the sampling/ao/Dev1 clock that it doesn't, but if I put to use the same source as the OD (terminal where my external clock is connected), but the trigger to start the DO to be Dev1/ao/StartTrigger this works. I don't really know why, but it does.

    Thank you for your patience and your help. I put here the final code.

  • Looking for USB DAQ for AO using the external sample clock

    Hi all

    I'm looking for a cheap solution for the acquisition of data to select the AO using an external digital signal as sample clock, and I just realized that the USB-6001 is not a good candidate. Please someone remind the cheapest USB version for this task? There no need for high sampling rate. Thank you.

    Define cheap and low sampling rate. You've already been told on the 6211.

  • PXI-5122 external sample clock


    Hi csk,.

    I was wondering if you could clarify how
    you want to take samples. Am I right in taking 30 000
    sets of 150 samples each, or do you mean that you take 150 sets of
    30 000 samples each (since 30 000 periods of 60 MHz clock corresponds to)
    less than 90% of a 1.8 kHz signal)? In both cases, the current method you
    are using only will acquire a single record each time by
    the loop, and so you will be limited by how fast you can retrigger in
    software.

    For your application, it looks like you want
    need to perform a multi-record acquisition, which will allow you
    specify what condition to trigger off of and how many samples of
    acquire whenever the trigger occurs. In this way, each 'transition' of the sawtooth wave is considered to be a single record, and you buy several different corresponding records whenever a rising edge trigger occurs. I think you can accomplish
    exactly what you need with only a slight modification to the niScope
    example of expedition "niScope EX Multi Record go get more available»
    Memory.VI
    "(se trouvant àles Start» Programmes» National Instruments» NI-SCOPE)"
    ("Examples
    ). With this VI, you can specify that each record you want to
    have a record length min to 30 000 samples (or 150 samples, if it
    the case) and you want to acquire 150 records (or 30 000 if this)
    that is the case). The only big change that you need to do is to
    change the trigger VI set up to be a digital dashboard rather trigger
    only an analog trigger. With that and a few other changes (i.e.:-)
    setting the external clock), you should be able to accomplish what
    You need. Please let me know if I have explained well and if my
    assumptions are correct. Thanks and good luck!

  • with pulse width measurement external sample clock

    Hi all

    I use a NI 6220 (programming with ANSI C) Board and I would like to make a "unique pulse width measurement' by using a signal from the outer door and an external signal source.

    The program and the card with the help of the "DAQmxCreateCIPulseWidthChan" command works only partially as expected. Namely, the outer door has worked, but the map uses the internal time of 80 MHz base signal instead of the external source connected to the source by default PIN (PFI, 8).

    I tried send an another PIN PFI on the default source pin using the command 'DAQmxConnectTerms', but this did not help either.

    Obviously, I'm missing something...

    Best, Uli

    Hi Uli,

    I posted in your thread here.

    Best regards

  • Acceptable external sample of NI 5772 clock

    Hello support forum,

    Is it possible to use the module to adapt OR 5772 with an external sample clock that does not have a constant frequency (it is always in the range of 400 to 800 MHz, well), and is always turned on?

    An illustration of the clock signal may be more useful. Here is a link to a PDF file containing a description of the instrument that generates the clock signal. The plot of the clock signal is shown on page 7, it's the purple wave form (referred to as "(3) DAQ k-clock signals" in the text below the numbers).

    http://www.Thorlabs.com/thorcat/22700/SL1310V1-10048-manual.PDF

    I have attached a screenshot on page 7 in this post where the PDF is inconvienent.

    Page 7 contains two numbers. The top figure illustrates what I mean when I say that the clock is not always 'on '.

    The clock signal is supposed to be close to 500 MHz, but it is not necessarily always this frequency. The frequency depends on the device. The device is a source laser scanned. Each "sweep" may cause a slightly different frequency, even within a single shot.

    I can provide many more details on my application if necessary.

    Thank you for your help.

    The CLIP that we ship with the 5772 requires a persistent clock that maintains a relatively stable frequency. If you need to use a 5772 with a variable frequency clock that is not persistent, then you need a CLIP custom. According to the specifications of your application, this may or may not be possible. You will need open a service request for more information.

  • Problem with DAQmx Schedule VI (sample clock)

    Hello to you all,.

    I'm new to this forum, please bare with me. I have some experience with LV, but I am relatively new to data acquisition projects. I use LV2009.

    I want to make sure that I use the hardware timing (instead of software distribution) in my project so I followed some of the threads here as sugested to use DAQmx Schedule VI. The problem is that no matter how I set the system I get the same error-200300 invalid calendar
    type.

    The project is simple. I encode with 1000 pulses per
    Rev and it is mounted on a shaft of a turbine water goes thru. I'm watching the frequency
    and so the rotation of the shaft which tells me that the amount of water flows through the turbine. In the end, there will be 2 channels
    by every encoder and ~ 3 encoders (turbines) total and calibrated the main meter that will give me constant impulses and all encoders will be compared to this master frequency.

    I'll use PCI6602 DAQ, but
    now, for the development, I use USB6221. Let's say that the
    frequency is between 500 Hz and 10 kHz. What I am doing wrong? Or maybe better to ask - what would be the right approach for this project?

    Thank you

    Marty

    Hi Marty,

    It seems that your question is already answered here, but Jason is correct that the 6221 neither the 6602 support a clock sampling for frequency measurements.

    As Jason mentioned, your best bet is also likely set the mode of synchronization for "implied". This means that the frequency value is sampled at the end of each period of your input signal. In addition, a solution that is clocked by the software (On-Demand) might be acceptable.

    X Series DAQ devices allow an external sample clock to use for frequency measures (described in the Manual of X series). Frequency of sample-clocked measures are useful in very specific
    circumstances, but it does not seem that you need this feature based on what you've described so far.

    (621 x) bus-powered M series can also be configured to use an external sample as the X series clock but do you not have the same features described in the manual of the X series.

    I hope this helps!

    -John

  • RTSI sample clock source

    Hello

    I have a small question on an example of clock by RTSI source.

    In my configuration, two PCI cards (PCI-6602 (dev2) and PCI-6110 (dev1)) are connected by a RTSI cable.

    I would like to build a clock on 6110 source sample and use it on 6602 counting external impulses of entry.

    In the MAX test Panel, I checked that a meter was reading of external signals.

    However, the vi attached do not work, and the whole County, and then give an error of 200284.

    Could you tell me what is the problem?

    I guess that something is not right on the clock signal routing. I have to use DAXmx connect terminals vi instead of external signal?

    How can I check that both devices are connected through a RTSI cable?

    I recorded the cable and connected devices on MAX with no problems. Is this enough?

    Thank you for your comments and kind suggesion.

    Several things briefly:

    • Must match the orientation of the RTSI cable.  Connectors are generally indexed to ensure this, but if you use a cable in water House, just keep it flat between the boards.

    • The code you posted attempts to use the time base internal 20 MHz as a sample clock.  That will not work for several reasons, and the fact that you try suggests you may have a poor understanding of the functioning of the meter.  You do * not * need to "sample" at a pace high in order to catch the digital transitions.  The meter circuit manages everything in the material.  What you "sample" in a task of counter is a County registry value.  Digital TTL edges which are worth little matter how many times you "sample" it increases.

    • I suspect you want to * account * cycles of the clock of the signal of your 6110, be it a train of pulses counter or a sample clock based on the tasks.

    • I am writing an example that does without buffer sampling clocked by the software, to approximately 10 Hz.  Dev2 uses to generate a pulse of 1000 Hz and uses Dev1 train to interrogate the County registry value in a loop.  It is simple from the code you posted to help unravel the special problems of routing RTSI config problems.  Start using something simple like this to see if DAQmx succeeds routing signals through RTSI.

    -Kevin P

  • AI sample clock using to Trigger counter samples

    My basic question is: the ai\SampleClock signal is active only during the execution of a task of analog input?

    The details are:

    I have a multifunction data acquisition card series X PCIe-6321.  It is controlling an SCXI chassis and has a module SCXI-1180 and SCXI-1302, so I can control the analog inputs of the chassis but also access to the meter 4 on the map.  My application requires that I use all 4 meters to measure a frequency input signal and synchronize the samples for the analog input signals.  I created 5 tasks, 1 for AI and 1 for each counter.

    I'm using LabVIEW 8.6.1 with the latest NOR-DAQ drivers on and the operating system 64-bit Vista

    1 are there drivers or hardware restrictions that cause this solution does not work?

    2. can I use the ai\SampleClock as sample clock of entry for each task frequency?  If I do this the beginning of sampling will be synchronized?  I.e. If I each task frequency first starts, they will wait until that task to HAVE it is started before you start sampling?

    3. If this does not work, do I need to send the sample clock of the task of the AI to a line PFI (PFI1) and then use it as the special frequency sample clock input?

    I used to do option 3 when the synchronization of two cards in PXI chassis and use only the beginning of the task of the software instead of synchronization on a digital departure, given that the sample clock will control samples anyway.  I need to know if the same behavior works with the above scenario.

    Thank you

    Bob

    Prolucid Technolgies Inc.

    Hi Bob,

    I can confirm that the AI/SampleClock is available only during the execution of the task to HAVE it.  As far as other issues go:

    1. you must provide more information on what you seek to do exactly, but there is no problem with the clock of the task of analog input sampling to be used with routing counters.  I had read through the section of the X series operating manual which deals with the measures of frequency clocked at sample (see page 7-16) for more information about what really happens during this configuration to make sure that it suits your needs.

    The frequency of the signal to be measured must be at least two times faster than the sample of your task clock to HAVE.

    2. you can indeed pass the signal on all four tasks at the same time (you can check the page peripheral routes in MAX to ensure the routing restrictions).  Sampling will be synchronized four counters are started before the task to HAVE it, but counters will be armed at different times unless you configure a trigger to begin arms (see page 7-45 series X operating instructions).  I would consider using the AI/StartTrigger if you want to do.

    The effect of not to arm the counters at the same time would be a different number of periods on average on each counter for the first sample (assuming an average is enabled).  Maybe it's not a major concern, but I just wanted to point out.

    3. the itineraries are available inside the Board of directors so external routing is not necessary, you can simply specify to use the sample clock of the AI for each meter clock and roads will be done for you.  If you want to export the signal on a PFI line and new route on another line PFI, this option is also available for you, but shouldn't be necessary.

    I hope this helps you get started.  I'll make sure to take a look at Chapter 7 of the X series user manual, if you have a chance as he described how all configurations of meter of working more in detail.  If you have related questions do not hesitate to post in return.

    Best regards

    John

  • Error on wait the next sample clock

    Hello

    I need measure the speed using an encoder for a control application. I installed a sample external clock on CNTR0 (in another vi) and I wired CTR0_OUT to CTR1_GATE. I start the vi, then the measure of the clock vi speed sample and Labview displays the following error. I don't know what is happening, my measure is established for the sample clock and timing type single-point sample clocked by material and the error says that I do not have this? What's funny, is that the same app works if I am using the DAQ Assistant.

    Thank you

    David

    Hey David,

    I believe that the document I linked can be a problem, and I'll go ahead and make the necessary changes to be made to this document on my side.

    The next issue I can see uses HWTSP on a windows machine. HWTSP is usually reserved for computers running real-time operating systems. These operating systems can ensure deterministic operations. On windows XP, windows may decide to treat another thread / process that can cause you to miss a sample (if you miss a sample that the default behavior is to throw an error).

    With HWTSP, you will be difficult to get one without a real-time system faster sampling rate.  Stamped acquisition will also have a large amount of latency for a control application.

    Looking at your code, I recommend trying a task of sampling frequency CI On Demand.  Currently, your code is the edges and conversion of frequency/RPM.  In addition, because of the lag phase with your sample clock, your current configuration has an error of ±1 count.  This translates to error ±1KHz (on behalf of 9 to 1 ms it would be 9 kHz, 10 would be 10 kHz, etc.).  Based on mathematics in your example, you introduce ±120 rpm of error.  By a frequency on the task on demand, you can ensure that whenever you call the DAQmx Read, you get the last frequency within a tick of time base error ±1.  Not only it gives a better accuracy, but as long as you keep the rate of fast loop, you will ensure you get the last frequency to the fastest rate possible.

    Ensure that your loop rate remains fast is to remove the loop of your acquisition processing and placing him in a parallel while loop.  This is possible through the use of reporters.  Local loop in Windows rates are usually in milliseconds.  To get faster line rates, you might want to consider a real time operating system.

    Please let me know what you think of this, and if you have any other questions, I can go into this more in detail.

  • How the PFI to go top-to-bottom with sample clock?

    Hello world!

    I am very new to LabView and I try to do something very simple in the NI PCI-6534 and still not get anywhere (or do not know if it is the limitation of the hardware)

    My request is to acquire digital data of 2 channels (16-bit each) of our Board custom designed analog-to-digital.

    So far, I am in a position to acquire a finite amount of sampling digital (say 100000) and using a trigger to start (PFI6) to start the acquisition of our custom card board. Just to let you know that I'm feeding the PCI-6534 an external clock of 20 MHz by PFI2.

    However, I want to send a signal to trigger recognition (high/low-rising edge) to our personal advice, saying: he did the acquisition of 100000-sample.

    My problem is that whenever I try to use the lines of PFI signal with an internal sample clock, I get an error saying that I can't use the PFI lines with any sample clock. But my goal is to use a rising edge (low-high) to trigger back.

    So far, I can pull the PFI4 high and used a timer to make it low. But the resolution of the timer is milliseconds (software) range. I would like to have at least a few microseconds.

    I also tried using implicit since manual said that it does not require any clock but still get no result. Also, I couldn't find an example of implied clock and don't know if PCI-6534 supports.

    Note that I'm able to use the clock synchronization of sampling with other DIO (Port 0 to Port 3) lines and get the result I want. However, I would need to use all our custom Board 32 - DIO for analog-to-digital data lines. So, using the line of PFI laccuse is the only choice.

    If you have ideas/pointers, please throw it at me, I'll try them. Thanks a lot for your help!

    See you soon,.
    Yaseen Khan

    Hi ykhan,

    After validation, I noticed that it will not really work for what you are trying to do.  The PFI lines on your 6534 are I/O static only as shown in the DAQmx help.

    You will be able to control these lines, but only with software timing.  You should be able to call and argue by their physical channel name.  I hope this helps!

    Kind regards

  • PCIe-6537 County in ANSI C sample clock

    I want to get the precise times of the edges on 32 digital lines using a card PCIe-6537. The card should have a sample of 50 MHz clock (minimum and 200 MHz/N N is 4). So if I can get a count of the sample clock when the any lines going from low to high, I know the time at a resolution of 20ns. Each line should have a transition from bass up per second. They should all be synchronized, it is possible that more than one line will have an advantage in the same sample clock signal.

    I'm programming in Visual C++ with the DAQmx ANSI C API.

    What I've tried so far, I think I need to put in place two DAQmx tasks: one to count the sample clock and one to detect transitions on the i/o 32 lines. The next problem after that is the task of transition to trigger a capture of a county on the first task.

    But I can't even set up a counter stain. I think I need to call DAQmxCreateCICountEdgesChan() to create a channel for the sample clock. The example code I found (Mult_Counters_Count_Dig_Start_Trig_TIO.c) sets the name of the channel to counter with a constant:

    #define COUNTER_SOURCE1 "Dev2/ctr0.

    My camera is 'Dev1 '. If I try to use ' Dev1/ctr0', I get:

    Measurements: Physical channel specified does not exist on this machine.

    Refer to the documentation for the channels available on this device.
    Device: Dev1
    Name of the physical channel: ctr0

    Task name: Dev1CtrTask

    Status code :-200170

    I tried to call DAQmxGetDevCIPhysicalChans() to get the name of the channel, and I return an empty string. So I tried ' Dev1 / ' and got a similar error, unless of course

    The physical channel name: empty string

    Is it possible to count the sample with the 6537 clock? Or is there a better way to get the values of accurate time for transitions on the i/o lines?

    Frank

    As for performance, I can personally attest that I have listened 12 SMU-6537 at the maximum rate (50 MHz) with 32 lines on the disc.  It seems there a configuration delivers in this case

    OK, well, I don't have not sorted. She is still ongoing at only 40 MHz. But we decided to resolution 25ns is close enough for now (ran out of time for development ). It's another problem of implementation of the task, so I asked a question separate from the maximum of PCIe 6537 ANSI C sample clock

    Since then, with the help of the forum I got my running program, I would like to summarize the thread and the solution to my problem, in case anyone else is the rising later.

    • The problem is exactly the timestamp rising edges on a set of 32 digital inputs. I expect only a couple of edges per second per channel, but I need to know when they occur (in fact the interval between the edges on different lines) as accurately as possible.
    • I thought that the card could detect changes on inputs and pass a count of the sample clock pulses during an edge has occurred.
    • The 6537 has no channel counter, so it will not be a feasible way
    • Definition of the card to read all 32 lines on the forehead amount of sample clock allows me to write a reminder that allows you to see the status of each line on each sample clock. Because I know that the period of the sample clock, I know that the time of each sample. The reminder I have used a few loops on the pad looking for changes.
    • Surprisingly, this set only 30% a single processor and 40% on the other CPU on a 2-core 2.2 GHz PC. Well, that surprised me. I don't think that the PC could handle shoveling bits that fast autour. SCP got fast enough since the last time I built a. Sample clock was 40 MHz.
    • The callback uses DAQmxReadRaw (taskHandle, DAQmx_Val_Auto, 0, SampleArray, SampleArraySize, unread, & numBytesPerSamp, NULL). The documentation for it says unread will be set to the number of bytes read; It should indicate the number of samples. And I should have used DAQmxReadDigitalU32() instead in any case.

    Thanks to all those who helped with my lights

    Frank

Maybe you are looking for