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: AW: Correct Settings for PIE816 Controller |
From: | Torsten Bögershausen via Tech-talk <[email protected]> |
To: | "Sintschuk, Michael" <[email protected]>, "[email protected]" <[email protected]> |
Date: | Wed, 18 Sep 2019 18:19:17 +0200 |
Hej all, The warning(s) are actually fixed here: <https://github.com/epics-modules/motor/pull/128/commits/13a8649abbb80c884d55169aa99647c76bb4b04d> So I hope that someone finds time to merge/apply those fixes into the code base. On 18/09/19 16:44, Sintschuk, Michael wrote:
Thanks Torsten, this helped with the ATHM field which is 0 now. So the MSTA bits are now 2338 that corresponds to this status. After commenting out the line "status.Bits.RA_HOME = status.Bits.RA_DONE;" in "drvPIE816.cc" i recompiled the motor-module and encountered this problem: make[3]: Entering directory '/soft/epics/modules/motor-R6-10-1/motorApp/PiSrc/O.linux-x86_64' /usr/bin/g++ -D_GNU_SOURCE -D_DEFAULT_SOURCE -D_X86_64_ -DUNIX -Dlinux -O3 -g -Wall -mtune=generic -m64 -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../include/compiler/gcc -I../../../include/os/Linux -I../../../include -I/usr/local/epics/base/../modules/asyn/include -I/usr/local/epics/base/include/compiler/gcc -I/usr/local/epics/base/include/os/Linux -I/usr/local/epics/base/include -MM -MF drvPIE816.d ../drvPIE816.cc /usr/bin/g++ -D_GNU_SOURCE -D_DEFAULT_SOURCE -D_X86_64_ -DUNIX -Dlinux -O3 -g -Wall -mtune=generic -m64 -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../include/compiler/gcc -I../../../include/os/Linux -I../../../include -I/usr/local/epics/base/../modules/asyn/include -I/usr/local/epics/base/include/compiler/gcc -I/usr/local/epics/base/include/os/Linux -I/usr/local/epics/base/include -c ../drvPIE816.cc ../drvPIE816.cc:94:39: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings] "K","L"}; ^ ../drvPIE816.cc:94:39: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings] ../drvPIE816.cc:94:39: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings] ../drvPIE816.cc:94:39: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings] ../drvPIE816.cc:94:39: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings] ../drvPIE816.cc:94:39: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings] ../drvPIE816.cc:94:39: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings] ../drvPIE816.cc:94:39: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings] ../drvPIE816.cc:94:39: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings] ../drvPIE816.cc:94:39: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings] ../drvPIE816.cc:94:39: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings] ../drvPIE816.cc:94:39: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings] ../drvPIE816.cc: In function ‘int set_status(int, int)’: ../drvPIE816.cc:233:25: warning: variable ‘mr’ set but not used [-Wunused-but-set-variable] struct motorRecord *mr; ^~ ../drvPIE816.cc:237:66: warning: unused variable ‘online_status’ [-Wunused-variable] unsigned int overflow_status, ontarget_status, servo_status, online_status; ^~~~~~~~~~~~~ ../drvPIE816.cc: In function ‘int motor_init()’: ../drvPIE816.cc:584:10: warning: unused variable ‘retry’ [-Wunused-variable] int retry = 0; ^~~~~ /usr/bin/ar -rc libPI.a devPIC844.o drvPIC844.o PiRegister.o devPIC630.o drvPIC630.o PIC630Register.o devPIC848.o drvPIC848.o PIC848Register.o devPIC662.o drvPIC662.o PIC662Register.o devPIC862.o drvPIC862.o PIC862Register.o devPIC663.o drvPIC663.o PIC663Register.o devPIE710.o drvPIE710.o PIE710Register.o devPIE516.o drvPIE516.o PIE516Register.o devPIE517.o drvPIE517.o PIE517Register.o devPIE816.o drvPIE816.o PIE816Register.o /usr/bin/ranlib libPI.a /usr/bin/g++ -o libPI.so -shared -fPIC -Wl,-hlibPI.so -L/soft/epics/modules/motor-R6-10-1/lib/linux-x86_64 -L/soft/epics/modules/asyn4-32/lib/linux-x86_64 -L/soft/epics/base-3.15.5/lib/linux-x86_64 -Wl,-rpath,/soft/epics/modules/motor-R6-10-1/lib/linux-x86_64 -Wl,-rpath,/soft/epics/modules/asyn4-32/lib/linux-x86_64 -Wl,-rpath,/soft/epics/base-3.15.5/lib/linux-x86_64 -rdynamic -m64 devPIC844.o drvPIC844.o PiRegister.o devPIC630.o drvPIC630.o PIC630Register.o devPIC848.o drvPIC848.o PIC848Register.o devPIC662.o drvPIC662.o PIC662Register.o devPIC862.o drvPIC862.o PIC862Register.o devPIC663.o drvPIC663.o PIC663Register.o devPIE710.o drvPIE710.o PIE710Register.o devPIE516.o drvPIE516.o PIE516Register.o devPIE517.o drvPIE517.o PIE517Register.o devPIE816.o drvPIE816.o PIE816Register.o -lmotor -lasyn -ldbRecStd -ldbCore -lca -lCom -lpthread -lreadline -lm -lrt -ldl -lgcc Installing shared library ../../../lib/linux-x86_64/libPI.so Installing library ../../../lib/linux-x86_64/libPI.a make[3]: Leaving directory '/soft/epics/modules/motor-R6-10-1/motorApp/PiSrc/O.linux-x86_64' I think this has nothing to do with removing of the upper line because it is located in line 313. My C / C++ knowledge is poor, so i don't know if my drvPIE816.cc is corrupted... I always compile the whole motor-package and this is the only file causing errors. Maybe its because of my Linux-System, some missing package? Can someone tell? ________________________________ Von: Torsten Bögershausen <[email protected]> Gesendet: Mittwoch, 18. September 2019 14:44:54 An: Sintschuk, Michael; [email protected] Betreff: Re: Correct Settings for PIE816 Controller I don't have this controller, but what happens if you remove this line in drvPIE816.cc status.Bits.RA_HOME = status.Bits.RA_DONE; On 18/09/19 11:21, Sintschuk, Michael via Tech-talk wrote:Hello, I'm using a one-axis piezo which is controller via the PIE816 Controller. I managed to set up an IOC which is communicating with the PIE816 and i also can drive the piezo axis. My problem is, that the motor is always in the "at HOME" status. The startup of my IOC is as follows: ~/expIOC/iocBoot/iocexpIOC> ./st.cmd #!../../bin/linux-x86_64/expIOC ## You may have to change expIOC to something else ## everywhere it appears in this file ##cd /home/ptb/expIOC/iocBoot/iocexpIOC/ < envPaths epicsEnvSet("IOC","iocexpIOC") epicsEnvSet("TOP","/home/ptb/expIOC") epicsEnvSet("MODULES","/soft/epics/modules/") epicsEnvSet("ASYN","/soft/epics/modules/asyn") epicsEnvSet("MOTOR","/soft/epics/modules/motor-R6-10-1") epicsEnvSet("PSEUDOMOTORS","/soft/epics/modules/pseudoMotors-1-1") epicsEnvSet("CALC","/soft/epics/modules/calc-R3-7") epicsEnvSet("EPICS_BASE","/usr/local/epics/base") cd /home/ptb/expIOC ## Register all support components dbLoadDatabase "dbd/expIOC.dbd" expIOC_registerRecordDeviceDriver pdbbase # over TCP/IP #drvAsynIPPortConfigure("PIE816", "193.149.13.40:10001",0,0,0) # over Serial drvAsynSerialPortConfigure("PIE816","/dev/ttyS0",0,0,0) asynSetOption("PIE816",-1,"baud","115200") asynSetOption("PIE816",-1,"bits","8") asynSetOption("PIE816",-1,"parity","none") asynSetOption("PIE816",-1,"stop","1") asynSetOption("PIE816",-1,"clocal","Y") asynSetOption("PIE816",-1,"crtscts","Y") #asynSetTraceIOMask("PIE816",0,2) #asynSetTraceMask("PIE816",0,255) #asynOctetSetInputEos("PIE816", 0, "\r\n") #asynOctetSetOutputEos("PIE816", 0, "\r") PIE816Setup(1, 60) PIE816Config(0, "PIE816", 1) ## Load record instances dbLoadRecords("db/expIOC.db", "PORT='PIE816'") #dbLoadRecords("db/beer.db") cd "/home/ptb/expIOC/iocBoot/iocexpIOC" iocInit Starting iocInit ############################################################################ ## EPICS R3.15.5 ## EPICS Base built Jul 2 2019 ############################################################################ iocRun: All initialization complete epics> the complete dadabase for my motor-record is: epics> dbtr PIE665:Piezo1 ACCL: 0.5 ACKS: NO_ALARM ACKT: YES ADEL: 0 ALST: 0 ASG: ATHM: 1 BACC: 0.2 BDST: 0 BKPT: 00 BVEL: 0.1 CARD: 0 CDIR: 0 CNEN: Enable DCOF: 0 DESC: motor 1 DHLM: 1000 DIFF: 0 DINP:CONSTANT DIR: Pos DISA: 0 DISP: 0 DISS: NO_ALARM DISV: 1 DLLM: 0 DLY: 0 DMOV: 1 DOL:CONSTANT DRBV: -0.00434 DTYP: PIE816 DVAL: -0.00434 EGU: um ERES: 1.0e-06 EVNT: FLNK:CONSTANT 0 FOF: 0 FOFF: Variable FRAC: 1 HHSV: NO_ALARM HIGH: 0 HIHI: 0 HLM: 1000 HLS: 0 HLSV: NO_ALARM HOMF: 0 HOMR: 0 HOPR: 0 HSV: NO_ALARM HVEL: 0.1 ICOF: 0 IGSET: 0 INIT: JAR: 4 JOGF: 0 JOGR: 0 JVEL: 2 LCNT: 0 LDVL: -0.00434 LLM: 0 LLS: 0 LLSV: NO_ALARM LOCK: NO LOLO: 0 LOPR: 0 LOW: 0 LRLV: 0 LRVL: -4340 LSPG: Go LSV: NO_ALARM LVAL: -0.00434 LVIO: 1 MDEL: 0 MIP: 0 MISS: 0 MLST: 0 MMAP: 0 MOVN: 0 MRES: 1.0e-06 MSTA: 2347 NAME: PIE665:Piezo1 NMAP: 0 NSEV: NO_ALARM NSTA: NO_ALARM NTM: NO NTMF: 2 OFF: 0 OMSL: supervisory OUT:VME_IO #C0 S0 @ PACT: 0 PCOF: 0 PHAS: 0 PINI: NO POST: PP: 0 PREC: 5 PREM: PRIO: LOW PROC: 0 PUTF: 0 RBV: -0.00434 RCNT: 0 RDBD: 1.0e-06 RDBL:CONSTANT RDIF: 0 REP: -4340 RHLS: 0 RINP:CONSTANT RLLS: 0 RLNK:CONSTANT RLV: 0 RMOD: Default RMP: -4340 RPRO: 0 RRBV: -4340 RRES: 0 RTRY: 10 RVAL: -4340 RVEL: 0 S: 10000 SBAK: 500 SBAS: 500 SCAN: Passive SDIS:CONSTANT SET: Use SEVR: NO_ALARM SMAX: 0 SPMG: Go SREV: 200 SSET: 0 STAT: NO_ALARM STOO:CONSTANT STOP: 0 STUP: BUSY SUSE: 0 SYNC: 0 TDIR: 1 TIME: 2019-09-18 11:11:49.238256323 TPRO: 0 TSE: 0 TSEL:CONSTANT TWF: 0 TWR: 0 TWV: 1 UDF: 0 UDFS: INVALID UEIP: No UREV: 2.0e-04 URIP: No VAL: -0.00434 VBAS: 0.1 VELO: 2 VERS: 6.1 VMAX: 0 VOF: 0 epics> With this settings i can move the motor but for example you see that the ATHM field is 1, so at home. And the MSTA bits tell me that the home-limit-switch is hit and that the motor is not homed. How is a movement in both directions possible if the Status is "at home"? Is there a way to home the motor properly via EPICS? I tried to set the HOMF / HOMR fields but nothing happens, they go back to 0 and the motor isn't moving. My substitution file looks like this: file "$(MOTOR)/db/basic_motor.db" { pattern {P, N, M, DTYP, C, S, DESC, EGU, DIR, VELO, VBAS, ACCL, BDST, BVEL, BACC, MRES, RDBD, PREC, DHLM, DLLM, INIT} {PIE665:, 1, "Piezo$(N)", "PIE816", 0, 0, "motor $(N)", um, 0, 2., 0.1, .5, 0, 0.1, .2, 1e-6, 0.001, 5, 1000, 0, ""} } Maybe i took the wrong one, can someone help? Thanks in advance! Best Regards Michael