How to generating three phase sine wave simutiously with Vistual C++?

Here I want to generate three phase sinewave at the same time with the phase angel 120 continiously. I can creat a task that contain 3 AOs, and generate 3 same sine wave at the same time. But I can not create 3 individual task which contains one AO channel, and write data to FIFO. Please tell me how to realize it?

Hello, Rilee,
Thank you very you very much. But I am still confused. The website I can not open. As you said, I shall create a data array to contain three phase data, for example, sinedata[750], sinedata[0:249] contains first AO, and sinedata[250:499] the second, and the rest is the third. then
1. send the data for sinedata[0] to sinedata[249], to the board. with DAQmxWriteAnalogF64;
2. send the data for sinedata[250] to sinedata[499], to the board. with DAQmxWriteAnalogF64;
3. send the data for sinedata[500] to sinedata[749], to the board. with DAQmxWriteAnalogF64;
and or so.
Is all the above description right?
Here I have several questions:
1. When shall I send second section sample data? I think it shall be all the first data have been written to the board. And How can I know that all the first section data have been sent to the buffer?
2. If I call DAQmxWriteAnalogF64 to write the second section data to buffer after the have finished first section data written, will this function affects the wave of the first section data?

Similar Messages

  • 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

  • How can I calculate the frequency of a 2-4Hz three phase sine wave in 50msec?

    I want to calculate the frequency of a sine wave using either all three phases or just one, but I want to know the frequency after 50 msec, I don't want to have to wait for a full period.

    I have a mathematically sound suggestion but I do not know how well it will work in application. Most period measurements measure the time between a full period or several periods to eliminate the error introduced by the measuring device. Essentially the device error is made insignificant.
    Mathematically you can do much more but there is a tradeoff between recording less information and knowing (or assuming) some values. For instance, if one knew the amplitude and could calculate the derivative of the signal, one could calculate the frequency. A sine wave can be represented by the function: A sin (BX)=C , where A is the amplitude, B is the frequency, C is the present measured value. If the equation is solved for X, we get: X=(sin^(-1)(C/A))/B. The d
    erivative of the first equation is AB cos(BX)=C. If the equation for X is now substituted into the second equation, we get, AB cos(B (sin^(-1)(C/A))/B)=C. Solving for B we get B=C/(A cos(sin^(-1)(C/A))). Remember, we already know A and C, so we are done.
    Practically every step and assumption in the above argument introduces possible error which will affect the accuracy of the frequency. Unfortunately it is a trade off and that is why at least a whole period needs to be measured to get an accurate frequency.
    Jeremy Braden
    National Instruments

  • How to generate a continuous sine wave for a given amount of time

    I am trying to output a continuous sine wave for a speaker, but I am having difficulty making it continuous rather than looping the signal for a given amount of time, which causes discontinuities. There is a VI in the Labview examples titles Continous Generation, but it produces a square wave. Is there a way to adapt this VI such that the amplitude and frequency can be used as inputs to create a sine wave?

    I found a VI that ships with labview(7.0)called continuous sound output. the output of this is a sine wave or you can change it to whatever you want.
    Sorry cannot help more
    Joe
    Joe.
    "NOTHING IS EVER EASY"

  • Generating a 6X Sine Wave using an absolute encoder

    How do I get an Analog Signal Generation Synchronized to six times the frequency of an absolute nine bit parallel encoders output with adjustable phase relation. I am using a PXI-6533, a PXI-6711 and have available a PXI-6070E.
    Now the long version of the problem. I have a 9-bit absolute encoder connected to a motor shaft (up to 420Hz). From the encoders 9-bit (0-511) parallel signal I need to create a synchronized 6X sine wave (up to 2500Hzwith an adjustable phase relation. Picture an electronic timing chain. For every cycle of the encoder, I need to produce six full sine wave cycles with a variable tuned phase shift. I have LabView 7 w/RT.
    I have tried to use the Update Clock (PFI5) to step through a buf
    fer but it seems to drop an update every so often. I also have tried to monitor the bit-0 line to determine freq. and scaled the update rate accordingly but the phase shifts all over the place. Does anyone have any ideas on the matter ? I would really appreciate it! Thanx….Phil

    Phil,
    Another different option to solve your application would be to use the new LabVIEW FPGA module and the 7831R reconfigurable I/O hardware. Using these tools you can configure the FPGA on the board to generate the sine wave based on the 9-bit parallel input. The most simple setup would be to have a lookup table in the FPGA that has a corresponding output value to each of the 512 possible input values. This 512 sample table would contain 6 cycles of a sine wave. Every time the parallel input changes the analog output value would be updated accordingly from the lookup table. This setup would also allow to easily add a phas
    e shift of the output by shifting the point in the lookup table you are reading by a known constant.
    Christian L
    NICS
    Christian Loew, CLA
    Principal Systems Engineer, National Instruments
    Please tip your answer providers with kudos.
    Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system,
    or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject
    to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense

  • How can I get stable Sin wave through NI 9264 ?

    Dear all,
    I would like to generate 64 analog sin wave with frequency up to 20K Hz.
    Then I bought 4 NI9264:
    25 kS/s/ch simultaneous output
    Hot-swappable operation
    Spring terminal or D-SUB connectivity options
    250 Vrms isolation (spring terminal version)
    60 VDC isolation (D-SUB version)
    .The attached is my file for the generation. when I used Osciloscope to monitor the output, I could not get any stable output.
     Could I have the reasons and suggestions for my objective please?
    Thanks!
    Zhu_nuo
    Attachments:
    64 Channel Programmatic v2.vi ‏22 KB

    Hi Zhuming,
    The VI above only provides waveform information for a single channel. In order to output data across all 64 channels in the task, we can make use of a For Loop to build an array of waveform information for each channel. In the example below, I've made use of an Auto-Indexing For Loop in order to build up a waveform output array of 64 elements. I've wired this to an NI-DAQmx Analog 1D Wfm Write VI; the 1D array's elements represents each channel in the group of selected channels for generation.
    An important thing to note is that the NI 9264 16 channel analogue output modules have a maximum sample rate of 25 kS/s/ch. This means that each channel is capable of writing 25kS/s simultaneously.
    To reliably generate a signal, we generally need to have it comprised of around 5 to 10 points of data. This allows us to represent the signal to a good degree of accuracy. For example, if I wanted to reliably output a 1Hz Sine Wave, I would need to break the 1Hz wave into ten separate points and then output them at a rate of 10Hz. In terms of the NI 9264, the maximum frequency content (Two points of information) that can be generated is 25kHz/2 = 12.5kHz wave. The maximum clear wave frequency that we could produce with the 9264 (A wave built up of ten points) is 2.5kHz simultaneously across each channel. This is all to do with Nyquist's Theorem. This should explain why the frequency appeared to drop.
    Out of interest, how are you measuring these output frequencies?
    Kind Regards,
    Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

  • I am trying to generate a 50kHz sine wave for ten cycles, then aquire this waveform and store it in a file, I am using a PCI-Mio 16E-4 board, has anyone done anything like this?

    I am trying to generate a 50kHz sine wave output on the DAQ card and then simultaneously recieve. I am using a PCI-Mio 16E-4 series board to do this. Has anyone done anything similar. I can generate a 50k wave no problem, and recieve one, but I can not get these vis to run together? Any suggestiosn

    Jrod, yes you should be able to do this, actually there are quite a few example programs come with LabVIEW that handles simultaneous analog input and output, I check the specs of the board you use, the board should be able to handle the sampling/generation rate, but make sure for 50KHz sine wave, you would sample at least twice as fast, preferably ten times the generation rate, then this puts the sampling of the board to thew limit.
    The program you can try is attached here, good luck with the application,
    XD Gao
    Applications Engineering,
    National Instruments
    Attachments:
    Simul_AIAO_Buffer(E-series).vi ‏104 KB

  • How to get, write the sin wave frequency

    hey,
    How can I get the sin wave frequency from sin wave?- on the diagram. Problem is about saved this parametr to the fille. I have just only last one. I would like to have fequency adequate to the Im and Re  (Im, Re: parametrs witch are saved correctly) 
    Best regards,
    Marek

    Your program will not work because you because many of the functions you use must have timing information. And that information is not included by you as programmer. You have just included some functionality without reflecting over what these functions do and what they need as input. A programmer must have attention to details. You can not just throw out some VIs in a happy go lucky style. 
    Much of your problems is caused by the pesky dynamic data type. This is something that NI have glued ontop of Labview using very cheap glue. The whole concept is just flimflam and you should avoid using it.
    I can see you are a beginner. And that is OK we have all been there sometime. A very powerful function in Labview is the online help option. Then you start a new Labview session go to help in the toolbar. Then select "show Context Help" (ctrl+h). Then in doubt use the "detailed help option" in the online help window.
    I have included something to push you in the correct direction. As you can see many of red dots at the connector panes is gone. That is a good sign. Post again if you have more problems
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)
    Attachments:
    some help.vi ‏11 KB

  • Need to monitor event ID with Event Level :Critical , Also how to generate (powershell or otherwise) an event with Event Level :Critical

    Need to monitor event ID with Event Level :Critical , Also how to generate (powershell or otherwise) an event with Event Level :Critical

    Hi
    First, we Need to clarify what do you want.
    1) You want to Monitor a Windows Event with the severity "Error" (there is no Critical for Windows Events, only Error").
    2) You want to create an Event in SCOM. I think you if you talk about "Event" in SCOM you mean actually an Alert.
    There is no direct way like a tool/powershell script  of only creating an Alert in SCOM only if you are going to use the SCOM SDK
    http://msdn.microsoft.com/en-us/library/hh329086.aspx or using the Orchestrator Create Alert activity.
    If you want to create a SCOM alert depending on a Windows Event you either can create a rule
    http://technet.microsoft.com/en-us/library/ff730470.aspx or a Monitor
    http://jimmoldenhauer.blogspot.ch/2013/03/scom-2012-how-to-generate-alerts-from.html 
    Cheers,
    Stefan
    Blog: http://blog.scomfaq.ch

  • How to Generate 997 for different trading partner with different Interchang

    How to Generate 997 for different trading partner with different InterchangIDS
    We are planning to use same working “ABC -> XYZ (Host)” 850 “ecs” file even for “EFG -> XYZ (Host)” 850 Transaction. And we have successfully implemented without any issues.
    We wanted to send 997 Acknowledgement in case of “EFG -> XYZ (Host)” 850 transaction.
    In this case also we would like to use same “ecs” file which has been used for “XYZ (Host) -> ABC”.
    After adding the 997 capabilities to Stanley I don’t see any extra capability added to “XYZ (Host)” trading partner.
    The generated 997 for Stanely EDI file doesn’t reflect the “XYZ (Host)” trading partner Interchange ID. It is getting reflected the previous 997 Transaction “XYZ (Host)” Intercahnge ID.
    We use following Interchange ID’s
    ABC = 005381447
    XYZ (Host) = 049894764
    EFZ = SWEOT30013
    XYZ (Host) = 5273851T
    The 997 which is generated has the InterchangeID as this “049894764” instead of “5273851T”
    Regards
    Ravi

    Hi Ravi,
    You have to have the two Delivery Channels under Host TP's communication capability. One host delivery channel should be used with one TP only and will have specific values to that TP.
    Go to the Exchange Protocol Parameters of Host TP (XYZ) delivery channel (which you are using in the agreement with EFZ) and provide the required values here. Revalidate and redeploy the agreements and run a test. Let us know if you still face issue.
    Regards,
    Anuj

  • How can I Write a sine wave in an Access-fil​e?

    I measure a sine wave in LabView 6i. How can I write the datas automatically to an Acces-file, at the same time?
    In my program, I managed it with Execute SQL.vi, I change a number in a SQL statement(String) -> after this I push start and then it writes the statement in the Access-file.
    The problem is, it writes only one data per measurement in the file. How can I write all datas in the Access-file and measure the wave at the same time?
    Thanks for help!
    Attachments:
    getwave.vi ‏49 KB

    On the waveform palette, you will find a "to components" vi that you can break out the array of the waveform. You can then, using a for loop write all of the values from the waveform.
    Better yet, there are examples in the database toolkit manual on pages 3-13 to 3-15 that deal with reading arrays (and even has a waveform example).
    Good luck!

  • How can i do a sine wave with High Throughput Sine for fpga?

    I try to do a sine wave looking the examples but i can't. I have a sbRio 9606. 
    I need to do a sine wave with high throughput block. In my exercise i have 2 inputs (amplitude and frecuency) and i have to look the output (sinewave)
    I need help!!

    Hi pablosan,
    If I understood correctly, you want to generate a sine wave with a high throughput block in Labview FPGA.
    I'm afraid you won't e able to do this, as these blocks are specifically designed for other FPGA targets with better features for high performance. So instead of using the example named "Sine and Cosine.lvproj" under High Throughput examples, you can use the "Sine Wave.lvproj" under Signal Generation and Processing examples, which is more adequate to your Single-Board RIO.
    Regards.

  • I need to know how to generate a Random Multisine wave

    A Random multisine signal is defined as the superposition of a set of sine waves with random phases

    Try using "Basic Multitone.vi" or "Basic Multitone with Amplitudes.vi", with the "phase relationship" control set to random. You can find these VIs on the "functions->analyze->waveform generation" palette.

  • How can I output successive sine wave sequences?

    I'm using Labview 8.2.1 and I'd like to output sequences of sine voltage waves to a motor, each sequence being associated with n number of cycles at a given frequency and magnitude. For instance, three 0.5V sine cycles at 1Hz followed by three 0.2V sine cycles at 10Hz - no waiting time in-between and all data saved to a given folder. I've been using the 'Cont Gen Voltage Wfm-Ext Clk.vi' within the example library. I added to that a stacked structure thinking that I could copy-paste the first sine sequence to the next frame - changing only the frequency+magnitude values of the sine wave - but I couldn't get the second sequence to execute. I tried out other options with different timed structures but it was not successful either. My block diagram for now looks like this:
    What fundamental steps/elements am I missing?
    Thanks for your help,
    Thibault.

    Instead of using frames let’s try something a little bit simpler. First your generation is set to continuous so it will never go to the next frame until the first task is done.  
    You have two options to solve this problem:
    1.       You build the waveform the way you want it, and then you start the generation with the whole waveform load into the card. Just need to make sure this will limit the size of your waveform to as much memory you have on your card.  Advantage about this approach is there will not be time gaps between one signal and the other one
    2.       The other option is to start the generation with one waveform stop it and start it over with different specification. Basically what this is what you are trying to do, but you need to change your generation to: “N samples”. One thing to consider about this approach is that your signal will have a gap every time your task is started and stopped.
    Let me know if it helps
    Two point to remember, this is a question that can be answer more correctly in DAQmx discussion forums not, labview and next time if you can reduce the picture width to less than 500 pixels.
    Jaime Hoffiz
    National Instruments
    Product Expert
    Digital Multimeters and LCR Meters
    Attachments:
    Cont Gen Voltage Wfm-Int Clk.vi ‏54 KB

  • Generate and record sine wave with GB

    Is there a way to generate and record a sine wave with GB? I need to record a 20khz tone and put it to track. Thanks!

    Thanks. The purpose of this was to 'fool' the horrible compressor/encoder over at Youtube. Inserting a 20khz tone in the mix tricks the compressor and effectively bypasses Youtube's butchering device. What I did was downloaded Audacity (free) for Mac. Audacity has a 'generate tone' capability which can be recorded. I then 'exported' my 20khz tone as a wav file and 'imported' same into my GB mix. Et voila! I can now mix my sine wave tone to the specified 'workaround' levels which I had seen posted on the net. ~King

Maybe you are looking for