From 46045e15cce94fc05b93b41138b6404787427d91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Sandstr=C3=B6m?= Date: Fri, 27 Sep 2024 16:08:41 +0200 Subject: [PATCH] Add DS desc --- db/core/ecmcDS-idx.template | 5 + db/core/ecmcDS.substitutions | 4 +- hugo/content/manual/knowledgebase/_index.md | 23 + qt/ecmcDSxx.ui | 732 ++++++++++---------- scripts/addDataStorage.cmd | 3 +- 5 files changed, 412 insertions(+), 355 deletions(-) diff --git a/db/core/ecmcDS-idx.template b/db/core/ecmcDS-idx.template index 13dd6907a..8288bb5b6 100644 --- a/db/core/ecmcDS-idx.template +++ b/db/core/ecmcDS-idx.template @@ -71,3 +71,8 @@ record(ai,"$(P)MCU-Cfg-DS${Index}-PrvObjId") { field(DESC, "DS number of next DS") field(VAL, "$(PREV_OBJ_ID=-1)") } + +record(stringin,"$(Name)$(DESC_NAME)") { + field(DESC, "DS Info") + field(VAL, "${DESC=PLC ${index}}") +} diff --git a/db/core/ecmcDS.substitutions b/db/core/ecmcDS.substitutions index 6f1fa5d5b..2d32c7e37 100644 --- a/db/core/ecmcDS.substitutions +++ b/db/core/ecmcDS.substitutions @@ -1,5 +1,5 @@ file ecmcDS-idx.template { - pattern { DS_DATAINDEX_ACT, DS_DATA_ACT , DS_STAT, DS_TYPE, DS_STAT_, DS_FULL, DS_CLEAR_CMD } - { DS$(Index2Char)-DataIdAct, DS$(Index2Char)-DataAct, DS$(Index2Char)-Stat, DS$(Index2Char)-Type, DS$(Index2Char)-Stat_, DS$(Index2Char)-Full, DS$(Index2Char)-ClrCmd } + pattern { DS_DATAINDEX_ACT, DS_DATA_ACT , DS_STAT, DS_TYPE, DS_STAT_, DS_FULL, DS_CLEAR_CMD, DESC_NAME } + { DS$(Index2Char)-DataIdAct, DS$(Index2Char)-DataAct, DS$(Index2Char)-Stat, DS$(Index2Char)-Type, DS$(Index2Char)-Stat_, DS$(Index2Char)-Full, DS$(Index2Char)-ClrCmd, DS$(Index2Char)-Desc } } diff --git a/hugo/content/manual/knowledgebase/_index.md b/hugo/content/manual/knowledgebase/_index.md index 24055ff83..2a5371c84 100644 --- a/hugo/content/manual/knowledgebase/_index.md +++ b/hugo/content/manual/knowledgebase/_index.md @@ -8,6 +8,29 @@ chapter = false {{% children %}} --- +## Overview panel +For an overview of an ecmc system, the ecmcMain.ui panel is a good starting point. +The ecmcMain.ui covers most parts of an ecmc system: +* ecmc_rt thread diagnostics: + - Jitter + - Cycle time +* EtherCAT: + - Status + - Lost frames + - Slave count + - master Id + - Links to dedicated sub panels for each slave type. +* Links to all configured objects: + - motion expert panels + - PLC objects + - plugin objects + - data storage objects + +The ecmcMain.ui is started with the following syntax: +``` +caqtdm -macro "IOC=" ecmcMain.ui +``` + ## Knowledge base Due to the complexity an EtherCAT bus topology can assume, troubleshooting can be challenging. This guide should provide the basic means to diagnose simple errors and is by no means complete! diff --git a/qt/ecmcDSxx.ui b/qt/ecmcDSxx.ui index e8f9d8c58..6a7575364 100644 --- a/qt/ecmcDSxx.ui +++ b/qt/ecmcDSxx.ui @@ -1,227 +1,362 @@ - MainWindow - + Dialog + 0 0 - 700 - 256 + 706 + 260 - MainWindow + Dialog - - - - - 535 - 145 - 51 - 46 - - - - SYS=$(SYS),IOC=$(IOC),ID_1=$(ID_1),ID_2=$(ID_2) - - - caFrame::Calc - - - A>-1 - - - $(IOC):MCU-Cfg-DS$(ID_1)-PrvObjId - - - - - 5 - 2 - 41 - 18 - - - - << - - - Open first axis - - - bash /ioc/modules/qt/ecmcOpenPrevDS.sh - - - $(SYS) $(ID_1) - - - - - - 5 - 25 - 41 - 16 - - - - - 16777215 - 18 - - - - $(IOC):MCU-Cfg-DS$(ID_1)-PrvObjId - - - - 192 - 192 - 192 - - - - caLineEdit::Static - - - caLineEdit::Channel - - - caLineEdit::User - - - true - - - - - - - 550 - 130 - 100 - 16 - - - - - 16777215 - 16 - - - - Next: - - - + + + + 10 + 40 + 681 + 131 + + + + $(IOC):DS$(ID_2)-DataAct + + + 1 + + + true + + + false + + + + + + 25 + 25 + 341 + 20 + + + + true + + + $(IOC):DS$(ID_2)-Desc + + + caLineEdit::WidthAndHeight + + + caLineEdit::string + + + + + + 25 + 3 + 181 + 21 + + + + DS $(ID_1) description: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + ESimpleLabel::Height + + + + + + -5 + 225 + 100 + 16 + + + + + 16777215 + 16 + + + + Full: + + + + + + 105 + 200 + 36 + 16 + + + + + 16777215 + 18 + + + + $(SYS):DS$(ID_2)-DataIdAct + + + + 192 + 192 + 192 + + + + caLineEdit::Static + + + caLineEdit::User + + + caLineEdit::User + + + true + + + + + + -5 + 200 + 100 + 16 + + + + + 16777215 + 16 + + + + Data ID: + + + + + + 105 + 180 + 36 + 16 + + + + + 16777215 + 18 + + + + $(SYS):DS$(ID_2)-Type + + + + 192 + 192 + 192 + + + + caLineEdit::Static + + + caLineEdit::User + + + caLineEdit::User + + + true + + + + + + 110 + 220 + 30 + 30 + + + + $(SYS):DS$(ID_2)-Full + + + + 0 + 0 + 255 + + + + + + + -5 + 180 + 100 + 16 + + + + + 16777215 + 16 + + + + Type: + + + + + + 530 + 185 + 31 + 16 + + + + + 16777215 + 18 + + + + $(ID_1) + + + + + + + 192 + 192 + 192 + + + + caLineEdit::Static + + + caLineEdit::Channel + + + caLineEdit::User + + + true + + + + + + 415 + 170 + 100 + 16 + + + + + 16777215 + 16 + + + + Prev: + + + + + + 495 + 170 + 100 + 16 + + + + + 16777215 + 16 + + + + Next: + + + + + + 555 + 185 + 56 + 46 + + + + SYS=$(SYS),IOC=$(IOC),ID_1=$(ID_1),ID_2=$(ID_2) + + + caFrame::Calc + + + A>-1 + + + $(IOC):MCU-Cfg-DS$(ID_1)-NxtObjId + + - 610 - 145 - 56 - 46 + 10 + 2 + 41 + 18 - - SYS=$(SYS),IOC=$(IOC),ID_1=$(ID_1),ID_2=$(ID_2) + + >> - - caFrame::Calc + + Open first axis - - A>-1 + + bash /ioc/modules/qt/ecmcOpenNextDS.sh - - $(IOC):MCU-Cfg-DS$(ID_1)-NxtObjId + + $(SYS) $(ID_1) - - - - 10 - 2 - 41 - 18 - - - - >> - - - Open first axis - - - bash /ioc/modules/qt/ecmcOpenNextDS.sh - - - $(SYS) $(ID_1) - - - - - - 10 - 25 - 41 - 16 - - - - - 16777215 - 18 - - - - $(IOC):MCU-Cfg-DS$(ID_1)-NxtObjId - - - - 192 - 192 - 192 - - - - caLineEdit::Static - - - caLineEdit::Channel - - - caLineEdit::User - - - true - - - + - 470 - 130 - 100 - 16 - - - - - 16777215 - 16 - - - - Prev: - - - - - - 585 - 145 - 31 + 10 + 25 + 41 16 @@ -231,11 +366,8 @@ 18 - - $(ID_1) - - + $(IOC):MCU-Cfg-DS$(ID_1)-NxtObjId @@ -257,89 +389,56 @@ true - - - - 10 - 140 - 100 - 16 - - - - - 16777215 - 16 - - - - Type: - - - + + + + + 480 + 185 + 51 + 46 + + + + SYS=$(SYS),IOC=$(IOC),ID_1=$(ID_1),ID_2=$(ID_2) + + + caFrame::Calc + + + A>-1 + + + $(IOC):MCU-Cfg-DS$(ID_1)-PrvObjId + + - 120 - 140 - 36 - 16 - - - - - 16777215 + 5 + 2 + 41 18 - - - - $(SYS):DS$(ID_2)-Type - - - - 192 - 192 - 192 - + - - caLineEdit::Static + + << - - caLineEdit::User + + Open first axis - - caLineEdit::User + + bash /ioc/modules/qt/ecmcOpenPrevDS.sh - - true + + $(SYS) $(ID_1) - + - 125 - 180 - 30 - 30 - - - - $(SYS):DS$(ID_2)-Full - - - - 0 - 0 - 255 - - - - - - - 120 - 160 - 36 + 5 + 25 + 41 16 @@ -350,7 +449,7 @@ - $(SYS):DS$(ID_2)-DataIdAct + $(IOC):MCU-Cfg-DS$(ID_1)-PrvObjId @@ -363,7 +462,7 @@ caLineEdit::Static - caLineEdit::User + caLineEdit::Channel caLineEdit::User @@ -372,78 +471,7 @@ true - - - - 10 - 160 - 100 - 16 - - - - - 16777215 - 16 - - - - Data ID: - - - - - - 10 - 185 - 100 - 16 - - - - - 16777215 - 16 - - - - Full: - - - - - - 40 - 0 - 671 - 131 - - - - $(IOC):DS$(ID_2)-DataAct - - - 1 - - - true - - - false - - - - - - - 0 - 0 - 700 - 25 - - - diff --git a/scripts/addDataStorage.cmd b/scripts/addDataStorage.cmd index 0db5e6f30..a0aa77153 100644 --- a/scripts/addDataStorage.cmd +++ b/scripts/addDataStorage.cmd @@ -12,6 +12,7 @@ #-d \param DS_TYPE (optional), default 0, 0: Normal Buffer, 1: Ring Buffer, 2: FIFO Buffer #-d \param SAMPLE_RATE_MS (optional), default 1 #-d \param DS_DEBUG (optional), default 0, 0: No debug printouts, 1: Debug printouts +#-d \param DESC (optional) Description of PLC #-d \note Example calls: #-d \note - call for 1000 elements at 10 Hz #-d \code @@ -42,7 +43,7 @@ ecmcConfigOrDie "Cfg.SetStorageEnablePrintouts(${ECMC_STORAGE_INDEX},${DS_DEBUG= ecmcFileExist(${SUBST_FILE="ecmcDS.substitutions"},1,1) ecmcEpicsEnvSetCalc(ECMC_DS_ID_2_CHARS, "${ECMC_STORAGE_INDEX}", "%02d") -dbLoadTemplate(${SUBST_FILE="ecmcDS.substitutions"}, "P=${ECMC_PREFIX}, PORT=${ECMC_ASYN_PORT}, ADDR=${ECMC_ASYN_ADDR}, TIMEOUT=${ECMC_ASYN_TIMEOUT},A=0,Index=${ECMC_STORAGE_INDEX},Index2Char=${ECMC_DS_ID_2_CHARS},NELM=${ECMC_STORAGE_SIZE},T_SMP_MS=${SAMPLE_RATE_MS=1},PREV_OBJ_ID=${ECMC_PREV_STORAGE_INDEX=-1}") +dbLoadTemplate(${SUBST_FILE="ecmcDS.substitutions"}, "P=${ECMC_PREFIX}, PORT=${ECMC_ASYN_PORT}, ADDR=${ECMC_ASYN_ADDR}, TIMEOUT=${ECMC_ASYN_TIMEOUT},A=0,Index=${ECMC_STORAGE_INDEX},Index2Char=${ECMC_DS_ID_2_CHARS},NELM=${ECMC_STORAGE_SIZE},T_SMP_MS=${SAMPLE_RATE_MS=1},PREV_OBJ_ID=${ECMC_PREV_STORAGE_INDEX=-1}, DESC='${DESC=PLC_${ECMC_PLC_ID}}'") epicsEnvUnset(ECMC_DS_ID_2_CHARS) #- Below for facilitate auto gui generation