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  <2025 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
<== Date ==> <== Thread ==>

Subject: Re: Some questions about CaLab (Dariush Hampai)
From: Kathryn Baker - STFC UKRI via Tech-talk <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Mon, 23 Jun 2025 14:52:44 +0000
Hi Dariush,

I may have been wrong with the caching aspect, but as I say a quick look at the LabVIEW code for CaLab Info has a case structure and feedback nodes which I'd say  are in keeping with a functional global variable (this is a LabVIEW VI of a specific type, the VI doesn't follow that style properly, but I'd say does much the same thing.) So what I think it is doing is asking for the information the first time it is called, and then keeping that information in memory and returning it - depending on how you are calling it. (Would need to the LabVIEW code to do more than make this as a random stab in the dark guess.) This is supposition based on minimal information. But that might only be the case if the IOC is actually stopped, otherwise, if the IOC is running the PVs will be there, you can't stop or disconnect a PV at the IOC side easily from the LabVIEW side.
(For the experts, yes, I'm aware of the DIS fields, but I'm not certain the use case here is involving them, and they may be an additional complexity that isn't needed.)

CaLab is certainly the option I've found best when integrating on the LabVIEW side, but you do need a reasonable understanding of what each side is expecting and how they behave to be able to get the best results.

Please note, I have assumed that LabVIEW is running on a Windows system rather than the Linux system, which is again something that would make a difference to how things might be interacting. 
So starting CaLabSoftIOC.vi will spawn the IOC as a separate process, that process knows nothing about LabVIEW, it will just run on the same computer that LabVIEW was running on all on it's own. Check out the task manager, you will see it in the list. So simply stopping LabVIEW won't stop the IOC. I'm intrigued that it survived a restart of the computer though. However, it would restart as soon as you start the VI, so it might be worth trying that again and checking in task manager before starting the IOC.

Regarding the architecture, you need to run the version that matches the OS you are on, as there are DLLs underneath which care about that.

Regards,

Kathryn

 

I have Long Covid, and work an adapted pattern to allow me to give my best to work, please respond to any emails as fits your own working patterns, and I will respond within my own as soon as I am able.

I am Autistic, and this can impact my communication with others, please be patient with me.




From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Dariush Hampai via Tech-talk <tech-talk at aps.anl.gov>
Sent: 23 June 2025 14:00
To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Re: Some questions about CaLab (Dariush Hampai)
 

Hi Kathryn,
I'll try to explain better...
Up to now I have few IOCs in a linux server (that are running without any problem)
As GUI interface I would like to use LabView (for a several of reason, analyzing algorithms, CRIO units, ecc...).

CaLab should be the right library in orther to interface LabView with CA.

The first problem, which I can't understand, is why, if a CA is active first then I stop it, using CaLab info.vi I continue to see them. I also tried to disconnect the CAs using CaLab disconnect.vi, however the problem persists. I also tried to send a CaLab put.vi with .PROC as a field, but the problem still persists.
I went back to the beginning: I closed everything (LabView) and opened the Soft Demo.vi. By runnin the vi, the system tells me that another SoftIOC is active and if I want to close it to reinitialize it: even restarting, the "start IOC" led is red (as if it had not started).
I restarted the PC, but the problem persists.
What I wonder is: which software starts SoftIOC.exe? where does it write the CAs or PVs? How can I reset everything?


Dariush

ps: I tried calab.dll LabView32 and it doesn't seem to work


Il 23/06/2025 12:17, Kathryn Baker - STFC UKRI via Tech-talk ha scritto:
Hi Dariush,

I know I'm not Carsten, but I've used his software in LabVIEW. I'm not sure I understand what you are trying to achieve, so apologies if I over explain things, I'd rather ensure the fundamentals are clear in our minds so that we can communicate clearly.

As regards the array version of the VI, it is a different VI to the single one and is using an overloading pattern which means it looks the same, but isn't, whether you send it an array or a direct item. So the act of sending it an array is the same effect as doing one then then other.
The LabVIEW architecture will not be having any influence here as the programs are talking via channel access, which is one of the EPICS protocols, neither program knows about the other, they just have these tokens on a channel and they use those to do other things with them.
The above means that the IOC needs to be running to see anything. So for an array, the code to send it would actually make it two sends. using the example that Carsten gave it would send:

caput mm4006:m11.HOME 12
caput mm4006:m11.MOVN 24

I'm struggling to understand what you are trying to do with the second part, what is the workflow you have? From a quick look at the VI CaLab Info caches the data, as it isn't data to retrieve regularly in most use cases. Knowing what you are trying to achieve, not just the problem, will help people provide good information and answers.

Regards,

Kathryn

 

I have Long Covid, and work an adapted pattern to allow me to give my best to work, please respond to any emails as fits your own working patterns, and I will respond within my own as soon as I am able.

I am Autistic, and this can impact my communication with others, please be patient with me.




From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Dariush Hampai via Tech-talk <tech-talk at aps.anl.gov>
Sent: 23 June 2025 10:11
To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Re: Some questions about CaLab (Dariush Hampai)
 

Hi Carsten,
this means that if I send a CaLab get.vi with PV mm4006:m11 and the array field [HOMF,MOVN] I receive an array of value [12,24]... is it right?

The second question is more important... in someway even using disconnect all PV (or sending directly the names of PV to disconnect), with CaLab Info.vi I have in back all the PVs.
Is it possible that the problem is with the architecture of Labview? i.e., Labview64 or Labview32?

Awaiting your replay

Dariush

Il 23/06/2025 07:31, Carsten Winkler ha scritto:

The CA Lab does not have a function for writing multiple fields in a single channel access command.

Fields are written by adding the field name with a dot.

If you need to write to multiple fields, you can use array parameters as follows:

Carsten

Am 20.06.2025 um 21:02 schrieb tech-talk-request at aps.anl.gov:
Send Tech-talk mailing list submissions to tech-talk at aps.anl.gov To subscribe or unsubscribe via the World Wide Web, visit https://mailman.aps.anl.gov/mailman/listinfo/tech-talk or, via email, send a message with subject or body 'help' to tech-talk-request at aps.anl.gov You can reach the person managing the list at tech-talk-owner at aps.anl.gov When replying, please edit your Subject line so it is more specific than "Re: Contents of Tech-talk digest..." Today's Topics:   1. Re: Problem with Newport CONEX-AGAP FTDI device on Linux      (James P. Withrow)   2. Re: Problem with Newport CONEX-AGAP FTDI device on Linux      (Dmitry Yu. Bolkhovityanov)   3. Some questions about CaLab (Dariush Hampai)   4. RE: Problem with Newport CONEX-AGAP FTDI device on Linux      (Mark Rivers) ---------------------------------------------------------------------- Message: 1 <snip - irrelevant to conversation? ------------------------------ Message: 2 <snip - irrelevant to conversation> ------------------------------ Message: 3 Date: Fri, 20 Jun 2025 17:27:15 +0200 From: Dariush Hampai <dariush.hampai at lnf.infn.it> To: tech-talk at aps.anl.gov Subject: Some questions about CaLab Message-ID: <239527c2-f231-4cea-b327-d81f47d38a06 at lnf.infn.it> Content-Type: text/plain; charset=UTF-8; format=flowed Hi all, I have some problems with CaLab, necessary to integrate epics with a LabView interface. In particular now I have two big problems: 1) i don't understand how to use multiple field in the same CA. For example, my newport IOC includes some records of the type mm4006:m11.HOMF mm4006:m11.MOVN etc... CaLab Put.vi does not include the field. What do I do? if I put (for example) mm4006:m11.HOMF and mm4006:m11.MOVN as PV I find two distinct PVs... 2) I am trying to generate a monitor of the various IOCs. When starting LabView there is no PV (via CaLab info.vi). If I start the IOCs I see the PVs. However if I stop the IOCs, via command prompt (caget etc...) I do not see (obviously) the active CA, while via CaLab info.vi the CA are still active and give me the last values read. Even after a reset of PV, using CaLab_Disconnect.vi, I still see the active CAs with the last value read. Where am I going wrong? Dariush
-- <snip repeated signature>
-- ************************************ 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: Some questions about CaLab (Dariush Hampai) Dariush Hampai via Tech-talk
References:
Re: Some questions about CaLab (Dariush Hampai) Carsten Winkler via Tech-talk
Re: Some questions about CaLab (Dariush Hampai) Dariush Hampai via Tech-talk
Re: Some questions about CaLab (Dariush Hampai) Kathryn Baker - STFC UKRI via Tech-talk
Re: Some questions about CaLab (Dariush Hampai) Dariush Hampai via Tech-talk

Navigate by Date:
Prev: Re: Some questions about CaLab (Dariush Hampai) Dariush Hampai via Tech-talk
Next: areaDetector/asynPortDriver order of parameter initialization Irie Railton - STFC UKRI 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
Navigate by Thread:
Prev: Re: Some questions about CaLab (Dariush Hampai) Dariush Hampai via Tech-talk
Next: Re: Some questions about CaLab (Dariush Hampai) Dariush Hampai 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
ANJ, 23 Jun 2025 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions ·
· Download · Search · IRMIS · Talk · Documents · Links · Licensing ·