Go to Post As a Mississippi boy, I'm especially proud that I could read - Natchez [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 30-05-2009, 12:14
Doug Leppard's Avatar
Doug Leppard Doug Leppard is offline
Registered User
FRC #1902 (Exploding Bacon)
Team Role: Engineer
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Orlando
Posts: 435
Doug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond repute
Send a message via AIM to Doug Leppard
VEX programming without transmitter

I am programming the VEX controller in Easyc Pro.

I want to run the VEX controller but the motors won't run without the transmitter on.

How do you get around that?

I am playing with the robot and the CMUCAM but don't want to have transmitter on.
__________________
Doug Leppard
  #2   Spotlight this post!  
Unread 30-05-2009, 14:34
ttldomination's Avatar
ttldomination ttldomination is offline
Sunny
no team
Team Role: Mentor
 
Join Date: Mar 2007
Rookie Year: 2007
Location: Roanoke, TX
Posts: 2,066
ttldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond repute
Re: VEX programming without transmitter

Making an assumption,

NOTE: What I assume is probably wrong.

in EasyC, when you download the code, there is no way to go from enable to disable like there is RobotC. So I'm pretty sure that without the transmitter being on, your robot is in disabled mode and with it on, your code runs.

I haven't actually gotten to run code in RobotC, but looking at the video, I don't think one needs the controller.

That's an assumption. .
__________________
1261: 2007-2012
1648: 2013-2014
5283: 2015
  #3   Spotlight this post!  
Unread 30-05-2009, 22:43
daltore's Avatar
daltore daltore is offline
Electronics/programming/design
AKA: Aaron Osmer
FRC #3529 (ausTIN CANs)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2007
Location: San Antonio, TX
Posts: 272
daltore has a spectacular aura aboutdaltore has a spectacular aura aboutdaltore has a spectacular aura about
Send a message via AIM to daltore Send a message via MSN to daltore Send a message via Yahoo to daltore
Re: VEX programming without transmitter

The enable/disable state is governed by the VEX firmware. Unless you know how to rewrite the firmware, I think you need the transmitter. The timing of the operator controlled mode is syncs itself to the transmitter when it finds a signal, and this is the mode where motor udpates are run because the timing is regulated. Basically, what is called Autonomous() in EasyC is called user_routines_fast.c in the default code, and what is called OperatorControl() is called user_routines.c. The user_routines_fast.c code runs as fast as it is able to, while the user_routines.c code runs once every 18.5 ms. This 18.5 ms cycle is synced to the transmitter's update rate, also at 18.5 ms, when the transmitter is turned on. Because motor signals are also time critical, and update at 18.5 ms. all of the motors signals are handled in user_routines.c regardless of whether or not they're sent in autonomous or operator control. However, user_routines.c does rely on the transmitter, so motors will not run without that code being synced up.
  #4   Spotlight this post!  
Unread 31-05-2009, 09:40
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,906
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: VEX programming without transmitter

Using MPLAB C you can run easily without the transmitter by having the code force autonomous operation.
I haven't used a transmitter in any of my workshops since the Vex kits came out.

However, EasyC doesn't have a direct mechanism to do this.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 31-05-2009 at 09:45.
  #5   Spotlight this post!  
Unread 31-05-2009, 09:58
Doug Leppard's Avatar
Doug Leppard Doug Leppard is offline
Registered User
FRC #1902 (Exploding Bacon)
Team Role: Engineer
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Orlando
Posts: 435
Doug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond repute
Send a message via AIM to Doug Leppard
Re: VEX programming without transmitter

Thanks guys for the input.
__________________
Doug Leppard
  #6   Spotlight this post!  
Unread 31-05-2009, 10:35
gblake's Avatar
gblake gblake is offline
6th Gear Developer; Mentor
AKA: Blake Ross
no team (6th Gear)
Team Role: Mentor
 
Join Date: May 2006
Rookie Year: 2006
Location: Virginia
Posts: 1,942
gblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond repute
Re: VEX programming without transmitter

I seem to recall that there are two set of "functions" for turning motors/servos on; and that one of them required the transmitter to be on and the other didn't?

It's worth a try before you dive into the MPLAB stuff, unless that is something you want to do anyway.

Blake
__________________
Blake Ross, For emailing me, in the verizon.net domain, I am blake
VRC Team Mentor, FTC volunteer, 5th Gear Developer, Husband, Father, Triangle Fraternity Alumnus (ky 76), U Ky BSEE, Tau Beta Pi, Eta Kappa Nu, Kentucky Colonel
Words/phrases I avoid: basis, mitigate, leveraging, transitioning, impact (instead of affect/effect), facilitate, programmatic, problematic, issue (instead of problem), latency (instead of delay), dependency (instead of prerequisite), connectivity, usage & utilize (instead of use), downed, functionality, functional, power on, descore, alumni (instead of alumnus/alumna), the enterprise, methodology, nomenclature, form factor (instead of size or shape), competency, modality, provided(with), provision(ing), irregardless/irrespective, signage, colorized, pulsating, ideate
  #7   Spotlight this post!  
Unread 31-05-2009, 11:21
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: VEX programming without transmitter

If you use a standard project in easyC Pro for the vex the robot can be run 100% autonomously and doesn't need the transmitter. I think it may be a bug in an earlier version of the WPILib I believe it was fixed a couple versions ago. You can update for free at www.intelitekdownloads.com/easyCPRO

If you want to check if the transmitter is running for an enable / disable switch then you can call ReceivingData(unsigned char port) it returns a true/false . The port is which transmitter port you have connected.
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni
  #8   Spotlight this post!  
Unread 31-05-2009, 11:44
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,906
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: VEX programming without transmitter

Thanks.
I'll have to update my EasyC Pro.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #9   Spotlight this post!  
Unread 31-05-2009, 11:59
Foster Foster is offline
Engineering Program Management
VRC #8081 (STEMRobotics)
Team Role: Mentor
 
Join Date: Jul 2007
Rookie Year: 2005
Location: Delaware
Posts: 1,394
Foster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond repute
Re: VEX programming without transmitter

Quote:
Using MPLAB C you can run easily without the transmitter by having the code force autonomous operation.
As far as I know, you must have a transmitter turned on to trigger autonomus mode.

The way the field control works is turning the transmitter on and off to cycle through the robot "control states".

Quote:
I seem to recall that there are two set of "functions" for turning motors/servos on; and that one of them required the transmitter to be on and the other didn't?
There is an option on who is the controller of the motors:
Code:
/*******************************************************************************
* FUNCTION NAME: Setup_Who_Controls_Pwms
* PURPOSE:       Each parameter specifies what processor will control the pwm.  
*                 
* CALLED FROM:   User_Initialization
*     Argument             Type    IO   Description
*     --------             ----    --   -----------
*     pwmSpec1              int     I   USER/MASTER (defined in ifi_aliases.h)
*     pwmSpec2              int     I   USER/MASTER
*     pwmSpec3              int     I   USER/MASTER
*     pwmSpec4              int     I   USER/MASTER
*     pwmSpec5              int     I   USER/MASTER
*     pwmSpec6              int     I   USER/MASTER
*     pwmSpec7              int     I   USER/MASTER
*     pwmSpec8              int     I   USER/MASTER
* RETURNS:       void
*******************************************************************************/
static void Setup_Who_Controls_Pwms(int pwmSpec1,int pwmSpec2,int pwmSpec3,int pwmSpec4,
                                    int pwmSpec5,int pwmSpec6,int pwmSpec7,int pwmSpec8)
{
  txdata.pwm_mask = 0xFF;         /* Default to master controlling all PWMs. */
  if (pwmSpec1 == USER)           /* If User controls PWM1 then clear bit0. */
    txdata.pwm_mask &= 0xFE;      /* same as txdata.pwm_mask = txdata.pwm_mask & 0xFE; */
  if (pwmSpec2 == USER)           /* If User controls PWM2 then clear bit1. */
    txdata.pwm_mask &= 0xFD;
  if (pwmSpec3 == USER)           /* If User controls PWM3 then clear bit2. */
    txdata.pwm_mask &= 0xFB;
  if (pwmSpec4 == USER)           /* If User controls PWM4 then clear bit3. */
    txdata.pwm_mask &= 0xF7;
  if (pwmSpec5 == USER)           /* If User controls PWM5 then clear bit4. */
    txdata.pwm_mask &= 0xEF;
  if (pwmSpec6 == USER)           /* If User controls PWM6 then clear bit5. */
    txdata.pwm_mask &= 0xDF;
  if (pwmSpec7 == USER)           /* If User controls PWM7 then clear bit6. */
    txdata.pwm_mask &= 0xBF;
  if (pwmSpec8 == USER)           /* If User controls PWM8 then clear bit7. */
    txdata.pwm_mask &= 0x7F;
/*******************************************************************************
* FUNCTION NAME: User_Initialization
* PURPOSE:       This routine is called first (and only once) in the Main function.  
*                You may modify and add to this function.
*                The primary purpose is to set up the DIGITAL IN/OUT - ANALOG IN
*                pins as analog inputs, digital inputs, and digital outputs.
* CALLED FROM:   main.c
* ARGUMENTS:     none
* RETURNS:       void
*******************************************************************************/
void User_Initialization (void)

<..... snip about 25 lines ...>

/* SEVENTH: Choose which processor will control which PWM outputs. */
  Setup_Who_Controls_Pwms(MASTER,MASTER,MASTER,MASTER,MASTER,MASTER,MASTER,MASTER);

/* EIGHTH: Set your PWM output type.  Only applies if USER controls PWM 1, 2, 3, or 4. */
  /*   Choose from these parameters for PWM 1-4 respectively:                          */
  /*     IFI_PWM  - Standard IFI PWM output generated with Generate_Pwms(...)          */
  /*     USER_CCP - User can use PWM pin as digital I/O or CCP pin.                    */
  Setup_PWM_Output_Type(IFI_PWM,IFI_PWM,IFI_PWM,IFI_PWM);
}
But I think that's the PWM pulse timing, not if the motor drive is enabled. It's making changes in the Tdata structure. Maybe someone from IFI can add some light, but as far as I know the transmitter needs to be on to enable the motors to move.
__________________
Foster - VEX Delaware - 17 teams -- Chief Roboteer STEMRobotics.org
2010 - Mentor of the Year - VEX Clean Sweep World Championship
2006-2016, a decade of doing VEX, time really flies while having fun
Downingtown Area Robotics Web site and VEXMen Team Site come see what we can do for you.
  #10   Spotlight this post!  
Unread 31-05-2009, 13:43
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,906
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: VEX programming without transmitter

Nope, Haven't turned on most of my vex controls in years.

In EasyC Pro follow Adam's directions.

In MPLAB C just needs one line of code to tell the master you want to be in autonomous mode:
Code:
txdata.user_cmd = 2;  // set to zero instead for user control
Quote:
Originally Posted by Foster View Post
As far as I know, you must have a transmitter turned on to trigger autonomous mode.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #11   Spotlight this post!  
Unread 31-05-2009, 18:36
daltore's Avatar
daltore daltore is offline
Electronics/programming/design
AKA: Aaron Osmer
FRC #3529 (ausTIN CANs)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2007
Location: San Antonio, TX
Posts: 272
daltore has a spectacular aura aboutdaltore has a spectacular aura aboutdaltore has a spectacular aura about
Send a message via AIM to daltore Send a message via MSN to daltore Send a message via Yahoo to daltore
Re: VEX programming without transmitter

Interesting. I guess the syncing just realigns the motor signals. Does anyone know how to do this manually in WPILib (not using EasyC)? I'm using the most current version of WPILib that I know of (from January 22, 2008, latest I can find), but there are no functions that allude to fail-safing the motor outputs, nor anything in the documentation. I do eventually want to learn the default code, but that day is not today. If you don't know the way to do it directly in the WPILib C, do you know what the setting is in EasyC? Danke.
  #12   Spotlight this post!  
Unread 31-05-2009, 19:09
Doug Leppard's Avatar
Doug Leppard Doug Leppard is offline
Registered User
FRC #1902 (Exploding Bacon)
Team Role: Engineer
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Orlando
Posts: 435
Doug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond reputeDoug Leppard has a reputation beyond repute
Send a message via AIM to Doug Leppard
Re: VEX programming without transmitter

I found my problem, something killed my master code. I updated the code and now it works fine and works with or without transmitter.
__________________
Doug Leppard
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
Running program without transmitter bear24rw VEX 3 15-11-2007 23:41
Vex transmitter Instruction Manual Needed (FOUND IT!) boyntonstu VEX 0 04-08-2007 08:00
Vex Transmitter Disassembled Jeremiah Johnson VEX 4 01-06-2007 12:06
Vex Transmitter sale. Gdeaver VEX 2 11-02-2007 21:01
Vex Transmitter problem TheOtherGuy FIRST Tech Challenge 3 21-07-2006 17:01


All times are GMT -5. The time now is 02:01.

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