EPICS Collaboration Argonne National Laboratory Love Controller Support David Kline

advertisement

EPICS Collaboration

Love Controller Support

David Kline

April 27, 2005

Argonne National Laboratory

Office of Science

U.S. Department of Energy

A U.S. Department of Energy

Office of Science Laboratory

Operated by The University of Chicago

Contents

Overview,

Hardware Configurations,

Communication protocol,

Software Architecture,

• loveApp standalone application,

Reporting (dbior),

MEDM screens,

Distribution,

Improvements,

Acknowledgements,

Pioneering

Science and

Technology

Asyn-based device support for the Love Controller

Office of Science

U.S. Department of Energy

2

Overview

Love Controller,

Instrument to measure voltage, current, pressure, or temperature,

Support models 1600 and 16A,

Communication is through 2-wire RS485,

Device support,

Part of synApps,

Old support based on MPF,

New support based on Asyn,

The echoServer and devMPC were departure points,

Includes an interpose interface,

Standalone application is available,

IP-Octal RS232 and RS485 modules can be used,

Purpose of the new device support,

Use as a learning tool for Asyn-based device support,

Migrate from the unsupported MPF to Asyn,

Appoint one as the owner of the module,

Provide OS independence,

Pioneering

Science and

Technology

Asyn-based device support for the Love Controller

Office of Science

U.S. Department of Energy

3

Hardware Configuration – RS232 <-> RS485

SBS XM-Octal-IO

RS232

TD

RD

B&B Electronics

485LDRC

Converter

RS485

A(-)

B(+)

Love

Controller

Model 1600

1

Pioneering

Science and

Technology

Love

Controller

Model 16A

2

Love

Controller

Model 1600 n-1

Asyn-based device support for the Love Controller

Love

Controller

Model 1600 n

Office of Science

U.S. Department of Energy

4

Hardware Configuration – RS485

SBS XM-Octal-IO

A(-)

B(+)

Love

Controller

Model 1600

1

Pioneering

Science and

Technology

Love

Controller

Model 16A

2

Love

Controller

Model 1600 n-1

Asyn-based device support for the Love Controller

Love

Controller

Model 1600 n

Office of Science

U.S. Department of Energy

5

Communication

2-wire RS485,

Master/slave protocol, command, response messages,

Message format (simple),

- Sent and received as ASCII hex,

- Command:

Read: <STX>L<ADDR><CMD><CS><ETX>

Write: <STX>L<ADDR><CMD><VALUE><CS><ETX>

- Response:

Data: <STX>L<ADDR><DATA><CS><ACK>

Error: <STX>L<ADDR>N<CODE><ACK>

How does device support know commands?

- INP/OUT fields,

“@asyn(PORT,ADDR) CMD MODEL”,

Pioneering

Science and

Technology

Asyn-based device support for the Love Controller

Office of Science

U.S. Department of Energy

6

Software Architecture asynOption asynCommon

AI AO devAsynLove

BI BO interposeLovelink

MBBI asynOctet drvAsynSerialPort interposeEos asynOctetBase asynOctet

Pioneering

Science and

Technology

Asyn-based device support for the Love Controller asyn Port

“S0” asyn Port

“S0”

Office of Science

U.S. Department of Energy

7

loveApp standalone application

Sample application,

New with the release (R3-0-1),

Supports vxWorks and Linux,

Database with PVs for each command,

Pioneering

Science and

Technology

Asyn-based device support for the Love Controller

Office of Science

U.S. Department of Energy

8

Reporting (dbior)

General

Information

Controller Asyn

Command

Access Asyn PV

Name

Pioneering

Science and

Technology

Asyn-based device support for the Love Controller

Office of Science

U.S. Department of Energy

9

MEDM screens

Pioneering

Science and

Technology

Asyn-based device support for the Love Controller

Office of Science

U.S. Department of Energy

10

Distribution

Standard directories,

- Configuration,

Requires Asyn 4-2 and Ipac 2-8,

- Documentation,

Controller and converter Information,

Release notes, known issues,

Wiring diagram,

- Database, record instance files,

- iocBoot for Linux and vxWorks (startup scripts),

- MEDM displays,

Contains the sources,

- devAsynLove.c,

- interposeLovelink.c,

- devLove.cc,

- loveServer.cc,

Pioneering

Science and

Technology

Asyn-based device support for the Love Controller

Office of Science

U.S. Department of Energy

11

Improvements

Current issues,

- Cannot easily debug an individual controller,

- Tight coupling between device support and model type (i.e. INP/OUT),

- Device support controls the command / response processing,

Solutions,

- Develop a multidevice driver,

- Employ different approach to reduce coupling,

Pioneering

Science and

Technology

Asyn-based device support for the Love Controller

Office of Science

U.S. Department of Energy

12

Improvements – Multidevice port driver

Develop a multidevice port driver,

Replaces the existing interposeLovelink layer,

Placed on top of drvAsynSerialPort,

Creates multiple connections to an Asyn port,

Allows connections to individual controllers,

Monitor individual controller communication,

Pioneering

Science and

Technology

Asyn-based device support for the Love Controller

Office of Science

U.S. Department of Energy

13

Improvements – Multidevice port driver

AI AO devLove

BI BO MBBI asynOption

“L0” addr=1 addr=1 addr=3 addr=4 addr=5 asynCommon drvLove asynOctetBase asynOctet asynCommon drvAsynSerialPort interposeEos asynOctetBase asynOctet

Pioneering

Science and

Technology

Asyn-based device support for the Love Controller asyn Port

“L0” asyn Port

“S0”

Office of Science

U.S. Department of Energy

14

Improvements – Different approach

Modify the information supplied to INP/OUT,

“@asyn(PORT,ADDR) function”,

Employ the drvAsynSerialPort and drvLove drivers,

Implement an interface layer to,

- Define a specific interface (i.e. ifaceLove),

- Provide a methods to,

Associate the controller address with a model type,

Read and write a value, setup during record initialization,

- Reduces the need for conditional statements,

- Introducing new model type is cleaner,

Pioneering

Science and

Technology

Asyn-based device support for the Love Controller

Office of Science

U.S. Department of Energy

15

Improvements – Different approach, cont… devLove

BI AI AO BO MBBI

“L0” addr=1 addr=1 addr=3 addr=4

Interface Love ifaceLove addr=5 drvLove asynOctetBase asynOctet asynCommon asyn Port

“L0” asyn Port

“L0” asynOption asynCommon drvAsynSerialPort interposeEos asynOctetBase asynOctet asyn Port

“S0”

16

Pioneering

Science and

Technology

Asyn-based device support for the Love Controller

Office of Science

U.S. Department of Energy

Acknowledgements

Marty Kraimer,

John Maclean,

Ron Sluiter,

Pioneering

Science and

Technology

Asyn-based device support for the Love Controller

Office of Science

U.S. Department of Energy

17

Thank You

EPICS Collaboration

Beamline Controls and Data Acquisition

APS Operations Division

Pioneering

Science and

Technology

Asyn-based device support for the Love Controller

Office of Science

U.S. Department of Energy

18

Download