1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 <2025> | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 <2025> |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: EPICS VAL/DVAL garbage value |
From: | 백호령 via Tech-talk <tech-talk at aps.anl.gov> |
To: | tech-talk at aps.anl.gov |
Date: | Thu, 24 Apr 2025 14:19:27 +0900 |
And this is my github!
https://github.com/whitetiger112233/tech
Hello, we are currently working on developing a new controller.We are developing a controller with an integrated controller+driver for simple motor control.Raspberry Pi, Panasonic PLC, and Autonics' MD5-HD14 drives were connected, and EPICS 3.15.6 and Synaps were installed to create a motor control module.One problem is that we have to set offset values because DVAL, VAL values are executed with strange non-zero values.ex)Name: IOC:m1.RMPState: Connected RunningValue: VInt[-939441500, 202Name: IOC:m1.REPState: Connected RunningValue: VInt[424962560, 2025/04/24 13:51:26.222]The motor runs well, but I'd like to ask for advice because it's inconvenient to use it this way.I'm attaching the results of the st.cmd file execution as well. (I don't think there's anything wrong with executing it.)====================================./st.cmd#!../../bin/linux-arm/Techcd "/usr/local/epics/iocs/Tech/iocBoot/iocTech"< envPathsepicsEnvSet("IOC","iocTech")epicsEnvSet("TOP","/usr/local/epics/iocs/Tech")epicsEnvSet("MODULES","/usr/local/epics/modules")epicsEnvSet("MOTOR","/usr/local/epics/modules/motor")epicsEnvSet("ASYN","/usr/local/epics/modules/asyn")epicsEnvSet("CALC","/usr/local/epics/modules/calc")epicsEnvSet("AUTOSAVE","/usr/local/epics/modules/autosave")epicsEnvSet("SNCSEQ","/usr/local/epics/modules/seq")epicsEnvSet("SSCAN","/usr/local/epics/modules/sscan")epicsEnvSet("IPAC","/usr/local/epics/modules/ipac")epicsEnvSet("BUSY","/usr/local/epics/modules/busy")epicsEnvSet("EPICS_BASE","/usr/local/epics/base")< pvSettingsepicsEnvSet("P","IOC:")epicsEnvSet("M1","m1")epicsEnvSet("M2","m2")epicsEnvSet("M3","m3")epicsEnvSet("M4","m4")epicsEnvSet("M5","m5")epicsEnvSet("M6","m6")epicsEnvSet("M7","m7")epicsEnvSet("M8","m8")cd "/usr/local/epics/iocs/Tech"## Register all support componentsdbLoadDatabase("dbd/Tech.dbd")Tech_registerRecordDeviceDriver(pdbbase)## Serial ConfigurationdrvAsynSerialPortConfigure("SERIALPORT","/dev/ttyAMA0",0,0,0)asynSetOption("SERIALPORT",-1,"baud","19200")asynSetOption("SERIALPORT",-1,"bits","8")asynSetOption("SERIALPORT",-1,"parity","odd")asynSetOption("SERIALPORT",-1,"stop","1")asynSetOption("SERIALPORT",-1,"clocal","Y")asynSetOption("SERIALPORT",-1,"crtscts","N")asynOctetSetInputEos("SERIALPORT",0,"\r")asynOctetSetOutputEos("SERIALPORT",0,"\r")#asynSetTraceIOMask("SERIALPORT", 0, 2)#asynSetTraceMask("SERIALPORT", 0, 255)TechSetup(1,8,10)TechConfig(0,"SERIALPORT")## Load record instancesdbLoadRecords "db/motor_record.db","P=IOC:,M=m1,S=0"dbLoadRecords "db/motor_record.db","P=IOC:,M=m2,S=1"dbLoadRecords "db/motor_record.db","P=IOC:,M=m3,S=2"dbLoadRecords "db/motor_record.db","P=IOC:,M=m4,S=3"dbLoadRecords "db/motor_record.db","P=IOC:,M=m5,S=4"dbLoadRecords "db/motor_record.db","P=IOC:,M=m6,S=5"dbLoadRecords "db/motor_record.db","P=IOC:,M=m7,S=6"dbLoadRecords "db/motor_record.db","P=IOC:,M=m8,S=7"#dbLoadRecords "db/motorUtil.db","P=$(P)"# =====================================================================## Begin: Setup autosave/restore# =====================================================================# ============================================================# If all PVs don't connect continue anyway# ============================================================save_restoreSet_IncompleteSetsOk(1)# ============================================================# created save/restore backup files with date string# useful for recovery.# ============================================================save_restoreSet_DatedBackupFiles(0)# ============================================================# Where to find the list of PVs to save# ============================================================set_requestfile_path("./")# ============================================================# Where to write the save files that will be used to restore# ============================================================set_savefile_path("./", "autosave")# ============================================================# Prefix that is use to update save/restore status database# records# ============================================================#save_restoreSet_status_prefix("$(LOCA):$(DEV):")#save_restoreSet_status_prefix("$(P)")## Restore datasetsset_pass0_restoreFile("auto_settings.sav")set_pass1_restoreFile("auto_settings.sav")# =====================================================================# End: Setup autosave/restore# =====================================================================## Set this to see messages from mySub#var mySubDebug 1## Run this to trace the stages of iocInit#traceIocInitcd "/usr/local/epics/iocs/Tech/iocBoot/iocTech"iocInitStarting iocInit############################################################################## EPICS R3.15.6## EPICS Base built Dec 3 2018############################################################################reboot_restore: entry for file 'auto_settings.sav'reboot_restore: Found filename 'auto_settings.sav' in restoreFileList.*** restoring from './autosave/auto_settings.sav' at initHookState 6 (before record/device init) ***reboot_restore: done with file 'auto_settings.sav'reboot_restore: entry for file 'auto_settings.sav'reboot_restore: Found filename 'auto_settings.sav' in restoreFileList.*** restoring from './autosave/auto_settings.sav' at initHookState 7 (after record/device init) ***reboot_restore: done with file 'auto_settings.sav'iocRun: All initialization complete#motorUtilInit("$(P)")create_monitor_set("auto_settings.req", 30, "P=IOC:,M1=m1,M2=m2,M3=m3,M4=m4,M5=m5,M6=m6,M7=m7,M8=m8")## Start any sequence programs#seq sncTech,"user=root"epics> auto_settings.sav: 304 of 304 PV's connectedepics>epics> dblIOC:m1_ableIOC:m2_ableIOC:m3_ableIOC:m4_ableIOC:m5_ableIOC:m6_ableIOC:m7_ableIOC:m8_ableIOC:m1_ableputIOC:m2_ableputIOC:m3_ableputIOC:m4_ableputIOC:m5_ableputIOC:m6_ableputIOC:m7_ableputIOC:m8_ableputIOC:m1IOC:m2IOC:m3IOC:m4IOC:m5IOC:m6IOC:m7IOC:m8IOC:m1_vChIOC:m1_twChIOC:m2_vChIOC:m2_twChIOC:m3_vChIOC:m3_twChIOC:m4_vChIOC:m4_twChIOC:m5_vChIOC:m5_twChIOC:m6_vChIOC:m6_twChIOC:m7_vChIOC:m7_twChIOC:m8_vChIOC:m8_twCh======================================Can you guys give me some advice please?Always Appreciate your helps and advices.Best and Regards.Baeg