PWM with Duty Ration on three LED's - driven in sequence

Hello
I write an example of fade-out and fade-in for single LED. A hardware clock which is routed to DO is used. The Diode will constantly fade-out and fade–in where steps and times can be adjusted. For single LED this works perfect. An M or X series DAQ is predicted (USB M 6251 or USB X 6351)
The problem is that in real application (User Interface (UI) with LCD) a three LED’s will be used, which are connected on three lines and only one LED is active at a time (to reduce the cables two LED’s are connected in opposite direction).  PWM frequency will be 1 kHz and each 10 ms next LED is active (cyclic trough LED each 10 ms:  LED1, LED2, LED3, LED1, LED2, ………….    ……). Schematic is attached and is fixed (also some pushbuttons are connected but they are not relevant at the moment).
Could you give me some hint or similar example how to transform/multiply this functionality (PWM with Duty ration) to three LED’s (which are works in sequence) with hardware clock of 1 kHz. Timing must be precise, since user should not detect any flickering on UI.
Attachments:
3x_PWM_cyclic_V1.vi ‏40 KB
Schematics_3xLED.PNG ‏26 KB

Dear RomanP,
I'd recomend using the X series device for this application, since the STC-3 timing chip enables you to use buffered pulse trains. The idea is that you can use a FIFOto store duty cycle information for every single PWM pulse. The device will use one sample to generate one pulse, then continue on to the next one. This allows you to have three counters working at the sae time with the same clock source, but with a different pwm data (one will always do the fade-in, fade-out routine, the other two can generate a 0 duty cycle signal).
Here's a community example you can start to work with. Let me know if you have something else in mind.
Kind regards:
Andrew Valko
National Instruments Hungary

Similar Messages

  • Read duty cycle of a PWM with DAQ

    Hi,
    I am doing a test system and I have several signals that control motors. They use PWM with a max frequency of 5 kHz.
    I would like to know if with a USB DAQ or a PCI DAQ for example PCI-DIO96 could I meassure the duty cycle of these PWM signals. I mean I need to meassure with 10kHz at least.
    Which are the read frequency of these systems?
    Due to the high number of I/O to test I am also thinking of using Compact-RIO with different I/O modules. What do you think?
    Thanks in advance

    If your PWM frequency is 5 kHz and you want to measure duty cycle to 1%, then you need timing resolution of 2 microseconds or faster.
    The USB-6343 has hardware timed DIO at up to 1MHz, so it might be suitable.  There are other devices with hardware timed DIO at rates of 10 MHz or faster as well.
    Before you buy, determine how often you need to measure the duty cycle to make sure the data transfer can keep up.  USB can sometimes be a bottleneck.
    Lynn

  • How can I vary a PWM´s duty cycle inside a while loop?

    Hi,
    I'm using the "Generate Pulse Train.vi" to generate pwm signals in counters 0 and 1 in order to drive a DC motor both ways.
    The problem is, I need to control the movement of the dc motor with my PI controller which is inside a while loop. I've tried letting the "generate pulse train.vi" outside the while loop, but the problem is, it only changes the value of the duty cycle when the loop is stopped. I also tried putting it inside the loop, but then it doesn't even work.
    So, how can I vary a PWM´s duty cycle inside a while loop?
    I'm attaching the VI with the PI controller.
    Thanks for your help!
    Guilherme
    Attachments:
    controleValvula.vi ‏332 KB

    Here's some code I threw together a while back to change a duty cycle on the fly. It generates a fixed 5KHz or 25KHz frequency depending on laser selection, then allows duty cycle to be changed continously. Maybe you can use the premise of it for your application.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    "It’s the questions that drive us.”
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    Attachments:
    Pulse_Width_Modulator.llb ‏197 KB

  • Generate two alternating PWMs with one counter of 6025E

    I am using LabView 6.0.2 with a PCI-6025E card. My requirement are to put out a pwm signal with 250Hz. The problem is, that for example, first a PWM with exact 100 pulses of duty cycle 1% is needed, after that exact 5 pulses of 10% duty cycle. These two PWMs are repetetive without any big pauses between. I tried this with Pulse Train Generation with "Changing Pulse Specs.llb" from the ni libraries, but the PC based on windows is not able, to do the PWM changes in these exact time slots. Note: The second timer of the card is used for another item.

    Unfortunately, you won't be able to do exactly what you want with a single counter. You'll need to use additional hardware. Here are some possibilities:
    1. Analog Output:
    A 1% duty cycle at 250 Hz requires a minimum of 25 kHz update rate, but your 6025E only goes up to 10 kHz. Your board is also limited by having only 1 DMA channel for Data acq buffered operations, and it may already by used by your other counter's operation.
    If you had an analog board with faster output, you could try to create a buffer with 0 V and 5 V values representing the desired finite pulse train. However, if the device you're controlling with PWM requires TTL edges, the rise and fall times of your DAC output may still not be fast enough to fool it.
    2.
    PCI-6601/6602 Counter/Timer:
    You could use two counters from a 6601 to generate the finite pulse trains you describe, but there would need to be a pause between the the two duty cycles. The pause is where your software detects the end of one finite pulse train and reprograms the counters to generate the other one. The pause might likely vary from 10 to 100 or more msec.
    If that variable dead time between pause trains is acceptable, the 6601 is the cheapest solution I know of for today's application. If you need reuse for future apps, you might want to consider the 6602 for double the price, but a bit more than double the capability.
    3. PCI-6533/6534:
    NI's timed digital boards would allow you to define the pulse trains as a one-bit digital pattern that you could generate continuously. I suspect the 6533 would suffice for the app you describe.
    Please double-check these hw suggestions with your local rep before ordering. (S)he'll know more than me about
    your present-day app and potential future needs. Good luck!
    -Kevin P.

  • PWM with CompactDAQ 9174 on a DO-Module

    Hi all
    We did a regulation of peltier elements with PWM with a cRio over FPGA on a DO-Module 9477.
    We have now a small project with a CompactDAQ 9174 where we would like to regulate such peltier elements. The Frequenze should be at least 5 kHz.
    As I found in the forum and the examples, with the intern counter/timer of the cDAQ9174, it is possible to generate a digital pulse train and with the duty cycle  also a PWM.
    e.g.:
    http://forums.ni.com/t5/Counter-Timer/Counter-Output-with-NI-cDAQ-9188/m-p/2218208#M10898
    http://digital.ni.com/public.nsf/allkb/ADFC4DD8C9690232862575B70079FBD4
    What I could not found, is a way to get a generatet PWM-signal out of the intern cDAQ to a DO-Module (S-Serie) such as NI7477. And I do not see the way to do it.
    I have to mention, that I'm not a top-programmer, and I'm sure, that there is somone out there, who already has done this.
    Thanks in advance for help
    Hannes Wydler

    Hi Abduelkerim
    Thanks for replaying
    As far as I see, the forum discussion you mention, talks about measure PWM (Digital IN).
    I found an other forum input (how to pwm out on NI-9477):
    http://forums.ni.com/t5/Digital-I-O/how-to-pwm-out-on-NI-9477/td-p/624448
    There Application engineer Samantha says, the NI9477 is not a "corelated" digital module and therefor it cannot link to the backplane counter of the cDaq. Others DO-modules could do that (like 9401).
    But what we need is the high power of the 9477 (1 Amp per channel - I would connect 3 outputs together for my need of 2.5 Amps).
    I don't find in the specifications of the different DO-modules if they are "corelated" modules.
    It seems, it's not possible what I want to do - a simple direct mode with the cDAQ to supply and regulate peltier elements.
    Hannes

  • Directly control three LEDs based on USB or firewire port in laptop

    As USB or Firewire interface is popular gradually, I attempt to control three LEDs through the USB or Firewire port in a laptop. The power can be provided through the interface or extra device. It's a very simple experiment, but I don't know how I can do this. Are there any solvements from NI? If not, what kind of development tools do I need for this object? Thanks in advance!

    Paris,
    National Instruments offers USB digital I/O devices that should work for this application. I have included links to these product pages below:
    DAQPad-6508
    DAQPad-6507
    Since you only need to control three LEDs, you may want to also consider one of National Instruments FireWire multifunction DAQ devices. Besides eight digital I/O channels, they also include analog input, analog output, and counter functionality. I have also included links to these product pages below:
    NI DAQPad-6070E for FireWire
    NI DAQPad-6052E for FireWire
    Good luck with your application.
    Spencer S.

  • Icon with think veticall line & three horizontal lines flashing green

    icon with thick veticall line & three horizontal lines flashing green, what is the problem????

    Thanks.
    In the meantime I was looking more carefuly into some clips with horizontal lines (fences etc.)
    You are right playback with full resolution takes care of most of the problem.
    Thank you once again.
    arikw

  • Subcontracting cycle with duty payment

    Hi,
    Configration required for subcontracting cycle with duty payment (CIN) with suitable example giving detailed cycle with sap tcodes & transaction data.
    Sanjay kohli

    Plz follow the following steps for subcontracting
    Configuration: -
    - SPRO > Logistics - General > Tax on Goods Movements > India > Business Transactions > Subcontracting > Subcontracting Attributes
    Here maintain following;
    Excise Group
    Excise TT - 57FC
    Subtran Type Text   -- 57FC CHALLAN
    Subc. Period          -- 180
    1. Creation of Subcontracting PO (ME21N)
    2. Transfer Posting of Components to Subcontractor (Mvmt Type - 541) (MB1B/ME2O/MIGO)
    3. Creation of Subcontracting Challan w.r.t. Transfer Posting Doc (J1IF01)
    4 Goods Receipt w.r.t. Subcontracting PO and Refer Subcontracting Challan at the time of GR (MIGO) {GR with 101 and autoconsumption of components with 543 movement
    5 Reconciliation of Subcontracting Challan (J1IFQ)
    6 Completion of Subcontracting Challan (J1IF13)
    7Generation of Annexure IV (J1IFR)
    And you i need to maintain Accessable value in J1ID
    regards
    anamika

  • Measure PWM with CRIO Module 9403

    Hi,
    I'm trying to measure a PWM signal generated by an absolute encoder. The encoder outputs a PWM with a period of approximately 1000 microseconds. This correlates to about 0.4 deg/microsecond.
    When I run an FPGA code that has a counter that counts ticks while the PWM is high, the counter takes approximately 265 ticks per loop (and increases when other I/O readings are made) - according to the benchmark timer I've incorporated into the code. This means that the loop requires about 6-7 microseconds to take a reading from the DIO. This correlates to a couple of degrees in resolution which is not a good enough for our application to read from the encoder. 
    Is there any way to increase the speed of the FPGA? I've included a screenshot of the FPGA code as well as the project containing the test VI.
    Attachments:
    fpgaproblem.jpg ‏65 KB
    testfpga.zip ‏21 KB

    Hello NIo33,
    Have you benchmark the rate at which the PWM signal is coming in from the NI 9403 module? What type resolution are you trying to achieve? I do not see to many ways to pipeline your FPGA code.
    Paul-B
    Applications Engineer
    National Instruments

  • PWM with a SCXI-1200

    I need to generate a PWM signal with a SCXI-1200 connected to a SCXI-1000 chassis. Any ideas of how to do it? I have a routine to generate a PWM to the PCI-6035E, but not for the SCXI.
    Thank you,
    Guilherme

    Guilherme;
    You can't do PWM with the counter that is on that module. There is only one register on the SCXI-1200 counter. Everything would be very glitchy and ill-timed.
    In case you need to do that on SCXI, you will need a SCXI-1180 feedthrough module. That module allows one to access the unused counters of the DAQ device that controls the SCXI chassis.
    Regards
    Filipe A.
    Applications Engineer
    National Instruments

  • Eclipse with Jazz (Rational Team Concert) - Best References for Study?

    My employer has bought a C/C++ application codebase from a contractor which does not use Eclipse as part of its development picture. Basically a big /src tree organized for building with Autotools, with a few top-level build scripts masking some of the Autotools complexity for ignorant bystanders.
    Developers for the project team I'm on have been using Eclipse as our main IDE for 3-4 years now.
    TL;DR only for editing the Java code which was part of the old application we're now moving away from (a mix of Java/JNI wrapping some very old C/C++ code, built and installed using lots of proprietary UNIX script).
    So: none of us are sophisticated Eclipse users, but we do want to pull our new C/C+ code into Eclipse and use more of its ability to support building and debugging. We've had some success setting up the code within Eclipse as an Autotools project...but what is currently causing grief, is that the project is also moving to Jazz / RTC (Formal) for CM. None of us understand how the code can/should/must be organized within the RTC repository, or within our local workspaces (Eclipse workspace, or Jazz workspace/repository/sandbox), so that when we look to pull multiple copies of it into our development boxes to support our usual average of 2-3 different work items each (a) we can get it downloaded within Eclipse in a usable form (properly configured project) (b) we can get our change sets delivered back, without having to adopt all sorts of highly error-prone workarounds to avoid delivering project-specific settings that aren't part of the codebase as conceived by CM right now. Right now, that's code being held as close as possible to the contractor's delivered (non-Eclipse) package.
    We do gather that Jazz/RTC is meant to work with Eclipse.
    My question is, can anyone recommend a good reference for figuring out how to get this working with a minimum of Eclipse-project pain?

    Sounds like
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=283196
    Further discussions on this should go to the eclipse.webtools newsgroup.
    Markus
    On 2009-09-03 19:10, [email protected] wrote:
    > Hi everybody.
    >
    > This is my first visit to the forum, so please forgive me if this
    > question is in the wrong place.
    >
    > I am having a psychotically annoying problem with eclipse right now.
    >
    > I'm using Eclipse Build ID 20090621-0832
    > with IBM Rational Team Concert Build ID I20090618-1753
    >
    > Now, every so often, Eclipse will freeze on the splash screen when
    > attempting to load my workspace.
    >
    > It will freeze when it goes to load
    > org.eclipse.wst.common.modulecore
    >
    > I have searched around for a while, and can't find anyone else who has
    > had this problem. I also have ABSOLUTELY no clue what causes this issue.
    >
    > I'll reinstall Eclipse and Team Concert from scratch, make a repository
    > connection, pull down my code, and start working. Works great. At the
    > end of the day, I'll shut down, and the next day, everything loads just
    > fine. Then, a couple days later, seemingly out of the blue, I'll start
    > Eclipse when I get to work in the morning and it will just randomly
    > freeze when loading this module.
    >
    > The Eclipse console shows nothing.
    >
    > So far this week, I've wasted over 5 solid hours at work reinstalling
    > eclipse. Does anybody have any ideas about this? Perhaps I'm in the
    > wrong forum? Maybe this has something to do with my plugins? Maybe I
    > should be on the Team Concert forums?
    >
    > Help!! Please!!

  • How to realize the other three events triggered by a sequence of events occurs?

    How to realize the other three events triggered by a sequence of events that occurs between Labview, and the time interval between three events for the 50ms?
    1110340053

    Are you another student who feels the need to post their "student ID" number as a part of the message?  There is really no need to do that, it is meaningless to us.
    You should ask your instructor to answer your questions rather than allowing them to turn the whole class of students loose on the forums usually asking the same identical question.
    At least in your case, the question is different from most we've seen.  Unfortunately, you haven't asked a clear enough question for us to understand what you are talking about.
    What "events" are you talking about?  Post a VI that demonstrates the code that you have written so far.

  • How to generate a pwm whose duty cycle has to be varied depending on the frequency of the input trigger??

    Sir/madam,
    I am quite new to the Labview FPGA module. 
    I am currently working on an application where i have to generate a pwm to control the ON time duration . The pwm ON time depends on the frequency of an input signal.I want to retrieve the ON time value from a lookup table which contain the duty cycle values for the pwm at different frequencies of the input.This input also has to work as a trigger. The input is pulsed and the trigger has to generate the pwm at every rising edge. I am using a PCI 7831R-  RIO series. I am urgently in need of some help and i have hardly a  couple of weeks before i meet the deadline.
    I am trying hard to learn the basics from the shipping examples but not able to quite make my vi work. 
    Kindly lend a helping hand and i would be very grateful to anybody who can help. Thanks a lot in advance.
    Do ask in case of any clarifications required. I  think i have explained my problem quite well. 

    Hello Manu,
    You can refer 
    Developing a PWM Interface using LabVIEW FPGA or PWM Output with LabVIEW FPGA
    How this helps.
    Best Regards, 
    Hardik Asawa
    AE
    National Instruments  
    Message Edited by Hardik Asawa on 05-05-2010 12:46 AM

  • Streaming problems with C7000 40 inches samsung led tv for netflix and utube

    hi
    i have led 40 inch c7000 samsung tv. first 3 days i dont have any issues for netflix and utube streaming.
    after three days problems started for streaming. intermittently disconnecting .
    i thought it is problem with wireless router and i bought linksys E3000 series  wireless router but still the problem exists.
    please let me know is there any problem with tv

    Is it disconnecting or buffering (where it has to wait for the stream to catch up)?  If it is buffereing it may have to do with time of day and what source you are using.  I was playing around with Amazon Video on Demand Saturday night and while trying to watch an HD preview there was a lot of buffereing going on, when we rented a movie today (Sunday early afternoon) the movie didn't buffer once.  In doing some research on various video on demand services it appears some of them have streaming issues based on time of day (Friday and Saturday nights).  There could also be an issue with your internet service provider.  Depending on what level of service you have your connect speed may not be fast enough so that at times it works, but when their network is busy they throttle your connection speed down and you get buffering.
    If you were watching over this past weekend, there were probably a lot of people firing up their new TV's/blu ray players and streaming video (Amazon and Vudu are both handing out credits for new subscribers) which could have slowed things down.
    Do you have a computer hooked up wirelessly to the router?  If you do Vudu has a speed test website (google "Vudu speed test") that does an extended download which will give you a good idea of your average download speed.  When I have tried it at different times of the day it has given different results.  Vudu also has info on what speeds you need for different qualities of video streaming.
    Henry

  • 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.

Maybe you are looking for