LabVIEW FPGA PMW modulation for L298n H-bridge

Hello to everyone,
I am new in LabVIEW FPGA programing and I have a couple questions, so I would be grateful if you could answer me. For my final work I have to control the speed and direction  of DC motor  using sb-RIO 9636 and H-bridge L298n. In attachments you can find scheme of the H- bridge and my program. I have conected In1(pin 5 of L298n) to digital pin 1 of the card, In2(pin 7 of L298n) to digital pin 2 of the card and changing the state of the pin I change the direction of the motor(I know that the one In should be Low and the other High so the motor can rotate  in one or the other direction). PWM(Enable pin of the L298n pin 6) I have conected to DIO3.
PWM signal I cretaed is  shown in picture.
My questions are:
1.Will loop timer I used, provide that period of signal is lenght I specify in the control(for example if I put 20 000  will the period be 20000 s)?
2. Can I vary the duty cycle changing the control Waiting (DIO3 is HIGH for a couple of us, then it sets LOW, and then all that repeats )?
3. Earlier I thaugt that PWM signal I should send in both IN1 and IN2, and that the Enable pin is used to stop or start the motor. I tried that and the motor was rotating different speed, and I could stop or star the motor with enable pin, sending it HIGH OR LOW, but I could not change the direction of the motor. So my other option was to conect the pins as I explained at the begining.  My question is: Should I PWM conect to the enable pin, and will thah work?
Thank you

I found a couple of resources that deal with PWM on the FPGA and motor control - they might be helpful to reference as you look for answers to your questions.
Developing a PWM Interface using LabVIEW FPGA
http://www.ni.com/white-paper/3254/en/
CompactRIO Motor Control Basics Tutorial
http://www.ni.com/pdf/labview/us/compactrio_motor_control_basics.pdf
PWM Output With LabVIEW FPGA
http://www.ni.com/example/26499/en/

Similar Messages

  • Is Ardence RTX required when I use PCI-7831R with labview real-time module for RTX target

    I am new in the labview real-time field. I want to use labview real-time module for RTX target on only one desktop. My card is PCI-78331R.  Is Ardence RTX necessary? Why I cannot find my card in the MAX after I configured the RTX?
    Thank you very much.

    Hi Ziaozhongda,
    You must have the RTX runtime engine installed before the LabVIEW Real-Time RTX module will install.  Additionally, you should follow the instructions in the "Using the NI PCI-7831R with the LabVIEW Real-Time Module for RTX" section of Getting Started with the NI 7831R (page 8).
    Please see Configuring Hardware for Use with RTX.
    Also useful is "How Can I Validate That My PC Will Run RTX?

  • LabVIEW Touch Panel Module for Linux

    Hi,
    Does NI released Touch Panel Module for Linux?
    Thanks,
    Ali

    Hi Dennis,
    Here is the article I read about LabVIEW Embedded Development Module. Page 1-1, "Taking Your Graphical Design to Any 32-Bit Microprocessor".
    http://www.ni.com/pdf/manuals/371233b.pdf
    About the topic you are right. I have the VI on Windows XP. I converted it to WinCE 5.0 with LabVIEW Touch Panel Module and it works perfectly. I have LabVIEW for Linux and I converted the VI to Linux and it works on PC. Now, I want to convert it to Embedded Linux that works on ARM microcontroller.
    I am looking for LabVIEW Touch Panel Module for Linux because the only supported platform for that is Windows.
    http://www.ni.com/support/labview/lvtool.htm#touch
    Thanks,
    Ali

  • 64 bit LabVIEW FPGA 2009 driver for Xilinx SPARTAN 3E Starter Board

    dear i need this module
    we i install the module that i hava this appear to me
    LabVIEW Support for Spartan-3E (incompatible with 64-bit platform)
    is thier a version to supprt  64 bit???
    best regards
    hi ?Q>
    Solved!
    Go to Solution.

    bad news
    i will use Virtual machine to solve the problem
    bet regads
    hi ?Q>

  • LabVIEW FPGA driver for Xilinx SPARTAN 3E Starter Board

    i need drivers for spartan 3E .

    If you are at a university that has a site license for the FPGA module, the following might be of interest to you:
    Using LabVIEW FPGA with the Xilinx SPARTAN-3E XUP Starter Kit
    See also this discussion.
    Quote from the license agreement:
    ...INSTALLATION AND USE OF THE LABVIEW FPGA TARGET MODULE FOR THE XILINX SPARTAN-3E STARTER BOARD (THE “TARGET MODULE”) IS LIMITED TO ACADEMIC INSTITUTIONS THAT HAVE A VALID, CURRENT “ACADEMIC TEACHING LICENSE” FROM NATIONAL INSTRUMENTS FOR THE LABVIEW FPGA MODULE. THIS TARGET MODULE MAY ONLY BE USED FOR INSTRUCTIONAL PURPOSES, SUBJECT TO THE TERMS AND CONDITIONS OF THE NATIONAL INSTRUMENTS SOFTWARE LICENSE AGREEMENT THAT ACCOMPANIES THE SOFTWARE...
    LabVIEW Champion . Do more with less code and in less time .

  • Need SPARTAN 3E board Driver for Labview FPGA 8.5 !!!!!! Thx

     HI!!I need the spartan 3e driver for labview 8.5(not for labview 8.6) for school useI try to download it from ftp://ftp.ni.com/outgoing/NISPARTAN3ELV85.zip
    but this link is dead now. Could somebody send this driver to [email protected] PLZ? Thank you a lot for all in advance
    Solved!
    Go to Solution.

    Hello,
    I'm looking for same (Labview FPGA 8.5 for Spartan 3E). But it isn't available on related url now. I'll be glad if someone can help to find driver.
    Best regards, 

  • Labview fpga with nexys 2

    hi my friends I want to know I can use labview FPGA with nexys 2 and there are some device about this FPGA (nexys 2) because we have this circuit board and we want to do the project with labview you can found some information about nexys 2 in this file and thank you for your help
    Attachments:
    Nexys2_rm.pdf ‏986 KB

    Hello,
    As this forum thread states, LabVIEW FPGA is only for the SPARTAN-3E XUP Starter Board and NI Reconfigurable I/O devices. Even though the nexys 2 is based from the Spartan 3E, we can’t be sure that the driver that we release for the Spartan 3E starter board works for the nexys 2.
    Regards,
    Daniel REDS
    RF Systems Engineer
    Help us grow.
    If a post solves your question, mark it as The Solution.
    If a post helps, give Kudos to it.

  • How do I install Labview 64 bit support for the labview fpga module?

    see subject.

    Hi,
    The LabVIEW FPGA Module uses the 32-bit version of the Xilinx tools, even on the 64-bit OS.
    There is no 64 bit version of LabVIEW FPGA and you must have LabVIEW 32 bit
    installed on your 64-bit machine to use the compatible version of
    LabVIEW FPGA.
    NI LabVIEW FPGA Module will run within the 32-bit emulation layer, Windows on Windows (WOW64).
    regards,
    Houssam Kassri
    NI Germany

  • How can I install (download) a Labview FPGA code onto Altera FPGA chip using Labview FPGA module?

    Hi there
    Guys i'm a very new labview user (PhD student), my project is about ( design and implementation of a high speed-yet sophisticated system using Labview environment then install this project's code (using Labview FPGA module) onto Altera-made FPGA chip).
    so kindly, can any body help me in this?...is there any way to connect labview with Altera FPGA?...please anything would be said 'd be of great benifits
    thanks a lot in advance.

    as previously mentioned, labview fpga only supports national instruments targets utilizing xilinx fpgas. the hdl generated by labview fpga is encrypted and cannot be used to synthesize a design outside the labview fpga design flow. 
    however, if you must use labview for your project, it might be possible for you to design the system in labview and use one of the labview embedded modules ( http://www.ni.com/embedded )to generate c code which you can then port to systemc and compile for the altera fpga. i'm not saying it will be easy, but it should be possible. 

  • Labview FPGA for beginners.

    Hello.
    I have no idea what labview is and how to work with this. I have had some experience with Xilinx 12.1 EDK (microblaze and VHDL).
    I tried to install labview and labview fpga module. It asked for some drivers and I continued, the program said that it will ask for the drivers later.
    But, beside that, do you have any training flow to suggest? Should I start with labview or is it not necessary? After that, should I start with CVI or FPGA? I am confused. Any help is welcomed!
    Thanks,
    Bill.

    See this video's to get start with labVIEW and more video's you can find in youtube. Also, get in touch with forum especially about FPGA questions or read the history question targeting to your design area.
    http://zone.ni.com/devzone/cda/tut/p/id/7466
    I never use FPGA codes or concepts in labVIEW but I am looking to learn now.

  • Can LabView FPGA module work with non-NI FPGAs?

    Simple Question: Can the LabView FPGA Module work with other FPGAs? Im assuming yes, but id like ot make sure first. Normaly I go with NI for most of my stuff, but they just are lacking in the FPGA hardware for what I need, but Im accustumed to LabView so I would like to stick with that to program it.
    Thanks!
    -Mark

    Using LabVIEW and LabVIEW RT you can access the registers on any PCI/PXI card using the NI-VISA driver. NI-VISA also allows you to handle interrupts and DMA data. For interrupts you will not actually write an interrupt service routine (ISR) in LabVIEW. Instead the VISA driver will acknowledge the interrupt to the card and then pass a VISA event to the LabVIEW application letting the application know that it needs to process the interrupt. Detailed information about this type of programming is available in the following documents.
    Using the VISA Driver Development Wizard and NI-VISA to Register-Level Program a PXI/PCI Device unde...
    Configuring LabVIEW Real-Time and NI-VISA to Recognize a Third Party Device
    Configuring LabVIEW Real...
    Developing a LabVIEW Real-Time Driver for a PXI or Compact PCI Device
    Porting a Windows PCI Device Driver to LabVIEW Real-Time
    Considerations in Implementing LabVIEW Real-Time Drivers
    Christian L
    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

  • LabVIEW FPGA: An internal software error in the LabVIEW FPGA Module has occurred

    Hi,
    I am trying to build a LabView FPGA VI. During compilation, I always get error stating "LabVIEW FPGA:  An internal software error in the LabVIEW FPGA Module has occurred.  Please contact National Instruments technical support at ni.com/support".  At the time, comiplation process is almost at the end.  "Final Timing (place and route)" shows as completed. When Checked the Xilinx log session, at the end it states that "  Process "Generate Programming File" completed successfully". However, I do not see any generated bitfile.
    When clicked on error details, it shows following: 
    LabVIEW: An unknown error occurred.
    Error -2629 occurred at Error occurred while loading XML string. Invoke Node in niFpgaXml_PrettyPrint.vi->niFpgaWriteBitfileXml_Core.vi->niFpgaCompileWorker_CreateBitfile.vi->niFpgaCompileWorker_JobComplete.vi->niFpgaCompile_Worker.vi:6460001
    Possible reason(s):
    LabVIEW: An unknown error occurred.
    I tried multiple times but so far no luck to generate bitfile for this VI.  What could be wrong here?
    I am using Labview 2013

    Hi Mark,
    Here is the device utilization Summary. My development system is running with Windows-7 (32 bit) with 3GB RAM and Labview 2013. 
    Device Utilization
    Total Slices: 90.0% (11970 out of 13300)
    Slice Registers: 40.7% (43258 out of 106400)
    Slice LUTs: 71.6% (38103 out of 53200)
    DSP48s: 1.4% (3 out of 220)
    Block RAMs: 22.1% (31 out of 140)
    Timing
    40 MHz Onboard Clock
    : 40.00 MHz (57.90 MHz maximum)
    80MHz (Used by non-diagram components)
    : 80.00 MHz (100.19 MHz maximum)
    --WillsG

  • Labview 2010 Student Edition, will it work with the Labview FPGA module and Xilinx Spartan 3E??

    Just as the title states.
    I did a search here on compatibility, but I am coming up short with not much to show for it.
    I have Labview 2010 student edition, 32bit and 64 bit. I am trying to do a Senior Design project for my undergrad, and I am having some issues.
    I was able to download the Support for the Xilinx Spartan 3E and Labview FPGA.
    I install it, it runs through the unzipping process, installs, and then mysteriously I cannot find it. I have looked through my programs list and it is not listed. I open both editions of LabView and I find ABSOLUTELY NOTHING indicating that either one has ANYTHING to do with FPGA.
    Did I install it wrong? Or is it just not supported in the studend version of Labview???
    Can someone help me, please?

    M Boat wrote:
    What about the trial version? Any chance of it being on there?
    I think everything is available for download, and without activation it will be in trial mode and you have about a month (?) before the trial expires.
    A trial version of the FPGA module is available for download here. I have no idea if it would work with the student version.
    I would recommend to talk to your local NI sales representative for advice. Good luck.
    LabVIEW Champion . Do more with less code and in less time .

  • Implementing Differential Equations using Labview fpga modules on PXI-7811R

    Dear,
        I am working on   implementing dynamic systems modeled ordinary  differential equations on PXI-7811R FPGA using labview FPGA. Is there any body who can help me how to implement differential equation on PXI devices uding Labview FPGA, please? Is there any integrator in Labview FPGA, module. I used Discrete Integerator in LAbview FPGA  module in Maths palette, but i hesistated if it really works . I really appreciate your help,
                                        Gammee

    Thank you for posting on the discussion forum.
    You can solve differential equations using LabVIEW FPGA but you may run into some significant difficulties in doing so. If you are not tied to using FPGA, you could try using LabVIEW real-time, which may make things much easier. But if you would like to stick with FPGA, see the link below for a list of examples that may be helpful:
    http://search.ni.com/nisearch/app/main/p/bot/no/ap/tech/lang/en/pg/1/sn/ssnav:ipn/q/differential%20e...
    Below is a link that you can review to better understand the functionality of the discrete integrator should you choose to go that route:
    http://zone.ni.com/reference/en-XX/help/371599B-01/lvfpga/discrete_normalized_integrator/
    I hope that helps.
    Best,
    Rachel
    Rachel D.
    Applications Engineer
    National Instruments

  • Why should I adopt LABVIEW FPGA as a tool for developing my FPGA projects?

    Dear Friends, 
    Since I have started using LABVIEW FPGA, I got too many questions in my mind looking for answers! 
    1-      Does anybody can tell me “why should I adopt LABVIEW FPGA as a tool for developing my FPGA projects?”
    I mean there are many great tools in this field (e.g. Xilinx ISE, ….); what makes LABVIEW FPGA the perfect tools that can save my time and my money? 
    I’m looking for a comparison can show the following points:
    ·         The Code size and speed optimization.
    ·         Developing time.
    ·         Compiling time.
    ·         Verifying time.
    ·         Ability to developing in future.
    ·         …etc.. 2-     
    I’ve Spartan-3E kit, I’m so glad that LABVIEW support this kit; I do enjoyed programming the kit using LABVIEW FPGA, but there are too many obstacles!
    The examples come with Spartan-3E driver don't cover all peripherals on board (e.g. LAN port is not covered)! There is a declaration at NI website which is "LabVIEW FPGA drivers and examples for all on-board resources" Located at: http://digital.ni.com/express.nsf/bycode/spartan3eI don’t think that is true!
    Anyway, I will try to develop examples for the unsupported peripherals, but if the Pins of these peripherals are not defined in the UCF file, the effort is worthless! The only solution in this case is to develop VHDL code in ISE and use it in Labview FPGA using HDL node!?
    3-      I wonder if NI has any plan to add support for Processor setup in Labview FPGA (Like we do in EDK)?
    4-      I wonder if NI has any plan to develop a driver for Virtex-5 OpenSPARC Evaluation Platform ?http://www.digilentinc.com/Products/Detail.cfm?Nav​Path=2,400,599&Prod=XUPV5 
    Thnaks & regards,Walid
    Solved!
    Go to Solution.

    Thanks for your questions and I hope I can answer them appropriately
    1. LabVIEW FPGA utilizes the intuitive graphical dataflow language of LabVIEW to target FPGA technology. LabVIEW is particularly nice for FPGA programming because of its ability to represent parallelism inherent to FPGAs. It also serves as a software-like programming experience with loops and structures which has become a focus of industry lately with C-to-gates and other abstraction efforts. Here are some general comparison along the vectors you mentioned
    Code Size and speed optimization - LabVIEW FPGA is a programming language. As such, one can program badly and create designs that are too big to fit on a chip and too slow to meet timing. However, there are two main programming paradigms which you can use. The normal LabVIEW dataflow programming (meaning outside a single-cycle loop) adds registers in order to enforce dataflow and synchronization in parity with the LabVIEW model of computation. As with any abstraction, this use of registers is logic necessary to enforce LabVIEW dataflow and might not be what an expert HDL programmer would create. You trade off the simplicity of LabVIEW dataflow in this case. On the other hand, when you program inside a Single-Cycle timed loop you can achieve size and speed efficiencies comparable to many VHDL implementations. We have had many users that understand that way LabVIEW is transformed to hardware and program in such a way to create very efficient and complex systems.
    Development Time - Compared to VHDL many of our users get near infinite improvements in development time due to the fact that they do not know (nor do they have to know) VHDL or Verilog. Someone who knows LabVIEW can now reach the speeds and parallelism afforded by FPGAs without learning a new language. For harware engineers (that might actually have an alternative to LabVIEW) there are still extreme time saving aspects of LabVIEW including ready-made I/O interfaces, Simple FIFO DMA transfers, stichable IP blocks, and visualizable parallism.  I talk to many hardware engineers that are able to drastically improve development time with LabVIEW, especially since they are more knowledgable about the target hardware.
    Compilation Time - Comparable to slightly longer to due to the extra step of generating intermediate files from the LabVIEW diagram, and the increased level of hierarchy in the design to handle abstraction.
    Verification Time - One of our key development initiatives moving forward is increased debugging capabilities. Today we have the abilities to functionally simulate anything included in LabVIEW FPGA, and we recently added simluation capabilities for Imported IP through the IP Integration node on NI Labs and the ability to excite your design with simulated I/O. This functional simualation is very fast and is great for verification and quick-turn design iteration. However, we still want to provide more debugging from the timing prespective with better cycle-accurate simulation. Although significantly slower than functional simulation. Cycle-accuracy give us the next level of verification before compilation. The single cycle loop running in emulation mode is cycle accurate simluation, but we want more system level simulation moving forwrad. Finally, we have worked to import things like Xilinx chipscope (soon to be on NI Labs) for on-chip debugging, which is the final step in the verification process. In terms of verification time there are aspects (like functional simulation) that are faster than traditional methods and others that are comparable, and still other that we are continuing to refine.
    Ability to develop in the future - I am not sure what you mean here but we are certainly continuing to activiely develop on the RIO platform which includes FPGA as the key diffentiating technolgoy.  If you take a look at the NI Week keynote videos (ni.com/niweek) there is no doubt from both Day 1 and Day 2 that FPGA will be an important well maintained platform for many years to come.
    2. Apologies for the statement in the document. The sentence should read that there are example for most board resources.
    3. We do have plans to support a processor on the FPGA through LabVIEW FPGA. In fact, you will see technology on NI Labs soon that addresses this with MicroBlaze.
    4. We do not currently have plans to support any other evaluation platforms. This support was created for our counterparts in the academic space to have a platform to learn the basics of digital design on a board that many schools already have in house. We are currently foccussing on rounding out more of our off-the-shelf platform with new PCI Express R Series boards, FlexRIO with new adapter modules, cRIO with new Virtex 5 backplanes, and more.
     I hope this has anwered some of the questions you have.
    Regards 
    Rick Kuhlman | LabVIEW FPGA Product Manager | National Instruments | ni.com/fpga
    Check out the FPGA IPNet for browsing, downloading, and learning about LabVIEW FPGA IP Cores

Maybe you are looking for

  • What is the max size of HDD I can use in my dc7600 CMT

    I am using an HP dc7600 CMT which is working fine after upgrading to a Samsung 128GB SSD, Intel Pentium D 3.4 GHz, 4GB RAM, and an AMD Radeon HD 6450. I am running Win 8.1 Pro x64, with the most recent upgrade, and have absolutely no problems. I now

  • NPD process in SAP PLM

    Hi,     Can anyone give me an idea about mapping NPD (New Product Development) process in SAP PLM. For better understanding, NPD process steps are listed below. - Project portfolio alignment - Strategic resource management - Phase gate & Project mana

  • Changing sender port in IDOC scenario

    Hi, i am trying to change the sender port in XI (name of the XI-System is CXE) to ZSAPCXE. I have successfully done the mapping of the IDOC header field (populating the field SNDPOR with ZSAPCXE). Now i have started my test scenario - sending an IDOC

  • Converting Bit Rate of iTunes Purchased songs

    I am in the process of converting all my music files to 112 bit to allow for mores space on my iPod. However, the songs I have gotten of iTunes through the music store are protected and it won't allow me to convert them . My method of converting the

  • Autoextend on not working with ASM

    Hi, Autoextend on not working with ASM datafiles in version 10.2.0.4 on solaris platform. What are reasons behind the cause. Regards, Sakthi.