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

Subject: Re: Dynamic images in BOY
From: Paweł Prędki <[email protected]>
To: Mark Rivers <[email protected]>, TechTalk <[email protected]>
Date: Thu, 25 Aug 2011 11:33:00 +0200
Hello Mark,

Thanks for the suggestions. Below is what I found but it still doesn't get me any closer to a solution, unfortunately.

The output of cainfo:
CAMERA1:WAVETEST
    State:            connected
    Host:             10.1.3.48:5064
    Access:           read, write
    Native data type: DBF_CHAR
    Request type:     DBR_CHAR
    Element count:    16960

And this is my read_wf function in the device support:

static long read_wf(waveformRecord *rec)
{
    time_t now = time(NULL);
    epicsUInt8 value = now%256;
    epicsUInt8* datadst = (epicsUInt8*)rec->bptr;

    int loopvari = 0;
    int loopvarj = 0;
    for (loopvari = 0; loopvari < IMG_WIDTH; loopvari++) {
        value = (value + 1) % 256;
        for (loopvarj = 0; loopvarj < IMG_HEIGHT; loopvarj++) {
            datadst[loopvari*IMG_HEIGHT+loopvarj] = (value);
        }
    }
    rec->nord = IMG_WIDTH*IMG_HEIGHT;

printf("NELM = %d NORD = %d bptr = 0x%x\n", rec->nelm, rec->nord, (int)(rec->bptr));
    rec->udf = FALSE;
    return 0;
}

The printf line returns:
NELM = 1000000 NORD = 1000000 bptr = 0xaaaaf010

And this is the output of dbpr:

epics> dbpr CAMERA1:WAVETEST 5
ACKS: NO_ALARM      ACKT: YES           APST: Always        ASG:
ASP: (nil)          BKPT: 00            BPTR: 0x2aaaaaaaf010
BUSY: 0             DESC: INTGRAPH      DISA: 0             DISP: 0
DISS: INVALID       DISV: 1             DPVT: (nil)         DSET: 0x6054a0
DTYP: imgwave       EGU:                EVNT: 0             FLNK:CONSTANT 0
FTVL: UCHAR         HASH: 0             HOPR: 255           INP:INST_IO @
LCNT: 0             LOPR: -255          LSET: 0x15ca8880
MLIS: f0 ce cf 15 00 00 00 00 f0 ce cf 15 00 00 00 00 01 00 00 00
MLOK: a0 71 ca 15 00 00 00 00           MPST: Always
NAME: CAMERA1:WAVETEST                  NELM: 1000000       NORD: 1000000
NSEV: NO_ALARM      NSTA: NO_ALARM      PACT: 0             PHAS: 0
PINI: NO            PPN: (nil)          PPNR: (nil)         PREC: 0
PRIO: LOW           PROC: 0             PUTF: 0             RARM: 0
RDES: 0x15c6f8b0    RPRO: 0             RSET: 0x2b9887133b40
SCAN: 5 second      SDIS:CONSTANT       SEVR: NO_ALARM      SIML:CONSTANT
SIMM: NO            SIMS: NO_ALARM      SIOL:CONSTANT       SPVT: 0x15caf080
STAT: NO_ALARM      TIME: 2011-08-25 11:22:39.445834000     TPRO: 0
TSE: 0              TSEL:CONSTANT       UDF: 0              VAL: (nil)

As you can see, NORD == NELM so it doesn't seem to be a problem with this particular line of the device support function. Maybe there's something else wrong with the code. I tried increasing the timeout to 10 seconds but it didn't help either.

Pawel

W dniu 2011-08-25 03:53, Mark Rivers pisze:
What does cainfo give on that PV?

I have used caget to retrieve large images without problems, and I've also used native Java Channel Access to do it.  Perhaps your device support is not setting the correct value of NORD?

Mark


________________________________

From: Mark Rivers
Sent: Wed 8/24/2011 8:27 AM
To: Pawel Predki; Kasemir, Kay
Cc: TechTalk
Subject: RE: Dynamic images in BOY


Are you sure you set the EPICS_CA_MAX_ARRAY_BYTES on the IOC server as well?  You can check it on the IOC using the command

epicsPrtEnvParams

Mark


________________________________

From: [email protected] on behalf of Pawel Predki
Sent: Wed 8/24/2011 5:07 AM
To: Kasemir, Kay
Cc: TechTalk
Subject: Re: Dynamic images in BOY



Hello Kay,

It's been quite some time since I raised this topic but now I finally
managed to try your way for 1-channel images. All in all it works fine.
There is one problem, though. The images we're dealing width are of
resolution of up to 1710x1680 which is way above the default
EPICS_CA_MAX_ARRAY_BYTES value. I changed this environmental variable to
6 000 000 and everything seemed fine again. There were no more errors.
However, only 54752 elements are really being sent. I checked it using
caget and in BOY.

My database entry looks as follows:

record(waveform, "CAMERA1:WAVETEST") {
         field(DTYP, "imgwave")
         field(NELM, "2872800")
         field(FTVL, "SHORT")
}

By the way, I tried FTVL, "UCHAR" and I got negative values when the
real values exceeded 127 when writing to the waveform in the IOC.

I wrote soem very simple device support routines that fill the waveform
with counter-like data (0..255) in the read_wf routine. I'm setting the
NORD field of the PV to 1710*1680 and it is there afterwards so I know
the loop works fine.

Do you have any ideas what can be wrong? Is there some other size limit
that I am not aware of?

Regards,
Pawel

W dniu 2011-06-06 15:33, Kasemir, Kay pisze:



On 6/6/11 08:59 , "Pawel Predki"<[email protected]>   wrote:
Is it possible to do such a thing in BOY? There is an Image widget but I
believe it's for static images only.
The "Intensity Graph" widget displays waveforms that are really grayscale
images.

For example:
waveform with 10000 elements, "width" 100 means:
Elements 0...99 are the first row of the image,
elements 100..199 are the second row of the image and so on.
You need to specify the minimum and maximum element value,
like 0 and 255, which will then be mapped to black...white
or some other color map of your choosing.

-Kay





References:
Re: Dynamic images in BOY Kasemir, Kay
Re: Dynamic images in BOY Paweł Prędki
RE: Dynamic images in BOY Mark Rivers
RE: Dynamic images in BOY Mark Rivers

Navigate by Date:
Prev: RE: question about best IDEs for Windows/Cygwin-x86, GCC, EPICS in EPICS community James.OHea
Next: Installing virtual linac. Permission denied (noob question) Tim Fulcher
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Dynamic images in BOY Mark Rivers
Next: RE: Dynamic images in BOY Chen, Xihui
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·