EPICS exampleJava/powerSupply

Release 4.1 - 2016.04.07

Abstract

powerSupply is an example of creating a service that requires a somewhat complicated top level PVStructure. Look at the code for details.

For more information about EPICS generally, please refer to the home page of the Experimental Physics and Industrial Control System.

Table of Contents


Overview

This is an example of creating a service that requires a somewhat complicated top level PVStructure.

The example has a top level pvStructure:

structure
    alarm_t alarm
    time_t timeStamp
    structure power
        double value
    structure voltage
        double value
    structure current
        double value

It is designed to be accessed via a channelPutGet request. The client sets power.value and voltage.value When the record processes it computes current.value. In addition the timeStamp is set to the time when process is called.

Start Example

Start Server

The example can be run on linux as follows:

mrk> pwd
/home/epicsv4/master/exampleCPP/powerSupply/shell
mrk> ./powerSupplyMain

Start Monitor

mrk> pwd
/home/epicsv4/master/exampleCPP/powerSupply/shell
mrk> ./powerSupplyMonitor

Start Client

mrk> pwd
/home/epicsv4/master/exampleCPP/powerSupply/shell
mrk> ./powerSupplyClient

NOTE: The client ends by requesting a voltage of 0. This results in the power supply record thowing an exception. This results in problems including the powerSupplyMonitor no longer updating. Needs investigation.