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: Re: how to acess variables in record field.
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: Saurabh Srivastava <saurabh at vecc.gov.in>
Cc: EPICS tech-talk <tech-talk at aps.anl.gov>
Date: Sat, 4 Jul 2020 14:03:44 +0000
Hi Saurabh,


> I am new to EPICS, can anybody tell me how to access variables in record.


If you look at the Application Developer's Guide here it will explain some of the basic concepts.


https://epics.anl.gov/base/R3-16/2-docs/AppDevGuide.pdf


> if I used "caput user:A 4" to below record change the value of user:A to 4 from 0 , if we see it using camonitor or caget.

Yes, you should be able to see the value change with camonitor or caget.  Did you try that?

> My question is where is the variable that uses new caput user:A x value.

When you do "caput user:A 4" you are writing 4 to the .VAL field of the user:A record.  If you don't specify a record field then it defaults to .VAL.  So that is the answer to your question.  The EPICS database consists of a number of records, and each record has a number of fields.  caput and caget use EPICS Channel Access to write and read to EPICS Process Variables, which are record fields.

> if I want to used user:A new value via caput command and want to pass that new value to another record then how to acess value of record user:A

There are several ways to do that.  One is for record user:A to write its value to record user:B.

record (ao, "user:A") {
  field(VAL,"0")
  field(OUT, "user:B PP")
}

record (ao, "user:B") {
}

Now whenever you do a caput to user:A it will also copy the value to user:B.  The PP in the OUT field means that record user:B should be processed when user:A writes to it.

Another way is to do this:

record(ao, "user:B") {
  field(DOL, "user:A")
  field(OMSL, "closed_loop")
  field(SCAN, "1 second")
}

This tells user:B to process once per second and when it does to read the value from user:A.

Mark

________________________________
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Saurabh Srivastava via Tech-talk <tech-talk at aps.anl.gov>
Sent: Friday, July 3, 2020 2:16 AM
To: tech-talk at aps.anl.gov
Subject: how to acess variables in record field.

Hi,
    I am new to EPICS, can anybody tell me how to access variables in record. for e.g. if I used "caput user:A 4" to below record

record (ao, user:A)
{
field(DESC,"variable A")
field(val,"0")
}

change the value of user:A to 4 from 0 , if we see it using camonitor or caget.

My question is where is the variable that uses new caput user:A x value.

if I want to used user:A new value via caput command and want to pass that new value to another record then how to acess value of record user:A

Saurabh

[https://www.gandhi.gov.in/image/logo.svg&retryCount=3]

References:
how to acess variables in record field. Saurabh Srivastava via Tech-talk

Navigate by Date:
Prev: Re: GitHub Software Releases in support of EPICS Web Applications Simon Rees via Tech-talk
Next: Re: Epics iocInit() 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: how to acess variables in record field. Saurabh Srivastava via Tech-talk
Next: Cross-compile epics applicaton for debian 8 on the zynq 赵江 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, 04 Jul 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·