Hi, all,
I am attempting to dynamically populate arrays in a Sequencer using EPICS version R3.14.11. In order to get around a 40 char limit on PVs, I'm using a database to serve alias PVs with shorter names. All of the PVs in this one array (defined as a double [7] ) are bi records with bi record inputs. When I get to the array element #4, the console reads:
"seq_pvMonitor: pvVarMonitorOn() PV_Name
failure: The data type specified is invalid
Segmentation fault (core dumped)"
Any ideas as to why this might happen with this one bi record (I'm suspecting that the next one in line does it as well) and not with the other 4 before it?
My code looks sort of like this:
Program Thing
#define something
char var[32];
char var1[32];
char var2[32];
char var3[32];
char var4[32];
char sysid[32];
char sysidn[40];
char preamble1[40];
char preamble2[40];
char preamble3[40];
char blah[40];
string n;
double Array [7];
assign Array "";
monitor Array;
ss State_Machine
{
State Start
{
entry
{
strcpy(var,macValueGet("S"));
strcpy(var1,macValueGet("SS"));
strcpy(var,macValueGet("N"));
strcpy(var,macValueGet("I"));
strcpy(preamble1,var);
strcat(preamble1,var1);
strcat(preamble1,":WS");
strcat(preamble1,"n");
strcat(preamble1,":");
strcat(preamble1,var4);
strcpy(preamble2,var);
strcat(preamble2,var1);
strcat(preamble2,":FC");
strcat(preamble2,"n");
strcat(preamble2,"_out:");
strcat(preamble2,var4);
strcpy(preamble3,var);
strcat(preamble3,var1);
strcat(preamble3,":FC");
strcat(preamble3,"n");
strcat(preamble3,"_ok:");
strcat(preamble3,var4);
}
when()
{
if( strcmp(var, "DTL_")==0)
{
sprintf(blah, "%s_input\n", preamble1);
pvAssign(Array[0],blah);
sprintf(blah, "%s_raw\n", preamble1);
pvAssign(Array[1],blah);
sprintf(blah, "%s_input\n", preamble2);
pvAssign(Array[2],blah);
sprintf(blah, "%s_raw\n", preamble2);
pvAssign(Array[3],blah);
sprintf(blah, "%s_input\n", preamble3);
pvAssign(Array[4],blah);
sprintf(blah, "%s_raw\n", preamble3);
pvAssign(Array[5],blah);
sprintf(blah, "HardCodedPV\n");
pvAssign(Array[6],blah);
}
}
} state Next
}
David Brown
- Replies:
- Re: Problems with Dynamic Array population Johnson, Andrew N.
- Navigate by Date:
- Prev:
Re: galil softIOC lose the galil controller Heinz Junkes
- Next:
Re: Problems with Dynamic Array population Johnson, Andrew N.
- 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
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: devAsynFloat64::initCommon findInterface asynFloat64Type Pearson, Matthew R.
- Next:
Re: Problems with Dynamic Array population Johnson, Andrew N.
- 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
2020
2021
2022
2023
2024
|