If you used the scaler record and the motor record for your drivers then ca_put_callback will work fine.
If you did not use those records then you will need to use a busy record in your database to make ca_put_callback work.
Mark
-----Original Message-----
From: Dariush Hampai <[email protected]>
Sent: Wednesday, November 12, 2025 7:12 AM
To: Mark Rivers <[email protected]>; Dariush Hampai <[email protected]>
Subject: Re: Populate a waveform from substitutions file
Hi Mark,
ca_put_callback() works also with IOC of motors and detectors that are not coming from synApps? I have to control several motors and the Ortec
994 that are not in the synApps list (I made homemade IOC...) Dariush
Il 12/11/2025 00:30, Mark Rivers ha scritto:
> Hi Dariush,
>
> What you are trying to do is really simple if you use the EPICS sscan record. It takes care of waiting for motors to get to the target position, waits for detectors to get done, etc. It designed for exactly what you are doing, namely scans. It works using ca_put_callback(). That generates a callback when the caput is really done.
>
> If you want to use an SNL program then you should do your pvPut with the SYNC option. That will use ca_put_callback(), and your SNL program will pause until that pvPut is really complete.
>
> Mark
>
>
> -----Original Message-----
> From: Dariush Hampai <[email protected]>
> Sent: Tuesday, November 11, 2025 12:39 PM
> To: Dariush Hampai <[email protected]>; Mark Rivers
> <[email protected]>
> Subject: Populate a waveform from substitutions file
>
> Hi community,
> Hi Mark,
>
> I'm trying to do a SNL state machine, however I need some help in order to conlude the work.
> This SNL is really simple: a scan acquisition (from start to and end with step movement), i.e. a motor and a detector. Up to now, I did the while loop and the sequence of commands is right. However, as the motors and the detectors need a waiting time (to reach the position or to wait the end acquisition) I hade to include a nested while loop to wait the "hardware ready". Unfortunately, as all the devices have different way to say "I'm ready", I put a substitution file in order to have the list for all the terminators.
> file db/scan.db {
> pattern {ioc, ready}
> {"mm4006_1", "@"}
> {"pi_1", "0"}
> {"pi_2", "1"}
> {"ortec_1", "1"}
> ...
> }
> Has I define which device I'm using ad a record in db record(stringout, $(user):motor_device) {
> field(DESC, "Num device motor") } so for example caput
> xlabsrv2:motor_name mm4006_1 How can I prepare two waveforms (or and
> array with 2 columns) and populate them as one reads from the substitution file the IOCs, the second the terminatro character, record(waveform, $(user):ioc) {
> field(DESC, "IOC loaded")
> field(NELM, "200")
> field(FTVL, "STRING")
> field(PINI, "YES")
> }
> record(waveform, $(user):ready) {
> field(DESC, "Terminators loaded")
> field(NELM, "200")
> field(FTVL, "STRING")
> field(PINI, "YES")
> }
>
> find the index that correspond to the IOC selected, and extract the corresponding charater?
> Have you any idea?
> Thank you in advance
>
> Dariush
>
>
> PhD Dr. Dariush Hampai
>
> INFN - LNF
> X-Lab Frascati
> Via E. Fermi, 54 (ex 40)
> I-00044 Frascati (RM)
> Italy
>
> Room: +39.06.9403.5248
> Lab.: +39.06.9403.2286
> Mob.: +39.06.9403.8025
> Fax.: +39.06.9403.2597
>
--
************************************
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
************************************
- References:
- Populate a waveform from substitutions file Dariush Hampai via Tech-talk
- RE: Populate a waveform from substitutions file Mark Rivers via Tech-talk
- Re: Populate a waveform from substitutions file Dariush Hampai via Tech-talk
- Navigate by Date:
- Prev:
Re: Populate a waveform from substitutions file Dariush Hampai via Tech-talk
- Next:
Re: caget: Identical process variable names on multiple servers J. Lewis Muir 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
<2025>
2026
- Navigate by Thread:
- Prev:
Re: Populate a waveform from substitutions file Dariush Hampai via Tech-talk
- Next:
sigmakoki controller motor driver 백호령 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
<2025>
2026
|