From 5fa2e43b5e4035646b3ff7000621adc228368c1c Mon Sep 17 00:00:00 2001 From: motorapp Date: Sun, 5 Apr 2015 23:19:30 +1000 Subject: [PATCH] Added ability to actuate motor brake using digital output Added state names and alarm severity to digital template/substitutions Fixed problem with CS motor setpoint at startup Fixed problem with CS motor using AutoOff delay at move start. It now uses AutoOn delay at move start Fixed problem with config synApps build directory --- 3-0/GalilSup/Db/galil_digital_in_bit.template | 16 +- .../Db/galil_digital_out_bit.template | 22 +- 3-0/GalilSup/Db/galil_motor_extras.req | 5 +- 3-0/GalilSup/Db/galil_motor_extras.template | 93 ++ 3-0/GalilSup/op/adl/galil_motor_extras.adl | 835 +++++++++++------- 3-0/GalilSup/src/GalilAxis.cpp | 242 ++++- 3-0/GalilSup/src/GalilAxis.h | 96 +- 3-0/GalilSup/src/GalilCSAxis.cpp | 15 +- 3-0/GalilSup/src/GalilCSAxis.h | 1 + 3-0/GalilSup/src/GalilController.cpp | 117 ++- 3-0/GalilSup/src/GalilController.h | 12 +- .../Db/galil_digital_ports.substitutions | 364 ++++---- 3-0/config/Cygwin_setup.html | 59 -- 3-0/config/{MASTER_RELEASE => GALILRELEASE} | 4 +- 3-0/config/Makefile | 10 +- 3-0/config/Makefile.win32-x86 | 120 --- 3-0/config/README | 2 +- 3-0/config/WIN32_MASTER_RELEASE | 28 - 3-0/config/make.out | 66 -- 3-0/config/makeReleaseConsistent.pl | 20 +- 3-0/config/setup_epics_cygwin32 | 3 - 3-0/config/setup_epics_win32 | 21 - 3-0/configure/RELEASE | 2 +- .../iocGalil/galilTestApp_settings.req | 22 +- 3-0/start_motor_screen.sh | 6 +- 25 files changed, 1215 insertions(+), 966 deletions(-) delete mode 100644 3-0/config/Cygwin_setup.html rename 3-0/config/{MASTER_RELEASE => GALILRELEASE} (90%) delete mode 100755 3-0/config/Makefile.win32-x86 delete mode 100755 3-0/config/WIN32_MASTER_RELEASE delete mode 100644 3-0/config/make.out delete mode 100644 3-0/config/setup_epics_cygwin32 delete mode 100755 3-0/config/setup_epics_win32 diff --git a/3-0/GalilSup/Db/galil_digital_in_bit.template b/3-0/GalilSup/Db/galil_digital_in_bit.template index 0e68eee..7ea7aa6 100644 --- a/3-0/GalilSup/Db/galil_digital_in_bit.template +++ b/3-0/GalilSup/Db/galil_digital_in_bit.template @@ -1,6 +1,6 @@ -# $File: //ASP/Dev/SBS/4_Controls/4_3_Network_Infrastructure/4_3_1_Comms_Common_Services/sw/device_drivers/Galil/1-5/galilSup/Db/galil_digital_in_bits.template $ -# $Revision: #1 $ -# $DateTime: 2012/03/19 12:39:43 $ +# $File: //ASP/Dev/SBS/4_Controls/4_3_Network_Infrastructure/4_3_1_Comms_Common_Services/sw/device_drivers/Galil/3-0/GalilSup/Db/galil_digital_in_bit.template $ +# $Revision: #2 $ +# $DateTime: 2015/03/30 12:39:35 $ # $Author: cliftm $ # # This library is free software; you can redistribute it and/or @@ -28,14 +28,20 @@ # BYTE - Hardware byte to read # MASK - Mask for this bit # SCAN - Scan period +# ZNAM - Zero state name +# ONAM - One stage name +# ZSV - Zero severity +# OSV - One severity record(bi,"$(P):$(R)_STATUS") { field(DTYP, "asynUInt32Digital") field(INP, "@asynMask($(PORT) $(BYTE) $(MASK))BINARY_IN") field(SCAN, "I/O Intr") - field(ZNAM, "Low") - field(ONAM, "High") + field(ZNAM, "$(ZNAM)") + field(ONAM, "$(ONAM)") + field(ZSV, "$(ZSV)") + field(OSV, "$(OSV)") } # end diff --git a/3-0/GalilSup/Db/galil_digital_out_bit.template b/3-0/GalilSup/Db/galil_digital_out_bit.template index 8687884..b4374e5 100644 --- a/3-0/GalilSup/Db/galil_digital_out_bit.template +++ b/3-0/GalilSup/Db/galil_digital_out_bit.template @@ -1,6 +1,6 @@ -# $File: //ASP/Dev/SBS/4_Controls/4_3_Network_Infrastructure/4_3_1_Comms_Common_Services/sw/device_drivers/Galil/1-5/galilSup/Db/galil_digital_out_bits.template $ -# $Revision: #1 $ -# $DateTime: 2012/03/19 12:39:43 $ +# $File: //ASP/Dev/SBS/4_Controls/4_3_Network_Infrastructure/4_3_1_Comms_Common_Services/sw/device_drivers/Galil/3-0/GalilSup/Db/galil_digital_out_bit.template $ +# $Revision: #2 $ +# $DateTime: 2015/03/30 12:39:35 $ # $Author: cliftm $ # # This library is free software; you can redistribute it and/or @@ -27,21 +27,29 @@ # PORT - Asyn port name # WORD - Hardware WORD to read # MASK - Mask for this bit +# ZNAM - Zero state name +# ONAM - One stage name +# ZSV - Zero severity +# OSV - One severity record(bi,"$(P):$(R)_STATUS") { field(DTYP, "asynUInt32Digital") field(INP, "@asynMask($(PORT) $(WORD) $(MASK))BINARY_OUTRBV") field(SCAN, "I/O Intr") - field(ZNAM, "Low") - field(ONAM, "High") + field(ZNAM, "$(ZNAM)") + field(ONAM, "$(ONAM)") + field(ZSV, "$(ZSV)") + field(OSV, "$(OSV)") } record(bo,"$(P):$(R)_CMD") { - field(ZNAM, "Low") - field(ONAM, "High") field(PINI, "YES") + field(ZNAM, "$(ZNAM)") + field(ONAM, "$(ONAM)") + field(ZSV, "$(ZSV)") + field(OSV, "$(OSV)") field(DTYP, "asynUInt32Digital") field(OUT, "@asynMask($(PORT) $(WORD) $(MASK))BINARY_OUT") } diff --git a/3-0/GalilSup/Db/galil_motor_extras.req b/3-0/GalilSup/Db/galil_motor_extras.req index 73a423a..faf979f 100644 --- a/3-0/GalilSup/Db/galil_motor_extras.req +++ b/3-0/GalilSup/Db/galil_motor_extras.req @@ -22,4 +22,7 @@ $(P)$(M)_OFFDELAY_SP $(P)$(M)_UINDEX_CMD $(P)$(M)_JAH_CMD $(P)$(M)_JAHV_SP - +$(P)$(M)_BRAKEPORT_SP +$(P)$(M)_BRAKE_CMD +$(P)$(M)_AUTOBRAKE_CMD +$(P)$(M)_BRAKEONDELAY_SP diff --git a/3-0/GalilSup/Db/galil_motor_extras.template b/3-0/GalilSup/Db/galil_motor_extras.template index df4b8d0..e462d13 100644 --- a/3-0/GalilSup/Db/galil_motor_extras.template +++ b/3-0/GalilSup/Db/galil_motor_extras.template @@ -680,6 +680,8 @@ record(ao,"$(P):$(M)_ONDELAY_SP") field(PREC, "$(PREC)") field(EGU, "Secs") field(VAL, ".2") + field(DRVH, "3") + field(DRVL, ".001") field(PINI, "YES") field(OUT, "@asyn($(PORT),$(ADDR))MOTOR_AUTO_ONDELAY") field(FLNK, "$(P):$(M)_ONDELAY_MON") @@ -703,11 +705,102 @@ record(ao,"$(P):$(M)_OFFDELAY_SP") field(PREC, "$(PREC)") field(EGU, "Secs") field(VAL, ".2") + field(DRVH, "3") + field(DRVL, ".001") field(PINI, "YES") field(OUT, "@asyn($(PORT),$(ADDR))MOTOR_AUTO_OFFDELAY") field(FLNK, "$(P):$(M)_OFFDELAY_MON") } +#Motor brake manual control +record(bo,"$(P):$(M)_BRAKE_CMD") +{ + field(DESC, "mtr brake") + field(DTYP, "asynInt32") + field(PINI, "YES") + field(ZNAM, "Off") + field(ONAM, "On") + field(VAL, "0") + field(OUT, "@asyn($(PORT),$(ADDR))MOTOR_BRAKE") +} + +record(bi,"$(P):$(M)_BRAKE_STATUS") +{ + field(DESC, "mtr brake") + field(DTYP, "asynInt32") + field(SCAN, "I/O Intr") + field(ZNAM, "Off") + field(ONAM, "On") + field(INP, "@asyn($(PORT),$(ADDR))MOTOR_BRAKE") +} + +#Motor auto brake between moves +record(bo,"$(P):$(M)_AUTOBRAKE_CMD") +{ + field(DESC, "mtr auto brake") + field(PINI, "YES") + field(DTYP, "asynInt32") + field(ZNAM, "Off") + field(ONAM, "On") + field(VAL, "0") + field(OUT, "@asyn($(PORT),$(ADDR))MOTOR_AUTO_BRAKE") + field(FLNK, "$(P):$(M)_AUTOBRAKE_STATUS") +} + +record(bi,"$(P):$(M)_AUTOBRAKE_STATUS") +{ + field(DESC, "mtr auto brake") + field(DTYP, "asynInt32") + field(SCAN, "$(SCAN)") + field(ZNAM, "Off") + field(ONAM, "On") + field(INP, "@asyn($(PORT),$(ADDR))MOTOR_AUTO_BRAKE") +} + +#Motor auto brake port +record(ai,"$(P):$(M)_BRAKEPORT_MON") +{ + field(DESC, "mtr brake digport") + field(DTYP, "asynInt32") + field(SCAN, "$(SCAN)") + field(INP, "@asyn($(PORT),$(ADDR))MOTOR_BRAKEPORT") +} + +record(ao,"$(P):$(M)_BRAKEPORT_SP") +{ + field(DESC, "mtr brake digport") + field(DTYP, "asynInt32") + field(PINI, "YES") + field(DRVH, "16") + field(DRVL, "-1") + field(VAL, "-1") + field(OUT, "@asyn($(PORT),$(ADDR))MOTOR_BRAKEPORT") + field(FLNK, "$(P):$(M)_BRAKEPORT_MON") +} + +#Motor auto brake on delay +record(ai,"$(P):$(M)_BRAKEONDELAY_MON") +{ + field(DESC, "mtr brake on delay") + field(DTYP, "asynFloat64") + field(SCAN, "$(SCAN)") + field(PREC, "$(PREC)") + field(INP, "@asyn($(PORT),$(ADDR))MOTOR_AUTO_BRAKEONDELAY") +} + +record(ao,"$(P):$(M)_BRAKEONDELAY_SP") +{ + field(DESC, "mtr brake on delay") + field(DTYP, "asynFloat64") + field(PINI, "YES") + field(PREC, "$(PREC)") + field(VAL, ".2") + field(DRVH, "3") + field(DRVL, ".001") + field(OUT, "@asyn($(PORT),$(ADDR))MOTOR_AUTO_BRAKEONDELAY") + field(FLNK, "$(P):$(M)_BRAKEONDELAY_MON") +} + record(bi,"$(P):$(M)_ON_STATUS") { field(DESC, "Mtr on status") diff --git a/3-0/GalilSup/op/adl/galil_motor_extras.adl b/3-0/GalilSup/op/adl/galil_motor_extras.adl index 4b2ee4c..8fa7075 100644 --- a/3-0/GalilSup/op/adl/galil_motor_extras.adl +++ b/3-0/GalilSup/op/adl/galil_motor_extras.adl @@ -8,7 +8,7 @@ display { x=732 y=221 width=425 - height=473 + height=542 } clr=14 bclr=4 @@ -364,45 +364,6 @@ text { } textix="Motor off on error" } -text { - object { - x=12 - y=233 - width=97 - height=18 - } - "basic attribute" { - clr=14 - } - textix="Error (cts)" -} -"text entry" { - object { - x=155 - y=212 - width=112 - height=18 - } - control { - chan="$(P)$(M)_ERRLIMIT_SP" - clr=14 - bclr=51 - } - limits { - } -} -text { - object { - x=12 - y=216 - width=100 - height=18 - } - "basic attribute" { - clr=14 - } - textix="Error limit (cts)" -} text { object { x=12 @@ -430,157 +391,55 @@ text { limits { } } -"text update" { - object { - x=309 - y=217 - width=58 - height=18 - } - monitor { - chan="$(P)$(M)_ERRLIMIT_MON" - clr=54 - bclr=4 - } - limits { - } -} -"text update" { - object { - x=309 - y=235 - width=58 - height=18 - } - monitor { - chan="$(P)$(M)_ERR_MON" - clr=54 - bclr=4 - } - limits { - } -} -text { - object { - x=12 - y=250 - width=69 - height=18 - } - "basic attribute" { - clr=14 - } - textix="Encoder stall" -} -"text update" { - object { - x=309 - y=252 - width=81 - height=18 - } - monitor { - chan="$(P)$(M)_ESTALL_STATUS" - clr=54 - bclr=4 - } - clrmod="alarm" - limits { - } -} -text { - object { - x=12 - y=305 - width=89 - height=18 - } - "basic attribute" { - clr=14 - } - textix="Step smooth factor" -} -"text entry" { - object { - x=155 - y=304 - width=112 - height=18 - } - control { - chan="$(P)$(M)_STEPSMOOTH_SP" - clr=14 - bclr=51 - } - limits { - } -} -"text entry" { +"choice button" { object { x=155 - y=286 + y=194 width=112 height=18 } control { - chan="$(P)$(M)_EDEL_SP" + chan="$(P)$(M)_ON_CMD" clr=14 bclr=51 } - limits { - } + stacking="column" } -"text entry" { +"choice button" { object { x=155 - y=340 + y=177 width=112 height=18 } control { - chan="$(P)$(M)_HOMEVAL_SP" + chan="$(P)$(M)_WLP_CMD" clr=14 bclr=51 } - limits { - } + stacking="column" } text { object { x=12 - y=324 - width=69 + y=179 + width=89 height=18 } "basic attribute" { clr=14 } - textix="EGU after limit" -} -"text entry" { - object { - x=155 - y=323 - width=112 - height=18 - } - control { - chan="$(P)$(M)_EGUAFTLIMIT_SP" - clr=14 - bclr=51 - } - limits { - } + textix="Wrong limit protection" } "text update" { object { x=309 - y=287 - width=81 + y=181 + width=30 height=18 } monitor { - chan="$(P)$(M)_EDEL_MON" + chan="$(P)$(M)_WLP_STATUS" clr=54 bclr=4 } @@ -589,310 +448,517 @@ text { } "text update" { object { - x=309 - y=306 + x=341 + y=181 width=58 height=18 } monitor { - chan="$(P)$(M)_STEPSMOOTH_MON" - clr=54 - bclr=4 - } - limits { - } -} -"text update" { - object { - x=309 - y=344 - width=81 - height=18 - } - monitor { - chan="$(P)$(M)_HOMEVAL_MON" - clr=54 - bclr=4 - } - limits { - } -} -"text update" { - object { - x=309 - y=325 - width=81 - height=18 - } - monitor { - chan="$(P)$(M)_EGUAFTLIMIT_MON" + chan="$(P)$(M)_WLPACTIVE_STATUS" clr=54 bclr=4 } + clrmod="alarm" limits { } } text { object { x=12 - y=270 + y=214 width=69 height=18 } "basic attribute" { clr=14 } - textix="Encoder stall time (s)" + textix="Amp auto on/off" } -"text entry" { +"choice button" { object { - x=156 - y=268 + x=155 + y=212 width=112 height=18 } control { - chan="$(P)$(M)_ESTALLTIME_SP" + chan="$(P)$(M)_AUTOONOFF_CMD" clr=14 bclr=51 } - limits { - } + stacking="column" } "text update" { object { x=309 - y=269 + y=215 width=81 height=18 } monitor { - chan="$(P)$(M)_ESTALLTIME_MON" + chan="$(P)$(M)_AUTOONOFF_STATUS" clr=54 bclr=4 } limits { } } -"choice button" { +text { object { - x=155 - y=194 - width=112 + x=12 + y=232 + width=69 height=18 } - control { - chan="$(P)$(M)_ON_CMD" + "basic attribute" { clr=14 - bclr=51 } - stacking="column" + textix="Amp on/brake off delay" } -"choice button" { +"text entry" { object { x=155 - y=177 + y=230 width=112 height=18 } control { - chan="$(P)$(M)_WLP_CMD" + chan="$(P)$(M)_ONDELAY_SP" clr=14 bclr=51 } - stacking="column" -} -text { - object { - x=12 - y=179 - width=89 - height=18 - } - "basic attribute" { - clr=14 - } - textix="Wrong limit protection" -} -"text update" { - object { - x=309 - y=181 - width=30 - height=18 - } - monitor { - chan="$(P)$(M)_WLP_STATUS" - clr=54 - bclr=4 - } limits { } } "text update" { object { - x=341 - y=181 - width=58 + x=309 + y=233 + width=81 height=18 } monitor { - chan="$(P)$(M)_WLPACTIVE_STATUS" + chan="$(P)$(M)_ONDELAY_MON" clr=54 bclr=4 } - clrmod="alarm" limits { } } -text { - object { - x=12 - y=288 - width=97 - height=18 - } - "basic attribute" { - clr=14 - } - textix="Encoder dead band (EGU)" -} -text { - object { - x=12 - y=342 - width=69 - height=18 - } - "basic attribute" { - clr=14 - } - textix="Home value (EGU)" -} composite { object { x=12 - y=358 + y=284 width=378 - height=113 + height=255 } "composite name"="" children { + text { + object { + x=12 + y=287 + width=69 + height=18 + } + "basic attribute" { + clr=14 + } + textix="Motor brake" + } "choice button" { object { - x=155 - y=358 - width=112 + x=155 + y=284 + width=112 + height=18 + } + control { + chan="$(P)$(M)_BRAKE_CMD" + clr=14 + bclr=51 + } + stacking="column" + } + "text update" { + object { + x=309 + y=287 + width=81 + height=18 + } + monitor { + chan="$(P)$(M)_BRAKE_STATUS" + clr=54 + bclr=4 + } + limits { + } + } + composite { + object { + x=12 + y=302 + width=378 + height=21 + } + "composite name"="" + children { + text { + object { + x=12 + y=305 + width=69 + height=18 + } + "basic attribute" { + clr=14 + } + textix="Motor brake on/off port" + } + "text entry" { + object { + x=155 + y=302 + width=112 + height=18 + } + control { + chan="$(P)$(M)_BRAKEPORT_SP" + clr=14 + bclr=51 + } + limits { + } + } + "text update" { + object { + x=309 + y=305 + width=81 + height=18 + } + monitor { + chan="$(P)$(M)_BRAKEPORT_MON" + clr=54 + bclr=4 + } + limits { + } + } + } + } + composite { + object { + x=12 + y=320 + width=378 + height=21 + } + "composite name"="" + children { + text { + object { + x=12 + y=323 + width=69 + height=18 + } + "basic attribute" { + clr=14 + } + textix="Motor brake auto on/off" + } + "choice button" { + object { + x=155 + y=320 + width=112 + height=18 + } + control { + chan="$(P)$(M)_AUTOBRAKE_CMD" + clr=14 + bclr=51 + } + stacking="column" + } + "text update" { + object { + x=309 + y=323 + width=81 + height=18 + } + monitor { + chan="$(P)$(M)_AUTOBRAKE_STATUS" + clr=54 + bclr=4 + } + limits { + } + } + } + } + text { + object { + x=12 + y=359 + width=97 + height=18 + } + "basic attribute" { + clr=14 + } + textix="Error (cts)" + } + "text entry" { + object { + x=155 + y=338 + width=112 + height=18 + } + control { + chan="$(P)$(M)_ERRLIMIT_SP" + clr=14 + bclr=51 + } + limits { + } + } + text { + object { + x=12 + y=342 + width=100 + height=18 + } + "basic attribute" { + clr=14 + } + textix="Error limit (cts)" + } + "text update" { + object { + x=309 + y=343 + width=58 + height=18 + } + monitor { + chan="$(P)$(M)_ERRLIMIT_MON" + clr=54 + bclr=4 + } + limits { + } + } + "text update" { + object { + x=309 + y=361 + width=58 height=18 } - control { - chan="$(P)$(M)_UINDEX_CMD" - clr=14 - bclr=51 + monitor { + chan="$(P)$(M)_ERR_MON" + clr=54 + bclr=4 + } + limits { } - stacking="column" } text { object { x=12 - y=360 + y=376 width=69 height=18 } "basic attribute" { clr=14 } - textix="Use index when homing" + textix="Encoder stall" + } + "text update" { + object { + x=309 + y=378 + width=81 + height=18 + } + monitor { + chan="$(P)$(M)_ESTALL_STATUS" + clr=54 + bclr=4 + } + clrmod="alarm" + limits { + } + } + text { + object { + x=12 + y=431 + width=89 + height=18 + } + "basic attribute" { + clr=14 + } + textix="Step smooth factor" } "text entry" { object { x=155 - y=395 + y=430 width=112 height=18 } control { - chan="$(P)$(M)_JAHV_SP" + chan="$(P)$(M)_STEPSMOOTH_SP" + clr=14 + bclr=51 + } + limits { + } + } + "text entry" { + object { + x=155 + y=412 + width=112 + height=18 + } + control { + chan="$(P)$(M)_EDEL_SP" clr=14 bclr=51 } limits { } } + "text update" { + object { + x=309 + y=413 + width=81 + height=18 + } + monitor { + chan="$(P)$(M)_EDEL_MON" + clr=54 + bclr=4 + } + limits { + } + } + "text update" { + object { + x=309 + y=431 + width=58 + height=18 + } + monitor { + chan="$(P)$(M)_STEPSMOOTH_MON" + clr=54 + bclr=4 + } + limits { + } + } text { object { x=12 - y=416 + y=396 width=69 height=18 } "basic attribute" { clr=14 } - textix="Motor amp auto on/off" + textix="Encoder stall time (s)" } - "choice button" { + "text entry" { object { - x=155 - y=414 + x=156 + y=394 width=112 height=18 } control { - chan="$(P)$(M)_AUTOONOFF_CMD" + chan="$(P)$(M)_ESTALLTIME_SP" clr=14 bclr=51 } - stacking="column" + limits { + } } - text { + "text update" { object { - x=12 - y=434 - width=69 + x=309 + y=395 + width=81 height=18 } - "basic attribute" { - clr=14 + monitor { + chan="$(P)$(M)_ESTALLTIME_MON" + clr=54 + bclr=4 + } + limits { } - textix="Motor amp on delay" } text { object { x=12 - y=453 - width=69 + y=414 + width=97 height=18 } "basic attribute" { clr=14 } - textix="Motor amp off delay" + textix="Encoder dead band (EGU)" } "text entry" { object { x=155 - y=450 + y=465 width=112 height=18 } control { - chan="$(P)$(M)_OFFDELAY_SP" + chan="$(P)$(M)_HOMEVAL_SP" clr=14 bclr=51 } limits { } } + text { + object { + x=12 + y=449 + width=69 + height=18 + } + "basic attribute" { + clr=14 + } + textix="EGU after limit" + } "text entry" { object { x=155 - y=432 + y=448 width=112 height=18 } control { - chan="$(P)$(M)_ONDELAY_SP" + chan="$(P)$(M)_EGUAFTLIMIT_SP" clr=14 bclr=51 } @@ -902,12 +968,12 @@ composite { "text update" { object { x=309 - y=417 + y=467 width=81 height=18 } monitor { - chan="$(P)$(M)_AUTOONOFF_STATUS" + chan="$(P)$(M)_HOMEVAL_MON" clr=54 bclr=4 } @@ -917,29 +983,67 @@ composite { "text update" { object { x=309 - y=435 + y=449 width=81 height=18 } monitor { - chan="$(P)$(M)_ONDELAY_MON" + chan="$(P)$(M)_EGUAFTLIMIT_MON" clr=54 bclr=4 } limits { } } - "text update" { + text { object { - x=309 - y=453 - width=81 + x=12 + y=467 + width=69 height=18 } - monitor { - chan="$(P)$(M)_OFFDELAY_MON" - clr=54 - bclr=4 + "basic attribute" { + clr=14 + } + textix="Home value (EGU)" + } + "choice button" { + object { + x=155 + y=483 + width=112 + height=18 + } + control { + chan="$(P)$(M)_UINDEX_CMD" + clr=14 + bclr=51 + } + stacking="column" + } + text { + object { + x=12 + y=485 + width=69 + height=18 + } + "basic attribute" { + clr=14 + } + textix="Use index when homing" + } + "text entry" { + object { + x=155 + y=519 + width=112 + height=18 + } + control { + chan="$(P)$(M)_JAHV_SP" + clr=14 + bclr=51 } limits { } @@ -947,7 +1051,7 @@ composite { text { object { x=12 - y=378 + y=503 width=69 height=18 } @@ -959,7 +1063,7 @@ composite { text { object { x=12 - y=397 + y=521 width=69 height=18 } @@ -971,7 +1075,7 @@ composite { "choice button" { object { x=155 - y=376 + y=501 width=112 height=18 } @@ -985,7 +1089,7 @@ composite { "text update" { object { x=309 - y=362 + y=485 width=81 height=18 } @@ -1000,7 +1104,7 @@ composite { "text update" { object { x=309 - y=380 + y=503 width=81 height=18 } @@ -1015,7 +1119,7 @@ composite { "text update" { object { x=309 - y=398 + y=520 width=81 height=18 } @@ -1029,3 +1133,98 @@ composite { } } } +composite { + object { + x=12 + y=248 + width=378 + height=21 + } + "composite name"="" + children { + text { + object { + x=12 + y=251 + width=69 + height=18 + } + "basic attribute" { + clr=14 + } + textix="Amp off delay" + } + "text entry" { + object { + x=155 + y=248 + width=112 + height=18 + } + control { + chan="$(P)$(M)_OFFDELAY_SP" + clr=14 + bclr=51 + } + limits { + } + } + "text update" { + object { + x=309 + y=251 + width=81 + height=18 + } + monitor { + chan="$(P)$(M)_OFFDELAY_MON" + clr=54 + bclr=4 + } + limits { + } + } + } +} +text { + object { + x=12 + y=269 + width=69 + height=18 + } + "basic attribute" { + clr=14 + } + textix="Brake on delay" +} +"text entry" { + object { + x=155 + y=266 + width=112 + height=18 + } + control { + chan="$(P)$(M)_BRAKEONDELAY_SP" + clr=14 + bclr=51 + } + limits { + } +} +"text update" { + object { + x=309 + y=269 + width=81 + height=18 + } + monitor { + chan="$(P)$(M)_BRAKEONDELAY_MON" + clr=54 + bclr=4 + } + limits { + } +} diff --git a/3-0/GalilSup/src/GalilAxis.cpp b/3-0/GalilSup/src/GalilAxis.cpp index d2b55dd..8147713 100644 --- a/3-0/GalilSup/src/GalilAxis.cpp +++ b/3-0/GalilSup/src/GalilAxis.cpp @@ -174,7 +174,10 @@ asynStatus GalilAxis::setDefaults(int limit_as_home, char *enables_string, int s homedExecuted_ = homedSent_ = false; //Motor power auto on/off mesg not sent to pollServices thread yet - autooffExecuted_ = autooffSent_ = false; + autooffSent_ = false; + + //Motor brake auto on mesg not sent to pollServices thread yet + autobrakeonSent_ = false; //AutoOn delay not in progress so autooff allowed autooffAllowed_ = true; @@ -455,6 +458,7 @@ asynStatus GalilAxis::move(double position, int relative, double minVelocity, do char mesg[MAX_GALIL_STRING_SIZE]; //Error mesg bool pos_ok = false; //Is the requested position ok double readback = motor_position_; //For step motors controller uses motor_position_ for positioning + bool autoOn = false; //Did auto on do any work? //Check velocity and wlp protection if (beginCheck(functionName, maxVelocity)) @@ -532,8 +536,11 @@ asynStatus GalilAxis::move(double position, int relative, double minVelocity, do return asynSuccess; //Nothing to do } - //Execute motor auto on function - executeAutoOn(); + //Execute motor auto on and brake off function + autoOn = executeAutoOn(); + autoOn |= executeAutoBrakeOff(); + if (autoOn) + executeAutoOnDelay(); //Execute motor record prem command executePrem(); @@ -566,6 +573,7 @@ asynStatus GalilAxis::home(double minVelocity, double maxVelocity, double accele double distance; long accel; //Acceleration/Deceleration when limit not active int ssiinput; //SSI encoder register + bool autoOn = false; //Did auto on do any work? pC_->getIntegerParam(pC_->GalilSSIInput_, &ssiinput); @@ -631,8 +639,11 @@ asynStatus GalilAxis::home(double minVelocity, double maxVelocity, double accele sprintf(pC_->cmd_, "AC%c=%ld;DC%c=%ld", axisName_, accel, axisName_, accel); pC_->writeReadController(functionName); - //Execute motor auto on function - executeAutoOn(); + //Execute motor auto on and brake off function + autoOn = executeAutoOn(); + autoOn |= executeAutoBrakeOff(); + if (autoOn) + executeAutoOnDelay(); //Execute motor record prem command executePrem(); @@ -666,7 +677,7 @@ asynStatus GalilAxis::beginCheck(const char *functionName, double maxVelocity) if (!axisReady_) { - sprintf(mesg, "%s failed, autosave still restoring axis %c", functionName, axisName_); + sprintf(mesg, "%s failed, axis still initializing %c", functionName, axisName_); //Set controller error mesg monitor pC_->setCtrlError(mesg); return asynError; //Nothing to do @@ -703,6 +714,7 @@ asynStatus GalilAxis::moveVelocity(double minVelocity, double maxVelocity, doubl { static const char *functionName = "moveVelocity"; long accel; + bool autoOn = false; //Did auto on do any work? //Check velocity and wlp protection if (beginCheck(functionName, maxVelocity)) @@ -728,8 +740,11 @@ asynStatus GalilAxis::moveVelocity(double minVelocity, double maxVelocity, doubl sprintf(pC_->cmd_, "JG%c=%.0lf\n", axisName_, maxVelocity); pC_->writeReadController(functionName); - //Execute motor auto on function - executeAutoOn(); + //Execute motor auto on and brake off function + autoOn = executeAutoOn(); + autoOn |= executeAutoBrakeOff(); + if (autoOn) + executeAutoOnDelay(); //Execute motor record prem command executePrem(); @@ -949,22 +964,69 @@ asynStatus GalilAxis::setClosedLoop(bool closedLoop) sprintf(pC_->cmd_, "SH%c", axisName_); else sprintf(pC_->cmd_, "MO%c", axisName_); + //Write setting to controller status = pC_->writeReadController(functionName); return status; } +/** Set the motor brake status. + * \param[in] enable true = brake, false = release brake. */ +asynStatus GalilAxis::setBrake(bool enable) +{ + const char *functionName = "GalilAxis::setBrake"; + asynStatus status = asynSuccess; + int digport; + //Retrieve the digital port used to actuate this axis brake + status = pC_->getIntegerParam(axisNo_, pC_->GalilBrakePort_, &digport); + //Enable or disable motor brake + if (axisReady_ && digport >= 0 && !status) + { + if (!enable) + sprintf(pC_->cmd_, "SB %d", digport); + else + sprintf(pC_->cmd_, "CB %d", digport); + //Write setting to controller + status = pC_->writeReadController(functionName); + } + return status; +} + +//Restore the motor brake status after axisReady_ +asynStatus GalilAxis::restoreBrake(void) +{ + const char *functionName = "GalilAxis::restoreBrake"; + asynStatus status = asynSuccess; + int digport; + //Retrieve the digital port used to actuate this axis brake + status = pC_->getIntegerParam(axisNo_, pC_->GalilBrakePort_, &digport); + //Enable or disable motor brake + if (digport >= 0 && !status) + { + if (!brakeInit_) + sprintf(pC_->cmd_, "SB %d", digport); + else + sprintf(pC_->cmd_, "CB %d", digport); + //Write setting to controller + status = pC_->writeReadController(functionName); + } + return status; +} + //Extract axis data from GalilController data record and //store in GalilAxis (motorRecord attributes) or asyn ParamList (other record attributes) //Return status of GalilController data record acquisition asynStatus GalilAxis::getStatus(void) { const char *functionName="GalilAxis::getStatus"; - char src[MAX_GALIL_STRING_SIZE]="\0"; //data source to retrieve - int offonerror, motoron; //paramList items to update - int connected; //paramList items to update - double error; //paramList items to update + char src[MAX_GALIL_STRING_SIZE]="\0"; //data source to retrieve + int offonerror, motoron; //paramList items to update + int connected; //paramList items to update + double error; //paramList items to update + unsigned digport; //paramList items to update. Used for brake status + unsigned mask; //Mask used to calc brake port status + int brakeport; //Brake port for this axis //If data record query success in GalilController::acquireDataRecord if (pC_->recstatus_ == asynSuccess) @@ -1020,6 +1082,16 @@ asynStatus GalilAxis::getStatus(void) sprintf(src, "_TE%c", axisName_); error = pC_->gco_->sourceValue(pC_->recdata_, src); setDoubleParam(pC_->GalilError_, error); + //Brake port status + strcpy(src, "_OP0"); + digport = (unsigned)pC_->gco_->sourceValue(pC_->recdata_, src); + //Retrieve the brake port used for this axis + pC_->getIntegerParam(axisNo_, pC_->GalilBrakePort_, &brakeport); + mask = (unsigned)(pow(2.0, (double)(brakeport - 1))); + digport = digport & mask; + //Calculate brake status + digport = (digport == mask) ? 0 : 1; + pC_->setIntegerParam(axisNo_, pC_->GalilBrake_, digport); } } catch (string e) @@ -1075,7 +1147,9 @@ void GalilAxis::setStatus(bool *moving) //Motor record post not sent as motor is moving postExecuted_ = postSent_ = false; //Motor auto off not yet sent as motor is moving - autooffExecuted_ = autooffSent_ = false; + autooffSent_ = false; + //Motor brake auto on mesg not sent as motor is moving + autobrakeonSent_ = false; } } @@ -1287,13 +1361,13 @@ void GalilAxis::pollServices(void) postExecuted_ = true; } break; - case MOTOR_OFF: //Block auto off if again inmotion_ or auto on delay active + case MOTOR_OFF: //Block auto motor off if again inmotion_ or auto on delay active if (!inmotion_ && autooffAllowed_) - { - //Execute the motor off command - setClosedLoop(false); - autooffExecuted_ = true; - } + setClosedLoop(false); //Execute the motor off command + break; + case MOTOR_BRAKE_ON://Block auto brake on if again inmotion_ or auto on delay active + if (!inmotion_ && autooffAllowed_) + setBrake(true); //Execute the brake on command break; case MOTOR_HOMED://Retrieve needed params status = pC_->getDoubleParam(axisNo_, pC_->GalilJogAfterHomeValue_, &jahv); @@ -1384,47 +1458,94 @@ void GalilAxis::executePrem(void) } } -//Execute motor auto power on +//Execute auto motor power on //Caller requires lock -void GalilAxis::executeAutoOn(void) +bool GalilAxis::executeAutoOn(void) { static const char *functionName = "GalilAxis::executeAutoOn"; int autoonoff; //Motor power auto on/off setting - double ondelay; //Motor power on delay int motoroff; //Motor amplifier off status + //Retrieve brake attributes from ParamList //Execute Auto power on if activated pC_->getIntegerParam(axisNo_, pC_->GalilAutoOnOff_, &autoonoff); - //Query motor off status direct from controller - sprintf(pC_->cmd_, "MG _MO%c\n", axisName_); - pC_->writeReadController(functionName); - motoroff = atoi(pC_->resp_); + //Execute motor auto on if feature is enabled and motor is off - if (autoonoff && motoroff) + if (autoonoff) + { + //Query motor off status direct from controller + sprintf(pC_->cmd_, "MG _MO%c\n", axisName_); + pC_->writeReadController(functionName); + motoroff = atoi(pC_->resp_); + if (motoroff) //motor on command + { + setClosedLoop(true); + return true; //Did some work + } + } + //Did no work + return false; +} + +//Execute auto brake off +//Caller requires lock +bool GalilAxis::executeAutoBrakeOff(void) +{ + static const char *functionName = "GalilAxis::executeAutoBrakeOff"; + int autobrake; //Brake auto disable/enable setting + int brakeport; //Brake digital out port + int brakeoff; //Motor brake off status + + //Retrieve brake attributes from ParamList + //Auto brake setting + pC_->getIntegerParam(axisNo_, pC_->GalilAutoBrake_, &autobrake); + //Retrieve brake digital out port + pC_->getIntegerParam(axisNo_, pC_->GalilBrakePort_, &brakeport); + + //Execute motor auto brake if feature is enabled and brake is on + if (autobrake) { - //motor on command - setClosedLoop(true); - //Wait user specified time after turning motor on - pC_->getDoubleParam(axisNo_, pC_->GalilAutoOnDelay_, &ondelay); - if (ondelay >= 0.035) + //Query brake status direct from controller + sprintf(pC_->cmd_, "MG @OUT[%d]\n", brakeport); + pC_->writeReadController(functionName); + brakeoff = atoi(pC_->resp_); + if (!brakeoff) { - //AutoOn delay long enough to justify releasing lock to other threads - //Case where autoon delay greater than autooff delay. Dont wont motor turning off - //Whilst still waiting AutoOn delay - //Block autooff whilst lock released for AutoOn delay - autooffAllowed_ = false; - pC_->unlock(); - epicsThreadSleep(ondelay); - pC_->lock(); - //Reset stop timer for auto off - stop_begint_ = stop_nowt_; - autooffSent_ = false; - //Autooff now allowed as we have lock now anyway - autooffAllowed_ = true; + //brake off command + setBrake(false); + return true; } - else //AutoOn delay too short to bother releasing lock to other threads - epicsThreadSleep(ondelay); } + //Did no work + return false; +} + +void GalilAxis::executeAutoOnDelay(void) +{ + double ondelay; //Motor power on delay + + //Retrieve AutoOn delay from ParamList + pC_->getDoubleParam(axisNo_, pC_->GalilAutoOnDelay_, &ondelay); + + //Wait required on delay if AutoOn did some work + if (ondelay >= 0.035) + { + //AutoOn delay long enough to justify releasing lock to other threads + //Case where autoon delay greater than autooff delay. Dont wont motor turning off or brake turning on + //Whilst still waiting AutoOn delay + //Block autooff whilst lock released for AutoOn delay + autooffAllowed_ = false; + pC_->unlock(); + epicsThreadSleep(ondelay); + pC_->lock(); + //Reset stop timer for auto off + stop_begint_ = stop_nowt_; + autooffSent_ = false; + //Autooff now allowed as we have lock now anyway + autooffAllowed_ = true; + } + else //AutoOn delay too short to bother releasing lock to other threads + epicsThreadSleep(ondelay); } //Send motor record post mesg to pollServices thread @@ -1463,6 +1584,28 @@ void GalilAxis::executeAutoOff(void) } } +//Send auto brake on mesg to pollServices thread +//Called by poll thread without lock +void GalilAxis::executeAutoBrakeOn(void) +{ + int autobrake; //Brake auto disable/enable setting + double ondelay; //Brake auto on delay in seconds + + //Retrieve brake attributes from ParamList + //Auto brake setting + pC_->getIntegerParam(axisNo_, pC_->GalilAutoBrake_, &autobrake); + + //Execute auto brake off if activated + if ((pC_->getIntegerParam(axisNo_, pC_->GalilAutoBrake_, &autobrake) == asynSuccess) && + (pC_->getDoubleParam(axisNo_, pC_->GalilAutoBrakeOnDelay_, &ondelay) == asynSuccess)) + if (autobrake && autooffAllowed_ && !homing_ && !homedSent_ && !autobrakeonSent_ && stopped_time_ >= ondelay) + { + //Send the brake on command + pollRequest_.send((void*)&MOTOR_BRAKE_ON, sizeof(int)); + autobrakeonSent_ = true; + } +} + //Starts motion, and delay until it begins or timeout happens //Called by move, moveVelocity, home asynStatus GalilAxis::beginMotion(const char *caller) @@ -1541,7 +1684,10 @@ asynStatus GalilAxis::poll(bool *moving) //Execute motor record post if stopped and not homing executePost(); - //Execute motor auto power on/off function if stopped, not homing and no new moving comming + //Execute auto brake on function if stopped, not homing and no new move comming + executeAutoBrakeOn(); + + //Execute motor auto power off function if stopped, not homing and no new move comming executeAutoOff(); //check for stalled encoders, whilst we are moving diff --git a/3-0/GalilSup/src/GalilAxis.h b/3-0/GalilSup/src/GalilAxis.h index c3d4c8d..0f39c09 100644 --- a/3-0/GalilSup/src/GalilAxis.h +++ b/3-0/GalilSup/src/GalilAxis.h @@ -34,6 +34,7 @@ static const int MOTOR_POST = 1; static const int MOTOR_OFF = 2; static const int MOTOR_HOMED = 3; static const int MOTOR_CANCEL_HOME = 4; +static const int MOTOR_BRAKE_ON = 5; class GalilAxis : public asynMotorAxis { @@ -69,47 +70,57 @@ class GalilAxis : public asynMotorAxis int digitalaway, char axis_dighome_code[]); - //Generate axis home routine - void gen_homecode(char c, char axis_thread_code[]); + //Generate axis home routine + void gen_homecode(char c, char axis_thread_code[]); - //Is the motor in an enabled/go state with current digital IO status - bool motor_enabled(void); - //Check SSI reading against disconnect value - void set_ssi_connectflag(void); - //Set SSI setting on controller - asynStatus set_ssi(void); - //Get SSI setting from controller - asynStatus get_ssi(int function, epicsInt32 *value); - //Set limdc parameter on controller - asynStatus setLimitDecel(double velocity); - //Extract axis data from GalilController data record - asynStatus getStatus(void); - //Set poller status variables bassed on GalilController data record info - void setStatus(bool *moving); - //Verify encoder operation whilst moving for safety - void checkEncoder(void); - //Stop motor if wrong limit activated and wrongLimitProtection is enabled - void wrongLimitProtection(void); - //Sets time motor has been stopped for in GalilAxis::stopped_time_ - void setStopTime(void); - //Reset homing if stopped_time_ great than - void checkHoming(void); - //Service slow and infrequent requests from poll thread to write to the controller - //We do this in a separate thread so the poll thread is not slowed - //Also poll thread doesnt have a lock and is not allowed to call writeReadController - void pollServices(void); - //Execute motor record prem function - void executePrem(void); - //Execute motor power auto on - void executeAutoOn(void); - //Execute motor record post function - void executePost(void); - //Execute motor power auto off - void executeAutoOff(void); - //Check velocity and wlp protection - asynStatus beginCheck(const char *functionName, double maxVelocity); - //Begin motor motion - asynStatus beginMotion(const char *caller); + //Is the motor in an enabled/go state with current digital IO status + bool motor_enabled(void); + //Check SSI reading against disconnect value + void set_ssi_connectflag(void); + //Set SSI setting on controller + asynStatus set_ssi(void); + //Get SSI setting from controller + asynStatus get_ssi(int function, epicsInt32 *value); + //Set limdc parameter on controller + asynStatus setLimitDecel(double velocity); + //Extract axis data from GalilController data record + asynStatus getStatus(void); + //Set poller status variables bassed on GalilController data record info + void setStatus(bool *moving); + //Verify encoder operation whilst moving for safety + void checkEncoder(void); + //Stop motor if wrong limit activated and wrongLimitProtection is enabled + void wrongLimitProtection(void); + //Sets time motor has been stopped for in GalilAxis::stopped_time_ + void setStopTime(void); + //Reset homing if stopped_time_ great than + void checkHoming(void); + //Service slow and infrequent requests from poll thread to write to the controller + //We do this in a separate thread so the poll thread is not slowed + //Also poll thread doesnt have a lock and is not allowed to call writeReadController + void pollServices(void); + //Execute motor record prem function + void executePrem(void); + //Execute auto motor power on + bool executeAutoOn(void); + //Execute auto motor brake off + bool executeAutoBrakeOff(void); + //Execute the auto on delay + void executeAutoOnDelay(void); + //Execute auto motor brake on + void executeAutoBrakeOn(void); + //Execute motor record post function + void executePost(void); + //Execute auto motor power off + void executeAutoOff(void); + //Check velocity and wlp protection + asynStatus beginCheck(const char *functionName, double maxVelocity); + //Begin motor motion + asynStatus beginMotion(const char *caller); + //Set axis brake state + asynStatus setBrake(bool enable); + //Restore the motor brake status after axisReady_ + asynStatus restoreBrake(void); /* These are the methods we override from the base class */ asynStatus move(double position, int relative, double minVelocity, double maxVelocity, double acceleration); @@ -180,8 +191,9 @@ class GalilAxis : public asynMotorAxis bool postSent_; //Has post mesg been sent to pollServices thread after motor stop bool autooffSent_; //Has motor auto off mesg been sent to pollServices thread after motor stop bool postExecuted_; //Has pollServices executed post - bool autooffExecuted_; //Has pollServices executed the autooff - bool autooffAllowed_; //Block autoOff if autoOn has released lock for on delay + bool autooffAllowed_; //Block autoOff and auto brake on if autoOn has released lock for on delay + bool autobrakeonSent_; //Auto brake on message sent to pollServices + bool brakeInit_; //Brake initial state bool homedSent_; //Homed message sent to pollServices bool homedExecuted_; //Homed message has been executed by pollServices bool cancelHomeSent_; //Cancel home process message sent to pollServices diff --git a/3-0/GalilSup/src/GalilCSAxis.cpp b/3-0/GalilSup/src/GalilCSAxis.cpp index c125c17..8ea52ba 100644 --- a/3-0/GalilSup/src/GalilCSAxis.cpp +++ b/3-0/GalilSup/src/GalilCSAxis.cpp @@ -144,6 +144,7 @@ asynStatus GalilCSAxis::setDefaults(void) //Give default readback values for positions, movement direction motor_position_ = 0; + last_motor_position_ = 0; encoder_position_ = 0; direction_ = 1; //This coordinate system axis is not actually using coordinate system S or T right now @@ -154,7 +155,7 @@ asynStatus GalilCSAxis::setDefaults(void) move_started_ = false; //Axis not ready until necessary motor record fields have been pushed into driver //So we use "use encoder if present" UEIP field to set axisReady_ to true - axisReady_ = false; + lastaxisReady_ = axisReady_ = false; return asynSuccess; } @@ -755,7 +756,8 @@ asynStatus GalilCSAxis::poll(bool *moving) //Perform forward kinematic transform using real axis readback data, variable values, and //store results in GalilCSAxis, or asyn ParamList - status = forwardTransform(); + if (axisReady_) + status = forwardTransform(); if (status) goto skip; //Determine cs axis movement direction @@ -814,6 +816,15 @@ asynStatus GalilCSAxis::poll(bool *moving) last_motor_position_ = motor_position_; last_done_ = done; + //Show axis as moving until 1 cycle after axis ready + //This is done so correct setpoint is given in motor record at startup + if (!lastaxisReady_) + { + *moving = true; + done = false; + } + lastaxisReady_ = axisReady_; + skip: //Set status //Pass step count/aux encoder info to motorRecord diff --git a/3-0/GalilSup/src/GalilCSAxis.h b/3-0/GalilSup/src/GalilCSAxis.h index 2d1adea..8d40d0d 100644 --- a/3-0/GalilSup/src/GalilCSAxis.h +++ b/3-0/GalilSup/src/GalilCSAxis.h @@ -72,6 +72,7 @@ class GalilCSAxis : public asynMotorAxis * Abbreviated because it is used very frequently */ char axisName_; //The axis letter I-P bool axisReady_; //Have motor record fields been pushed into driver + bool lastaxisReady_; //Show CS axis as moving until after axis ready so initial setpoint in mr matches the readback char *fwdaxes_; //List of CS motors whose transforms should be treated as forward transforms char *forward_; //forward kinematic transform used to calculate the coordinate system (cs) motor position char *fwdvars_; //Forward kinematic variables List of Q-Z diff --git a/3-0/GalilSup/src/GalilController.cpp b/3-0/GalilSup/src/GalilController.cpp index c9f7381..8ecbdef 100644 --- a/3-0/GalilSup/src/GalilController.cpp +++ b/3-0/GalilSup/src/GalilController.cpp @@ -50,6 +50,11 @@ // Real motors are now allowed in reverse transform equations // CS motors are now allowed in forward transform equations // Enhanced shutdown code to delete RAM used by kinematics +// 05/04/15 M.Clift Added ability to actuate motor brake using digital output +// Added state names and alarm severity to digital template/substitutions +// Fixed problem with CS motor setpoint at startup +// Fixed problem with CS motor using AutoOff delay at move start. It now uses AutoOn delay at move start +// Fixed problem with config synApps build directory #include #include @@ -215,6 +220,11 @@ GalilController::GalilController(const char *portName, const char *address, doub createParam(GalilAutoOnDelayString, asynParamFloat64, &GalilAutoOnDelay_); createParam(GalilAutoOffDelayString, asynParamFloat64, &GalilAutoOffDelay_); + createParam(GalilAutoBrakeString, asynParamInt32, &GalilAutoBrake_); + createParam(GalilAutoBrakeOnDelayString, asynParamFloat64, &GalilAutoBrakeOnDelay_); + createParam(GalilBrakePortString, asynParamInt32, &GalilBrakePort_); + createParam(GalilBrakeString, asynParamInt32, &GalilBrake_); + createParam(GalilMainEncoderString, asynParamInt32, &GalilMainEncoder_); createParam(GalilAuxEncoderString, asynParamInt32, &GalilAuxEncoder_); createParam(GalilMotorAcclString, asynParamFloat64, &GalilMotorAccl_); @@ -1274,11 +1284,11 @@ void GalilController::executePrem(const char *axes) } } -//Execute motor auto on for motor list +//Execute motor auto on and brake off for motor list //Obtain lock before calling -void GalilController::executeAutoOn(const char *axes) +void GalilController::executeAutoOnBrakeOff(const char *axes) { - static const char *functionName = "executeAutoOn"; + static const char *functionName = "executeAutoOnBrakeOff"; int i; //Looping int autoonoff; //Auto on/off setting int motoroff; //Motor off status @@ -1286,7 +1296,10 @@ void GalilController::executeAutoOn(const char *axes) GalilAxis *pAxis; //GalilAxis double ondelay; //GalilAxis auto on delay double largest_ondelay = 0.0;//Largest auto on delay in motor list - + int autobrake; //Brake auto disable/enable setting + int brakeoff; //Motor brake off status + int brakeport; //Brake digital out port + bool workdone = false; //Did work to turn a motor on, or brake off //Iterate thru motor list and execute AutoOn for each axis for (i = 0; i < (int)strlen(axes); i++) @@ -1295,11 +1308,20 @@ void GalilController::executeAutoOn(const char *axes) axisNo = axes[i] - AASCII; //Retrieve axis instance pAxis = getAxis(axisNo); - //Execute AutoOn for this axis + //Execute AutoOnBrakeOff for this axis if (pAxis) { //Retrieve Auto power on/off feature status getIntegerParam(pAxis->axisNo_, GalilAutoOnOff_, &autoonoff); + //Retrieve Auto brake on/off feature status + getIntegerParam(pAxis->axisNo_, GalilAutoBrake_, &autobrake); + //Retrieve brake digital output port + getIntegerParam(pAxis->axisNo_, GalilBrakePort_, &brakeport); + //Retrieve axis auto on delay + getDoubleParam(pAxis->axisNo_, GalilAutoOnDelay_, &ondelay); + //Take note of largest on delay found in axes list + if (ondelay > largest_ondelay) + largest_ondelay = ondelay; //Query motor off status direct from controller sprintf(cmd_, "MG _MO%c\n", pAxis->axisName_); writeReadController(functionName); @@ -1307,31 +1329,41 @@ void GalilController::executeAutoOn(const char *axes) //Case where auto on delay greater than auto off delay //Block auto off function pAxis->autooffAllowed_ = false; + //Execute auto motor on if feature enabled if (motoroff && autoonoff) { - //Retrieve axis auto on delay - getDoubleParam(pAxis->axisNo_, GalilAutoOffDelay_, &ondelay); - //Take note of largest on delay found in axes list - if (ondelay > largest_ondelay) - largest_ondelay = ondelay; - //Turn on this axis - pAxis->setClosedLoop(true); + pAxis->setClosedLoop(true); //Turn on this axis + workdone = true; + } + + //Query brake status direct from controller + sprintf(cmd_, "MG @OUT[%d]\n", brakeport); + writeReadController(functionName); + brakeoff = atoi(resp_); + //Execute auto brake off if feature enabled + if (!brakeoff && autobrake) + { + pAxis->setBrake(false); //brake off command + workdone = true; } } } //Wait the longest auto on time found in list - if (largest_ondelay > 0.035) + if (workdone) { - //Safe to unlock for ondelay now all axis have autooffAllowed_ = false; - unlock(); - //Wait auto on delay - epicsThreadSleep(largest_ondelay); - //Get the lock - lock(); - } - else - epicsThreadSleep(largest_ondelay); + if (largest_ondelay > 0.035) + { + //Safe to unlock for ondelay now all axis have autooffAllowed_ = false; + unlock(); + //Wait auto on delay + epicsThreadSleep(largest_ondelay); + //Get the lock + lock(); + } + else + epicsThreadSleep(largest_ondelay); + } //Allow auto off again now we have lock again for (i = 0; i < (int)strlen(axes); i++) @@ -1435,8 +1467,8 @@ asynStatus GalilController::startLinearProfileCoordsys(int coordsys, char coordN double begin_time; //Time taken to begin int segprocessed = 0; //Segments processed by the coordsys - //Execute motor auto on function - executeAutoOn(axes); + //Execute motor auto on and brake off function + executeAutoOnBrakeOff(axes); //Execute motor record prem executePrem(axes); @@ -1833,8 +1865,8 @@ asynStatus GalilController::processDeferredMovesInGroup(int coordsys, char *axes sprintf(cmd_, "LE"); writeReadController(functionName); - //Execute motor auto on function - executeAutoOn(axes); + //Execute motor auto on and brake off function + executeAutoOnBrakeOff(axes); //Execute motor record prem executePrem(axes); @@ -2248,9 +2280,9 @@ asynStatus GalilController::writeUInt32Digital(asynUser *pasynUser, epicsUInt32 obwpa = 8; //Binary out records for RIO support 8 bits per addr //Set or clear bit as required if (value == mask) - sprintf(cmd_, "SB %d\n", (addr * obwpa) + i); + sprintf(cmd_, "SB %d", (addr * obwpa) + i); else - sprintf(cmd_, "CB %d\n", (addr * obwpa) + i); + sprintf(cmd_, "CB %d", (addr * obwpa) + i); //Write setting to controller writeReadController(functionName); //We found the correct bit, so break from loop @@ -2350,6 +2382,20 @@ asynStatus GalilController::writeInt32(asynUser *pasynUser, epicsInt32 value) status = pAxis->setClosedLoop(false); //printf("GalilMotorOn_ cmd:%s value=%d\n", cmd_, value); } + else if (function == GalilBrake_) + { + if (value) + { + status = pAxis->setBrake(true); + pAxis->brakeInit_ = true; + } + else + { + status = pAxis->setBrake(false); + pAxis->brakeInit_ = false; + } + //printf("GalilBrake_ cmd:%s value=%d\n", cmd_, value); + } else if (function == GalilMotorType_) { float newmtr; @@ -2415,10 +2461,15 @@ asynStatus GalilController::writeInt32(asynUser *pasynUser, epicsInt32 value) //Write setting to controller status = writeReadController(functionName); } - //This is one of the last autosave restore items so flag + //This is one of the last items pushed into driver at startup so flag //Axis now ready for move commands if (pAxis) + { pAxis->axisReady_ = true; //Real motor + //Restore brake cmd state + if (addr < MAX_GALIL_AXES) + pAxis->restoreBrake(); + } if (pCSAxis) pCSAxis->axisReady_ = true; //CS motor } @@ -3082,7 +3133,9 @@ void GalilController::GalilStartController(char *code_file, int burn_program, in { //Put, and wait until poller is in sleep mode //Also stop async records from controller - poller_->sleepPoller(); + poller_->sleepPoller(); + //Increase timeout whilst manipulating controller code + gco_->timeout_ms = 3000; /*Upload code currently in controller for comparison to generated/user code */ try { uc = gco_->programUpload(); @@ -3107,6 +3160,8 @@ void GalilController::GalilStartController(char *code_file, int burn_program, in //Remove the \r characters dc.erase (std::remove(dc.begin(), dc.end(), '\r'), dc.end()); + //Remove final \n character. In preparation for gclib api + //dc.erase(dc.length()-1); /*If code we wish to download differs from controller current code then download the new code*/ if (dc.compare(uc) != 0 && dc.compare("") != 0) @@ -3257,6 +3312,8 @@ void GalilController::GalilStartController(char *code_file, int burn_program, in errlogPrintf("Code started successfully on model %s, address %s\n",model_, address_); } + //Decrease timeout now finished manipulating controller code + gco_->timeout_ms = 500; //Wake poller, and re-start async records if needed poller_->wakePoller(); diff --git a/3-0/GalilSup/src/GalilController.h b/3-0/GalilSup/src/GalilController.h index 26e2d7f..98489f3 100644 --- a/3-0/GalilSup/src/GalilController.h +++ b/3-0/GalilSup/src/GalilController.h @@ -115,6 +115,10 @@ #define GalilAutoOnOffString "MOTOR_AUTO_ONOFF" #define GalilAutoOnDelayString "MOTOR_AUTO_ONDELAY" #define GalilAutoOffDelayString "MOTOR_AUTO_OFFDELAY" +#define GalilAutoBrakeString "MOTOR_AUTO_BRAKE" +#define GalilAutoBrakeOnDelayString "MOTOR_AUTO_BRAKEONDELAY" +#define GalilBrakePortString "MOTOR_BRAKEPORT" +#define GalilBrakeString "MOTOR_BRAKE" #define GalilMainEncoderString "MOTOR_MAIN_ENCODER" #define GalilAuxEncoderString "MOTOR_AUX_ENCODER" @@ -218,8 +222,8 @@ class GalilController : public asynMotorController { asynStatus motorsToProfileStartPosition(FILE *profFile, char *axes, bool move); //Execute motor record prem function for motor list void executePrem(const char *axes); - //Execute motor power auto on - void executeAutoOn(const char *axes); + //Execute auto motor power on, and brake off + void executeAutoOnBrakeOff(const char *axes); void processUnsolicitedMesgs(void); static std::string extractEthAddr(const char* str); void setCtrlError(const char* mesg); @@ -291,6 +295,10 @@ class GalilController : public asynMotorController { int GalilAutoOnOff_; int GalilAutoOnDelay_; int GalilAutoOffDelay_; + int GalilAutoBrake_; + int GalilAutoBrakeOnDelay_; + int GalilBrakePort_; + int GalilBrake_; int GalilMainEncoder_; int GalilAuxEncoder_; diff --git a/3-0/GalilTestApp/Db/galil_digital_ports.substitutions b/3-0/GalilTestApp/Db/galil_digital_ports.substitutions index 7f77b0d..60bfd18 100644 --- a/3-0/GalilTestApp/Db/galil_digital_ports.substitutions +++ b/3-0/GalilTestApp/Db/galil_digital_ports.substitutions @@ -28,91 +28,91 @@ file "$(GALIL)/GalilSup/Db/galil_digital_in_bit.template" { -pattern {P, R, PORT, BYTE, MASK } +pattern {P, R, PORT, BYTE, MASK, ZNAM, ONAM, ZSV, OSV } # DMC = Digital motor controller # DMC binary inputs are organized in bytes - {DMC01, Galil0Bi0, Galil, 0, 0x000001 } - {DMC01, Galil0Bi1, Galil, 0, 0x000002 } - {DMC01, Galil0Bi2, Galil, 0, 0x000004 } - {DMC01, Galil0Bi3, Galil, 0, 0x000008 } - {DMC01, Galil0Bi4, Galil, 0, 0x000010 } - {DMC01, Galil0Bi5, Galil, 0, 0x000020 } - {DMC01, Galil0Bi6, Galil, 0, 0x000040 } - {DMC01, Galil0Bi7, Galil, 0, 0x000080 } - - {DMC01, Galil1Bi0, Galil, 1, 0x000001 } - {DMC01, Galil1Bi1, Galil, 1, 0x000002 } - {DMC01, Galil1Bi2, Galil, 1, 0x000004 } - {DMC01, Galil1Bi3, Galil, 1, 0x000008 } - {DMC01, Galil1Bi4, Galil, 1, 0x000010 } - {DMC01, Galil1Bi5, Galil, 1, 0x000020 } - {DMC01, Galil1Bi6, Galil, 1, 0x000040 } - {DMC01, Galil1Bi7, Galil, 1, 0x000080 } - - {DMC01, Galil2Bi0, Galil, 2, 0x000001 } - {DMC01, Galil2Bi1, Galil, 2, 0x000002 } - {DMC01, Galil2Bi2, Galil, 2, 0x000004 } - {DMC01, Galil2Bi3, Galil, 2, 0x000008 } - {DMC01, Galil2Bi4, Galil, 2, 0x000010 } - {DMC01, Galil2Bi5, Galil, 2, 0x000020 } - {DMC01, Galil2Bi6, Galil, 2, 0x000040 } - {DMC01, Galil2Bi7, Galil, 2, 0x000080 } - - {DMC01, Galil3Bi0, Galil, 3, 0x000001 } - {DMC01, Galil3Bi1, Galil, 3, 0x000002 } - {DMC01, Galil3Bi2, Galil, 3, 0x000004 } - {DMC01, Galil3Bi3, Galil, 3, 0x000008 } - {DMC01, Galil3Bi4, Galil, 3, 0x000010 } - {DMC01, Galil3Bi5, Galil, 3, 0x000020 } - {DMC01, Galil3Bi6, Galil, 3, 0x000040 } - {DMC01, Galil3Bi7, Galil, 3, 0x000080 } - - {DMC01, Galil4Bi0, Galil, 4, 0x000001 } - {DMC01, Galil4Bi1, Galil, 4, 0x000002 } - {DMC01, Galil4Bi2, Galil, 4, 0x000004 } - {DMC01, Galil4Bi3, Galil, 4, 0x000008 } - {DMC01, Galil4Bi4, Galil, 4, 0x000010 } - {DMC01, Galil4Bi5, Galil, 4, 0x000020 } - {DMC01, Galil4Bi6, Galil, 4, 0x000040 } - {DMC01, Galil4Bi7, Galil, 4, 0x000080 } - - {DMC01, Galil5Bi0, Galil, 5, 0x000001 } - {DMC01, Galil5Bi1, Galil, 5, 0x000002 } - {DMC01, Galil5Bi2, Galil, 5, 0x000004 } - {DMC01, Galil5Bi3, Galil, 5, 0x000008 } - {DMC01, Galil5Bi4, Galil, 5, 0x000010 } - {DMC01, Galil5Bi5, Galil, 5, 0x000020 } - {DMC01, Galil5Bi6, Galil, 5, 0x000040 } - {DMC01, Galil5Bi7, Galil, 5, 0x000080 } - - {DMC01, Galil6Bi0, Galil, 6, 0x000001 } - {DMC01, Galil6Bi1, Galil, 6, 0x000002 } - {DMC01, Galil6Bi2, Galil, 6, 0x000004 } - {DMC01, Galil6Bi3, Galil, 6, 0x000008 } - {DMC01, Galil6Bi4, Galil, 6, 0x000010 } - {DMC01, Galil6Bi5, Galil, 6, 0x000020 } - {DMC01, Galil6Bi6, Galil, 6, 0x000040 } - {DMC01, Galil6Bi7, Galil, 6, 0x000080 } + {DMC01, Galil0Bi0, Galil, 0, 0x000001, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil0Bi1, Galil, 0, 0x000002, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil0Bi2, Galil, 0, 0x000004, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil0Bi3, Galil, 0, 0x000008, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil0Bi4, Galil, 0, 0x000010, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil0Bi5, Galil, 0, 0x000020, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil0Bi6, Galil, 0, 0x000040, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil0Bi7, Galil, 0, 0x000080, "Off", "On", "NO_ALARM", "NO_ALARM" } + + {DMC01, Galil1Bi0, Galil, 1, 0x000001, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil1Bi1, Galil, 1, 0x000002, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil1Bi2, Galil, 1, 0x000004, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil1Bi3, Galil, 1, 0x000008, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil1Bi4, Galil, 1, 0x000010, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil1Bi5, Galil, 1, 0x000020, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil1Bi6, Galil, 1, 0x000040, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil1Bi7, Galil, 1, 0x000080, "Off", "On", "NO_ALARM", "NO_ALARM" } + + {DMC01, Galil2Bi0, Galil, 2, 0x000001, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil2Bi1, Galil, 2, 0x000002, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil2Bi2, Galil, 2, 0x000004, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil2Bi3, Galil, 2, 0x000008, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil2Bi4, Galil, 2, 0x000010, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil2Bi5, Galil, 2, 0x000020, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil2Bi6, Galil, 2, 0x000040, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil2Bi7, Galil, 2, 0x000080, "Off", "On", "NO_ALARM", "NO_ALARM" } + + {DMC01, Galil3Bi0, Galil, 3, 0x000001, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil3Bi1, Galil, 3, 0x000002, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil3Bi2, Galil, 3, 0x000004, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil3Bi3, Galil, 3, 0x000008, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil3Bi4, Galil, 3, 0x000010, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil3Bi5, Galil, 3, 0x000020, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil3Bi6, Galil, 3, 0x000040, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil3Bi7, Galil, 3, 0x000080, "Off", "On", "NO_ALARM", "NO_ALARM" } + + {DMC01, Galil4Bi0, Galil, 4, 0x000001, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil4Bi1, Galil, 4, 0x000002, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil4Bi2, Galil, 4, 0x000004, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil4Bi3, Galil, 4, 0x000008, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil4Bi4, Galil, 4, 0x000010, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil4Bi5, Galil, 4, 0x000020, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil4Bi6, Galil, 4, 0x000040, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil4Bi7, Galil, 4, 0x000080, "Off", "On", "NO_ALARM", "NO_ALARM" } + + {DMC01, Galil5Bi0, Galil, 5, 0x000001, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil5Bi1, Galil, 5, 0x000002, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil5Bi2, Galil, 5, 0x000004, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil5Bi3, Galil, 5, 0x000008, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil5Bi4, Galil, 5, 0x000010, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil5Bi5, Galil, 5, 0x000020, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil5Bi6, Galil, 5, 0x000040, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil5Bi7, Galil, 5, 0x000080, "Off", "On", "NO_ALARM", "NO_ALARM" } + + {DMC01, Galil6Bi0, Galil, 6, 0x000001, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil6Bi1, Galil, 6, 0x000002, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil6Bi2, Galil, 6, 0x000004, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil6Bi3, Galil, 6, 0x000008, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil6Bi4, Galil, 6, 0x000010, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil6Bi5, Galil, 6, 0x000020, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil6Bi6, Galil, 6, 0x000040, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil6Bi7, Galil, 6, 0x000080, "Off", "On", "NO_ALARM", "NO_ALARM" } # RIO binary inputs are organized in bytes - {RIO01, Galil0Bi0, RIO, 0, 0x000001 } - {RIO01, Galil0Bi1, RIO, 0, 0x000002 } - {RIO01, Galil0Bi2, RIO, 0, 0x000004 } - {RIO01, Galil0Bi3, RIO, 0, 0x000008 } - {RIO01, Galil0Bi4, RIO, 0, 0x000010 } - {RIO01, Galil0Bi5, RIO, 0, 0x000020 } - {RIO01, Galil0Bi6, RIO, 0, 0x000040 } - {RIO01, Galil0Bi7, RIO, 0, 0x000080 } - - {RIO01, Galil1Bi0, RIO, 1, 0x000001 } - {RIO01, Galil1Bi1, RIO, 1, 0x000002 } - {RIO01, Galil1Bi2, RIO, 1, 0x000004 } - {RIO01, Galil1Bi3, RIO, 1, 0x000008 } - {RIO01, Galil1Bi4, RIO, 1, 0x000010 } - {RIO01, Galil1Bi5, RIO, 1, 0x000020 } - {RIO01, Galil1Bi6, RIO, 1, 0x000040 } - {RIO01, Galil1Bi7, RIO, 1, 0x000080 } + {RIO01, Galil0Bi0, RIO, 0, 0x000001, "Off", "On", "NO_ALARM", "NO_ALARM" } + {RIO01, Galil0Bi1, RIO, 0, 0x000002, "Off", "On", "NO_ALARM", "NO_ALARM" } + {RIO01, Galil0Bi2, RIO, 0, 0x000004, "Off", "On", "NO_ALARM", "NO_ALARM" } + {RIO01, Galil0Bi3, RIO, 0, 0x000008, "Off", "On", "NO_ALARM", "NO_ALARM" } + {RIO01, Galil0Bi4, RIO, 0, 0x000010, "Off", "On", "NO_ALARM", "NO_ALARM" } + {RIO01, Galil0Bi5, RIO, 0, 0x000020, "Off", "On", "NO_ALARM", "NO_ALARM" } + {RIO01, Galil0Bi6, RIO, 0, 0x000040, "Off", "On", "NO_ALARM", "NO_ALARM" } + {RIO01, Galil0Bi7, RIO, 0, 0x000080, "Off", "On", "NO_ALARM", "NO_ALARM" } + + {RIO01, Galil1Bi0, RIO, 1, 0x000001, "Off", "On", "NO_ALARM", "NO_ALARM" } + {RIO01, Galil1Bi1, RIO, 1, 0x000002, "Off", "On", "NO_ALARM", "NO_ALARM" } + {RIO01, Galil1Bi2, RIO, 1, 0x000004, "Off", "On", "NO_ALARM", "NO_ALARM" } + {RIO01, Galil1Bi3, RIO, 1, 0x000008, "Off", "On", "NO_ALARM", "NO_ALARM" } + {RIO01, Galil1Bi4, RIO, 1, 0x000010, "Off", "On", "NO_ALARM", "NO_ALARM" } + {RIO01, Galil1Bi5, RIO, 1, 0x000020, "Off", "On", "NO_ALARM", "NO_ALARM" } + {RIO01, Galil1Bi6, RIO, 1, 0x000040, "Off", "On", "NO_ALARM", "NO_ALARM" } + {RIO01, Galil1Bi7, RIO, 1, 0x000080, "Off", "On", "NO_ALARM", "NO_ALARM" } } @@ -124,113 +124,113 @@ pattern {P, R, PORT, BYTE, MASK } file "$(GALIL)/GalilSup/Db/galil_digital_out_bit.template" { -pattern {P, R, PORT, WORD, MASK } +pattern {P, R, PORT, WORD, MASK, ZNAM, ONAM, ZSV, OSV } # DMC binary outputs are organized in 16bit words - {DMC01, Galil0Bo0, Galil, 0, 0x000001 } - {DMC01, Galil0Bo1, Galil, 0, 0x000002 } - {DMC01, Galil0Bo2, Galil, 0, 0x000004 } - {DMC01, Galil0Bo3, Galil, 0, 0x000008 } - {DMC01, Galil0Bo4, Galil, 0, 0x000010 } - {DMC01, Galil0Bo5, Galil, 0, 0x000020 } - {DMC01, Galil0Bo6, Galil, 0, 0x000040 } - {DMC01, Galil0Bo7, Galil, 0, 0x000080 } - {DMC01, Galil0Bo8, Galil, 0, 0x000100 } - {DMC01, Galil0Bo9, Galil, 0, 0x000200 } - {DMC01, Galil0Bo10, Galil, 0, 0x000400 } - {DMC01, Galil0Bo11, Galil, 0, 0x000800 } - {DMC01, Galil0Bo12, Galil, 0, 0x001000 } - {DMC01, Galil0Bo13, Galil, 0, 0x002000 } - {DMC01, Galil0Bo14, Galil, 0, 0x004000 } - {DMC01, Galil0Bo15, Galil, 0, 0x008000 } - - {DMC01, Galil1Bo0, Galil, 1, 0x000001 } - {DMC01, Galil1Bo1, Galil, 1, 0x000002 } - {DMC01, Galil1Bo2, Galil, 1, 0x000004 } - {DMC01, Galil1Bo3, Galil, 1, 0x000008 } - {DMC01, Galil1Bo4, Galil, 1, 0x000010 } - {DMC01, Galil1Bo5, Galil, 1, 0x000020 } - {DMC01, Galil1Bo6, Galil, 1, 0x000040 } - {DMC01, Galil1Bo7, Galil, 1, 0x000080 } - {DMC01, Galil1Bo8, Galil, 1, 0x000100 } - {DMC01, Galil1Bo9, Galil, 1, 0x000200 } - {DMC01, Galil1Bo10, Galil, 1, 0x000400 } - {DMC01, Galil1Bo11, Galil, 1, 0x000800 } - {DMC01, Galil1Bo12, Galil, 1, 0x001000 } - {DMC01, Galil1Bo13, Galil, 1, 0x002000 } - {DMC01, Galil1Bo14, Galil, 1, 0x004000 } - {DMC01, Galil1Bo15, Galil, 1, 0x008000 } - - {DMC01, Galil2Bo0, Galil, 2, 0x000001 } - {DMC01, Galil2Bo1, Galil, 2, 0x000002 } - {DMC01, Galil2Bo2, Galil, 2, 0x000004 } - {DMC01, Galil2Bo3, Galil, 2, 0x000008 } - {DMC01, Galil2Bo4, Galil, 2, 0x000010 } - {DMC01, Galil2Bo5, Galil, 2, 0x000020 } - {DMC01, Galil2Bo6, Galil, 2, 0x000040 } - {DMC01, Galil2Bo7, Galil, 2, 0x000080 } - {DMC01, Galil2Bo8, Galil, 2, 0x000100 } - {DMC01, Galil2Bo9, Galil, 2, 0x000200 } - {DMC01, Galil2Bo10, Galil, 2, 0x000400 } - {DMC01, Galil2Bo11, Galil, 2, 0x000800 } - {DMC01, Galil2Bo12, Galil, 2, 0x001000 } - {DMC01, Galil2Bo13, Galil, 2, 0x002000 } - {DMC01, Galil2Bo14, Galil, 2, 0x004000 } - {DMC01, Galil2Bo15, Galil, 2, 0x008000 } - - {DMC01, Galil3Bo0, Galil, 3, 0x000001 } - {DMC01, Galil3Bo1, Galil, 3, 0x000002 } - {DMC01, Galil3Bo2, Galil, 3, 0x000004 } - {DMC01, Galil3Bo3, Galil, 3, 0x000008 } - {DMC01, Galil3Bo4, Galil, 3, 0x000010 } - {DMC01, Galil3Bo5, Galil, 3, 0x000020 } - {DMC01, Galil3Bo6, Galil, 3, 0x000040 } - {DMC01, Galil3Bo7, Galil, 3, 0x000080 } - {DMC01, Galil3Bo8, Galil, 3, 0x000100 } - {DMC01, Galil3Bo9, Galil, 3, 0x000200 } - {DMC01, Galil3Bo10, Galil, 3, 0x000400 } - {DMC01, Galil3Bo11, Galil, 3, 0x000800 } - {DMC01, Galil3Bo12, Galil, 3, 0x001000 } - {DMC01, Galil3Bo13, Galil, 3, 0x002000 } - {DMC01, Galil3Bo14, Galil, 3, 0x004000 } - {DMC01, Galil3Bo15, Galil, 3, 0x008000 } - - {DMC01, Galil4Bo0, Galil, 4, 0x000001 } - {DMC01, Galil4Bo1, Galil, 4, 0x000002 } - {DMC01, Galil4Bo2, Galil, 4, 0x000004 } - {DMC01, Galil4Bo3, Galil, 4, 0x000008 } - {DMC01, Galil4Bo4, Galil, 4, 0x000010 } - {DMC01, Galil4Bo5, Galil, 4, 0x000020 } - {DMC01, Galil4Bo6, Galil, 4, 0x000040 } - {DMC01, Galil4Bo7, Galil, 4, 0x000080 } - {DMC01, Galil4Bo8, Galil, 4, 0x000100 } - {DMC01, Galil4Bo9, Galil, 4, 0x000200 } - {DMC01, Galil4Bo10, Galil, 4, 0x000400 } - {DMC01, Galil4Bo11, Galil, 4, 0x000800 } - {DMC01, Galil4Bo12, Galil, 4, 0x001000 } - {DMC01, Galil4Bo13, Galil, 4, 0x002000 } - {DMC01, Galil4Bo14, Galil, 4, 0x004000 } - {DMC01, Galil4Bo15, Galil, 4, 0x008000 } + {DMC01, Galil0Bo0, Galil, 0, 0x000001, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil0Bo1, Galil, 0, 0x000002, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil0Bo2, Galil, 0, 0x000004, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil0Bo3, Galil, 0, 0x000008, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil0Bo4, Galil, 0, 0x000010, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil0Bo5, Galil, 0, 0x000020, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil0Bo6, Galil, 0, 0x000040, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil0Bo7, Galil, 0, 0x000080, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil0Bo8, Galil, 0, 0x000100, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil0Bo9, Galil, 0, 0x000200, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil0Bo10, Galil, 0, 0x000400, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil0Bo11, Galil, 0, 0x000800, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil0Bo12, Galil, 0, 0x001000, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil0Bo13, Galil, 0, 0x002000, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil0Bo14, Galil, 0, 0x004000, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil0Bo15, Galil, 0, 0x008000, "Off", "On", "NO_ALARM", "NO_ALARM" } + + {DMC01, Galil1Bo0, Galil, 1, 0x000001, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil1Bo1, Galil, 1, 0x000002, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil1Bo2, Galil, 1, 0x000004, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil1Bo3, Galil, 1, 0x000008, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil1Bo4, Galil, 1, 0x000010, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil1Bo5, Galil, 1, 0x000020, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil1Bo6, Galil, 1, 0x000040, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil1Bo7, Galil, 1, 0x000080, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil1Bo8, Galil, 1, 0x000100, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil1Bo9, Galil, 1, 0x000200, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil1Bo10, Galil, 1, 0x000400, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil1Bo11, Galil, 1, 0x000800, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil1Bo12, Galil, 1, 0x001000, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil1Bo13, Galil, 1, 0x002000, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil1Bo14, Galil, 1, 0x004000, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil1Bo15, Galil, 1, 0x008000, "Off", "On", "NO_ALARM", "NO_ALARM" } + + {DMC01, Galil2Bo0, Galil, 2, 0x000001, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil2Bo1, Galil, 2, 0x000002, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil2Bo2, Galil, 2, 0x000004, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil2Bo3, Galil, 2, 0x000008, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil2Bo4, Galil, 2, 0x000010, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil2Bo5, Galil, 2, 0x000020, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil2Bo6, Galil, 2, 0x000040, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil2Bo7, Galil, 2, 0x000080, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil2Bo8, Galil, 2, 0x000100, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil2Bo9, Galil, 2, 0x000200, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil2Bo10, Galil, 2, 0x000400, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil2Bo11, Galil, 2, 0x000800, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil2Bo12, Galil, 2, 0x001000, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil2Bo13, Galil, 2, 0x002000, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil2Bo14, Galil, 2, 0x004000, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil2Bo15, Galil, 2, 0x008000, "Off", "On", "NO_ALARM", "NO_ALARM" } + + {DMC01, Galil3Bo0, Galil, 3, 0x000001, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil3Bo1, Galil, 3, 0x000002, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil3Bo2, Galil, 3, 0x000004, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil3Bo3, Galil, 3, 0x000008, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil3Bo4, Galil, 3, 0x000010, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil3Bo5, Galil, 3, 0x000020, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil3Bo6, Galil, 3, 0x000040, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil3Bo7, Galil, 3, 0x000080, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil3Bo8, Galil, 3, 0x000100, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil3Bo9, Galil, 3, 0x000200, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil3Bo10, Galil, 3, 0x000400, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil3Bo11, Galil, 3, 0x000800, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil3Bo12, Galil, 3, 0x001000, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil3Bo13, Galil, 3, 0x002000, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil3Bo14, Galil, 3, 0x004000, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil3Bo15, Galil, 3, 0x008000, "Off", "On", "NO_ALARM", "NO_ALARM" } + + {DMC01, Galil4Bo0, Galil, 4, 0x000001, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil4Bo1, Galil, 4, 0x000002, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil4Bo2, Galil, 4, 0x000004, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil4Bo3, Galil, 4, 0x000008, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil4Bo4, Galil, 4, 0x000010, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil4Bo5, Galil, 4, 0x000020, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil4Bo6, Galil, 4, 0x000040, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil4Bo7, Galil, 4, 0x000080, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil4Bo8, Galil, 4, 0x000100, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil4Bo9, Galil, 4, 0x000200, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil4Bo10, Galil, 4, 0x000400, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil4Bo11, Galil, 4, 0x000800, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil4Bo12, Galil, 4, 0x001000, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil4Bo13, Galil, 4, 0x002000, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil4Bo14, Galil, 4, 0x004000, "Off", "On", "NO_ALARM", "NO_ALARM" } + {DMC01, Galil4Bo15, Galil, 4, 0x008000, "Off", "On", "NO_ALARM", "NO_ALARM" } # RIO binary outputs are organized in bytes # However we name records in words for consistency with DMC for display purposes - {RIO01, Galil0Bo0, RIO, 0, 0x000001 } - {RIO01, Galil0Bo1, RIO, 0, 0x000002 } - {RIO01, Galil0Bo2, RIO, 0, 0x000004 } - {RIO01, Galil0Bo3, RIO, 0, 0x000008 } - {RIO01, Galil0Bo4, RIO, 0, 0x000010 } - {RIO01, Galil0Bo5, RIO, 0, 0x000020 } - {RIO01, Galil0Bo6, RIO, 0, 0x000040 } - {RIO01, Galil0Bo7, RIO, 0, 0x000080 } - - {RIO01, Galil0Bo8, RIO, 1, 0x000001 } - {RIO01, Galil0Bo9, RIO, 1, 0x000002 } - {RIO01, Galil0Bo10, RIO, 1, 0x000004 } - {RIO01, Galil0Bo11, RIO, 1, 0x000008 } - {RIO01, Galil0Bo12, RIO, 1, 0x000010 } - {RIO01, Galil0Bo13, RIO, 1, 0x000020 } - {RIO01, Galil0Bo14, RIO, 1, 0x000040 } - {RIO01, Galil0Bo15, RIO, 1, 0x000080 } + {RIO01, Galil0Bo0, RIO, 0, 0x000001, "Off", "On", "NO_ALARM", "NO_ALARM" } + {RIO01, Galil0Bo1, RIO, 0, 0x000002, "Off", "On", "NO_ALARM", "NO_ALARM" } + {RIO01, Galil0Bo2, RIO, 0, 0x000004, "Off", "On", "NO_ALARM", "NO_ALARM" } + {RIO01, Galil0Bo3, RIO, 0, 0x000008, "Off", "On", "NO_ALARM", "NO_ALARM" } + {RIO01, Galil0Bo4, RIO, 0, 0x000010, "Off", "On", "NO_ALARM", "NO_ALARM" } + {RIO01, Galil0Bo5, RIO, 0, 0x000020, "Off", "On", "NO_ALARM", "NO_ALARM" } + {RIO01, Galil0Bo6, RIO, 0, 0x000040, "Off", "On", "NO_ALARM", "NO_ALARM" } + {RIO01, Galil0Bo7, RIO, 0, 0x000080, "Off", "On", "NO_ALARM", "NO_ALARM" } + + {RIO01, Galil0Bo8, RIO, 1, 0x000001, "Off", "On", "NO_ALARM", "NO_ALARM" } + {RIO01, Galil0Bo9, RIO, 1, 0x000002, "Off", "On", "NO_ALARM", "NO_ALARM" } + {RIO01, Galil0Bo10, RIO, 1, 0x000004, "Off", "On", "NO_ALARM", "NO_ALARM" } + {RIO01, Galil0Bo11, RIO, 1, 0x000008, "Off", "On", "NO_ALARM", "NO_ALARM" } + {RIO01, Galil0Bo12, RIO, 1, 0x000010, "Off", "On", "NO_ALARM", "NO_ALARM" } + {RIO01, Galil0Bo13, RIO, 1, 0x000020, "Off", "On", "NO_ALARM", "NO_ALARM" } + {RIO01, Galil0Bo14, RIO, 1, 0x000040, "Off", "On", "NO_ALARM", "NO_ALARM" } + {RIO01, Galil0Bo15, RIO, 1, 0x000080, "Off", "On", "NO_ALARM", "NO_ALARM" } } diff --git a/3-0/config/Cygwin_setup.html b/3-0/config/Cygwin_setup.html deleted file mode 100644 index 9274c8d..0000000 --- a/3-0/config/Cygwin_setup.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -Building synApps on Cygwin - - -

Building synApps on Cygwin

-The following components from the Cygwin distribution package are required in order to build synApps -for the cygwin-x86 architecture: -
    -
  • base -
      -
    • All default components -
    -
  • devel -
      -
    • gcc-core -
    • gcc-g++ -
    • libncurses-devel -
    • make -
    • readline -
    -
  • interpreters -
      -
    • perl -
    -
  • libs -
      -
    • ncurses -
    • sunrpc -
    -
- -To set up the PATH and EPICS_HOST_ARCH environment variables create a script file called -/usr/local/bin/setup_epics containing lines like the following: -
-export PATH="/usr/bin:/usr/local/bin:/corvette/usr/local/epics/base/bin/cygwin-x86"
-export EPICS_HOST_ARCH=cygwin-x86
-
- -The last element in the PATH definition must be the path to the bin/cygwin-x86 subdirectory in your -local installation of EPICS base. -

-When logging in to the bash shell on cygwin type the command -

-source setup_epics
-
-to execute that script. -

-

- Suggestions and Comments to:
- Mark Rivers: - (rivers@cars.uchicago.edu)
- Last modified: November 28, 2005 -
- - diff --git a/3-0/config/MASTER_RELEASE b/3-0/config/GALILRELEASE similarity index 90% rename from 3-0/config/MASTER_RELEASE rename to 3-0/config/GALILRELEASE index df2a90b..3d974b7 100644 --- a/3-0/config/MASTER_RELEASE +++ b/3-0/config/GALILRELEASE @@ -1,10 +1,10 @@ SUPPORT=/ EPICS_BASE=/beamline/perforce/Dev/SBS/4_Controls/4_3_Network_Infrastructure/4_3_1_Comms_Common_Services/sw/epics/base-3-14-12-4 AUTOSAVE=/beamline/perforce/Dev/SBS/4_Controls/4_3_Network_Infrastructure/4_3_1_Comms_Common_Services/sw/epics/autosave-5-5 -SNCSEQ=/beamline/perforce/Dev/SBS/4_Controls/4_3_Network_Infrastructure/4_3_1_Comms_Common_Services/sw/epics/seq/2-0-12 +SNCSEQ=/beamline/perforce/Dev/SBS/4_Controls/4_3_Network_Infrastructure/4_3_1_Comms_Common_Services/sw/epics/seq/2-1-18 SSCAN=/beamline/perforce/Dev/SBS/4_Controls/4_3_Network_Infrastructure/4_3_1_Comms_Common_Services/sw/epics/sscan-2-8-1 CALC=/beamline/perforce/Dev/SBS/4_Controls/4_3_Network_Infrastructure/4_3_1_Comms_Common_Services/sw/epics/calc-3-4 -ASYN=/beamline/perforce/Dev/SBS/4_Controls/4_3_Network_Infrastructure/4_3_1_Comms_Common_Services/sw/epics/asyn-4-23 +ASYN=/beamline/perforce/Dev/SBS/4_Controls/4_3_Network_Infrastructure/4_3_1_Comms_Common_Services/sw/epics/asyn4-26 BUSY=/beamline/perforce/Dev/SBS/4_Controls/4_3_Network_Infrastructure/4_3_1_Comms_Common_Services/sw/epics/busy-1-6 MOTOR=/beamline/perforce/Dev/SBS/4_Controls/4_3_Network_Infrastructure/4_3_1_Comms_Common_Services/sw/epics/motorR6-8-1 GALIL=/home/ics/git/Galil-3-0/3-0 diff --git a/3-0/config/Makefile b/3-0/config/Makefile index 5915166..0896302 100644 --- a/3-0/config/Makefile +++ b/3-0/config/Makefile @@ -1,8 +1,8 @@ #FILENAME: Makefile #USAGE: Top Makefile -#Version: $Revision: #2 $ +#Version: $Revision: #3 $ #Modified By: $Author: cliftm $ -#Last Modified: $Date: 2012/03/20 $ +#Last Modified: $Date: 2015/02/26 $ #NOTES- The "DIRS" order is based on compile time dependencies. # - The user must modify SUPPORT and EPICS_BASE for local configuration. # - To support multiple configurations, use multiple config* directories @@ -12,8 +12,8 @@ # another configuration, then the DIRS line for that support module # must be commented out (i.e, must begin with a '#'). -include MASTER_RELEASE -MASTER_FILES = MASTER_RELEASE +include GALILRELEASE +MASTER_FILES = GALILRELEASE include CONFIG include $(EPICS_BASE)/config/CONFIG_COMMON @@ -50,7 +50,6 @@ RELEASE_FILES += $(BUSY)/configure/RELEASE ################### 4th Tier Modules ##################### -RELEASE_FILES += $(GALIL)/configure/RELEASE ################### 5th Tier Modules ##################### @@ -69,3 +68,4 @@ all install clean rebuild inc depends build uninstall release: ACTIONS += uninstall distclean cvsclean realuninstall include RULES_DIRS + diff --git a/3-0/config/Makefile.win32-x86 b/3-0/config/Makefile.win32-x86 deleted file mode 100755 index 8db2c7b..0000000 --- a/3-0/config/Makefile.win32-x86 +++ /dev/null @@ -1,120 +0,0 @@ -#FILENAME: Makefile -#USAGE: Top Makefile -#Version: $Revision: 1.2 $ -#Modified By: $Author: sluiter $ -#Last Modified: $Date: 2006/05/16 19:55:40 $ -#NOTES- The "DIRS" order is based on compile time dependencies. -# - The user must modify SUPPORT and EPICS_BASE for local configuration. -# - To support multiple configurations, use multiple config* directories -# - Support modules can be shared between configurations only if -# dependencies are not violated. Only the "DIRS" are the target of -# gnumake. If this configuration is using a support module built by -# another configuration, then the DIRS line for that support module -# must be commented out (i.e, must begin with a '#'). - -include WIN32_MASTER_RELEASE -MASTER_FILES = WIN32_MASTER_RELEASE - -include CONFIG -include $(EPICS_BASE)/config/CONFIG_COMMON - -###### 1st Tier Modules - Only Depend on EPICS BASE ###### - -#DIRS += $(VXSTATS) -#RELEASE_FILES += $(VXSTATS)/configure/RELEASE.win32-x86 - -DIRS += $(SNCSEQ) -RELEASE_FILES += $(SNCSEQ)/configure/RELEASE.win32-x86 - -DIRS += $(ALLEN_BRADLEY) -RELEASE_FILES += $(ALLEN_BRADLEY)/configure/RELEASE.win32-x86 - -DIRS += $(IPAC) -RELEASE_FILES += $(IPAC)/configure/RELEASE.win32-x86 - -DIRS += $(SSCAN) -RELEASE_FILES += $(SSCAN)/configure/RELEASE.win32-x86 - -DIRS += $(AUTOSAVE) -RELEASE_FILES += $(AUTOSAVE)/configure/RELEASE.win32-x86 - -DIRS += $(GENSUB) -RELEASE_FILES += $(GENSUB)/configure/RELEASE.win32-x86 - -###### 2nd Tier Modules - Only Depend on 1st Tier ######## - -DIRS += $(ASYN) -RELEASE_FILES += $(ASYN)/configure/RELEASE.win32-x86 - -DIRS += $(CALC) -RELEASE_FILES += $(CALC)/configure/RELEASE.win32-x86 - -################### 3rd Tier Modules ##################### - -DIRS += $(MOTOR) -RELEASE_FILES += $(MOTOR)/configure/RELEASE.win32-x86 - -DIRS += $(STD) -RELEASE_FILES += $(STD)/configure/RELEASE.win32-x86 - -DIRS += $(DAC128V) -RELEASE_FILES += $(DAC128V)/configure/RELEASE.win32-x86 - -DIRS += $(IP330) -RELEASE_FILES += $(IP330)/configure/RELEASE.win32-x86 - -DIRS += $(IPUNIDIG) -RELEASE_FILES += $(IPUNIDIG)/configure/RELEASE.win32-x86 - -DIRS += $(LOVE) -RELEASE_FILES += $(LOVE)/configure/RELEASE.win32-x86 - -DIRS += $(IP) -RELEASE_FILES += $(IP)/configure/RELEASE.win32-x86 - -DIRS += $(CCD) -RELEASE_FILES += $(CCD)/configure/RELEASE.win32-x86 - -DIRS += $(OPTICS) -RELEASE_FILES += $(OPTICS)/configure/RELEASE.win32-x86 - -################### 4th Tier Modules ##################### - -DIRS += $(CAMAC) -RELEASE_FILES += $(CAMAC)/configure/RELEASE.win32-x86 - -DIRS += $(MCA) -RELEASE_FILES += $(MCA)/configure/RELEASE.win32-x86 - -DIRS += $(VME) -RELEASE_FILES += $(VME)/configure/RELEASE.win32-x86 - -################### 5th Tier Modules ##################### - -DIRS += $(DXP) -RELEASE_FILES += $(DXP)/configure/RELEASE.win32-x86 - -DIRS += $(QUADEM) -RELEASE_FILES += $(QUADEM)/configure/RELEASE.win32-x86 - -DIRS += $(XXX) -RELEASE_FILES += $(XXX)/configure/RELEASE.win32-x86 - -DIRS += $(CARS) -RELEASE_FILES += $(CARS)/configure/RELEASE.win32-x86 - -all install clean rebuild inc depends build uninstall release: - echo SUPPORT=$(SUPPORT) - echo ' ' - echo EPICS_BASE=$(EPICS_BASE) - echo ' ' - echo MASTER_FILES=$(MASTER_FILES) - echo ' ' - echo RELEASE_FILES=$(RELEASE_FILES) - echo ' ' - $(PERL) makeReleaseConsistent.pl $(SUPPORT) $(EPICS_BASE) $(MASTER_FILES) $(RELEASE_FILES) - -# per jba, to support actions normally defined in RULES_TOP -ACTIONS += uninstall distclean cvsclean realuninstall - -include $(SUPPORT)/config/RULES_DIRS diff --git a/3-0/config/README b/3-0/config/README index eea1599..0320a38 100644 --- a/3-0/config/README +++ b/3-0/config/README @@ -3,7 +3,7 @@ ============================================================================== Edit the following for your site: -MASTER_RELEASE - Specify module paths. +GALILRELEASE - Specify module paths. After modifying this file, gnumake release to propagate changes to all module RELEASE files. diff --git a/3-0/config/WIN32_MASTER_RELEASE b/3-0/config/WIN32_MASTER_RELEASE deleted file mode 100755 index 1307cef..0000000 --- a/3-0/config/WIN32_MASTER_RELEASE +++ /dev/null @@ -1,28 +0,0 @@ -SUPPORT=J:/epics/devel -EPICS_BASE=H:/epics/base-3.14.8.2 -ALLEN_BRADLEY=$(SUPPORT)/allenBradley/2-1 -ASYN=$(SUPPORT)/asyn/4-6 -AUTOSAVE=$(SUPPORT)/autosave/4-2-1 -CALC=$(SUPPORT)/calc/2-6-3 -CAMAC=$(SUPPORT)/camac/2-5 -CCD=$(SUPPORT)/ccd/1-6 -DAC128V=$(SUPPORT)/dac128V/2-3 -DXP=$(SUPPORT)/dxp/2-5 -GENSUB=$(SUPPORT)/genSub/1-6a -IP=$(SUPPORT)/ip/2-7 -IP330=$(SUPPORT)/ip330/2-4 -IPAC=$(SUPPORT)/ipac/2-8 -IPUNIDIG=$(SUPPORT)/ipUnidig/2-4 -LOVE=$(SUPPORT)/love/3-2-3 -MCA=$(SUPPORT)/mca/6-9 -MOTOR=$(SUPPORT)/motor/6-1 -OPTICS=$(SUPPORT)/optics/2-5-2 -QUADEM=$(SUPPORT)/quadEM/2-3 -SNCSEQ=$(SUPPORT)/seq/2-0-11 -SSCAN=$(SUPPORT)/sscan/2-5-3 -STD=$(SUPPORT)/std/2-5-4 -VME=$(SUPPORT)/vme/2-4-4 -VXSTATS=$(SUPPORT)/vxStats/1-7-2e -XXX=$(SUPPORT)/xxx/5-2 -CARS=$(SUPPORT)/CARS/1-5 - diff --git a/3-0/config/make.out b/3-0/config/make.out deleted file mode 100644 index e4417cc..0000000 --- a/3-0/config/make.out +++ /dev/null @@ -1,66 +0,0 @@ -make -C /home/mooney/epics/tmp/synApps_5_2/support/vxStats/1-7-2e install -make[1]: Entering directory `/home/mooney/epics/tmp/synApps_5_2/support/vxStats/1-7-2e' -make -C configure install -make[2]: Entering directory `/home/mooney/epics/tmp/synApps_5_2/support/vxStats/1-7-2e/configure' -perl /home/mooney/epics/base-3.14.8.2/configure/tools/convertRelease.pl -h cygwin-x86 checkRelease -perl /home/mooney/epics/base-3.14.8.2/configure/tools/makeMakefile.pl O.cygwin-x86 ../.. -mkdir O.Common -make -C O.cygwin-x86 -f ../Makefile TOP=../.. T_A=cygwin-x86 install -make[3]: Entering directory `/home/mooney/epics/tmp/synApps_5_2/support/vxStats/1-7-2e/configure/O.cygwin-x86' -perl /home/mooney/epics/base-3.14.8.2/configure/tools/convertRelease.pl -h cygwin-x86 CONFIG_APP_INCLUDE -perl /home/mooney/epics/base-3.14.8.2/configure/tools/convertRelease.pl -h cygwin-x86 RULES_INCLUDE -make[3]: Leaving directory `/home/mooney/epics/tmp/synApps_5_2/support/vxStats/1-7-2e/configure/O.cygwin-x86' -make[2]: Leaving directory `/home/mooney/epics/tmp/synApps_5_2/support/vxStats/1-7-2e/configure' -make -C vxStatsApp install -make[2]: Entering directory `/home/mooney/epics/tmp/synApps_5_2/support/vxStats/1-7-2e/vxStatsApp' -make -C src install -make[3]: Entering directory `/home/mooney/epics/tmp/synApps_5_2/support/vxStats/1-7-2e/vxStatsApp/src' -perl /home/mooney/epics/base-3.14.8.2/configure/tools/makeMakefile.pl O.cygwin-x86 ../../.. -mkdir O.Common -make -C O.cygwin-x86 -f ../Makefile TOP=../../.. T_A=cygwin-x86 install -make[4]: Entering directory `/home/mooney/epics/tmp/synApps_5_2/support/vxStats/1-7-2e/vxStatsApp/src/O.cygwin-x86' -make[4]: Leaving directory `/home/mooney/epics/tmp/synApps_5_2/support/vxStats/1-7-2e/vxStatsApp/src/O.cygwin-x86' -make[4]: Entering directory `/home/mooney/epics/tmp/synApps_5_2/support/vxStats/1-7-2e/vxStatsApp/src/O.cygwin-x86' -Expanding dbd -/home/mooney/epics/base-3.14.8.2/bin/cygwin-x86/dbExpand.exe -I . -I .. -I ../../../dbd -I /home/mooney/epics/base-3.14.8.2/dbd -o ../O.Common/vxStats.dbd ../vxStatsInclude.dbd -Installing dbd file ../../../dbd/vxStats.dbd -mkdir ../../../dbd -gcc -c -D_POSIX_THREADS -D_POSIX_TIMERS -D_X86_ -DUNIX -DCYGWIN32 -U_WIN32 -pedantic -O3 -Wall -I. -I.. -I../../../include/os/cygwin32 -I../../../include -I/home/mooney/epics/base-3.14.8.2/include/os/cygwin32 -I/home/mooney/epics/base-3.14.8.2/include -I/home/mooney/epics/base-3.14.8.2/src/rsrv -I/home/mooney/epics/base-3.14.8.2/src/ca ../ioc_stats.c -gcc -c -D_POSIX_THREADS -D_POSIX_TIMERS -D_X86_ -DUNIX -DCYGWIN32 -U_WIN32 -pedantic -O3 -Wall -I. -I.. -I../../../include/os/cygwin32 -I../../../include -I/home/mooney/epics/base-3.14.8.2/include/os/cygwin32 -I/home/mooney/epics/base-3.14.8.2/include -I/home/mooney/epics/base-3.14.8.2/src/rsrv -I/home/mooney/epics/base-3.14.8.2/src/ca ../BSlib.c -../../../lib/cygwin-x86: No such file or directory at /home/mooney/epics/base-3.14.8.2/configure/tools/fullPathName.pl line 14 -g++ -o ioc_stats.exe -L../../../lib/cygwin-x86 -Wl,-rpath,/home/mooney/epics/base-3.14.8.2/lib/cygwin-x86 ioc_stats.o BSlib.o -lpthread -lm -lgcc -gcc -c -D_POSIX_THREADS -D_POSIX_TIMERS -D_X86_ -DUNIX -DCYGWIN32 -U_WIN32 -pedantic -O3 -Wall -I. -I.. -I../../../include/os/cygwin32 -I../../../include -I/home/mooney/epics/base-3.14.8.2/include/os/cygwin32 -I/home/mooney/epics/base-3.14.8.2/include -I/home/mooney/epics/base-3.14.8.2/src/rsrv -I/home/mooney/epics/base-3.14.8.2/src/ca ../rdbls.c -../../../lib/cygwin-x86: No such file or directory at /home/mooney/epics/base-3.14.8.2/configure/tools/fullPathName.pl line 14 -g++ -o rdbls.exe -L../../../lib/cygwin-x86 -Wl,-rpath,/home/mooney/epics/base-3.14.8.2/lib/cygwin-x86 rdbls.o BSlib.o -lpthread -lm -lgcc -gcc -c -D_POSIX_THREADS -D_POSIX_TIMERS -D_X86_ -DUNIX -DCYGWIN32 -U_WIN32 -pedantic -O3 -Wall -I. -I.. -I../../../include/os/cygwin32 -I../../../include -I/home/mooney/epics/base-3.14.8.2/include/os/cygwin32 -I/home/mooney/epics/base-3.14.8.2/include -I/home/mooney/epics/base-3.14.8.2/src/rsrv -I/home/mooney/epics/base-3.14.8.2/src/ca ../rdbapplist.c -../../../lib/cygwin-x86: No such file or directory at /home/mooney/epics/base-3.14.8.2/configure/tools/fullPathName.pl line 14 -g++ -o rdbapplist.exe -L../../../lib/cygwin-x86 -Wl,-rpath,/home/mooney/epics/base-3.14.8.2/lib/cygwin-x86 rdbapplist.o BSlib.o -lpthread -lm -lgcc -Installing binary ../../../bin/cygwin-x86/ioc_stats.exe -mkdir ../../../bin -mkdir ../../../bin/cygwin-x86 -Installing binary ../../../bin/cygwin-x86/rdbls.exe -Installing binary ../../../bin/cygwin-x86/rdbapplist.exe -make[4]: Leaving directory `/home/mooney/epics/tmp/synApps_5_2/support/vxStats/1-7-2e/vxStatsApp/src/O.cygwin-x86' -make[3]: Leaving directory `/home/mooney/epics/tmp/synApps_5_2/support/vxStats/1-7-2e/vxStatsApp/src' -make -C srcOpi install -make[3]: Entering directory `/home/mooney/epics/tmp/synApps_5_2/support/vxStats/1-7-2e/vxStatsApp/srcOpi' -make[3]: Nothing to be done for `install'. -make[3]: Leaving directory `/home/mooney/epics/tmp/synApps_5_2/support/vxStats/1-7-2e/vxStatsApp/srcOpi' -make -C Db install -make[3]: Entering directory `/home/mooney/epics/tmp/synApps_5_2/support/vxStats/1-7-2e/vxStatsApp/Db' -perl /home/mooney/epics/base-3.14.8.2/configure/tools/makeMakefile.pl O.cygwin-x86 ../../.. -mkdir O.Common -make -C O.cygwin-x86 -f ../Makefile TOP=../../.. T_A=cygwin-x86 install -make[4]: Entering directory `/home/mooney/epics/tmp/synApps_5_2/support/vxStats/1-7-2e/vxStatsApp/Db/O.cygwin-x86' -Inflating database from ../vxStats-template.substitutions using local rule -msi -S../vxStats-template.substitutions > vxStats-template.db 0) { $release_files[$ritera] = $_; - $ritera++; - } + $ritera++; + } + $count = $count + 1; } diff --git a/3-0/config/setup_epics_cygwin32 b/3-0/config/setup_epics_cygwin32 deleted file mode 100644 index 1d46b30..0000000 --- a/3-0/config/setup_epics_cygwin32 +++ /dev/null @@ -1,3 +0,0 @@ -export PATH="/usr/bin/:/usr/local/bin:/usr/X11R6/bin/:/corvette/usr/local/epics/base/bin/cygwin-x86:/corvette/usr/local/epics/extensions_devel/bin/cygwin-x86" -export EPICS_HOST_ARCH=cygwin-x86 -export HOST_ARCH=cygwin-x86 diff --git a/3-0/config/setup_epics_win32 b/3-0/config/setup_epics_win32 deleted file mode 100755 index 14da531..0000000 --- a/3-0/config/setup_epics_win32 +++ /dev/null @@ -1,21 +0,0 @@ -export EPICS_HOST_ARCH=win32-x86 - -export VSINSTALLDIR="C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE" -export VSINSTALLDIR_sh="/cygdrive/c/Program Files/Microsoft Visual Studio .NET 2003/Common7/IDE" -export VCINSTALLDIR="C:\Program Files\Microsoft Visual Studio .NET 2003" -export VCINSTALLDIR_sh="/cygdrive/c/Program Files/Microsoft Visual Studio .NET 2003" -export FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework -export FrameworkDir_sh=/cygdrive/c/WINDOWS/Microsoft.NET/Framework -export FrameworkVersion=v1.1.4322 -export FrameworkSDKDir="c:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1" -export FrameworkSDKDir_sh="/cygdrive/c/Program Files/Microsoft Visual Studio .NET 2003/SDK/v1.1" - -export DevEnvDir=$VSINSTALLDIR -export DevEnvDir_sh=$VSINSTALLDIR_sh - -export MSVCDir=$VCINSTALLDIR/VC7 -export MSVCDir_sh=$VCINSTALLDIR_sh/VC7 - -export PATH="$DevEnvDir_sh:$MSVCDir_sh/BIN:$VCINSTALLDIR/Common7/Tools:$VCINSTALLDIR_sh/Common7/Tools/bin/prerelease:$VCINSTALLDIR_sh/Common7/Tools/bin:$FrameworkSDKDir_sh/bin:$FrameworkDir_sh/$FrameworkVersion:/usr/bin/:/usr/local/bin:/usr/X11R6/bin/:/corvette/usr/local/epics/base/bin/win32-x86:/corvette/usr/local/epics/extensions_devel/bin/win32-x86" -export INCLUDE="$MSVCDir/ATLMFC/INCLUDE;$MSVCDir/INCLUDE;$MSVCDir/PlatformSDK/include/prerelease;$MSVCDir/PlatformSDK/include;$FrameworkSDKDir/include" -export LIB="$MSVCDir/ATLMFC/LIB;$MSVCDir/LIB;$MSVCDir/PlatformSDK/lib/prerelease;$MSVCDir/PlatformSDK/lib;$FrameworkSDKDir/lib" diff --git a/3-0/configure/RELEASE b/3-0/configure/RELEASE index 81f899f..7eeb6eb 100644 --- a/3-0/configure/RELEASE +++ b/3-0/configure/RELEASE @@ -1,5 +1,5 @@ ## configure/RELEASE: Location of external products -include $(TOP)/config/MASTER_RELEASE +include $(TOP)/config/GALILRELEASE TEMPLATE_TOP=$(EPICS_BASE)/templates/makeBaseApp/top diff --git a/3-0/iocBoot/iocGalil/galilTestApp_settings.req b/3-0/iocBoot/iocGalil/galilTestApp_settings.req index ea38384..a0f0302 100644 --- a/3-0/iocBoot/iocGalil/galilTestApp_settings.req +++ b/3-0/iocBoot/iocGalil/galilTestApp_settings.req @@ -12,6 +12,17 @@ file "motor_settings.req" P=$(P), M=F file "motor_settings.req" P=$(P), M=G file "motor_settings.req" P=$(P), M=H +# Motor settings that motorRecord does not support +# Real motors only +file "galil_motor_extras.req" P=$(P), M=A +file "galil_motor_extras.req" P=$(P), M=B +file "galil_motor_extras.req" P=$(P), M=C +file "galil_motor_extras.req" P=$(P), M=D +file "galil_motor_extras.req" P=$(P), M=E +file "galil_motor_extras.req" P=$(P), M=F +file "galil_motor_extras.req" P=$(P), M=G +file "galil_motor_extras.req" P=$(P), M=H + # Coordinate system (cs) motors file "motor_settings.req" P=$(P), M=I file "motor_settings.req" P=$(P), M=J @@ -54,17 +65,6 @@ file "galil_kinematic_variable.req" P=$(P), R=X file "galil_kinematic_variable.req" P=$(P), R=Y file "galil_kinematic_variable.req" P=$(P), R=Z -# Motor settings that motorRecord does not support -# Real motors only -file "galil_motor_extras.req" P=$(P), M=A -file "galil_motor_extras.req" P=$(P), M=B -file "galil_motor_extras.req" P=$(P), M=C -file "galil_motor_extras.req" P=$(P), M=D -file "galil_motor_extras.req" P=$(P), M=E -file "galil_motor_extras.req" P=$(P), M=F -file "galil_motor_extras.req" P=$(P), M=G -file "galil_motor_extras.req" P=$(P), M=H - # First 16 Digital input bits file "galil_digital_in_bit.req" P=$(P), R=Galil0Bi0 file "galil_digital_in_bit.req" P=$(P), R=Galil0Bi1 diff --git a/3-0/start_motor_screen.sh b/3-0/start_motor_screen.sh index 4aefdf8..84f294f 100755 --- a/3-0/start_motor_screen.sh +++ b/3-0/start_motor_screen.sh @@ -1,9 +1,9 @@ #!/bin/bash #From config/MASTER_RELEASE extract paths to modules that provide medm screens -export motorpath=`grep "MOTOR" config/MASTER_RELEASE | cut -d'=' -f2` -export sscanpath=`grep "SSCAN" config/MASTER_RELEASE | cut -d'=' -f2` -export galilpath=`grep "GALIL" config/MASTER_RELEASE | cut -d'=' -f2` +export motorpath=`grep "MOTOR" config/GALILRELEASE | cut -d'=' -f2` +export sscanpath=`grep "SSCAN" config/GALILRELEASE | cut -d'=' -f2` +export galilpath=`grep "GALIL" config/GALILRELEASE | cut -d'=' -f2` #From module top, add offset path to medm screens export motorpath=$motorpath/motorApp/op/adl