Synchronize a counter and Analog Output

Hello all,
I want my Analog Output generation and my Counter0 operations to start at the same time. Any ideas how to accomplish it.
I have tried to feed the output of another counter1 to the gate of counter0 as well as to the clock source of Analog Output (GPCTR1).
This however doesnt seem the solution.
Will appreciate any suggestions.
Thanks

Mili,
I think you'll have to experiment, but it might be possible to do both operations with the equipment you have. This would be relatively easy with an NI 660x counter/timer board.
You can use the Route Signal VI to send your counter output to a RTSI line and then select the RTSI line as your counter 1 gate. (this is the generic solution for any number of counters)
For getting an external update clock, check out the continuous external clock example programs that are included with LabVIEW or NI-DAQ.
You can easily start your output with a digital trigger, but the STC counters do not allow for digital triggering of counter operations. You may be able to come up with some programming scheme that gets counter 1 started, but gated low so t
hat it is not counting until the start trigger comes in for the acquisition (such as a start trigger that is forced low until the start trigger for the analog input comes in). This would be a design you would have to work out or see if anyone else has found a way to do it.
You can also search for many example programs/discussions at http://www.ni.com/support by searching in Option 3 for keywords like external, analog, output, and trigger.
Hope this helps.
Regards,
John Nieri
Applications Engineer
National Instruments

Similar Messages

  • Synchroniz​ing counter and analog tasks

    Hi,
    I would like to synchronize an analog task and a counter task. I want to share the AI sample clock for the analog task and the counter task. I found an example on NI website that seem be be suitable:
    http://digital.ni.com/public.nsf/allkb/BB7AE2D12BB​04CBE862574FA005D3826
    I'm trying to use the first example given in the KB: CounterSynch-Analogtask.vi. I'm using a PCI 6621 with LV 8.6 and DAQmx 8.7.2.
    I'm getting an error when running this example (see attachment).
    I also tried to insert a DAQmx read property node(available samples per channel) inside the while loop reading the data and connect to one of the counter task This one always displays a 0 value. If I simulate the 6621, the property node value is increasing at the beginning and then decreases to reach 0 and I finally get the same error that I got with the card.
    If you have an idea on what could be the root of problem.
    Thanks in advance.
    Best regards.
    Clément GIROD
    DAM
    Solved!
    Go to Solution.
    Attachments:
    DAQmx error.JPG ‏83 KB

    Hi Clemente,
    The reason you were getting this error is because the counter task was set to finite while it is continuously reading in the while loop.
    The VIs on the same link have been editted so that they will work. Please chech them out and see if they work.
     Please let me know if you have any further questions.
    Best Regards,
    Faris A
    Bueller

  • Breakoutbo​x for Digital and Analog Output

    Hallo everybody
    i need  to design a breakout box with BNC and SMD connectors for Digital and Analog output (the DAQ cards we use are  PXI-6723 for analog and PXI 6259 mostly for the digital an fast AO Channels) I am looking for tutorials and info material for that. On what I have to pay attention what would be a good circuit diagramm design and so on.
    Maybe you could give me some tips where I can find good Material about that.
    Sebastian

    Hello Sebastian
    first of all I'll need some more information about your intention. What exactly are you going to do? Do you want to connect, or divide signals? (Which signals?)
    Maybe if you have a look in the manuals of the cards, you'll get closer to this. Here you can find out the pin assignment of the cards.
    Manuals and specification:
    PXI-6723:
    http://www.ni.com/pdf/manuals/370822c.pdf
    http://www.ni.com/pdf/products/us/04-3513-301-101-​DLR.pdf
    PXI-6259
    http://www.ni.com/pdf/products/us/044063301101dlr.​pdf
    http://www.ni.com/pdf/manuals/371291h.pdf
    Regarding
    Gregor Allexi

  • When using the analog inputs and analog outputs of the PCI-7344, what is the conversion between the voltage entering the card to counts? Similarly, what is the conversion between counts to voltage at the output of the card?

    I am using the PCI-7344 to control my system. The analog inputs are connected to the output of my system while the analog outputs serve as feedback to the system. The system is a servo. I want to know what is the conversion between the voltage read at the input, to card counts, and finally to the voltage output to the system.

    Carole,
    If you are trying to do analog feedback with a servo motor, Chapter 14 of the manual talks about how to set up the torque feedback. Also linked below is a LabVIEW example of analog feedback.
    Chapter 14
    NI-Motion User Manual
    Automatic Analog Feedback with FlexMotion example
    A. Talley
    National Instruments

  • How to combine the analog input and analog output vi's

    Hi !
    I have a perfectly running triggered analog input acquisition vi. I have a seperate vi for analog output that's running perfectly too. Can someone tell me how to combine these two operations so that I could get a vi that does simulataneous AI and AO without missing triggers. I have tried all the different kinds of configurations suggested by NI support but nothing seems to work. Can someone help ?
    thanks,
    Shiva
    Attachments:
    dac_good.vi ‏77 KB
    adc_good_fw.vi ‏124 KB

    Shiva;
    I'm attaching a good Application Notes that shows how to synchronize multiple DAQ tasks, in Labview.
    Hope this helps.
    Filipe
    Attachments:
    Advanced_Sync_Techniques_for_DAQ.zip ‏166 KB

  • Need quick help, please!!! How do I scan the counter and analog channel in parallel, synchronized?

    Hi,
    I'm using LabView6.1 and a PCI6014 DAQ card.
    I have to scan simultaneously an analog channel and the counter on the card. My project requires me to measure in parallel a force (a voltage on an analog channel) in correspondence to a distance (measured with a counter) and I have to display a force-distance graph.
    So, can someone please tell me how can I program the counter and an analog channel to take 1000 measurements in parallel, and then, by reading the buffers to have two sets of corresponding measurements?
    I've tried some things and I've got only an error message, that says that there is no free DMA channel available (the error comes from configuring
    the analog channel). I attached one of these programs that gives this error, maybe somebody can tell me what I do wrong.
    If somebody could send me an example (in LabView6, I have no 7 :-( ), I would be grateful.
    Thank you,
    pixooxiq
    Attachments:
    Scan_Test_4.vi ‏177 KB

    Hi pixooxiq,
    unfortunately, your Card has only one DMA-Channel.
    If you want to use two Channels simutaneously, you have to tell one of them to use an Interrupt instead.
    This option can be set with the "Set DAQ Device Information.VI"
    Just see the Bitmap, I've attached.
    Perhaps, you now get Performance-problems, cause the IRQ does not directly write the Data but involves the CPU. In this case the only possibillity is to use an other card with more than 1 DMA-Channel...
    Regards
    Peter Weber
    NI Germany
    Attachments:
    Interrupt2.bmp ‏159 KB

  • Synchronization between counter and analogue acquisition

    To whom it may concern,
    I am developing a data acquisition in C# using DAQ card PCI-MIO-16E4, to acquire analogue and encoder readings.  However, the Analogue and Counter Acquisitions must be synchronized together through an internal clock.  I tried to create two tasks one for analogue and another for the counter.  Analogue channels and Counter to acquire pulses from the encoder (as up/down counter) were set accordingly.  The analogue timing was set to generate a particular square wave to be used as the sample frequency.  The timing for the counter task was set to be as “ai/sampleclock”.  Both tasks were started by calling the respective BeginReadMultiSample, with a separate asynchronous call back function.  The call back functions are called when the required samples were acquired, and will retrieve the respective samples by call the respective EndReadMultiSample.  The problem is that sometimes incorrect data is acquired.  Can someone help me in solving this problem or provide a working example with the minimum requirements?
    thanks in advance
    djg
    Message Edited by djgrech on 11-01-2005 12:24 AM

    Hi Tom W,
    Thanks for your email.  Well what I meant was that the counter and analogue data does not always seem to synchronize (there is a shift in the graphs, or the data is just erroneous).  This is not constant, so I am assuming that the acquisition is not well synchronized.
    I am attaching the code with this email; I am using counter 0 as the sampling frequency, counter 1 connected with the encoder for displacement acquisition (up/down counter), and analogue channels acquisition, in this particular case two.
    Is there a work around of how one can implement the sampling frequency to be internal?
    Thanks for your assistance
    djg
    PS good day
    Message Edited by djgrech on 11-02-2005 12:20 AM
    Attachments:
    AcquisitionForm.zip ‏12 KB

  • Audio sync problem - simultaneous HDMI and analog output

    I'm currently running my audio out through my Geforce 460 via HDMI to my A/V receiver. I have a simultaneous stereo analog output running through my ASUS Xonar D2, using Pulseaudio & Amarok as the player (VLC-gstreamer backend).
    I use the HDMI and A/V receiver to power my main stereo in my living room, but on occasion when I want music around the house, I use the analog line out to send audio to an FM transmitter.
    The problem is, I'm running into audio sync problems. The audio starts out synchronised (at least to the naked ear) but within 20-30 seconds it is noticeably out of sync, with the analog audio (form my FM radio) running around a half second ahead of the HDMI output (my main speakers).
    So - where to begin finding where the sync problem is? The receiver? Conversions between 44Khz and 48Khz?
    Any help much appreciated - google-foo hasn't turned up anything obvious so far.

    Yeah - that was my thought - a very difficult, and probably insoluble problem as it stands. I can't just mute one of the devices as that would defeat the purpose of having multi-room music! Fortunately it's not too noticeable usually, as you can't usually hear the main stereo and the FM radios at the same time, unless you're standing in the right part of the house
    The analog splitter cable not really a goer, since running clean, crisp multi-channel HDMI with pass through when needed is the essential goal of the HTPC. So unless I was to switch inputs and or unplug cables...
    What I will end out doing, in the absence of a software solution, is hooking the FM transmitter directly to my receiver. I was going to just use the headphone-out jack of the receiver to feed audio to the FM transmitter, but the stoopid receiver can't output audio to external speakers at the same time as the headphone is plugged. To overcome this, I'll probably run a headphone amp off the receiver's RCA outputs, into the FM transmitter. Like this one: http://headamp.com/portable_amps/ae2/, or this one: http://www.amazon.com/Rolls-HA43-Headph … B00102ZOQC
    Last edited by sultanoswing (2013-11-13 06:15:11)

  • Difference in analog input and analog output values

    i am using 6014 DAQ card for providing motor speed reference voltage to Driver and reading back speed
    feedback voltage using LabVIEW 6.0. For this i have used AO Single Update and AI Single scan. Both are in the same while
    loop.The loop has a Wait timer of 50ms. When i take a plot of Analog o/p and input, i get a shift
    between input and output. Why is the shift or the time not synchrnised..please help..When the while loop wait timer is 200ms instead of 50ms, the shift is not there.

    I believe the problem is 2 fold. First if you are using traditional DAQ, or DAQ 6.9.3 or before, the driver is single threaded. Therefore the 2 VIs will not run simultaneous. Try DAQmx and you may be more successful.
    The other is that you are using higher level 1 point VIs. In general they are not the best to use in a time sensitive loop. You are better off using hardware timing, rather than software timing. With hardware timing you have more control over the synchronization of the 2.

  • Connecting 5700 with laptops' only digital AND analog output

    Hi everyone!
    Although I'm an experienced creative user this is the first time I'm posting. I looked trough the forums but I couldn't find any answer to my question and I hope this is not the "n"th time it is asked...
    I have Inspire 5700 Digital speakers and I recently bought a Sony VAIO VGN-FES laptop, with an Intel 945PM Express chipset, which features Intel HD audio. In the sound setup utility of Sigmatel HD audio, there is even an option to enable digital SPDIF output, which I enabled. But when I connect the digital din cable to my laptops only output jack (headphones...) I have no sound at all...
    I thought that it may be due to the fact that the jack is not digital only. But I still want to have real digital 5.1 audio. So could anyone tell me how I can do that?
    Thanks beforehand!

    Addlclove,
    in the sony forums the answer I recieved was that the headphone jack was normally 2.1 analog, but I didn't receive a fulfilling answer to my query about the reason to the spdif setting in the setup utility and the chipsets features. That's why I came here The only output I have on the computer is the one for the headpohes. But there is a docking station that I could buy, having an optical out.
    And Jason-CL,
    You're right, I used to have an Audigy, and I understand that you're saying that I can't do it through the headphone jack, right?
    astarem
    "hope..."

  • Mini Analog and Optical Output

    I would like to use both the optical and analog output from the Mini. I would like to use the Toslink to connect to my stereo and the analog to connect to my TV. Is there an adapter/connector which will do both or is there an alternative solution? Your assistance is greatly appreciated! --John
    Mac Mini   Mac OS X (10.4.8)  

    Your issue actually has two parts: hardware and software.
    Hardware: Is there any such thing as an audio cable that has both analog and digital optical connections at one end and splits so you can have both coming out the other end of the cable and going into your stereo? I've never heard of one, so chances are you'll have to use analog or digital with your headphone port and then find a second hardware option to output the other audio signal. This can be accomplished with a single AirPort Express. As you've discovered, if you have a second audio hardware solution, like a USB audio adapter, you can't select both outputs at the same time in the Sound System Preferences. This leads us to software...
    Software: Is it even possible to tell the Mac OS or an application playing audio to output both signals at the same time? Yes, it is with an AirPort Express, AirTunes and iTunes. I don't think I'd call the AirPort Express not "worthwhile" if it's a simple solution to your question. But, it's not available to other applications and I'm not sure I've ever seen anyone else here looking for the same thing. If I were you, I would seen Apple Mac OS X feedback and let them know directly that you'd like to be able to select more than one audio out option at the same time in the Sound System Preferences. My G4 Mac mini is connected to my stereo/receiver with an m-audio Sonica USB that has a digital optical audio out and I can't output that at the same time as the headphone port. So, there are other people with hardware configurations that would benefit from that option.
    -Doug

  • PICe-6259 with DasyLAB 9 - How to do Analog Output

    Hi,
    I'm trying to get a small project working in DasyLAB 9.0.2 and I need some serious help.
    I'm working with a PCIe-6259 and NiDAQmx 8 is installed.  I simply want to create a program that uses a slider to adjust the analog output on 4 channels and read the slider value on a meter.  This is a fresh installation of DasyLAB.
    Here's the program that I setup and the errors that I get.
    I select:  Modules -> Input/Output -> NIDAQ -> Analog Output.
    I adjust the properties of the DAC module to include channels 0,1,2,3 and select OK.  (I don't adjust any of the other properties)
    I then select: Modules -> Control -> Slider
    I adjust the properties of the slider to include the same channels as above.
    I then select: Modules -> Display -> Analog Meter
    I adjust the properties of the meter to include the same channes.
    The meters and Analog output are wired in parallel.
    I get the following errors:
    NI-DAQmx: Error Message
    Driver: Task DA00, Version: 0.15
    Possibly Reason:
    -> The module can process the number of "values to be written".
    File: ProcessData_KONTINUIERLICH.H, Line: 39
    When I press OK I get:
    NI-DAQmx: Error Message
    Driver: Task DA00, Version: 0.15
    Possibly Reason:
    -> The driver does not use all NI-DAQmx task channel names. This is not valid, reconfigure the module to use all task channels.
    Note: A NI-DAQmx task for analog / digital / frequency output must not have more than 16 channels. If you need more than 16 channels for the output, you must use more NI-DAQmx tasks.
    File: MODUL_DA.C, Line: 2131
    Any help to point me in the right direction would be greatly appreciated.
    The next part of my program will include acquiring data from the analog channels, but I need to get the AO working first.  I've run into some issues with Analog Input as well, but I thought I should start with AO first.
    Thanks in advance!
    Chris

    Here's what I did using the NI-DAQmx simulation mode:
        - create two tasks
                Analog Output - 4 channels, 1k output rate, 100 samples to write, Continuous
                Analog Input - 4 channels, 1k input rate, 100 samples to read, Continuous
        Save them. Start up or synchronize DASYLab (Under Measurement Boards Settings - NI-DAQmx - Synchronize with... in earlier versions, it's under Hardware Setup)
        - Create Slider. Open Slider properties, click on Options, Synchronize to the AO task that you created. This step is really important - it ensures that the data rate matches what NI-DAQmx is expecting.
        - Connect Slider to NI-DAQmx AO module, configured for 4 channels.
        - Create AI module. Connect to the AI task that you created.
        Press Start. It should run. I can't verify absolute accuracy in simulation mode, but, I received no errors.
        Your first error is probably the result of the timing being wrong - the Slider defaults to the "Driver" timebase. The rest of the errors seem to be a cascade off the first.
        Note - my simulation did not work without the Analog Input. It generated no data. That may be an artifact of the simulator, but, once I put an Analog Input on the worksheet, it ran okay.
        I hope this helps.
    - cj
    Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.

  • Simultaneous Analog In and Analog Out

    How to Output on Analog Out and read Analog In at the same time.
    I am using a VC++, NIDAQ 7.01.
    No LabView.

    Greetings,
    The following example demonstrates how to perform synchronized analog input and analog output:
    Synchronizing Analog Input and Output
    The example was written in CVI, but modifying it for use in VC++ is fairly straightforward and documented within the code.
    Good luck with your application.
    Spencer S.

  • Simultaeno​us digital out and analog in

    Hi. I am running into an issue with the simultaneous AI (analog in) and DO (digital out) with Athena (www.diamondsystems.com) and LabVIEW (see the supplied files): The original program example supplied by somebody (the attached 060126 file) runs fine with these two simultaneous operations.
    However, for my specific requirements, I would have to put a frame (flat sequence) around the DO part (the attached 060131 file), followed by another flat sequence frame that changes another DO state. The reason that I must do this is that I have 2 valves which change states as the AI operation continuous to run.
    I have noticed though, once I put those flat sequence frames around it, the DO pauses and doesn't perform the operation until the AI loop is stopped. I have tried to create various local variables but the issue persists. Would there be a workaround for this? Thanks.
    Attachments:
    HMIR_SBC_060131.vi ‏374 KB
    HMIR_SBC_060126.vi ‏137 KB

    I have taken a look at your code. Based upon your description,
    and the fact that I do not have the driver for your device, I am not exactly
    sure where the program is pausing.  I can give you some suggestions to
    resolve your problem.  When you use a flat sequence structure, every piece
    of code in a frame has to finish execution before the next frame will start
    execution.  If you have code in parallel (i.e. digital output and analog
    input) in one frame and the same in a second frame the digital output and analog
    output in the second frame will not start until all the code in the first frame
    has finished execution.  In your case it you have a while loops for
    digital input and output in the first frame.  When both of these loops
    finish execution, you should see the second frame start shortly after. 
    From your description what I believe is happening is that the digital output in
    the first frame is finishing and waiting for the analog input to finish. 
    After the analog input loop finishes the second frame can start.  If you
    want the second frame's digital output to start before the loop finishes
    execution you will need to take that code out of the frame.
    Regards,
    Jesse O
    Applications Engineering
    National Instruments
    Jesse O. | National Instruments R&D

  • How can i synchronize analog output and analog input timings to generate and measure voltage at the same time.

    how can i synchronize analog output and analog input timings to generate and measure voltage at the same time.

    Read this Tutorial
    http://zone.ni.com/devzone/cda/tut/p/id/3615#toc3
    And also refer to this link where You have repeated this question.
    PS: Please stick to one thread. That way, its easier to keep track of your query and answers

Maybe you are looking for

  • InDesign File "Stuck" Printing 2-Sided

    I opened an old Indesign (I think CS3) file this morning and converted it to CS4. Whenever I attempt to print the document, it does so as 2-sided even though the print dialog 2-sided option is off. I am on a mac running 10.6.3 with an HP printer. Tur

  • How to store images in database using java

    hii how to store images in database using java.......... Message was edited by: naveennaga

  • How to verify when i change mode in form of standard?

    To All          I want to know that how to coding if I change mode on screen Incoming Payment from "Add" mode to "OK" mode. I develop it using vb.net to catch event. This post I want to insert button into standard screen by in first time I created bu

  • I Need help exactly from Nokia c2-00 developers

    Please tell me what the hell you have done to nokia c2-00 v03-99 differently from other nokia phones? It has a problem of connecting applications to the internet though my operator sent me the right internet setting.i am using only the default web br

  • Save as archive disabled 3.04.

    I'm running GarageBand and the Save As Archive option is disabled. I read the long thread about it, but it's still not working for me. I don't know what's meant by adding loops (the blue one), so maybe that's what's wrong. Anyway, I'd appreciate some