Generating sawtooth in Analog Output

Dear Mr.
I am programinning in labview and I would like to generate from my DaqPad 6020E sawtooth signal. I have a problem becouse I can generate virtually but not in Analog Output. Please verify my program which is attached to the mail. If you can please write your simple program which generate sawtooth signal in analog Output. I was checked programs (examles) in ni.com but i can generate one. I know that AO works becouse i checked it sending sin (as trigonomethry sig) and there was no problem.
Best regards
Tomasz Olszewski
PS. If You speak Polish we can talk in Polish language.
Attachments:
ct03.vi ‏124 KB

Have you verified output in the Test Panels of the Measurement & Automation Explorer (MAX)? Simply wire analog output 0 to analog input 0. In the test panels, generate a sine wave on the analog output pin. If you can read in the signal on the Analog Input tab, then the board is operational and something is wrong in the code. Check the code to make sure you are referencing the correct device # and channels. Have a great day!

Similar Messages

  • Usb 6009 continuous analog output

    Hi
    I'm pretty new to Labview, so you may have to bear with me. I have a USB-6009 and I want to generate a continuos analog output voltage. I've got the example you have posted 'Gen Mult Volt Updates-SW Timed_LV7.1 (0 to 4).vi' working and it outputs a continuous sine wave.
    In a similar manner I need to generate:
    1. Ramp up voltage (and ramp down voltage): starting with a continuos constant voltage, which after a period of time linearly increases to another constant voltage, and which allows me to specify the 3 time intervals and the rate of increase.
    2. Pulsations: whereby I can specify the amplitude and time interval of each pulsation
    This is so that I can control voltage to a valve which regulates my pipe flow. In the example I have (one stated above), I do not understand specifically:
    i. Why I need both a 'Software Loop Time (ms)' as well as 'Timeout'
    ii. The 'Sinusoidal Pattern' input which seems to generate data for a sine wave- I can't get a description of that and there are no similar VIs for other waveforms; and what is the function of the two numbers it has?
    iv. How do I change amplitude and time period for the wave?
    iii. What does 'Index Array' do?
    thank you

    Hi there,
    I'm guessing the VI you are using is the one from this KB:
    http://digital.ni.com/public.nsf/allkb/6F2C2B49A89D685C8625711D007BDD64
    i. The software timed loop control is to control the rate at which you change the voltage output.  The timeout on the DAQmx Write VI is the maximum time in seconds the VI will wait to output a sample (eg. if the write buffer is full, the Write VI will wait for it to become available for 'timeout' seconds before outputting an error).
    ii. The sine pattern is just an array constant of doubles that make up the sine wave voltage values, and the for loop adds an offset (of two volts) to every single one of those values. You might want to replace that entire array constant and for loop with a Simulate Signal Express VI (just search for Simulate Sig or look in the Functions >> Input palette) and convert the dynamic data output to an array of doubles.  You can configure the type of waveform, amplitude, and time period from that express VI as well.
    iii.  Refer to previous answer.
    iv.  Index array returns an element of an array based on the index input.  You can turn on the context help and move your mouse over functions to get more help on them.
    I hope that helps!
    Way S.
    NI UK Applications Engineer

  • I am using an NI PCI 6024 E board device for an analog output application. Can I generate two independent waveforms, one on each analog output channel?

    I am using an NI PCI 6024 E board device for an analog output application. Can I generate two independent waveforms, one on each analog output channel? In attach I send a example of my vi to control one chanel, but i need to control both but with diferent waveforms.
    Is the vi correctly programed to this propose?

    Yes you should be able to do that. look at the signal generation examples shipped with LabView
    You can create a 2 D array, with each row representing a wave form per channel. The number of points of the wave form (per row of the 2 D array) represent the number of points in the output buffer
    The wave forms can have different amplitudes/shapes, and therefore they are independent in this sense.
    However, you need to set the update rate,which is the same for both channels. The update rate together with number of points per buffer determines the frequency of the wave forms. This means the two wave forms will have the same frequency.
    To have different frequencies, you need to have say, on wave form with one cycle per buffer, and the other waveform have 2 cycles
    per buffer. in a case like that the frequency of the second channels is twice that of the first channel, and so on
    The two wave forms are then not truly independent, they may have different amplitudtes/shapes, but related in frequency.

  • Error when generating waveform analog output on NI 6704 card

    Hi, I am trying to understand why NI 6704 card appears to be incompatible with what I'm trying to do. 
    I want to use a waveform to generate an analog output voltage on a NI 6704. 
    I have a vi in the style of the waveform buffer generator in this example:
    http://zone.ni.com/devzone/cda/epd/p/id/4837
    which creates the waveform. In my main routine I attempt to create and write a DAQmx ao task using the waveform information, but get this error: 
    Possible reason(s):
    Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.
    Property: SampTimingType
    Requested Value: Sample Clock
    You Can Select: On Demand
    Task Name: _unnamedTask<7D>
    According to documentation the 6704 has no onboard memory... but it's not clear to me how the DAQmx functions are actually sending the data to the card, i.e. if they are attempting to read and store the waveform buffer on to the card, it the lack of memory on the card could be my problem. Is is correct that that is part of my problem? Or since the error has to do with the sample timing clock, is my problem that the 6704  uses software timing? 
    I've run my program successfully on an NI 6225 card... are there any work arounds for generating such an output on a 6704? 
    Thanks in advance!

    The error has everything to do with software timing. Your device does not have a hardware clock so you get an error when you try to configure it. To output a waveform, you have to do out one point at a time. You can only do this at a low frequency and it will have considerable jitter.

  • Using DAQ generate a 38kHz on an analog output on and off for ms using labVIEW

    I wish to generate a 38kHz pulse on an analog output of a mydaq to drive a infrared led. The 38kHz signal is not continuous but is on for 1ms and off for 1ms.

    Hi pat,
    you generate a waveform using 38kHz as sample rate and a rectangular shape of 1ms HIGH level and 1ms LOW level. Using some simple math you will notice you need 38 samples at 38Khz to output a value for 1ms…
    Then you just output that waveform on a AO channel.
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • 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

  • Simultaneous analog output 1k sine wave and data acquisition

    Although many topics of simultaneous analog output and input can be found in NI Developer Zone, I have not found a case similar to my project. I'm trying to generate a 1kHz sine wave by using the analog output of NI DAQPad-6070E, and acquire one channel input signal simultaneously. I found most of the examples can not work properly above 100Hz. Any suggestions are welcome. Thank you.
    Jian

    I have sucessfully solve the problem when I observed the increase of
    scan backlog number. Simply increase the buffer size of AI/AO and you
    can make the 1kHz sine wave output and data acquired properly.
    On Tue, 3 Feb 2004 09:03:07 -0600 (CST), jujian wrote:
    >Although many topics of simultaneous analog output and input can be
    >found in NI Developer Zone, I have not found a case similar to my
    >project. I'm trying to generate a 1kHz sine wave by using the analog
    >output of NI DAQPad-6070E, and acquire one channel input signal
    >simultaneously. I found most of the examples can not work properly
    >above 100Hz. Any suggestions are welcome. Thank you.
    >
    >Jian

  • How to avoid delay during analog output generation by changing its frequency?

    Windows XP
    LabVIEW 7.1
    PCI-6036E + BNC-2120
    Hi,
    I am going to create a vi to generate an engine speed sensor signal (a simple square wave with specific missed pulses, in my case 58 pulses “teeth” and 2 missed pulses “missed teeth”) as an analog output but in addition give me the opportunity to control parameters for example frequency online to simulate the engine speed changes during running that vi. For this purpose I have started with “Continuous Generation.vi” which is available in NI Example Finder under the following path:
    Hardware Input and Output > Traditional DAQ > Analog Output > Continuous Generation.vi
    Then I modified it towards above mentioned goal, all related vi s are attached. The main vi is: "Motor Signal Generator_1.12.vi"
    At the first try it looks that it works properly but when have a look on that more accurately with Oscilloscope (fortunately I have a good one: Agilent 54621A – 60 MHz, 200 Ms/s) obviously there is a gap (delay or Jitter) whenever I change the engine speed. It is also attached in Signal generation_problem report.doc file.
    Note: Small gaps are OK and related to predefined missed teeth but the big one is happened during changing engine speed.
    As far as I understand it is related to the time which case structure in AO C-GEN sub-vi needs for AO reconfiguration each time after changing the engine speed (update rate). How can I get rid of this delay or gap during signal generation and generating completely continuous signal?
    I have to mention that obviously I changed the frequency by changing the update rate. The other possibility is to change the number of updates in one period (refer to "generate arb frequency.vi" in NI site: http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3E48F56A4E034080020E74861) which resulted in no delay however then I can not change the frequency continuously but step by step (for example jump from 5Khz to 2.5KHz immediately) and this can not pass to my application.
    Any hint is appreciated.
    regards
    Attachments:
    Signal_generation_NIsupport.zip ‏81 KB

    Hi Roozbeh,
    The following example will allow you to vary the pulse train frequency during run time.
    Thanks,
    Lesley Y.
    Attachments:
    GenDigPulseTrain-ChangingSpecs.vi ‏75 KB

  • How to generate two different analog signal in two different VIs

    I'm using a PCIe-6321 board and a SCB-68 connector block. As it has two analog output I would like to use one of these output in one Vi to generate a square waveform and the other output in another VI to generate a sine waveform. Each VI work perfectly separatly but if I run one then the other, the second one doesn't send any signal. Since I don't want to merge the two VIs (It's more convenient to operate them separatly), how can I figure out to make them work together (sometimes).
    Solved!
    Go to Solution.

    I assume you get error -50103 (resource is reserved) at either on vi.
    It's not possible to run two AO channels independetly from each other with different VIs since both Tasks are trying to request the same timing engine at the DAQ device.
    Christian

  • How to switch analog output between two waveform frequencie​s

    Hello,
    I'm using a fairly simple VI to generate a square wave at our analog output board.  I have the square wave controls in one panel of a sequence structure, and a "release" function in the other panel of the sequence. Currently the VI is programmed to switch from the original square wave to -10V when the Boolean control is switched.
    What I'd like to do now is to modify the VI so that I can swtich between a square wave of a given frequency, say 100 kHz, to a square wave of a different frequency, say 10 kHz, or to DC -10V. But I'd like to be able to vary each frequency and amplitude independently.
    Could anyone give me some programming pointers?
    Thanks,
    Michelle

    Thanks to the three of you for the suggestions. I started trying a few of them, and then realized that what I had already built will work pretty well to update the frequency. I didn't realize that it would update the waveform in "run" mode -- I thought it would only do that in "run continuously" -- so I've found that I can change the frequency of the waveform by doing that. This doesn't allow me to change the frequency and the amplitude simultaneously, but I'm not sure yet whether or not I will need to do that -- I so will probably go ahead with the experiments I need to do with this set-up, then modify it if I find that I need to control both frequency and amplitude simultaneously.
    Thanks for your help!
    M.

  • NI-DAQmx VisualStud​io C++ 6 Single point analog output

    Specs: NI-DAQmx 7, VisualStudio C++ 6.0,  PCI-6722,8channel AO
    We have a very simple application: set a voltage (actually 6 channels) and keep it until we want it changed again, perform the change very quickly in response to an image capturing algorithm. So I don't need any waveforms or buffering.
    In this forum post http://forums.ni.com/ni/board/message?board.id=231​&message.id=3283&query.id=18094 you talk about an AOOnePoint example, but I get an error that the NI-DAQ driver does not support my device.
    I may need to use NI-DAQmx, but how? I would like to use something like AO_VWrite(,,), maybe for 6 channels in one call. But I can't find it in NI-DAQmx. It seems I need to setup buffers and frequencies. I have a working sample, but it seems a slow and certainly overkill of this simple application:
    // Link with \DAQmx ANSI C Dev\lib\msvc\NIDAQmx.lib
    #include "NIDAQmx.h"
    double[2] data;
    int taskHandleAnalog;
    int written;
    void Init()
        DAQmxErrChk (DAQmxCreateTask("",&taskHandleAnalog));
        DAQmxErrChk (DAQmxCreateAOVoltageChan(taskHandleAnalog,"Device and Channel Info","",0,10,DAQmx_Val_Volts,NULL));
        DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandleAnalog,"",1000,DA​Qmx_Val_Rising,DAQmx_Val_ContSamps,NUMBER_OF_AO_SA​AMPLES));
        DAQmxErrChk (DAQmxWriteAnalogF64(taskHandleAnalog,NUMBER_OF_AO​_SAAMPLES,0,1.0,DAQmx_Val_GroupByChannel,data,&wri​tten,NULL));
        DAQmxErrChk (DAQmxStartTask(taskHandleAnalog));
    void SetVoltage( double voltage )
        data[0] = voltage;
        data[1] = voltage;
        DAQmxStopTask(taskHandleAnalog);
        DAQmxErrChk (DAQmxWriteAnalogF64(taskHandleAnalog,NUMBER_OF_AO​_SAAMPLES,true,10.0,DAQmx_Val_GroupByChannel,data,​&written,NULL));

    Hi,
    It looks like you simply wants to output voltages on the analog output channels, but only wants one update at a time with no waveforms or buffering in DAQmx.
    As I'm sure you know there are really just 3 types of measurements.  Single Point, Finite, and Continuous.  Since you want a single value at a time it's just a Single Point operation.
    You can find DAQmx examples for single point operations in this path:
    C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Analog Out\Generate Voltage\Volt Update
    Simply place the DAQmx Write Code within a loop and you will be updating one value at a time, but multiple times when "we want it changed again".
    Dennis Morini
    Field Sales Engineer
    National Instruments Denmark
    http://www.ni.com/ask

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

  • Synchronizing Analog Output to Counter Input

    Hi!
    I'm really new to LabView. Pls help!
    I'm trying to obtain a set of stimulus signal and response signal from my motor for system identification.
    The stimulus signal will be generated by the Ao0 channel and response signal (quad encoder linear position) will be read into counter0.
    How can I synchronize the stimulus signal and response signal so that the sampling (n samples) for both stimulus and response starts at the same time?
    e.g.
    t=0, stimulus sample 1, response sample 1
    t=1, stimulus sample 2, response sample 2
    t=2000, stimulus sample 2000, response sample 2000 
    I've attached my VI.
    Thanks. 
    Regards,
    Student
    Attachments:
    Acquiring Linear Encoder Samples.vi ‏44 KB

    Hello Htp,
    What do you mean by synchronize? Do you want to start the analog and counter outputs at the same time? If you do, you should have both outputs start with the same digital trigger. For the analog output, you can set up the triggering in the DAQ Assistant in the Task Triggering tab. For the counter output, look at Gen Dig Pulse Train-Continuous-Dig Start.vi found in the Example Finder (Help Menu>>Find Examples). Browse Hardware Input and Output>>DAQmx>>Generating Digital Pulses. Please let me know if you have any questions. Have a great day!
    Sincerely,
    Marni S.

  • 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

  • How to building a multi-channels analog output task in visual c++ 6.0 (without Measurement Studio)?

    Hello!
     I have a PCI 6251 card, and using DAQmx C function to generate a wavwform. (single channel ).
    But, how to creating a multi-channels analog output task, and had a different frequence in each channels?
    Thanks.

    This is getting to be a common question!
    The answer is, you can't.
    If the rates have common factors, you can use a higher overall rate. The slower waveform will simply have extra points in it to make up for the higher update rate.
    John Weeks
    WaveMetrics, Inc.
    Phone (503) 620-3001
    Fax (503) 620-6754
    www.wavemetrics.com

Maybe you are looking for

  • My MacBook's background is messed up and won't change now. How do I fix it?

    The background on my MacBook Pro has always done what it wants to. It especially likes to change itself back to the standard OS background every time I shut the computer down, but that is besides the point. There is now a bigger issue I was going in

  • How to increse payable duty in J2IUN

    Hi all By mistake  we forgot to maintain excise  duty for one material  & we send excise inovice to dealer. Now we want to update this duty  in J2iun (payable)  directly without generating any debit note.So that at the time of utilization impact of t

  • LABST from MARD table in which exctractor

    Hi, I'm looking for an extractor which will held field LABST from MARD table and if you could give me an extractor in which is MARD table. regards

  • Returning operation, table and column from a sql query

    Hi, I am working on Oracle 10g and i have to do achieve something like this. i have to create procedure or functions which will accept a SQL query and will return following : 1).  Operation like 'SELECT', 'INSERT', 'UPDATE', 'DELETE' etc. 2).  Column

  • Download I OS 5 and now I can't download anything.

    Okay so I updated my iPad to I OS 5 and now I can't download anything. It just gives me a waiting on apps and books. As for the videos and music I get preparing to download. My router looks like its download even when I stop the download. It blinks e