EPICS installation and testing on win10 and linux

Introduction to EPICS

Experimental Physics and Industrial Control System (EPICS) is a large-scale control software system jointly developed by Los Alamos National Laboratory (LANL) and Argonne National Laboratory (ANL) in the early 1990s. It is distributed and open , Multi-platform, extensible and other features, provides a wealth of control system software development tools, which can be used to establish a distributed control system and perform system integration. EPICS is mostly used in large-scale experimental systems such as particle accelerators and astronomical telescopes, and has now become a control system platform widely used in synchrotron radiation laboratories in the world.
Argonne National Laboratory EPICS official website
EPICS new homepage

System environment and installation package

Win10 64-bit and Win10 come with Linux subsystem
Epics base 7.04.1 or 3.15.8 (stable) installation package
Strawberry Perl for windows installation package

Installation in Windows

Description of EPICS official website
You can configure the required compilation environment through Strawberry Perl or VS community. This article uses MinGW that comes with Strawberry Perl to compile C/C++.

Compilation environment and path settings

Strawberry Perl installation location E:\Strawberry
Epics base File path E:\EPICS\base-7.0.4.1
1. Enter E:\EPICS\base-7.0.4.1\base-R7.0.4.1\startup and modify windows.bat The script is used to uniformly set the compiled environment variables, the things that need to be modified are as follows:

set _auto=yes
set _strawberry_perl_home=E:\Strawberry
set _epics_host_arch=windows-x64-mingw
set _epics_base=E:\EPICS\base-7.0.4.1

At the same time, comment out the two lines of code that set the VS community environment and
add rem in front

set _visual_studio_home=C:\Program Files (x86)\Microsoft Visual Studio 14.0
call "%_visual_studio_home%\VC\vcvarsall.bat" x64

2. Check whether the Win10 environment variable has the ComSpec selected in the figure below. If it is deleted, the compilation will report an error.
System variable cmd3. Add Strawberry path

Add the C bin file path under the Strawberry perl installation path to the windows system variable E:\Strawberry\c\bin
temporarily add

set path=E:\Strawberry\c\bin

Compile Epics base

Win+R open the cmd window and enter E:\EPICS\base-7.0.4.1\base-R7.0.4.1\startup to run the modified windows.bat script to set the compilation environment variables, and you need to re-run each time you restart This script. Exit to gmake under the \base-R7.0.4.1 path. If you have compiled or failed before, use gmake clean install to clean up and compile with gmake, and it will be completed in 10-30 minutes. The successfully compiled interface is as follows:
Epics-gmakeAt the same time , a series of compiled exe files and perl scripts will appear under the path E:\EPICS\base-7.0.4.1\base-R7.0.4.1\bin\windows-x64-mingw . The compilation was successful.

Test and auxiliary tool installation

1. Add Windows environment variables. Add
the path E:\EPICS\base-7.0.4.1\base-R7.0.4.1\bin\windows-x64-mingw to the system variables, so that you can directly call the executable file under the path And perl script
temporary

set path=E:\EPICS\base-7.0.4.1\base-R7.0.4.1\bin\windows-x64-mingw

2. Execute the makeBaseApp.pl script test

makeBaseApp.pl

Epics-makeBaseApp3. IOC creation and testing

#建立test目录
mkdir test
cd test
# 创建testApp的目录
makeBaseApp.pl -t example T01
# 创建IOC boot目录,命名程序名T01
makeBaseApp.pl -i -t example T01
#gmake编译,可能需要再运行一次windows.bat 脚本
gmake
#添加编译好的test\bin\windows-x64-mingw\T01.exe到环境变量里
#外加之前编译的Epic相关和E:\Strawberry\c\bin路径
set path=E:\EPICS\test\bin\windows-x64-mingw;E:\EPICS\base-7.0.4.1\base-R7.0.4.1\bin\windows-x64-mingw;E:\Strawberry\c\bin
# 进入前面test目录下的\icoBoot\iocT01\运行T01 st.cmd脚本
T01 st.cmd
#dbl 查看已有的PV变量 
dbl

Test_T01

Installation under Linux subsystem environment

Epics7.0 official website description
Epics3.15 official website description The
official document interface is
much simpler under Linux system, just install git, just git clone directly

git clone --recursive -b 7.0 https://git.launchpad.net/epics-base base-7.0
cd base-7.0
make

Or unzip base-7.0.4.1.tar.gz , enter the directory make
and add the installation path ${HOME}/EPICS/epics-base to the bashrc file

export EPICS_BASE=${HOME}/EPICS/epics-base
export EPICS_HOST_ARCH=$(${
     
     EPICS_BASE}/startup/EpicsHostArch)
export PATH=${EPICS_BASE}/bin/${EPICS_HOST_ARCH}:${PATH}

test

Enter softIoc, epiics> appears, indicating that the installation is successful, exit to exit the
IOC instance test and common commands caget/caput/camonitor reference link

Reference link

1, the system is installed windows x64 EPICS
2, mounted at the Ubuntu establish and EPICS IOC Example
. 3, CentOS7 mounting EPICS IOC establishing Example Base
. 4, EPICS the Linux / Unbuntu installation instructions (Entry)

Guess you like

Origin blog.csdn.net/VerTicalVerTical/article/details/108712336