From 5aea41cb41f6681bdebc93663c97c6b29e8f35b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Sandstr=C3=B6m?= Date: Thu, 7 Mar 2024 08:08:06 +0100 Subject: [PATCH 1/2] Add records for stooping and disabling motor --- db/core/ecmcMotorRecord.template | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/db/core/ecmcMotorRecord.template b/db/core/ecmcMotorRecord.template index e66d38ecc..d5aaa8ef9 100644 --- a/db/core/ecmcMotorRecord.template +++ b/db/core/ecmcMotorRecord.template @@ -325,3 +325,33 @@ record(ai,"$(PREFIX)$(MOTOR_NAME)-HomPos-RB") { record (asyn, "$(PREFIX)$(MOTOR_NAME)-$(MOTOR_PORT)-asyn") { } + +record(bi,"$(PREFIX)$(MOTOR_NAME)-TrgStpInp"){ + #field(PINI, "1") + field(SCAN, "I/O Intr") + field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))TRIGG_STOPP") + field(DTYP, "asynInt32") + field(FLNK, "$(PREFIX)$(MOTOR_NAME)-TrgStp") +} + +record(bo,"$(PREFIX)$(MOTOR_NAME)-TrgStp"){ + #field(PINI, "1") + field(SCAN, "Passive") + field(OUT, "$(PREFIX)$(MOTOR_NAME).STOP") + field(VAL, "1") +} + +record(bi,"$(PREFIX)$(MOTOR_NAME)-TrgDisableInp"){ + #field(PINI, "1") + field(SCAN, "I/O Intr") + field(DTYP, "asynInt32") + field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))TRIGG_DISABLE") + field(FLNK, "$(PREFIX)$(MOTOR_NAME)-TrgDisable") +} + +record(bo,"$(PREFIX)$(MOTOR_NAME)-TrgDisable"){ + #field(PINI, "1") + field(SCAN, "Passive") + field(OUT, "$(PREFIX)$(MOTOR_NAME).CNEN") + field(VAL, "0") +} From b10234939c54269c237e03f8ce4e6603bec0733d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Sandstr=C3=B6m?= Date: Thu, 7 Mar 2024 14:16:30 +0100 Subject: [PATCH 2/2] Stop motorrecord on interlock --- db/core/ecmcMotorRecord.template | 36 +++++++++++++------------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/db/core/ecmcMotorRecord.template b/db/core/ecmcMotorRecord.template index d5aaa8ef9..12a46f5e3 100644 --- a/db/core/ecmcMotorRecord.template +++ b/db/core/ecmcMotorRecord.template @@ -326,32 +326,26 @@ record (asyn, "$(PREFIX)$(MOTOR_NAME)-$(MOTOR_PORT)-asyn") { } -record(bi,"$(PREFIX)$(MOTOR_NAME)-TrgStpInp"){ - #field(PINI, "1") - field(SCAN, "I/O Intr") - field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))TRIGG_STOPP") - field(DTYP, "asynInt32") - field(FLNK, "$(PREFIX)$(MOTOR_NAME)-TrgStp") -} - -record(bo,"$(PREFIX)$(MOTOR_NAME)-TrgStp"){ +#- If axis is in interlock then set motor STOP +record(bo,"$(PREFIX)$(MOTOR_NAME)-TrgStpFwd"){ #field(PINI, "1") field(SCAN, "Passive") - field(OUT, "$(PREFIX)$(MOTOR_NAME).STOP") - field(VAL, "1") -} + field(OUT, "$(PREFIX)$(MOTOR_NAME).STOP PP") + field(DOL, "$(PREFIX)$(MOTOR_NAME)-SumIlockFwd CP") + field(ZSV, "OK") + field(OSV, "STOP") + field(VAL, "1") + field(OMSL, "closed_loop") -record(bi,"$(PREFIX)$(MOTOR_NAME)-TrgDisableInp"){ - #field(PINI, "1") - field(SCAN, "I/O Intr") - field(DTYP, "asynInt32") - field(INP, "@asyn($(MOTOR_PORT),$(AXIS_NO))TRIGG_DISABLE") - field(FLNK, "$(PREFIX)$(MOTOR_NAME)-TrgDisable") } -record(bo,"$(PREFIX)$(MOTOR_NAME)-TrgDisable"){ +record(bo,"$(PREFIX)$(MOTOR_NAME)-TrgStpBwd"){ #field(PINI, "1") field(SCAN, "Passive") - field(OUT, "$(PREFIX)$(MOTOR_NAME).CNEN") - field(VAL, "0") + field(OUT, "$(PREFIX)$(MOTOR_NAME).STOP PP") + field(DOL, "$(PREFIX)$(MOTOR_NAME)-SumIlockBwd CP") + field(ZSV, "OK") + field(OSV, "STOP") + field(VAL, "1") + field(OMSL, "closed_loop") }