|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools |
Rating:
|
Display Modes |
|
#3
|
|||||
|
|||||
|
Re: [FTC]: New LabView Templates
Quote:
There are some real wacky things in them: But before I start done that list... remember that they are only "Templates". They cannot be run "as-is", especially the Autonomous one. Therefore by definition they need stuff added to them. Since I have yet to be able to get a defined list of what is, and is not permitted in the code I don't really see how they provide much more than a "guideline" for code development. So to follow that up with examples.... Teleop template 1) The Teleop template makes the assumption that the single motor controller and single servo controller are plugged into a single NXT port. We have two motor controllers (rule legal) and I have all three of my Hitechnic controllers plugged into different NXT ports. So right away I can't use the template "AS-IS." We either need to add more port/controller wires, or (as we chose to do) we encapsulate my drive and servo commands into their own VI's so I don't need to pass around all those constants. (Please don't force me to dumb down our code) 2) The teleop template displays the words "TeleOperated Code" on the NXT screen... every time around the loop. Yet this never changes, so why waste those valuable CPU cycles. Once at startup should be enough. 3) In the teleop template, the Mode flag (tele/auto) from the Contol station is being passed into the inner most case block, but not being used. So, if the program was started incorrectly during the Autonomous period, it would teleop code anyway.. I can't tell if the creator wants us to emebed Auto code in here or not..... the instructions imply NO, but the code implies YES.. Auto Template 1) The Auto template makes the assumption that the single motor controller and single servo controller are plugged into a single NXT port. Same argument as before. 2) The Auto template displays the words "Autonomous code is..." on the NXT screen... every time around the loop. Same argument as before. 3) The Mode flag (tele/auto) from the Contol station, AND data from the gamepads is being passed into the inner most case block, but not being used. Gamepad data is clearly redundant in Auto, so why it it there? 4) The "Disabled" case block is clearly an "exampler" of what should be done, but since I have extra motors I need to add code. Once again... it's only a template ![]() 5) To address the point of "Will the disable input shut down Auto code"? I'm completely in agreement with you. What the Auto Template fails to address (and that I've tried to raise several times) is that if people write their auto code a one long sequence of movements (which is most natural), the inner auto block WILL NOT exit until it's done. Which means that it will NOT see a new bluetooth command from the control station, which means it WILL NOT disable untill it's done. So if the "Software Inspection" terminates Auto after only 10 seconds, most programs will continute to run their course up to the full 30 (or beyond). I agree that some additional "loop/thread" must be included so that the bluetooth and drive-code can run in parrallel. This is what I currently have, and it means that I can at least disable my code after each movement. However, if FIRST decides that we MUST follow the template structure, then I'll begrudgingly put it all in the main case block and wait for them "FAIL" my code because it doesn't stop in time during auto inspection. For anyone who doubts this analysis, I suggest you get an FTC robot with encoders on the wheels and then put a sequence of 4 "Fixed Distance.VI" commands in the Auto code section. Now see if you can stop them running by "Disabling" the robot once they have started. The one GREAT thing in all of this is that they have released the Field Control software so we can double check our assumptions, rather than just "hoping" to be compliant. Phil. Eager to be proven wrong. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [FTC]: LabVIEW Programming Template for FTC | Team 288 | FIRST Tech Challenge | 30 | 06-02-2010 17:49 |
| [FTC]: Tips page on using FTC Encoders with LabVIEW | PhilBot | FIRST Tech Challenge | 7 | 27-01-2009 14:00 |
| [FTC]: First problem with FTC and LabView.....? | PhilBot | FIRST Tech Challenge | 5 | 07-11-2008 10:36 |
| [FTC]: FTC Servo-Motor Problem with Labview | dnhansen | FIRST Tech Challenge | 1 | 26-10-2008 00:43 |
| [FTC]: FTC Labview questions | Monty Python | FIRST Tech Challenge | 8 | 14-10-2008 20:03 |