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

Subject: Re: How to use CSS script?
From: "Yendell, Gary \(DLSLtd, RAL, LSCI\) via Tech-talk" <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>, whitetiger1123 <holyeongbaeg at gmail.com>
Date: Tue, 6 Aug 2024 12:50:28 +0000
Hi Baeg,

If you want to implement some logic in an EPICS IOC using python, you could use a python IOC instead. Or if you don't want to change the existing IOC, create a separate python IOC that adds the high-level logic on top and pokes the PVs of the existing IOC.


Cheers,
Gary

From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of whitetiger1123 via Tech-talk <tech-talk at aps.anl.gov>
Sent: 06 August 2024 07:20
To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: How to use CSS script?
 

Hello, all.

We need to use python script in CSS for the recent new stage. We’ve looked up several documents, but we are sending you an email to ask for advice.

 

We build EPICS IOC on a Linux-based server, and css can read pv of IOC in the same ip band based on windows.

When we press action button in CSS execution window, We dreaming of driving the motor once at 180 cw and then again at -180 ccw right away.

 

I think we need to apply python script to apply this method.

But If we execute python script to action of action button, the error keeps happening.

We’d like to ask for the cause and advice of this issue.

 

Attached is the test code below. (This code was just tested with a code that reads the pv value of the motor.)

import sys, time

from epics import PV

motor_pv = PV('TEST1:TEST6’)

print(motor_pv.value)

 

The code above is the code I applied with CSS PYTHON SCRIPT.

 

The error on the console is as follows:

ERROR: Error exists in script ../SCRIPT/test.py

Traceback (most recent call last):

  File "<script>", line 2, in <module>

ImportError: No module named epics

 

I’ve tried python running on epics ioc and there was no problem.

Please advice me on the cause of the problem.

 

Thank you always for your help and advice.

Best and Regards,

Baeg

This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom.

References:
How to use CSS script? whitetiger1123 via Tech-talk

Navigate by Date:
Prev: Re: How to use CSS script? Kasemir, Kay via Tech-talk
Next: Managing connections with asyn Marco Filho 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  <20242025 
Navigate by Thread:
Prev: Re: How to use CSS script? Kasemir, Kay via Tech-talk
Next: RE: How to use CSS script? Zhang, Tong 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  <20242025 
ANJ, 11 Sep 2024 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions ·
· Download · Search · IRMIS · Talk · Documents · Links · Licensing ·