Giter Site home page Giter Site logo

matlab_ca's Introduction

Matlab CA

matlab_ca aka MCA is an EPICS ChannelAccess client interface for Matlab.

See https://controlssoftware.sns.ornl.gov/mca/

Usage

After successful setup (see below), you should be able to use the online help:

>> help mca/matlab
MCAALARM     - read alarm status and severity for PVs previously read with MCAGET or MCAMON
MCACACHE     - reads locally cached value of a PV. 
MCACHECK     - Same as MCASTATE
MCACHECKOPEN - returns handle(s) to PV(s)
MCACLEARMON  - uninstall monitors, previously installed with MCAMON
MCACLOSE     - permanently closes channels
MCAEXIT      - Shut down channel access...
MCAGET       - read values from PV's
MCAINFO      - get connection status and other information about a PV 
MCAISOPEN    - Check if a channel to a PV is open with MCAOPEN
MCAMON       - install or replace monitor on a PV
MCAMONEVENTS - returns the number of monitor events which have
MCAMONTIMER  - Controls the initialisation and termination of the MATLAB
MCAOPEN      - open a Channel Access connection to an EPICS Process Variable
MCAPOLL      - poll channel access...
MCAPUT       - Write values to EPICS Process Variables
MCASTATE     - returns an array of connection states for open channels
MCATIME      - read timestamps for PVs previously read with MCAGET or MCAMON
MCATIMEOUT   - set or display MCA timeout setings
MCAUNLOCK    - unlocks the MCAMAIN mex-file 
MCAVERSION   - get version info 

Start reading at help mcaopen, or look at some of the functions in the tests/unit_tests.m file.

Compilation, Setup

In principle, the Matlab mex command takes care of invoking the correct compiler & linker for your platform and your version of Matlab.

In addition, however, we need the proper flags to use the EPICS base includes and libraries.

At the SNS, we use the Makefile, which supports

  make
  make install
  make clean

Then, each user has to execute

    setup.matlab

to include the library and m files for use from within matlab.

System specifics for setups that 'worked' like this:

  • Red Hat Enterprise Linux AS release 3, EPICS R3.14.7, Matlab 7.2 All OK, just define the EPICS_.. and MEX variables listed in the start of the Makefile in the environment.

  • MacOS X 10.4, EPICS R3.14.8.2, Matlab 7.1 and 7.2. To use the default gcc4 which was also used to compile EPICS base: cp /Applications/MATLAB72/bin/mexopts.sh . and edit mexopts.sh: Find the CC=gcc-3.3 and CXX=g++-3.3 lines, and remove the -3.3, so that it's just gcc resp. g++.

Alternate compile scripts

There are several scripts in the alt_compile folder, which various people have created for their site. If the Makefile doesn't work for you, try one of those scripts.

matlab_ca's People

Contributors

kasemir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

matlab_ca's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.