From 10e2935483be878ebe64a6c465a6b9b94779a43f Mon Sep 17 00:00:00 2001 From: Anders Sandstrom Date: Tue, 16 Mar 2021 15:49:07 +0100 Subject: [PATCH] Use uchar for basic config sdo --- docs/readmeCanOpenSocket.md | 19 +++++++++++++++++++ iocsh/pmu905.script | 2 +- iocsh/pvs.log | 24 ++++++++++++------------ 3 files changed, 32 insertions(+), 13 deletions(-) diff --git a/docs/readmeCanOpenSocket.md b/docs/readmeCanOpenSocket.md index 138cc53..3a7d756 100644 --- a/docs/readmeCanOpenSocket.md +++ b/docs/readmeCanOpenSocket.md @@ -742,3 +742,22 @@ w 0x7E5 [0] w 0x080 [0] w 0x700 [1] 0x05 +# Basic configuration write (maybe should write a 4800 (=48%) to byte 3 and 4) + caput -a IOC_TEST:CAN03-SDO02-BasicConfig 7 0 0 0 0 0 0 + +# After basic configuration the r 280 will stop () this emans no basic configuration +r 0x583 [8] 0x11 0x00 0xC5 0x00 0x00 0x00 0x88 0x13 +r 0x703 [1] 0x05 +w 0x7E5 [0] +w 0x080 [0] +w 0x700 [1] 0x05 +w 0x7E5 [0] +w 0x080 [0] +w 0x700 [1] 0x05 +r 0x703 [1] 0x05 +w 0x7E5 [0] +w 0x080 [0] +w 0x700 [1] 0x05 +w 0x7E5 [0] +w 0x080 [0] +w 0x700 [1] 0x05 diff --git a/iocsh/pmu905.script b/iocsh/pmu905.script index 7db36a4..368772c 100644 --- a/iocsh/pmu905.script +++ b/iocsh/pmu905.script @@ -84,7 +84,7 @@ dbLoadRecords(pmu905AnalogValues.template, "P=${ECMC_PREFIX},CH_ID=03") ecmcCANOpenAddSDO("basicConfig",3,0x583,0x603,1,0x2690,0x1,7,0) # WRITE -dbLoadRecords(ecmcPluginSocketCAN_SDO_output.template, "P=${ECMC_PREFIX},PORT=${ECMC_ASYN_PORT},ADDR=0,TIMEOUT=1,T_SMP_MS=${ECMC_SAMPLE_RATE_MS},TSE=${ECMC_TSE},NELM=${NELM=1},CH_ID=03,DEV_ID=3,suffix=SDO02-BasicConfig,source=basicConfig,DTYP=asynInt8ArrayOut,FTVL=CHAR,NELM=7") +dbLoadRecords(ecmcPluginSocketCAN_SDO_output.template, "P=${ECMC_PREFIX},PORT=${ECMC_ASYN_PORT},ADDR=0,TIMEOUT=1,T_SMP_MS=${ECMC_SAMPLE_RATE_MS},TSE=${ECMC_TSE},NELM=${NELM=1},CH_ID=03,DEV_ID=3,suffix=SDO02-BasicConfig,source=basicConfig,DTYP=asynInt8ArrayOut,FTVL=UCHAR,NELM=7") ############################################################################## ############# Go to realtime: diff --git a/iocsh/pvs.log b/iocsh/pvs.log index d8cdc09..6b9a741 100644 --- a/iocsh/pvs.log +++ b/iocsh/pvs.log @@ -1,7 +1,7 @@ IOC_TEST:CAN03-V_TEMP_ IOC_TEST:CAN03-AIR_INLET_ IOC_TEST:CAN03-AIR_OUTLET_ -REQMOD:raspberrypi-14969:exit +REQMOD:raspberrypi-16923:exit IOC_TEST:PLC-0-scantime IOC_TEST:PLC-0-error IOC_TEST:CAN03-PWR_A @@ -26,18 +26,18 @@ IOC_TEST:CAN03-V_5V_ACB IOC_TEST:CAN03-V_3V5 IOC_TEST:CAN03-AIR_INLET IOC_TEST:CAN03-AIR_OUTLET -REQMOD:raspberrypi-14969:BaseVersion -REQMOD:raspberrypi-14969:require_VER -REQMOD:raspberrypi-14969:ecmccfg_VER -REQMOD:raspberrypi-14969:asyn_VER -REQMOD:raspberrypi-14969:exprtk_VER -REQMOD:raspberrypi-14969:motor_VER -REQMOD:raspberrypi-14969:ecmc_VER -REQMOD:raspberrypi-14969:ecmc_plugin_socketcan_VER +REQMOD:raspberrypi-16923:BaseVersion +REQMOD:raspberrypi-16923:require_VER +REQMOD:raspberrypi-16923:ecmccfg_VER +REQMOD:raspberrypi-16923:asyn_VER +REQMOD:raspberrypi-16923:exprtk_VER +REQMOD:raspberrypi-16923:motor_VER +REQMOD:raspberrypi-16923:ecmc_VER +REQMOD:raspberrypi-16923:ecmc_plugin_socketcan_VER IOC_TEST:PLC-0-enable -REQMOD:raspberrypi-14969:MODULES -REQMOD:raspberrypi-14969:VERSIONS -REQMOD:raspberrypi-14969:MOD_VER +REQMOD:raspberrypi-16923:MODULES +REQMOD:raspberrypi-16923:VERSIONS +REQMOD:raspberrypi-16923:MOD_VER IOC_TEST:CAN03-PDO01-Array IOC_TEST:CAN03-SDO01-Array IOC_TEST:CAN03-SDO02-BasicConfig