Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions GALIL/GALIL-IOC-01App/Db/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ DB += galil_motors.db galil_motor_extras.db galil_dmc_ctrl.db galil_userdef_reco
DB += galil_profileMoveController.db galil_profileMoveAxis.db galil_analog_ports.db
DB += galil_digital_ports.db galil_user_array.db galil_csmotor_kinematics.db
DB += galil_coordinate_systems.db galil_csmotor_extras.db galil_homing_routines.db
#DB += galil_quadAmpStatus.db

include $(TOP)/configure/RULES
#----------------------------------------
Expand Down
34 changes: 34 additions & 0 deletions GALIL/GALIL-IOC-01App/Db/galil_quadAmpStatus.substitutions
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Description
# Substitution file for Galil internal quad amplifier status monitoring
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# Licence as published by the Free Software Foundation; either
# version 2.1 of the Licence, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public Licence for more details.
#
# You should have received a copy of the GNU Lesser General Public
# Licence along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Contact details:
# Mark Clift
# email: padmoz@tpg.com.au

# AMP - "AD" or "EH"
# ADDR - Axis number 0-1

file "$(GALIL)/GalilSup/Db/galil_quadAmpStatus.template"
{
pattern
{ P, PORT, AMP, ADDR }
# Delete rows as necessary for controller
{ "\$(P)", "\$(PORT)", "AD", 0 }
{ "\$(P)", "\$(PORT)", "EH", 1 }
}

# end
1 change: 1 addition & 0 deletions GALIL/iocBoot/iocGALIL-IOC-01/GALIL_01_kinematics.req
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
file "GALIL_controller_kinematics.req" "P=$(P),CCP=$(CCP)"
3 changes: 3 additions & 0 deletions GALIL/iocBoot/iocGALIL-IOC-01/galildb.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ dbLoadRecords("$(TOP)/db/galil_motors.db", "GPORT=$(GALIL_MTR_PORT),P=$(MYPVPREF
#Load extra functionality, untop of motorRecord features for axis/motors (eg. runtime gear ratio changes between master & slaves)
dbLoadRecords("$(TOP)/db/galil_dmc_ctrl.db", "P=$(MYPVPREFIX)MOT:,CCP=$(MTRCTRL)")

#Load Amplifier status monitors (eg. Overtemperature, OverVoltage, ELO, etc)
#dbLoadTemplate("$(TOP)/db/galil_quadAmpStatus.db", "P=$(MYPVPREFIX)MOT:,CCP=$(MTRCTRL)")

#Load extra features for real axis/motors (eg. Motor type, encoder type)
dbLoadRecords("$(TOP)/db/galil_motor_extras.db", "P=$(MYPVPREFIX)MOT:,CCP=$(MTRCTRL),PVPREFIX=$(MYPVPREFIX),ASG01=$(ASG01=DEFAULT),ASG02=$(ASG02=DEFAULT),ASG03=$(ASG03=DEFAULT),ASG04=$(ASG04=DEFAULT),ASG05=$(ASG05=DEFAULT),ASG06=$(ASG06=DEFAULT),ASG07=$(ASG07=DEFAULT),ASG08=$(ASG08=DEFAULT),ENCAVNSAMP=$(ENCAVNSAMP=10),IOCNAME=$(IOCNAME)")

Expand Down
24 changes: 17 additions & 7 deletions GALIL/iocBoot/iocGALIL-IOC-01/st-common.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ epicsEnvSet("IFIOC_GALIL_10", "#")
epicsEnvSet("IFNEWGALIL", " ")
epicsEnvSet("IFNOTNEWGALIL", "#")

## we wish to control some of autosave defined in common autosave.cmd
epicsEnvSet("AUTOSAVEREQ","#")

< $(IOCSTARTUP)/init.cmd

## whether to use autosaved SP for jaws on IOC restart
Expand All @@ -31,8 +34,8 @@ $(IFRECSIM) epicsEnvSet("GALILADDR", "127.0.0.1")
### Scan-support software
# crate-resident scan. This executes 1D, 2D, 3D, and 4D scans, and caches
# 1D data, but it doesn't store anything to disk. (See 'saveData' below for that.)
#dbLoadRecords("$(SSCAN)/sscanApp/Db/standardScans.db","P=$(MYPVPREFIX)$(IOCNAME):,MAXPTS1=8000,MAXPTS2=1000,MAXPTS3=10,MAXPTS4=10,MAXPTSH=8000")
#dbLoadRecords("$(SSCAN)/sscanApp/Db/saveData.db","P=$(MYPVPREFIX)$(IOCNAME):")
$(IFNEWGALIL=#) dbLoadRecords("$(SSCAN)/sscanApp/Db/standardScans.db","P=$(MYPVPREFIX)MOT:DMC$(MTRCTRL):,MAXPTS1=8000,MAXPTS2=1000,MAXPTS3=10,MAXPTS4=10,MAXPTSH=8000")
$(IFNEWGALIL=#) dbLoadRecords("$(SSCAN)/sscanApp/Db/saveData.db","P=$(MYPVPREFIX)MOT:DMC$(MTRCTRL):")

### autosave
# specify additional directories in which to to search for included request files
Expand All @@ -43,6 +46,14 @@ set_requestfile_path("${SSCAN}/sscanApp/Db", "")
## as all Galils cd to GALIL-IOC-01 need to add this explicitly so info generated req files are found
set_requestfile_path("${TOP}/iocBoot/iocGALIL-IOC-01", "")

# restore positions in pass 0 so motors don't move
set_pass0_restoreFile("$(IOCNAME)_positions.sav")
# restore settings in pass 0 so encoder ratio is set correctly for position restore in device support init
set_pass0_restoreFile("$(IOCNAME)_settings.sav")
$(IFOLDGALIL=#) set_pass1_restoreFile("$(IOCNAME)_settings.sav")
# restore kinematic equation character arrays in pass 1
$(IFNEWGALIL=#) set_pass1_restoreFile("$(IOCNAME)_kinematics.sav")

## Make sure controller number is 2 digits long
calc("MTRCTRL", "$(MTRCTRL)", 2, 2)

Expand Down Expand Up @@ -129,17 +140,16 @@ $(IFHASMTRCTRL) $(IFNOTDEVSIM) $(IFNOTRECSIM) create_monitor_set("$(IOCNAME)_pos
# Save motor settings every 30 seconds
$(IFHASMTRCTRL) $(IFNOTDEVSIM) $(IFNOTRECSIM) create_monitor_set("$(IOCNAME)_settings.req", 30, "P=$(MYPVPREFIX)MOT:,CCP=$(MTRCTRL)")

# Save kinematics every 30 seconds
$(IFNEWGALIL=#) $(IFNOTDEVSIM) $(IFNOTRECSIM) create_monitor_set("$(IOCNAME)_kinematics.req", 30,"P=$(MYPVPREFIX)MOT:,CCP=$(MTRCTRL)")

$(IFHASMTRCTRL) $(IFMOTORCONFIG) create_manual_set("$(MOTORCONFIG=)Menu.req","P=$(MYPVPREFIX)MOT:,CMP=$(MYPVPREFIX)$(IOCNAME):CONFIG:,CONFIG=$(MOTORCONFIG=),IOCNAME=$(IOCNAME),MTRCTRL=$(MTRCTRL),CONFIGMENU=1")

# Initialize saveData for step scans
#saveData_Init("saveData.req", "P=$(MYPVPREFIX)$(IOCNAME):")
$(IFNEWGALIL=#) saveData_Init("saveData.req", "P=$(MYPVPREFIX)MOT:DMC$(MTRCTRL):")

## Start any sequence programs
#seq sncxxx,"user=icsHost"

#asynSetTraceIOMask("GALILSYNC0", -1, 0x2)
#asynSetTraceMask("GALILSYNC0", -1, 0x9)

## if using hardware flow control on GALIL will need this
## do not enable software flow control - see comments in GalilController.cpp
#asynSetOption("GALILSYNC0", 0, "crtscts", "Y");