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

Subject: Re: Questions about set parameters to device by using epics
From: Eric Norum <eric@norum.ca>
To: lzf neu <lzfneu@live.com>
Cc: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Thu, 26 Jan 2017 09:57:17 -0800
You need to specify a MODBUS output function code — function code 6 to write a single holding register, function code 16 to write multiple holding registers.  Here re a couple examples

drvModbusAsynConfigure("eps1_io", "epsPLC_1", 0, 6, 16000,   1, 0, 1000, "Wago")
drvModbusAsynConfigure("eps1_ao", "epsPLC_1", 0,16, 17216,  54, 0, 1000, "Wago”)

On Jan 26, 2017, at 9:42 AM, lzf neu <lzfneu@live.com> wrote:

Hi,


Below is the correct db that can read hour from the device:

record(ai, "$(RPNAM):HourVal"){
    field(DTYP,"asynInt32")
    field(INP, "@asynMask($(PORT) 68 16)MODBUS_DATA")  
    field(SCAN,"Passive")
    field(FLNK, "$(RPNAM):WeekVal")
}


now, I want to set new hour to the device and I try to write the following db according to Analog Output Example Record from "asynDriver: Asynchronous Driver Support" manual:

record(ao, "$(RPNAM):HourValSET"){
    field(DTYP,"asynInt32")
    field(OUT, "@asyn($(PORT), 68)")
    field(SCAN,"Passive")
}


however, I failed, epics gives the following error messages:

drvModbusAsyn::writeInt32 port RD1R invalid request for Modbus function 3

Gamma:01:HourValSET devAsynInt32 process error 

Could anyone give me some suggestions and thanks in advance !



Replies:
答复: Questions about set parameters to device by using epics lzf neu
References:
Questions about set parameters to device by using epics lzf neu

Navigate by Date:
Prev: Questions about set parameters to device by using epics lzf neu
Next: 答复: Questions about set parameters to device by using epics lzf neu
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
Navigate by Thread:
Prev: Questions about set parameters to device by using epics lzf neu
Next: 答复: Questions about set parameters to device by using epics lzf neu
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
ANJ, 14 Feb 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·