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  2014  2015  2016  <20172018  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  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Help creating motorR6-9 examples
From: Mark Rivers <[email protected]>
To: Guilherme Jovanini Montagner <[email protected]>
Cc: "Ronald L. Sluiter" <[email protected]>, tech-talk <[email protected]>
Date: Wed, 13 Sep 2017 13:14:18 +0000
> Let me ask you then, if I want to connect to a PI controller, do I need to create a st.cmd file that loads the right resources for that purpose?

Yes.  motor/iocBoot/iocWithAsyn contains example st.cmd.* files for a number of controllers, but I don't see any examples for a PI controller.  

I think the commands you need are, for example:

drvAsynIPPortConfigure("PI", "xxx.xxx.xxx.xxx:PORT", 0, 0, 0)

PI_GCS2_CreateController("PI_MOTOR", "PI", int numAxes, int priority, int stackSize, int movingPollingRate, int idlePollingRate)

Where PI is the name of an asyn IP port driver you create, xxx.xxx.xxx.xxx is the IP address of your controller, PORT is the TCP port that the controller accepts connections on, and PI_MOTOR is the name you give to the motor controller you create.  PI_MOTOR is the name you give in your motor template file.

Mark

________________________________________
From: Guilherme Jovanini Montagner [[email protected]]
Sent: Wednesday, September 13, 2017 7:53 AM
To: Mark Rivers
Cc: Ronald L. Sluiter; tech-talk
Subject: Re: Help creating motorR6-9 examples

Hello
Thank you! it worked. Now I've got a bin folder and an executable file WithAsyn within it.
Let me ask you then, if I want to connect to a PI controller, do I need to create a st.cmd file that loads the right resources for that purpose?
Because the preinstalled files don't seem to be what i want to run.
Sorry, I'm new to EPICS and am still investigating how can we develop applications for it.
Thanks

Guilherme Jovanini Montagner
+55 19 2517.8911
+55 19 99806.9117
[email protected]

----- Mensagem original -----
De: "Mark Rivers" <[email protected]>
Para: "guilherme" <[email protected]>, "Ronald L. Sluiter" <[email protected]>
Cc: "tech-talk" <[email protected]>
Enviadas: Quarta-feira, 13 de setembro de 2017 9:03:19
Assunto: RE: Help creating motorR6-9 examples

> Can it be because I have another folder with motorR6-8 on the machine?

No, this error is because motor R6-9 is not compatible with base 3.15 or 3.16.  PI_GCS2Support.dbd includes the motor record, which it should not do.

You can comment out these 2 lines in PI_GCS2Support.dbd

include "asyn.dbd"
include "motorRecord.dbd"

Or you can get the master branch from github, https://github.com/epics-modules/motor

I know that the master branch works on base 3.15.5, but I see that are working with base 3.16.1 and I am not sure if that has been tested with motor yet.

Mark


________________________________________
From: [email protected] [[email protected]] on behalf of Guilherme Jovanini Montagner [[email protected]]
Sent: Wednesday, September 13, 2017 6:51 AM
To: Ronald L. Sluiter
Cc: tech-talk
Subject: Re: Help creating motorR6-9 examples

Hello again, good morning.
I've just tried that, and then, make outputs the following error:

"(...)

Creating dbd file WithAsyn.dbd

perl -CSD /home/setup/Downloads/base-3.16.1/bin/linux-x86_64/dbdExpand.pl   -I. -I.. -I../O.Common -I../../../dbd -I/home/setup/Downloads/support/asyn4-31/dbd -I/home/setup/Downloads/base-3.16.1/dbd -I../../../dbd -o WithAsyn.dbd base.dbd motorSupport.dbd PI_GCS2Support.dbd

dbdExpand.pl: Duplicate definition of record type 'motor'

Context: recordtype(motor) in file '../../../dbd/motorRecord.dbd' in file '../../../dbd/PI_GCS2Support.dbd'
  while reading 'PI_GCS2Support.dbd' to create 'WithAsyn.dbd'

dbdExpand.pl: Exiting due to errors


(...)
"
Can it be because I have another folder with motorR6-8 on the machine?

Thanks again.

Guilherme Jovanini Montagner
+55 19 2517.8911
+55 19 99806.9117
[email protected]

----- Mensagem original -----
De: "Ronald L. Sluiter" <[email protected]>
Para: "tech-talk" <[email protected]>
Enviadas: Terça-feira, 12 de setembro de 2017 18:05:43
Assunto: Fwd: Re: Help creating motorR6-9 examples

-------- Forwarded Message --------
Subject:        Re: Help creating motorR6-9 examples
Date:   Tue, 12 Sep 2017 15:57:49 -0500
From:   Ronald L. Sluiter <[email protected]>
To:     Guilherme Jovanini Montagner <[email protected]>



Hello Guilherme,

I see from the makedump.txt file you sent that you are only building the
"MotorSrc" and "PIGCS2Src" directories. That is OK, but the <motor>/motorExApp
assumes that all the support directories are built.

You could follow one of two paths. One path would be to restore
motorR6-9/motorApp/Makefile to its' orginial state and rebuild.

The other, minimalist, path would be to comment out (or remove) from motorExApp
everything irrelavent to PIGCS2Src support. That requires;
- In motorR6-9/motorExApp/Makefile, comment out "DIRS += NoAsyn" (there is no
PIGCS2Src support in NoAsyn).
- Replace motorR6-9/motorExApp/WithAsyn/Makefile with the attached copy.
- rebuild

I think that should work.

Ron


On 09/12/2017 03:25 PM, Guilherme Jovanini Montagner wrote:
> Hi.
> Ok, here it is (attached)
> I'll have to go now, but I'll come back.
> Thanks!
>
> Guilherme Jovanini Montagner
> +55 19 2517.8911
> +55 19 99806.9117
> [email protected]
>
> ----- Mensagem original -----
> De: "Ronald L. Sluiter" <[email protected]>
> Para: "guilherme" <[email protected]>
> Cc: "tech-talk" <[email protected]>
> Enviadas: Terça-feira, 12 de setembro de 2017 17:17:16
> Assunto: Re: Help creating motorR6-9 examples
>
> Could you run the following command at the top directory,
>> make >& makedump.txt
> and send me the file.
>
> Ron
>
> On 09/12/2017 03:13 PM, Guilherme Jovanini Montagner wrote:
>> Hi again. Yes, I have run make from the top, and after, tried running it again from the child directory.
>>
>> Guilherme Jovanini Montagner
>> +55 19 2517.8911
>> +55 19 99806.9117
>> [email protected]
>>
>> ----- Mensagem original -----
>> De: "Ronald L. Sluiter" <[email protected]>
>> Para: "guilherme" <[email protected]>, "tech-talk" <[email protected]>
>> Enviadas: Terça-feira, 12 de setembro de 2017 17:06:32
>> Assunto: Re: Help creating motorR6-9 examples
>>
>> If you did not run "make" from the top level "motorR6-9" directory, that could
>> be why you are getting these errors. The EPICS motor module, like EPICS base and
>> most other EPICS modules, assumes that "make" is run 1st from the top level
>> directory. After running 'make' from the top level you can make custom changes
>> and taylor the module to your specific needs, but you should run make from the
>> top 1st.
>>
>> Ron
>>
>> On 09/12/2017 02:57 PM, Ronald L. Sluiter wrote:
>>> Hello Guilherme,
>>>
>>> I am guessing that the SoftMotorSrc directory did not get built. If you 'ls'
>>> the SoftMotorSrc directory you should get this;
>>>
>>>> % ls motorApp/SoftMotorSrc
>>>> devSoftAux.cc  devSoft.cc  devSoft.h  devSoftMotor.dbd Makefile  O.Common
>>>> O.linux-x86_64
>>> and there should be a 'devSoftMotor.dbd' file installed in the top 'dbd'
>>> directory.
>>>
>>>> galadriel% ls dbd
>>>> ACRMotorSupport.dbd  devDeltaTau.dbd        devMclennanMotor.dbd
>>>> devNewport.dbd  devPIJena.dbd *devSoftMotor.dbd* MicronixSupport.dbd
>>>> motorSupport.dbd         omsAsynSupport.dbd
>>>> devAcsMotor.dbd      devFaulhaberMotor.dbd  devMicos.dbd devOms.dbd
>>>> devPIMotor.dbd      devSPiiPlus.dbd motorRecord.dbd      NoAsyn.dbd
>>>>         phytron.dbd
>>>> devAerotech.dbd      devImsMotor.dbd        devMicroMo.dbd devOriel.dbd
>>>> devSmarActMCSMotor.dbd  devThorLabs.dbd motorSim.dbd         NoAsynVx.dbd
>>>>         PI_GCS2Support.dbd
>>>> devAttocube.dbd      devKohzuMotor.dbd        devNewFocus.dbd
>>>> devPC6K.dbd      devSmartMotorMotor.dbd  HytecMotorDriver.dbd
>>>> motorSimSupport.dbd  NPointMotorSupport.dbd
>>> What do you see in those two directories?
>>>
>>> Ron
>>>
>>> On 09/12/2017 02:25 PM, Guilherme Jovanini Montagner wrote:
>>>> Hi!
>>>> I'm involved in a Project in which EPICS is to be used, and am currently
>>>> trying to create a working example using a PI piezo controller.
>>>> I want some help doing this.
>>>> I've uncommented the lines
>>>>
>>>> DIRS += motorExApp iocBoot
>>>> motorExApp_DEPEND_DIRS = motorApp
>>>> iocBoot_DEPEND_DIRS = motorExApp
>>>>
>>>> from the top makefile. I've also uncommented the line "MOTOR=$(TOP)" in
>>>> configure/RELEASE file
>>>> Also, on the file motorApp/Makefile, I've got the lines
>>>>
>>>> DIRS +=PIGCS2Src
>>>> PIGCS2Src_DEPEND_DIRS = MotorSrc
>>>>
>>>> uncommented.
>>>>
>>>> The problem is, when I run make on top, I get the following message:
>>>>
>>>> [setup@localhost motorExApp]$ make
>>>> make -C ./NoAsyn install
>>>> make[1]: Entering directory
>>>> `/home/setup/Downloads/support/motor/motorR6-9/motorExApp/NoAsyn'
>>>> make -C O.linux-x86_64 -f ../Makefile TOP=../../.. \
>>>>       T_A=linux-x86_64 install
>>>> make[2]: Entering directory
>>>> `/home/setup/Downloads/support/motor/motorR6-9/motorExApp/NoAsyn/O.linux-x86_64'
>>>> Creating dbd file NoAsyn.dbd
>>>> perl -CSD /home/setup/Downloads/base-3.16.1/bin/linux-x86_64/dbdExpand.pl -I.
>>>> -I.. -I../O.Common -I../../../dbd
>>>> -I/home/setup/Downloads/support/asyn4-31/dbd
>>>> -I/home/setup/Downloads/base-3.16.1/dbd -o NoAsyn.dbd base.dbd
>>>> motorRecord.dbd devSoftMotor.dbd Misc.dbd
>>>> dbdExpand.pl: Can't find file 'devSoftMotor.dbd'
>>>>     while reading 'devSoftMotor.dbd' to create 'NoAsyn.dbd'
>>>>     Your Makefile may need this dependency rule:
>>>>       $(COMMON_DIR)/NoAsyn.dbd: $(COMMON_DIR)/devSoftMotor.dbd
>>>> dbdExpand.pl: Exiting due to errors
>>>> make[2]: *** [../O.Common/NoAsyn.dbd] Error 255
>>>> make[2]: Leaving directory
>>>> `/home/setup/Downloads/support/motor/motorR6-9/motorExApp/NoAsyn/O.linux-x86_64'
>>>> make[1]: *** [install.linux-x86_64] Error 2
>>>> make[1]: Leaving directory
>>>> `/home/setup/Downloads/support/motor/motorR6-9/motorExApp/NoAsyn'
>>>> make: *** [NoAsyn.install] Error 2
>>>>
>>>>
>>>>
>>>> Then, I proceeded to add the mentioned line on motorExApp/NoAsyn/Makefile:
>>>>
>>>> #----------------------------------------
>>>> #
>>>>    ADD MACRO DEFINITIONS AFTER THIS LINE
>>>> #=============================
>>>> $(COMMON_DIR)/NoAsyn.dbd: $(COMMON_DIR)/devSoftMotor.dbd
>>>> PROD_IOC_DEFAULT = NoAsyn
>>>> PROD_IOC_vxWorks = NoAsynVx
>>>>
>>>> COMMONDBDS  = base.dbd
>>>> COMMONDBDS += motorRecord.dbd
>>>> COMMONDBDS += devSoftMotor.dbd
>>>> #!COMMONDBDS += devMXmotor.dbd
>>>>
>>>>
>>>>
>>>> but when I run make again, after doing that, I get the following error:
>>>>
>>>>
>>>>
>>>> [setup@localhost motorExApp]$ make
>>>> make -C ./NoAsyn install
>>>> make[1]: Entering directory
>>>> `/home/setup/Downloads/support/motor/motorR6-9/motorExApp/NoAsyn'
>>>> make -C O.linux-x86_64 -f ../Makefile TOP=../../.. \
>>>>       T_A=linux-x86_64 install
>>>> make[2]: Entering directory
>>>> `/home/setup/Downloads/support/motor/motorR6-9/motorExApp/NoAsyn/O.linux-x86_64'
>>>> Creating dbd file devSoftMotor.dbd
>>>> perl -CSD /home/setup/Downloads/base-3.16.1/bin/linux-x86_64/dbdExpand.pl -I.
>>>> -I.. -I../O.Common -I../../../dbd
>>>> -I/home/setup/Downloads/support/asyn4-31/dbd
>>>> -I/home/setup/Downloads/base-3.16.1/dbd -o devSoftMotor.dbd
>>>> dbdExpand.pl: No input files for devSoftMotor.dbd
>>>> make[2]: *** [../O.Common/devSoftMotor.dbd] Error 255
>>>> make[2]: Leaving directory
>>>> `/home/setup/Downloads/support/motor/motorR6-9/motorExApp/NoAsyn/O.linux-x86_64'
>>>> make[1]: *** [install.linux-x86_64] Error 2
>>>> make[1]: Leaving directory
>>>> `/home/setup/Downloads/support/motor/motorR6-9/motorExApp/NoAsyn'
>>>> make: *** [NoAsyn.install] Error 2
>>>> [setup@localhost motorExApp]$
>>>>
>>>> I don't know where is this devSoftMotor.dbd being called, and why it doesn't
>>>> have input arguments.
>>>>
>>>> Could you help me, please?
>>>> Thanks,
>>>> Guilherme
>>>>
>>>>
>>>> *Guilherme Jovanini Montagner*
>>>> +55 19 2517.8911
>>>> +55 19 99806.9117
>>>> [email protected]
>>>>
>>>> --------------------------------------------------------------------------------

Replies:
Re: Help creating motorR6-9 examples Guilherme Jovanini Montagner
References:
Fwd: Re: Help creating motorR6-9 examples Ronald L. Sluiter
Re: Help creating motorR6-9 examples Guilherme Jovanini Montagner
RE: Help creating motorR6-9 examples Mark Rivers
Re: Help creating motorR6-9 examples Guilherme Jovanini Montagner

Navigate by Date:
Prev: Re: Help creating motorR6-9 examples Guilherme Jovanini Montagner
Next: Questions regarding CA protocol specification and phylosophy Diego Sanz
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Help creating motorR6-9 examples Guilherme Jovanini Montagner
Next: Re: Help creating motorR6-9 examples Guilherme Jovanini Montagner
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
ANJ, 21 Dec 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·