Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Programming with the 2009 controller (http://www.chiefdelphi.com/forums/showthread.php?t=67027)

slavik262 18-04-2008 14:55

Programming with the 2009 controller
 
I am extremely excited about the ability to finally write code in C++. Other than what I've read on the site, does anybody know any specifics about how this will work? Will we be able to simply compile and transfer the file using wireless into the controller? Will we have to use a specific IDE or will the compiler be useable across multiple IDEs provided we use the libraries given to us for the processor? My dream would be to write the robot code in the Microsoft Visual C++ IDE, which is better than MPLab by leaps and bounds, mostly due to Intellisense.

ComradeNikolai 18-04-2008 18:16

Re: Programming with the 2009 controller
 
The information I've been able to gather is that we will be able to use LabView NI or WindRiver IDE. WindRiver is supposed to be very nice, so that will be suitable for C++ development, I think. Personally, EITHER of those is superior to Visual C++ for the sole reason that it's a Microsoft product... but hopefully, we will all be able to use whatever environment is most comfortable for us.

slavik262 18-04-2008 19:45

Re: Programming with the 2009 controller
 
Hooray for anti-M$ sentiment...

My main goal is to get away from MPLab and it's fun casting issues. I'm hoping for Visual C++ because I've used it extensively for school projects and had great success with it.

Regardless of IDE, I can't wait to program the robot in C++. Object-oriented programming combined with 1,000 times the memory of this year's RC and a much faster processor will let teams do things we've been dreaming of for years.

lingomaniac88 18-04-2008 21:40

Re: Programming with the 2009 controller
 
I'm thinking of trying LabView for 2009. Looking at some videos on the NI website, it looks pretty cool. Anyone know how easy/hard is it to learn and use LabView?

Alan Anderson 18-04-2008 21:57

Re: Programming with the 2009 controller
 
Quote:

Originally Posted by lingomaniac88 (Post 738841)
Anyone know how easy/hard is it to learn and use LabView?

The learning process for LabView takes wildly different paths for different people. I've watched complete novices pick it up in basically no time.

On the other hand, it was very difficult for me. I think that's probably because I was learning it from someone who knew it inside and out and thus could do everything quickly, but who was very poor at transferring that knowledge to someone who couldn't follow it that quickly. Most of my time was spent doing two things: unlearning a lot of what I learned about procedural programming, and getting used to the multilayered view of programs that LabView provides.

I still am not at all comfortable with it, and I still cannot "read" a LabView program written by an expert.

Nikhil Bajaj 19-04-2008 00:57

Re: Programming with the 2009 controller
 
Quote:

Originally Posted by Alan Anderson (Post 738843)
The learning process for LabView takes wildly different paths for different people. I've watched complete novices pick it up in basically no time.

On the other hand, it was very difficult for me. I think that's probably because I was learning it from someone who knew it inside and out and thus could do everything quickly, but who was very poor at transferring that knowledge to someone who couldn't follow it that quickly. Most of my time was spent doing two things: unlearning a lot of what I learned about procedural programming, and getting used to the multilayered view of programs that LabView provides.

I still am not at all comfortable with it, and I still cannot "read" a LabView program written by an expert.

I definitely agree with you on this, Alan. I've used both LabView and Simulink in various project to program embedded targets, and it has nearly always been easier for me to understand and conceptualize what is going on when I write my own C code. That said, I do have a lot of friends and know many people who swear by Simulink and LabView for doing their programming for various types of things. They are extremely versatile products. I would imagine though that they might be easier to pick up for someone without any programming background than C or C++, although I personally feel that there are a lot of insights into controls and programming that you can't gain by using such high level, abstracted ways of programming.

neutrino15 19-04-2008 01:28

Re: Programming with the 2009 controller
 
I think it's great that FIRST has expanded our variety of IDEs.. I read on the 2009 PDF that Windriver is basically Eclipse.. Can somebody please explain? Is Windriver some comerical spinoff of a perfectly good Open Source project? Or is it just a set of plugins for the standard Eclipse IDE?

Quote:

Q) What IDE(s) will be available for use with the new controller/programming language?
A) Both WindRiver Workbench (Eclipse) for C/C++ and LabVIEW.
Either way, Eclipse is a great program (widely used in the industry).. Labview also shows promise as a learning tool, though I am a big fan of starting newbies off with writing real C code..

On another note, does anyone have any idea as to what libraries will be onboard the cRIO? Also, what libraries will FIRST or WPI be supplying? I assume they will write some of the very low level (pwm generation/timer interface) for us.. If you know, do tell!;)

The most exciting thing for me.. Floating points and Objects!!! Woohoo!!

prograid 19-04-2008 02:03

Re: Programming with the 2009 controller
 
Quote:

Originally Posted by neutrino15 (Post 738918)
I think it's great that FIRST has expanded our variety of IDEs.. I read on the 2009 PDF that Windriver is basically Eclipse.. Can somebody please explain? Is Windriver some comerical spinoff of a perfectly good Open Source project? Or is it just a set of plugins for the standard Eclipse IDE?

Eclipse as a whole is a set of plugins for a very small core platform. The open source components include that core platform and various development tools that can turn Eclipse into and IDE. One of these open source development tools is the CDT (C/C++ Development Tooling). However, the open source product only integrates with variants of GCC (and I think possibly Visual C++ in the latest version). So WindRiver basically added support for their compilers, debuggers, etc. to the CDT (which does require a good deal of effort) and repackaged it and sells it to you as WindRiver Workbench. Their website for it is here.

neutrino15 19-04-2008 02:27

Re: Programming with the 2009 controller
 
Thanks for clearing that up.. I watched a bit of their video demo and found "We support many host OSs, including Windows, linux, and Solaris!" a bit disappointing (no love for the mac!)

Could Eclipse be used on the mac? (for purposes beyond text editing/versioning, for the cRIO?)

neutrino15 19-04-2008 02:29

Re: Programming with the 2009 controller
 
Thanks for clearing that up.. I watched a bit of their video demo and found "We support many host OSs, including Windows, linux, and solaris!" a bit disappointing (no love for the mac! [which, btw, has some 8-12% of the market now])

Could Eclipse be used on the mac? (for purposes beyond text editing/versioning, for the cRIO?)


Also,
Quote:

the open source product only integrates with variants of GCC (and I think possibly Visual C++ in the latest version).
I am quite certain the cRIO supports GCC. Not so sure about the visual c++

DtD 21-04-2008 01:40

Re: Programming with the 2009 controller
 
Eclipse would work on a Mac, since it is Java based. (Plus, Wikipedia says it is cross-platform)

~DtD
Blue Valley Robotics

esquared 21-04-2008 08:00

Re: Programming with the 2009 controller
 
<clip>
Quote:

Originally Posted by neutrino15 (Post 738918)
I think it's great that FIRST has expanded our variety of IDEs.. I read on the 2009 PDF that Windriver is basically Eclipse.. Can somebody please explain? Is Windriver some comerical spinoff of a perfectly good Open Source project? Or is it just a set of plugins for the standard Eclipse IDE?

</clip>

Wind River is a company that develops toolchains such as compilers, linkers, and debuggers. My company uses them for cross compiling from a standard Wintel box to an embedded PowerPC platform. From experience I feel they are a good pick for this aspect of the new controller, and should hopefully bring fewer casting issues and more useful compile/link error messages.

For the poster who mentioned Visual C++, most of the gain of using Visual C++ is the tight integration with developing for MFC/.NET. Even if you could set it up to call the Wind River tools, the bulk of the nice features would go unused. That doesn't mean, however, that you couldn't use VC++ to write a Labview-esque frontend to send/receive data from your robot...

Chris_Elston 21-04-2008 08:02

Re: Programming with the 2009 controller
 
Does any one in this thread know if the 2009 controller can be programmed with the traditional industrial languages?

such as:

Ladder Logic
State Logic
Flow Chart Diagram
Structured Text (yup...C++ is Structured Text)

Are these optional? Or is labview only function block programming only?

National Instruments for YEARS has been bugging me to try a controller to replace the PLC (programmable logic controllers) I use in machine designs, and have said we can program in ladder logic, STL, flow chart, ST, when we switch over to this controller. That's where I am coming from with this question.

Or is C++ and function block (labview) the only options? And those other few mentioned in this thread....

jtdowney 21-04-2008 08:10

Re: Programming with the 2009 controller
 
The only supported ways they mentioned were WindRiver C/C++ (Using WPILib), Intelitek easyC, and National Instruments LabView. However the WPILib for this RC will be open source so the options are not set in stone. Also I was told we will not have access to program the FPGA next year but it is something they are evaluating for future years.

Qbranch 21-04-2008 08:10

Re: Programming with the 2009 controller
 
Quote:

Originally Posted by Chris_Elston (Post 740025)
Ladder Logic

Eeek! :yikes:

Sorry, I have an allergic reaction to Ladder Logic.

Anyhow, I think the reason your NI rep said you could program in all those methods was that if you arrange your icons right on the screen in Lab View, it runs just like ladder logic. Similarly, with a clever use of the filmstrip control you could make it act like a flow chart too. I know they have C boxes that work in there somehow too.

If I were the programmer for our team next year, I'd go the C route if they give you cVI libraries. The labview system has a lot of oddities to it, like (this is a dusty memory) you can do everything to an array except one critical function like writing or reading a specific element or something of the sort, can't remember quite. Also, LabView pictures are REALLY hard to document and get jumbled really fast. The pictures aren't too portable really either.

And finally... this won't seem like a big issue till you're using it... LabView has no zoom. The little one or two pixel wide terminals you have to hook wires to don't get any bigger. :ahh:

It'll be interesting, any which way it goes...

-q


All times are GMT -5. The time now is 19:38.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi