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  <20102011  2012  2013  2014  2015  2016  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  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: write failure occuring in writeScanRecInProgress function (after writing header) in saveData.c (sscan-2-6-6 module)
From: Jay Steele <[email protected]>
To: Tim Mooney <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Tue, 2 Nov 2010 16:44:14 -0700
Hi Tim,
     After reviewing saveData.c, I realize that PREFIX_SIZE is set to 10, and I'm using the prefix "21:D3:BNP:". I guess that the leading ":" is being dropped off, so the record names set by saveData don't match the actual record names. This explains the following message I get after saveData_Init().
 
saveData: Can't connect to some or all retry PVs
 
     I think this explains why the scan is failing to write out the records.
 
     Why do we need to have such a short prefix (PREFIX_SIZE = 10) for saveData? Can I just increase PREFIX_SIZE and recompile?
 
Thanks,
Jay Steele

From: Jay Steele
Sent: Tuesday, November 02, 2010 3:51 PM
To: Tim Mooney
Cc: [email protected]
Subject: RE: write failure occuring in writeScanRecInProgress function (after writing header) in saveData.c (sscan-2-6-6 module)

Hi Tim,
    The function is exiting out of this block of code (I added the printf("write failed\n") line).
 
****************************************************************
if (pscan->old_npts < pscan->npts) {
  writeFailed |= !xdr_setpos(&xdrs, pscan->dims_offset);
  Debug3(2, "saveData:writeScanRecInProgress:(%s) scan_dim=%d, dims_offset=%ld\n",
   pscan->name, pscan->scan_dim, pscan->dims_offset);
  if (writeFailed) {
            printf("write failed\n");
            goto cleanup;
        }
  lval = pscan->npts;
  writeFailed |= !xdr_long(&xdrs, &lval);
 }
*****************************************************************
 
Cheers,
Jay Steele

From: Tim Mooney [[email protected]]
Sent: Tuesday, November 02, 2010 3:47 PM
To: Jay Steele
Cc: [email protected]
Subject: Re: write failure occuring in writeScanRecInProgress function (after writing header) in saveData.c (sscan-2-6-6 module)

Jay,
The next thing saveData wants to do, after the last message you've shown,
 is to call xdr_setpos(), and I'm pretty sure this will be its first  call to xdr_setpos()
for the file.  I'll guess xdr_pos() is returning an error (zero).  Can you check to see
if this is true?

Tim Mooney

Jay Steele wrote:
Hi EPICS tech-talk,
     I'm having a problem executing my first simple 1D scan here at XRadia. I set up the scan as simply as I could - with one positioner and one data source (SIS 3820 board with input to channel #9 from a signal generator). I am using TPMAC records (e.g., bkgfix1pcs_scanrec_v3.db and AssyGeneric_scanrec_v3.db to set up records) for the positioner. I verified that the SIS 3820 record works to count the pulses from the signal generator, and also that I can move the motor simply by setting 21:D3:BNP:XY:PX:RqsPos. I start the scan and the vxWorks terminal reports the following (with debug_saveData =10, debug_saveDataMsg=10) and keeps trying to write to the scan file without success. Attached is a screen shot of the MEDM interface for the scan. I'm using epics-3-14-11 with VxWorks and compiling with cygwin on windows-x86.
 
saveDataTask: MSG_SCAN_PXNV, ix=0, val=2.000000
21:D3:BNP:scan1 MSG_SCAN_PXNV(2)= 0.000000
saveDataTask: MSG_SCAN_PXNV, ix=0, val=0.000000
21:D3:BNP:scan1 MSG_SCAN_PXNV(0)= 0.000000
saveDataTask: MSG_DESC, val=
MSG_DESC()= 0.000000
 nb_scan_running=1
saveDataTask: MSG_SCAN_DATA, val=0
proc_scan_data(21:D3:BNP:scan1):entry:pmsg->val=0
scan started: 21:D3:BNP:scan1
Checking number of valid positioner
Checking number of valid detector
Checking number of valid trigger
Outermost scan
proc_scan_data(21:D3:BNP:scan1):New file
saveData: stat returned -1 for filename '/data/Nov-1-2010/test_0008.mda'; errno=
3145730
saveData:writeScanRecInProgress: Opening file '/data/Nov-1-2010/test_0008.mda'
saveData:writeScanRecInProgress: Writing file header
saveData:writeScanRecInProgress: scan_dim=1
saveData:writeScanRecInProgress:(21:D3:BNP:scan1) scan_dim=1, dims_offset=0
saveData:writeScanRecInProgress: File Header written
saveData:writeScanRecInProgress: Writing per-scan header
saveData:writeScanRecInProgress: Save scan info
saveData:writeScanRecInProgress: Pos[0] info
saveData:writeScanRecInProgress: Det[0] info
saveData:writeScanRecInProgress: Trg[0] info
saveData:writeScanRecInProgress: Allocate space for Pos[0]
saveData:writeScanRecInProgress: Allocate space for Det[0]
saveData:writeScanRecInProgress:(21:D3:BNP:scan1) scan_dim=1, dims_offset=0
    
     From this output, I tracked the problem down to a write failure in the writeScanRecInProgress function in saveData.c. This occurs after the function writes out the file header and allocates space for Pos[0] and Det[0].
 
     I'm confused why there would be a write failure at this point. Can anybody determine from this problem what might be wrong with my setup to cause this problem?
 
Thanks,
Jay Steele
XRadia Corporation


The information in this email, including any attachments, is confidential and intended only for the recipient(s) listed. Any use of this email for any other purpose is prohibited. If you have received this email in error, please notify me immediately by reply email, delete this email, and do not disclose its contents to anyone.





-- 
Tim Mooney ([email protected]) (630)252-5417
Software Services Group (www.aps.anl.gov)
Advanced Photon Source, Argonne National Lab


The information in this email, including any attachments, is confidential and intended only for the recipient(s) listed. Any use of this email for any other purpose is prohibited. If you have received this email in error, please notify me immediately by reply email, delete this email, and do not disclose its contents to anyone.

References:
write failure occuring in writeScanRecInProgress function (after writing header) in saveData.c (sscan-2-6-6 module) Jay Steele
Re: write failure occuring in writeScanRecInProgress function (after writing header) in saveData.c (sscan-2-6-6 module) Tim Mooney
RE: write failure occuring in writeScanRecInProgress function (after writing header) in saveData.c (sscan-2-6-6 module) Jay Steele

Navigate by Date:
Prev: making edm draw the desired related display based on value of a PV Dayle Kotturi
Next: Re: monitors received out of order Till Straumann
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: write failure occuring in writeScanRecInProgress function (after writing header) in saveData.c (sscan-2-6-6 module) Jay Steele
Next: Re: FW: write failure occuring in writeScanRecInProgress function (after writing header) in saveData.c (sscan-2-6-6 module) Tim Mooney
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 03 Nov 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·