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

Subject: Re: [EXTERNAL] Beckhoff BK9000 support survey
From: Eric Norum via Tech-talk <tech-talk@aps.anl.gov>
To: "Pearson, Matthew R." <pearsonmr@ornl.gov>
Cc: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Thu, 27 Jun 2019 09:49:19 -0700
Note that if you the iocshLoad command you can provide all the macro values without all those calls to epicsEnvSet().

On Jun 27, 2019, at 9:23 AM, Pearson, Matthew R. via Tech-talk <tech-talk@aps.anl.gov> wrote:

If the only problem with this method is the code duplication in each IOC then it's best to move the database into templates in a support module. Then all the IOC has to do is include them in a substitutions file. You could have one template per module type. And if there is common database code between modules then separate that out into common template files that are included in the per-module templates.

Then in the IOC startup script you may have a large list of calls to drvModbusAsynConfigure in order to setup the modbus ports for different address ranges. You can also put this in the support module, and just include it in the IOC st.cmd, passing in macros as necessary. For example, this is what I do for one of my applications for the Moxa ioLogik modules:

#E1214 Unit (6 DI and 6 Relay)
epicsEnvSet("IP_ADDR","192.168.200.177:502")
epicsEnvSet("IP_PORT","m1ip")
epicsEnvSet("PORT","m1")
< $(MOXA)/st_scripts/st_common.cmd

Where st_common.cmd is just a list of calls to drvModbusAsynConfigure. You may or may not need a different list for each type of module, depending on the modbus registry maps. 


References:
Beckhoff BK9000 support survey Dunning, Michael via Tech-talk
RE: [EXTERNAL] Beckhoff BK9000 support survey Pearson, Matthew R. via Tech-talk

Navigate by Date:
Prev: RE: [EXTERNAL] Beckhoff BK9000 support survey Pearson, Matthew R. via Tech-talk
Next: Re: How is 'exit()' different for the IOC shell? Kasemir, Kay via Tech-talk
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  2018  <20192020 
Navigate by Thread:
Prev: RE: [EXTERNAL] Beckhoff BK9000 support survey Pearson, Matthew R. via Tech-talk
Next: Re: [EXTERNAL] Beckhoff BK9000 support survey Mark Rivers via Tech-talk
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  2018  <20192020 
ANJ, 27 Jun 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·