EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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  <20212022  2023  2024  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  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: SEQ Record Question
From: Ben Franksen via Tech-talk <tech-talk at aps.anl.gov>
To: Ralph Lange <ralph.lange at gmx.de>, EPICS Tech Talk <tech-talk at aps.anl.gov>
Date: Sat, 13 Mar 2021 11:18:44 +0100
Am 13.03.21 um 10:02 schrieb Ralph Lange via Tech-talk:
> On Sat, 13 Mar 2021 at 00:40, Manoussakis, Adamandios via Tech-talk <
> tech-talk at aps.anl.gov> wrote:
> 
>> It seems like strcmp works when it is placed in an if statement but not as
>> shown below inside the when()
>>
>>
>>
>> *when (strcmp(voltage, "STANDBY")==0) {*
>>
>>             /* turn light on */
>>
>>             light = 8;
>>
>>             pvPut(light);
>>
>>     } state light_on
>>
>> }
>>
> 
> The sequencer reference manual is quite precisely showing what allowed
> expressions are:
> https://www-csr.bessy.de/control/SoftDist/sequencer/Reference.html#expressions
> 
> Other than in C, in State Notation Language (SNL) a function call is not an
> expression.

This is wrong. A function call definitely is an expression and the docs
say so. It may be obscured by the fact that function call is a postfix
operator (not my invention: that's how C defines it).

The posted code should work. If it doesn't then something else is wrong.

Adamandios: what exactly means "does not work"? WHat is the behavior you
see, what do you expected?

Cheers
Ben
-- 
I would rather have questions that cannot be answered, than answers that
cannot be questioned.  -- Richard Feynman


Attachment: signature.asc
Description: OpenPGP digital signature


Replies:
Re: SEQ Record Question Ben Franksen via Tech-talk
References:
SEQ Record Question Manoussakis, Adamandios via Tech-talk
RE: SEQ Record Question Layne (US), William C via Tech-talk
RE: SEQ Record Question Manoussakis, Adamandios via Tech-talk
Re: SEQ Record Question Ralph Lange via Tech-talk

Navigate by Date:
Prev: Re: Re: Re: Re: Re: RE: Re: Re: modbus write registers error to Pilz PLC 高振华 via Tech-talk
Next: Re: SEQ Record Question Ben Franksen via Tech-talk
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  <20212022  2023  2024 
Navigate by Thread:
Prev: Re: SEQ Record Question Ralph Lange via Tech-talk
Next: Re: SEQ Record Question Ben Franksen via Tech-talk
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  <20212022  2023  2024 
ANJ, 13 Mar 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·