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

Subject: Re: help setting up XY table control with EPICS StreamerClass
From: Christian Pauly <[email protected]>
To: [email protected]
Date: Fri, 21 Jun 2013 11:07:38 +0200
No, only one motor can move at a time.
But i thought it is "bad style" to do this synchronous with such large
delays ? ( I had to define huge timeouts in the protocol to get it work...)

But i have a second problem with this approach:
I need some record, which tells me if the motors are running or not at
the moment. I need this information to control data taking during
XY-scans only while the motors are off.

Only solution i could find so far is a record like this:
record(calc, "XY:motoron")
{
    field(SCAN, "1 second")
    field(DESC, "Detect motor activity")
    field(INPA, "XY:moveu.PACT")
    field(INPB, "XY:moved.PACT")
    field(INPC, "XY:movel.PACT")
    field(INPD, "XY:mover.PACT")
    field(CALC, "A||B||C||D")
}

But this only works, if i define the record as regular scanning, so
there might be some time delay when the motors are running already, but
the next scan cycle is not startet yet. I want to work with short delays
between the motor moves of only few seconds for data taking.

If i make the record SCAN passive it does not work. the record always
returns 0, independant if the motors are moving or not. Maybe this is
connected to the PACT field, which can not be monitored ?


For a synchronous approach i thougt i make dfanout records for the four
motor moves, which first set motoron.VAL to 1, and then forward to the
actual move command, without waiting for the OK confirmation in the
protocol.

Then i would have another in-record, with "SCAN II-Intr", which waits
for an "OK" message. Every time the OK comes, this record would reset
motoron.VAL to 0... but how can i do this ???
I guess i somehow have to compare the input text with the string "OK" ???

Any help appreciated !

Christian





On 06/20/2013 06:53 PM, Eric Norum wrote:
Can the table accept commands while a previous command is active?   If not, what is wrong with just waiting for the OK?

On Jun 20, 2013, at 9:05 AM, Christian Pauly<[email protected]>  wrote:

Hi
I am trying to set up EPICS control for a XY-scanning table.
Control of the motor controller for the two stepper motors via RS232 is rather simple, and already implemented via StreamerClass:

The controller understands 4 simple commands:
u100/r
d100/r
l100/r
r100/r    to move the motors up/down/left/right by 100 steps.

In return, AFTER FINISHING the move (which can take up to 10sec), the controller returns a "OK/r/n"

So far i was using a protokoll like this:
move {
    out "\$1%d\r";
    in "OK\r\n";
}

and 4 EPICS records for moving like this:
record(longout, "XY:movel")
{
    field(DESC, "Move XY-Table left")
    field(DTYP, "stream")
    field(OUT,  "@devXYtableSupport.proto move(l) $(PORT) $(A)")
    field(FLNK, "XY:posX.PROC")
}

However, due to the long move-times, this is not ideal. As i understand from the documentation, one should rather implement an asynchronous control.

Best would be, to have a separate boolan record "motorsmoving" which is set to "TRUE" every time i send a move command to the controller, and which is set back to "FALSE" once the controller sends back the "OK".

Any advice how to proceed ???
I am fighting for days now...

Thanks for any help !

Christian




Replies:
Re: help setting up XY table control with EPICS StreamerClass Ralph Lange
Re: help setting up XY table control with EPICS StreamerClass Zenon Szalata

Navigate by Date:
Prev: Re: New EPICS support module "feller", release 0.1 Benjamin Franksen
Next: Problem in errlogRemoveListener Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: help setting up XY table control with EPICS StreamerClass Christian Pauly
Next: Re: help setting up XY table control with EPICS StreamerClass Ralph Lange
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·