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  <20202021  2022  2023  2024  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  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: EPICS7 roller-coaster
From: Rolf Keitel via Tech-talk <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Tue, 31 Mar 2020 17:44:31 +0000

This is a rant, which may only show that I am getting too old for EPICS. Or that staying at home because of COVID-19 makes me feel socially isolated.

 

You may stop reading right here, or read the bottom line just below,  or continue reading to the bitter end if you are masochistic enough:

 

The bottom line: I know the release is 7.0.3, but IT SHOULDN’T BE THAT HARD.

 

It all started out a while ago with me - rather innocently  - thinking “I should really start to look at EPICS 7”.

 

I got the EPICS7.0.3 tar-ball from the APS web-site and built it – no problems here – on a Kubuntu 14 system.
(Please don’t ask why Kubuntu 14 – this is TRIUMF internal stuff).

 

I got the softIocPVA running with no problems and wondered how to set up a database with structured data for PV access.

 

You may remember, that I put this question out on tech-talk a week ago and got a few pointers. I liked the doxygen-generated QSRV documentation at

https://epics-base.github.io/pva2pva/qsrv_page.html#qsrv_group_def

 

although I had preferred a little how-to document.   I thought: a bit terse, but I can work with that.

 

At the same time I remembered my EPICS7 training last year in Aix-en-Provence and got the circle.db database from the training IOC and made the highly  creative change to a rectangle database with records TEST:RW and TEST:RH with info nodes:

record(ai,"TEST:RW") {

    field(DESC,"rectangle width")

    field(SCAN,".2 second")

    info(Q:group,{"test:rect": {"width": {+channel:"VAL"}}})

}

record(ai,"TEST:RH") {

    field(DESC,"rectangle height")

    field(SCAN,".2 second")

    info(Q:group,{"test:rect": {"height": {+channel:"VAL"}}})

}

 

That was reasonably simple.

The IOC started ok and I googled for pvaccess command line tools, got Marty’s manual from April 2019 and started playing:

 

From a different shell I did pvlist and – bingo! – saw my IOC and when I did pvlist <IP addr>:5075 I saw

TEST:RW

TEST:RH

test:rect

Wonderful! I started to feel elated.

 

Then I went to the IOC shell and this happened:

>pvdbl

Command pvdbl not found.

Which was confirmed by

>help

which did not show any pvdbl. How should I guess that I should have to type dbgl ? That finally gave me

test:rect

 

Then I tried to fiddle with the default EPICS_PVAS_.... ports, couldn’t find the IOC any more whatever I did and gave up. Default ports are beautiful, anyway, aren’t they?

 

Then I used pvinfo and pvget successfully and started to feel better again.

As the output from dbget was always more than 70 lines long, I tried to use the -r switch, attempting to just get the values for width and height.

I would even have been happy to  pvget just the height, but pvget ignored me, it either gave me the full monty of 70+ lines, nothing or an “Invalid Character” message.

Well, one day I will learn!

 

On to changing values.

I started

pvmonitor test:rect

got the full monty again, oh well!, but when I changed the TEST:RW and TEST:RH PVs on the IOC shell or with caput, I saw the changes reported on the structured data. Nice!

 

Optimistically I progressed to using pvput, but the values did not change in the IOC. I tried everything I could think of looking at pvput -h, but to no avail.

 

It took a couple of days of e-mailing with Marty to find out that I had to change the info node definition to

info(Q:group,{"test:rect": {"height": {+channel:"VAL", +putorder:0}}})

in order to allow pvput.  Did I say the documentation was somewhat terse? Stupid me had assumed the +putorder key had something to do with ordering only.

Why did pvput come back with the full monty of all the data, sub-sub-data…. of the unchanged test:rect, but did not tell me that It cannot write to the PV?

 

 

With Marty’s help I got to the point of changing my rectangle height by typing:

pvput test:rect ‘{“height”:{“value”:33}}’

I appreciate the clarity of JSON syntax. I also know that some people delight in typing ‘}$@%, which I am less keen on.

I had tried,  naïve as I am and somewhat inspired by pvput -h, stuff like

pvput test:rect height=33

but that gave me the full monty again with unchanged values and two cryptic lines in the middle of the long page

height : Error: need a scalar field

Error: invalid bit-set length

Mmmmh????

 

Anyway, I decided to blame myself for not using the latest EPICS 7 release. So I got the 7.0.3.1 tar from the web-site.

My Kubuntu 14 just laughed at me. I’ll attach the error message somewhere below. Maybe anyone who had the patience to read up to hear can help me with that, but this is not really important.

 

Today I decided to try 7.0.3.1 on my Kubuntu 18 system. Miraculously, it built without problems. I got the softIocPVA running (on the default ports) and proudly typed

pvput test:rect ‘{“height”:{“value”:33}}’

 

And you know what happened after I had all the ‘ } and “  sorted out:

JSON syntax not supported by this build

 

Now I  want to type #@%$!!!. Can anybody help me to set the height field in test:rect with pvput?

 

Faithfully yours – a 25 year enthusiastic EPICS3 user.

 

As I may have said above – I volunteer to write one or two “how to” documents, but someone has to get me up to speed.

Unless I really retire first.

 

- rolf -

 

 

P.S.:

I am attaching the error from building of 7.0.3.1 on my Kubuntu 14 system. This is not important.

I will probably never need this fixed.

 

 

 

Rolf Keitel, Ph.D

TRIUMF, 4004 Wesbrook Mall

Vancouver, BC, V6T 2A3

Tel.: 604 222 7453

e-mail: rolf at triumf.ca

 

-- The old generation has to die off so that a new set of idiots can make the same mistakes all over again --

 

.......
.......
make[4]: Entering directory `/usr1/local/epics/release/R7.0.3.1/base/modules/libcom/src/O.linux-x86_64'
perl -CSD ../../../../bin/linux-x86_64/bldEnvData.pl  -t linux-x86_64 \
                -c gcc -s Linux ../../../../configure
/usr/bin/gcc  -D_GNU_SOURCE -D_DEFAULT_SOURCE           -D_X86_64_  -DUNIX  -Dlinux     -O3   -Wall      -mtune=generic      -m64 -fPIC -I. -I../O.Common -I. -I../osi/compiler/gcc -I../osi/compiler/default -I. -I../osi/os/Linux -I../osi/os/posix -I../osi/os/default -I.. -I../as -I../bucketLib -I../calc -I../cvtFast -I../cppStd -I../cxxTemplates -I../dbmf -I../ellLib -I../env -I../error -I../fdmgr -I../flex -I../freeList -I../gpHash -I../iocsh -I../log -I../macLib -I../misc -I../osi -I../pool -I../ring -I../taskwd -I../timer -I../yacc -I../yacc -I../yajl -I../../../../include/compiler/gcc -I../../../../include/os/Linux -I../../../../include         -MM -MF envData.d  envData.c
gcc: error: envData.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
/usr/bin/gcc  -D_GNU_SOURCE -D_DEFAULT_SOURCE           -D_X86_64_  -DUNIX  -Dlinux     -O3   -Wall      -mtune=generic      -m64 -fPIC -I. -I../O.Common -I. -I../osi/compiler/gcc -I../osi/compiler/default -I. -I../osi/os/Linux -I../osi/os/posix -I../osi/os/default -I.. -I../as -I../bucketLib -I../calc -I../cvtFast -I../cppStd -I../cxxTemplates -I../dbmf -I../ellLib -I../env -I../error -I../fdmgr -I../flex -I../freeList -I../gpHash -I../iocsh -I../log -I../macLib -I../misc -I../osi -I../pool -I../ring -I../taskwd -I../timer -I../yacc -I../yacc -I../yajl -I../../../../include/compiler/gcc -I../../../../include/os/Linux -I../../../../include         -c asLib.c
In file included from ../as/asLib.y:204:0:
../as/asLib_lex.l: In function 'yyreset':
../as/asLib_lex.l:30:2: error: 'BEGIN' undeclared (first use in this function)
  BEGIN INITIAL;
  ^
../as/asLib_lex.l:30:2: note: each undeclared identifier is reported only once for each function it appears in
In file included from ../as/asLib.y:204:0:
../as/asLib_lex.l:1:17: error: expected ';' before numeric constant
 /*************************************************************************\
                 ^
../as/asLib_lex.l:30:8: note: in expansion of macro 'INITIAL'
  BEGIN INITIAL;
        ^
In file included from ../as/asLib.y:204:0:
../as/asLib_lex.l: At top level:
../as/asLib_lex.l:36:2: warning: data definition has no type or storage class [enabled by default]
 %%
  ^
../as/asLib_lex.l:36:2: warning: type defaults to 'int' in declaration of 'yyleng' [-Wimplicit-int]
../as/asLib_lex.l:36:11: error: 'yy_cp' undeclared here (not in a function)
 %%
           ^
../as/asLib_lex.l:36:19: error: 'yy_bp' undeclared here (not in a function)
 %%
                   ^
../as/asLib_lex.l:37:1: error: stray '#' in program
 
 ^
../as/asLib_lex.l:37:2: error: unknown type name 'define'
 
  ^
../as/asLib_lex.l:37:26: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant
 
                          ^
../as/asLib_lex.l:130:1: error: unknown type name 'yy_state_type'
../as/asLib_lex.l:141:2: warning: data definition has no type or storage class [enabled by default]
../as/asLib_lex.l:141:2: warning: type defaults to 'int' in declaration of 'yy_current_state' [-Wimplicit-int]
.....
.....

Replies:
Re: EPICS7 roller-coaster Michael Davidsaver via Tech-talk
Re: EPICS7 roller-coaster Michael Davidsaver via Tech-talk

Navigate by Date:
Prev: Group Leader position at ORNL Hartman, Steven M. via Tech-talk
Next: Re: Newport DL325 Mark Rivers 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  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Group Leader position at ORNL Hartman, Steven M. via Tech-talk
Next: Re: EPICS7 roller-coaster Michael Davidsaver 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  <20202021  2022  2023  2024 
ANJ, 02 Apr 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·