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

Subject: Re:Re: Question about a tutorial wiritten by Norum
From: marco_hair <[email protected]>
To: "Eric Norum" <[email protected]>
Cc: tech-talk <[email protected]>
Date: Wed, 1 Oct 2008 00:14:27 +0800 (CST)
 hi, Eric:
 
I follow your tutorial, but seems there is sth. wrong in my test code.
this is dbtr message:
 
epics> dbtr AB300:FilterWheel:fbk
ACKS: NO_ALARM      ACKT: YES           ADEL: 0             ALST: 0            
ASG:                BKPT: 0x00          DESC: Filter Wheel Position            
DISA: 0             DISP: 0             DISS: NO_ALARM      DISV: 1            
DTYP: AB300         EGU:                EVNT: 0             FLNK:CONSTANT 0    
HHSV: NO_ALARM      HIGH: 0             HIHI: 0             HOPR: 0            
HSV: NO_ALARM       HYST: 0             INP:GPIB_IO #L0 A0 @2                  
LALM: 0             LCNT: 0             LLSV: NO_ALARM      LOLO: 0            
LOPR: 0             LOW: 0              LSV: NO_ALARM       MDEL: 0            
MLST: 0             NAME: AB300:FilterWheel:fbk             NSEV: NO_ALARM     
NSTA: NO_ALARM      PACT: 1             PHAS: 0             PINI: NO           
PRIO: LOW           PROC: 0             PUTF: 0             RPRO: 0            
SCAN: Passive       SDIS:CONSTANT       SEVR: INVALID       SIML:CONSTANT      
SIMM: NO            SIMS: NO_ALARM      SIOL:CONSTANT       STAT: UDF          
SVAL: 0             TPRO: 0             TSE: 0              TSEL:CONSTANT      
UDF: 1              VAL: 0             
epics> 2008/10/01 00:11:33.540 192.168.1.103:4001 write 2
Â\201
epics> 2008/10/01 00:11:35.468 192.168.1.103:4001 read 4
U\020\000\020
2008/10/01 00:11:37.465 AB300:FilterWheel:fbk convert failed Invalid reply
 
I change the code in devAB300.c like this: 
  {&DSET_LI, GPIBREAD, IB_Q_LOW, "\252\201\000\201", NULL, 0, 10,                                                      
   convertCurrentReply, 0, 0, NULL, NULL, NULL},                                                                       
 
why can I only send 2 bytes to device through an Ethernet/serial box?
How to change the Oct format to Hex/Dec in st.cmd?
 
Thanks a lot again. 
 

å2008-09-30ï"Eric Norum" <[email protected]> åéï
>On Sep 30, 2008, at 7:58 AM, Silver wrote:
>
>> hi, all:
>>
>>  I want to write a driver for one of our serial devices, so I read  
>> "How to create EPICS device support for a simple serial or GPIB  
>> device". (http://www.aps.anl.gov/epics/modules/soft/asyn/R4-9/HowToDoSerial/tutorial.html 
>> )
>>
>> While I have several questions:
>>  1. in the tutorial, it said:
>>
>> Command array index 0 â Device Reset
>> {&DSET_LO, GPIBWRITE, IB_Q_LOW, NULL, "\377\377\033", 10, 10,
>>       NULL, 0, 0, NULL, NULL, "\033"},
>> I don't understand what's the meaning of "\377\377\033", does it  
>> mean "377" is oct number?
>
>Yes.  That's standard C syntax.
>If you prefer hexadecimal the equivalent would be "\xFF\xFF\x1B".
>
>>
>>
>>  2. in function "convertPositionReply" and "convertStatusReply",
>> first time, pli->val = pdpvt->msg[0];
>> second time, pli->val = pdpvt->msg[1];
>> Does it mean the AB300's response data begin from different  
>> position? can anyone give me some explanation?
>
>The AB300 response always contains both position information (in the  
>first character) and status information (in the second character).
>
>>
>> I have never used GPIB device before, so forgive my innocence.
>> Thanks a lot in advance.
>
>If your device is IEEE-488.2 compliant the makeSupport .pl command in  
>the ASYN distribution will set up a number of command table entries  
>that you could study.  The command usage is:
>/bin//makeSupport.pl -t  
>devGpib 
>
>-- 
>Eric Norum 



[åå] çæååèå26éæå
Replies:
Re: Question about a tutorial wiritten by Norum Eric Norum
References:
Re: Question about a tutorial wiritten by Norum Eric Norum
Question about a tutorial wiritten by Norum Silver

Navigate by Date:
Prev: Re: vxWorks 6.6 compile problem for EPICS R3.14.10-RC1 Andrew Johnson
Next: Re: Question about a tutorial wiritten by Norum Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Question about a tutorial wiritten by Norum Eric Norum
Next: Re: Question about a tutorial wiritten by Norum Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·