Pelican : How to turn motors on? Eclipse HL

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Pelican : How to turn motors on? Eclipse HL

Phteven
Hello there,

I recently acquired a Pelican. Currently I am having trouble controlling it by Eclipse.

Already downloaded  "AscTecResearchUpgrade2013_V2.1d_13_05_2014.exe" and executed it. Did all the steps and now everything seems to be up to date.

I can turn on the motors by the Futaba T7C RC. However, I can not do this by "Code".

The comments in the sdk.c file reads like this:

/******* How to flash the high level processor ********
 *
 * The easiest way to get your code on the high level processor is to use the JTAG-adapter.
 *
 * It needs three steps to get your code on the high level processor.
 * 1. Build your code ("Build Project")
 * 2. Connect your JTAG adapter and start the JTAG connection (Run "OpenOCD Asctec-JTAG")
 * 3. Flash the processor (Run "Asctec JTAG Debug")
 *
 * In the menu "Run -> External Tools -> External Tools Configuration..." you
 * will find "OpenOCD Asctec-JTAG". If the JTAG connection was activated
 * correctly, the console will show only the following line:
 * "Info:    openocd.c:92 main(): Open On-Chip Debugger (2007-08-10 22:30 CEST)"
 *
 * Do not launch more than ONE JTAG-connection at the same time!
 *
 * In the menu "Run -> Debug Configurations..." you will find "Asctec JTAG Debug"
 * If the code was successfully flashed on the processor, the program will switch
 * to the Debug window.
 *
 * If you want to flash the high level processor using a serial interface (AscTec USB adapter)
 * and bootloader software like "Flash Magic", you can find the main.hex in your workspace folder.
 *
 */

All the things work fine. PC (Win 7 Enterprise 32Bit) is connected with USB to the JTAG plug. The JTAG is connected to the black slot near the HL serial connector.

I commented "in" this code:
[CODE]
        static int timer=0;
        if(++timer<1000) SDK_EXAMPLE_turn_motors_on();
        else if(timer<2000) SDK_EXAMPLE_turn_motors_off();
        else timer=0;
[/CODE]


right below, there are those lines:

[CODE]
//examples which show the different control modes

        //SDK_EXAMPLE_direct_individual_motor_commands();
        //SDK_EXAMPLE_direct_motor_commands_with_standard_output_mapping();
        //SDK_EXAMPLE_attitude_commands();
        //SDK_EXAMPLE_gps_waypoint_control();
[/CODE]

No matter what SDK_EXAMPLE is activated, the Pelican makes a loud beep and the mounted gimbal is working. But no motors are turned on or off every second (like i thought this code would do).

Eclipse is in debug mode and it seems to work, except the motors are never turned on. Theres no breakpoint and I hit "resume".



It seems like the code didnt go to the Pelican. Can someone help me to turn motor on by Eclipse?



Thank You
Reply | Threaded
Open this post in threaded view
|

Re: Pelican : How to turn motors on? Eclipse HL

andre@asctec
Hi,

to make the Pelican react to any SDK code at all, you need to enable the serial switch on your RC. This is a safety feature. As long as the serial switch is off, all commands from the HLP are ignored.

Furthermore, the motors can only be turned on by the RC (another safety feature). To make this demo work, do the following:
1. Switch OFF the serial switch (push away from you)
2. Start the motors, manual mode, lowest thrust
3. Switch ON the serial switch
4. the demo is now running and should turn on and off your motors

If you disable the serial switch, you are back in manual mode. Be very careful, if you moved the thrust stick in the meantime, the system will directly jump to the set thrust! It's best to keep the thrust stick at the lowest position at all times during this demo.

Cheers,
Andre
Andre Ryll
AscTec Application Engineer