> Return-Path: <[email protected]>
> Received: (from wls@localhost) by xcelsior.larc.nasa.gov
> (8.7.6/server3.4) id JAA21635
> for [email protected]; Wed, 16 Apr 1997 09:34:23 -0400 (EDT)
> Message-Id: <[email protected]>
> Date: Wed, 16 Apr 1997 09:34:23 -0400 (EDT)
> From: Bill Stewart <[email protected]>
>
> My name is Bill Stewart. I am working at the NASA Langley Research
> Center with EPICS. I was interested in using the dynamic assignment
> and dynamic monitoring capabilities of SNL and have run into a few
> problems. Basically, what I attempted to do was to implement code
> similar to the example on page 22 of the "State Notation Language
> and Seq. Users Guide" with an array of floats. It turns out that
> this example will not compile with my version of snc. It fails on the
> following assignment:
>
> long setpoint[5];
> assign setpoint to { };
>
> I was able to get it to compile by changing the curly brackets to " "
> as in the following example:
>
> char str[30];
> float pos_actual[42];
> assign pos_actual to " ";
>
> Then, I perform the following to do the dynamic assignment
> and monitoring.
>
> /* do dynamic assignments on the array type parameters */
> for (i=0; i<42;i++){
> /* Actual jack positions from LVDT's */
> sprintf(str,"flexcs:pos:j_pos_%d\n",i);
> pvAssign(pos_actual[i],str);
> pvMonitor(pos_actual[i]);
> .
> .
> .
> }
>
> When this segment gets loaded and run, I get an error. Oddly enough,
> it never completes the loop. It dies on the 25th iteration. What I get
> in debug mode is as follows:
>
>
> CA.Client.Diagnostic..............................................
> Message: "The array or data structure specified will not fit in CA message buffer"
> Severity: "Error" Context: "ca_add_array_event"
> Source File: ../seq_if.c Line Number: 279
> task: 0X373aa4 taskwd
> task 1b2d18 fcs suspended
>
>
>
> Also, since the documentation states that the functions pvAssign and
> pvMonitor are defined to return an integer, what are the expected return
> values for successful and unsuccesful completions? The documentation that
> I have does not state what the return values are supposed to be. What gets
> returned (with a few mods. to the above code) is a value of "1" from
> both calls prior to the bus error. I don't believe I have a memory problem. The version of
> EPICS is R3.12 and the version of snc is 1.9.0 for 3.12.1. Any takers?
> Thanks for your help....
>
>
> William L. Stewart
> [email protected]
>
>
>
>
>
Well, just as I sent the tech talk message about the snl problem that
I was having with dynamic assignment and monitoring, I figured out my
own problem. As I stated in my previous message the example will not
compile. The problem was with the following assignment:
long setpoint[5];
assign setpoint to { };
This example works fine when you place " " within the curly brackets,
such as :
long setpoint[5];
assign setpoint to {" "};
This seems to satisfy the compiler for the empty array.
William L. Stewart
[email protected]
- Navigate by Date:
- Prev:
[no subject] Bill Stewart
- Next:
Missing file Russell J. Page, Sr.
- 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:
[no subject] Bill Stewart
- Next:
Missing file Russell J. Page, Sr.
- 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
|