Go to Post I actually love and am very thankful for what all these amazing engineering role models put into this program year in and year out. - Bill Gold [more]
Home
Go Back   Chief Delphi > ChiefDelphi.com Website > Extra Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 12-02-2012, 11:31
tr6scott's Avatar
tr6scott tr6scott is online now
Um, I smell Motor!
AKA: Scott McBride
FRC #2137 (TORC)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Oxford, MI
Posts: 520
tr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond repute
Re: paper: Killer Bees BuzzXVI Code and Auto Scripting

As we were looking through the code you gave for auton scripting and the code you used for competetion, we saw that in the scripting example the CreatCommands.vi was outside the Auto_Initalization.vi , but in the code you used at competetion you had the CreatCommand.vi inside the Auto_Initialization.vi. Why is this? Any help would be appreciated, Thanks
__________________
The sooner we get behind schedule, the more time we have to catch up.

Reply With Quote
  #2   Spotlight this post!  
Unread 12-02-2012, 12:06
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: paper: Killer Bees BuzzXVI Code and Auto Scripting

The scripting example setup commands and auto init (sensors) as different things. No real reason.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
Reply With Quote
  #3   Spotlight this post!  
Unread 13-02-2012, 07:41
tr6scott's Avatar
tr6scott tr6scott is online now
Um, I smell Motor!
AKA: Scott McBride
FRC #2137 (TORC)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Oxford, MI
Posts: 520
tr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond repute
Re: paper: Killer Bees BuzzXVI Code and Auto Scripting

Ok, We got it working yesterday. I am the mentor, and did not dig into the code, to research the issue we were having, but I wanted to post incase someone else uses the code, and so you know of the issue we tripped up on. It seems there is a problem with passing non-integer data between the script to the code. In our drive straight command, we are choosing the motor speed drive at, the raw -1 to 1 motor speed. So in our script one of the arguments is 0.5 for motor speed.

The code that populates the driver station message box, says that it read 0.5 and everything was good. But when we probed the data in labview, it was either a 0 or a 1. We then made the data in the script 50 and in the adjusted the labview code to divide the speed value by 100, we got it to work and drive at 50% speed as intended. (This was not the only error made this weekend, there were many others that were self imposed. )

I am guessing that the message box is populated with the string values from the script file and not from the converted string to fixed (or interger) data the labview code is seeing.

Thanks again for sharing, and responding to all the questions, we now have our torc drive straight auto and wait working in beescript, now to get the turns done. We could not have done it without your help.

Scott McBride.
__________________
The sooner we get behind schedule, the more time we have to catch up.

Reply With Quote
  #4   Spotlight this post!  
Unread 14-02-2012, 07:33
tr6scott's Avatar
tr6scott tr6scott is online now
Um, I smell Motor!
AKA: Scott McBride
FRC #2137 (TORC)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Oxford, MI
Posts: 520
tr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond repute
Re: paper: Killer Bees BuzzXVI Code and Auto Scripting

One more question...

Where do you tell the code how many parameters are passed from the script file to the command cluster/array?

We added additional data to the drive_strait script file but it does not read back through the dashboard. I was thinking that you would be creating the parameters on the fly from the script file, parsing until the end EOL character was found, but it appears that is not how it works.

Scott McBride
__________________
The sooner we get behind schedule, the more time we have to catch up.

Reply With Quote
  #5   Spotlight this post!  
Unread 14-02-2012, 07:50
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: paper: Killer Bees BuzzXVI Code and Auto Scripting

My guess is that you are exceeding the character limit for the line of the Driver Station and it's getting truncated. That display does not line wrap, it truncates extra characters.

If you open Execute File, there are several VI's which do the actual processing of a file into arrays of lines and later arrays of arguments. I believe the first one is read_auto_file and the second is part of ExecuteCommand.

It's never explicitly defined how many arguments to expect. The interpreter passes all arguments to the command and lets each command deal with it - Some do, some don't.

For the actual breaking up into lines, it first breaks them up by newline into an array of lines, then FOR's through each item. If it's not a comment or blank line, it executes the command on that line. That VI breaks up the line into an array of strings separated by spaces. The first one is the command name, the rest are arguments. It finds the command with a matching name to the command called, and calls it with an array of arguments.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:32.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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