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  <20162017  2018  2019  2020  2021  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  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: How to configurate MCA for Octave
From: Eric Norum <[email protected]>
To: Hulusi Öz <[email protected]>
Cc: EPICS tech talk <[email protected]>
Date: Fri, 22 Jul 2016 08:22:34 -0700
Have you managed to build the example IOC?
Can you use clients like caget or camonitor to read values from that IOC?
Until you’re able to do that you won’t have any success trying things like octave.

Here’s a very quick example — I did this on OS X — you’ll have to make the appropriate substitutions for linux.

1 — Create the example application and an IOC:
wenorum@205 283> makeBaseApp.pl -t example example
wenorum@205 284> makeBaseApp.pl -i -t example example
Using target architecture darwin-x86 (only one available)
The following applications are available:
    example
What application should the IOC(s) boot?
The default uses the IOC's name, even if not listed above.
Application name? 
wenorum@205 285> make
. . . 

2 — Run the example application and get a list of record names:
wenorum@205 286> cd iocBoot/iocexample 
wenorum@205 287> ../../bin/darwin-x86/example st.cmd
#!../../bin/darwin-x86/example
## You may have to change example to something else
## everywhere it appears in this file
< envPaths
epicsEnvSet("ARCH","darwin-x86")
epicsEnvSet("IOC","iocexample")
epicsEnvSet("TOP","/Users/wenorum/tmp/e")
epicsEnvSet("EPICS_BASE","/usr/local/epics/R3.14.12/base")
cd "/Users/wenorum/tmp/e"
## Register all support components
dbLoadDatabase "dbd/example.dbd"
example_registerRecordDeviceDriver pdbbase
## Load record instances
dbLoadTemplate "db/userHost.substitutions"
dbLoadRecords "db/dbSubExample.db", "user=wenorumHost"
## Set this to see messages from mySub
#var mySubDebug 1
## Run this to trace the stages of iocInit
#traceIocInit
cd "/Users/wenorum/tmp/e/iocBoot/iocexample"
iocInit
Starting iocInit
############################################################################
## EPICS R3.14.12.5 $Date: Tue 2015-03-24 09:57:35 -0500$
## EPICS Base built Aug 19 2015
############################################################################
iocRun: All initialization complete
## Start any sequence programs
#seq sncExample, "user=wenorumHost"
epics> dbl
wenorumHost:ai1
wenorumHost:ai2
wenorumHost:ai3
wenorumHost:aiExample
wenorumHost:aiExample1
wenorumHost:aiExample2
wenorumHost:aiExample3
wenorumHost:aSubExample
wenorumHost:calc1
wenorumHost:calc2
wenorumHost:calc3
wenorumHost:calcExample
wenorumHost:calcExample1
wenorumHost:calcExample2
wenorumHost:calcExample3
wenorumHost:compressExample
wenorumHost:subExample
wenorumHost:xxxExample
epics> 

3 — Run a client in a different terminal window and monitor a PV in the example IOC:
wenorum@205 211> camonitor wenorumHost:ai1
wenorumHost:ai1                2016-07-22 08:19:47.303034 4 LOW MINOR
wenorumHost:ai1                2016-07-22 08:19:48.302899 5  
wenorumHost:ai1                2016-07-22 08:19:49.302652 6 HIGH MINOR
wenorumHost:ai1                2016-07-22 08:19:50.303030 7 HIGH MINOR
wenorumHost:ai1                2016-07-22 08:19:51.302994 8 HIHI MAJOR
wenorumHost:ai1                2016-07-22 08:19:52.303159 9 HIHI MAJOR

4 — Use octave to read a value from the example IOC:
wenorum@205 212> octave --no-gui
GNU Octave, version 4.0.3
Copyright (C) 2016 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.

Octave was configured for "x86_64-apple-darwin15.5.0".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/get-involved.html

Read http://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.

>> pv=mcaopen('wenorumHost:ai1')
MCA Initialized
pv =  1
>> mcaget(pv)
ans =  2
>> mcaget(pv)
ans =  4
>> mcaget(pv)
ans =  5
>> 

On Jul 22, 2016, at 12:56 AM, Hulusi Öz <[email protected]> wrote:

As an extra question, let's say I could do all of these things and I could use the commands. Once I write a script in Octave, where should I save this file ? Should that saved in my_example that I'm running in the iocshell ? If it is that so, which direction should it be ?

-- 
Eric Norum
[email protected]





Replies:
Re: How to configurate MCA for Octave Hulusi Öz
References:
How to configurate MCA for Octave Hulusi Öz
Re: How to configurate MCA for Octave Eric Norum
Re: How to configurate MCA for Octave Eric Norum
Re: How to configurate MCA for Octave Hulusi Öz
Re: How to configurate MCA for Octave Eric Norum
Re: How to configurate MCA for Octave Eric Norum
Re: How to configurate MCA for Octave Eric Norum
Re: How to configurate MCA for Octave Hulusi Öz
Re: How to configurate MCA for Octave Hulusi Öz

Navigate by Date:
Prev: Re: aravisGigE jumbo frame support Hinxx
Next: Re: How to configurate MCA for Octave Hulusi Öz
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: How to configurate MCA for Octave Hulusi Öz
Next: Re: How to configurate MCA for Octave Hulusi Öz
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 22 Jul 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·