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  2017  2018  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  2017  2018  2019  2020  2021  2022  2023  <2024
<== Date ==> <== Thread ==>

Subject: Re: Galil controller with incremental encoder question
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>, "padmoz at tpg.com.au" <padmoz at tpg.com.au>
Date: Thu, 21 Mar 2024 23:06:58 +0000
Hi Mark,

Thanks for the reply, sorry it's taken awhile to get back to this.

I am working on axis C on a Galil 4183 with the D3140 servo amplifier unit installed.  

I have attached a screen shot of the motorx_all screen (Galil.png).  I have also attached a screen shot of the galil_motor_extras.adl for this axis (Galil_extras.png).

The axis is configured as Servo with Reverse Quadrature encoder.  (The problem happens with Normal Quadrature as well).

In the motorx_all screen I have set Use Encoder=Yes (UEIP field).  I put the axis in Set mode and type 0 into the VAL field.  VAL, DVAL, and RVAL all set set to 0 as expected.  However, RRBV, RBV, and DRBV do not change, they are the same encoder readback as before I set the position.

  • Ensure dual feedback mode is off with DFx=0. 

I have done that.

  • I recommend checking if the value is written to the hardware correctly by using Galil commands DEx=?, DPx=? (where x is the motor in range A-H). 

DEC=? returns 0, but DPC=? returns -4000, so the encoder value was not written to the hardware.

Here are the PVs you asked about:

(base) [epics@corvette ~]$ caget 13BMC:Galil7:m73_MTRTYPE_CMD
13BMC:Galil7:m73_MTRTYPE_CMD   Servo

(base) [epics@corvette ~]$ caget 13BMC:Galil7:m73_MTRTYPE_STATUS
13BMC:Galil7:m73_MTRTYPE_STATUS Servo

(base) [epics@corvette ~]$ caget 13BMC:Galil7:m73_MENCTYPE_CMD
13BMC:Galil7:m73_MENCTYPE_CMD  Reverse Quadrature

(base) [epics@corvette ~]$ caget 13BMC:Galil7:m73_MENCTYPE_STATUS
13BMC:Galil7:m73_MENCTYPE_STATUS Reverse Quadrature

(base) [epics@corvette ~]$ caget 13BMC:Galil7:m73_AENCTYPE_CMD
13BMC:Galil7:m73_AENCTYPE_CMD  Normal Quadrature

(base) [epics@corvette ~]$ caget 13BMC:Galil7:m73_AENCTYPE_STATUS
13BMC:Galil7:m73_AENCTYPE_STATUS Normal Quadrature

(base) [epics@corvette ~]$ caget 13BMC:Galil7:m73.ERES
13BMC:Galil7:m73.ERES          0.0001

(base) [epics@corvette ~]$ caget 13BMC:Galil7:m73.MRES
13BMC:Galil7:m73.MRES          0.0001

Thanks,
Mark


From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Mark Clift via Tech-talk <tech-talk at aps.anl.gov>
Sent: Wednesday, March 13, 2024 9:49 PM
To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Re: Galil controller with incremental encoder question
 
Hi Mark,
On my test system, using a motor with incremental encoder, I can set the position and RRBV updates to the new value.  So I am unable to reproduce the error at this time.

Setting a new motor position involves setting the position on the controller and then reading the position back in the poll cycle.  I recommend checking if the value is written to the hardware correctly by using Galil commands DEx=?, DPx=? (where x is the motor in range A-H).  I'd need to know the motor type to determine which of the above 2 commands to use, so I recommend trying both of the above commands.  At the bottom of the DMC controller screen, is a console where folks can type Galil commands whilst the driver is running.  If the value is not written to hardware I recommend checking GalilAxis::setPosition and GalilAxis::setEncoderPosition methods to find where the write to hardware is failing.

Generally speaking with stepper motors, ERES and MRES are different values and both must be set if an encoder is used.  With servo motors ERES, and MRES are normally the same.

The GalilAxis::poller method reads the motor readback position from hardware, it's a good place to look if the driver isn't reading the value from the hardware correctly.

Ensure dual feedback mode is off with DFx=0.  If DFx=1 then the main and auxiliary encoder registers are swapped.

If no solution is found, could you please report the value of the following records on your system:
$(P)$(M)_MTRTYPE_CMD
$(P)$(M)_MTRTYPE_STATUS
$(P)$(M)_MENCTYPE_CMD
$(P)$(M)_MENCTYPE_STATUS
$(P)$(M)_AENCTYPE_CMD
$(P)$(M)_AENCTYPE_STATUS
$(P)$(M).ERES
$(P)$(M).MRES
And I will try again to reproduce the problem.
Kind regards,
Mark Clift






Attachment: Galil.png
Description: Galil.png

Attachment: Galil_extras.png
Description: Galil_extras.png


Replies:
RE: Galil controller with incremental encoder question Mark Rivers via Tech-talk
References:
Re: Galil controller with incremental encoder question Mark Clift via Tech-talk

Navigate by Date:
Prev: Re: Streamdevice - record only completes processing every other activation Zimoch Dirk via Tech-talk
Next: RE: Galil controller with incremental encoder question Mark Rivers via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <2024
Navigate by Thread:
Prev: Re: Galil controller with incremental encoder question Mark Clift via Tech-talk
Next: RE: Galil controller with incremental encoder question Mark Rivers via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <2024
ANJ, 11 Sep 2024 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·