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  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 
<== Date ==> <== Thread ==>

Subject: mbbxDirect SHFT field
From: "Florian Feldbauer" <florian@ep1.ruhr-uni-bochum.de>
To: "EPICS Tech Talk" <tech-talk@aps.anl.gov>
Date: 16 Jul 2013 17:15:22 +0200
Hey all,

for the settings of the stop switch mode of a motor driver, we are using, a 16 bit code is used. Bit 2 and Bit 3 are coding the polarity of the "left" and "right" stop switch, respectively.

I'm currently using bo records for each bit and one mbboDirect record to send all 16 bits at once to the device. As device support the asynUInt32Digital interface is used with a custom asynPortDriver:

record( mbboDirect, "PANDA:$(subsys):MOTOR:$(sector):SAP:SWITCHMODE" ) {
  field( DTYP, "asynUInt32Digital" )
  field( OUT,  "@asynMask($(BUS),14,0x1f3c,1)TMCM142_SAP_U" )
}
record( bo, "PANDA:$(subsys):MOTOR:$(sector):SAP:LEFTSWITCHPOLARITY" ) {
  field( OUT,  "PANDA:$(subsys):MOTOR:$(sector):SAP:SWITCHMODE.B2 NPP" )
  field( ONAM, "active high" )
  field( ZNAM, "active low" )
}
record( bo, "PANDA:$(subsys):MOTOR:$(sector):SAP:RIGHTSWITCHPOLARITY" ) {
  field( OUT,  "PANDA:$(subsys):MOTOR:$(sector):SAP:SWITCHMODE.B3 NPP" )
  field( ONAM, "active high" )
  field( ZNAM, "active low" )
}

When I now set "PANDA:$(subsys):MOTOR:$(sector):SAP:RIGHTSWITCHPOLARITY" to one,
PANDA:$(subsys):MOTOR:$(sector):SAP:SWITCHMODE.VAL is 8.
So far so good.
But the value in asynPortDriver::writeUInt32Digital is 0x20.
Having a closer look to the mbboDirect record shows that SHFT is 2.
Setting it to 0 inside the db-file has no effect.
Any idea why it is set to 2? How can I change this behavior?

The same problem occurs for the mbbiDirect record used to read back the settings.

Best regards,
Florian

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


Replies:
RE: mbbxDirect SHFT field Mark Rivers

Navigate by Date:
Prev: single IOC on Linux with two ports Hovanes Egiyan
Next: Re: single IOC on Linux with two ports Andrew Johnson
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 
Navigate by Thread:
Prev: RE: single IOC on Linux with two ports Hill, Jeff
Next: RE: mbbxDirect SHFT field Mark Rivers
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 
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 ·