triangle wave in comparison questions

Hi all, I'm very new to using labview and have encountered a problem.

I'm trying to compare 2 ongoing tensions with a triangle wave form, in a manner similar to PWM comparing a triangle wave to sine wave. I am building the schema to load on an FPGA but can't with the wires going to the comparator leave the signal generator of triangle and in the interface of e/s of the element of comparison.

I think the problem is that the waveform of the triangle is an array, which is not a correct entry for the comparison group. I thought that the block that converts the table to the dynamic entry might solve this problem, but it didn't.

Attached images of the schematic list and error. Again I am really new to this. Thanks for any help

Right.  FPGA does not allow tables (unless the length is set to a constant), or DDT.  You will notice that if you open the palette of functions while editing an FPGA .vi, they aren't "even appear.  The error message is that the subVIs cannot run.

Check it out Finder example OR (Help menu/search examples...) and search for "PWM".  There are several examples, the first one (generation PWM) probably applies very well (use a caller .vi and pass something like [1000 + 1000 * sin (i)], and [1000-1000 * sin (i)] and change [F] to [T] to stop the time each cycle).  Discover the other examples.  There may be one more like what you want.

In general, the FPGA code works by a loop very quickly and treatment only one value at a time.  Instead of generating a sine wave together and a triangle wave model, you must generate a single point in waves each pass through the loop.

If you want your own solution (instead of starting with the example): on the palette of functions, use 'search' to find sinus (or sinusoidal generator FPGA), etc. and use a normal programming/digital/Greater to compare the sine to triangle.

Tags: NI Software

Similar Questions

  • How to get RMS to triangle wave

    I measure a signal voltage AC using a cRIO and 9206.  The signal is a triangle wave and I have to get the RMS of this triangle wave.  It seems that the average Cycle RMS VI in labview fact that sinusoidal waveforms.  There is an option between peak/histogram/auto when self gives a "reasonable response" to a triangle wave.  I need a better answer.   I can write a custom vi grabbing the vertices of the triangle wave, then dividing by sq.rt (3), but it's a lot of work.  Hoped that LabVIEW already had one scheduled.  Thanks for your help.

    -phdieum


  • What is the difference between a triangle wave, waveform of the triangle and the triangle pattern

    To generate a waveform of triangle, I have 3 vi I could use. Signal Processing-> generation of signals-> Triangle wave.vi, Signal-> signal generation processing-> Triangle Pattern.vi, programming-> wave->-> generation of waveform analog waveform-> Triangle waveform.vi.

    What is the fundamental difference between these 3. I understand that all 3 have a different set of entry and I can use them according to what combination of input data that I have. Are there any special cases for which each is used?

    You should get really understand DAQ and the difference between the data types. When you create a waveform data type, the data type includes timing information. For the acquisition of data the most important is the dt or the time between samples. You have configured the DAQ Assistant to use this information to generate the waveform. When you create the table 1 d, obviously it cannot contain information of timing and when you convert dynamic data, all you will get is a default dt 1.

    As indicated, you can use either feature, if you create the table 1 d, you will need to change the data to add to the dt you want.

    Look inside the basic function generator. It uses the lower level of triangular-wave function, you already mentioned. See how the timing information is added to the output of table D 1.

  • Export the Wavs (high level question)

    Hello
    Our company has a LARGE number of the DIr with Wav audio built-in. The big question is... does Director (8.5 +) have the potential resource in the jargon of the Director to write a script that will
    (1) export the wavs as wavs to a desired folder and
    (2) find the information of marker inside the wavs and save this txt or xml?
    I want to really know if it's possible before heading on a path of development difficult.

    See you soon,.
    Simon

    They have all the docs online:

    http://Xtras.Tabuleiro.com/products/audio/help/index.htm

  • Display the side by side comparison question

    You can remove a phtograph directly from the display side by side comparison?

    Thanks in advance, Ed

    There is no menu command or button, but if you just click the delete key, the selected photo will be removed (you will be prompted and offered the option to delete the file from you hard disc as well).

  • Newbie on string comparison question

    I was messing about with a bit of code and realized that the top operation returns FALSE, then the next operation returns TRUE.


    String one = new String ('a');
    String b = new String ('a');
    System.out.println (a == b);


    String s1 = "yes";
    String s2 = "yes";
    System.out.println (s1 == s2)

    I expect to return FALSE. What is the difference between the two ways to create a string?

    user558321 wrote:
    I expect to return FALSE. What is the difference between the two ways to create a string?

    It has to do with what we call 'internment of string", which is a slightly advanced topic and you will probably never need to worry.

    Always test for equality of strings with string1.equals("asd") and no operator ==.

  • AS comparison question

    Hello

    I have the following code
    SELECT * 
    FROM   tabA a, TabB b
        WHERE  a.col1 LIKE b.col2 ||'_' 
        AND SUBSTR(a.col1,1,LENGTH (a.col1) - x) BETWEEN SUBSTR(:item1,1,LENGTH(:item1) - x) AND SUBSTR(:item2,1,LENGTH(:item2) - x)
    A.Col1 length can vary and b.col2 is fixed. (Always a.col1 length > b.col2) I need to insert '_' dynamically to the SIMILAR part. Number you of '_' is the difference between a.col1 and b.col2 (difference (x above) is set and may be getting separately)


    Examples of data
    a.col1                   b.col2
    
    1232233               12322
    1232345               12323
    123245                 12324
    123259                 12325 
    If: item1-> 1232233 and: item2-> 1232345

    only the following items must be completed
    a.col1                   b.col2
    
    1232233               12322
    1232345               12323
    If I replace '%' instead of '_' here, it is so all the elements that have duration below and above of: item1 and: item2 also of filling.

    All of the suggestions.

    Rgds

    sexy

    Hello

    Thanks for the code in shape so well, but beware: long formatted lines cause the entire message scroll.
    Please post more short lines, like this:

    SELECT      *
    FROM        tabA a, TabB b
        WHERE  a.col1 LIKE b.col2 ||'_'
        AND    SUBSTR(a.col1,1,LENGTH (a.col1) - x)
              BETWEEN SUBSTR(:item1,1,LENGTH(:item1) - x)
              AND     SUBSTR(:item2,1,LENGTH(:item2) - x)
    

    So the problem is that you don't always want to concatenate a single "_"; you want to concatenate exactly x of them (x > = 1).
    You can do this with LPAD (or RPAD)

    ... WHERE  a.col1 LIKE b.col2 || LPAD ( '_'
                              , x
                              , '_'
                              )
    

    Otherwise, you could use '%' and do a test for the length:

    ... WHERE  a.col1 LIKE b.col2 || '%'
        AND        LENGTH (a.col1) = LENGTH (b.col2) + x
    
  • Why my output signal is produced waves triangle when I want the sine waves

    in labview I use the daq assistant to create an output voltage signal to create a sine wave. When I connect it to the opscilloscope, it reads the triangle waves. is someone can you please tell me why this is.

    9172 is a chassis so I need to know the module you use, too. You should try the example:

    %ProgramFiles%\National Instruments\LabVIEW 2012\examples\DAQmx\Analog Output\Voltage - Output.vi continues

    It shows you how to create a waveform to generate, you could use this piece and feed in your daq assistant.

  • Impossible to decode and import the wav/mp3 file selected"error in Captivate 4

    Good afternoon.

    I exported and modified a Captivate presentation audio in Soundbooth. After editing, I save the file as a. WAV. When I import the file to the slide, I receive the error message listed above.

    I followed the other discussions in the forum and performed the following:

    XP Pro (32 bit - SP3)

    E-Learning Suite

    Captivate 4

    Soundbooth CS4

    • Downloaded and installed new NSAudio.dll
    • NSAudio.dll successfully registered
    • Ran successfully the restoreCP4regentries.bat and the restoreRegPermCP4.bat
    • Restarted the computer
    • Ran the program as long as administrator (even if he asked me to re - register the product - a little strange)

    I always get the error when I try to import WAV files. If I convert the files to MP3 format, they can be imported. At the moment I prefer not to import them in MP3 format.

    WAV format is uncompressed, 44, 32 floating little (I also tried other bits).

    I lost a whole afternoon of productivity to this.

    Any thoughts on how to solve this problem? It seems that I followed all the recommendations I've seen so far.

    Hello

    Captivate seems a bit picky about WAV format. You might have to adjust a few settings with the WAV output. You could start by trying the following and see if it is resolved.

    Start with a backup copy of the audio clip

    Open base Windows Sound Recorder

    Open the WAV file with questions in sound recorder

    Click file > save as

    Click the change... button - make no changes, and click OK (this should change it to PCM format)

    Try to import the WAV file after that and see what happens.

    Personally, I would use the MP3 myself. Not sure why you are against it. After all, this is what will end up in your compiled result.

    See you soon... Rick

    Useful and practical links

    Captivate wish form/Bug report form

    Certified Adobe Captivate training

    SorcerStone blog

    Captivate eBooks

  • How to build a square with a slope (talud-respons)

    Hello

    I want to generate a signal (square with a slope) you can see what I mean in the picture.

    With:

    period is: 0.2 s

    rising edge: 0.04 s

    falling edge: 0.04 s

    I can't find how can I do such a signal with the signal generator, how do I do such a signal with modules available in DASYLab?

    I hope someone can answer question

    Thank you

    If you do not Pro, you may be able to use the module generator with a triangle wave and then use the scale to cut the upper part, to make it more like a trapezoid.

    A wave of Triangle of 5 Hz with an amplitude of 5, limited to +-2, will do.

  • Why push button and stop button does not work in the structure of the casing and buckle my VI? (code attached)

    I am a beginner. I'm trying to create a simple VI only switches beetween two types of signals like sine and triangle when someone press on the push button and at the same time, save the data in the file to my desktop. I also have a stop button which no longer record data.  Here are my questions and dproblems:

    1. when I press the button, it does not the true and false in the structure of the case so that I can see the triangle wave stops and begins the sine waveform table.

    2 when I press the stop button, I want the program still running, but the process of writing data in time the loop stops. I don't mind if the graph of the wave stops too but it would be better for the user to see the wave form is running, but the data will stop recording.

    3. Although the condition of the loop did not accept the local variable for the stop button inside the loop or within the structure of the case, so I put the button outside all the loops and the structure.  (I know that this is a problem, I do not know how to use a single button several times in a single code. The local variable did not work the world premiere? I have to?)

    4. the data file it creates hase a lot of lines and columns. I expect a time column and a column of mixed signals based on the push button amplititude this user press every time.  I did that with the acquisition of data and a sensor, it automatically gives me the voltage and time in a column. I tried 2D and 1 d and it has not changed anything.

    Thank you for your help

    Like you said, you read only your entries at the beginning, then whatever value they had before you hit run is worth to be seen by the rest of the code. Programming LabVIEW is based entirely on the data flow and parallelism. It is incredibly powerful and has led to its success over the years (coupled with graphical programming), but is usually one of the first things the new developers stumble on. This is a simple resource to familiarize themselves with its functioning. The function to highlight execution is a great way to watch how your application uses data streams.

    Simple code goes like this:

    • Containing the main code of while loop

      • Inside of the whole loop is all user interaction code or modify the code entry
      • Stop the terminal loop is attached to stop certain criteria or user selection of a stop button
    • Loop initialization above all if necessary
    • Closing referrals and communications, etc after all loop

    It's very simple code. If you want to watch in more advanced architectures that are scalable, Google "LabVIEW State Machine" or "LabVIEW producer consumer."

    If you are just starting, you should do a free training have the capabilities of LabVIEW.

    "Give me six hours to chop down a tree and I will spend the first four sharpening the axe.  -Abraham Lincoln

    Here are some free training focused mainly on LabVIEW and hardware tools to help get started.

    Training center of NOR

    NEITHER start-up

    -Hardware Basics

    -Guide of MyRIO project Essentials (a lot of good simple circuits with links to youtube events)

    -LabVEW databases

    -DAQ Application tutorials

    -CRIO Developer's guide

    Learning OR training videos resources

    Introduction to LabVIEW for 3 hours

    Introduction to LabVIEW for 6 hours
    Paced self-study for students
    Self Paced Training beginner to advanced, required SSP
    LabVIEW training Wiki

  • Outputs analog BNC-2120 to stop working randomly

    I have a BNC-2120 Module. I have the analog outputs implemented with an Assist DAQ. I'm running a square wave, or triangle wave at a very slow pace (.35 Hertz). I'm tracking signals with a waveform graph just before going to the modules DAQ help. The system works well anywhere from a few minutes to 25 minutes. The results seem to just stop working, but I still see the signal on the graphic display of waveform. I think that the BNC-2120 module has some questions. Someone had a problem where the output just stop working? I look in my program of VI?

    Hi gwing,.

    There could be a few possibilities that could go wrong. Could you upload your code? DAQ hardware do you use with the BNC-2120?

    Best regards

    Jonathan

  • DAQmx continually update the example output table

    Hello

    I use the example Synch_AI-AO in the DAQmx folder and it works very well for sine waves, pulse, triangle waves, or whatever it is periodic. However, I would like to output an array of noise which produced WhiteNoise, which is continually updated service every N seconds.

    I tried to call the StopCallback and the StartCallback, then after delaying for N seconds, but since I have to be running when I call these callbacks I find myself coming back to the place where I called them before going back to them (like recursion), who kills my program.

    Is there a way update output so that it does not have the question of the recurrence which blocks my program?

    Thank you.

    Hi EricJR,

    Instead of calling the functions StopCallback and StartCallback, have you tried to call the DAQmxWriteAnalogF64 function whenever new samples are generated?

  • Problem of analog sinusoidal input USB-6009

    Hello

    I am a newbie to Labview. I'm using Labview 2009 and USB-6009. I tried to use USB-6009 to display the input sinewave of function generator signal. First of all, the perfect sinusoidal looking at the frequency of 1 kHz, but when I changed the frequency of 10 kHz, the sinusoid turned into a triangle wave. When I test the input signal, I put the 48 kHz sampling and Terminal configuration is CSR. Is there a problem with USB-6009?

    You really need to spend some time to study sampling and Nyquist theorem-not LabVIEW. To faithfully reproduce the shape of the sine wave, you must go to a sampling rate 10 times higher than your input frequency. With the 6009, i.e. limit the entry less than 5 kHz.

  • generate waveforms

    Hi all

    How can you generate waveforms with time and amplitude? where you mention amplitude step size and grandeur of no time.

    Thank you

    This strangely similar to work at home.

    You try to build a specific type like a sine or triangle wave?

    Where are you stuck?

    I recommend you watch the LabVIEW tutorials online
    LabVIEW Introduction course - 3 hours
    LabVIEW Introduction course - 6 hours

Maybe you are looking for