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  2021  2022  2023  2024  <20252026  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  <20252026 
<== Date ==> <== Thread ==>

Subject: Newbie question about SNL
From: Dariush Hampai via Tech-talk <[email protected]>
To: "[email protected]" <[email protected]>, Mark Rivers <[email protected]>
Date: Fri, 28 Nov 2025 17:34:57 +0100

Hi community,
i'm trying to create a sequencer by SNL.
I would like to create a scan with a motor and for each step an acquisition.
Using the db of the scan IOC, I defined my IOC to control

 "{user}:motor" and "{user}:create_command_label" are in the scan IOC db, and I need them to generate the record that I want to control

[…]
string motor;
assign motor to "{user}:motor";
monitor motor;
double command;
assign command to "{user}:create_command_label";
monitor command;
[…]

ss scan_test {
        state init {
                when (test==0) {
                        printf("Ready for Loop\n");
                        } state idle
        }
        state idle {
                when (test==1) {
                        printf("Start Loop\n");
                        test=2;
                        pvPut(test);
                } state loop
                when (test==3) {
                        command=4;
                        pvPut(command, SYNC);
                        pvPut(motor, 1, SYNC); 
                        test=6;
                        pvPut(command, SYNC);
                        pos=pvGet(motor, SYNC);
                        printf("IOC and Device %s\n", motor);
                        printf("Position =%f\n", pos);
                        test=0;
                        pvPut(test);
                } state idle
        }
[...]
}

When I start the IOCs (by procServ), and I pass in the test=3 state I receive:
IOC and Device mm4006_1_1_2:pos
Position =0.000000

However
caget mm4006_1_1_2:pos
mm4006_1_1_2:pos               1000

Where do I wrong?


-- 
************************************

Dr. Dariush Hampai, PhD

INFN - LNF
X-Lab Frascati
Via E. Fermi, 54 (ex 40)
I-00044 Frascati (RM)
Italy

Mail Address:
XLab-Frascati
LNF-INFN
Casella Postale 13
Frascati (RM)
Italy

Room:	+39.06.9403.5248
Lab.:	+39.06.9403.2286
Mob.:	+39.06.9403.8025
Fax.:	+39.06.9403.2597

************************************

Replies:
RE: Newbie question about SNL Mark Rivers via Tech-talk

Navigate by Date:
Prev: Re: About errors in controlling the motor controller. Mark Rivers via Tech-talk
Next: RE: Newbie question about SNL Mark Rivers 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  2021  2022  2023  2024  <20252026 
Navigate by Thread:
Prev: Re: About errors in controlling the motor controller. Mark Rivers via Tech-talk
Next: RE: Newbie question about SNL Mark Rivers 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  2021  2022  2023  2024  <20252026 
ANJ, 19 Mar 2026 · Home · News · About · Talk · Base · Modules · Extensions ·
· Distributions · Download · Documents · Links · Licensing ·