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

Subject: Re: How to access bigstring using channel access
From: Ralph Lange <[email protected]>
To: EPICS Tech-Talk <[email protected]>
Date: Fri, 16 Jan 2015 07:55:51 -0500
Hi Deeptarka,

Yup, that is correct.

Note, though, that -S is an option for this specific command line tool. The dollar sign works on the IOC side and changes the Channel Access data type (on the wire) from string to array of char. The -S option works on the client side and changes how the caget application prints an array of char.
If you use caget -S connecting to a histogram, it will print garbage. (It prints the counts as ascii characters.)
If you use CS-Studio or another CA client, that client must support handling array of char as a string, and if it does, it will have other means of specifying that.

Using Channel Access, there is no fully generic way for a client to know if an array of char is meant to be an image, a histogram, or a long string.
There are context-specific hints, of course:  A text field widget can assume you want to interpret the array as a string, an image widget may assume an image, in case of an EPICS database on the remote end a dollar sign at the end of the field name will indicate a string, etc. But CA itself only shows the data type, not the meaning.

Heads-up: Using the standard containers of the EPICS V4 pvAccess protocol will give a generic client a much better idea of what a piece of data is meant to be. These structures add metadata containing information about how to interpret the value.
Coming soon to an IOC near you..... :-)

Cheers,
~Ralph


On 16/01/2015 00:33, Deeptarka Das/TVM/TCS wrote:

Hi Ralph,

 

Thanks for the prompt reply. However, just let me add, that appending $ at the end, represents the string in the form of an array containing ASCII values of the original characters in the string. I had to add the -S modifier to get what I desired.

 

caget mybigstring.VAL$   -->   array of char (max EPICS_CA_MAX_ARRAY_BYTES - 1)
caget -S mybigstring.VAL$   --> the full length string

 

Thanks and Regards,

Deeptarka


From: "Ralph Lange" <[email protected]>
To: "EPICS Tech-Talk" <[email protected]>
Sent: Thursday, January 15, 2015 7:03:35 PM
Subject: Re: How to access bigstring using channel access

Hi Deeptarka,

Try appending a dollar sign to the PV name when connecting through Channel Access. The IOC takes that as a hint to represent a string field as an array of char, so that CA can transfer more chars than the fixed-size string would allow.

    caget mybigstring.VAL    -->   string (fix 39 chars)
    caget mybigstring.VAL$   -->   array of char (max EPICS_CA_MAX_ARRAY_BYTES - 1)

HTH,
~Ralph


On 15/01/2015 07:56, Deeptarka Das/TVM/TCS wrote:

Hi all,

 

I would like to know if there is some way by which channel access can be used to put and get strings of size larger than 40. I do not wish to use waveform record nor do i wish to use pvaSrv to access PVs using pvAccess. Rather I would like to use the bigstring recordtype of EPICS V4 with channel access. Is there any way it is possible by maybe changing something in epics base?

--
Thanks and Regards,
Deeptarka Das
Mailto: [email protected]




=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you



References:
Re: How to access bigstring using channel access Deeptarka Das/TVM/TCS

Navigate by Date:
Prev: RE: Support for Mercury iTC tom.cobb
Next: RE: Alarm annunciation with ALH and other PC based systems Elder Matias
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: How to access bigstring using channel access Deeptarka Das/TVM/TCS
Next: Job Openings at Daresbury Laboratory graham.cox
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·