Go to Post When I saw the title of this thread ("Reverse Robotics"), I thought "what, you get six weeks to take apart a robot or something??" - Katie Reynolds [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 04-02-2004, 09:27
MetalWorker MetalWorker is offline
Registered User
no team
 
Join Date: Feb 2004
Location: Texas
Posts: 1
MetalWorker is an unknown quantity at this point
Robot Controller Simulator

Does anyone know of a program that can simulate a robot to test my programs without having to have a upload them into the RC?

I know that there was one that worked with PBASIC, has anyone made or found one that works with C/C++??
  #2   Spotlight this post!  
Unread 04-02-2004, 11:44
gnormhurst's Avatar
gnormhurst gnormhurst is offline
Norm Hurst
AKA: gnorm
#0381 (The Tornadoes)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Trenton, NJ
Posts: 138
gnormhurst will become famous soon enoughgnormhurst will become famous soon enough
Re: Robot Controller Simulator

The MPLAB IDE has a "SIM" simulation mode (it's in the menus), but I haven't dug into it yet. It sounds like that is what you want.
  #3   Spotlight this post!  
Unread 04-02-2004, 12:01
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,856
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Robot Controller Simulator

Quote:
Originally Posted by MetalWorker
Does anyone know of a program that can simulate a robot to test my programs without having to have a upload them into the RC?

I know that there was one that worked with PBASIC, has anyone made or found one that works with C/C++??

The MPLAB SIM can be used to run/walkthrough your code and inspect values and follow the execution, but it's not like Rob Bayer's RoboEmu of previous years.

To use it:

1. Add “_SIMULATOR” to the macro definitions under the Project->Build Options->Project "MPLAB C18" tab. Click on Add and type it in. Make sure you remove this macro before loading the program onto the real controller.
2. Select Debugger->Select Tool->MPLAB SIM. this gives you some new control buttons on your menu bar.
3. Set breakpoint on any source line by right clicking on a line and selecting "Set breakpoint"
4. Can set watch -- but cannot “watch” aliases, must use the real name. Also, use to view struct.
5. Can view variable values by placing the cursor over the name, but not aliases or structs. Can view variables in any active source file.
6. Click on the "run" button to start your program's execution
7. Click on the "step" buttons to walk through the code one instruction at-a-time.
8. Click on "Halt" to freeze your programs execution, so you can look at things

Limitations:
- No graphical output
- printfs don't get displayed
- It's difficult to use your interrupts (both internal timers and external) and they will mess-up your program's execution unless you block them. You can block timers for instance, by adding a conditional compile statement like:
Code:
#ifdef _SIMULATOR
  OpenTimer1(TIMER_INT_OFF &   /* Turn OFF timer interrupt for MPLAB SIM */
             T1_16BIT_RW &
             T1_SOURCE_INT &
             T1_PS_1_8 &
             T1_OSC1EN_OFF &
             T1_SYNC_EXT_OFF);
#else
  OpenTimer1(TIMER_INT_ON &    /** Set to ON for normal execution */
             T1_16BIT_RW &
             T1_SOURCE_INT &
             T1_PS_1_8 &
             T1_OSC1EN_OFF &
             T1_SYNC_EXT_OFF);
#endif
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 04-02-2004 at 15:00.
  #4   Spotlight this post!  
Unread 04-02-2004, 22:18
ControlsTeam ControlsTeam is offline
Registered User
#0016
 
Join Date: Feb 2004
Location: mountain Home Ar
Posts: 2
ControlsTeam is an unknown quantity at this point
Re: Robot Controller Simulator

You will find the simulator Useless if you use a all types and try to do math. It will choke. you must simulate on the controller to save a buch of trouble. it is good for seeing if it will run through the code but dont rely on the values of the variable.
Closed Thread


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How much planning goes into your robot? Jnadke General Forum 41 29-01-2006 21:29
Help On Coding 2K1 Controller GregTheGreat Programming 9 05-12-2003 18:35
serious problem found - robot controller resets when jarred! KenWittlief Electrical 23 19-03-2003 13:30
Controlling a FIRST robot with a Lego RCX Controller? archiver 2001 5 24-06-2002 04:19
WASH Palm scouting at the Championship Mike Soukup Scouting 2 19-04-2002 15:14


All times are GMT -5. The time now is 00:04.

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