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

Subject: RE: how to add a variable in asyn command
From: Mark Rivers <[email protected]>
To: 梁雅翔 <[email protected]>, "[email protected]" <[email protected]>
Date: Tue, 14 Oct 2014 13:42:56 +0000
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: [email protected] [[email protected]] on behalf of 梁雅翔 [[email protected]]
Sent: Tuesday, October 14, 2014 8:32 AM
To: [email protected]
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: [email protected]



Replies:
Re: how to add a variable in asyn command Eric Norum
References:
how to add a variable in asyn command 梁雅翔

Navigate by Date:
Prev: how to add a variable in asyn command 梁雅翔
Next: Re: how to add a variable in asyn command Eric Norum
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  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: how to add a variable in asyn command 梁雅翔
Next: Re: how to add a variable in asyn command Eric Norum
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  2020  2021  2022  2023  2024 
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 ·