From 62cfe81c2b1eff6e3a583f084f134fc71275aad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torsten=20B=C3=B6gershausen?= Date: Mon, 20 Nov 2023 09:02:32 +0100 Subject: [PATCH] Add files aroud EL6688-PTP-twincat-ads Add more files to run crate 035 with epipcs-twincat-ads. Either standalone or in parallel with ethercatmc. For this situation differen PV names are needed. Create st.mcu035-twincat-ads.iocsh and add the new PVs to the OPI. Changes to be committed: modified: ethercatmcExApp/op/Boy/IOC.opi new file: ethercatmcExApp/op/Boy/tools/IOC-MCU1035-twincat-ads.mid new file: iocsh/ethercatmcEL6688-PTP-twincat-ads.iocsh modified: test/startup/st.mcu035-PTP-B02.iocsh new file: test/startup/st.mcu035-twincat-ads.iocsh --- ethercatmcExApp/op/Boy/IOC.opi | 57 +++++++++++++++++++ .../op/Boy/tools/IOC-MCU1035-twincat-ads.mid | 57 +++++++++++++++++++ iocsh/ethercatmcEL6688-PTP-twincat-ads.iocsh | 2 + test/startup/st.mcu035-PTP-B02.iocsh | 22 +++---- test/startup/st.mcu035-twincat-ads.iocsh | 26 +++++++++ 5 files changed, 151 insertions(+), 13 deletions(-) create mode 100644 ethercatmcExApp/op/Boy/tools/IOC-MCU1035-twincat-ads.mid create mode 100644 iocsh/ethercatmcEL6688-PTP-twincat-ads.iocsh create mode 100644 test/startup/st.mcu035-twincat-ads.iocsh diff --git a/ethercatmcExApp/op/Boy/IOC.opi b/ethercatmcExApp/op/Boy/IOC.opi index dd98bb25..933e9615 100644 --- a/ethercatmcExApp/op/Boy/IOC.opi +++ b/ethercatmcExApp/op/Boy/IOC.opi @@ -842,6 +842,63 @@ $(pv_value) 0 432 + + + + motor-0-ptp.opi + + true + LabS-MCAG:MC-MCU-1035: +

LabS-MCAG:MC-MCU-1035:

+
+ 1 + +
+
+ false + false + + + + false + + + + 0 + 1 + true + + Default + + false + + + + 31 + + Action Button_7 + 0 + + + + + true + true + false + + + + MC-MCU-1035-twincat-ads + false + $(pv_name) +$(pv_value) + true + Action Button + 180 + 1d681a25:1522fd92503:-61af + 0 + 468 +
diff --git a/ethercatmcExApp/op/Boy/tools/IOC-MCU1035-twincat-ads.mid b/ethercatmcExApp/op/Boy/tools/IOC-MCU1035-twincat-ads.mid new file mode 100644 index 00000000..12ddd567 --- /dev/null +++ b/ethercatmcExApp/op/Boy/tools/IOC-MCU1035-twincat-ads.mid @@ -0,0 +1,57 @@ + + + + motor-0-ptp.opi + + true + LabS-MCAG:MC-MCU-1035: +

LabS-MCAG:MC-MCU-1035:

+
+ 1 + +
+
+ false + false + + + + false + + + + 0 + 1 + true + + Default + + false + + + + 31 + + Action Button_7 + 0 + + + + + true + true + false + + + + MC-MCU-1035-twincat-ads + false + $(pv_name) +$(pv_value) + true + Action Button + 180 + 1d681a25:1522fd92503:-61af + 0 + 0 +
diff --git a/iocsh/ethercatmcEL6688-PTP-twincat-ads.iocsh b/iocsh/ethercatmcEL6688-PTP-twincat-ads.iocsh new file mode 100644 index 00000000..44066796 --- /dev/null +++ b/iocsh/ethercatmcEL6688-PTP-twincat-ads.iocsh @@ -0,0 +1,2 @@ +dbLoadRecords("ethercatmcEL6688-PTP-twincat-ads.template", "PREFIX=$(PREFIX), MOTOR_PORT=$(MOTOR_PORT), ASYN_PORT=$(ASYN_PORT)") + diff --git a/test/startup/st.mcu035-PTP-B02.iocsh b/test/startup/st.mcu035-PTP-B02.iocsh index bad05062..788513fc 100644 --- a/test/startup/st.mcu035-PTP-B02.iocsh +++ b/test/startup/st.mcu035-PTP-B02.iocsh @@ -2,11 +2,12 @@ epicsEnvSet("MOTOR_PORT", "$(SM_MOTOR_PORT=MCU1)") epicsEnvSet("IPADDR", "$(SM_IPADDR=172.30.38.73)") epicsEnvSet("IPPORT", "$(SM_IPPORT=48898)") epicsEnvSet("AMSNETIDIOC", "$(SM_AMSNETID=172.30.38.12.1.1)") +epicsEnvSet("REMOTEAMSNETID", "5.36.136.2.1.1") epicsEnvSet("ASYN_PORT", "$(SM_ASYN_PORT=MC_CPU1)") epicsEnvSet("PREFIX", "$(SM_PREFIX=LabS-MCAG:MC-MCU-035:)") epicsEnvSet("PREC", "$(SM_PREC=3)") epicsEnvSet("SM_NOAXES", "1") -epicsEnvSet("ECM_OPTIONS", "adsPort=852;amsNetIdRemote=5.36.136.2.1.1;amsNetIdLocal=$(AMSNETIDIOC)" +epicsEnvSet("ECM_OPTIONS", "adsPort=852;amsNetIdRemote=$(REMOTEAMSNETID);amsNetIdLocal=$(AMSNETIDIOC)" # Do not start the poller yet @@ -14,26 +15,21 @@ epicsEnvSet("ECM_MOVINGPOLLPERIOD", "0") epicsEnvSet("ECM_IDLEPOLLPERIOD", "0") < ethercatmcController.iocsh -< ethercatmcEL6688-PTP.iocsh -< ethercatmcEL6688-EL1252-PTP.iocsh +#< ethercatmcEL6688-PTP.iocsh +< ethercatmcEL6688-PTP-twincat-ads.iocsh ##################################################### # EL1252, first channel, CHNO == 0 epicsEnvSet("CHNO", "0") -< ethercatmcEL1252-OneChannel.iocsh - -##################################################### -# PTP with ExtSync -< ethercatmcEL6688-PTP.iocsh - +#< ethercatmcEL1252-OneChannel.iocsh # # Start polling, values are in millisconds # -epicsEnvSet("MOVINGPOLLPERIOD", "500") -epicsEnvSet("IDLEPOLLPERIOD", "500") -ethercatmcStartPoller("$(MOTOR_PORT)", "$(MOVINGPOLLPERIOD)", "$(IDLEPOLLPERIOD)") +#epicsEnvSet("MOVINGPOLLPERIOD", "500") +#epicsEnvSet("IDLEPOLLPERIOD", "500") +#ethercatmcStartPoller("$(MOTOR_PORT)", "$(MOVINGPOLLPERIOD)", "$(IDLEPOLLPERIOD)") # Sleep to let the poller detect the AUX bit names -epicsThreadSleep 5 +#epicsThreadSleep 5 diff --git a/test/startup/st.mcu035-twincat-ads.iocsh b/test/startup/st.mcu035-twincat-ads.iocsh new file mode 100644 index 00000000..1e4b21fa --- /dev/null +++ b/test/startup/st.mcu035-twincat-ads.iocsh @@ -0,0 +1,26 @@ +epicsEnvSet("MOTOR_PORT", "$(SM_MOTOR_PORT=MCU1)") +epicsEnvSet("IPADDR", "$(SM_IPADDR=172.30.38.73)") +epicsEnvSet("IPPORT", "$(SM_IPPORT=48898)") +epicsEnvSet("AMSNETIDIOC", "$(SM_AMSNETID=172.30.38.12.1.1)") +epicsEnvSet("REMOTEAMSNETID", "5.36.136.2.1.1") +epicsEnvSet("ASYN_PORT", "$(SM_ASYN_PORT=MC_CPU1)") +epicsEnvSet("PREFIX", "$(SM_PREFIX=LabS-MCAG:MC-MCU-1035:)") +epicsEnvSet("P", "$(SM_PREFIX=LabS-MCAG:MC-MCU-1035:)") +epicsEnvSet("PREC", "$(SM_PREC=3)") +epicsEnvSet("SM_NOAXES", "1") +epicsEnvSet("ECM_OPTIONS", "adsPort=852;amsNetIdRemote=$(REMOTEAMSNETID);amsNetIdLocal=$(AMSNETIDIOC)" + +< ethercatmcController.iocsh + +< ethercatmcEL6688-PTP-twincat-ads.iocsh + + +##################################################### +# EL1252, first channel TS_NS +epicsEnvSet("R", "TS_NS") +epicsEnvSet("DESC", "1Hz-TimeStamp ns") +epicsEnvSet("EGU", "ns") +epicsEnvSet("ASYNADDR", "ADSPORT=852/GVL_APP.nTS_NS?") + +< ethercatmcInt64in.iocsh +