EPICS Lab 3 a State Notation Language 1999Ph
EPICS Lab #3 a State Notation Language 1999/Ph 514: Lab #3 A : SNL Lab#3 B : Development Environment 1
Lab #3 State Notation Language u u EPICS Real Life Example #3 : It is apparent from previous studies that the cathode temperature requires stabilization. Although this has been accomplished via closed-loop control from the workstation, a better permanent solution is to implement the closed loop control on the ioc using the sequencer. Create a sequence program that : u u Monitors the state studnt_: OP: stabilizer. C When studnt_: OP: stabilizer. C changes from 0 to 1, use the current reading of studnt_: cathode. Temp. M as the setpoint and maintain that setpoint by varying studnt_: cathode. Current. C. Proportional Control Algorithm : CTL[T+1] = CTL[T] + (GAIN * (SETPOINT - MEASURED)) u u u Stop the algorithm when studnt_: OP: stabilizer. C goes to 0. Print messages to studnt_: OP: stabilizer. Msg to inform the operator of sequence status. Test your results using the Strip. Tool. 1999/Ph 514: Lab #3 A : SNL Lab#3 B : Development Environment 2
SNL Development and Test u u EPICS A skeleton program has been provided for you in ~/ioc/linac. App/src/stabilizer. st. After editing this file, type gnumake to compile it. Edit the startup file to remove the # in front of the following lines : #ld < stabilizer. o #seq &stabilizer, "user=studnt_" u The first time the sequence program runs, you will get the following error : 0 xnnnnn (stabilizer): 3 of 4 assigned channels have connected u Use seq. Show, seq. Show <task. Id>, and seq. Chan. Show <task. Id> to debug this problem 1999/Ph 514: Lab #3 A : SNL Lab#3 B : Development Environment 3
SNL Development and Test u To load a new version of the state program, use the following commands from the ioc console (instead of rebooting) : u u u EPICS seq. Show td <stabilizer_task_id> ld < stabilizer. o seq &stabilizer, "user=studnt_" Additional helps for the vx. Works shell u u Esc k/Esc j - cycles through previous commands vi commands can be used to edit command line u u u i - insert; x - delete char l - move cursor right; h - move cursor left r - replace single character; R - replace characters 1999/Ph 514: Lab #3 A : SNL Lab#3 B : Development Environment 4
EPICS Lab #3 b Development Environment 1999/Ph 514: Lab #3 A : SNL Lab#3 B : Development Environment 5
Development Environment u u EPICS Create a new development area as follows : Execute the commands cd ~/ioc mkdir example cd example <path>/make. Base. App. pl -t example <path>/make. Base. App. pl -i -t example where <path> = /usr/local/epics/base. R 3. 1. 1/bin/solaris 1999/Ph 514: Lab #3 A : SNL Lab#3 B : Development Environment 6
Development Environment u EPICS The first command creates: <top>/ Makefile config/. . . example. App src/. . . Db/. . . u The second command creates: <top>/ioc. Boot Makefile iocexample/ … 1999/Ph 514: Lab #3 A : SNL Lab#3 B : Development Environment 7
Development Environment EPICS u Each command can be issued multiple times to create additional iocxxx or xxx. App directories u Examine the following … u example/config/RELEASE u example. App/src/base. LIBOBJS u example. App/src/base. dbd u example. App/src/example. Include. dbd u example. App/src/Makefile. Host u example. App/src/Makefile. Vx u example. App/Db/db. Example* u example. App/Db/ Makefile. Host 1999/Ph 514: Lab #3 A : SNL Lab#3 B : Development Environment 8
Development Environment u EPICS Boot your ioc from this area and familiarize yourself with the example databases and sequence program. u example/ioc. Boot/iocexample/st. cmd 1999/Ph 514: Lab #3 A : SNL Lab#3 B : Development Environment 9
- Slides: 9