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

Subject: RE: Galil IOC GalilAddCode Command Parameters
From: Mark via Tech-talk <[email protected]>
To: "[email protected]" <[email protected]>
Date: Wed, 13 Aug 2025 13:06:06 +1000
Hi Jonathan,
The Galil EPICS driver will generate Galil code for the controller at IOCStart. The generated code will be dumped in the iocBoot directory as <controller ip>_gen.dmc.

To decode the GalilAddCode 2nd parameter meaning
Param # 2. int section = code section to add custom code into 0 = card code, 1 = thread code, 2 = limits code, 3 = digital code

Refer to the <controller ip>_gen.dmc file.

GalilAddCode parameter 2 values are shown below with reference to the dmc file.
0 card code is code between #AUTO and #THREADA labels.
1 thread code is code within the labels #THREADA -> #THREADH
2 limit code is code within the #LIMSWI section
3 digital code is code within the #ININT digital input section

Where the GalilAddCode command is called in the ioc start process is important, and determines where the user code will be inserted.

===
Recommend using the motor record and driver to set the parameters requested rather than Galil code. If these settings are made within Galil code, the values may be clobbered by the driver/records.

Here is how to set the parameters requested via the driver and motor record.

Limit and home switch type:
$(P) in example IOC default is DMC01:
The galil_dmc_ctrl.template database contains the limit and home switch type records.
Limit switch
DMC01:LIMITTYPE_CMD
0 - Normally open (NO)
1 - Normally closed (NC)
Home switch
DMC01:HOMETYPE_CMD
0 - Normally open (NO)
1 - Normally closed (NC)

The limit/home switch settings are controller wide and impact all axis.

To set the software limit for an axis, the motor record can be used.
Assuming motor A.
High software limit PV
DMC01:A.HLM
Low software limit PV
DMC01:A.LLM

To disable software limits, set both HLM and LLM to 0.

The above settings are supported by the autosave restore configuration in the example IOC. Once they are set, it's remembered, through IOC cold boots.

Kind regards,
Mark Clift.

--
This email has been checked for viruses by AVG antivirus software.
https://urldefense.us/v3/__http://www.avg.com__;!!G_uCfscf7eWS!Zsg2JKUpF_bMlm96z8kRmvKvYyQ5htcr8k8FEqM5f3Ftm2Rc4qqURxIQzbN2JXCO_BZMNYSfC6v15fl9lZY$
Navigate by Date:
Prev: synchronizing the value of a read/write record Thomas, Patrick via Tech-talk
Next: Mapping customised pva structures to epics v4 Normative Types and v3 PVs (channel access). Heinz Junkes 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  2019  2020  2021  2022  2023  2024  <20252026 
Navigate by Thread:
Prev: Galil IOC GalilAddCode Command Parameters Jonathan Hai via Tech-talk
Next: synchronizing the value of a read/write record Thomas, Patrick 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  2019  2020  2021  2022  2023  2024  <20252026 
ANJ, 19 Mar 2026 · Home · News · About · Talk · Base · Modules · Extensions ·
· Distributions · Download · Documents · Links · Licensing ·