1 / 9

Lab #3a State Notation Language

Lab #3a State Notation Language. Lab #3 State Notation Language.

bishop
Download Presentation

Lab #3a State Notation Language

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lab #3a State Notation Language

  2. Lab #3State Notation Language • 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 : • Monitors the state studnt_:OP:stabilizerC • When studnt_:OP:stabilizerC changes from 0 to 1, use the current reading of studnt_:cathodeTempM as the setpoint and maintain that setpoint by varying studnt_:cathodeCurrentC. Proportional Control Algorithm : CTL[T+1] = CTL[T] + (GAIN * (SETPOINT - MEASURED)) • Stop the algorithm when studnt_:OP:stabilizerC goes to 0. • Print messages to studnt_:OP:stabilizerMsg to inform the operator of sequence status. • Test your results using the StripTool.

  3. SNL Development and Test • A skeleton program has been provided for you in ~/ioc/linac/linacApp/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_" • The first time the sequence program runs, you will get the following error : 0xnnnnn (stabilizer): 3 of 4 assigned channels have connected • Use seqShow, seqShow <taskId>, and seqChanShow <taskId> to debug this problem

  4. SNL Development and Test • To load a new version of the state program, use the following commands from the ioc console (instead of rebooting) : • seqShow • td <stabilizer_task_id> • ld < stabilizer.o • seq &stabilizer, "user=studnt_" • Additional helps for the vxWorks shell • Esc k/Esc j - cycles through previous commands • vi commands can be used to edit command line • i - insert; x - delete char • l - move cursor right; h - move cursor left • r - replace single character; R - replace characters

  5. Lab #3bDevelopment Environment

  6. Development Environment • Create a new development area as follows : • Execute the commands cd ~/ioc mkdir example cd example <path>/makeBaseApp.pl -t example example <path>/makeBaseApp.pl -i -t example example where <path> = /usr/local/epics/baseR3.13.1.1/bin/solaris

  7. Development Environment • The first command creates: <top>/ Makefile config/ ... exampleApp src/ ... Db/ ... • The second command creates: <top>/iocBoot Makefile iocexample/ …

  8. Development Environment • Each command can be issued multiple times to create additional iocxxx or xxxApp directories • Examine the following … • example/config/RELEASE • exampleApp/src/baseLIBOBJS • exampleApp/src/base.dbd • exampleApp/src/exampleInclude.dbd • exampleApp/src/Makefile.Host • exampleApp/src/Makefile.Vx • exampleApp/Db/dbExample* • exampleApp/Db/ Makefile.Host

  9. Development Environment • Boot your ioc from this area and familiarize yourself with the example databases and sequence program . • example/iocBoot/iocexample/st.cmd

More Related