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: AsynInt32 device support and mbbo records
From: "Florian Feldbauer" <[email protected]>
To: "EPICS Tech Talk" <[email protected]>
Date: 15 Feb 2013 10:14:38 +0100
Hey,

I have written an AsynPortDriver for the TMCM142 1 axis stepper driver/controller The motor driver is connected via CAN bus and expects a message with 7 bytes of data:
byte 0: command number
byte 1: parameter number (I'm using the addr parameter from the asyn interface) byte 2: motor number (only one motor can be connected to the driver so it is always 0)
byte 3-6: data (32 bit signed int)

For setting the microstep resolution of the motor driver the data has to be a number between
0 and 11, each coding a different resoultion.
I wanted to use a mbbo record, which looks like this:

record( mbbo, "PANDA:$(subsys):MOTOR:$(SECTOR):SAP:USTEPRESOLUTION" ) {
  field( DTYP, "asynUInt32" )
  field( OUT,  "@asyn($(BUS),27,1)TMCM142_SAP" )

  field( ZRST, "2048 micro steps" )
  field( ONST, "1024 micro steps" )
  field( TWST, "512 micro steps" )
  field( THST, "256 micro steps" )
  field( FRST, "128 micro steps" )
  field( FVST, "64 micro steps" )
  field( SXST, "32 micro steps" )
  field( SVST, "16 micro steps" )
  field( EIST, "8 micro steps" )
  field( NIST, "4 micro steps" )
  field( TEST, "2 micro steps" )
  field( ELST, "1 micro steps" )
}

Unfortunately, the value inside my writeInt32 function from the asynPortDriver is always 0. Do I have to set the ZRVL,...,ELVL fields for asynInt32? Or do I need another asyn interface for
this record?

Best regards,
Florian

--
----------------------------------------
| Dr. Florian Feldbauer                |
|                                      |
| Helmholtz-Institut Mainz /           |
| Johannes Gutenberg-Universität Mainz |
| Johann-Joachim-Becher-Weg 45         |
| D-55128 Mainz                        |
|                                      |
| Office: 01/217                       |
| Phone:  (+49)6131 / 39-25829         |
----------------------------------------


Replies:
Re: AsynInt32 device support and mbbo records Burkhard Kolb
RE: AsynInt32 device support and mbbo records Mark Rivers

Navigate by Date:
Prev: record info field in which epics version? Emmanuel Mayssat
Next: Re: AsynInt32 device support and mbbo records Burkhard Kolb
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: record info field in which epics version? Andrew Johnson
Next: Re: AsynInt32 device support and mbbo records Burkhard Kolb
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 ·