Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dheeraj539 opened this issue Mar 16, 2021 · 2 comments
Open

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

dheeraj539 opened this issue Mar 16, 2021 · 2 comments

Comments

@dheeraj539
Copy link

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
Copy link
Owner

kasemir commented Mar 16, 2021

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

@dheeraj539
Copy link
Author

Thanks!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants