Working with an IOC - PowerPoint PPT Presentation

About This Presentation
Title:

Working with an IOC

Description:

... IOC Test Facilities Useful vxWorks routines i - list tasks d - dump memory ld – PowerPoint PPT presentation

Number of Views:52
Avg rating:3.0/5.0
Slides: 9
Provided by: Andrew1599
Learn more at: https://epics.anl.gov
Category:
Tags: ioc | vxworks | working

less

Transcript and Presenter's Notes

Title: Working with an IOC


1
Working with an IOC
  • Marty Kraimer
  • APS

2
Typical Directory Structure for EPICS Applications
  • All directories and files are referenced relative
    to some user-defined lttopgt directory under which
    all IOC related files exist
  • e.g.
  • lttopgt /home/phoebus/STUDNTn/ioc/linac
  • lttopgt /home/phoebus/STUDNTn/ioc/example
  • lttopgt /home/phoebus/STUDNTn/ioc/project
  • /home/phoebus/STUDNTn/ioc/linac is provided for
    you and already contains appropriate .dbd and .db
    files for the IOCs. You will create the other top
    directories during the lab sessions.

3
Directory Structure of lttopgt
  • lttopgt/
  • config/ - configuration and make rules
  • linacApp/ - ioc related source files
  • Db/
  • Makefile.Host - must edit to add database files
  • xxLinacSim.db - Example database file
  • .db - other database files as required
  • src
  • Makefile.Host - Rules to build linacApp.dbd
  • Makefile.Vx
  • Rules to build linacLib
  • Rules to install iocCore and sequencer
  • .c - C files for added device support, records,
    etc
  • .st - sequence programs
  • base.dbd and baseLIBOBJS
  • select components from epics base
  • linacInclude.dbd
  • Specifies additional components to be included in
    linacApp.dbd

4
Directory Structure of lttopgt
  • lttopgt/
  • iocBoot/
  • ioclinac/
  • st.cmd - startup script for vxWorks
  • bin
  • db
  • dbd
  • include
  • lib
  • ...

Install directories created and maintained by
gnumake. Do not edit files in these directories.
5
Connecting to the IOCs Console Port
  • In an xterm window on the Unix workstation
  • cu -l cua/a
  • If vxWorks is running, you now have access to the
    vxWorks shell
  • bootChange - edit boot parameters
  • CTL-X - cause a reboot
  • help - displays vxWorks debugging commands
  • ____ - any global function loaded at boot time
  • If vxWorks is not running, you are interacting
    with a ROM-based debugger
  • p - Print boot parameters
  • c - Change boot parameter
  • _at_ - Start boot process
  • ? - help (shows available commands)

6
Booting an IOC
  • vxWorks Boot Parameters

'.' clear field '-' go to previous field
D quit boot device ei processor number 0
host name phoebus file name
/usr/local/vxWorks/5.3/mv167bp0/vxWorks inet on
ethernet (e) 164.54.8.xxxfffffe00 inet on
backplane (b) host inet (h) 164.54.8.167
gateway inet (g) user (u) ltUSER_IDgt ftp
password (pw) (blank use rsh) ltPASSWORDgt
flags (f) 0x0 target name (tn) iocuspasn
startup script (s) /home/phoebus/STUDNTn/ioc/li
nac/ioclinac/st.cmd other (o)
  • The only parameter you will need to change is
    startup script

7
vxWorks Startup Script
  • A vxWorks startup script is used to load EPICS
    software and databases. The path for the startup
    script is specified in the boot parameters.
  • Typical startup script (st.cmd)

Example vxWorks startup file Following must
be added for many board support packages cd
ltfull path to target bin directorygt lt cdCommands
/ defines appbin, startup / cd appbin ld lt
iocCore / loads ioc system software / ld lt
seq / loads the EPICS sequencer / ld lt
linacLib / loads user specified object code
/ cd startup dbLoadDatabase("../../dbd/linacApp.
dbd") dbLoadRecords("../../db/xxLinacSim.db","use
rstudnt1") iocInit / starts ioc
software / seq bpmTrajectory, "userstudnt0
/ starts a sequence program /
8
IOC Test Facilities
  • Useful vxWorks routines
  • i - list tasks
  • d ltaddressgt - dump memory
  • ld lt filename.o - load object module
  • lkup name - find address of global variable
  • spy - show CPU usage per task
  • Useful EPICS-supplied routines (See Chapter 6
    Application Developers Guide)
  • dbl - list records
  • dbnr - list number of each record type
  • dbpr ltpvnamegt, 5 - print all fields of a
    record
  • dbgf ltpvnamegt - get field value
  • dbpf ltpvnamegt,ltvaluegt -put field value
  • dbior - print driver/device report
  • casr - Channel Access Server Report
  • dbel ltrecord - CA Event list report
  • dbcar - Database CA Report
Write a Comment
User Comments (0)
About PowerShow.com