View unanswered posts | View active topics It is currently Thu Jul 24, 2014 1:02 pm






Reply to topic  [ 6 posts ] 
firgelli-linearact-test3.c 
Author Message
Novice

Joined: Sat Sep 15, 2012 11:28 am
Posts: 68
Post firgelli-linearact-test3.c
Bonjour

I try to used the firgelli-linearact-test3.c ;see below ;

It seems that with

FLACextendLA(testMotor, 50, 40);

the actuator has a speed of 50 ( good )

and have to stop at 40 mm ( ???? )

but , it goes always at the end and not stop at 40 mm, it means it goes through to 100 mm ;

it is strange ?

with NXTG blocks , there is no such problem ; it is OK ;

waht do you think about that ;

may I did a mistake somethere ? or no understood how it works ?

thanks

didier


Code:
/*
 * $Id: firgelli-linearact-test3.c 114 2012-10-08 18:11:44Z xander $
 */

/**
 * firgelli-linearact.h provides an API for the Firgelli Linear Actuator.  This program
 * demonstrates how to use that API.
 *
 * Changelog:
 * - 0.1: Initial release
 *
 * TODO:
 * - Add ramping support (being worked on, has a few bugs)
 *
 * Credits:
 * - Big thanks to Firgelli for providing me with a Linear Actuator to play with!
 *
 * License: You may use this code as you wish, provided you give credit where it's due.
 *
 * THIS CODE WILL ONLY WORK WITH ROBOTC VERSION 3.51 AND HIGHER.
 * Xander Soldaat (xander_at_botbench.com)
 * 15 february 2010
 * version 0.1
 */

#include "drivers/firgelli-linearact.h"

task main () {
  tMotor testMotor = motorA;

  PlaySound(soundBeepBeep);
  nxtDisplayBigTextLine(3, "Retract");
  FLACretractLA(testMotor, 100);
  wait1Msec(5000);

  // This stops the motor, handy in case of emergencies
  FLACstopLA(motorA);
  while(!isDone(testMotor)) wait1Msec(50);
  wait1Msec(200);
  nMotorEncoder[testMotor] = 0;
  wait1Msec(1000);

  PlaySound(soundBeepBeep);
  eraseDisplay();
  nxtDisplayBigTextLine(1, "Extend");
  nxtDisplayTextLine(3, "ticks:  40");
  nxtDisplayTextLine(4, "speed:  50");
  FLACextendLA(testMotor, 50, 40);
  while(!isDone(testMotor)) wait1Msec(50);
  if (isStalled(testMotor))
    nxtDisplayTextLine(7, "STALLED");
  wait1Msec(1000);


  PlaySound(soundBeepBeep);
  eraseDisplay();
  nxtDisplayBigTextLine(1, "Done");
  wait1Msec(2000);
}

/*
 * $Id: firgelli-linearact-test3.c 114 2012-10-08 18:11:44Z xander $
 */


Tue Oct 23, 2012 9:07 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3162
Location: Rotterdam, The Netherlands
Post Re: firgelli-linearact-test3.c
Unfortunately, this program works very well with my pre-production LA and I cannot reproduce it.

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Tue Oct 23, 2012 12:07 pm
Profile WWW
Novice

Joined: Sat Sep 15, 2012 11:28 am
Posts: 68
Post Re: firgelli-linearact-test3.c
Thanks

do you mean you want to built LA yourself ?

didier


Tue Oct 23, 2012 12:38 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3162
Location: Rotterdam, The Netherlands
Post Re: firgelli-linearact-test3.c
No, what I meant was that the LA that I was sent by Firgelli is a pre-production that seems to behave a lot differently from the final production version that is currently being sold.

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Wed Oct 24, 2012 6:50 am
Profile WWW
Novice

Joined: Sat Sep 15, 2012 11:28 am
Posts: 68
Post Re: firgelli-linearact-test3.c
of course

sorry for my bad english

I used to translate " mot à mot "

very bad ...

didier


Wed Oct 24, 2012 9:00 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3162
Location: Rotterdam, The Netherlands
Post Re: firgelli-linearact-test3.c
No worries, I am sure your English is better than my French :)

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Fri Oct 26, 2012 12:58 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.