https://accounts.google.com/VEH?c=CKq8kc2b7qOFVxDx1NyhqOCb7hE&hl=en&service=groups2

233 views
Skip to first unread message

kathry...@stfc.ac.uk

unread,
Jan 27, 2014, 1:06:01 PM1/27/14
to css...@googlegroups.com
Hello,

I have been trying to achieve two things just recently, and I'm starting to wonder if they are actually possible. To make matters more interesting, I'm working in Jython not Java.

The first I think isn't. I wish to write values to a waveform of string type (so caput -a PV_NAME 2 string_1 string_2 from a command line). The PV is read with no problem into text updates, where it is formatted with commas, or into an array of text updates where each element of the array shows each separate item in the waveform. (So, element 0 shows string_1, element 1 shows string_2). The problem is, I actually want to write the waveform back to the IOC, and it seems that this can't be done with strings. If I have a single line of text, then it truncates at 40 characters (which is fine for a string, but not for all the elements I need), and everything is placed into element 1. If I go for the simple example of an array linked to PV_NAME with a Text Input Control type, then attempt to alter the value in the array, then I get the following type of message (I've removed the name of the PV, and the timestamp, as both are irrelevant):

timestamp ERROR: Failed to write PV:PV_NAME
java.lang.Exception: Cannot handle type [Ljava.lang.String;

I had previously tried various things with scripts (as this is what I need to achieve in the end, writing to the waveform of string type using a script) but none of them worked either, often with type errors. So, can anyone give me any pointers as to where I go from here to try and solve this problem?

My other query should be answerable easily, one way or another I hope. I'm dynamically loading opis in linked containers, but, if certain key PVs are disconnected I'd like to either remove that container, or not load it in the first place. But, I don't know the PV names before running the script to load them dynamically. The names are semi static, but there is a part of them that can be altered without reference to me potentially, and there are a potentially large number of them to display (16*16*24), and I should probably look at paging them in some format or another, but if I can't see whether or not they are connected in the first place, as there may only be a smaller number set up (2*16*24) or (3*16*24) I could still end up showing a lot of useless information. Now, in order for the borders to change colour there must be something somewhere that says the PV has timed out or failed to connect, is there any way that I can access this information, or gather it in a different way? So far I've had no luck, so as I was asking one question, I decided to ask two...

Thanks for reading, and hopefully someone will be able to help,

Kathryn Baker 

dmic...@googlemail.com

unread,
Feb 20, 2014, 4:55:00 AM2/20/14
to css...@googlegroups.com, kathry...@stfc.ac.uk

Hi,

For the first question, if I understand it correctly, it seems like you have a problem with writing values to that particular record with caput. That has nothing to do with CSS, and so should probably be more appropriate in another forum like EPICs tech talk.

For the 2nd question, I'm not sure why you would want to hide things that are disconnected (since it's useful a very important information to tell the operator!), but how about a script (you said you're using jython) that opens up your opis rather than having them linked containers? This way, you can add the logic on checking the PVs in your script.

David

dmic...@googlemail.com

unread,
Feb 26, 2014, 9:21:41 AM2/26/14
to css...@googlegroups.com, kathry...@stfc.ac.uk, dmic...@googlemail.com

Hi Kathryn,

Regarding your issue with writing to a waveform of string type... There is a fundamental limit (40 characters) to the STRING type in EPICS, and the only way to store long string in EPICS is to use a waveform of char type (so one waveform holds one string). Now, as you want an array of string, you could do this by having using an aSub record as it can handle arrays as inputs - see discussion here: http://www.aps.anl.gov/epics/tech-talk/2010/msg02100.php

Hope that helps

mdravi...@gmail.com

unread,
Apr 20, 2017, 1:23:30 AM4/20/17
to CSS BOY, kathry...@stfc.ac.uk, dmic...@googlemail.com
no
Reply all
Reply to author
Forward
0 new messages