EPICS Home

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

Subject: RE: waveform arrays within SNL
From: Mark Rivers <[email protected]>
To: 'Al Honey' <[email protected]>, "'[email protected]'" <[email protected]>
Date: Tue, 20 Jun 2017 19:28:09 +0000

You need to change it to:

 

#define MAX_LOCATIONS 1000

int locations[MAX_LOCATIONS];

assign locations to "{tel}{instr}:{mech}:locations";  // where locations is a waveform record with an integer array.

 

Do you mean a waveform record of type CHAR that is used to hold a long string?  I think you just declare it as

 

char waveform[MAX_SIZE];

 

Mark

 

 

From: [email protected] [mailto:[email protected]] On Behalf Of Al Honey
Sent: Tuesday, June 20, 2017 2:22 PM
To: '[email protected]'
Subject: waveform arrays within SNL

 

Hi

I cannot find an explicit example in regards to accessing the element values in a waveform array from within an SNL sequencer.

Does anybody have experience doing so?

 

Can’t seem to do this:

 

int locations;

assign locations to "{tel}{instr}:{mech}:locations";  // where locations is a waveform record with an integer array.

int locs[4] = {0,300,600,900};

 

        pvGet( locations );

        locs = locations;               // is the declaration for locations (above) correct?

 

error: incompatible types when assigning to type int[4] from type int *

         locs = locations;

 

This fails too:

         locs[0] = locations[0];

 

I guess I’m ignorant in regards to accessing the array values in the record.

 

Also, is it necessary to escape to C in order to update the elements in a waveform string record?

 

Thanks for any advice you have

Al

 


Replies:
RE: waveform arrays within SNL Al Honey
References:
waveform arrays within SNL Al Honey

Navigate by Date:
Prev: waveform arrays within SNL Al Honey
Next: Re: waveform arrays within SNL Southern, Tim
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: waveform arrays within SNL Al Honey
Next: RE: waveform arrays within SNL Al Honey
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024