EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: VAL field in Motor record Default unit
From: <[email protected]>
To: <[email protected]>
Date: Tue, 14 Feb 2017 11:05:27 +0000
This sounds remarkably like a system we have here, currently working under our old control system rather than EPICS. Potentiometer readback on non-linear movement, DC motor, Galil controller (admittedly a different model), and having to run a servo without being able to use the pot as an encoder. The pot is wired in to one of the Galil analog inputs, giving us an ability to read it within the Galil. The analog inputs can't be used for the on-board PID, at least not in my experience, but that might be down to the non-linearity of the system.

To give you an idea of the solution we used in the old system:
* There is a lookup table relating potentiometer values to distance
* There is a program which is run in the Galil, written in Galil commands
* The potentiometer value wanted is written to the Galil as a variable, and a thread started to run the Galil program - This is done by the control system (was LabVIEW, hopefully soon to be EPICS)
* The Galil program does a basic lookup - where am I now compared to where I want to be, sets things such as the torque limit and heads off in the right direction - This is done in a loop, and moves slower closer to the desired 'position', so not a PID, but accurate enough.

All the movement is handled by the Galil program. If you use that variety of solution, you could bypass the motor record and use an ASYN driver,  read back the potentiometer value, write the variable, start the thread. So similar to the suggestion from Mark, but offloading the control logic to the controller, so that if you lose the link to the computer the motor should still stop when it gets to the set position.

We are modifying an older version of the Galil IOC (which is the one we use as standard) to allow us to set the variable, start the thread and use the RDBL field to get the analog value, and then use the motor record, but that is to keep our user interfaces consistent, and to limit the amount of rework from that side when the items being controlled are replaced.

Regards,
Kathryn

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mark Rivers
Sent: 14 February 2017 08:40
To: Joey Thai
Cc: Matt Dentinger; [email protected]
Subject: Re: VAL field in Motor record Default unit

It looks like your Galil controller has analog inputs, so you probably don't need an additional A/D card. However it describes these inputs as "uncommitted" so I don't know if it can use them for feedback using on-board PID. If not you should be able to read the voltages as strings and use the epid record as I suggested in my previous message.

Mark


Sent from my iPhone

On Feb 13, 2017, at 7:11 PM, Mark Rivers <[email protected]<mailto:[email protected]>> wrote:

You may be able to do what you want by doing the following:

Don't use the motor record.

I think the Galil EPICS driver supports the asynOctet interface, allowing you to send strings to the controller.

If so, you can use the epid record to close the feedback loop. You need an A/D converter to read the potentiometer. You use the target position of the potentiometer as the desired value of the PID and have the output of the epid record send the velocity command to the Galil. You will want to implement a deadband so that it does not send a non-zero velocity if the potentiometer is within the deadband.

Mark


Sent from my iPhone

On Feb 13, 2017, at 10:04 AM, Joey Thai <[email protected]<mailto:[email protected]>> wrote:

Hi Mark,

We have an analog based feedback loop using a potentiometer, which is as close as we can get for exact positioning. The reason why we aren't using an encoder is because there is a space constraint and we plan on implementing this system with 40 motors. We're worried that this inconsistency with the VAL field will not work with our analog feedback and we would like to know more about it before proceeding with our project

Do you have any tips on how to proceed with this route using a potentiometer for a feedback loop?

Best,
Joey Thai



On Mon, Feb 13, 2017 at 11:50 AM, Mark Rivers <[email protected]<mailto:[email protected]>> wrote:
You cannot really control a D.C. motor without an encoder.  I think the effect you are seeing correlating VAL with velocity is because the error signal (target position minus current position) is larger for a larger VAL (target position).  It the controller has no feedback on the current position or velocity. I would expect that at some point it would issue a "following error", but I have never used the Galil so I'm not sure.

Howdo you want to control the motor from EPICS? Just set a velocity? Without an encoder a given controller output voltage will produce different velocities depending on load.

Mark


Sent from my iPhone

On Feb 13, 2017, at 9:40 AM, Joey Thai <[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>> wrote:

Hi everyone,

I appreciate all of your responses.

Peter: The type of motor that we have is a DC motor and the part is specified here<http://www.portescap.com/products/brush-dc-motor/22v28-48-brush-dc-coreless-motor>.

Tim: The controller we have is a DMC-4080 from Galil and is not homemade. The VBAS = 0, VELO = 25000, and ACCL = 1, and these are default values. The website for this controller is found here<http://www.galil.com/motion-controllers/multi-axis/dmc-40x0>.

Best,
Joey Thai

On Mon, Feb 13, 2017 at 11:26 AM, D Peter Siddons <[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>> wrote:

Hi Joey,

To be clear, what kind of motor is that? Is it a simple DC motor or a stepper motor. It seems to have a fairly complex controller. What kind of controller is that? Is it commercial or home-made?

Pete.


On 02/13/2017 02:01 PM, Joey Thai wrote:
Hi Tim,

I am also a student at the University of Washington working on the same project as Matthew. We greatly appreciated your response and found it consistent with the "Motor Record and related software" documentation provided by this website: <http://www.aps.anl.gov/bcda/synApps/motor/R6-9/motorRecord.html> http://www.aps.anl.gov/bcda/synApps/motor/R6-9/motorRecord.html

The problem we have is that the VAL field seems to change the speed of the coreless brushed motor's rotation. The YouTube video below demonstrates the speed of the motor when we set the VAL field to 100, then 30:
https://www.youtube.com/watch?v=xR7BVMfGruQ

Notice that the speed of the motor when VAL is set to 30 is noticeable slower than the speed when VAL is set to 100. Since the motor we are using is not using an encoder, the motor does not know its current position. As Matthew said earlier, VAL seems to affect the speed of the motor's rotation.

I guess my question is, is there some sort of hidden relationship between the VAL field and the speed of a motor's rotation?

Best Regards,
Joey Thai

On Sat, Feb 11, 2017 at 11:29 PM, Mooney, Tim M. <<mailto:[email protected]<mailto:[email protected]>>[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>> wrote:
Hi Matthew,

The VAL field is the position you want the motor to move to.  You choose the units you want for the VAL field, and then you set the MRES (motor resolution) field to be the distance, in those units, that the motor will move when it's driver gets one step pulse. (You should also set the EGU field to some string that will tell the user what units you chose for the VAL field.  The EGU field isn't used for any other purpose.)

Other background information: the motor's running speed (VELO) is in EGUs per second.  The motor's acceleration time (ACCL) is the number of seconds you want it to take for the motor to get from its base speed (VBAS) to its running speed (VELO). Stepper motors have a resonant speed that you want to avoid.  If you set VBAS to be higher than the resonant speed, the motor will leap immediately to the base speed, avoiding the resonance, and then accelerate from there to the running speed.  This is why short moves are slow, and longer moves are faster.



Tim Mooney ([email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>) (630)252-5417<tel:%28630%29252-5417><tel:%28630%29%20252-5417>
Beamline Controls Group (<http://www.aps.anl.gov>www.aps.anl.gov<http://www.aps.anl.gov><http://www.aps.anl.gov>)
Advanced Photon Source, Argonne National Lab

________________________________
From: <mailto:[email protected]<mailto:[email protected]>> [email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>> [[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>] on behalf of Matt Dentinger [<mailto:[email protected]<mailto:[email protected]>>[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>]
Sent: Saturday, February 11, 2017 8:52 PM
To: [email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>
Subject: VAL field in Motor record Default unit

Dear Tech-Talk,

   Hi, I am a student at the University of Washington and I am learning how to navigate and use EPICS programming.  For the task at hand I will not be able to use encoders, making use of absolute positioning impossible, so I was wondering what default unit the VAL field was in.  Through some testing it seems the larger the value, the faster the motor moves so I guessed that it might be a number that somehow represents revolutions per second (or another given time).  Hope you can shed some light on my issue.  Also, haven't subscribed yet, but I may have to depending on how this project continues.  Thanks again.

  Best,

     Matthew Dentinger



--
D. Peter Siddons
Detector Development Group Leader
Photon Science Division, NSLS-II,
Bldg. 535B
Brookhaven National Laboratory
Upton, NY 11973

email: [email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>
Phone: (631) 344-2738<tel:%28631%29%20344-2738><tel:(631)%20344-2738>







References:
VAL field in Motor record Default unit Matt Dentinger
RE: VAL field in Motor record Default unit Mooney, Tim M.
Re: VAL field in Motor record Default unit Joey Thai
Re: VAL field in Motor record Default unit D Peter Siddons
Re: VAL field in Motor record Default unit Joey Thai
Re: VAL field in Motor record Default unit Mark Rivers
Re: VAL field in Motor record Default unit Joey Thai
Re: VAL field in Motor record Default unit Mark Rivers
Re: VAL field in Motor record Default unit Mark Rivers

Navigate by Date:
Prev: RE: Basler HD Camera device support tom.cobb
Next: RE: Basler HD Camera device support tom.cobb
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: VAL field in Motor record Default unit Mark Rivers
Next: RE: VAL field in Motor record Default unit Mark Clift
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
ANJ, 21 Dec 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·