Announcement

Collapse
No announcement yet.

New video should cRIO programming

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • New video should cRIO programming

    A new video has just been posted on the NI fourm, showing how to program the cRIO to drive a motor from the joystick using LabVIEW.

    You can't get much simpler than this...

    http://zone.ni.com/devzone/cda/tut/p/id/7977

    Phil.
    Last edited by Philbot; 10-06-2008, 03:45 PM.

  • #2
    Re: New video showing cRIO programming

    Originally posted by Philbot View Post
    You can't get much simpler than this...
    Actually, you can. We just attended a full-day program on the new system with an FAE from NI and Brad Miller from WPI. In the morning, we learned about LabView and saw that video. In the afternoon, Brad detailed what it takes to create a basic C++ program to drive the robot using the WPI libraries. Just as I was thinking it, someone in front of me said, "Why would you use LabView?" The program was literally no more than a dozen lines of actual code and was almost trivial to read and understand. Now our team is trying to decide whether to bother teaching the kids LabView or just jump right into C++.

    Brad just released the URL to preliminary documentation for the WPI libraries if you want to take a look: http://users.wpi.edu/~bamiller/WPIRo...ary/index.html

    Ken

    Comment


    • #3
      Re: New video should cRIO programming

      Was I the only person that noticed the Victor didn't appear to be fused in the demo video? Even if there's no [external] load on the motor, wouldn't it be a good idea to have some current limiting device in case the software goes off into the weeds?

      Comment


      • #4
        Re: New video showing cRIO programming

        Originally posted by kdavidson View Post
        Just as I was thinking it, someone in front of me said, "Why would you use LabView?" The program was literally no more than a dozen lines of actual code and was almost trivial to read and understand.
        First, let me state that I wasn't attempting to say that LabVIEW was easier or harder then C++ (don't pull me into that debate. I was you 6 months ago).

        What I was indicating was that it was quite simple to code the basic drive function of a standard robot using LabVIEW. The natural hope would be that this is true in BOTH environments.

        LabVIEW has a learning curve associated with it, just like C++ does.

        One thing I do like about labVIEW (in an attempt to answer your "Why would you use labVIEW": question) is the inherent ease of debugging using the built in grapical elements that are part of any code you write.

        eg: Last night, when building a VI (function) to read and interpret the switch inputs from our operator control unit. The obvious step (for me) was to lay out the switch-state indicators in the same configuration as the actual switches on the panel. To test the VI, I just ran it, poped open it's front panel and ran through all the switches watching their LEDs come on. I imediately saw that one pair of switches had been reversed.

        And for clarity, I want to stress that this was not a "test" program that I had to write, it's a permanent part of that VI. So at any time in the future if I suspect that the control panel is not working, I can pop up that panel (while I'm running the program in RAM) and watch the user input.

        I know that a simmilar debugging/watch variable capability is probably available in the C++ environment, but I've found that many times, a simple numeric debug display is limiting. Think back to when you last debugged a closed loop control code. How many times did you have to dump variables, and then load into a graphical package to see what the control was really doing. Why not build that chart right into your control?

        Anyway... that's my reason for striking out and trying to learn new tricks

        Comment


        • #5
          Re: New video should cRIO programming

          Originally posted by ayeckley View Post
          Even if there's no [external] load on the motor, wouldn't it be a good idea to have some current limiting device in case the software goes off into the weeds?
          Absolutely.

          In a propper robot setup, the Victors MUST be powered by the Power Distribution (PD) module. This module has 8 x 40A fuses. A cool feature is that this module has built-in LEDS that shown when a fuse has blown. They use the same fuses from past years.

          Comment


          • #6
            Re: New video should cRIO programming

            Originally posted by ayeckley View Post
            Was I the only person that noticed the Victor didn't appear to be fused in the demo video? Even if there's no [external] load on the motor, wouldn't it be a good idea to have some current limiting device in case the software goes off into the weeds?
            I was thinking the very same thing.

            Comment


            • #7
              Re: New video should cRIO programming

              Originally posted by Philbot View Post
              A cool feature is that this module has built-in LEDS that shown when a fuse has blown.
              Ooops.... news flash..... due to a failure mode detected during beta testing, there probably won't be status LEDs on the fuses....

              Bummer... I liked those LEDs. The problem apparently has an solution, but not one that could be implemented in time for the new season.

              Comment


              • #8
                Re: New video showing cRIO programming

                Originally posted by Philbot View Post
                You can't get much simpler than this...

                Phil.
                Originally posted by kdavidson View Post
                Actually, you can.

                Ken
                What Philbot might have meant, and what I have observed, is that the FRC "default code with WPI libraries" are much much simpler to use than raw LabVIEW VIs. I have often imagined how complicated it would have to be for LabVIEW to communicate with the robot, feed signals through the driver's station, have the ability to have autonomous mode, and switching between auton. and tele. mode with just LabVIEW and a little bit of "default code." I often wondered how this default code would work and make things simple. Well, I must say that I am extrememly impressed with the "default code" that they are giving us. It greatly simplifies programming, it is easy to use, and it is very, very usefull, benificial, and advanced.

                Also, on the topic of using LabVIEW instead of C++: in my opinion, LabVIEW has much more capabilities than C code. The front panel gives you feedback of robot status and allows you to give input, it has excelent debuging features, I really like the fast, easy, advanced, and powerfull concept of graphical programming, plus more. View my other post in this forum in the thread called something like "LabVIEW first impressions". It has more details.

                Thanks NI and FIRST!
                Last edited by LabVIEWenthusiast3; 10-30-2008, 11:13 PM.
                Not a 2012 beta tester, but interested in the process.

                Comment

                Working...
                X