kasemir / org.csstudio.display.builder

Update of org.csstudio.opibuilder.*
Eclipse Public License 1.0
2 stars 10 forks source link

Can't write lists or arrays from script to PV's #559

Open dheeraj539 opened 3 years ago

dheeraj539 commented 3 years ago

I have a python list in my embedded python script and I want to write it to a PV. But, there are errors while I am trying to do this.

I have tried the below

pv_name = "SIM:EXAMPLE"
values = [1,2,3,4,5,6,7]
PVUtil.writePV(pv_name,values,100)
pv_name = PVUtil.createPV(pv_name ,100)
pv_name.setValue(values)
PVUtil.releasePV(pv_name)

Is there any way I can do this? @kasemir

kasemir commented 3 years ago

To pass arrays from jython to java code, see https://www.jython.org/jython-old-sites/archive/21/docs/jarray.html

dheeraj539 commented 3 years ago

Thanks!!!