Maybe the problem is your database record for the VarianMode record. Does it's drvInfo field match the definition for that parameter string in your driver?
In general I would recommendations that you prefix all of your parameter strings with VARIAN_ to avoid potential future conflicts with base class parameters.
Mark
Sent from my iPhone
> On Jun 16, 2014, at 4:26 PM, "Gomella, Andrew (NIH/NHLBI) [F]" <[email protected]> wrote:
>
> As always thanks for the quick response. My output from report looks as expected:
>
> Enabling software handshaking...camera connected
> Port: PS1
> Timestamp: <undefined>
> Input EOS[0]:
> Output EOS[0]:
> Parameter list 0
> Number of parameters is: 99
> Parameter 0 type=string, name=PORT_NAME_SELF, value=PS1, status=0
> Parameter 1 type=asynInt32, name=ARRAY_SIZE_X, value=1, status=0
> Parameter 2 type=asynInt32, name=ARRAY_SIZE_Y, value=2816, status=0
> Parameter 3 type=asynInt32, name=ARRAY_SIZE_Z, value=0, status=0
> Parameter 4 type=asynInt32, name=ARRAY_SIZE, value=20185088, status=0
> Parameter 5 type=asynInt32, name=ARRAY_NDIMENSIONS, value=0, status=0
> Parameter 6 type=asynInt32, name=ARRAY_DIMENSIONS, value is undefined
> Parameter 7 type=asynInt32, name=DATA_TYPE, value=3, status=0
> Parameter 8 type=asynInt32, name=COLOR_MODE, value=0, status=0
> Parameter 9 type=asynInt32, name=UNIQUE_ID, value=0, status=0
> Parameter 10 type=asynFloat64, name=TIME_STAMP, value=0.000000, status=0
> Parameter 11 type=asynInt32, name=EPICS_TS_SEC, value=0, status=0
> Parameter 12 type=asynInt32, name=EPICS_TS_NSEC, value=0, status=0
> Parameter 13 type=asynInt32, name=BAYER_PATTERN, value=0, status=0
> Parameter 14 type=asynInt32, name=ARRAY_COUNTER, value=0, status=0
> Parameter 15 type=string, name=FILE_PATH, value is undefined
> Parameter 16 type=asynInt32, name=FILE_PATH_EXISTS, value is undefined
> Parameter 17 type=string, name=FILE_NAME, value is undefined
> Parameter 18 type=asynInt32, name=FILE_NUMBER, value is undefined
> Parameter 19 type=string, name=FILE_TEMPLATE, value=%s%s_%3.3d.dat, status=0
> Parameter 20 type=asynInt32, name=AUTO_INCREMENT, value is undefined
> Parameter 21 type=string, name=FULL_FILE_NAME, value is undefined
> Parameter 22 type=asynInt32, name=FILE_FORMAT, value is undefined
> Parameter 23 type=asynInt32, name=AUTO_SAVE, value is undefined
> Parameter 24 type=asynInt32, name=WRITE_FILE, value=0, status=0
> Parameter 25 type=asynInt32, name=READ_FILE, value=0, status=0
> Parameter 26 type=asynInt32, name=WRITE_MODE, value is undefined
> Parameter 27 type=asynInt32, name=WRITE_STATUS, value=0, status=0
> Parameter 28 type=string, name=WRITE_MESSAGE, value=, status=0
> Parameter 29 type=asynInt32, name=NUM_CAPTURE, value is undefined
> Parameter 30 type=asynInt32, name=NUM_CAPTURED, value=0, status=0
> Parameter 31 type=asynInt32, name=CAPTURE, value=0, status=0
> Parameter 32 type=asynInt32, name=DELETE_DRIVER_FILE, value is undefined
> Parameter 33 type=string, name=ND_ATTRIBUTES_FILE, value is undefined
> Parameter 34 is undefined, name=ARRAY_DATA
> Parameter 35 type=asynInt32, name=ARRAY_CALLBACKS, value is undefined
> Parameter 36 type=asynInt32, name=POOL_MAX_BUFFERS, value=50, status=0
> Parameter 37 type=asynInt32, name=POOL_ALLOC_BUFFERS, value=0, status=0
> Parameter 38 type=asynInt32, name=POOL_FREE_BUFFERS, value=0, status=0
> Parameter 39 type=asynFloat64, name=POOL_MAX_MEMORY, value is undefined
> Parameter 40 type=asynFloat64, name=POOL_USED_MEMORY, value is undefined
> Parameter 41 type=string, name=MANUFACTURER, value=Varian, status=0
> Parameter 42 type=string, name=MODEL, value=PaxScan 3024M X-ray Imager, status=0
> Parameter 43 type=asynFloat64, name=GAIN, value is undefined
> Parameter 44 type=asynInt32, name=BIN_X, value is undefined
> Parameter 45 type=asynInt32, name=BIN_Y, value is undefined
> Parameter 46 type=asynInt32, name=MIN_X, value is undefined
> Parameter 47 type=asynInt32, name=MIN_Y, value is undefined
> Parameter 48 type=asynInt32, name=SIZE_X, value=3584, status=0
> Parameter 49 type=asynInt32, name=SIZE_Y, value=2816, status=0
> Parameter 50 type=asynInt32, name=MAX_SIZE_X, value=3584, status=0
> Parameter 51 type=asynInt32, name=MAX_SIZE_Y, value=2816, status=0
> Parameter 52 type=asynInt32, name=REVERSE_X, value is undefined
> Parameter 53 type=asynInt32, name=REVERSE_Y, value is undefined
> Parameter 54 type=asynInt32, name=FRAME_TYPE, value is undefined
> Parameter 55 type=asynInt32, name=IMAGE_MODE, value is undefined
> Parameter 56 type=asynInt32, name=NEXPOSURES, value is undefined
> Parameter 57 type=asynInt32, name=NEXPOSURES_COUNTER, value=0, status=0
> Parameter 58 type=asynInt32, name=NIMAGES, value is undefined
> Parameter 59 type=asynInt32, name=NIMAGES_COUNTER, value=0, status=0
> Parameter 60 type=asynFloat64, name=ACQ_TIME, value is undefined
> Parameter 61 type=asynFloat64, name=ACQ_PERIOD, value is undefined
> Parameter 62 type=asynFloat64, name=TIME_REMAINING, value=0.000000, status=0
> Parameter 63 type=asynInt32, name=STATUS, value=0, status=0
> Parameter 64 type=asynInt32, name=TRIGGER_MODE, value is undefined
> Parameter 65 type=asynInt32, name=ACQUIRE, value=0, status=0
> Parameter 66 type=asynInt32, name=SHUTTER_CONTROL, value is undefined
> Parameter 67 type=asynInt32, name=SHUTTER_CONTROL_EPICS, value is undefined
> Parameter 68 type=asynInt32, name=SHUTTER_STATUS, value=0, status=0
> Parameter 69 type=asynInt32, name=SHUTTER_MODE, value is undefined
> Parameter 70 type=asynFloat64, name=SHUTTER_OPEN_DELAY, value is undefined
> Parameter 71 type=asynFloat64, name=SHUTTER_CLOSE_DELAY, value is undefined
> Parameter 72 type=asynFloat64, name=TEMPERATURE, value is undefined
> Parameter 73 type=asynFloat64, name=TEMPERATURE_ACTUAL, value is undefined
> Parameter 74 type=asynInt32, name=READ_STATUS, value is undefined
> Parameter 75 type=string, name=STATUS_MESSAGE, value=, status=0
> Parameter 76 type=string, name=STRING_TO_SERVER, value=, status=0
> Parameter 77 type=string, name=STRING_FROM_SERVER, value=, status=0
> Parameter 78 type=asynInt32, name=VARIAN_MODE, value is undefined
> Parameter 79 type=asynInt32, name=SAVE_RAW, value is undefined
> Parameter 80 type=asynInt32, name=SAVE_OFFSET, value is undefined
> Parameter 81 type=asynInt32, name=SAVE_CORRECTED, value is undefined
> Parameter 82 type=asynInt32, name=BOARDSNBR, value is undefined
> Parameter 83 type=asynInt32, name=COMPLETE, value is undefined
> Parameter 84 type=asynInt32, name=READY_FOR_PULSE, value is undefined
> Parameter 85 type=asynInt32, name=NUM_FRAMES, value is undefined
> Parameter 86 type=asynInt32, name=NUM_PULSES, value is undefined
> Parameter 87 type=asynFloat64, name=TEMP1, value is undefined
> Parameter 88 type=asynFloat64, name=TEMP2, value is undefined
> Parameter 89 type=asynFloat64, name=TEMP3, value is undefined
> Parameter 90 type=asynFloat64, name=TEMP4, value is undefined
> Parameter 91 type=asynFloat64, name=TEMP5, value is undefined
> Parameter 92 type=asynFloat64, name=TEMP6, value is undefined
> Parameter 93 type=asynInt32, name=GAIN_CAL, value is undefined
> Parameter 94 type=asynInt32, name=GAIN_CAL_NUM_OFFSETS, value is undefined
> Parameter 95 type=asynInt32, name=GAIN_CAL_NUM_FLATS, value is undefined
> Parameter 96 type=asynFloat64, name=VARIAN_FRAME_RATE, value is undefined
> Parameter 97 is undefined, name=empty
> Parameter 98 is undefined, name=empty
>
> But when writeInt32 is called for say VarianMode, it thinks the parameter number for VarianMode is 1, when it should be 78? I'm probably missing something trivial but I really can't find it.
>
> Thank you,
> Andrew
>
>
> ________________________________________
> From: Mark Rivers [[email protected]]
> Sent: Monday, June 16, 2014 3:35 PM
> To: Gomella, Andrew (NIH/NHLBI) [F]
> Cc: [email protected]
> Subject: Re: Parameter library in asynportdriver /areadetector
>
> If your driver has a varian::report method like other drivers then you can do
>
> asynReport 10 portName
>
> where portName is the asyn port name of your driver.
>
> That will dump the entire parameter library with index numbers, drvInfo strings and parameter values.
>
> You should see the parameters from asynNDArrayDriver first, then the ones from ADDriver, and finally the ones from your Varian driver.
>
> Mark
>
> Sent from my iPhone
>
>> On Jun 16, 2014, at 1:24 PM, "Gomella, Andrew (NIH/NHLBI) [F]" <[email protected]> wrote:
>>
>> Hi,
>>
>> Yet another question regarding an areadetector driver I am writing (which is now mostly finished).
>>
>> For some reason my parameter library is not getting set to the correct indices. In my writeInt32 function I put some printf statements and found out that my first parameter VarianMode is set to 3, but should be set to 78. (or vice versa?)
>>
>> synStatus varian::writeInt32(asynUser *pasynUser, epicsInt32 value)
>> {
>> int function = pasynUser->reason;
>> //int status = asynSuccess;
>> printf("VarianMode: %i", VarianMode);
>>
>> printf("writeint32 %i %i", function, value);
>> if (function == 78){
>> printf("function varian mode called");
>> vip_select_mode(value); //varian function
>> }
>>
>>
>> (Explicitly just saying function ==78 was my quick fix to get things working as expected).
>> When I caput VarianMode 1
>> the first printf gives: VarianMode: 3
>> The second printf gives: writeint32 78 1
>>
>> I've compared my code to many areadetector examples and can't figure out what I am doing wrong? Everything I'm doing seems exactly the same -
>> the declarations, the NUM PARAMS define (which is later used in the constructor)
>> #define NUM_VARIAN_PARAMS ((int)(&LAST_VARIAN_PARAM - &FIRST_VARIAN_PARAM + 1))
>>
>> Any ideas?
>>
>>
>> Thanks,
>> Andrew
>>
>> Imaging Physics Lab, NIH
>>
>>
- Replies:
- RE: Parameter library in asynportdriver /areadetector Gomella, Andrew (NIH/NHLBI) [F]
- References:
- Parameter library in asynportdriver /areadetector Gomella, Andrew (NIH/NHLBI) [F]
- Re: Parameter library in asynportdriver /areadetector Mark Rivers
- RE: Parameter library in asynportdriver /areadetector Gomella, Andrew (NIH/NHLBI) [F]
- Navigate by Date:
- Prev:
RE: Parameter library in asynportdriver /areadetector Gomella, Andrew (NIH/NHLBI) [F]
- Next:
RE: Parameter library in asynportdriver /areadetector Gomella, Andrew (NIH/NHLBI) [F]
- 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: Parameter library in asynportdriver /areadetector Gomella, Andrew (NIH/NHLBI) [F]
- Next:
RE: Parameter library in asynportdriver /areadetector Gomella, Andrew (NIH/NHLBI) [F]
- 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
|