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: "Layne \(US\), William C via Tech-talk" <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>, "manoussakis1 at llnl.gov" <manoussakis1 at llnl.gov>
Date: Fri, 12 Mar 2021 19:44:26 +0000

Including string.h in the top of your .st file should allow you to use `strcmp`:

%%#include “string.h”

 

William

 

 

From: Tech-talk [mailto:tech-talk-bounces at aps.anl.gov] On Behalf Of Manoussakis, Adamandios via Tech-talk
Sent: Friday, March 12, 2021 2:12 PM
To: tech-talk at aps.anl.gov
Subject: [EXTERNAL] SEQ Record Question

 

EXT email: be mindful of links/attachments.


 

Hello,

 

I am working on the sequencer record and wondering where to place conditionals, I was trying to do a string compare inside the when() but it did not want to compile.

 

I see some examples in the documentation where they place a conditional in the when() block

 

when (voltage > 2) {

 

            /* turn light on */

            light = ON;

            pvPut(light);                           

   

    } state light_on

}

 

But I have also seen where they have if statements inside of a when() with no check

 

when () {

        if(strcmp(voltage, "STANDBY")==0){

 

            /* turn light on */

            light = 8;

            pvPut(light);

   

    } state light_on

}

 

I was hoping to do something like this

 

when(strcmp(voltage, "STANDBY")==0){

 

}

 

Thanks,

Adam


Replies:
RE: SEQ Record Question Manoussakis, Adamandios via Tech-talk
References:
SEQ Record Question Manoussakis, Adamandios via Tech-talk

Navigate by Date:
Prev: SEQ Record Question Manoussakis, Adamandios via Tech-talk
Next: Looking for a device support for Keysight 53220/30 Frequency Counter Kim, Kukhee 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: SEQ Record Question Manoussakis, Adamandios via Tech-talk
Next: RE: SEQ Record Question Manoussakis, Adamandios 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, 12 Mar 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·