EPICS Home

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: "Kasemir, Kay via Tech-talk" <tech-talk at aps.anl.gov>
To: whitetiger1123 <holyeongbaeg at gmail.com>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Tue, 6 Aug 2024 12:27:54 +0000

> We need to use python script in CSS for the recent new stage

> We dreaming of driving the motor once at 180 cw and then again at -180 ccw right away

 

You do not need to use a script in CSS for that.

Just like you did not need to use a. script with edm, medm, dm2k, … or any of the other EPICS display tools.

The display should never “do” anything on its own.

It only displays the values of PVs and allows operators to write to PVs.

 

If you want to automate something like those motor moves, look at the “seq” record which can be used to write a sequence of values, with optional delays. Or look at the EPICS sequencer. Either way, you’ll end up with an IOC where either a “caput start_the_move 1” or a button in an operator interface that writes 1 to a “start_the_move” PV starts the desired operation.

 

Cheers,

Kay

 

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of whitetiger1123 via Tech-talk <tech-talk at aps.anl.gov>
Date: Tuesday, August 6, 2024 at 2:21
AM
To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: [EXTERNAL] How to use CSS script?

Hello, all.

We need to use python script in CSS for the recent new stage. Weve 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.

Wed 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

 

Ive 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


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

Navigate by Date:
Prev: How to use CSS script? whitetiger1123 via Tech-talk
Next: Re: How to use CSS script? Yendell, Gary (DLSLtd, RAL, LSCI) 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: How to use CSS script? whitetiger1123 via Tech-talk
Next: Re: How to use CSS script? Yendell, Gary (DLSLtd, RAL, LSCI) 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