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  <20092010  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  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: PMAC IP and motor records
From: Dirk Zimoch <[email protected]>
To: "Rees, NP (Nick)" <[email protected]>
Cc: tech-talk <[email protected]>
Date: Tue, 13 Jan 2009 15:12:55 +0100
Hi Nick,

The PMAC says its version is 1.938. The controller is a Turbo PMAC2. The connection uses TCP.

The PMAC is part of a "turn key" system which came with a Windows program. But the program is not flexible enough. Thus, our users asked me to replace the Windows computer with an EPICS ioc. I have not configured the PMAC and cannot change the configuration. I can only reverse-engineer the system from what I found in the source code of the Windows program and from spying on the network traffic.

In particular I found in the configuration, that for any motor number n, the encoder can be read with M210+n. For example for motor 1 read M211. I do not now if that is typical for PMAC or special to this application.

Where can I learn the communication protocol, for example, what "M211" actually means or does? I found many documents on the delta tau pages but which one should I read a beginner? At the moment all your talking about Q and P variables, and coordinate systems does not mean much to me.

I also have the problem that if I open and close a TCP socked to the PMAC a few times, the PMAC hangs up and needs a power cycle. Have you ever seen such an effect? On the other hand, restarting the Windows program does not show this effect.

Dirk

Rees, NP (Nick) wrote:
Dirk,

Gosh, suddenly everyone wants to know about the PMAC.
As far as I can tell, you have configured your pmac correctly - in fact
better than the example I gave in the earlier response to Richard
Pastrick because the last parameter in drvAsynMotorConfigure should be
one more than the last parameter in pmacAsynMotorCreate (because of a
1-based and 0-based numbering conflict).

What seems to be happening is the first error message you get is a
timeout when sending a VR_PMAC_FLUSH command to the PMAC. This is what
pmacFlush does in the interpose layer. I can't explain this unless you
have a old version of the PMAC firmware which doesn't support all the
current functionality. Please let me know what the "ver" command returns
and what type of PMAC you are trying to control. This is my best guess
as to the problem. I assume you have it running TCP as discussed in the
last thread on this back in December.

In answer to your other questions:

Can the motor record read the encoder values from PMAC?

The motor record has the current profiled demand position in RMP and the
encoder value in REP. What is meant by "encoder value" depends on how
you have configured the PMAC.

How can I use programs (homing an scanning procedures) on the PMAC?

You have full access to all PMAC functionality via the asynOctet port.
At DLS, we also have a set of interface guidelines to interface motion
programs so everything is standardised, and if you abide by these
guidelines, then we also have a pmacAsynCoord driver to connect
coordinate system axes to motor records. The specific pmacAsynCoord
driver requirements are:

 - Q71..79 are reserved for the axis demand positions, and are set by
the EPICS software
 - A position reporting PLC must be implemented which reports back the
positions of co-ordinate system axes A,B,C,U,V,W,X,Y,Z on variables
Q81..89
 - The axis deadbands must be reported on variables Q91..Q99
 - A standard motion program to move the co-ordinate system axes must
also be implemented
 - If motor resolution and offset parameters need to be incorporated,
they should be defined in the variables P1xx and P3xx respectively (xx
represents the axis number)

How to access other values (analog and binary IO) on the PMAC?

These are accessed directly through the asynOctet port. Unfortunately,
it seems that streamDevice and asynMotor drivers conflict and end up in
a deadlock, so currently we use asynRecord and scalc to do the parsing.
We suspect that if we change asynMotor to use FIFO's for the status
callbacks (like Mark modified all the standard asyn types to do last
year) then the deadlock will go away, but we haven't checked this.

My corrected example fo Richard Pastrick for a 4 axis PMAC you should
do:

 Configure the standard Ethernet asynIPPort
drvAsynIPPortConfigure("pmac1E", "172.23.86.84:1025", 0, 0, 0)

# Create the interpose layer on this port to properly handle the PMAC
protocol
pmacAsynIPPortConfigure("pmac1E", 0)
# Create a pmacAsynMotor driver connected tto this port
pmacAsynMotorCreate("pmac1E", 0, 0, 4)
# Setup the asynMotor layer (note the last parameter has to be one more
than the number of axes you specified in pmacAsynMotorCreate).
# Note the new asynPort name.
# There will be a warning at this stage about not being able to create
axis 0 - you should ignore this.
drvAsynMotorConfigure("pmac1", "pmacAsynMotor", 0, 5)

Cheers,

Nick Rees
Principal Software Engineer           Phone: +44 (0)1235-778430
Diamond Light Source Fax: +44 (0)1235-446713
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Dirk Zimoch
Sent: 13 January 2009 09:19
To: tech-talk
Subject: PMAC IP and motor records

Hi all,

I am trying to set up a few motors on a PMAC system with ethernet connection. I have never worked with PMAC before and need some help.

I tried the tpmac package but I do not understand completely what I have to write in the startup script and how set up the motor records. I need access to 13 motors with the numbers 1,2,3,4,5,7,8,9,10,11,17,18,19.

Can someone send me an example startup script and an example motor record, please?

So far, I guessed from various bits of documentation:

drvAsynIPPortConfigure pmac xx.xx.xx.xx:1025
pmacAsynIPPortConfigure pmac 0
pmacAsynMotorCreate pmac 0 0 19
drvAsynMotorConfigure pmacmotor pmacAsynMotor 0 20

After pmacAsynMotorCreate, I get error messages like these:

Creating PMAC motor driver on port pmac, address 0: card: 0, naxes: 19
2009/01/13 10:06:18.004 pmac read pmacFlush failed - thisRead=0, eomReason=0, status=1 2009/01/13 10:06:18.666 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:06:18.882 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:06:19.182 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:06:25.801 Read/write error to PMAC card 0, axis 9 command I900=1. Status=1, Error=192.6.94.5:1025 timeout: Resource temporarily unavailable 2009/01/13 10:06:26.117 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:06:26.317 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:06:26.910 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:06:27.127 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:06:27.427 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:06:34.050 Read/write error to PMAC card 0, axis 14 command I1400=1. Status=1, Error=192.6.94.5:1025 timeout: Resource temporarily unavailable 2009/01/13 10:06:34.367 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:06:34.567 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:06:36.050 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:06:36.270 drvPmacGetAxisInitialStatus: not all status values returned 2009/01/13 10:06:42.269 pmac read pmacFlush failed - thisRead=0, eomReason=0, status=1 2009/01/13 10:06:42.370 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:06:42.570 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:06:42.870 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:06:43.270 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:06:43.770 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:06:50.523 pmac read pmacFlush failed - thisRead=0, eomReason=0, status=1 2009/01/13 10:06:50.624 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:06:50.824 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:06:51.124 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:06:51.526 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:06:52.028 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:06:52.751 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:06:53.452 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:06:54.252 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:06:55.153 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:06:56.153 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:06:57.153 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:06:58.153 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:06:59.153 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:07:05.694 pmac read pmacFlush failed - thisRead=0, eomReason=0, status=1 2009/01/13 10:07:05.794 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:07:05.994 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:07:06.294 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:07:06.694 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:07:07.194 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:07:07.794 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:07:08.494 pmac read pmacReadReady failed status=1,retval=02009/01/13 10:07:09.294 pmac read pmacReadReady failed status=1,retval=0

With only drvAsynIPPortConfigure and pmacAsynIPPortConfigure, I can get access to the asynOctet layer and get responses to strings like "M9", but only sometimes. Often, stopping the ioc brings the PMAC in a state where it does not respond any more. Only a power cycle of the PMAC help. Any idea what is wrong?

Some more questions:
Can the motor record read the encoder values from PMAC?
How can I use programs (homing an scanning procedures) on the PMAC?
How to access other values (analog and binary IO) on the PMAC?

Thanks in advance for any help
Dirk

--
Dr. Dirk Zimoch
Paul Scherrer Institut, WBGB/006
5232 Villigen PSI, Switzerland
Phone +41 56 310 5182


<DIV><FONT size="1" color="gray">This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
</FONT></DIV>

--
Dr. Dirk Zimoch
Paul Scherrer Institut, WBGB/006
5232 Villigen PSI, Switzerland
Phone +41 56 310 5182

Replies:
RE: PMAC IP and motor records Rees, NP (Nick)
References:
PMAC IP and motor records Dirk Zimoch
RE: PMAC IP and motor records Rees, NP (Nick)

Navigate by Date:
Prev: RE: webca can't connect to pvs? Purcell, J. David
Next: Re: PMAC IP and motor records Dirk Zimoch
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: PMAC IP and motor records Rees, NP (Nick)
Next: RE: PMAC IP and motor records Rees, NP (Nick)
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 31 Jan 2014 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·