opal AT lists.psi.ch
Subject: The OPAL Discussion Forum
List archive
- From: Christof Metzger-Kraus <christof.j.kraus AT gmail.com>
- To: Simon Friederich <s.friederich AT uni-mainz.de>
- Cc: opal <opal AT lists.psi.ch>
- Subject: Re: [Opal] String variable for aperture
- Date: Wed, 1 Apr 2020 15:26:47 +0200
- Authentication-results: localhost; iprev=pass (mail-il1-f179.google.com) smtp.remote-ip=209.85.166.179; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com
Dear all,
As we have changing apertures throughout our beamline I'd really like to use string variables but I don't get the correct syntax. I want something like:
STRING apert1 = "circle(0.015)"
STRING apert2 = "circle(0.030)"drift1: DRIFT, ELEMEDGE=0.5, APERTURE=apert1, L=0.5;
drift2: DRIFT, ELEMEDGE=1, APERTURE=apert2, L=0.5;But the error appears
Error> *** User error detected by function "OpalElement::getApert()"
Error> Unknown aperture type 'APERT1'.
Error> Unknown aperture type 'APERT1'.
Do I miss something?
Best regards
SimonP.S.: I know this workaround does it
REAL napert1 = 0.015;
REAL napert2 = 0.030;drift1: DRIFT, ELEMEDGE=0.5, APERTURE="circle(" & STRING(napert1) & ")", L=0.5;
drift1: DRIFT, ELEMEDGE=1, APERTURE="circle(" & STRING(napert2) & ")", L=0.5;But maybe there is a better way to do it.
-- ------------------------------------ Dr. Simon Friederich Helmholtz-Institut Mainz Kollaboration B / ACID Johannes Gutenberg-Universität Mainz Staudingerweg 18 55128 Mainz, Deutschland Tel.: +49 (0)6131 39-23160 E-Mail: s.friederich AT uni-mainz.de ------------------------------------
- [Opal] String variable for aperture, Simon Friederich, 04/01/2020
- Re: [Opal] String variable for aperture, Christof Metzger-Kraus, 04/01/2020
- Re: [Opal] String variable for aperture, Snuverink Jochem (PSI), 04/01/2020
Archive powered by MHonArc 2.6.19.