How to generate pwm pulse using NI DAQ in MATLAB

hi everyone. please tell me how to generate pwm pulses using Ni DAQ card in MATLAB Simulink. if through coding is possible then post the corresponding code.....reply me 

Make sure you have installed the Measurement studio support for VB 6.0 then you will be able to find examples in the folder below on win7 and 8.
C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples
Narrow down to Analog Output and choose update voltage example for measurement studio.
You also have the possibility to use DAQ assistant if you have measurement studio installed. This function is a configuration type programming. After going through the configuration Wizard code is automatically scripted for you so that you can output the voltage you need. Read more about DAQ assistant in the blow link.
http://www.ni.com/white-paper/4652/en/
Best Regards
Jonas Mäki
Applications Engineering
National Instruments

Similar Messages

  • How to use single Timer to generate PWM PULSE, Pulse ON time measuremen​t, Event time measuremen​t1,Event time measuremen​t2

    Hi,
    I am planning to use a single Timer to generate PWM PULSE, Pulse ON time  measurement, Event time measurement1,Event time measurement2 some one please suggest me how can I achive this.
    Thanks in advance..
    Michael

    Hi Michael,
    It would be really good to understand your application a little more so that any specific needs that you have may be met. In the meantime, I would also suggest searching on ni.com for "pwm" or other keywords that relate to your application. You will see a faceted navigation on the left side that allows you to narrow your search for example code, tutorials, etc.
    Please post back with more information and the community will be able to help out with suggestions.
    ni.com search for "pwm"
    Mark E.
    Precision DC Product Support Engineer
    National Instruments
    Digital Multimeters (DMMs) and LCR Meters
    Programmable Power Supplies and Source Measure Units

  • How to generate biphasic pulses and change parameters?

    Hi I am a beginner. I need to know how to generate biphasic pulses. What are the functions i need to use(the logic involved in labview to generate)? I should be able to change the parameters like duration,interval during the course of the program.

    Greetings:
    You can go to the Analysis/waveform/signal generation toolbox and find Pulse Pattern. You can set the duty cycle, frequency and phase with the standard controls.
    Eric
    Eric P. Nichols
    P.O. Box 56235
    North Pole, AK 99705

  • How to generate addm report using grid

    Hi,
    how to generate addm report using grid, please provide any relevant doc/links etc.
    Thanks in advance.

    how to generate addm report using grid, please provide any relevant doc/links etc.When you start with the wrong question, no matter how good an answer you get, it won't matter very much.
    what is best way to divide board into 2 pieces using a hammer?
    Edited by: sb92075 on Oct 25, 2010 7:22 AM

  • How to generate multiple sheets using xml publisher

    Hi,
    how to generate multiple sheets using xml publisher.
    Thanks,
    Nur

    http://lmgtfy.com/?q=how+to+generate+multiple+sheets+using+xml+publisher

  • How to generate Webservices.xml using tool in Sun One App Server?

    How to generate Webservices.xml using tool in Sun One App Server?

    Hi,
    The build.xml file should be in a directory from where
    you are running the asant command.
    To resolve the common.xml file not found error,
    open your build.xml and check from which location the common.xml file is incuded.
    In the sample application it is four directories above
    the directory where build.xml is located.
    You can copy the common.xml in the current directory and then change the following in your build.xml
    <!ENTITY include SYSTEM "../../../../common.xml">
    to <!ENTITY include SYSTEM "common.xml">
    Hope this helps.
    Get back in case you have more issues

  • How to generate a pulse waveform 90 deg phas shifted with respect to a pulse generated using a counter in PXI 6070E daq card ?

    Hi
    I ma using 6070E daq. I am generating a infinite pulse train using one of the counters. I want to generate another pulse train which should 90 degress phase shifted with respect to the previsously generated pulse. How to implement this using the counters in the DAQ card.

    Hi Gopal,
    1) yes the frequency generator is programmable. You have 2 timbebases (10MHz and 100kHz) and you can divide down by any integer between 1-16. Those are the only frequencies you can use.
    2) The way counters work is that you can apply a gate signal to the counter which will cutoff the output. Therefore, you can have a second counter generating a pulse train of an equivalent frequency to the frequency generator (fout) but you don't want it to start immediately. You want it to start only after a short delay (equivalent to a 90d phase). Therefore, you need to "gate" or prevent the output on this counter for that small delay period of time. The way you can do this is by using a second counter to create a delayed pulse. You would
    connect the output of that counter to the gate of your pulse train function. That way, during the delay period of the pulse, you won't be outputing your pulse train yet. When the pulse (high-time) of your pulse reaches the gate, then your pulse train will start generating its pulse train (which is consequently delayed by the amount of delay used in the single delayed pulse counter). Since you don't want your pulse to go back low, you will have to turn off or clear your pulse counter while it is high. That way the signal on the gate will remain high forever.
    Your better solution is to use a PCI-660x card to perform this action. You will have more counters which will give you a greater range of frequencies to choose from and you will have more accurate timing of the signals.
    Anyway, hope that clears things up. Have a good day.
    Ron

  • How to generate a pulse train with different pulse width and delay?

    How to generate a triggered pulse train with different pulse width. for example, after each trigger signal, let's say 2 ms, then the counter output a pulse with pulsewidth of 1 ms, and then after 3 ms delay after the first pulse, the second pulse was generated with a pulse width of 4 ms.  Next cycle when the trigger signal comes, the same two pulses will be generated and so on. Is it possible to achieve this by using 6601 counter card? and if yes, how to achieve this? Thanks!

    Unfortunately you can not create a hardware timed pulse train with different widths on each pulse from a counter. Whilst it can be changed on the fly using software, since you require a hardware triggered signal getting the software involved will not give a huge amount of accuracy when the pulse will actually change.
    So in short you can't use your 6601 card (or a counter timer) to achieve this
    There are three possible Alternative solutions
    1 You could use a high speed digital IO device such as the (6533/34) to generate your variable signal which would require setting up the pulse train as a series of states based around the burst transmission mode where the clock would give you your specific timing.
    2 A timed analogy output (for example on a MIO card with a clock (PCI-6220 / 62xx), i.e. Not the 6704 style static analogy output cards)
    3 A high speed digital waveform card such as the (, 656x , 655x, 654x, 6534, 6533 (http://www.ni.com/modularinstruments/find_right.ht​m) ) this could then be scripted to work with your triggering and also there is a digital waveform editor which will enable you to set up the pattern you wish to generate (http://sine.ni.com/nips/cds/view/p/lang/en/nid/135​55) 
    Hope that helps
    Tim Matthews
    NI (UK)

  • How to generate a pulse with 9472?

    I am trying to generate a single 8V pulse of 10ms duration on multiple channels of the 9472.  The 9472 is in slot 4 of the 9172 compact daq chassis.  To test my results, I have connected an oscilloscope to one channel of the 9472 (with no load attached).  I tried modifying the Create Digital Waveform VI from the Write Dig Chan-Ext Clk example VI.  In doing so, I generated a binary array with the first half of the array filled with all 0's and the second half of the array filled with all 1's.  When I triggered my O'scope on a rising edge, I saw the channel turn on (also the LED was lit on the 9472).  However, the channel stayed on even after the routine had completed (LEDs were lit solid).  So to try to turn the channel off, I appended one 0 to the end of my array.  Now the O'scope won't trigger and I see no sign of the LEDs on the 9472 blinking.  Any ideas how I can solve this problem? 
    I was able to get a single pulse of the proper duration by setting up a task in MAX with the 9472 in slot 5.  But in doing so, I was only able to generate the pulse on one channel.  I need to be able to parallel multiple channels for my application.

    I am trying to generate a single 8V pulse of 10ms duration on multiple channels of the 9472.  The 9472 is in slot 4 of the 9172 compact daq chassis.  To test my results, I have connected an oscilloscope to one channel of the 9472 (with no load attached).  I tried modifying the Create Digital Waveform VI from the Write Dig Chan-Ext Clk example VI.  In doing so, I generated a binary array with the first half of the array filled with all 0's and the second half of the array filled with all 1's.  When I triggered my O'scope on a rising edge, I saw the channel turn on (also the LED was lit on the 9472).  However, the channel stayed on even after the routine had completed (LEDs were lit solid).  So to try to turn the channel off, I appended one 0 to the end of my array.  Now the O'scope won't trigger and I see no sign of the LEDs on the 9472 blinking.  Any ideas how I can solve this problem? 
    I was able to get a single pulse of the proper duration by setting up a task in MAX with the 9472 in slot 5.  But in doing so, I was only able to generate the pulse on one channel.  I need to be able to parallel multiple channels for my application.

  • Generating PWM signal using Signal Express

    Hi,
       Would anyone help in generating PWM signal usinf Signal Express 2.5.1.   I am using a cDAQmx and connected NI 9472 to the slot number 6 to output the PWM signal. Also I have connected a NI 9421 to the slot number 5 to acquire the PWM signal, so that I could verify the signal.
       So would you please let me know how could I generate a PWM signal using Signal Express without any LabVIEW Programming. Please help me out.

    HI Aamruth,
    I atached a project, where you can see how to do it. I hope this helps.
    Regards, Mona 
    Attachments:
    PWM.seproj ‏29 KB

  • How to Generate Synchronized pulses across two separate cards on a PXI system

    Hey,
    I'm trying to generate three pulses from my PXI System for triggering purposes. I have two cards (PXI 6259 and PXI 6115) , each with two counter/timers on them. The 6259 has 32 bit timers, and the 6115 has 24 bit timers.
    Up until now, I only needed two pulses. One was 180us long at 20 Hz, and the other is 5us at 20 Hz, starting 150us after the beginning of the first pulse. I was able to achieve this by generating both pulses on my 6115 card by triggering the shorter pulse off of the rising digital edge of the longer pulse and giving the DAQmx Counter/Timer task an initial delay of 150us.
    The third pulse needs to be identical to the short pulse, only it needs to occur 20us early (130us after the start of the wide pulse). I tried to generate it using the same technique as I used when generating the short pulse, only generating the pulse and reading in the rising digital edge trigger on my 6259 card instead of the 6115. 
    The result was that my pulse trains were asynchronous and the pulse generated on the 6259 card was constantly shifting to the left.
    This puzzled me, so I wrote up a little dummy program to test generating triggered pulses. The results were that when I generated two pulses on the same card, they were always synchronized; however when I generated pulses on separate cards, one of the pulses always shifted.
    I was hoping somebody could suggest a reason that the pulses across cards are asynchronous even though I'm reading in a digital trigger and hopefully a way to rectify the situation and synchronize all of my pulses.  

    The problem, in a nutshell, is that the timebases on the two boards have manufacturing tolerances that will cause them to differ from one another.   The accuracy error is a small fraction of a percent, but the effect on the phasing of your pulses will be cumulative.  That's why you saw the one set of pulses "shifting to the left."
    The solution is to make sure each board derives its pulse timing from a single common timebase.  Fortunately, this is pretty easy to specify with DAQmx, just a little tricky to find.  In the chain of VI's you call to configure the counter pulses, insert a DAQmx Channel property node.   From memory, I *think* you should be looking under something similar to "Counter Output->General->Timebase->Timebase.Src"
    Right click and create a constant or control to define the timebase source.  You should get a dropdown list that includes a wide variety of choices.  Among them are each of the boards' 20 MHz clocks.  By default each task will use a timebase from its own board but this technique lets you route one board's timebase over the PXI backplane with that single property node setting.  DAQmx does most of the dirty work behind the scenes.
    -Kevin P

  • How to generate a pulse on x number of events PCI-6602

    I am running LabVIEW 5.1 full development with a PCI-6602 counter board.
    I would like to generate an output pulse after counting x number of input pulses. I would also like to reset the counter with an external signal.
    My application is I am trying to generate a second index pulse for an encoder.
    I would like to count the pulses from encoder phase A and generate an output pulse on x number of counts. Then I would like to reset the counter using the encoder’s index pulse. This way I can change the phase of the “generated” index pulse with respect to the “real” index pulse by x number of counts (degrees) and maintain that regardless of encoder rpm.
    Thanks
    Brian

    Brian,
    There actually is a way to do what  you want, but it gets a little complicated.  I don't have LV on this machine so I'll have to just describe the idea.  First a summary: the counter will repeatedly countdown to 0.  Each time it reaches 0, it will generate a brief pulse which will in turn hw-reset the counter value to N.  Then it will countdown to 0 again, etc.  The same brief pulse could also be wired to a different encoder-measuring counter to create a "delayed" reset to 0 (or some other #).
    1. Configure your counter for "position measurement" instead of "simple event counting".  Set the encoder type to, um, I forget the name -- something like "two pulse encoder."  It's the setting that will increment with every SOURCE edge and decrement with every AUX edge.  Wire your encoder channel A to the counter's default AUX input (in position encoder mode, you must use the default input pins).  Hard wire from the default SOURCE input to GND.  Now every encoder edge will decrement the count, and nothing wlil ever increment it.
    2. Configure the counter to use z-indexing.  Set the z-index reload value to be N-1, where N is the # of encoder counts by which to delay the encoder's real z-index pulse.  Set the z-index reload phase appropriately, probably to A low B low.  Wire the real z-index pulse to the counter's GATE input.
    3.  Configure the counter to "pulse on terminal count" -- you do this using 'Counter Set Attribute.vi'.  So N encoder edges after the real z-index pulse, you'll generate a pseudo-z-index with this counter.
    4. You can wire this pseudo-z-index to the GATE input of the encoder-measuring counter.  Now the encoder's z-index pulse is delayed by an amount you can program.
    5. Note: this method requires the motion to be uni-directional.
    Good luck!
    -Kevin P.

  • How to generate localized chars using code point in Solaris 10?

    Hi All,
    Do enybody know how to generate localized chars (for example Japanese) using code points in Solaris 10?
    Like in the following web page:
    http://www.isthisthingon.org/unicode/index.phtml
    Unicode, shift-jis
    U+4e2f 87a3 �N
    U+4e3b 8ee5 ��
    U+4e3c 98a5 �S
    U+4f5c 8dec ��
    Thanks,
    Daniel

    I have found a "Code Point Input Method" tool in the following page:
    http://java.sun.com/products/jfc/tsc/articles/InputMethod/inputmethod.html
    Using this tool user can enter hexadecimal code point and the output is some char.
    But this tool doesn't work. I run this in the follwoing way:
    # java -jar CodePointIM.jar
    After this error message appers:
    Failed to load Main-Class manifest attribute from
    codepointim.jar
    If anybody could help I will be appreciate.
    Regards,
    Daniel

  • How to generate Java source using clientgen WL8.1?

    Hi, does anybody know how to generate Java source code using clientgen task on WL 8.1 Sp4 or SP5? I know WL 9.0 clientgen can do this, but we are still on SP5. Basically I want to look at the source code (I was wondering why it didn't work if I initialize a service impl by passing the WSDL URL string different than the URL specified in the original WSDL file that the clientgen is run against.)
    Does anybody also know how get web service client developed on Axis work on WebLogic without conficting the web service developed on WebLgoic that is running in the same box?
    Thanks for your help!

    hi ,
    As mentioned in the Question, I am unable to find the "Java Proxy Generattion" link in the Int builder.
    Also the help doc says:
    Java proxy generation is no longer supported in subsequent releases. For new developments or when making significant changes to a service interface, use Java proxy generation in SAP NetWeaver Studio instead. More information: Creating Outside-In Web Services, SAP NetWeaver Developer Studio.
    Does that mean that I can no longer generate java proxy from Int builder?
    regards,
    Piyush

  • How to generate DBMS_RANDOM Timestamp using procedure

    Hi,
    I got a copy from askTom site for the store procedure of creating random numbers in a table:
    create or replace procedure clone( p_tname in
    varchar2, p_records in number )
    authid current_user
    as
    l_insert long;
    l_rows number default 0;
    begin
    execute immediate 'create table clone_' || p_tname ||
    ' as select * from ' || p_tname ||
    ' where 1=0';
    l_insert := 'insert into clone_' || p_tname ||
    ' select ';
    for x in ( select data_type, data_length,
    rpad( '9',data_precision,'9')/power(10,data_scale) maxval
    from user_tab_columns
    where table_name = 'CLONE_' || upper(p_tname)
    order by column_id )
    loop
    if ( x.data_type in ('NUMBER', 'FLOAT' ))
    then
    l_insert := l_insert || 'dbms_random.value(1,' || x.maxval ||
    elsif ( x.data_type = 'DATE' )
    then
    l_insert := l_insert ||
    'sysdate+dbms_random.value+dbms_random.value(1,1000),';
    else
    l_insert := l_insert || 'dbms_random.string(''A'',' ||
    x.data_length || '),';
    end if;
    end loop;
    l_insert := rtrim(l_insert,',') ||
    ' from all_objects where rownum <= :n';
    loop
    execute immediate l_insert using p_records - l_rows;
    l_rows := l_rows + sql%rowcount;
    exit when ( l_rows >= p_records );
    end loop;
    end;
    Can somebody tell me how to generate a random TIMESTAMP?
    I try to change "sysdate" to systimestamp" and it give me an error:
    ERROR at line 1:
    ORA-01841: (full) year must be between -4713 and +9999, and not be 0
    Please help!!
    Message was edited by:
    eecow
    Message was edited by:
    eecow
    null

    Can you give me an example of doing this?
    The other question is:
    Can the store procedure code (above) check other things other than data type?
    For example:
    if attributeName = 'percentage' --> create a random number from 0 to 100
    The reason is because I am trying to generate some more "realistic" data. Some fields can be unrelistic, but fields like "percentage" should be within 0-100 and should not have something like 200 :)
    Please advise.
    Thanks!

Maybe you are looking for

  • Problem with ZeroConf/APIPA

    Hi@all I've discovered a problem with zeroconf in our network, which i doesn't understand and want to clear it. I've some Mac OS X 10.5.8 - MAC's which are in the Class C subnet 192.168.0.0/24. If one of these MAC's get an zeroconf Adress e.g. 169.25

  • Deployed Files getting overwritten every time when I do a server restart

    Hi, I have deployed a web application in weblogic server. For testing purpose, instead of placing the changed file inside the war our team will change the files directly in the deployed area. Once when we restart the application server, the new files

  • ColdFusion 8 as WAR on JBoss 4.2.3 WEB-INF/flex-config.xml error

    I have done this by the book multiple times and have also tried using someone else's WAR to deploy, but I keep getting the same error. I am running JBoss 4.2.3 and have tried this on multiple installations (of 4.2.3) I have verified that the supposed

  • Alarm didn´t work

    Today the alarm didn´t work. I had no problems for about 1 month. I turned on it at 00:30 to ring at 7:00, but it rang only at 8:05 when I activated the cell by the lateral button to see the time. I do not have root or task killer. Stamina mode is on

  • Are moderators now censoring unfavorable, even if respectful and helpful, posts criticing Mozilla's "rapid release" approach?

    Several of my posts have vanished off of threads, recently, despite not having any rude, profane or baseless content. I have been vocal about not liking the "rapid release" approach, by Mozilla, as I feel it's introducing bugs and problems faster tha