FPGA and DAQ card synchroniz​ation

Hi, we are controlling and acquiring data from multiple hardware devices (including translational stages and photodetectors). Until last week, we used to peform all control and acquisition using a PCIe 7852R FPGA board. However, we decided to switch the acquisition part to a PCIe 6363 DAQ card to improve the voltage resolution. During testing, I found that the internal clocks in the FPGA and the DAQ cards are slightly mismatched (not just a phase delay, but a difference in time-period).
I know this because I generated a square wave (period = 20us) using the FPGA and acquired it using the DAQ card (at a rate of 200kHz, i.e., 1 sample every 5us). I observed that the acquired square shifts by 5us every 5 seconds or so. Such a shift does not occur if the generation and acquisition is done using the same board. Therefore, the only explanation is that the clock frequencies of FPGA and DAQ cards differ. According to my calculation, percentage difference between their clock times must be 5us/5s = 0.0001%. 
Therefore, I am wondering if there is anyway to synchronise the clocks between them. Or, is there a way I can drive the DAQ device based on the FPGA clock, or vice versa? Also, please let me know if there is something trivial that I have fix.
Thank you very much.
Regards,
Varun
Solved!
Go to Solution.

Hi GerdW,
Thank you for your reply. 
I understand both solutions you have suggested. I had conceptually thought about the first one (to control the sampling rate). However, I still haven't figured out how to accurately generate a 200kHz square wave - I think I can figure that one out this morning.
However, I am unsure how to implement the second option. I presume the default internal clock inside the DAQ is running at 100MHz or so. Therefore, inorder to obtain the same performance while using an external clock, I would have to generate at least a 80MHz TTL clock-out from the FPGA. Could you please tell me how I can do that? I couldn't find any clock-out capabilities on my FPGA. Or would I have to generate a clock of my own using Single-Cycle-Timed-Loops?
Not only did you provide two different solutions, your reply suggested that I wasn't wrong in interpreting that the clock periods of our FPGA and DAQ must be slightly off. 
Thank you very much.
Regards,
Varun

Similar Messages

  • Difference between simple DAQ card and FPGA based DAQ card(like PCI 7831R)

    Could any one tell me, where should i use simple DAQ card and where should i use FPGA based DAQ card ? if i can take data acquisition from simple DAQ card then why we go to the FPGA based DAQ cards(like PCI 7831R) ?

    Hello,
    The choice of card depends on the application that you develop. For example, you’d better use FPGA if you need a perfect synchronization of several acquisition chains as FPGA matrix will adapt in the way that your channels will be separated and will no use common resources. Another example of FPGA application can be acquisition of several chains of the data that demands very high sampling frequency (FPGA internal frequency can be up to 400MHz).
    When using FPGA you have to program signal acquisition “from the beginning”, I mean that there are no standard tasks as, for example, “counting edges”. But due to this you can modify standard tasks of DAQ acquisition if you need it.

  • How to synchronize the data acquisition from both GPIB and DAQ card

    I want to begin/stop acquiring the data from GPIB and PCI6024E card into Labview at the same time. Since the acquisition from GPIB is quite slow comparing to the one from DAQ card, I can not put both of them in the same loop structure. Is it possible to synchronize them?
    Thank you!

    Hi,
    I wanted to save data acquired from NI-DAQ (for example, NI 9234) in a file using the DAQ-mx ANSI C Code. The response I got was as follows:-
    One way to do it is with TDMS logging. DAQmx comes with functions designed to log to a TDMS file. This is a special file type that is used for collecting data in a logical format. It can be displayed in a TDMS viewer where data is separated into groups and channels. NI-DAQmx provides examples for how to log to TDMS. Look at the TDMS examples in the C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Analog In\Measure Voltage directory.
    However, now I want to know is there a way that using that same C code, can we save the data in a .txt file format (Text File) instead of a TDMS file? We actually want to access that file through MATLAB (that's why we want to save it in text format).
    Also on an other note, is there a way we can access & open TDMS files by MATLAB?
    Thanks,
    Sauvik Das Gupta

  • Broblem with property node and DAQ-card

    Hi!
    I am using NI DAQ-card to control mini relays and I have a following broblem. I use a "binary" button to control the DAQ-assistant and so on the relays. I have made property node of the "binary" button and set it to value mode(write). When I change the value of property node, the "binary" button in user interface works properly, but the the relay doesn't change the state.

    The boolean array constant that you are writing to the property node is empty. That is it has been defined as a boolean array, but it has no elements.
    The array constant on the left is an empty boolean array. Notice that all teh boolean constants are grayed out. This indicates that none of the constants are 'active'. The array on the right contains 8 active elements. Note that the 8 elemants are more solid in color adn the the 9th element is grayed out.
    What you need to do is define your boolean array with the proper constants to turn on or off the proper digital lines.
    EdMessage Edited by Ed Dickens on 05-25-2005 09:15 AM
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
    Attachments:
    emptyarrays.png ‏2 KB

  • Delphi and DAQ Card

    Hi,
    for a particular project I'm working on, I'm using a National
    Instruments LAB-PC-1200AI card. The thing is, I have to be using Delphi as a
    programing language rather than LabView which makes things rather tricky.
    Does anyone know how I can access the card (in particular use the digital
    I/O lines) with this language? Are there any libraries/function libraries
    that can be accessed through Delphi or even C++ ? What about the Nidaq
    drivers, are they DLL files that contain functions that I can access through
    Delphi?
    Thankful of any feedback,
    Duncan Rumbold

    You could also use National Instruments ComponentWorks. They are a suite of
    32 bit ActiveX controls complete with controls for UI, Acqusition and
    Analysis. They also come with examples for VB, VC and Delphi. Download an
    evaluation version at http://www.natinst.com/cworks/cw_eval.htm
    Greg McKaskle wrote in message
    news:[email protected]..
    > ...
    > What about the Nidaq
    > > drivers, are they DLL files that contain functions that I can access
    through
    > > Delphi?
    > >
    >
    > You should have the CD that came with the DAQ board. If not, you can
    > download the driver from the NI ftp site. I believe that it comes
    > with Delphi examples, and yes, the NIDAQ drivers are a DLL and a DLL
    > interface.
    >
    > Greg McKaskle

  • GPIB and DAQ card access from JSDK 1.4.2

    Dear Friends,
    I have done many projects (by jsdk-1.4.2) of data acquisition and control with serial ports (COM-1 and COM-2) by RS-232C method.
    But is it possible to access the GPIB card or Data Acquisition card of National Instruments (USA) for control and exchange data with some external instrument?
    Can any body suggest anything ?
    With best regards,
    Avijit Das

    You could use JVM 1.3.X because it uses SSL from the Internet Explorer, not the JSSE SSL.
    Apart of this, you could see if the implementation of PKCS#11 for the forthcoming J2SDK 1.5 works with your card AND if JSSE can use the PKCS#11 Sun Provider. Download the beta and try it.

  • How to monitor DAQ card outputs during TestStand operation?

    I am trying to debug a rare failure mode on a test station that runs on TestStand. TestStand controls measurement equipment through a PCI-GPIB controller and a DUT and DUT switch box through two NI-DAQmx devices; PCI-6509, and PCI-6534. I believe that root cause of the failure is due to the software not putting the DUT into the correct state for the test. In order to check this I need to monitor the changes on the GPIB and DAQ cards. I was able to use NI Spy to monitor the commands on the GPIB bus but I have not been able to monitor the state of DAQ cards. Is there a tool that will allow me to pause TestStand during its operation and look at what logic states the PCI-6509 and PCI-6534 outputs are in? Or at least monitor the I/O of the PCI-6509 and PCI-6534 cards similar to what NI SPY offers for the GPIB cards?
    Regards,
    David

    I am not aware of a tool similar to NI SPY for I/O cards.
    However you can introduce a break point at the point of interest in a test sequence(step).TestStand will stop execution at that point.
    You can then manually verify the I/O status using a DMM .
    Hope this helps.

  • Synchronize problem for DAQ cards

    I am trying to synchronize 4 PCI-6071 DAQ cards through cables using SCNCLK pin. I know the DAQ will send a pulse through that pin. but what is the frequency of the pulse?
    Also, I would like to know how to avoid the phase delay generated by the cable. Can I synchronize the DAQs through internet, how to do that?
    Thank you very much!
    Sincerely
    Joe yang

    The frequency of the pulse will be whatever you program it to be. For instance, one of the PCI-6071E's will use its own internal timebase and the other three (slave devices) will synchronize off of that device's (master device) clock. So you will programmatically control the master clock and then send that clock to the other three devices.
    An easy way to do this is by using the RTSI (Real-Time System Integration) bus on the PCI-6071E's. You'll notice that on the side of the PCI-6071E's there is an additional pin connector. This is for the RTSI bus. You can purchase a RTSI cable and connect the RTSI bus for each device and route the master clock to all other devices through the RTSI bus. I've included a couple of links below to documents that explain synchro
    nization and the RTSI bus. I hope this helps.
    How Do I Synchronize Two E-Series Data Acquisition (DAQ) Devices (For AT or PCI or DAQCards)?
    http://digital.ni.com/public.nsf/websearch/6EC96C76111D2E6A86256628008071A0?OpenDocument
    RTSI Bus Cables
    http://sine.ni.com/apps/we/nioc.vp?cid=3544〈=US
    Regards,
    Todd D.
    NI Applications Engineer

  • I use labview 8.0 and i can not run daqmx driver for pcmcia 6062e daq card

    i use labview 8.0 on window xp .when i installed a PCMCIA daq card 6062E, i could not run daqmx driver.It is fine to see that the traditional version is working well.When i install daq card sometimes it is working well with traditional driver  but mostly i see error on reading an analog input from PCMCIA daq device.An error called 'base adress' occures .I use last version of driver that is daqmx 8.0.1. and i have installed this correctly but again i could not  see any signal on the test panel for daq-mx driver.I don't know what is the problem.Also when i install PCMCIA daq card Please reply this message.I need your helps.
    Thanks

    Hello,
    Thanks for your reply.I will try to answer your questions.
    I have checked the Device Mananger and I have seen that the device is detected by Windows  XP.  For another question the card shows up under both NI-DAQmx Devices and Traditional NI-DAQ (Legacy) Devices consistently in the Measurement & Automation Explorer.I use a way that I reset the driver for traditional NI-DAQ in MAX,and then i reset the device for NI-DAQmx driver in MAX and again i tried to run the test panel of DAQmx driver but again i saw a wrong signal or noise signal on the test panel i could not see the sinusoidal signal that i connected. i do get the test panels to run with the card using the DAQmx driver,  But could not run the DAQ diagnostic utility.The error was as i specified below.
    03.05.2006 09:49:35
    Results saved to:  C:\Documents and Settings\serkan\Desktop\Diagnostic Results.txt
    Selected Device: Dev1
    Device Type: DAQCard-6062E
    Serial Number: 107509E
    Device Support: (PASS)
    NI-DAQmx Version: 8.0 (PASS)
    Device Reset: (FAIL)
    Error -50002 occurred at an unidentified location
    Possible reason(s):
    The specified device is not a valid device. The operation could not be completed as specified.
     ------ DIAGNOSTIC UTILITY ABORTED -----
    And for your last question i can say that i have used the DAQ card on other laptops.But the results were the same.İ hope to see your reply
    Thanks,
    Serkan Buhan
    Electrical-Elecronics Engineer
    Researcher
    TUBITAK-BILTEN

  • How can I create software start and stop trigger in LabView using 6023E series DAQ card? I don't want to use the external trigger.

    I am using 6023E DAQ card to collect the signals, such as AE, Force, Torque from the machine. I want to collect only some part of signal for example between start triger and stop trigger. I'd like to know how I can creat those triggers in LabView from one of the channels that I am acquiring at the same time. I found one or two library file that is only for start trigger. I know that this is availabe in some of DIAdem functions. Please let me know if you have done some example for this requirement.

    If you are wanting to create a software trigger based on an analog input voltage in LabVIEW, there are several options. One suggestion would be to compare the voltage values from one input channel to a number within a loop. If the input voltage crosses that threshold (is greater than the number), have a case statement that will acquire data from the other channels. This would simulate a software start trigger in LabVIEW.

  • I am looking to control a 4-way hydraulic solenoid valve. Do I need a PID control toolset, or can i control the system through my 16E4 daq card and scxi chasis

    I am looking to control a 4-way hydraulic solenoid valve. Do I need a PID control toolset, or can i control the system through my 16E4 daq card and scxi chasis

    I think you're asking 2 different questions.
    The PID control toolset is for using PID loops for control; it's just software.
    The DAQ card and scxi chassis are hardware. If you have the appropriate signal conditioning cards in your chassis to control/monitor your solenoid valve, then you can run a PID loop.
    I believe the simple answer is: the PID control toolset is the best way to do control, but there are simple PID VI's (even on this website) that you can download and use for simple control.
    Mark

  • Generating a tri state waveform pattern and writing into DAQ card

    Hi,
    I am using LV8.0 and NI-6259 DAQ card.
    I want to generate a waveform pattern which initially goes to +5v and goes to 0v and then again goes to -5v
    and finally goes to 0v. 
    I have used the waveform pattern generator and have generated 4 kinds of waveform with some particular samples
    and I will be appending all the 4 waveform patterns(+5, 0, -5, 0) and the appended waveform will be written into DAQ card.
    The problem is:
        When I probe CRO at the Analog output pin of the DAQ card, the pin level will be always at +5v and sometimes
        it goes to 0 and back to +5v. But I am expecting a waveform with 3 voltage levels i.e.., +5( some 100 samples), 0v(for some 1000 samples.
        -5v(same as +5v) and 0v( 2000 samples). 
    How to get this kind of waveforms in NI-6259 DAQ(M Series) card.
    Please find the attached VI which I have created.
    Letme know the loophole in the VI and correct way of generating a tristate waveform.
    Thanx in advance, 
     Yogesh
    Attachments:
    PWM_sample.vi ‏43 KB

    Hello YogeshaYS,
    Thanks for your post!
    I see that you are wanting to output a waveform that goes from 5 to 0 to -5 and then back to 0. It looks like from your code that you want to do this in a continuous fashion? If this is so you will need a while loop to output the waveform. Take a look at one of our shipping examples that shows how to do analog output waveform. Go to Help >> Find Examples. When here go to Hardware Input and Output >>  DAQmx >> Voltage >> Cont Gen Voltage Wfm-Int Clk.vi. Your VI works great but it only does the output once so that may be why you see some interesting results on your output. Let me know if any of this information helps you with your program. I was able to run it in a continuous mode and see the voltage levels go from 5 to 0 to -5 just like you were wanting. Have a great day YogeshaYS and please reply if you have any other questions on this. 
    Cheers!
    Corby_B
    http://www.ni.com/support 

  • Im using a pci-6221 daq-card.I want to know the difference(use)of a line output and a port output.

    Im using a pci-6221 daq-card.I want to know the difference(use)of a line output and a port output.

    Hello Hellraiser24,
    This question has actually been discussed in another thread here:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=95895&requireLogin=False
    I hope this helps,
    E.Lee
    Eric
    DE For Life!

  • Which type of ADC is used in M Series, S Series and C Series DAQ Cards?

    Hi
    I want to know which type of Analog to digital converters(ADC) are used in M Series and S Series DAQ Cards. I know that DSA Cards and some C series are using Delta Sigma ADC. What about the ADC used in non delta sigma C Series modules. Why Delta sigma ADC is not used in M series and S series DAQ cards.
    Regards
    Samuel J

    Hi Samuel.
    The ADC type used is Succesive Approximation ADC. You can refer to the following links for your reference.
    http://digital.ni.com/public.nsf/websearch/32FD9AA817D0EBE68625708C005E1B26?OpenDocument
    Hope this helps.
    Thank You.

  • I need to interface SCC-TC02 with help of SC 2345 and PCI-6024E DAQ Card.please tell me the procedure and if possible send me the program

    Dear Friends,
               I need to interface SCC-TC02 with help of SC 2345 and PCI-6024E DAQ Card.But i can not understand example program.please send me the procedure to interface these three componnets and if possible send me the program.
    With Regards,
    Eswaramoorthy K V

    nce of nth triggering pulse. i need to know when the when the ist trigger occurs and when the nth trigger occurs . please tell me how to to . what i know is that event triggering has to be done with start and stop trigger. please tell me how it has to doneSuresh;
    What you will need to do is to set up a digital start and stop triggered Analog Input acquisition. Then you will need to have a counter set as event counter, having the specific number of pulses you need configured as the preset value, configured to count down, and generating a pulse after the terminal count has been reached. That counter output will be the stop trigger of the Analog Input operation. In summary, you will have the external pulse being both the digital trigger of the Analog Input operation and the source pin of the counter, and the counter output being the digital stop signal for the analog input.
    I'm attaching a Labview VI that does the start and stop analog input acquisition. You will need to include the counter part and set the stop s
    ignal to be the counter output.
    Hope this helps.
    Filipe
    Attachments:
    AI_Start-Stop_D-Trig.zip ‏25 KB

Maybe you are looking for

  • Time Machine and File Vault - How does it REALLY work?

    Good afternoon, I ran some tests and I can't figure out exactly how Time Machine behaves with Filevault.. here's what I did: I ran a backup manually. It backed up about 265megabytes. This was right after iTunes downloaded an update for my iPhone. Thi

  • Down payment message.

    hi, I have created one purhcase order and against this purchase order i have created down pyament request in f-47 and paid the same by f-48. I could see the enteries with special gl indicator. After we booked inovice and latter cleared the down payme

  • Problems putting music to slideshow

    I looked up how to add music to a slide show here and thought I did everything correctly but it's not playing. I added music from iTunes to the iWeb page, marked it for autoplay in the inspector and hid the movie controller and put a square of black

  • Size of Push Button

    Hi, does anybody knows how to set the size of the push button in the selection screen... Thank you... regards, mae

  • Why does Mail seize when I try to open a link in a message?

    New iPhone 5.  Mail receives and sends messages without problem.  BUT when I click on a link in a message, the app seizes.  No problem closing down and restarting the app, but no progress with opening links.