How to generate a high freq square wave on NI-USB 62xx

Hi,
I am trying to generate a 50khz square wave with an AO channel on the NI-USB 6212 (rated at 250ks/s AO). I started with the Voltage - Continuous Output.vi example but when i go up toward 50khz square wave (100khz sample rate) the edges of the square wave become rounded. The slew rate for the card is 5V/us and my amplitude is just .5V so i feel like I'm doing something wrong with the task setup.
I also tried setting continuous samples using the onboard clock for a source and then writing an array [1,-1] but that fails at anything higher than ~8khz. 
What's the most efficienct/correct way to set up a task like this? Any help appreciated. Thanks.
Matt

Hello Matt,
Right now, I think that shape of the signal that is being output is being controlled by the load on the AO. 
If there is a very large impedance load attached between AO and ground, the RC time constant of the circuit is going to be very high.  This will result in a large amount of time required to charge and dissipate the voltage.  By increasing the frequency, the amount of time allotted for this is being reduced.  Potentially resulting in the waveform you are seeing.
Can you please upload a picture of your waveform?
Can you please try to reduce the load on the AO?  This can be done by disconnecting the current load and attaching a small resistor (50 Ohms should be good).  Does this result in the correct waveform?
Regards,
Thomas C.
Applications Engineer
National Instruments

Similar Messages

  • How to generate multiple digital outputs (square waves delayed) at 50 kHz?

    I would like to generate 3 digital outputs like the picture attached at 50 kHz. Using the "digital pattern generator (marching values).vi", I can generate 3 digital square wave but without the delay time. How can I do that?
    I'm using the card PCI 6034E.
    Thank you
    Attachments:
    digital outputs delayed.png ‏8 KB

    Hi,
    the digital pattern generator (marching values) only shifts the binary value of the first signal and sample to the next signal/sample.
    Have you tried generating your waveforms via build waveform and use t0 terminal to change the lead delay?
    In general, this DAQmx example could be helpful which you can modify to your needs.
    DAQmx Write Digital Channel- External Clock: https://decibel.ni.com/content/docs/DOC-11142
    Regards,
    Thomas

  • How to apply single sine or square wave

    Now I used NI-FGEN and NI-Scope for bender element test, I want to now how to generate single sine or square wave (normally in NI-FGEN, I saw only continuous wave generation type).thanks you so much

    If I understand your question correctly, it sounds like you would like to output one period of a sine wave or square wave and then just 0V DC. To do this you can use the niFgen_Basic_Arb_Sequence_Example. You will want your first sequence to be a sine (or square) wave and then the second sequence to be DC with an amplitude of 0V. You could replace the while loop in that example with a sequence structure with a wait in the structure to last just a bit longer than your sine wave. This will ensure that your sequence doesn't repeat.
    I hope this helps answer your question.
    Regards,
    Doug K.
    Application Engineering
    National Instruments

  • How to generate finite cycles of sine wave using daq mx in vc++

    Hi,
    How to generate finite cycles of sine wave or for finite duration in vc++ using hardware timer without any sleepfunction in the code.
    Thanks & Regards,
    satya

    Hello Elizabeth,
    Thanks for the response.
    1) I am using NI 6040E PXI.
    2) I am using NI-DAQMx 8.3
    3) Measurement Studio is 6.0.0.105
    4) Operating system is Windows XP.
    I want to generate sine wave for finite duration previously in traditional daq there was function called wave_op.In which we can mention number of cycles of sine wave we wanted to generate. That function is not available in DAQMx so we have to use sleep function to generate finite period. Any hardware control function to control generation of finite cycles please let me know.
    Thanks & Regards,
    satya

  • How can be time implimenting in Square Wave Point By Point .vi

    i want to use "Square Wave Point By Point .vi" but i can not understand how to put time value.

    Hello,
    I understand you wanted to use the mentioned vi. So the thing is the inputs that you can see are not compulsory or required inputs. Those are recommended inputs which you can use if you have a requirement in your application. So in thise vi as you know the duty cycle will define the time a square wave remains high versus low over one period. Morever the output of the square wave will be as follows:
    square wave = amplitude × square (p)
    where
    square(p) = 1 if [ (360. frequency. time + phase)mod(360)] is < [360. duty cycle(100%) / 100]
     and -1 for other cases.
    So from this equation you can work on your application and decide if you need any time input at all or not.
    Hope this helps.
    Cheers..!! 

  • How to generate a bipolar pulse train in LabView using USB DAQ 6211?

    Hi,
    I am setting up a system to generate either a single square pulse or a train of square pulses using LabView, with controls to adjust the frequency, amplitude, number of pulses etc. I have had a lot of help from NI tech support setting up the actual VI itself which seems to be working fine, and outputting the pulses via a USB DAQ 6211 using a square waveform generator and the AO1 channel on the DAQ.
    The problem that I now have is that I need to pulses generated in a train to be bipolar (as they are connected to electrodes so need to be bipolar o avoid salt build up on the electrodes from the voltage going in one direction only, at least that is how I understand it!).
    How can I set up my LabView VI to generate a bipolar pulse train instead of always being positive voltage? I am new to this area and so am trying to learn but there is so much to learn!
    Thanks,
    spamjam

    Hi Shalini,
    Apologies for taking a while to get back to you, I hope I can explain what it is that we need to create with the pulses. I understand what you mean about the existing pulses having a positive and negative on the graph - but we need the pulses to start from a resting voltage and the first pulse to be positive, then back to zero, then the second pulse to be negative then back to zero etc. This is to do with reversing the direction of the current between two electrodes to prevent build up of salts on one electrod from the current always passing in the same direction. 
    I have attached a .Tif file to this post to try to illustrate what I mean - the top picture shows how the pulses are currently generated, then bottom on is what we would like to produce if this is possible?
    Thanks for your help,
    Spamjam
    Attachments:
    Slide1.jpg ‏38 KB

  • How can i output a square wave from one of the digital lines of NI 9401

    hello,
    i m very much new to the LABVIEW environment and NI. please help me guys. i am using cDAQ 9172 and NI 9401 which i believe is a digital I/O device. i want a square wave of amplitude 4 to come out of it so that i can use that to control the speed of a DC motor by pulse width modulation technique by varying the duty cycle. how do i output a continuos square wave?
    Thank tou for reading.
    hoping for a reply at the earliest
    Regards
    ashutosh

    The DIO ports on a MIO will not satisfy your needs (unless you move to LV RT).
    They do not support buffered outputs.
    Your update rate (how often you can set the port and clear it) is going to be limited by how fast (a-hem slow) windows will let you iterate,
    and,
    be non-determinstic.
    You could use,
    1) LV RT with the existing board, or
    2) FieldPoint PWM module, or
    3) Arbitrary waveform generators, or
    4) HS DIO board, or
    5) use the analog output of your baord where you que-up a 0 -5V waveform of the proper shape (i.e. make sure that the duty cylce fraction of the update values are high, the rest low).
    This is just to get a PWM signal out.
    Now there is another issue. Determinism. How often do you plan on reading your inputs and making a change to you
    r PWM? If you plan on doing more often that 10/second, write your code to handle windows going out to la-la land when you expect it to be working.
    Can you tell I like LV-RT.
    I hope my ramblings have helped.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Custom square wave duty cycle in signal express

    Hey everyone,
      I am using an USB X Series Multifunctional DAQ Model 6361, with labview signal express 11 on windows7 (version 9.3.5) and I am trying to figure out if i can change the duty cycle of a square wave.  I need to have one period be at 75% duty cycle and another 25% or something along these lines.
    thanks!
    Adam 

    Hi Adam,
    I believe another Applications Engineer has corresponded with you concerning this issue already. If you are looking to generate a truly custom square wave where the duty cycle changes from one period to the next then you will need LabVIEW as this functionality is not supported in SignalExpress. 
    Using the Analog Output along with the Create Analog Signals options will allow you to specify one fixed duty cycle for your square wave, but this will remain constant throughout the generation. 
    Regards,
    James D.
    Applications Engineer
    National Instruments

  • How do I Fix DDS Generated Sine Wave That Produces a Periodic Square Wave?

    Hello,
    I'm an undergraduate researcher with almost no experience dealing with FPGA semantics and other National Instruments hardware in general.  Part of my project revolves around creating a sine wave signal via the FPGA on an sbRIO-9632 that is output via the board's analog I/O pins, and I found it convenient to adapt the code provided by the National Instruments tutorials (http://zone.ni.com/devzone/cda/epd/p/id/6066) to have it run on an sbRIO FPGA.  The problem I'm encountering right now is that the actual output I'm seeing is a square wave as opposed to the smooth sine wave that was expected, and I've exhausted all my ideas on possible ways to debug this issue.  Can anyone please give me feedback if they've seen this problem before or offer other suggestions on fixing this?
    I'm currently running LabVIEW 2009 with the appropriate real-time and FPGA modules on a 64-bit Windows 7 machine.  Again, the hardware is an sbRIO-9632 complete with analog I/O.  I appreciate it everyone!

    I am also having this issue and have not been able to find a solution in the forums. I am somewhat of a rookie so pardon me if I seem ignorant in any way. I am working on a graduate project where I need to produce some sine waves and I am getting more of a square wave when I output it and measure on the scope. The program I am running is quite simple at the moment to attempt to discover any errors by process of elimination. I have the sine wave generator in a while loop outputting to an AO port. I am using the cRIO 9022 with the 9269 AO module. I will attach screen shots of my code and my oscope image
    Attachments:
    sine wave.jpg ‏76 KB
    code for project.PNG ‏169 KB

  • Why do i get ringing when i am generating Square Wave using PCI 4461 DSA Card

    Hi,
    when i generate square wave form DSA card PCI 4461 i am getting ringing effect as per my observation of waveform generated in CRO.Can anybody tell me why is this effect seen and how can it be rectified and removed from the signal in LabVIEW.
    Regards,
    Sneha

    The analog outputs on the 4461 (and the analog inputs, for that matter) are band-limited by digital lowpass filters. These low-pass filters have a brick-wall response in the frequency domain, which results in Gibbs-phenomenon ringing in the time domain. See this discussion, among others:
    http://en.wikipedia.org/wiki/Gibbs_phenomenon
    The ringing will be excited whenever there is significant signal power near the abrupt band edge, because the abrupt cutoff will result in signal power being located just below an absence of power in the spectrum. Whenever signal power appears in spectral isolation like that, you can expect ringing in the time domain response. Your square wave consists of a series of harmonics at frequencies below, near, and well beyond the digital filter's cutoff. When the digital filter cuts off the higher harmonics, the ringing is created.
    To prevent the ringing, you must create a waveform mathematically that is bandlimited already. The result will be a square wave with slower rise and fall times, but no ringing.
    Hope this helps,
    Ed

  • How to avoid jitter in analog output(square wave) generation

    Hi all,
    Iam working with PCI-6723 32 channels analog output,iam generating a square wave,sampling at 100ks/s.
    ican able to generate upto 10kHz square wave.The wave form appears clean when it is below 1000Hz if i crossed 5KHz to 7KHz, iam getting jitter in the output square wave form,i have experimented with the digital filter but still the jitter is persisting,
    since iam using 12 channels for such similar generations so i have fixed the sampling rate.100Ks/s.
    kindly suggest me how to avoid this jitter in high frequency generation.
    OS::WINDOWS 2000
    HARDWARE PCI-6723.
    I/O CB 68
    NIDAQ:7.3
    LABVIEW 7.1
    kindly find the attached file.
    Thanks and Regards
    RAJESH
    Attachments:
    Untitled.vi ‏73 KB

    Hi ALAN,
    Thanks for your reply, well the square appears to be overlapped ie one ON/OFF period another waveform tries to overlap, actually i planned to take a snapshot of my oscilloscope (tetronix) but since its not advanced one ,i have attached the file kindly look into it,you can observe the at some higher frequencies there is lot of difference between rise time and fall time.
    Thanks and Regards
    rajesh
    alan actually iam decorating my front pannel do u have any sample layouts for coloring ,buttons kindy forward me .
    Attachments:
    Doc1.doc ‏56 KB

  • How can I output a square wave to control a stepper motor using 7332 controller?

    I have the following system configuration for testing a linear actuator (LA):
    LabView 7.1
    NI FlexMotion 7332 Motion Controller
    NI Flex DMM 4070
    The LA is a stepper motor with Step and Direction of Rotation inputs, as well as some discrete I/O for Power Enable and other functions.
    The LA specification only requires that I send a 50% Duty Cycle square wave signal with frequency less than 300 Hz to it in order to make it step.  The LA has it's own power source.  I only need the 7332 to generate the drive signal and the DOR signal to the LA.  Using some of the example VI's, I can get the LA to work, but I will need to incorporate the functions in to a custom application. 
    How can I weed through the numerous advanced functions the 7332 offers and only generate a DOR signal and a step command at a user-defined frequency.  How do I set up the controller for this?
    Thanks

    Hello,
    All the VIs that you can use to create a pulse train and digital I/O from your motion controller are found in the "Analog & Digital I/O VIs" sub-palette in the "Flex Motion" palette. Use "Load PWM Duty Cycle" and "Configure PWM Output" VIs to create the square wave. Use the "Set I/O Port Direction", "Set I/O Port MOMO", and "Set I/O Port Polarity" VIs to create digital output. I hope you find this information useful. You can learn about the specifics of these VIs and their inputs/outputs in the NI-Motion VI Help.
    Regards,
    Aaron B.
    National Instruments

  • Can I generate sine and square waves with NI PCI-MIO-16XE-50 card??

    Can I generate sine and square waves with NI PCI-MIO-16XE-50 card??
    How Do I generate those signals?

    Hello;
    You certainly can do that. The way to go about that is to use one of the Analog Output channels your board have available.
    If you are using Labview to program the board, you can find good examples at Search Examples->I/O Interfaces->Data Acquisition->Analog Output->Multiple Point (buffered) Analog Output.
    If you are using other Software language to program the board, you can fing examples at C:\Program Files\National Instruments\NI-DAQ\example\VisualC\AO.
    Hope this helps.
    Filipe

  • Custom high and low times for square waves

    Hi, is there a way to create a square wave that has an incremental HIGH pulse width and a fixed LOW pulse width?
    Sorry I'm quite new with labview, any help is appreciated, thanks!
    Solved!
    Go to Solution.

    Hi GBPC,
    My name is Jack and I work at National Instruments UK.
    I understand you are trying to output a square wave signal with a fixed low time and variable high time in labVIEW.
    The reply above works great if you want to use the signal internally. Alternatively if you are trying to output the signal with a piece of internal or external Data Acquisition (DAQ) hardware you will want to use LabVIEWs DAQmx Tool palette.
    I have created a quick example below for you to look at that should help you come to a solution. It uses the DAQmx VIs to create and initialize a channel and then runs it in a loop with controls to change the high and low times using a property node.
    Hope this helps
    Jack. W
    Applications Engineer
    National Instruments
    Attachments:
    Variable High Time Pulse Generator.png ‏37 KB

  • How to generate 3 phase sine wave to output on ELVIS

    Hi .I need to make a star or delta connected circuit on ELVIS board.2 make this circuit I need 3 wave generator( with 120 phase shift) and one common ground
    and because the ELVIS function generator can only generate one wave I decided to generate countionuos sine wave in Labview.
    Now I can generate 2 continuis sine wave in labview and output them on the analog outputs of ELVIS.Ao-0 and A0-1
    but I dont know what to do for the third signal.the elvis board just has 2 analouge output and when I use  Ao-0 and A0-1 I cant use ELVIS function generator after that.so would u please help me on this problem.how can I output 3 contious sine wave in Elvis.I have attached my VI to this post
    Attachments:
    new.vi ‏38 KB

    Hi, I am also having some problem in generating two signals from two AO. Could you please tell me how to generate two different signals from two AO. I have attached vi which generate square wave from one AO 0. I need the inverted signal in AO 1. 
    Attachments:
    Pulse Width Modulation.vi ‏48 KB

Maybe you are looking for