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
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]
|