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  2011  2012  2013  <20142015  2016  2017  2018  2019  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019 
<== Date ==> <== Thread ==>

Subject: Re: how to add a variable in asyn command
From: Eric Norum <eric@norum.ca>
To: 梁雅翔 <liangyx@ihep.ac.cn>
Cc: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Tue, 14 Oct 2014 07:02:59 -0700
Yes, and please note that there's a version of the "How to do serial" document updated for StreamDevice in the ASYN documentationHowToDoSerial/ directory: HowToDoSerial_StreamDevice.html

On Oct 14, 2014, at 6:42 AM, Mark Rivers <rivers@cars.uchicago.edu> wrote:

Hi,

I will make a suggestion that will make it easier for you.  You are probably following the old tutorial "HowToDoSerial" like in the following link:

http://www.aps.anl.gov/epics/modules/soft/asyn/R4-20/HowToDoSerial/tutorial.pdf

That codes uses the old devGpib device support.  That code is really obsolete, and you should not use it.

Rather, you should read the new tutorial:

http://www.aps.anl.gov/epics/modules/soft/asyn/R4-23/HowToDoSerial/HowToDoSerial_StreamDevice.html

This uses the StreamDevice device support.  It is what most people are currently using, and they will be able to answer your questions better.  It is easier to use, and is more flexible.  You don't need to write any C code, or recompile when you make any changes, you just need to write a "protocol file".

Mark

________________________________________
From: tech-talk-bounces@aps.anl.gov [tech-talk-bounces@aps.anl.gov] on behalf of 梁雅翔 [liangyx@ihep.ac.cn]
Sent: Tuesday, October 14, 2014 8:32 AM
To: tech-talk@aps.anl.gov
Subject: how to add a variable in asyn command

Hi,
  First I am sorry for my poor English and the mistakes would make.
  I am new to EPICS and I met some question when using asyn. Hoping your advices for my question.
  I used the asyn to control the motor( do it as the tutorial in asyn ), if I want to move the different step, I have to change the number and make it. I want to find an easy way.

Here is the my file( you can see these ):
-----------------------------------------------------------------------
/*
I have the devXXX.c,  devXXX.db,  devXXX.dbd  file,
here is some of my words in devXXX.c( key part ),
you could only see the four part.
*/
-------------------------------------------
#define EOSNL "\r\n"
static sturct gpibCmd goibCmds[]=
{
{&DSET_SO,GPIBCMD,IB_Q_HIGH,  "\x02RPS1/0/300/0"EOSNL,   NULL,0,200,NULL,0,0,NULL,NULL,EOSNL}  /* "\x02RPS1/0/300/0" is the command sent to motor, 300 is the distance */
}
------------------------------------------
over.

 I want to change the "300" with a pv in "\x02RPS1/0/300/0"EOSNL, then I could change the value at will, no need to make again and agian.
 When I try to add the pv, make would error, I don't know how to solve it.

Hope your answer.
Thank you in advanced.

Liang YX

Institute of High Energy Physics
Chinese Academy of Sciences
P. O. Box 918, 100049 Beijing
R. P. China

Tel: 0086-0188235977-603
Email: liangyx@ihep.ac.cn



-- 
Eric Norum
eric@norum.ca





References:
how to add a variable in asyn command 梁雅翔
RE: how to add a variable in asyn command Mark Rivers

Navigate by Date:
Prev: RE: how to add a variable in asyn command Mark Rivers
Next: EPICS Collaboration Meeting October 2014 mattei
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019 
Navigate by Thread:
Prev: RE: how to add a variable in asyn command Mark Rivers
Next: EPICS on vxWorks Amit Chauhan
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·