Player driver for Maxon DES motor controller (Part 1 of 2)

View: New views
5 Messages — Rating Filter:   Alert me  

Player driver for Maxon DES motor controller (Part 1 of 2)

by John Zaitseff-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Many people on this list may well want to use Maxon DC or AC motors
for their robot platforms.  We in the Centre for Autonomous Systems
at the University of New South Wales, for example, purchased a
couple of EC45 250W motors for our newest platform, along with two
Maxon 4QEC (DES 70/10) servoamplifier motor controllers.

Maxon provide a Windows-only DLL interfacing library, DESCMD.DLL,
that may be used to communicate with the DES controllers.  
Unfortunately, Maxon do NOT provide the DLL's source code (and a
request for this was politely declined), so interfacing to the
controller under Linux, for example, is problematic.  At least the
documentation is quite reasonable and the technical staff are quite
helpful!

We wanted to control our motors using Player under Linux, so the
only option open to us was to write our own interfacing code.  That
code is attached to this e-mail and is licensed under the GNU
General Public Licence, version 2 or later.

Part 2 of this e-mail will contain the Player driver that uses this
code to provide a position1d interface.

I hope this helps other people out there who are using Maxon motor
controllers!

Yours truly,

John Zaitseff

--
John Zaitseff            Centre for Autonomous Systems,
Research Engineer        School of Computer Science and Engineering,
Phone: +61 2 9385 6938   University of New South Wales,
Fax:   +61 2 9385 5995   Sydney, NSW, 2052, Australia.

[attachment removed]
[attachment removed]
[attachment removed]
[attachment removed]
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Playerstage-users mailing list
Playerstage-users@...
https://lists.sourceforge.net/lists/listinfo/playerstage-users

Player driver for Maxon DES motor controller (Part 2 of 2)

by John Zaitseff-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

As mentioned in my previous e-mail, the Centre for Autonomous
Systems purchased a couple of Maxon EC45 250W motors for our newest
platform, along with two 4QEC (DES 70/10) servoamplifier motor
controllers.  I ended up writing a low-level C interface to those
controllers, as contained in the files "desapi.h" and "desapi.c".

We were interested in controlling our platform using Player 2.0.  
The simplest and most elegant way I could think of writing a Player
driver for our application was to split the task into two: first, a
position1d interface per motor controller, then, a driver that
would take two instances of the position1d driver and present a
position2d interface.

This e-mail contains the Player 2.0 position1d driver, maxon4qec.  
I'm sure that someone can update it for Player 3.0, if so inclined.  
The low-level interface is in my previous e-mail.

I hope this ends up being useful for anyone using Maxon motors and
controllers!

Yours truly,

John Zaitseff

--
John Zaitseff            Centre for Autonomous Systems,
Research Engineer        School of Computer Science and Engineering,
Phone: +61 2 9385 6938   University of New South Wales,
Fax:   +61 2 9385 5995   Sydney, NSW, 2052, Australia.

[attachment removed]
[attachment removed]
[attachment removed]
#########################################################################
#                                                                       #
#  Sample Configuration for Maxon 4QEC Motor Controller Player Driver   #
#                                                                       #
#########################################################################

# Author: John Zaitseff <J.Zaitseff@...>
# Date:   8th October, 2009
#
# $Id: maxon4qec-test.cfg 1640 2009-10-08 05:39:45Z zaitseff $

driver
(
    name "maxon4qec"
    plugin "maxon4qec.so"
    provides ["position1d:0"]
    port "/dev/ttyS0"

    driver_timeout 10.0 # Player driver timeout (sec)
    mainloop_delay 25000 # Main loop delay (usec)

    speedreggainp 682 # P-gain for speed regulation
    speedreggaini 220 # I-gain for speed regulation
    peakcurrent 15000 # Peak current (mA)
    maxcontcurrent 5000 # Max. continuous current (mA)
    maxspeed 5000 # Max. idle speed (rpm)
    acceleration 500 # Acceleration (rpm per 128ms)
    encresolution 500 # Encoder resolution (cpt)

    gearratio 100.0 # Gear reduction ratio on motor
    vel_tweak 1.0 # Velocity tweak factor
    pos_tweak 1.0 # Position tweak factor

    debug false # Provide diagnostic messages?
    test_mode 0 # Specific testing disabled
)

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Playerstage-users mailing list
Playerstage-users@...
https://lists.sourceforge.net/lists/listinfo/playerstage-users

Re: Player driver for Maxon DES motor controller (Part 2 of 2)

by Piotr Trojanek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear John,

where can we find the mentioned desapi.c and "desaphi.h" files?

Looking at the DES 70/10 manual it seems that the motor speed is set up by analog voltage level.
This unit does not seems to have serial port which your driver is using. Can you tell how do you
interface this motor controller with serial port?

Best regards,

--
Piotr Trojanek
Robot Control and Recognition Systems Team,
Institute of Control & Computation Engineering,
Warsaw University of Technology



On Tue, Oct 27, 2009 at 03:55, John Zaitseff <J.Zaitseff@...> wrote:
As mentioned in my previous e-mail, the Centre for Autonomous
Systems purchased a couple of Maxon EC45 250W motors for our newest
platform, along with two 4QEC (DES 70/10) servoamplifier motor
controllers.  I ended up writing a low-level C interface to those
controllers, as contained in the files "desapi.h" and "desapi.c".

We were interested in controlling our platform using Player 2.0.
The simplest and most elegant way I could think of writing a Player
driver for our application was to split the task into two: first, a
position1d interface per motor controller, then, a driver that
would take two instances of the position1d driver and present a
position2d interface.

This e-mail contains the Player 2.0 position1d driver, maxon4qec.
I'm sure that someone can update it for Player 3.0, if so inclined.
The low-level interface is in my previous e-mail.

I hope this ends up being useful for anyone using Maxon motors and
controllers!

Yours truly,

John Zaitseff

--
John Zaitseff            Centre for Autonomous Systems,
Research Engineer        School of Computer Science and Engineering,
Phone: +61 2 9385 6938   University of New South Wales,
Fax:   +61 2 9385 5995   Sydney, NSW, 2052, Australia.

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Playerstage-users mailing list
Playerstage-users@...
https://lists.sourceforge.net/lists/listinfo/playerstage-users




--
Piotr Trojanek

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Playerstage-users mailing list
Playerstage-users@...
https://lists.sourceforge.net/lists/listinfo/playerstage-users

Re: Player driver for Maxon DES motor controller (Part 2 of 2)

by John Zaitseff :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear Piotr,

> where can we find the mentioned desapi.c and "desaphi.h" files?

That should have been in the first e-mail labelled Part 1; it may
have been held up by the Player/Stage mailing list moderator as
being "too big".  I can send it to you directly if that e-mail does
not come through quickly enough.

> Looking at the DES 70/10 manual it seems that the motor speed is
> set up by analog voltage level.  This unit does not seems to have
> serial port which your driver is using.  Can you tell how do you
> interface this motor controller with serial port?

Actually, it DOES have a serial port: see pins 18-20 on the
controller, described on page 12 of the DES 70/10 Operating
Instructions.  It also has a CAN-bus interface, but we are not using
that.  You can program the DES to operate either from the analog
voltage inputs, or from commands sent to it via the serial port.
The test program (desapi-test.c) in Part 1 shows how to do this
without using Player, if that is what you want to do.

I hope this helps!

Yours truly,

John Zaitseff

--
John Zaitseff                    ,--_|\    The ZAP Group
Phone:  +61 2 9643 7737         /      \   Sydney, Australia
E-mail: J.Zaitseff@...   \_,--._*   http://www.zap.org.au/
                                      v

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Playerstage-users mailing list
Playerstage-users@...
https://lists.sourceforge.net/lists/listinfo/playerstage-users

Re: Player driver for Maxon DES motor controller (Part 2 of 2)

by Piotr Trojanek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear John,

thank you. It was my mistake, I was looking at the "DEC" not "DES" manual...

Thank you for your valuable work and we have to be patient waiting for the "desapi" files.

Best regards,

On Tue, Oct 27, 2009 at 09:12, John Zaitseff <J.Zaitseff@...> wrote:
Dear Piotr,

> where can we find the mentioned desapi.c and "desaphi.h" files?

That should have been in the first e-mail labelled Part 1; it may
have been held up by the Player/Stage mailing list moderator as
being "too big".  I can send it to you directly if that e-mail does
not come through quickly enough.

> Looking at the DES 70/10 manual it seems that the motor speed is
> set up by analog voltage level.  This unit does not seems to have
> serial port which your driver is using.  Can you tell how do you
> interface this motor controller with serial port?

Actually, it DOES have a serial port: see pins 18-20 on the
controller, described on page 12 of the DES 70/10 Operating
Instructions.  It also has a CAN-bus interface, but we are not using
that.  You can program the DES to operate either from the analog
voltage inputs, or from commands sent to it via the serial port.
The test program (desapi-test.c) in Part 1 shows how to do this
without using Player, if that is what you want to do.

I hope this helps!

Yours truly,

John Zaitseff

--
John Zaitseff                    ,--_|\    The ZAP Group
Phone:  +61 2 9643 7737         /      \   Sydney, Australia
E-mail: J.Zaitseff@...   \_,--._*   http://www.zap.org.au/
                                     v



--
Piotr Trojanek

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Playerstage-users mailing list
Playerstage-users@...
https://lists.sourceforge.net/lists/listinfo/playerstage-users