Changing duty cycle for PXI 5422

Hi
I am using the PXI 5422 as a standard function Generator to generate a square wave. However I want to change its duty cycle.
I know it is possible to do that because the niFGEN (.exe) has the provision for changing the duty cycle of a square wave.
However I could not find a niFGEN function which would allow me to do that.
Any response will be appreciated.
Thanks,
Nishad

Hi Nishad -
There is a property called Duty Cycle High that you can set on-the-fly.  It only works for square waves.
Message Edited by David S. on 07-27-2007 10:17 AM
David Staab, CLA
Staff Systems Engineer
National Instruments
Attachments:
fgen2.png ‏2 KB

Similar Messages

  • I want to store the data form the PWM and the value of the changing duty cycle into a file simultaneously and continually

    i want to store the data form the PWM and the value of the changing duty cycle into a file simultaneously and continually but having problem.Please can anyone help out.
    Attachments:
    data.vi ‏60 KB

    Hello,
    Have you looked at the "Write Binary File.vi" and "Read Binary File.vi" examples?
    They give you a good clue as how to write and read arrays to and from binary files.
    For your data it means that you could put the two data items to write in an array and write the array to file, for the read its important to in what sequence the number were written to file.
    Kind regards,
    André
    Regards,
    André
    Using whatever version of LV the customer requires. (LV5.1-LV2012) (www.carya.nl)

  • Measuring the changing duty cycle of PWM waveform

    I need to measure the changing duty cycle of PWM waveform.
    conditions:
    1. the period is fixed.
    2. but the duty cycle is changing.
    goal:
    measure the every duty cycle of a period in the waveform.
    Can you please give me a help?
    Thank you in advance.
    the waveform image is attached.

    You need to provide more specific information.
    What is the period? What is the minimum, maximum, and resolution of the PWM signal? What is the time scale in your image?
    How are you measuring or generating the signal you show in the image?
    What should the output look like? An array of duty cycles expressed as percentage? Some kind of plot on a graph?
    How long will this measurement last?
    Lynn

  • Trying change duty cycle in "Simulate Signal"

    Hi, 
    Anyone knows why I can't change the duty cycle in Simulate Signal? This option appears unavailable for me. How I can access this option? I need generate a wave triangular assymmetric. 
    Thanks.
    Attachments:
    simulate signal.JPG ‏66 KB

    The dutiy cycle is only for square waves, i.e. a signal that only has two possible states (on or off). The duty cycle defines the percentage of the time the signal is on during each interval.
    In any of the other signal shapes, the amplitude is variable and the concept of a "duty cycle" makes no sense.. 
    LabVIEW Champion . Do more with less code and in less time .

  • I am working with the NI PCI-5411 AWG in arbitrary mode. How change the duty cycle of the square wave output located at the Sync connector by software?

    We use Labview 7.0 and NI fgen 2.1 in order to drive the pci card.Can you send me a VI example?

    Hi LtDel,
    To achieve this you will need to insert an niFgen property node from the niFgen functions palette into your code flow somewhere in amongst the configuration vi steps. Wire up the reference and error inputs and outputs. Left click on the "property" and select >>output attributes>>sync duty cycle high. Right click and set to "write" then wire in a control or constant defining the % duty cycle for the high phase.
    Hope this helps,
    Nick

  • Problem to measure 0% and 100% duty cycle of a PWM.

    Hi,
    I am using counters of USB-6341 to measure duty cycle of PWM just by following the example 'Meas Duty Cycle-Buffered-Finite.vi'. It works almost all the time. However, when the duty cycle of a input pwm is 0 or 100%, the DAQ can't read anything, in another word, it can't measure 0 or 100% duty cycle.
    How to modify that?
    Thank you very much :-)
    Nan

    That's the thing about PWMs, you never really know if the PWM is 0% or 100%.
    Let's say we have a 50% duty cycle, at 1/2Hz.  So low for 1 second, high for one second right?  What if we run at 1/20Hz, so low for 10 seconds high for 10 seconds.  Or is this a 0% duty cycle for 10 seconds, and a 100% for 10 seconds?
    A true PWM read will never be 0% or 100% it will just keep waiting until the trigger is seen, and recalculate the frequency and duty cycle of it.  The solution to your problem is for you to define a duration to watch for a change, and if one isn't seen, then you can define 0% or 100% appropriatly.
    So I would recommend taking your duty cycle like you normally are, and then at the same time watch the digital signal for however long you want, if the digital line does not change state, then output 0% if it is low and 100% if it is high and ignore what ever duty cycle you read.  But if the digital line does change state, then use the read duty cycle as the actual value.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • NI 5105 - Measure PWM Waveform Duty Cycle

    Will the Positive Duty Cycle scalar measurement in the NI-SCOPE software calculate duty cycle correctly on a PWM (pulse-width modulated) waveform?  I have a 400Hz signal that is pulse-width modulated with a 40Hz signal that I need to measure the duty cycle for.  Since this is not a normal, continuous waveform (like a sine wave or square wave) I don't know if the NI-SCOPE software will correctly calculate the Duty Cycle.  Has anyone tried this with success?  I am looking at using the NI-5105 because it has 8 channels, but am open to using other hardware and just multiplex my signals to the digitizer.

    The positive duty cycle scalar measurement should correctly calculate duty cycle on your pulse.  By default, the measurement finds the base and top of your waveform using a histogram of the Y values (there will be peaks in the histogram at the base and top values).  Duty cycle is calculated from the 50% level crossings between these two values.  You must have at least one complete cycle and only the first cycle is measured.
    If that doesn't work for you, there are a plethora of parameters you can change (except for which pulse you measure - it is always the first).  For example, you can set the upper, lower, and level crossing values to specific % or voltage levels.  See the documentation and examples for details.
    If you need to measure the duty cycle of multiple pulses in the same pulse train, there is a LabVIEW function (Pulse Measurements.vi) which allows you to do this.  It uses the same algorithms as the internal NI-SCOPE routines.
    In either case, the measurement is independent of the hardware.  Any NI-SCOPE device will work.  If you have any other questions, let us know.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • 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

  • Calculate Square wave Duty Cycle

    Hello everyone,
    I'm acquiring (with USB-6212) a square wave, "100Hz" with variable duty cycle - which can be 20%, 50% or 80% - for matters of decodification; the acquisition frequency is set to 4k. Actually, I said the frequency is 100Hz, because I get a rising edge every 10ms, but the length of the high level is defined by the communication protocol and that is what I called duty cycle (even though this does not match the exact definition of this property)
    Since I need to decode the information contained by the wave, it's necessary for me to be able to tell what the duty cycle is. I've acomplished this so far by taking the derivative of the signal, then calculating peaks and valleys index in the waveform and finally subtracting them, as shown below.
    It works ok almost the whole opeartion, however, the acquisition is not 100% exact. Sometimes I get the signal in the picture A, that is ideal for what I intended.
    Other times, the signal is like B and the derivative amplitude does not cross my threshold, even though there is a rising edge there. I could lower my threshold to 2, for instance, but then I'd get vulnerable to the signal in picture C, which would accuse 2 peaks, instead of just one.
    Anyone have an idea on how to work around this or any other method more reliable than taking the derivative of the signal?
    Solved!
    Go to Solution.

    Well, we can only answer question based on the information supplied!  The LabVIEW Mind Reading Toolkit is still in development.
    Your application is one where parallel loops may be valuable.  In the acquisition loop you read data from the data acquistion device at a rate which optimizes the DAQ perfomance (the >= 2k points you mentioned).  The data is transferred to an analysis loop via a queue. In the anaylsis loop you can put the data into a shift register.  When more data is available from the Acquisition loop, dequeue it and append it to the data in the shift register.  The Duty Cycle section will find two consecutive rising edges and the falling edge between them ( the 10 ms segment).  It calculates the duty cycle for that segment. Then it uses the second of the rising edges as the first rising edge for the next segment.  Repeat until duty cycles have been determined for all segments.
    There are a lot of details which can be imprortant in a process like this. Many of them are dependent on other things you have not specified.  What will be done with the duty cycle values? Is the raw data to be displayed? Saved to file? Discarded after the duty cycle is measured?  How long will the process continue?  How much data can accumulate?
    Lynn

  • Dynamic Duty Cycle Change for PWM

    Hello savvy LabView people out there!
    I am trying to do PWM for servo control using LabView.
    I have been able to manually move my servo with this: http://www.ni.com/white-paper/2991/en
    My goal is to automate the servo position as a sinuisoidal movement, and to do so,
    I need to automate the duty cycle to oscillate in 5%~10% automatically over time.
    I have looked into some stuff as:
    http://forums.ni.com/t5/Counter-Timer/PCI-6602-PWM-GENERATION-Dynamic-sine-duty-cycle/td-p/1522442
    But it was not too helpful, as I was also getting Error -200301.
    I want to be able to move the servo position at ~10Hz, if that is important, and the square wave freq. for the
    servo signal (PWM) has to be 50Hz.
    Any help? Thank you!
    Attached is what I am trying to do. The sine motion of the servo is (supposed to be) actually paired up with
    an analog output from a BNC-2120 board. The servo control part is separated on the top portion.
    Solved!
    Go to Solution.
    Attachments:
    ServoTest3.vi ‏110 KB

    Is something like this for the PWM look like what you had in mind?
    (see attached)
    This works, but I need something that responds faster.
    For example, the PWM needs to be at 50Hz, which means the loop delay should be able to
    go as low as 20ms
    In the picture, it is currently 200ms, and this does not run. I found that with 50Hz, the minimum
    delay that the Error 200301 doesn't pop up is with 500ms delay, at which point the
    accuracy of PWM duty cycle in each period is compromised.
    Is there a way to have the loop delay be as low as ~20ms?
    Attachments:
    Servo.jpg ‏52 KB

  • TO change the Duty Cycle(DAQmxSetCOPulseDutyCyc)

    I have an application that uses Pulse Width Modulation (PWM) to control the speed of a motor. Thus, it requires that I change the duty cycle of my square wave. My continuous pulse is being generated on the output of my counter. When I use the function "DAQmxSetCOPulseDutyCyc" to update the duty cycle when the task is run, the changes aren't reflected. What is the problem? thanks in advances!
    cinzia

    Masa-
    Kevin is correct. Unfortunately, there is little we can do to change this behavior in DAQmx. There are only two options:
    1) change which property updates the pulse train value, which would leave you with the same issue you are currently having if you have a situation where the frequency needs to change but not the duty cycle, or
    2) add a third property that would be a "switch" command. This option would add more work for users, as a third property would have to be called.
    One other thing you might trying using instead of the properties (assuming you are using DAQmx 7.2 or later) is the DAQmxWriteCtrFreqScalar() method. This write method added in DAQmx 7.2 allows you to update the frequency on-the-fly without having to use the properties.
    I
    hope this helps!
    gus....

  • Frquency & Duty cycle Value changes- every time

    Hello all
     im using pcie 6320 to measure the frequency and the duty cycle of a signal.i have attached my vi & the data measured for reference.The values highlighted in red ,is my actual frequency and duty cycle but values changes for every 1 sec.Please correct me if i have any mistake.
    Solved!
    Go to Solution.
    Attachments:
    measure frquency-duty.vi ‏54 KB
    HZ-DUTY.JPG ‏37 KB

    You'll need to enable digital filtering--insert the following property node into your code (call the property node before starting the task):
    Try a "Min Pulse Width" of a few us and increase it if you still are picking up incorrect readings.
    The errant numbers are coming from false edges being picked up during transitions, enabling digital filtering will cause the DAQ device to ignore any transitions with a pulse width of less than the set value.  Your 475 Hz 72% duty cycle signal should have a high time of about 1.52 ms and a low time of about .59 ms):
    656 Hz = ~1/(high time)
    1718 Hz = ~1/(low time)
    MHz values = multiple edges picked up during a single transition.
    Best Regards,
    John Passiak

  • Recreating duty calculations for PO for changed Net price of an item.

    Dear Friends,
    i am trying to simulate the duty values for a PO by calling the FM's in the below said order.
    it is working fine, when i am simply passing the actual value of the item via structure (gfl_komp) shown below.
    My requirement is like, i want to change the net price in the  item structure (gfl_komp) and recalculate based on the changed Net Price. But when i change the Net value, it is not getting reflected in the simulated value of FM 'Pricing_screen'.
    Is there anything i should pass to the  header structure (gfl_komk). Please help me out.
       CALL FUNCTION 'ME_FILL_KOMK_PO'
              EXPORTING
                i_ekko          = gfl_ekko
                i_ekpo          = gfl_ekpo_pass
               i_lfa1          = gfl_lfa1
                i_t001          = gfl_t001
               i_kalsm         = gfl_ekko-kalsm
               i_kappl         = 'M'
         I_EGIMP         = I_EGIMP
         I_LFM1          = I_LFM1
         I_T001W         = I_T001W
         I_TRTYP         = I_TRTYP
         I_WEDATEN       = I_WEDATEN
         I_KVORG         = I_KVORG
             IMPORTING
               e_komk          = gfl_komk
            CALL FUNCTION 'ME_FILL_KOMP_PO'
              EXPORTING
                i_ekpo                     = gfl_ekpo_pass
                i_t001w                    = gfl_t001w
                i_ekko                     = gfl_ekko
                i_komk                     = gfl_komk
           I_MT06E                    = I_MT06E
           I_EINE                     = I_EINE
           I_EINA                     = I_EINA
           I_PREISFINDUNGSMENGE       = I_PREISFINDUNGSMENGE
           I_UEBPO                    = I_UEBPO
             IMPORTING
               e_komp                     = gfl_komp
    Here i am trying to change the values of the actual PO values in gfl_komk and gfl_komp.
            CALL FUNCTION 'PRICING_SCREEN'
              EXPORTING
                comm_head_i            = gfl_komk
                comm_item_i            = gfl_komp
      COMM_TEXT              = ''
      DISPLAY_ONLY           = ''
      MATERIAL_TEXT          = ''
      TRTYP_I                = 'A'
      FPTYP_I                = ''
      CTRL_NO_DISPLAY        = CTRL_NO_DISPLAY
      REQUEST_POS1           = '-'
      REQUEST_POSM           = '-'
      REQUEST_POSP           = '-'
      REQUEST_POSL           = '-'
    IMPORTING
      COMM_HEAD_E            = COMM_HEAD_E
      COMM_ITEM_E            = COMM_ITEM_E
      CALCULATION_TYPE       = CALCULATION_TYPE
      FCODE_E                = FCODE_E
              TABLES
                tkomv                  = git_tkomv
      SVBAP                  = SVBAP
    CHANGING
      C_VFKOMV               = C_VFKOMV
        ENDCASE.
      ENDIF.
    Regards,
    Sandeep Sivan
    Edited by: sandeep sivan on Apr 13, 2010 11:32 AM
    Edited by: sandeep sivan on Apr 13, 2010 11:32 AM
    Edited by: sandeep sivan on Apr 13, 2010 11:37 AM
    Edited by: sandeep sivan on Apr 13, 2010 11:47 AM

    hi sirnivas..
    Thanq you for the points..these are the first i ever recieved..
    if you are working on peice of code which can get the price history do me a favour if you have finished the code just explain it to me who did u  do that...
    i have been working on an object from last two weeks to get the latest price...
    the thing is even though the price for condition items has been changed it wont get updated in the Sales orders unless new pricing fot the document is done...
    so i have to get all the sales orders who condition items price has been changed and display them in an ALV...so if you can get the exact old values...for the conditions i guess the opposite also can be done.....
    Here i have suggestion for you...in condition items there is a process called SCHEMA ( pricing Schema) which you can see using Condition Analysis button at the bottom of the condition item window...
    you can see all the price changes to the condition when you parse the tree structure of the procedure..EXAMPLE :- R0000 etc...
    so some Sales orders if the Schema has been changed all the existing condition are replaced by New ones from the changed Schema...so i guess that would play an important role in deciding the Price of Sales order...
    I know this is bit long but .....if you did finsish your program do let me know how you did it...
    Thankyou very much and good luck.

  • MacBook Pro duty cycle - can it be run at full CPU for extended time?

    Hello,
    I'm wondering if anyone knows Apple's stance on the duty-cycle of the MacBook Pro models. I'm should be receiving a MBP Core2Duo 2.16 GHz in a couple days.
    The reason I ask is that I currently have a PowerBook 1.33 GHz, and do a good deal of rendering of 3D computer graphics. On my PowerBook, when it is running under full load, the fan will come on for a while.. then turn off... then on for a while etc. It doesn't seem to have problems keeping the temp down unless the ambient temp of the room is high (say, above 80 F, 26C, which then is my fault and I need AC... lol, not computer design).
    I have had a few MacBook Pro units from work, and they work quite differently. The fan always runs... usually around 1k RPM, and then spools up to compensate for load. I have had two left fans go bad in 1.83 GHz Duo Core units (fairly early in production), and recently got a 2.33 GHz at work. I put it under full load tonight for a while, and the fans spun up to about 4k RPM (they seem to idle at 2k RPM). This kept the temp of the CPU to around 79 C... which is a bit higher than I like... but probably safe (and our room temp is fairly cool this time of year... about 70 F, 21 C).
    I'm wondering if it is safe to run a MBP like this for extended periods of time. I'm talking days here, 24x7... not just an hour or two. I have done this MANY times on my PowerBook G4 1.33... and it is probably like 3 years old or so now. Having those fans go out has just made me a bit gun shy I guess. Should I expect to be able to do this kind of thing with a 'Pro' laptop... or am I just running them too hard? Or, were there just a bad run of fans in the earlier MBPs?... it was always the left fan.
    -Steve

    Actually, I don't think 4,000 RPM is all that great,
    and the fans shouldn't have any trouble maintaining
    this speed indefinitely. 10k or more would be a
    different story.
    Of course, this is true only if the fans are designed
    (and built) properly. I can't speak to that.
    Yea, that's what I'm afraid of (fans not designed for that). It might be because I've actually witnessed a couple go bad... but I just don't think most of these tiny PC type fans can take it. Graphic card fans are notorious for going bad too. I'm less concerned with keeping the CPU temp down than I am with the high RPM on the fans actually.
    Regardless, you should be able to run your MBP "full
    bore" for as long as you like, and you needn't worry
    about it failing.
    I think you're correct... other than the fans. I'm guessing they will fail. If they did, the computer would probably just shut down. It probably wouldn't hurt anything, just need the fan replaced. But, I'd rather avoid that if I can. I suppose I could replace it myself to keep from having to send it away for a week or two.
    There is one thing, however, that
    most people do not consider, and which will help more
    than anything else (maybe even room temp): Keep the
    air around your MBP moving!
    Bingo! Great lead. I guess I knew this but didn't think of how big of difference it really would make. So, I did some experimenting.
    I brought up my trusty iStat Nano Dashboard widget so I could see the fan speed. Then I took a folder and fanned the computer for a couple minutes. Just this amount of air movement dropped the RPM from around 4600 (for some odd reason, my 2.16 runs at higher RPM than my 2.33, and keeps the CPU a couple degrees cooler) down to 2800. WOW!
    Then my arm got tired, and I went to get a rather powerful fan I could fit on my desk (one of Honeywell vortex type fans), and then it dropped to 2200 RPM. This fan is WAY to noisy, but my folder experiment demonstrated I don't need all that much air movement... just like you said.
    I think I'm going to go tomorrow and get either a couple of small fans, or maybe even some low noise computer fans and experiment with some ways of mounting them. I should be able to keep it down in the mid-2500 RPM range and still be quiet if I get the right setup.
    Also, I think you can safely disregard what your
    "overclocking" friends have to say. True, 100 C is
    quite hot, and would certainly be too hot for earlier
    processors. The Core Duo, however, is an entirely
    different beast, and Intel has designed it to run
    that hot. I think your friends are probably
    (inappropriately) applying specs for earlier
    processors to the Core Duo.
    I checked the Intel specs on the Core2Duo, and it has an operating max of 100 C. It some kind of actual hardware failure type shutdown at 120 C. So, I guess 80 C is hot, but 20 C under the max operating temp. I'm sure Apple designed it to keep that temp safe, so I guess they just vary the fans to keep it under 80 C the way it looks.
    Thanks much... that tip will solve my issue!
    -Steve

  • How can I measure a 0% or 100% duty cycle signal ?

    I want to measure the duty cycle of an input signal using a counter of a 6030-E board.
    I work with a PXI Rack under Labwindows/CVI.
    My program already works properly for duty cycle between 1% and 99%, but it is not able to detect 0% duty cycle (ie : signal to ground), nor 100% duty cycle (ie : signal to power supply).
    The problem is I don't understand how the counter works in such a situation (it cannot detect any edge, as long as the signal is continuous 0V or continuous 12V).
    Please have a look on the following code :
    1- First, the counter is configured
    // Reset Compteur
    i_Status = GPCTR_Control(iDevice, iCptID, ND_RESET);
    //Definition du type de mesure du compteur (mesure temps impulsion)
    i_Status = GPCTR_Set_Application (iDevice, iCptID, ND_SIMPLE_PULSE_WIDTH_MSR);
    //Definition de la vitesse d'echantillonage (20 Mhz)
    i_Status = GPCTR_Change_Parameter(iDevice, iCptID, ND_SOURCE, ND_INTERNAL_20_MHZ);
    //Definition du signal a mesurer (defaut)
    i_Status = GPCTR_Change_Parameter (iDevice, iCptID, ND_GATE, ND_DEFAULT_PFI_LINE);
    // initialisation du compteur
    i_Status = GPCTR_Change_Parameter(iDevice, iCptID, ND_INITIAL_COUNT, 0);
    // Preparation du compteur avant de l'armer
    i_Status = GPCTR_Control (iDevice, iCptID, ND_PREPARE);
    2- Then, every 10 ms, the value of the counter is read, so that I can calculate the duty cycle...
    i_Status = GPCTR_Watch(iDevice, iCptID, ND_COUNT, ul_val_cpt);
    3- ...and the counter is armed again for the next reading
    i_Status = GPCTR_Control(iDevice, iCptID, ND_ARM);
    When duty cycle changes from x% to 0% or 100%, the counter always keep the value corresponding to x%.
    Even if I reset the counter between each measurement, it keeps this value ! I don't understand how it is possible.
    How can I know that the counter didn't see any edge, and so that duty cycle is 0% or 100% ?
    Thank you in advance for your help !
    FraB

    Hi,
    Just have a look at this link, it can be interesting for you...
    http://forums.ni.com/ni/board/message?board.id=40&message.id=2161&requireLogin=False
    Regards
    DD

Maybe you are looking for

  • Messages app won't sync on one computer

    Dear Community, I'm having problems with the Messages App on one of my 2 Business Computers. I do use a Mac Pro at work as well as one in my home office. Both are similar, running the latest version of Mavericks and do have the Messages App configure

  • I can't find my external hard drive on my imac.  Any ideas?

    Whatever I do I can't seem to locate my external hard drive to back up my files.   If anybody has any ideas it would be much appreciated.

  • Error in cost calculation

    Hi, when i am going to release an order then system status CSER becomes active.The message comes as error occurred during budget check see cost protocol with message no. IW079 and thus save is being rejected by the system.The system is proposing diag

  • Ms Access & Java

    Hi Do you people have good URLs where they explain how to connect MS Access properly with Java? I need also some help to execute the updates from the database with Java and to get the data from database to use in java, preferably with good examples.

  • Recursive tree issue

    Hello! I have made a view object with self referencing view link, dropped the data control onto page, added a rule, chosen attributes. It works fine, but the tree initially displays all the table rows, since the tree uses a single view object and que