DAC (analog output through sreapder?) on Spartan 3E FPGA

Hi everyone,
I've been looking over the LabView training excercises for the Spartan 3E board, specifically the DAC.vi and DAChost.vi in excercise 8. The vis are there in the solution folder, but there's no real explanation for the DAC specifically in the write up section of the excercises. I've also been looking at Xilinx's manual to the board, but I can't seem to figure out the answer to my question.
My goal is to be to out put an analog signal adjustable between 0 and 3.3V as a control to another system while the rest of my code runs. Sure, the premade DAC vi's can be used to put analog voltages on the DAC pins, but I'm wondering is it possible to output an analog signal through one of the spreader connectors (while other digital connectors are also outputting)? It seems like it should be, but I'm not sure how to implement. If that's not possible, then well, I guess I have a bigger problem
Thanks
Solved!
Go to Solution.

The only place where the DAC would output would be the DAC pin.  I doubt there are other routing options for that pin because you cannot route an analog signal through an FPGA.
Regards,
Matt M.
Applications Engineer
National Instruments

Similar Messages

  • Single shot analog output: How to pulse this. Probably easy, I'm at a loss.

    Hello.
    I have a piece of machinery that my system is connected to.  Every time it reaches a proximity sensor (It's a reciprocating unit), I need to do a single pulse of 5v out of my analog output.  It has to be fast, it has to stop until the sensor is reached again, and it can't stay 'on' for long.
    I've attached my VI.  I'm using a voltage input via DAQ assistant, routed through some logic to produce a 'true' boolean every time that sensor is reached, and that boolean is connected to a case structure with voltage out tasks created in DAQmx.
    My problem is that the machine won't reverse while the case is still true and there's still the 5v being called by the true case on the case structure.  It has to pulse, then stop, then be allowed to come back when the proximity sensor is reached again.  As it is now, the machine reaches the prox and then the whole system stops, as the 'true' condition on the case structure, and subsequent voltage output, remain high.
    I've attached the VI and heirarchy as well.
    I've tried a few different things here, as well as just using a DAQ assistant with N samples, but that would just retrigger when the loop repeats anyway.
    I'd love to sit and bang my head against this til I get it, but I'm under a time constraint.  Help!
    Still confused after 8 years.
    Solved!
    Go to Solution.
    Attachments:
    using create channel.vi ‏94 KB
    logicsub.vi ‏32 KB

    Ralph, without knowing the exact DAQ card that you are using, it is difficult to give you the best solution. If you want to continue with the solution that you currently have, try adding a shift register to the outer while loop to track the previous value of the boolean. In this way, we can keep multiple values that are above the threshold from causing multiple pulses. Next add a time delay after the DAQmx Write, then add another DAQmx Write to set the output back to your low value. Remove all code from your "false" case. See attached VIs. Please let us know what model of DAQ card you have as we may be able to do something clever like a retriggerable pulse train if your card can support it.
    Charles Chickering
    Charles Chickering
    Architecture is art with rules.
    ...and the rules are more like guidelines
    Attachments:
    using create channel.vi ‏98 KB
    logicsub.vi ‏29 KB

  • How to get signal from analog input and send it to analog output (real-time​)

    Hi everyone,
    I am doing simple task in Visual C++ and I am using PCI-6221(37 pin).
    Basically, I want to send same signal from 'analog input' to 'analog output'
    at the same time (almost), to make it real-time application.
    Can someone please provide me sample program. 
    I would appreciate if you could provide me with the good tutorial which explains
    step by step everything about programing NI-DAQmx for C/C++.
    Best Regards,
    Khassan
    Solved!
    Go to Solution.

    This is my code in C++, you can optimize it if it looks too messy. This code reads signal from analog input and outputs it through analog output. 
    To make this code work additional  include directories and library directories must be added from NI.
    I hope it helps someone.
    #include <stdio.h>
    #include <conio.h>
    #include "NIDAQmx.h"
    #include <math.h>
    #define DAQmxErrChk(functionCall) { if( DAQmxFailed(error=(functionCall)) ) { goto Error; } }
    int main(int argc, char *argv[])
    int32 error=0;
    TaskHandle taskHandleRead=0,taskHandleWrite=0;
    int32 read=0;
    float64 dataRead[1000];
    char errBuffRead[2048]={'\0'};
    char errBuffWrite[2048]={'\0'};
    bool32 done=0;
    int32 written;
    DAQmxErrChk (DAQmxCreateTask("",&taskHandleRead));
    DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandleRead,"Dev1/ai0​","",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Vo​lts,NULL));
    DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandleRead,"",100.0,DAQ​mx_Val_Rising,DAQmx_Val_ContSamps,0));
    DAQmxErrChk (DAQmxCreateTask("",&taskHandleWrite));
    DAQmxErrChk (DAQmxCreateAOVoltageChan(taskHandleWrite,"Dev1/ao​0","",-10.0,10.0,DAQmx_Val_Volts,NULL));
    DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandleWrite,"ai/SampleC​lock",100.0,DAQmx_Val_Rising,DAQmx_Val_ContSamps,1​000));
    DAQmxErrChk (DAQmxStartTask(taskHandleRead));
    DAQmxErrChk (DAQmxStartTask(taskHandleWrite));
    while( !done && !_kbhit() )
    DAQmxErrChk (DAQmxReadAnalogF64(taskHandleRead,1,10,DAQmx_Val_​GroupByScanNumber,dataRead,1000,&read,NULL));
    DAQmxErrChk (DAQmxWriteAnalogF64(taskHandleWrite,read,0,10.0,D​AQmx_Val_GroupByChannel,dataRead,&written,NULL));
    _getch();
    Error:
    if( DAQmxFailed(error) )
    DAQmxGetExtendedErrorInfo(errBuffRead,2048);
    DAQmxGetExtendedErrorInfo(errBuffWrite,2048);
    if( taskHandleRead!=0 )
    DAQmxStopTask(taskHandleRead);
    DAQmxClearTask(taskHandleRead);
    if( taskHandleWrite!=0 )
    DAQmxStopTask(taskHandleWrite);
    DAQmxClearTask(taskHandleWrite);
    if( DAQmxFailed(error) ){
    printf("DAQmx Error: %s\n",errBuffRead);
    printf("DAQmx Error: %s\n",errBuffWrite);
    printf("End of program, press Enter key to quit\n");
    getchar();
    return 0;

  • How to send an analog output signal on same axis running a stepping motor umi 7764/ PCI7334

    I am running a single axis stepping motor (which is working fine) but
    for the application I need to be able to turn on and off a 5 volt
    laser.  It notes in the manual for the UMI 7764  that the the
    analog output can be used as a general-purpose voltage output.  I
    would like to use it as such, but can't figure out what VI's actually
    send messages to the board to output a 5 Volt signal.  
    Ideally I would use the analog output on the same axis that the
    stepping motor is on, but if need be I could use one of the other axis
    if this isn't possible (ie. it may not be possible to step and send
    analog voltage output on same axis at same time).  I have been
    looking at the configuring DAQ and ADC stuff, but can't seem to make
    sense if these actually control the analog output channel.  I
    think they just control the Analog input channels, but maybe I am
    wrong. 
    Any help would be greatly appreciated
    Andre

    Hi,
    It is possible to send analog output out of the same same DAC channel in which your stepper is connected, if you configure the stepper as open loop in MAX. I've tried it. This way you have the stepper output, analog output and encoder input acting independently. So you can use these seperately for different purposes, such as using the analog output for constant speed motors where speed or position control is not of much importance, encoder for positioning some other axes and stepper output for stepper control. With good programming skills, the NI motion controllers can thus be used for the most complex configurations. Great work NI !!! Nothing is impossible.
    Regards,
    Giridhar Rajan
    Automation Engineer, Design
    Cruiser Controls
    Mumbai, India

  • 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.

  • PCI Card for Analog output in the range of 10mv

    dear ni,
                    I want to know about the PCI card that can be generate analog output in the range of maximum 10mv. i  am going to use for caliberation of loadcell, strain gauges devices.
    could you tell me on which PCI card will support this type of application.
    Regards,
    Balaji DP

    Try:  http://www.ni.com/dataacquisition/
    These have analog output voltages < 10V:   http://sine.ni.com/nifn/cds/view/main/p/sn/n12:7604,n3:7853/lang/en/nid/1036/ap/daq
    You need something with a high bit count to get good resolution at 10 mV, such as the PCI-6010 which has a 16 bit D/A.   
    Here are the minimum voltage specs for the 6010:
    Minimum Voltage Range
    -0.2..0.2 V
          Range Accuracy
    283 µV
          Range Sensitivity
    6.4 µV
    Message Edited by vt92 on 11-18-2009 07:56 AM
    "There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal

  • High Noise on Analog Output PCI 6289

    Hi guys
    I am using  a PCI 6289 M series device for A/D characterization , I am using the device both for the analog output generation and also for data acquistion of the digital lines , The dynamic tests for the A/D were showing a very poor SNR ratio of the ADC, it is a  12 bit adc so technically in the ideal case i should atleast see  90 db but the resulting figure was way lower around 40 db .
    I connected the A0 from the PCI 6289 brought out to a scb-68 block to a RHODE and SCHWARZ spectrum analyzer , the above spectrum analyzer is a decent one with good analysis capability and I was surprised to see a SNR of 50 db , the data sheet says that PCI 628X devices have  a internal 16 bit DAC so technically the SNR should be atleast 90 db even if 6 db were removed for the harsh environment of the computer .
    please advise , have anybody else faced this problem , the data sheet does not give a figure for the SNR ratio of the card , since i need to test a 12 bit adc , thought that 6289 would be up to the task since it has a 16 bit DAC.I am using the Noise shielding cables and also SCB-68 block , the block is far removed from other power supplies .
    any ideas why the noise is occuring , one of my colleagues says maybe the harsh environment inside the pc enclosure causes it , is it necessary to use a separate PCI box for the card and then connect the card to the computer , is this standard procedure ?????.
    and also does the PCI -6289 have a filtering option for the analog output , all i could find was the filtering for input.

    Hi Tom
    Thanks a lot for responding to the thread , did not expect a response in the holiday season . The SNR for the 12 bit one was a typo , was referring to the 16 bit onboard dac in the M series card , which technically should ensure a clean input signal having atleast 90 db .
    The info you have given helps a lot , i suspect the conditions inside the pc might be causing it , also i am driving the analog output from the card at almost its limits of 2.5 MS/s , the sample rate specification for the card on the data sheet says 2.8 MS/s , also i notice the settling time requirement for the outputs is 3 us which i suspect will put the onboard DAC under quite a load.
    If the conditions inside the PC cannot be rectified , where can i find a external PCI box which can be connected to the computer or does such a box exist only for the PXI cards ? will that necessarily rectify the problem and also since filtering is not possible on the card itself , I remember reading the scb -68 connector block has  single RC output filter option , i would have to use discrete R,C components to make it but notice on the right hand corner some pcb holes are provided , would this help.
    Would appreciate your Response
    Thank you
    Chip learner

  • Storing analog output data in a datatype other than single-precision

    I'm using three PCI-6713 AO cards in a single computer to output 24 channels of data using Labview 6.1. The input terminals of all the analog output VI's are of type single precision (32-bit). The output cards only have 12-bit DAC's, so there is a large amount of information stored that is never used by the cards. Is there a way in Labview to store AO data in another, smaller datatype - such as a 16-bit integer. This would greatly reduce the memory requirements for my application.

    I just figured out the answer to my own question. There isn't an option for binary in the AO Write vi, but if you go down to the AO Buffer Write vi (which is called by AO Write), you can select binary array.
    Thanks for all your help.
    Josh

  • Buffered analog output puts out additional sample on aborting or stopping task

    I'm using DAQmx and LV 8.2
    I'm doing a buffered analog output operation where the sample clock is driven by pulses from ctr0 on the same device (PXI-6070E).  When I end the analog output task, either with the DAQmx stop task or DAQmx control task (abort option selected), the AO puts out one additional point from the buffer.  (I have checked by setting breakpoints and stepping through the code that the additional point is definitely generated when the analog ouput task is aborted)
    I need the output to remain where it was before the stop task command is issued.  How do I fix this?
    Thanks,
    Marc

    I'm watching to see if there hasn't been a sample output in a certain length of time, then terminating the task if there hasn't been.  Specifically, I have ctr0 outputting pulses to drive the task based on input from the AnalogComparisonEvent terminal.  I'm using a counter on a different PXI device to count the number of pulses and monitoring this count to determine if another sample has been output.  I'm outputting the ctr0 pulse to PFI3 as well, and I'm monitoring both the ctr0 output (which drives the ao clock) and the analog output itself on an oscilloscope.
    Basically I'm sitting in a while loop waiting for the monitoring counter to fail to increment.  Then I terminate the while loop and stop the analog output task.  I can watch the analog output on the oscilloscope while I step through the program.  Immediately before the daqmx control task - abort (or daqmx stop if I don't abort first, or daqmx clear, if I don't abort or stop) vi runs, the analog output remains outputting the last sample.  Immediately after the abort, stop, or clear, the analog output advances one sample in the buffer. 
    During this time, ctr0 does not output another pulse, so the scan clock should not advance.
    Thanks,
    Marc

  • 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)

  • How to toggle LED at analog output from my VI Using NI USB 6009

    Greetings,
    I bought this NI USB 6009 Multifunction I/O and found various uses for it. In my VI, I am acquiring some signals using the DAQ assistant. After doing a couple manipulation I would like to toggle a LED at one of the two Analog outputs available. I tried configure it in Max and was able to toggle it there, but now I would like to have the VI do it once a certain value is attained. Can anyone  tell me how this is done as I think I might be doing something incorrect.
    Thanks
    Edward

    Greetings,
    Attached you will find just a simple code to turn on the LED if the indicator on the VI's front panel illuminates. In my original code it is something similar. I have also check the wiring and I don't think that's the problem since I was able to toggle it through Max. I am using LV 2009. When  the output channel was configured in Max, the output voltage was set to range from 0-5V. I am not sure if the DAQ  Assistant  analog output is being triggered properly.
    OK, Lets say that I wanted to turn on the LED if a number was greater than the one stored in memory. How would I pass that to the NI USB 6009 to turn on a External LED. Please assume that the output is wired properly.  
    Thanks
    Edward
    Attachments:
    LED Application.vi ‏43 KB

  • Processing counter input into an analog output

    Greetings to all --
    I've set up a PCI6070E card to do digital input through its "counter 0" channel and output through its "AO 0" channel.
    I'm brand-new to Labview, however, and having trouble figuring out how to design my program.  In short, this is what I want to do:
    1. Count the number of pulses, let's call it P, that arrive at the counter in a given time increment.  (Ideally, this time will be adjustable from 1 microsec to 1 sec.  In reality, I may have to settle for some number of milliseconds or more, as Labview doesn't seem to like to do loops at more than 1khz.  But that's an issue for another day.)
    2. Perfrom a mathematical operation to turn P number of counts into some number N between -10 and 10
    3. Set the analog output to read N volts
    4. Reset counter to zero and start over at (1.) again.
    I can make labview count pulses in, and I can send voltage signals out, and I can use the front panel to get the inputs I need from the user for the mathematical operation,  However, I'm having trouble with counting how mant pulses hit in a given time increment, and then resetting my digital counter to zero.
    Can anyone point me at the right function names or help files, or suggest a rough program flow?  I appreciate it.
    Chad
    [email protected]

    Chad,
    The only way you can perform this type of operation with your device is in software.  See the knowledge base entries below for more details. 
    HW resetting Counter on an STC Device:
    http://digital.ni.com/public.nsf/websearch/55AF6CA​DD87F6F7786256B89005B8AFD?OpenDocument
    How To Reset in Software:
    http://ae.natinst.com/operations/ae/public.nsf/web​/searchinternal/65e3dbc715998c3286256e900075b7f8?O​...
    Regards,
    L. Allen

  • Setting analog outputs to 0

    I would like to start by cautioning you that I am not a programmer.  I have been trained in LabVIew basics, so naturally I am trying to write a much more than basic code. 
    I am writing a test sequence in which I am using a sequence structure to setup and sequence various test functions. For part of the code I am writing I am trying to control a pressure output, I start the task outside a while loop, I write to the task to control control pressure inside the while loop after leaving the while loop and then stiop the task outside the while loop, but the analog output remains at the last commanded value, how do I set it to 0? 
    I have tried writing a constant 0 to the task after I leave the loop and then stoping the task but this does not appear to work. I have a number of analog and digital outputs in this code that I would like to set at 0 before I proceed to the following sequence. 

    My appologies, I have been going through a number of trial and error phases with this code.  Here is an example of when I was trying to write a 0 to the channel, in this version I used a case structure to tell it to go to 0 when the test sequence would be complete.  I arrived at this potential solution after having no success with earlier attempts. 
    As far as state machines go, like I said I have only been to LabView basics I and II, would I be able to convert the sequence structure to a case structure and put that in a while loop of some sort to control the sequencing?
    Attachments:
    Purge Portion 15.vi ‏59 KB

  • How much noise expected in analog output?

    I'm using a PCI-MIO-16E-4 with LabView to generate buffered analog output, and at the BNC-2090 output (DAC0/1OUT) I'm finding ~180 Hz hum of about 20 mV peak-to-peak. It doesn't seem to matter whether I'm writing a waveform or not; the noise magnitude is always about the same.
    Is there something I can do to eliminate or reduce this, or is it typical so I'm stuck with it? I futzed with the BMC-2090 shield ground jumper (W1) but none of the three documented settings made any difference.
    Any suggestions would be greatly appreciated.
    thanks,
    Kevin

    No particular noise is "typical." No noise at all is atypical. 20mV is low enough that it could be radiated noise for nearby equipment. I doubt you card would have that noise in the lab situation where they test for noise. Which essentially means something about you estup is responsible for the noise.
    Since the frequency is a multiple of 60Hz it is probably environmental noise, radiated ot picked up off of the ground. Really and truly, 20mV is not a lot. I have acquisitions where I must be very careful in grounding ALL the associated equipment or I see huge blurts of noise from a motor drive - on the order of 3 Volts until I drove an eight foot gound rod through the floor to get an isolated safety ground for my DAQ PC and scope. I still see the noise, but it is now lower than 0.8V so I don't get false triggering of TTL circuitry from it. This is AI not AO like you are discussing.
    If you check the specification of your card there is a table on "System noise." I am not saavy enough to understand it, but I see that the noise is dependant on the output range. I suspect that the range is not a user selectable item, but in theory if you see more noise than the spec sheet says, then it is part of your setup not the card.
    Here is part you really don't want to hear: Solving a noise problem by text messaging is like solving a mental illness over the phone, maybe worse. I can tell you all sorts of practical, common sense things that are not specifically helpful. I can tell you from personal experience that you really need to follow all the good practices you can, if you really want to have as high a SN ratio as possible.
    Can you set up a single point ground? Can you eliminate all ground loops (shielding only grounded on one end.) I had a stray strand of shielding that brushed against a case that made terrible noise once.
    There is a good book called ,"Grounding and Shielding Techniques," by Ralph Morrison from Wiley Inter-Science. There are papers on this in in the tech resources of ni.com. In particular the paper on "Field wiring" is good. Keithley has a good book they will send you for free on low level measurements that is very informative. You have to call them on the phone to get it.

  • Analog output digital start trigger c api

    Hi, I am attempting to start analog output based off a digital trigger (either PFIO, or a PXI line)  I can do this easy in LabVIEW.  However with the C API (through Python wrappers), the problem isthat when I call DAQmxBaseWriteAnalogF64, the write will always timeout as the acquisition has not been triggered.   However, I cannot call this after the trigger occurs, as obviously that will be too late.
    I cannot find any C API examples where analog output is triggered off a digital trigger.  I can find them for analog input, but that is fundamentally different as you can performan read anytime after the trigger occurs.
    Python code as follows (the functions are equivalent ot C API, though you do not need ot pass the task handle as it maintained as part of the Task object)
    # create analog output task
    analog_output = Task()
    analog_output.CreateAOVoltageChan("Dev1/ao0","",-10.0,10.0, DAQmx_Val_Volts, None)
    analog_output.CfgSampClkTiming("",outputRate, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, numSamples)
    analog_output.CfgDigEdgeStartTrig("/Dev1/PFI0", DAQmx_Val_Rising)
    analog_output.StartTask()
    analog_output.WriteAnalogF64(numSampsPerChan=numSamples, autoStart=False,timeout=1.0, dataLayout=DAQmx_Val_GroupByChannel, writeArray=data, reserved=None, sampsPerChanWritten=byref(samplesWritten))
    print("Analog output: Wrote %d samples" % samplesWritten.value)
    # create digital trigger
    dig_out = Task()
    dig_out.CreateDOChan("Dev1/port0", "", DAQmx_Val_ChanForAllLines)
    # create digital trigger function
    highSamples = 1000
    numpts = 3 * highSamples
    doData = np.zeros((numpts,), dtype=np.uint32)
    doData[highSamples:2*highSamples] = 2**32 - 1
    # send digital trigger
    doSamplesWritten = c_int32()
    dig_out.WriteDigitalU32(numSampsPerChan=numpts, autoStart=True, timeout=1.0, dataLayout=DAQmx_Val_GroupByChannel, writeArray=doData, reserved=None, sampsPerChanWritten=byref(doSamplesWritten))
    print("Digital output: Wrote %d samples" % doSamplesWritten.value)
     

    Hi PatrickR,
    You can review some of the text based NI DAQmx (ANSI C) code examples on generating an analog output using a digital start trigger. If you included/checked text-based support dusing your NI DAQmx driver installation, you can navigate to Windows Start>All Programs>National Instruments>NI DAQ>Teaxt-Based Code Support>ANSI C Examples>Analog Out>Generate Voltage>Mult Volt Updates-Int Clk-Dig Start. If you have any questions/concerns regarding the NI hardware.

Maybe you are looking for

  • I have Acrobat 7.0 Professional and in full view some pages get smaller.

    Adobe Acrobat 7.0 Professional in full view some pages get smaller. Can anyone tell me why this happens?

  • Configuration (IMG) Objects in Logon Language

    Dear SAP Experts, I am currently working on an implementation where, in addition to English (EN) as logon language, we will also be having French (FR) and Portuguese (PT) languages. Would like to seek your advice on how we can extract or get a list o

  • XY Graph & Move Axes to middle

    Is there a way to format an XYGraph so that the X and Y Axes are not at the left and bottom as default, but located at x=0 and y=0 (similar to a crosshair section)?  I've been unsuccessful finding a property to control this. Thanks, Paul Attachments:

  • [LP 7.2] Tascam US-2400 detected as both Native and MCU + XT.  Help.

    I just purchased Logic Pro 7.2 last week and for whatever reason my Tascam Us-2400, which has the latest firmware and is set for Native (Send + AUX5) mode, is detected twice when I launch Logic Pro 7.2. LP sees it first as a US-2400 Native and then a

  • Date Help Needed

    Hi im trying to return records that are 1 day and 1 week past the recorded date, i.e. if the recorded date is 16/12/08 or 9/12/08 Thanks