LMFL(:BYTE-SIZE 8 :AUTHOR "dwr" :QFASLP NIL :LENGTH 2857 :CREATION-DATE 2730916240 :CHARACTERS T :DIRECTORY "PICON-CLASS" :NAME "1-COURSE-NOTEBOOK-INSTRUCTIONS" :TYPE "TEXT" :VERSION 3) Instructions on the preparation of the PICON course notebooks:1) The notebooks are 3-ring binders which have a transparent front cover allowing an insert. We use a 2 page insert. The top is the process systems black page with a rainbow of colors on it, with a hole cut out which allows the word PICON to show through from a white page with just PICON in blue letters.2) The spine of the notebook also allows an insert which is a long black piece of stock with the words: Process Systems Division.3) Inside the note book is the bulk of the material for the class. There are 5 sections in the notebook. Each section is separated from the others by a tabbed divider. SECTION I: Course Schedule Course Announcement (which doubles as a syllabus) Area Amenities SECTION II: PICON Course Notes SECTION III: Course Exercises File Printouts - 1. PICON-ICONS.LISP 2. SQUARE-ROOT-CODE.LISP 3. PICON-KEYBOARD-INPUT.LISP 4. CLASS-ICONS.LISP SECTION IV: RTIME Installation Manual RTIME Users Guide SECTION V: Industry Papers on PICON and AI4) There is a course master notebook which is the instructors guide to teaching PICON. This is essentially the same except is contains notes imbedded in the PICON Course Notes about comments to make during the presentation of the class. This notebook is so labelled. 5) Where all this material exists interms of re-creating or editing it: a) PICON Course Exercises:These files exist on RALPH:PICON-CLASS; with the names:LAB-SESSION-1.TEXTLAB-SESSION-2.TEXTLAB-SESSION-3.TEXTLAB-SESSION-4.TEXTLAB-SESSION-5.TEXTLAB-SESSION-6.TEXTLAB-SESSION-7.TEXTThese files are printable on any printer and are not required to be formatted in any way. These files are the text of the exercises. b) PICON Course Notes:These will not be so easy. There are several files on angel in Cambridge which are BOTEX files which must be formatted. Thefiles are in DWR directory and are called:SLIDE1.BOTEXSLIDE2.BOTEXSLIDE3.BOTEXSLIDE4.BOTEXSLIDE5.BOTEXSLIDE6.BOTEXEach of these then containing a section of the PICON Course Notes.Notice that the Notes are arranged into 6 sections. [Bob Chassell is the expert on BOTEX. He helped me a great deal in learning BOTEX and getting around its problems. I'm sure Bob would help anyone in need. He is also roughly familiar with what I did to create and maintain the Course Notes.]I also have a directory on LMIVAX. The password is OCEAN. There arepertinant files there too so someone may wish to use them. c) Other files:In the PICON-CLASS; directory on RALPH:, there are other files toolike SCHEDULE, CONVENTIONS and LAB-SESSION-MASTER. These have been used to create some documentation.LMFL(:BYTE-SIZE 8 :AUTHOR "dwr" :QFASLP NIL :LENGTH 4728 :CREATION-DATE 2730915550 :CHARACTERS T :DIRECTORY "PICON-CLASS" :NAME "2-COURSE-PRESENTATION-PREPARATION" :TYPE "TEXT" :VERSION 2) This file describes the necessary activities to perform prior to giving the PICON class.1) The course material is as follows:PICON User's Guide. Dave Riddell has a stock of 20 in his office. PICON in Pictures. Dave Riddell has a stock of 30 in his office.PICON Course-Notebook See the instructions in the file named:-- ralph:picon-class;1-course-notebook-instructionsIntroduction to the Lambda -Get these from Education (generallythis manual is sent to each studentbefore the class in order for themto familiarize themseleves with themachine before arriving).ZMACS Quick Reference Guide -Get these from Education.2) The Course schedule is in a file called:-- ralph:picon-class;schedule.text3) The course in exercise intensive. Review the course exercises in the PICON course notebook. You will see that they refer to knowledge base files to be loaded which will correspond to the work they are learning. These files are on the PICON-CLASS; directory on machine RALPH:.1) First, on the education machines, remove the files from the PICON directory, and expunge the directory (this needs to be done on each Education machine prior to the class. The reason is: Each student will use his own local file system rather than the file server DUKE. This created problems in the past, particularly if the network was heavily loaded, or even down. So each student uses his own file system. After each class it is necessary to remove these directories because the students will have created their files on the local machines which are not wanted now.) Also the machines in education have PICON bands on them. These will always be LOD3. This was agreed to by Education - in particular John hotchkiss - who is in charge of these machines. The current bands on these machines are running PICON 1.2 software.2) Next, the PICON software must be put on the machines again. This can be copied from RALPH:PICON; (RALPH:PICON; is the currently released and available software. Old software versions on ralph are in directories appropriatly named)3) Next, load the file "ralph:picon-dev;picon-utilities.lisp" This file contains many usefull functions for manipulating course directories, and other things as well.4) From Lisp, run the function: (update-course-master-directory) This will create a new version of all the course files needed by the students. The directory is called "ralph:picon-class-distribution;" (This directory, by the way, is allowed to be copied to tape and given to customers after the class if they want to take the class material home- There is a disclaimer in it which relieves us of any responsibility to maintain or update it.)5) Next, copy this directory "ralph:picon-class-distribution;" to the education machines. Start with DUKE, then copy everything from DUKE to the rest of the education machines. 6) If necessary, you could make bands for the class. As I already mentioned, bands exist but new ones may need to be made. I have found it far, far, far better to make the bands ahead of time for the class than to let the students do it. Not only does it take a lot of time, since we are using 2X2's it has some nuances which must be explained about the file system and etc. So I aviod it and do it myself. 7) Gina Pallozzi takes care of most of the administrative things to do with the class:1) Registration2) Sending out of confimations to students 3) Course scheduling4) Class room setup - paper, pencils, name tags, etc.5) Doughnuts every morning, Monday afternoon party. 8) You, however, must arrange for the following:1) Any additional supplies in the classroom- board markers, cleaner, etc.2) Getting the course material together:- copying, putting notebooks together, preparing software,- Thursday evening course dinner arrangements, location, reservations, payment, transportation, etc...- Lab assistants - generally I just recruit people who know PICON and are willing. o Mike Levin usually teaches on Wednesday PM at 2:00 - 5about the PICON simulator and modeling. o Lowell Hawkinson usually speaks to the class in Cambridge an 11:00 after the morning session in Andover is finished. o People who know PICON and would assist in Labs: Mike Philipps Lorin Wilde Michelle Skorka Brian Matthews Troy Heindell- Making coffee - usually Bill Powell is the man but on a rare occasion he gets ties up.LMFL(:BYTE-SIZE 8 :AUTHOR "dwr" :QFASLP NIL :LENGTH 5016 :CREATION-DATE 2730918702 :CHARACTERS T :DIRECTORY "PICON-CLASS" :NAME "3-DIRECTORIES-AND-FILES-ON-RALPH" :TYPE "TEXT" :VERSION 1) Directories and file on RALPH:The following is a list of the RALPH system directories at last printing:RALPH: ~; *.*#*Free=29874, Reserved=4, Used=45122 (98 pages used in ) DEBBIE; 13 DIRECTORY! 07/19/86 11:23:01 mike DWR; 2 DIRECTORY! 02/02/86 21:08:42 dwr GUIDE-BETA; 1 DIRECTORY! 05/15/86 09:00:57 dwr IKE; 3 DIRECTORY! 03/19/86 12:51:51 mhd IKE-DEMOS; 1 DIRECTORY! 03/07/86 13:20:35 DWR IKE-RELEASE-1-0; 3 DIRECTORY! 05/16/86 20:12:49 DWR IKE-RELEASE-1-2; 3 DIRECTORY! 07/16/86 15:56:06 dwr MIKE; 12 DIRECTORY! 07/17/86 09:49:48 dwr PICON; 3 DIRECTORY! 03/12/86 16:56:38 dwr PICON-2; 3 DIRECTORY! 07/18/86 14:07:14 wsp PICON-BACKUP; 3 DIRECTORY! 03/07/86 14:08:44 DWR PICON-CLASS; 3 DIRECTORY! 02/04/86 15:31:34 dwr PICON-CLASS-DISTRIBUTION; 2 DIRECTORY! 06/20/86 16:06:56 joed PICON-DEMOS; 2 DIRECTORY! 03/07/86 13:11:22 DWR PICON-DEV; 4 DIRECTORY! 03/07/86 13:11:50 DWR PICON-PAST-CLASSES; 3 DIRECTORY! 05/09/86 05:48:38 DWR PICON-RELEASE-1-0; 3 DIRECTORY! 05/20/86 13:37:20 DWR PICON-RELEASE-1-2; 3 DIRECTORY! 07/16/86 16:00:17 dwr PICON-TEST; 1 DIRECTORY! 03/08/86 16:06:57 DWR PICON-USER; 5 DIRECTORY! 03/07/86 13:11:31 DWR PIKE; 4 DIRECTORY! 02/16/86 14:19:06 dwr PIKE-2; 5 DIRECTORY! 07/02/86 13:18:26 WSP PIKE-RELEASE-1-0; 5 DIRECTORY! 05/20/86 14:16:20 dwr QL; 2 DIRECTORY! 12/25/85 11:21:11 gd RMW; 2 DIRECTORY! 02/04/86 14:52:43 dwr TAH; 1 DIRECTORY! 05/16/86 12:48:22 hotchkiss TAHBAK; 1 DIRECTORY! 07/17/86 13:17:52 troy TIGER-QUEUE; 3 DIRECTORY! 12/25/85 11:21:05 gdDEBBIE;Debbie Ellerin's directoryDWR;My stuff.GUIDE-BETA;LMI Guide software for teaching PICON classif so desired. I never used it to teach PICON.IKE;Is the currently released 1.2 version of theIKE software.IKE-DEMOS;IKE knowledge base demo files which wouldbe suitable for customer demos.IKE-RELEASE-1-0;1.0 released version of IKE stored as a backup.IKE-RELEASE-1-2;1.2 released version of IKE stored as a backup.MIKE;Mike Phillips personal directory for backup.PICON;The currently released version of 1.2 Software.PICON-2;??PICON-BACKUP;Duplicate copy of PICON;PICON-CLASS;PICON course software and text files.PICON-CLASS-DISTRIBUTION;Only the subset of files from PICON-CLASS which students need to do their exercises. This directory gets files from running the function:update-course-master-directory whichis found iun the file:ralph:picon-dev;picon-utilities.lispPICON-DEMOS;PICON knowledge base file which are suitable forcustomer demonstrations of PICON.PICON-DEV;This directory contains mainly my personally developed code for various things. Mainly thedevelopment of active gauges for PICON are hereas well as many other things. PICON-DEV is simplyshort for picon-development-work.PICON-PAST-CLASSES;This directory holds a menagerie of files, most ofwhich are knowledge bases, which students in previousclasses have created. I kept them for examples.PICON-RELEASE-1-0;This is the release 1.0 version of PICON.PICON-RELEASE-1-2;This is the release 1.2 version of PICON.PICON-TEST;This directory contains a series of knowledge basesto load and run which will provide some level oftest cases to insure a good functioning PICON. Theseare not all inclusive but provide a basic foundation.PICON-USER;Many times I have dome or customers have come and donework here in Andover. This directory contains lots ofbits-and-pieces of work a variety of people have done.PIKE;This is the current version of the software namely 1.2PIKE-2;This is the experimental 2.0 version of PICON and IKE.PIKE-RELEASE-1-0;This is 1.0 PICON and IKE.QL;I do not have a full complement of lisp sources on RALPH.There was no need to do it so I just avoided the headache.There are some lisp sources though in the QL; directory.RMW;Rob Wojcik's old directory with much work on the IKE coursebeing represented here.TAH;Troy HiendellTAHBAK;Good idea to backup but might want to do it on anothermachine.LMFL(:BYTE-SIZE 16 :AUTHOR "bat" :CHARACTERS NIL :QFASLP NIL :LENGTH 4317 :CREATION-DATE 2734620527 :DIRECTORY "PICON-CLASS" :NAME "BATEX-12" :TYPE "PIC" :VERSION 1) hưs2Dp,lFASD-DATADbatAliceFfFDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB 1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE MAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK BMDBNWJBBATCNEXT-NEW-STATEMENT-NUMBERF*CFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDEXERCISE-12FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?Exercise 121DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBqDBK MBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDByDBK MBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDBDBK MBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK MBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK MBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK MBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK MBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK MBMBN1DBIDBJDCDEFINITIOND BK ًBMBXÁSTATEMENT-TEXTDDC=DTANK-IS-NOT-FILLINGCCONDITIONNILlet tank-is-not-filling be a named conditionCSTATEMENT-NUMBER?F$BACKTRACK-TO-GET-VALUE?B-1DBIDBJDBD BK ׋BMBXBDDBDCEMPTY-TIMENUMERICBlet empty-time be a numeric variableBF"BB1DBIDBJDBD BK RBMBNBDDBDÀTIMERBB,let timer be a numeric variableBFBBSAMPLING-INTERVAL-FOR-HISTORIC-REASONS?CINDEFINITE1DBIDBJDBD BK RBMBNBDDBDTANK-IS-FILLINGBB,let tank-is-filling be a named conditionBFBB-1DBIDBJDBD BK RBMBNBDDBDCFILL-TIMEBBlet fill-time be a numeric variableBFBBBB1DBIDBJDBD BK RBMBNBDDBDÁTIMER-STARTEDBBlet timer-started be a named conditionBFBB-1DBIDBJDBD BK RBMBNBDDBDÁTIMER-RUNNINGBBlet timer-running be a named conditionBFBB-1DBIDBJDBD BK -RBMBNBDDBDCFILL-TIMERBBlet fill-timer be a numeric variableBFBB1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBFRFnFFnDDCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBfMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDFREE-TEXT-STATEMENTDBK 7RBMBNBl3BFB-F.FFFDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFF.FFFDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTB$B-F#FFFB)DB!DB"B$B-B%DB&DBIDBJDIF-THEN-RULED BK BMBXBDB&CGAP-VALUEif tank-is-filling then increment fill-time by 10 seconds ...DBJDF:B-BF%B-F FF,FDDB5DGAPS-IN-TEXTDDF:B6BB7F7F FF,FDDB>DB?B$B-FFF$FBMDB!DB"B$B-B%DB&DBIDBJDBJDBK ؋BMBXBDDCIFBDDCINCREMENTBDF INTERVALif tank-is-not-filling then increment empty-time by 10 secondsBF#B-F F F6F DDB5DB6BB7F7F F F6F DDB>DB?B$B-FFF.FB|DB!DB"B$B-B%DB&DBIDBJDBJDBK ׋BMBXBDDBtDNOTBDDSENDD,Empty time = ~6FBDDESTINATIONOPERATOR,if not tank-is-not-filling thensend "Empty time = ***" with empty-time to operatorBF!B-F F:FFDDB5DB6BB7FF F:FFDDB>DB?B$B-FF4FF'BDB>DB?B$B-FF$FFBDB!DB"B$B-B%DB&DBIDBJDBJD BK BMBXBDDBtDCDB?B$B-FF`FPFSBDB>DB?B$B-FFPFZFCBDDIFFERENTIAL-PRESSURE-LEVEL-PORT-SENSORDSENSOR-CURRENCY-INTERVALF SENSOR-TRACING-REQUESTSB-FFfFFÀCLOCKDACCUMULATORBF2F,FdF^TANKDB!DB"B$B-B%DB&DBIDBJDB'DBK 7RBMBNBl4BFB-F.FFFvDDB5DB6BB7FF.FFFvDDB>DB?B$B-F#FFFyBDB!DB"B$B-B%DB&DBIDBJDB'DBK 7RBMBNBl2BFB-F.FFFDDB5DB6BB7FF.FFFDDB>DB?B$B-F#FFFB-DB!DB"B$B-B%DB&DBIDBJDB'DBK 7RBMBNBl1BFB-F-F!FF DDB5DB6BB7FF-F!FF DDB>DB?B$B-F"FFFBJDB!DB"B$B-B%DB&DBIDBJDINITIAL-RULEDBK ׋BMDBNBXBDDCINITIALLYDDSETBDBjBlinitially set fill-time = 0 and set empty-time = 0BF B-F FFFvDDB5DB6BB7FF FFFvDDB>DB?B$B-FFFFyBqDB!DB"B$B-B%DB&DBIDBJDBJDBK BMDBNBWBDDBtDBBDDBD,Fill time = ~6FBDBBif not tank-is-filling thenlsend "Fill time = ***" with fill-time to operatorBFB-F FFFDDB5DB6BB7FF FFFDDB>DB?B$B-FFFFBDB>DB?B$B-FFFFBDB!DB"B$B-B%DB&DBIDBJDBJD BK 8BMBNBDDBtDC>BDBBF DDBBDDBBif L1 > L1 as of 10 seconds ago then conclude tank-is-filling lelse conclude not tank-is-fillingBFBF B-F F!F3FDDB5DB6BB7FF F!F3FDDB>DB?B$B-FFF+FBDB>DB?B$B-FF F5FBDBDBF BB-FFeFFBDB!DB"B$B-B%DB&DBIDBJDBJD BK QBMBNBDDBtDBBBif CLOCK > 0 then do nothingBF BF B-FF6FFLDDB5DB6BB7FFF6FFLDDB>DB?B$B-FF<FFIBDB!DB"B$B-B%DB&DBIDBJDB'DBK xBMBNBExercise #12BFB-F3FLFF6DDB5DB6BB7FF3FLFF6DDB>DB?B$B-F(FFFF9BDB!DB"B$B-B%DB&DBIDBJDSIMULATION-STATEMENTDBK RBMBNBDDSIMULATEBBTIME,simulate clock with timeBF B-FF5F$FKDDB5DB6BB7FFF5F$FKDDB>DB?B$B-FF;F,FHB5DB!DB"B$B-B%DB&DBIDBJDB0DBK {BMDBNBWBDDB2BDBtDBB3F,DC+BDBtDBB3FXFKDMAXDC-B}33simulate L1 with 0 then if time < 300 then (L1 + .25) else if time < 600 then 75 else lmax (0, L1 - .15)BFB-FFFF'DDB5DB6BB7FFFFF'DDB>DB?B$B-FFFFBfDB>DB?B$B-FFFFBgDB>DB?B$B-FFF\F$BhDDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFDCFLOW-PIPEBBFBÂACCUMULATOR-MAIN-INPUTFDBBFBACCUMULATOR-MAIN-OUTPUTBFDBBFF ACCUMULATOR-METER-OUTPUTCPORT-SENSOR-INPUTF%DBBF BBBFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "DWR" :CHARACTERS NIL :QFASLP NIL :LENGTH 9330 :CREATION-DATE 2728669978 :DIRECTORY "PICON-CLASS" :NAME "CASE-1-SOLUTION" :TYPE "PIC" :VERSION 6) hưs2Dp,lFASD-DATADKCA,Higgins4FfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB 1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE KAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK BMDBNKCACNEXT-NEW-STATEMENT-NUMBERFwCFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDCASE-1-SOLUTIONFONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?,Case Study 1 - Solution1DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBpDBK KBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBxDBK KBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDBDBK KBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK KBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK KBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK '=BMBNMESSAGE-MUST-PRINT-INTERVALF1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK KBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK KBMBN1DBIDBJDCDEFINITIOND BK HBMBNÁSTATEMENT-TEXTDDC=DÃTANK-LEVEL-IS-DANGEROUSLY-HIGHCCONDITIONNIL,let tank-level-is-dangerously-high be a named conditionCSTATEMENT-NUMBER?FtBACKTRACK-TO-GET-VALUE?B-1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBF( FFv FD0DCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBeMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDIF-THEN-RULED BK 8BMBNBDDCIFDC>ÀCLOCKFDDSENDDThe simulation has completed.DDESTINATIONOPERATORif CLOCK > 2000 then ,send "The simulation has completed." to operatorBFvPICON-RULE-SCAN-INTERVALF<B-FFFFDDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFFFFDDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FF$F F1BDBDBBB-FF4FFABDBDBBB-BDBDBIDBJDBDBK HBMBNBDDBDANDBÂTHERE-IS-INCOMING-FLOWDDBDlTank level is above safety limit and is stillincreasing.DBBCEVERY-TIMEif tank-level-is-dangerously-high and there-is-incoming-flow,then send "Tank level is above safety limit and is stillincreasing." to operator every timeBFsB-FFpFF:DDBDBBBFFFpFF:DDBDBBB-FFjFF]BDBDBBB-FFZFFMBDBDBBB-FFJFF=BDBDBBB-BDBDBIDBJDBD BK BMDBNBWBDDBDBBDBDC+CF1CF2CF3let condition there-is-incoming-flow = F1 + F2 > F3BFuBB-B-FF"FF DDBDBBBFFF"FF DDBDBBB-FFFFBLDBDBBB-BDBDBIDBJDBD BK HBMBNBDDBDBCL1TANK-LEVEL-SAFETY-LIMITDDBDTank level: ~6F is over safety limit of ~6FBjBkDBBF<DCONCLUDEBif L1 > tank-level-safety-limit then lsend "Tank level: *** is over safety limit of ***", with L1, tank-level-safety-limit to operator every 1 minute and,conclude tank-level-is-dangerously-highBFqBF<CPICON-RULE-ALERT-INTERVALFB-FFFFDDBDBBBFFFFFDDBDBBB-FFF{FBvDBDBBB-FFFFBwDBDBBB-FFF FBxDBDBBB-FFFFByDBDBBB-FFFZFBzDBDBBB-BDBDBIDBJDBD BK HBMBNBDDBBkF|tank-level-safety-limit = 380BFpBB-B-FFFFDDBDBBBFFFFFDDBDBBB-FF FFBDBDBBB-BDBDBIDBJDBD BK HBMBNBDDBDBBGFdDDBD F2 is reading ~6F and should not exceed 100BGDBBlif F2 > 100 then send " F2 is reading *** and should not exceed 100"with F2 to operatorBFnBFB-FFeFF/DDBDBBBFFFeFF/DDBDBBB-FF_F1FRBDBDBBB-FFOFFBBDBDBBB-FF?FF2BDBDBBB-BDBDBIDBJDBD BK HBMBNBDDBDBBFF<DDBD F1 is reading ~6F and should not exceed 60BFDBB,if F1 > 60 then lsend " F1 is reading *** and should not exceed 60"with F1 to operatorBFmBFB-FFFFDDBDBBBFFFFFDDBDBBB-FFF;FBDBDBBB-FFFFBDBDBBB-FFFFBDCNAPH-CHROMATOGRAPH-ANALYTICAL-PORT-SENSORDSENSOR-CURRENCY-INTERVALF SENSOR-TRACING-REQUESTSB-FFF!FBDBDBBB-BDBDBIDBJDSIMULATION-STATEMENTDBK mHBMBNBDDSIMULATECP2DMAXDC*CF4ǀ3e33simulate P2 with 0 then (max ( 0 ,F4 * 12.65))BF(B-FFxF FDDBDBBBFFFxF FDDBDBBB-FF~F FBSDBDBBB-BDBDBIDBJDBD BK BMBNBDDBDBBBif clock > 0 then do nothingBFBF B-F F{FFeDDBDBBBFF F{FFeDDBDBBB-F FuFFhBtDBDBBB-BDBDBIDBJDBD BK CBMBNBDDBDBBIBlif P2 > 0 then do nothingBFiBF B-F FFFDDBDBBBFF FFFDDBDBBB-F FFFBDBDBBB-BDBDBIDBJDBD BK  BMBNBDDBDBCP1Blif P1 > 0 then do nothingBF*BF B-F FFFDDBDBBBFF FFFDDBDBBB-F FFFBDBDBBB-BDBDBIDBJDBD BK  BMBNBDDBDBBNBlif F4 > 0 then do nothingBF)BF B-F FFFDDBDBBBFF FFFDDBDBBB-F FFFBDBDBBB-BDBDBIDBJDBD BK BMBNBDDBDBBIBlif F3 > 0 then do nothingBF!BF B-F FFFDDBDBBBFF FFFDDBDBBB-F F FFBDBDBBB-BDBDBIDBJDBD BK CBMBNBDDBDBBGBlif F2 > 0 then do nothingBFBF B-F F6FF DDBDBBBFF F6FF DDBDBBB-F F0FF#BDBDBBB-BDBDBIDBJDBD BK CBMBNBDDBDBBFBlif F1 > 0 then do nothingBFBF B-F F[FFEDDBDBBBFF F[FFEDDBDBBB-F FUFFHBADBDBBB-BDBDBIDBJDBD BK BMBNBDDBDBBjBlif L1 > 0 then do nothingBFBF B-F FFFkDDBDBBBFF FFFkDDBDBBB-F F{FFnBcDBDBBB-BDBDBIDBJDFREE-TEXT-STATEMENTDBK MBMBNBDlThe purpose of these rules is to force thedisplaying of sensor values on the schematicBF_B-F FFFDDBDBBBFF FFFDDBDBBB-F FF FBDBDBBB-Fw FFFBDBDBBB-BDBDBIDBJDBFDBK 18BMBNBDDBHCTEMP-STARTBFPsimulate temp-start with 80BF.B-FFF FDDBDBBBFFFF FDDBDBBB-FFF FBDBDBBB-BDBDBIDBJDBFDBK CBMBNBDDBHSIM-TANK-AREA-2Bǀplsimulate sim-tank-area-2 with 3.5BFjB-FQFoF FDDBDBBBFFQFoF FDDBDBBB-F\FuF FBDBDBBB-BDBDBIDBJDBFDBK N=BMBNBDDBHÁSIM-TANK-AREABǀ@ ,simulate sim-tank-area with 2.02BFWB-FZFFF F\DDBDBBBFFZFFF F\DDBDBBB-FeFLF FYBDBDBBB-BDBDBIDBJDBFDBK p8BMBNBDDBHBTIME,simulate clock with 0 then timeBFB-FcFF F5DDBDBBBFFcFF F5DDBDBBB-FnF%F F2BDBDBBB-BDBDBIDBJDBFDBK 98BMBNBDDBHCTEMP-WAVEBDCPICON-WAVEFFFpF`T,simulate local temp-wave with wave with centrallvalue 2000 and deviation 2000 and period 8 hours ,and phase 21600BF-B-FFF F DDBDBBBFFFF F DDBDBBB-FFFc FB6DBDBBB-FFF FB7DBDBBB-FFFRFB8DBDBBB-BDBDBIDBJDBFDBK CBMBNBDDBHBDBMǀPBIlsimulate P1 with 0 then (2.5 * F3)BF\B-FKFF FDDBDBBBFFKFF FDDBDBBB-FVFF FBfDBDBBB-BDBDBIDBJDBFDBK ]HBMBNBDDBHF3-WAVEBDB-FPF<ǀ3S33simulate local f3-wave with wave with centralvalue 80 and deviation 0 and period 1 minute and noise 1.3BFkB-FF(F F^DDBDBBBFFF(F F^DDBDBBB-FF.Fx F;BDBDBBB-FF>F FKBDBDBBB-FFNFgF[BDBDBBB-BDBDBIDBJDBFDBK mHBMBNBDDBHBNDBKDC-BIǀVsimulate F4 with 0 then (max ( 0, f3 - .021))BF'B-FFF F DDBDBBBFFFF F DDBDBBB-FFF FBDBDBBB-BDBDBIDBJDBFDBK \HBMBNBDDBHBIDBDCBMBNB,Chemical Mixing ProcessBF%B-F'FFFFDDBDBBBFF'FFFFDDBDBBB-FFFNFBDÁMATERIAL-SINKBFFlF5FÀTANK-2DCGUAGE-PRESSURE-THRU-SENSORDB?B-FFFFBIDÁHEAT-EXCHANGERBFlFFFÀCOOLERDBDB?B-F>FF\FBNDMATERIAL-SOURCEBF>FFFaÀMIX-2DCCENTRIFUGAL-VARIABLE-COMPUTER-PUMPBFF"FFJÀPUMP-2DBDB?B-FFFFDBIDTWO-INPUT-MIXED-TANKBF)F|FeF"ÀTANK-1DB<DB?B-B=FFhFFFzBjDB*DB?B-FFFFOBDEQUAL-PERCENTAGE-VARIABLE-CONTROL-VALVEBF<FFF_CV1DBDB?B-FFFpF]BFDBEBFFoFFGÀPUMP-1DB>BFBFFF0ÀMIX-1DDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFDCFLOW-PIPEBFF)ÃTHRU-SENSOR-OUTPUT-CONNECTIONMIXED-TANK-INPUT-PORT-2FTDBBFBBBFDBBF'FÂPUMP-OUTPUT-CONNECTIONTHRU-SENSOR-INPUT-CONNECTIONBDBBF BBBFDBBF$F HEAT-TRANSFER-OUTPUT-PORT-1CPORT-SENSOR-INPUTBDBBBF,BVALVE-CONTROL-CONNECTIONFDBBF*BBBFDBBBF'BCPUMP-CONTROLLER-CONNECTIONFDBBF#F"BSINK-INPUT-PORTF2DBBF#BBBFDBBBF$BCHEAT-TRANSFER-INPUT-PORT-1FDBBF$F%HEAT-TRANSFER-OUTPUT-PORT-2BBDBBF+F$BCHEAT-TRANSFER-INPUT-PORT-2DFFvFF@DBBF%F#BBBDBBF%BBBFDBBF&F'HOLDER-OUTPUT-CONNECTIONÂPUMP-INPUT-CONNECTIONBDBBF(F+BBBDBBF(BBBFDBBF)F(BBBDBBBF*BBDF!F DBBF+BBBFDBBF,F)VALVE-OUTPUT-CONNECTIONMIXED-TANK-INPUT-PORT-1BDBBF-F,BÂVALVE-INPUT-CONNECTIONBDBBF-BBBFDBBBF.BBFDBBF.F-BBBDBBF/F.BBBB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "dwr" :CHARACTERS NIL :QFASLP NIL :LENGTH 12508 :CREATION-DATE 2725678310 :DIRECTORY "PICON-CLASS" :NAME "CASE-2-SOLUTION" :TYPE "PIC" :VERSION 2) hưs2Dp,lFASD-DATADdwrRalphvFfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB 3@1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE KAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK 2@BMBNCNEXT-NEW-STATEMENT-NUMBERFCFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?,Case Study 2 - Solution1DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBkDBK KBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBsDBK KBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB{DBK KBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK KBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK KBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK '=BMBNMESSAGE-MUST-PRINT-INTERVALF1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK KBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK KBMBN1DBIDBJDCDEFINITIOND BK @BMBNÁSTATEMENT-TEXTDDC=DTANK-IS-FILLINGCCONDITIONNIL,let tank-is-filling be a named conditionCSTATEMENT-NUMBER?FBACKTRACK-TO-GET-VALUE?B-1DBIDBJDBD BK @BMBNBDDBDTANK-IS-DRAININGBBllet tank-is-draining be a named conditionBFBB-1DBIDBJDBD BK HBMBNBDDBDÃTANK-LEVEL-IS-DANGEROUSLY-HIGHBB,let tank-level-is-dangerously-high be a named conditionBFtBB-1DBIDBJDBD BK @BMBNBDDBDCFILL-TIMENUMERICBlet fill-time be a numeric variableBF}BB1DBIDBJDBD BK @BMBNBDDBDCDRAIN-TIMEBBlet drain-time be a numeric variableBF~BB1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBF F F F D@DCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpB`MEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDSIMULATION-STATEMENTDBK 2@BMBNBDDSIMULATECF4DC/DC*CF3DCCOMPOUND-VARIABLECL2SETPOINTDMAXFBsimulate F4 with 0 then F3 * L2 setpoint / max (1, L2)BF'B-FFF FDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFFF FDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FFF FBDBDBBB-BDBDBIDBJDIF-THEN-RULED BK )@BMBNBDDCIFDC>BFdDDSET-SETPOINTBF2DDB7BFdlif L2 > 100 then set L2 setpoint = 50 elseset L2 setpoint = 100BFPICON-RULE-SCAN-INTERVALFB-FF FF0DDBDBBBFFF FF0DDB%DB&BB-F%FFFB?DB%DB&BB-F4F FF-B@DBDBBB-BDBDBIDBJDBDBK '@BMBNBDDBCP2DBBDBBDBBB,simulate P2 with 0 then F3 * (L2 / L2 setpoint)BF(B-FFlF FDDBDBBBFFFlF FDDB%DB&BB-FFrF FBlDBDBBB-BDBDBIDBJDBDBK 98BMBNBDDBCTEMP-WAVEBDCPICON-WAVEFFFpF`T,simulate local temp-wave with wave with centrallvalue 2000 and deviation 2000 and period 8 hours ,and phase 21600BF-B-FFF FDDBDBBBFFFF FDDB%DB&BB-FFFg FBDB%DB&BB-FFF FBDB%DB&BB-FFFVFBDBDBBB-BDBDBIDBJDBDBK HBMBNBD DBCL1DB3DCF)BDB%DB&BB-FvF&FFBDB%DB&BB-FvFF F BDB%DB&BB-FvFF FBDB%DB&BB-FvFFzFBDB%DB&BB-FvFFMFBDB%DB&BB-FvFF FBDB%DB&BB-FvFF FBDB%DB&BB-FvFFFBDBDBBB-BDBDBIDBJDBDBK 18BMBNBDDBCTEMP-STARTBFPsimulate temp-start with 80BF.B-FFF FDDBDBBBFFFF FDDB%DB&BB-FFF FB?DBDBBB-BDBDBIDBJDBDBK CBMBNBDDBBBǀplsimulate sim-tank-area-2 with 3.5BFjB-FQFF FDDBDBBBFFQFF FDDB%DB&BB-F\FF FB_DBDBBB-BDBDBIDBJDBDBK N=BMBNBDDBBBǀ@ ,simulate sim-tank-area with 2.02BFWB-FZF`F FvDDBDBBBFFZF`F FvDDB%DB&BB-FeFfF FsBDBDBBB-BDBDBIDBJDBDBK p8BMBNBDDBÀCLOCKB,simulate clock with 0 then timeBFB-FcF6F FLDDBDBBBFFcF6F FLDDB%DB&BB-FnF<F FIBDBDBBB-BDBDBIDBJDBDBK !@BMBNBDDBTANK-2-AREABsimulate tank-2-area with 1.12BFzB-FmF F F"DDBDBBBFFmF F F"DDB%DB&BB-FxFF FBDBDBBB-BDBDBIDBJDBDBK "@BMBNBDDBBDBDBDBBBFB,simulate L2 with 0 then ( F4 / tank-2-area) / 3600 + L2BFwB-FFF FDDBDBBBFFFF FDDB%DB&BB-FFF FBDBDBBB-BDBDBIDBJDB1DBK @BMBNBDDB3DANDDNOTBDCISCFILL-STAGEDRAININGDDADVANCEBUNKNOWNDSENDDDrain time was: ~6FBDDESTINATIONLOG,if not tank-is-draining and fill-stage is draining then,advance step variable fill-stage to unknown andlsend "Drain time was: ***" with drain-time to logBFB-FFCFF DDBDBBBFFFCFF DDB%DB&BB-F%F=FF0BDB%DB&BB-F4F-FF BDB%DB&BB-F4FFFBDBDBBB-BDBDBIDBJDB1DBK @BMBNBDDB3DBDBBDBBFILLINGDDB BB DBDlFill time was: ~6FBDBBif not tank-is-filling and fill-stage is filling thenB,send "Fill time was: ***" with fill-time to logBFB-FFF FRDDBDBBBFFFF FRDDB%DB&BB-F&FFFuBNDB%DB&BB-F5FrFFeBDB%DB&BB-F5FbFFUBODBDBBB-BDBDBIDBJDB1DBK @BMBNBDDB3BDDCINCREMENTBFif tank-is-draining then increment drain-time by 30BFB-FFFFDDBDBBBFFFFFDDB%DB&BB-F%FFFB~DBDBBB-BDBDBIDBJDB1DBK @BMBNBDDB3BDDByBFlif tank-is-filling then increment fill-time by 30BFB-FFFFDDBDBBBFFFFFDDB%DB&BB-F%FFFBDBDBBB-BDBDBIDBJDB1D BK @BMBNBDDB3DBBDÁDELAYED-VALUEBFDDCONCLUDEBDB BBDDCONCLUDE-NOTBif L1 < L1 as of 30 seconds ago then,conclude tank-is-draining and advance step variable fill-stage to draining else conclude not tank-is-drainingBFBCFB-FFFrFDDBDBBBFOFFFrFDDB%DB&BB-F%F FhFBDB%DB&BB-F4FFjFBDB%DB&BB-F4FFFBDBDBBB-BDBDBIDBJDB1D BK @BMBNBDDB3DB4BDBBFDDBBDB BBDDDBBif L1 > L1 as of 30 seconds ago thenconclude tank-is-filling and advance step variable fill-stage to filling else conclude not tank-is-fillingBFBCFB-FFNFiFDDBDBBBFFFNFiFDDB%DB&BB-F%FHFhF;BDB%DB&BB-F4F8FaF+BDB%DB&BB-F4F(FFBDBDBBB-BDBDBIDBJDBDBK @BMBNBDDSTEP-VARIABLE-DEFINITIONBDBDBB llet step variable fill-stage be filling, draining, unknownBFB-FFpF4FZDDBDBBBFFFpF4FZDDB%DB&BB-F#FjF,F]B0DBDBBB-BDBDBIDBJDINITIAL-RULEDBK @BMBNBDDCINITIALLYDDSETBDBPBlinitially set fill-time = 0 andlset drain-time = 0BF|B-FFFFDDBDBBBFFFFFDDB%DB&BB-F#FF|FBWDB%DB&BB-F2FFFBXDB%DB&BB-F2FFFBYDBDBBB-BDBDBIDBJDBDBK @BMBNBDDBL2-4FDBBBsimulate L2 setpoint with 250 then L2 setpointBFxB-FFF FDDBDBBBFFFF FDDB%DB&BB-FFF FBDBDBBB-BDBDBIDBJDBDBK CBMBNBDDBCP1DBǀPBlsimulate P1 with 0 then (2.5 * F3)BF\B-FJFF FDDBDBBBFFJFF FDDB%DB&BB-FUFF FBDBDBBB-BDBDBIDBJDB1D BK ?BMBNBDDB3DB4BBlif L2 > 0 then do nothingBF{BCF B-F FTFF>DDBDBBBFF FTFF>DDB%DB&BB-F FNFFABDCGUAGE-PRESSURE-THRU-SENSORDSENSOR-TRACING-REQUESTSB-F FF+FBfDMAGNETIC-FLOWMETER-FLOW-THRU-SENSORDBB-FFFFBDCR-L-1-IN-1-OUT-FEEDBACK-CONTROLLERD SETPOINT-LOW-LIMIT?SETPOINT-HIGH-LIMIT?FCSETPOINT-MINIMUM-INTERVAL-BETWEEN-CHANGES?F SETPOINT-MAXIMUM-CHANGE-PER-ADJUSTMENT?FdDISPLAY-SETPOINT-VALUESB-F~FFFEBDDIFFERENTIAL-PRESSURE-LEVEL-PORT-SENSORDBB-SENSOR-CURRENCY-INTERVALFFFKF FiBDÁMATERIAL-SINKBFFFFÀTANK-2DÃLINEAR-VARIABLE-CONTROL-VALVEBFRFFpFBDBDBBB-BDBDBIDBJDB1D BK 8BMBNBDDB3DB4BFDDBDThe simulation has completed.DBOPERATORif CLOCK > 2000 then ,send "The simulation has completed." to operatorBFvBCF<B-FF FFFDDBDBBBFFF FFFDDB%DB&BB-FF&F F3B(DB%DB&BB-FF6FFCB)DBDBBB-BDBDBIDBJDB1DBK HBMBNBDDB3DBBÂTHERE-IS-INCOMING-FLOWDDBDlTank level is above safety limit and is stillincreasing.DBB#CEVERY-TIMEif tank-level-is-dangerously-high and there-is-incoming-flow,then send "Tank level is above safety limit and is stillincreasing." to operator every timeBFsB-FFnFF8DDBDBBBFFFnFF8DDB%DB&BB-FFhFF[BWDB%DB&BB-FFXFFKBXDB%DB&BB-FFHF~F;BYDBDBBB-BDBDBIDBJDBD BK HBMBNBDDBDBNBDCORDB4BDB4Blet condition there-is-incoming-flow = F1 > 0 lor F2 > 0BFuBB-B-FF F!FDDBDBBBFFF F!FDDB%DB&BB-FFF)F BDB%DB&BB-FF FgFBDBDBBB-BDBDBIDBJDB1D BK HBMBNBDDB3DB4BTANK-LEVEL-SAFETY-LIMITDDBDTank level: ~6F is over safety limit of ~6FBBDBB#F<DBBif L1 > tank-level-safety-limit then lsend "Tank level: *** is over safety limit of ***", with L1, tank-level-safety-limit to operator every 1 minute and,conclude tank-level-is-dangerously-highBFqBCF<CPICON-RULE-ALERT-INTERVALFB-FFFFDDBDBBBFFFFFDDB%DB&BB-FFFzFBDB%DB&BB-FFFFBDB%DB&BB-FFFFBDB%DB&BB-FFFFBDB%DB&BB-FFFYFBDBDBBB-BDBDBIDBJDBD BK HBMBNBDDBBF|tank-level-safety-limit = 380BFpBB-B-FFFFDDBDBBBFFFFFDDB%DB&BB-FFFFBDBDBBB-BDBDBIDBJDB1D BK HBMBNBDDB3DB4BFdDDBD F2 is reading ~6F and should not exceed 100BDBB#lif F2 > 100 then send " F2 is reading *** and should not exceed 100"with F2 to operatorBFnBCFB-FFcFF-DDBDBBBFFFcFF-DDB%DB&BB-FF]F0FPBDB%DB&BB-FFMFF@B DB%DB&BB-FF=FF0B!DBDBBB-BDBDBIDBJDB1D BK HBMBNBDDB3DB4BF<DDBD F1 is reading ~6F and should not exceed 60BDBB#,if F1 > 60 then lsend " F1 is reading *** and should not exceed 60"with F1 to operatorBFmBCFB-FFFF~DDBDBBBFFFFF~DDB%DB&BB-FFF:FBTDB%DB&BB-FFFFBUDB%DB&BB-FFFFBVDCNAPH-CHROMATOGRAPH-ANALYTICAL-PORT-SENSORDB F BB-FFF"FBDBDBBB-BDBDBIDBJDB1D BK BMBNBDDB3DB4BBif clock > 0 then do nothingBFBCF B-F FyFFcDDBDBBBFF FyFFcDDB%DB&BB-F FsFFfBDBDBBB-BDBDBIDBJDB1D BK CBMBNBDDB3DB4BfBlif P2 > 0 then do nothingBFiBCF B-F FFFDDBDBBBFF FFFDDB%DB&BB-F FFFBDBDBBB-BDBDBIDBJDB1D BK  BMBNBDDB3DB4BBlif P1 > 0 then do nothingBF*BCF B-F FFFDDBDBBBFF FFFDDB%DB&BB-F FFFBDBDBBB-BDBDBIDBJDB1D BK  BMBNBDDB3DB4BBlif F4 > 0 then do nothingBF)BCF B-F FFFDDBDBBBFF FFFDDB%DB&BB-F FFFBDBDBBB-BDBDBIDBJDB1D BK BMBNBDDB3DB4BBlif F3 > 0 then do nothingBF!BCF B-F FFFDDBDBBBFF FFFDDB%DB&BB-F F FFBDBDBBB-BDBDBIDBJDB1D BK CBMBNBDDB3DB4BBlif F2 > 0 then do nothingBFBCF B-F F4FFDDBDBBBFF F4FFDDB%DB&BB-F F.FF!B6DBDBBB-BDBDBIDBJDB1D BK CBMBNBDDB3DB4BBlif F1 > 0 then do nothingBFBCF B-F FYFFCDDBDBBBFF FYFFCDDB%DB&BB-F FSFFFBXDBDBBB-BDBDBIDBJDB1D BK BMBNBDDB3DB4BBlif L1 > 0 then do nothingBFBCF B-F FFFiDDBDBBBFF FFFiDDB%DB&BB-F FyFFlBzDBDBBB-BDBDBIDBJDFREE-TEXT-STATEMENTDBK MBMBNBDlThe purpose of these rules is to force thedisplaying of sensor values on the schematicBF_B-F FFFDDBDBBBFF FFFDDB%DB&BB-F FF FBDB%DB&BB-Fv FFFBDBDBBB-BDBDBIDBJDBDBK ]HBMBNBDDBF3-WAVEBDBFPF<ǀ3S33simulate local f3-wave with wave with centralvalue 80 and deviation 0 and period 1 minute and noise 1.3BFkB-FF*F F`DDBDBBBFFF*F F`DDB%DB&BB-FF0Fy F=BDB%DB&BB-FF@F FMBDB%DB&BB-FFPFhF]BDBDBBB-BDBDBIDBJDBDBK \HBMBNBDDBBDB3DBBFDB3DBBFDBBDBBǀ3c33DB3DBBF,simulate F3 with 0 then if time < 1200 then 0 else if time < 1800 then (min (f3-wave, (F3 + 3.1))) else if time < 2000 then 0 else 0BF"B-FFF FDDBDBBBFFFF FDDB%DB&BB-FFFtFBDB%DB&BB-FFFFBDB%DB&BB-FFF FBDB%DB&BB-FFFFBDBDBBB-BDBDBIDBJDBDBK CBMBNBD DBBBDB3DBBFDBFdFdFXFDB3DBBFDBFdF<ǀffffDB3DBBFXDBFdFdFXFlsimulate F2 with ,if time < 150 then wave, with central value 100 and deviation 100 and, period 600 seconds and phase 450 elseif time < 450 then wave with central value 100l and deviation 0 and period 1 minute and noise .4 else ,if time < 600 then wave, with central value 100 and deviation 100 andl period 600 seconds and phase 450 else 0BFhB-FnF$F FrDDBDBBBFFnF$F FrD DB%DB&BB-FyFFFBXDB%DB&BB-FFFVFBYDB%DB&BB-FFF. FBZDB%DB&BB-FFFFB[DB%DB&BB-FF"F% F/B\DB%DB&BB-FF2F F?B]DB%DB&BB-FFBFVFOB^DB%DB&BB-FFRF. F_B_DB%DB&BB-FFbF FoB`DBDBBB-BDBDBIDBJDBDBK CBMBNBD DBBBDB3DBBFDBF<F<FXFDB3DBBFDBF<F<ǀLDB3DBBFXDBF<F<FXFlsimulate F1 with BY with central value 60 and deviation 60 andB[lif time < 450 then wave with central value 60 and deviation 0 and period 1 minute and noise .3 else ,if time < 600 then wave with central value 60 and deviation 60 andl period 600 seconds and phase 450 else 0BFB-FFF F?DDBDBBBFFFF F?D DB%DB&BB-FFF5FBDB%DB&BB-FFFzFBYDB%DB&BB-FFF@ FBDB%DB&BB-FFF FB[DB%DB&BB-FFFm FBDB%DB&BB-FFF FrBDB%DB&BB-FFoFzFbBDB%DB&BB-FF_F@ FRBDB%DB&BB-FFOF% FBBDBDBBB-BDBDBIDBJDBDBK CBMBNBD DBCT1F}DB3DBBFXFPDB3DBBFDBFPFFF,DB3DBBF` FDB3DBBF DBF}F}F` FFFlsimulate T1 with 125 then if time < 600 then 80 else ,if time < 900 then wave with central value 80 and deviation 170 andl period 1200 seconds and phase 300 else if time < 2400 then 250 else ,if time < 3000 then wave, with central value 125 and deviation 125 and period 2400 seconds and phase 1200 else 70BFB-FFF FDDBDBBBFFFF FD DB%DB&BB-FF{FFnBB DB%DB&BB-FFkFF^BC DB%DB&BB-FF[FFNBD DB%DB&BB-FFKF F>BE DB%DB&BB-FF;F[ F.BF DB%DB&BB-FF+FFBG DB%DB&BB-FFFFBH DB%DB&BB-FF F FBI DB%DB&BB-FFFv FBJ DBDBB-FaFFCF6BDTHERMOCOUPLE-TEMPERATURE-PORT-SENSORDB F BB-FFFqFB" DBDBBB-BDBDBIDBJDBDBK >BMBNB,Chemical Mixing ProcessBF%B-F&FFEFDDBDBBBFF&FFEFDDB%DB&BB-FFFMFB DÁHEAT-EXCHANGERBFkFFFÀCOOLERDMATERIAL-SOURCEBF=F FFcÀMIX-2DCCENTRIFUGAL-VARIABLE-COMPUTER-PUMPBFF$FFLÀPUMP-2DBDBB-FF}FFBBDTWO-INPUT-MIXED-TANKBF*FzFfF ÀTANK-1DBDBB-B FFiFFFxBDBDBB-FF}FFMBDEQUAL-PERCENTAGE-VARIABLE-CONTROL-VALVEBF;FFF]CV1DBDBB-FFFoF[BDB BFFmFFEÀPUMP-1DB BFAFFF.ÀMIX-1D DCFLOW-PIPEBFFÃTHRU-SENSOR-OUTPUT-CONNECTIONÂVALVE-INPUT-CONNECTIONBDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFDB BFFB SINK-INPUT-PORTFDB BFBB BFDB BF5FHEAT-TRANSFER-OUTPUT-PORT-2THRU-SENSOR-INPUT-CONNECTIONBDB BFFVALVE-OUTPUT-CONNECTIONB! BDB BFFCCONTROLLER-OUTPUTVALVE-CONTROL-CONNECTIONBDB BBFBÁSETPOINT-INPUTFDB BFFB CONTROLLER-INPUTBDB BBFBCPORT-SENSOR-INPUTDFF(DB BF;F5B CHEAT-TRANSFER-INPUT-PORT-2DF!FDFFWDB BF#BB BFDB BF2F9B MIXED-TANK-INPUT-PORT-2FTDB BF2BB BFDB BF7F2ÂPUMP-OUTPUT-CONNECTIONB! BDB BF3BB BFDB BF5F3HEAT-TRANSFER-OUTPUT-PORT-1B5 BDB BBF<BB* FDB BF:BB BFDB BBF7BCPUMP-CONTROLLER-CONNECTIONFDB BF6F7HOLDER-OUTPUT-CONNECTIONÂPUMP-INPUT-CONNECTIONBDB BF8F;B B! BDB BF8BB BFDB BF9F8Be B! BDB BBF:BB5 DF!F DB BF;BB BFDB BF<F9B% MIXED-TANK-INPUT-PORT-1BDB BF=F<B B BDB BF=BB BFDB BBF>BB` FDB BF>F=BP B! BDB BF?F>Be Bf BB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "DWR" :CHARACTERS NIL :QFASLP NIL :LENGTH 7480 :CREATION-DATE 2725549743 :DIRECTORY "PICON-CLASS" :NAME "CASE-STUDY-1" :TYPE "PIC" :VERSION 8) hưs2Dp,lFASD-DATADDWRRalphtFfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB 71DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE KAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK 7BMBNCNEXT-NEW-STATEMENT-NUMBERFmCFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDCASE-STUDY-1FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?Case Study 11DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBnDBK KBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBvDBK KBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB~DBK KBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK KBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK KBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK '=BMBNMESSAGE-MUST-PRINT-INTERVALF1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK KBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK KBMBN1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMNILF( FFv FD)DCNAPH-CHROMATOGRAPH-ANALYTICAL-PORT-SENSORDSENSOR-CURRENCY-INTERVALF SENSOR-TRACING-REQUESTSB-FFF!FÀCLOCKDCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBcMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDSIMULATION-STATEMENTDBK mHBMBNÁSTATEMENT-TEXTDDSIMULATECP2DMAXDC*CF4ǀ3e33simulate P2 with 0 then (max ( 0 ,F4 * 12.65))CSTATEMENT-NUMBER?F(B-FFxF FDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFFxF FDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FF~F FBDBDBBB-BDBDBIDBJDIF-THEN-RULED BK BMBNBDDCIFDC>BBif clock > 0 then do nothingBFPICON-RULE-SCAN-INTERVALF B-F F{FFeDDBDBBBFF F{FFeDDBDBBB-F FuFFhBDBDBBB-BDBDBIDBJDBD BK CBMBNBDDBDBBBlif P2 > 0 then do nothingBFiBF B-F FFFDDBDBBBFF FFFDDBDBBB-F FFFB#DBDBBB-BDBDBIDBJDBD BK  BMBNBDDBDBCP1Blif P1 > 0 then do nothingBF*BF B-F FFFDDBDBBBFF FFFDDBDBBB-F FFFBFDBDBBB-BDBDBIDBJDBD BK  BMBNBDDBDBBBlif F4 > 0 then do nothingBF)BF B-F FFFDDBDBBBFF FFFDDBDBBB-F FFFBhDBDBBB-BDBDBIDBJDBD BK BMBNBDDBDBCF3Blif F3 > 0 then do nothingBF!BF B-F FFFDDBDBBBFF FFFDDBDBBB-F F FFBDBDBBB-BDBDBIDBJDBD BK CBMBNBDDBDBCF2Blif F2 > 0 then do nothingBFBF B-F F6FF DDBDBBBFF F6FF DDBDBBB-F F0FF#BDBDBBB-BDBDBIDBJDBD BK CBMBNBDDBDBCF1Blif F1 > 0 then do nothingBFBF B-F F[FFEDDBDBBBFF F[FFEDDBDBBB-F FUFFHBDBDBBB-BDBDBIDBJDBD BK BMBNBDDBDBCL1Blif L1 > 0 then do nothingBFBF B-F FFFkDDBDBBBFF FFFkDDBDBBB-F F{FFnBDBDBBB-BDBDBIDBJDFREE-TEXT-STATEMENTDBK MBMBNBDlThe purpose of these rules is to force thedisplaying of sensor values on the schematicBF_B-F FFFDDBDBBBFF FFFDDBDBBB-F FF FBDBDBBB-Fw FFFBDBDBBB-BDBDBIDBJDBDBK 18BMBNBDDBCTEMP-STARTBFPsimulate temp-start with 80BF.B-FFF FDDBDBBBFFFF FDDBDBBB-FFF FB<DBDBBB-BDBDBIDBJDBDBK CBMBNBDDBSIM-TANK-AREA-2Bǀplsimulate sim-tank-area-2 with 3.5BFjB-FQFoF FDDBDBBBFFQFoF FDDBDBBB-F\FuF FB]DBDBBB-BDBDBIDBJDBDBK N=BMBNBDDBÁSIM-TANK-AREABǀ@ ,simulate sim-tank-area with 2.02BFWB-FZFFF F\DDBDBBBFFZFFF F\DDBDBBB-FeFLF FYB~DBDBBB-BDBDBIDBJDBDBK p8BMBNBDDBBTIME,simulate clock with 0 then timeBFB-FcFF F5DDBDBBBFFcFF F5DDBDBBB-FnF%F F2BDBDBBB-BDBDBIDBJDBDBK 98BMBNBDDBCTEMP-WAVEBDCPICON-WAVEFFFpF`T,simulate local temp-wave with wave with centrallvalue 2000 and deviation 2000 and period 8 hours ,and phase 21600BF-B-FFF F DDBDBBBFFFF F DDBDBBB-FFFc FBDBDBBB-FFF FBDBDBBB-FFFRFBDBDBBB-BDBDBIDBJDBDBK CBMBNBDDBBBDBǀPBlsimulate P1 with 0 then (2.5 * F3)BF\B-FKFF FDDBDBBBFFKFF FDDBDBBB-FVFF FBDBDBBB-BDBDBIDBJDBDBK ]HBMBNBDDBF3-WAVEBDBFPF<ǀ3S33simulate local f3-wave with wave with centralvalue 80 and deviation 0 and period 1 minute and noise 1.3BFkB-FF(F F^DDBDBBBFFF(F F^DDBDBBB-FF.Fx F;BDBDBBB-FF>F FKBDBDBBB-FFNFgF[B DBDBBB-BDBDBIDBJDBDBK mHBMBNBDDBBDBDC-BǀVsimulate F4 with 0 then (max ( 0, f3 - .021))BF'B-FFF F DDBDBBBFFFF F DDBDBBB-FFF FBQDBDBBB-BDBDBIDBJDBDBK \HBMBNBDDBBDBDCBMBNB,Chemical Mixing ProcessBF%B-F'FFFFDDBDBBBFF'FFFFDDBDBBB-FFFNFBDÁMATERIAL-SINKBFFlF5FÀTANK-2DCGUAGE-PRESSURE-THRU-SENSORDBB-FFFFBDÁHEAT-EXCHANGERBFlFFFÀCOOLERDBDBB-F>FF\FBDMATERIAL-SOURCEBF>FFFaÀMIX-2DCCENTRIFUGAL-VARIABLE-COMPUTER-PUMPBFF"FFJÀPUMP-2DBDBB-FFFFDBDTWO-INPUT-MIXED-TANKBF)F|FeF"ÀTANK-1DBDBB-BFFhFFFzBDBDBB-FFFFOBBDEQUAL-PERCENTAGE-VARIABLE-CONTROL-VALVEBF<FFF_CV1DBDBB-FFFpF]BDBBFFoFFGÀPUMP-1DBBFBFFF0ÀMIX-1DDCCONTROL-CONNECTIONBBSENSOR-CONTROLLER-CONNECTIONBFDCFLOW-PIPEBFF"ÃTHRU-SENSOR-OUTPUT-CONNECTIONMIXED-TANK-INPUT-PORT-2FTDBBFBBBFDBBF FÂPUMP-OUTPUT-CONNECTIONTHRU-SENSOR-INPUT-CONNECTIONBDBBFBBBFDBBFFHEAT-TRANSFER-OUTPUT-PORT-1CPORT-SENSOR-INPUTBDBBBF%BVALVE-CONTROL-CONNECTIONFDBBF#BBBFDBBBF BCPUMP-CONTROLLER-CONNECTIONFDBBFFBSINK-INPUT-PORTF2DBBFBBBFDBBBFBCHEAT-TRANSFER-INPUT-PORT-1FDBBFFHEAT-TRANSFER-OUTPUT-PORT-2B$BDBBF$FBCHEAT-TRANSFER-INPUT-PORT-2DFFvFF@DBBFFBB$BDBBFBBBFDBBFF HOLDER-OUTPUT-CONNECTIONÂPUMP-INPUT-CONNECTIONBDBBF!F$BB$BDBBF!BBBFDBBF"F!BZB$BDBBBF#BB,DF!F DBBF$BBBFDBBF%F"VALVE-OUTPUT-CONNECTIONMIXED-TANK-INPUT-PORT-1BDBBF&F%BÂVALVE-INPUT-CONNECTIONBDBBF&BBBFDBBBF'BB6FDBBF'F&B#B$BDBBF(F'BZB[BB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "dwr" :CHARACTERS NIL :QFASLP NIL :LENGTH 10240 :CREATION-DATE 2725681613 :DIRECTORY "PICON-CLASS" :NAME "CASE-STUDY-2" :TYPE "PIC" :VERSION 1) hưs2Dp,lFASD-DATADdwrRalphvЙFfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB j@1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE KAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK j@BMBNCNEXT-NEW-STATEMENT-NUMBERFCFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDCASE-2-SOLUTIONCASE-STUDY-2FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?Case Study 21DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBoDBK KBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBwDBK KBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDBDBK KBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK KBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK KBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK '=BMBNMESSAGE-MUST-PRINT-INTERVALF1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK KBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK KBMBN1DBIDBJDCDEFINITIOND BK HBMBNÁSTATEMENT-TEXTDDC=DÃTANK-LEVEL-IS-DANGEROUSLY-HIGHCCONDITIONNIL,let tank-level-is-dangerously-high be a named conditionCSTATEMENT-NUMBER?FtBACKTRACK-TO-GET-VALUE?B-1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBF F F F D7DCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBdMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDSIMULATION-STATEMENTDBK 2@BMBNBDDSIMULATECF4DC/DC*CF3DCCOMPOUND-VARIABLECL2SETPOINTDMAXFBsimulate F4 with 0 then F3 * L2 setpoint / max (1, L2)BF'B-FFF FDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFFF FDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FFF FBDBDBBB-BDBDBIDBJDBDBK '@BMBNBDDBCP2DBBDBBDBBB,simulate P2 with 0 then F3 * (L2 / L2 setpoint)BF(B-FFlF FDDBDBBBFFFlF FDDBDBBB-FFrF FB DBDBBB-BDBDBIDBJDBDBK 98BMBNBDDBCTEMP-WAVEBDCPICON-WAVEFFFpF`T,simulate local temp-wave with wave with centrallvalue 2000 and deviation 2000 and period 8 hours ,and phase 21600BF-B-FFF FDDBDBBBFFFF FDDBDBBB-FFFg FB3DBDBBB-FFF FB4DBDBBB-FFFVFB5DBDBBB-BDBDBIDBJDBDBK HBMBNBD DBCL1DCIFDCF)BDBDBBB-FvF&FFBDBDBBB-FvFF F BDBDBBB-FvFF FBDBDBBB-FvFFzFBDBDBBB-FvFFMFBDBDBBB-FvFF FBDBDBBB-FvFF FBDBDBBB-FvFFFBDBDBBB-BDBDBIDBJDBDBK 18BMBNBDDBCTEMP-STARTBFPsimulate temp-start with 80BF.B-FFF FDDBDBBBFFFF FDDBDBBB-FFF FBDBDBBB-BDBDBIDBJDBDBK CBMBNBDDBBoBǀplsimulate sim-tank-area-2 with 3.5BFjB-FQFF FDDBDBBBFFQFF FDDBDBBB-F\FF FBDBDBBB-BDBDBIDBJDBDBK N=BMBNBDDBBjBǀ@ ,simulate sim-tank-area with 2.02BFWB-FZF`F FvDDBDBBBFFZF`F FvDDBDBBB-FeFfF FsBDBDBBB-BDBDBIDBJDBDBK p8BMBNBDDBÀCLOCKBc,simulate clock with 0 then timeBFB-FcF6F FLDDBDBBBFFcF6F FLDDBDBBB-FnF<F FIB@DBDBBB-BDBDBIDBJDBDBK !@BMBNBDDBTANK-2-AREABsimulate tank-2-area with 1.12BFzB-FmF F F"DDBDBBBFFmF F F"DDBDBBB-FxFF FBaDBDBBB-BDBDBIDBJDBDBK "@BMBNBDDBBDBgDBDBBB^FB,simulate L2 with 0 then ( F4 / tank-2-area) / 3600 + L2BFwB-FFF FDDBDBBBFFFF FDDBDBBB-FFF FBDBDBBB-BDBDBIDBJDBDBK @BMBNBDDBL2-4FDBBBsimulate L2 setpoint with 250 then L2 setpointBFxB-FFF FDDBDBBBFFFF FDDBDBBB-FFF FBDBDBBB-BDBDBIDBJDBDBK CBMBNBDDBCP1DBǀPBlsimulate P1 with 0 then (2.5 * F3)BF\B-FJFF FDDBDBBBFFJFF FDDBDBBB-FUFF FBDBDBBB-BDBDBIDBJDIF-THEN-RULED BK ?BMBNBDDBaDC>BBlif L2 > 0 then do nothingBF{PICON-RULE-SCAN-INTERVALF B-F FTFF>DDBDBBBFF FTFF>DDBDBBB-F FNFFABDCGUAGE-PRESSURE-THRU-SENSORDSENSOR-TRACING-REQUESTSB-F FF+FBDMAGNETIC-FLOWMETER-FLOW-THRU-SENSORDB B-FFFFBDCR-L-1-IN-1-OUT-FEEDBACK-CONTROLLERD SETPOINT-LOW-LIMIT?SETPOINT-HIGH-LIMIT?FCSETPOINT-MINIMUM-INTERVAL-BETWEEN-CHANGES?F SETPOINT-MAXIMUM-CHANGE-PER-ADJUSTMENT?FdDISPLAY-SETPOINT-VALUESB-F~FFFEBDDIFFERENTIAL-PRESSURE-LEVEL-PORT-SENSORDB B-SENSOR-CURRENCY-INTERVALFFFKF FiBDÁMATERIAL-SINKBFFFFÀTANK-2DÃLINEAR-VARIABLE-CONTROL-VALVEBFRFFpFBDBDBBB-BDBDBIDBJDBD BK 8BMBNBDDBaDBB=FDDSENDDThe simulation has completed.DDESTINATIONOPERATORif CLOCK > 2000 then ,send "The simulation has completed." to operatorBFvBF<B-FF FFFDDBDBBBFFF FFFDDBDBBB-FF&F F3BMDBDBBB-FF6FFCBNDBDBBB-BDBDBIDBJDBDBK HBMBNBDDBaDANDBÂTHERE-IS-INCOMING-FLOWDDBDDlTank level is above safety limit and is stillincreasing.DBGBHCEVERY-TIMEif tank-level-is-dangerously-high and there-is-incoming-flow,then send "Tank level is above safety limit and is stillincreasing." to operator every timeBFsB-FFnFF8DDBDBBBFFFnFF8DDBDBBB-FFhFF[B}DBDBBB-FFXFFKB~DBDBBB-FFHF~F;BDBDBBB-BDBDBIDBJDBD BK HBMBNBDDBDBtBDCORDBBiDBBnlet condition there-is-incoming-flow = F1 > 0 lor F2 > 0BFuBB-B-FF F!FDDBDBBBFFF F!FDDBDBBB-FFF)F BDBDBBB-FF FgFBDBDBBB-BDBDBIDBJDBD BK HBMBNBDDBaDBB_TANK-LEVEL-SAFETY-LIMITDDBDDTank level: ~6F is over safety limit of ~6FB_BDBGBHF<DCONCLUDEBif L1 > tank-level-safety-limit then lsend "Tank level: *** is over safety limit of ***", with L1, tank-level-safety-limit to operator every 1 minute and,conclude tank-level-is-dangerously-highBFqBF<CPICON-RULE-ALERT-INTERVALFB-FFFFDDBDBBBFFFFFDDBDBBB-FFFzFBDBDBBB-FFFFBDBDBBB-FFFFBDBDBBB-FFFFBDBDBBB-FFFYFBDBDBBB-BDBDBIDBJDBD BK HBMBNBDDBBF|tank-level-safety-limit = 380BFpBB-B-FFFFDDBDBBBFFFFFDDBDBBB-FFFFB DBDBBB-BDBDBIDBJDBD BK HBMBNBDDBaDBBnFdDDBDD F2 is reading ~6F and should not exceed 100BnDBGBHlif F2 > 100 then send " F2 is reading *** and should not exceed 100"with F2 to operatorBFnBFB-FFcFF-DDBDBBBFFFcFF-DDBDBBB-FF]F0FPBFDBDBBB-FFMFF@BGDBDBBB-FF=FF0BHDBDBBB-BDBDBIDBJDBD BK HBMBNBDDBaDBBiF<DDBDD F1 is reading ~6F and should not exceed 60BiDBGBH,if F1 > 60 then lsend " F1 is reading *** and should not exceed 60"with F1 to operatorBFmBFB-FFFF~DDBDBBBFFFFF~DDBDBBB-FFF:FB{DBDBBB-FFFFB|DBDBBB-FFFFB}DCNAPH-CHROMATOGRAPH-ANALYTICAL-PORT-SENSORDB,F B B-FFF"FB=DBDBBB-BDBDBIDBJDBD BK BMBNBDDBaDBB=Bif clock > 0 then do nothingBFBF B-F FyFFcDDBDBBBFF FyFFcDDBDBBB-F FsFFfBDBDBBB-BDBDBIDBJDBD BK CBMBNBDDBaDBBBlif P2 > 0 then do nothingBFiBF B-F FFFDDBDBBBFF FFFDDBDBBB-F FFFBDBDBBB-BDBDBIDBJDBD BK  BMBNBDDBaDBBBlif P1 > 0 then do nothingBF*BF B-F FFFDDBDBBBFF FFFDDBDBBB-F FFFBDBDBBB-BDBDBIDBJDBD BK  BMBNBDDBaDBBBlif F4 > 0 then do nothingBF)BF B-F FFFDDBDBBBFF FFFDDBDBBB-F FFFBDBDBBB-BDBDBIDBJDBD BK BMBNBDDBaDBBBlif F3 > 0 then do nothingBF!BF B-F FFFDDBDBBBFF FFFDDBDBBB-F F FFB;DBDBBB-BDBDBIDBJDBD BK CBMBNBDDBaDBBnBlif F2 > 0 then do nothingBFBF B-F F4FFDDBDBBBFF F4FFDDBDBBB-F F.FF!B]DBDBBB-BDBDBIDBJDBD BK CBMBNBDDBaDBBiBlif F1 > 0 then do nothingBFBF B-F FYFFCDDBDBBBFF FYFFCDDBDBBB-F FSFFFBDBDBBB-BDBDBIDBJDBD BK BMBNBDDBaDBB_Blif L1 > 0 then do nothingBFBF B-F FFFiDDBDBBBFF FFFiDDBDBBB-F FyFFlBDBDBBB-BDBDBIDBJDFREE-TEXT-STATEMENTDBK MBMBNBDlThe purpose of these rules is to force thedisplaying of sensor values on the schematicBF_B-F FFFDDBDBBBFF FFFDDBDBBB-F FF FBDBDBBB-Fv FFFBDBDBBB-BDBDBIDBJDBDBK ]HBMBNBDDBF3-WAVEBDB*FPF<ǀ3S33simulate local f3-wave with wave with centralvalue 80 and deviation 0 and period 1 minute and noise 1.3BFkB-FF*F F`DDBDBBBFFF*F F`DDBDBBB-FF0Fy F=BDBDBBB-FF@F FMBDBDBBB-FFPFhF]BDBDBBB-BDBDBIDBJDBDBK \HBMBNBDDBBDBaDBbBcFDBaDBbBcFDBfBDBgBǀ3c33DBaDBbBcF,simulate F3 with 0 then if time < 1200 then 0 else if time < 1800 then (min (f3-wave, (F3 + 3.1))) else if time < 2000 then 0 else 0BF"B-FFF FDDBDBBBFFFF FDDBDBBB-FFFtFB,DBDBBB-FFFFB-DBDBBB-FFF FB.DBDBBB-FFFFB/DBDBBB-BDBDBIDBJDBDBK CBMBNBD DBBnBDBaDBbBcFDB*FdFdFXFDBaDBbBcFDB*FdF<ǀffffDBaDBbBcFXDB*FdFdFXFlsimulate F2 with ,if time < 150 then wave, with central value 100 and deviation 100 and, period 600 seconds and phase 450 elseif time < 450 then wave with central value 100l and deviation 0 and period 1 minute and noise .4 else ,if time < 600 then wave, with central value 100 and deviation 100 andl period 600 seconds and phase 450 else 0BFhB-FnF$F FrDDBDBBBFFnF$F FrD DBDBBB-FyFFFBDBDBBB-FFFVFBDBDBBB-FFF. FBDBDBBB-FFFFBDBDBBB-FF"F% F/BDBDBBB-FF2F F?BDBDBBB-FFBFVFOBDBDBBB-FFRF. F_BDBDBBB-FFbF FoBDBDBBB-BDBDBIDBJDBDBK CBMBNBD DBBiBDBaDBbBcFDB*F<F<FXFDBaDBbBcFDB*F<F<ǀLDBaDBbBcFXDB*F<F<FXFlsimulate F1 with B with central value 60 and deviation 60 andBlif time < 450 then wave with central value 60 and deviation 0 and period 1 minute and noise .3 else ,if time < 600 then wave with central value 60 and deviation 60 andl period 600 seconds and phase 450 else 0BFB-FFF F?DDBDBBBFFFF F?D DBDBBB-FFF5FBDBDBBB-FFFzFBDBDBBB-FFF@ FBDBDBBB-FFF FBDBDBBB-FFFm FBDBDBBB-FFF FrBDBDBBB-FFoFzFbBDBDBBB-FF_F@ FRBDBDBBB-FFOF% FBBDBDBBB-BDBDBIDBJDBDBK CBMBNBD DBCT1F}DBaDBbBcFXFPDBaDBbBcFDB*FPFFF,DBaDBbBcF` FDBaDBbBcF DB*F}F}F` FFFlsimulate T1 with 125 then if time < 600 then 80 else ,if time < 900 then wave with central value 80 and deviation 170 andl period 1200 seconds and phase 300 else if time < 2400 then 250 else ,if time < 3000 then wave, with central value 125 and deviation 125 and period 2400 seconds and phase 1200 else 70BFB-FFF FDDBDBBBFFFF FD DBDBBB-FF{FFnBiDBDBBB-FFkFF^BjDBDBBB-FF[FFNBkDBDBBB-FFKF F>BlDBDBBB-FF;F[ F.BmDBDBBB-FF+FFBnDBDBBB-FFFFBoDBDBBB-FF F FBpDBDBBB-FFFv FBqDBDB B-FaFFCF6BnDTHERMOCOUPLE-TEMPERATURE-PORT-SENSORDB,F B B-FFFqFBIDBDBBB-BDBDBIDBJDBDBK >BMBNB,Chemical Mixing ProcessBF%B-F&FFEFDDBDBBBFF&FFEFDDBDBBB-FFFMFBDÁHEAT-EXCHANGERBFkFFFÀCOOLERDMATERIAL-SOURCEBF=F FFcÀMIX-2DCCENTRIFUGAL-VARIABLE-COMPUTER-PUMPBFF$FFLÀPUMP-2DBDB B-FF}FFBBDTWO-INPUT-MIXED-TANKBF*FzFfF ÀTANK-1DBDB B-B,FFiFFFxB_DB DB B-FF}FFMBDEQUAL-PERCENTAGE-VARIABLE-CONTROL-VALVEBF;FFF]CV1DBDB B-FFFoF[BiDBBFFmFFEÀPUMP-1DBBFAFFF.ÀMIX-1D DCFLOW-PIPEBF FÃTHRU-SENSOR-OUTPUT-CONNECTIONÂVALVE-INPUT-CONNECTIONBDCCONTROL-CONNECTIONBF BSENSOR-CONTROLLER-CONNECTIONBFDB2BFFB5SINK-INPUT-PORTFDB8BFBB:BFDB2BF,F HEAT-TRANSFER-OUTPUT-PORT-2THRU-SENSOR-INPUT-CONNECTIONBDB2BFFVALVE-OUTPUT-CONNECTIONBHBDB8BFFCCONTROLLER-OUTPUTVALVE-CONTROL-CONNECTIONBDB8BBFBÁSETPOINT-INPUTFDB8BFFB:CONTROLLER-INPUTBDB2BBFBCPORT-SENSOR-INPUTDFF(DB2BF2F,B5CHEAT-TRANSFER-INPUT-PORT-2DF!FDFFWDB8BFBB:BFDB2BF)F0B5MIXED-TANK-INPUT-PORT-2FTDB8BF)BB:BFDB2BF.F)ÂPUMP-OUTPUT-CONNECTIONBHBDB8BF*BB:BFDB2BF,F*HEAT-TRANSFER-OUTPUT-PORT-1B\BDB8BBF3BBQFDB8BF1BB:BFDB8BBF.BCPUMP-CONTROLLER-CONNECTIONFDB2BF-F.HOLDER-OUTPUT-CONNECTIONÂPUMP-INPUT-CONNECTIONBDB2BF/F2B5BHBDB8BF/BB:BFDB2BF0F/BBHBDB2BBF1BB\DF!F DB8BF2BB:BFDB2BF3F0BLMIXED-TANK-INPUT-PORT-1BDB2BF4F3B5B6BDB8BF4BB:BFDB8BBF5BBFDB2BF5F4BwBHBDB2BF6F5BBBB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "DWR" :CHARACTERS NIL :QFASLP NIL :LENGTH 3173 :CREATION-DATE 2720133837 :DIRECTORY "PICON-CLASS" :NAME "CLASS-DEMO" :TYPE "PIC" :VERSION 1) hưs2Dp,lFASD-DATADrmwAlice%jFfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB 1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE AUTHORSRMW1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK BMBNCNEXT-NEW-STATEMENT-NUMBERFCFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;FONT-FOR-NAME-OF-PROGRAMpFONTS43VXMSB-NAME-OF-PROGRAM?PICON1DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBkDBK BMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBsDBK BMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB{DBK BMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK BMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK BMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK BMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK BMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK BMBN1DBIDBJDCDEFINITIOND BK BMBNÁSTATEMENT-TEXTDDC=DCTANK-IS-CLOSE-TO-OVERFLOWCCONDITIONNILllet tank-is-close-to-overflow be a named conditionCSTATEMENT-NUMBER?F BACKTRACK-TO-GET-VALUE?B-1DBIDBJDBD BK BMBNBDDBDCTANK-LEVEL-RISINGBBllet tank-level-rising be a named conditionBFBB-1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBFFFFD DCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpB`MEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDIF-THEN-RULEDBK BMBNBDDCIFDANDBDC>CTANK-LEVELDC-TANK-LEVEL-LIMITFdDDSENDDTank is close to overflowing!!DDESTINATIONOPERATORDCONCLUDEBif TANK-LEVEL-RISING and TANK-LEVEL >(TANK-LEVEL-LIMIT - 100) then send "Tank is close to overflowing!!" to operatorand conclude TANK-IS-CLOSE-TO-OVERFLOWBF B-F&F3FyFDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFF&F3FyFDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FF-FF BDBDBBB-F FFFBDBDBBB-F F FBDBDBBB-F FFFBDBDBBB-BDBDBIDBJDBDBK BMBNBDDBBDDBDl Turn input valve counter clockwise to reduceinput flow!DBB,if TANK-IS-CLOSE-TO-OVERFLOW then send " Turn input valve counter clockwise to reduce,input flow!" to operatorBF B-F'F!FhFWDDBDBBBFF'F!FhFWDDBDBBB-FF'FF4B+DBDBBB-F F7FpFDB,DBDBBB-F FGF6FTB-DBDBBB-BDBDBIDBJDBD BK BMBNBDDBDBDBFLOW-INFLOW-OUTFDDBBDBDlTank level rising!DBB,if FLOW-IN - FLOW-OUT > 20 then conclude,TANK-LEVEL-RISING and send "Tank level rising!"to operatorBFPICON-RULE-SCAN-INTERVALF<B-F&FqF^F;DDBDBBBFF&FqF^F;DDBDBBB-FFkFF^BcDBDBBB-F F[FfFNBdDBDBBB-F FKFF>BeDBDBBB-BDBDBIDBJDBD BK BMBNBDDBBFTANK-LEVEL-LIMIT = 750BFBB-B-F&FFNFDDBDBBBFF&FFNFDDBDBBB-FFFVFBDBDBBB-BDBDBIDBJDSIMULATION-STATEMENTDBK BMBNBDDSIMULATECTANK-AREABFdlsimulate local TANK-AREA with 100BFB-FFF>FDDBDBBBFFFF>FDDBDBBB-FFF6F BDBDBBB-BDBDBIDBJDBDBK BMBNBDDBBFDC+DC/DC*DBBWBXBFBsimulate TANK-LEVEL with 500 then (FLOW-IN -lFLOW-OUT) * TANK-AREA / 3600 + TANK-LEVELBFB-FFKFF%DDBDBBBFFFKFF%DDBDBBB-F FEFF8BDBDBBB-FF5FF(BDBDBBB-BDBDBIDBJDBDBK BMBNBDDBBXFdDCPICON-WAVEFdF(FXlsimulate FLOW-OUT with 100 then wave with centrallvalue 100 and deviation 40 and period 600 secondsBFB-FFxFFRDDBDBBBFFFxFFRDDBDBBB-F FrFFeB DBDBBB-FFbFFUB DBDBBB-BDBDBIDBJDBDBK BMBNBDDBBWFdDBFdFPFX,simulate FLOW-IN with 100 then wave with centrallvalue 100 and deviation 80 and period 600 secondsBFB-FFFFDDBDBBBFFFFFDDBDBBB-F FFFB5DBDBBB-FFFFB6DSONIC-LEVEL-PORT-SENSORDSENSOR-TRACING-REQUESTSB-FFkFFMBDMAGNETIC-FLOWMETER-FLOW-THRU-SENSORDBZB-FFEFFBXDBaDBZB-FFFFVBWDACCUMULATORBFQF1FEFBnDDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFDBuBF FACCUMULATOR-METER-OUTPUTCPORT-SENSOR-INPUTFDCFLOW-PIPEBF BÃTHRU-SENSOR-OUTPUT-CONNECTIONBFDBuBF BBwBFDBBBF BTHRU-SENSOR-INPUT-CONNECTIONFDBBF F BÂACCUMULATOR-MAIN-INPUTBDBuBF BBwBFDBBF F ACCUMULATOR-MAIN-OUTPUTBBB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 8 :AUTHOR "dwr" :QFASLP NIL :LENGTH 1681 :CREATION-DATE 2725680885 :CHARACTERS T :DIRECTORY "PICON-CLASS" :NAME "CLASS-ICONS" :TYPE "LISP" :VERSION 2) ;;; -*- Mode:LISP; Package:PICON; Fonts:(HL12B); Base:10 -*-;;; These are some examples of how to create icons.(def-frame-type (piping process-equipment) (pipe-op-input-connection (:input :left 50) flow-pipe) (pipe-op-output-connection-1 (:output :right 10) flow-pipe) (pipe-op-output-connection-2 (:output :right 90) flow-pipe) (image-description '#.(make-image-description (size 100 100) (position-for-name nil 80) (circular-arc (10 40) (0 50) (10 60)) (circular-arc (10 40) (20 50) (10 60)) (fill (10 50)) (line (10 40) (60 40)) (line (10 60) (60 60)) (circular-arc (60 40) (70 50) (60 60)) (line (60 40) (80 10)) (line (60 60) (80 90)) (line (70 50) (90 20)) (line (70 50) (90 80)) (circular-arc (90 0) (100 10) (90 20)) (circular-arc (90 0) (80 10) (90 20)) (fill (90 10)) (circular-arc (90 80) (100 90) (90 100)) (circular-arc (90 80) (80 90) (90 100)) (fill (90 90)))))(def-frame-type (test process-equipment :abstract))(def-frame-type (run-one test) (start-op-input-connection (:input :left 10) flow-pipe) (start-op-output-connection (:output :right 10) flow-pipe) (image-description '#.(make-image-description (size 20 20) (position-for-name nil 30) (polyline (0 0) (20 0) (20 20) (0 20) (0 0)) (fill (10 10)))))(def-frame-type (run-two test) (stop-op-input-connection (:input :left 10) flow-pipe) (stop-op-output-connection (:output :right 10) flow-pipe) (image-description '#.(make-image-description (size 30 30) (position-for-name nil 35) (polyline (0 0) (30 0) (30 30) (0 30) (0 0)) (circle (5 15) (15 5) (25 15)) (fill (5 5)))))LMFL(:BYTE-SIZE 16 :AUTHOR "dwr" :CHARACTERS NIL :QFASLP NIL :LENGTH 3003 :CREATION-DATE 2727435810 :DIRECTORY "PICON-CLASS" :NAME "CLASS-KB" :TYPE "PIC" :VERSION 2) hưs2Dp,lFASD-DATADdwrRalph+^FfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB 1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE iSAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK oBMBNCNEXT-NEW-STATEMENT-NUMBERFCFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?,Class KB1DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBkDBK iSBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBsDBK iSBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB{DBK iSBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK iSBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK iSBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK iSBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK iSBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK iSBMBN1DBIDBJDCDEFINITIOND BK BMBNÁSTATEMENT-TEXTDDC=DTANK-WILL-OVERFLOW-SOONCCONDITIONNIL,let tank-will-overflow-soon be a named conditionCSTATEMENT-NUMBER?FBACKTRACK-TO-GET-VALUE?B-1DBIDBJDBD BK BMBNBDDBDTANK-LEVEL-IS-RISINGBBlet tank-level-is-rising be a named conditionBFBB-1DBIDBJDBD BK lSBMBNBDDBDTANK-BOILINGBBlet tank-boiling be a named conditionBFBB-1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBFFFF&D DCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpB`MEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDBD BK BMBNBDDBTANK-LEVEL-LIMITFITANK-LEVEL-LIMIT = 585BFBB-B-FFlFFDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFFlFFDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FFrFFBDBDBBB-BDBDBIDBJDBD BK BMBNBDDBCFLOW-DELTADC-CF1CF2flow-delta = F1 - F2BF BB-B-FFAFFWDDBDBBBFFFAFFWDDBDBBB-FFGF"FTBDBDBBB-BDBDBIDBJDSIMULATION-STATEMENTDBK BMBNBDDSIMULATECTANK-AREABFdlsimulate local TANK-AREA with 100BFB-FFF[FDDBDBBBFFFF[FDDBDBBB-FFFSFB2DBDBBB-BDBDBIDBJDB,DBK BMBNBDDB.B BDCPICON-WAVEFdF(F,lsimulate F2 with wave with central,value 100 and deviation 40 and period 5 minutesBF B-FF{FFDDBDBBBFFF{FFDDBDBBB-FFF\FBVDBDBBB-FFFFBWDBDBBB-BDBDBIDBJDB,DBK ~BMBNBDDB.B BDBPFdFPF,lsimulate F1 with wave with central,value 100 and deviation 80 and period 5 minutesBF B-FFHFFnDDBDBBBFFFHFFnDDBDBBB-FFNF\F[BDBDBBB-FF^FFkBDBDBBB-BDBDBIDBJDB,DBK BMBNBDDB.CL1FDC+DC/DC*DB B B B/FBsimulate L1 with 500 then (F1 - F2 ) * TANK-AREA / l3600 + L1BF B-FFFF;DDBDBBBFFFFF;DDBDBBB-FFFF(BDBDBBB-FF+FvF8BDBDBBB-BDBDBIDBJDIF-THEN-RULED BK BMBNBDDCIFDANDDC>B DBBBDDCONCLUDEBDSENDD,Tank level is too high!DDESTINATIONOPERATORlif flow-delta > 0 and L1 > tank-level-limit then lconclude tank-level-is-rising and lsend "Tank level is too high!" to operatorBFPICON-RULE-SCAN-INTERVALF B-FF FF*DDBDBBBFFF FF*DDBDBBB-FFFFBDBDBBB-FF FkFBDBDBBB-FFFF'BDCSURGE-TANKBFFFF=ÀSURGEDDIFFERENTIAL-PRESSURE-LEVEL-PORT-SENSORDSENSOR-TRACING-REQUESTSB-SENSOR-CURRENCY-INTERVALFFFFFBDMAGNETIC-FLOWMETER-FLOW-THRU-SENSORDBB-FFmFF2B DCCENTRIFUGAL-VARIABLE-COMPUTER-PUMPBFFFFPUMPDB&DBB-FsFFUFB DACCUMULATORBFBFFTF_TANKD DCFLOW-PIPEBFBÂSURGE-TANK-MAIN-OUTPUTBFDCCONTROL-CONNECTIONBFBSURGE-TANK-METER-OUTPUTBFDBGBFBSENSOR-CONTROLLER-CONNECTIONBFDBBBF FÃTHRU-SENSOR-OUTPUT-CONNECTIONÂSURGE-TANK-MAIN-INPUTBDBGBF BBMBFDBGBBF BCPUMP-CONTROLLER-CONNECTIONFDBBBBF BÂPUMP-INPUT-CONNECTIONFDBBBF F ÂPUMP-OUTPUT-CONNECTIONTHRU-SENSOR-INPUT-CONNECTIONBDBBBF F BRÂACCUMULATOR-MAIN-INPUTBDBGBF BBMBFDBBBF F ACCUMULATOR-MAIN-OUTPUTBcBDBGBF FACCUMULATOR-METER-OUTPUTCPORT-SENSOR-INPUTFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 8 :AUTHOR "DWR" :QFASLP NIL :LENGTH 477 :CREATION-DATE 2730898175 :CHARACTERS T :DIRECTORY "PICON-CLASS" :NAME "CLASS-MATERIAL-DISCLAIMER" :TYPE "TEXT" :VERSION 1) -*- Mode:Text; Fonts:(CPTFONTB HL12 HL12B METSI TR10I TR10BI TR12BI) -*-This directory is provided as a courtesy to our customers who haveattended the 4PICON* course. Possession of these files respresents 6no*obligation on the part of LMI to support, redistribute, or notify ourusers in the event of its change. This file contains no software butexample course exercises in order to provide the capability to use the course material on the customer site.LMILMFL(:BYTE-SIZE 16 :AUTHOR "dwr" :CHARACTERS NIL :QFASLP NIL :LENGTH 2405 :CREATION-DATE 2727374244 :DIRECTORY "PICON-CLASS" :NAME "CLASS-MODEL" :TYPE "PIC" :VERSION 4) hưs2Dp,lFASD-DATADdwrRalphmFfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB 1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE iSAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK $BMBNCNEXT-NEW-STATEMENT-NUMBERFCFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?Class Model1DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBkDBK iSBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBsDBK iSBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB{DBK iSBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK iSBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK iSBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK iSBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK iSBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK iSBMBN1DBIDBJDCDEFINITIOND BK BMBNÁSTATEMENT-TEXTDDC=DTANK-WILL-OVERFLOW-SOONCCONDITIONNIL,let tank-will-overflow-soon be a named conditionCSTATEMENT-NUMBER?FBACKTRACK-TO-GET-VALUE?B-1DBIDBJDBD BK BMBNBDDBDTANK-LEVEL-IS-RISINGBBlet tank-level-is-rising be a named conditionBFBB-1DBIDBJDBD BK lSBMBNBDDBDTANK-BOILINGBBlet tank-boiling be a named conditionBFBB-1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBFFFF&D DCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpB`MEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDSIMULATION-STATEMENTDBK BMBNBDDSIMULATECTANK-AREABFdlsimulate local TANK-AREA with 100BFB-FFF-FDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFFF-FDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FFF%FBDBDBBB-BDBDBIDBJDBDBK BMBNBDDBCF1FdDCPICON-WAVEFdFPF,simulate F1 with 100 then wave with central,value 100 and deviation 80 and period 5 minutesBF B-F F(FFNDDBDBBBFF F(FFNDDBDBBB-FF.FF;BDBDBBB-FF>FFKBDBDBBB-BDBDBIDBJDBDBK BMBNBDDBCF2FdDB FdF(F,simulate F2 with 100 then wave with central,value 100 and deviation 40 and period 5 minutesBF B-FFdFFDDBDBBBFFFdFFDDBDBBB-FFjFFwB?DBDBBB-FFzFFB@DBDBBB-BDBDBIDBJDBDBK BMBNBDDBCL1FDC+DC/DC*DC-B B8BFBdsimulate L1 with 500 then (F1 - F2 ) * TANK-AREA / 3600 + L1BF B-F F!FDDBDBBBFF F!FDDBDBBB-FFFFBpDCSURGE-TANKBFFFF=ÀSURGEDDIFFERENTIAL-PRESSURE-LEVEL-PORT-SENSORDSENSOR-TRACING-REQUESTSB-SENSOR-CURRENCY-INTERVALFFFFFBdDMAGNETIC-FLOWMETER-FLOW-THRU-SENSORDBB-FFmFF2B8DCCENTRIFUGAL-VARIABLE-COMPUTER-PUMPBFFFFPUMPDBDBB-FsFFUFB DACCUMULATORBFBFFTF_TANKD DCFLOW-PIPEBFBÂSURGE-TANK-MAIN-OUTPUTBFDCCONTROL-CONNECTIONBFBSURGE-TANK-METER-OUTPUTBFDBBFBSENSOR-CONTROLLER-CONNECTIONBFDBBFFÃTHRU-SENSOR-OUTPUT-CONNECTIONÂSURGE-TANK-MAIN-INPUTBDBBFBBBFDBBBFBCPUMP-CONTROLLER-CONNECTIONFDBBBFBÂPUMP-INPUT-CONNECTIONFDBBFFÂPUMP-OUTPUT-CONNECTIONTHRU-SENSOR-INPUT-CONNECTIONBDBBFF BÂACCUMULATOR-MAIN-INPUTBDBBFBBBFDBBF FACCUMULATOR-MAIN-OUTPUTBBDBBF FACCUMULATOR-METER-OUTPUTCPORT-SENSOR-INPUTFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "dwr" :CHARACTERS NIL :QFASLP NIL :LENGTH 1422 :CREATION-DATE 2727359667 :DIRECTORY "PICON-CLASS" :NAME "CLASS-SCHEMATIC" :TYPE "PIC" :VERSION 1) hưs2Dp,lFASD-DATADdwrRalph4FfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB 1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE iSAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK BMBNCNEXT-NEW-STATEMENT-NUMBERF CFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?,Class Schematic1DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBkDBK iSBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBsDBK iSBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB{DBK iSBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK iSBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK iSBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK iSBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK iSBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK iSBMBN1DBIDBJDCDEFINITIOND BK lSBMBNÁSTATEMENT-TEXTDDC=DTANK-BOILINGCCONDITIONNILlet tank-boiling be a named conditionCSTATEMENT-NUMBER?FBACKTRACK-TO-GET-VALUE?B-1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBFFFFDDCSURGE-TANKBFFFF=ÀSURGEDDIFFERENTIAL-PRESSURE-LEVEL-PORT-SENSORDSENSOR-TRACING-REQUESTSB-FFFFCL1DMAGNETIC-FLOWMETER-FLOW-THRU-SENSORBFFmFF2CF2DCCENTRIFUGAL-VARIABLE-COMPUTER-PUMPBFFFFPUMPDBBFsFFUFCF1DACCUMULATORBFBFFTF_TANKD DCFLOW-PIPEBBÂSURGE-TANK-MAIN-OUTPUTBFDCCONTROL-CONNECTIONBBSURGE-TANK-METER-OUTPUTBFDBBFBSENSOR-CONTROLLER-CONNECTIONBFDBBFÃTHRU-SENSOR-OUTPUT-CONNECTIONÂSURGE-TANK-MAIN-INPUTBDBBFBBBFDBBBFBCPUMP-CONTROLLER-CONNECTIONFDBBBFBÂPUMP-INPUT-CONNECTIONFDBBFFÂPUMP-OUTPUT-CONNECTIONTHRU-SENSOR-INPUT-CONNECTIONBDBBFFBÂACCUMULATOR-MAIN-INPUTBDBBFBBBFDBBFFACCUMULATOR-MAIN-OUTPUTBBDBBFFACCUMULATOR-METER-OUTPUTCPORT-SENSOR-INPUTFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 8 :AUTHOR "DWR" :QFASLP NIL :LENGTH 1841 :CREATION-DATE 2713524326 :CHARACTERS T :DIRECTORY "PICON-CLASS" :NAME "CONVENTIONS" :TYPE "TEXT" :VERSION 2) -*- Mode:Text; Fonts:(CPTFONTB) -*-Notations and Conventions Used in The Class Excercises------------------------------------------------------1) Notations for keys on the keyboard: is the blue key labelledSYSTEM"LINE"CLEAR SCREENand so on. Anytime you see somthing inside brackets (i.e. <>)this means that it is a key on the keyboard and not a string ofcharacters to by typed. For example means to press theblue key labelled SYSTEM rather than typing the characters system.2) Do Not Type the key unless it is specifically noted. In Lispa right paren. will close the expression and cause it to beevaluated without typeing . Also, in certain editor commands, as well as many other places (i.e. control keys) the key being depresed may cause you ploblems.3) The notation CTRL-a means to simultaneously depress the CTRL key and the "a" key.The same with META. To boot the machine, for example, you'll need to depressCTRL-META-CTRL-META- all at the same time.4) Mouse clicks are noted by "click LEFT" or "click RIGHT" using the mouse.5) Error handling:If you should ever see a display which looks similar to this:s-A: Give up on loading files-B, Return to ZMACS break loops-C: Return to top level editor command loops-D: Restart process ZMACS Frame 1s-E: Reset and Arrest process ZMACS Frame 1it indicates an error of some kind has been detected by this Lisp system and is trapping the condition giving an opportunity to examineit. Should this happen it is important to notify the class instructorof the condition so that the appropriate action can be taken. This courseis not intended to teach how to deal with such problems.LMFL(:BYTE-SIZE 8 :AUTHOR "dwr" :QFASLP NIL :LENGTH 706 :CREATION-DATE 2730913992 :CHARACTERS T :DIRECTORY "PICON-CLASS" :NAME "COURSE-SUMMARY" :TYPE "TEXT" :VERSION 1) This hands-on course is designed to train the student to use allthe facilities of PICON to build and maintain process knowledgebases. The emphasis of this course is placed upon the practical uses ofPICON in terms of building specific knowledge bases, as well ascustomizing PICON for a particular environment. Expert systemstechniques such as backward and forward chaining and rule inferencing, the frame system, and process equipment hierarchymanipulation are major highlights of the course. Customizationactivities such as building new graphics icons are taught as wellas techniques for constructing knowledge bases in an efficient and effective manner are all covered in this course. LMFL(:BYTE-SIZE 8 :AUTHOR "dwr" :QFASLP NIL :LENGTH 755 :CREATION-DATE 2730914608 :CHARACTERS T :DIRECTORY "PICON-CLASS" :NAME "COURSE-SUMMARY" :TYPE "TEXT" :VERSION 2) This hands-on course is designed to train the student to use allthe facilities of PICON to build and maintain process knowledgebases. The emphasis of this course is placed upon the practical uses ofPICON in terms of building specific knowledge bases, as well ascustomizing PICON for a particular environment. Expert systemstechniques such as backward and forward chaining and rule inferencing, the frame system, and process equipment hierarchymanipulation are major highlights of the course. Customizationactivities such as building new graphics icons are taught as wellas techniques for constructing knowledge bases in an efficient and effective manner are all covered in this course.[this was written in a flash for John Hotchkiss] LMFL(:BYTE-SIZE 16 :AUTHOR "DWR" :CHARACTERS NIL :QFASLP NIL :LENGTH 1629 :CREATION-DATE 2730382641 :DIRECTORY "PICON-CLASS" :NAME "EXERCISE-1" :TYPE "PIC" :VERSION 2) hưs2Dp,lFASD-DATADDWRRalph1UFfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB x1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE ?AUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK xBMBNCNEXT-NEW-STATEMENT-NUMBERFCFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDCEXERCISE-1FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?lExercise 11DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBnDBK ?BMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBvDBK ?BMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB~DBK ?BMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK ?BMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK ?BMBN1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMNILFFFFDDTHERMOCOUPLE-TEMPERATURE-PORT-SENSORDSENSOR-TRACING-REQUESTSB-SENSOR-CURRENCY-INTERVALFFFcFFECT1DCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBcMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDIF-THEN-RULED BK #?BMBNÁSTATEMENT-TEXTDDCIFDC>BFDDSENDDlTemperature in boiler is too highDDESTINATIONOPERATORlif T1 > 212 then ,send "Temperature in boiler is too high" to operatorCSTATEMENT-NUMBER?FPICON-RULE-SCAN-INTERVALFB-FFhFFDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFFhFFDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FFnF%F{BDBDBBB-FF~FFBDBDBBB-FFF:FBDBDBBB-BDBDBIDBJDSIMULATION-STATEMENTDBK ?BMBNBDDSIMULATEBBDCPICON-WAVEFFFX,simulate T1 with wave with central value 200 andldeviation 20 and period 10 minutesBFB-FF*FFPDDBDBBBFFF*FFPDDBDBBB-FF0FF=BDBDBBB-FF@FkFMBDBDBBB-BDBDBIDBJDFREE-TEXT-STATEMENTDBK xBMBNBExercise #1BFB-FEFFFDDBDBBBFFEFFFDDBDBBB-F:FFFB8DDCFLOW-PIPEBBBCPORT-SENSOR-INPUTFDCCONTROL-CONNECTIONBBSENSOR-CONTROLLER-CONNECTIONBFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "DWR" :CHARACTERS NIL :QFASLP NIL :LENGTH 2295 :CREATION-DATE 2730389103 :DIRECTORY "PICON-CLASS" :NAME "EXERCISE-10" :TYPE "PIC" :VERSION 1) hưs2Dp,lFASD-DATADDWRRalphpnFfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB x1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE LAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK xBMBNCNEXT-NEW-STATEMENT-NUMBERFCFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDEXERCISE-10FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?Exercise 101DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBnDBK LBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBvDBK LBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB~DBK LBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK LBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK LBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK LBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK LBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK LBMBN1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMNILFFFFDDCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBcMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDSIMULATION-STATEMENTDBK jMBMBNÁSTATEMENT-TEXTDDSIMULATECF1BDCPICON-WAVEFdF2F,simulate F1 with wave with central value 100 andldeviation 50 and period 20 minutesCSTATEMENT-NUMBER?FB-FFFFDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFFFFDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FFFFBDBDBBB-FFF9FBDMAGNETIC-FLOWMETER-FLOW-THRU-SENSORDSENSOR-TRACING-REQUESTSB-FFcF F(BDBDBBB-BDBDBIDBJDIF-THEN-RULED BK DIBMBNBDDCIFDCISCWAVE-STEPWAVE-INCREASINGDDSENDDlWave for F1 is increasingDDESTINATIONOPERATORlif wave-step is wave-increasing then send,"Wave for F1 is increasing" to operatorBFPICON-RULE-SCAN-INTERVALF B-FF$FqFDDBDBBBFFF$FqFDDBDBBB-FFFiFBDBDBBB-FFFfFB DBDBBB-BDBDBIDBJDBD BK oMBMBNBDDBDC>BDÁDELAYED-VALUEBFDDADVANCEBBlif f1 > f1 as of 15 seconds ago then advance stepvariable wave-step to wave-increasingBFB F B-FFZFF4DDBDBBBFFFZFF4DDBDBBB-FFTFFGB8DBDBBB-FFDFSF7B9DBDBBB-BDBDBIDBJDCDEFINITIONDBK qMBMBNBDDSTEP-VARIABLE-DEFINITIONBDCSTART-WAVEBWAVE-DECREASINGllet step variable wave-step be start-wave,,wave-increasing, wave-decreasingBFB-FFFyFkDDBDBBBFFFFyFkDDBDBBB-FFFqF~BdDBDBBB-FF{F&FnBeDBDBBB-BDBDBIDBJDINITIAL-RULEDBK MBMBNBDDCINITIALLYDDB4BB`DBDBegin wave monitoring.DBBinitially advance step variable wave-step to start-wave andlsend "Begin wave monitoring." to operatorBFB-FFFFDDBDBBBFFFFFDDBDBBB-FFF FBDBDBBB-FFFwFBDBDBBB-BDBDBIDBJDFREE-TEXT-STATEMENTDBK xBMBNBExercise #10BFB-FCFFFDDBDBBBFFCFFFDDBDBBB-F8FFFBDDCFLOW-PIPEBBFBTHRU-SENSOR-INPUT-CONNECTIONFDBBFBÃTHRU-SENSOR-OUTPUT-CONNECTIONBFDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "DWR" :CHARACTERS NIL :QFASLP NIL :LENGTH 3314 :CREATION-DATE 2730389176 :DIRECTORY "PICON-CLASS" :NAME "EXERCISE-11" :TYPE "PIC" :VERSION 1) hưs2Dp,lFASD-DATADDWRRalphnFfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB x1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE MAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK xBMBNCNEXT-NEW-STATEMENT-NUMBERFCFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDEXERCISE-11FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?Exercise 111DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBnDBK MBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBvDBK MBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB~DBK MBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK MBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK MBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK MBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK MBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK MBMBN1DBIDBJDCDEFINITIOND BK IBMBNÁSTATEMENT-TEXTDDC=DÃTANK-LEVEL-IS-RISING-TOO-FASTCCONDITIONNILlet tank-level-is-rising-too-fast be a named conditionCSTATEMENT-NUMBER?FBACKTRACK-TO-GET-VALUE?B-1DBIDBJDBD BK {RBMBNBDDBDÁCOMPUTED-LEVELNUMERICB,let computed-level be a numeric variableBF BBSAMPLING-INTERVAL-FOR-HISTORIC-REASONS?CINDEFINITE1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBFFFF?D DCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBcMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDSIMULATION-STATEMENTDBK RBMBNBDDSIMULATEÁSIM-TANK-AREABǀ@ simulate local sim-tank-area with 2.02BFB-FF"FF8DDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFF"FF8DDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FF(FF5BDBDBBB-BDBDBIDBJDIF-THEN-RULEDBK *:BMBNBDDCIFBDDSENDDTank overflow expected soon. Average = ~6F DCAVERAGED-VARIABLECF1F,FDDESTINATIONOPERATORCEVERY-TIME,if tank-level-is-rising-too-fast,then send "Tank overflow expected soon. Average = *** " ,with F1 averaged over 5 minutes using at least 4 values to operator every timeBFB-FFaFFDDBDBBBFFFaFFDDBDBBB-FF[F,FNBDBDBBB-FFKFF>BDBDBBB-FF;FF.BDBDBBB-FF+FFBDBDBBB-BDBDBIDBJDBD BK IBMBNBDDBDC>DELTA-LEVELFDDCONCLUDEBDBDTank level is rising too fast (~6F)BJDBB,if delta-level > 4 then lconclude tank-level-is-rising-too-fast andlsend "Tank level is rising too fast (***)", with delta-level to operatorBFPICON-RULE-SCAN-INTERVALFB-FFFFhDDBDBBBFFFFFhDDBDBBB-FFFFBUDBDBBB-FFFFBVDBDBBB-FFFF{BWDBDBBB-FFxF2FkBXDBDBBB-BDBDBIDBJDBD BK IBMBNBDDBBJDC-CL1DÁDELAYED-VALUEBFldelta-level = L1 - L1 as of 30 seconds agoBFBB-B-FFFFDDBDBBBFFFFFDDBDBBB-FFFFBDBDBBB-BDBDBIDBJDBDBK RBMBNBD DBB DBDCCL1DÁDELAYED-VALUEBF DDCONCLUDEBDDCONCLUDE-NOTBif L1 > L1 as of 10 seconds ago then conclude tank-is-filling lelse conclude not tank-is-fillingBFPICON-RULE-SCAN-INTERVALF B-FFF$FDDB.DB/BB0FFFF$FDDB7DB8BB-FFFFB%DB7DB8BB-FFF&FB&DBDB F B B-FFFFBDBDBBB-BDBDBIDBJDBD BK QBMBNBDDBDBBBif CLOCK > 0 then do nothingBF B)F B-F)FFFDDB.DB/BB0FF)FFFDDB7DB8BB-FFFFBVDBDBBB-BDBDBIDBJDB DBK xBMBNBExercise #12BFB-FBFFFDDB.DB/BB0FFBFFFDDB7DB8BB-F7FFFBuDBDBBB-BDBDBIDBJDSIMULATION-STATEMENTDBK RBMBNBDDSIMULATEBBTIME,simulate clock with timeBF B-FFF3FDDB.DB/BB0FFFF3FDDB7DB8BB-FFF;FBDBDBBB-BDBDBIDBJDBDBK {BMDBNBWBDDBBDBDCBDÁDELAYED-VALUEBF DDCONCLUDEBDBBxByDDCONCLUDE-NOTBlif L1 > L1 as of 10 seconds ago then conclude tank-is-filling andadvance step variable filling-step to fillinglelse conclude not tank-is-fillingBFPICON-RULE-SCAN-INTERVALF B-FFFDFDDBDBBBFFFFDFDDB#DB$B B-F FF<FBDB#DB$B B-FFFFBDB#DB$B B-FFF+FBDBDBB B-B DB DBIDBJDB DBK xBMBNBExercise #13BFB-F>FFFDDBDBBBFF>FFFDDB#DB$B B-F3FFFBDBDBB B-B DB DBIDBJDB/D BK QBMBNBDDB1DB{BBif CLOCK > 0 then do nothingBF BF B-FFFFDDBDBBBFFFFFDDB#DB$B B-FFFFBDBDBB B-B DB DBIDBJDSIMULATION-STATEMENTDBK RBMBNBDDSIMULATEBBTIME,simulate clock with timeBF B-FFF3FDDBDBBBFFFF3FDDB#DB$B B-FFF;FBDBDBB B-B DB DBIDBJDBDBK QBMBNBDDBBDB1DCCT1FDDCONCLUDEBDÀFOCUSB,if T1 > 212 then conclude tank-boiling land focus on TANKBFPICON-RULE-SCAN-INTERVALFB-FFF|FDDBDBBBFFFF|FDDBDBBB-FFFtFBMDBDBBB-FFFCFBNDCSURGE-TANKBFFxFgFBDTHERMOCOUPLE-TEMPERATURE-PORT-SENSORDSENSOR-TRACING-REQUESTSB-SENSOR-ENGINEERING-UNITÀON-OFFSENSOR-CURRENCY-INTERVALFFFFFBDByDBzB-FFF$FBDDBDBBB-BDBDBIDBJDSIMULATION-STATEMENTDBK oSBMBNBDDSIMULATEBDBDBCBDFFsimulate COOLER-SWITCH with 0 then if T1 > 212then 1 else 0BFB-F>F1FrFWDDBDBBBFF>F1FrFWDDBDBBB-F3F7FjFDBDBDBBB-F$FGFFTBDBDBBB-BDBDBIDBJDBDBK kSBMBNBDDBBDBDCPICON-WAVEFFF,simulate T1 with wave with central value 200 andldeviation 25 and period 20 minutesBFB-F?FFF"DDBDBBBFF?FFF"DDBDBBB-F4FF{FBDBDBBB-F%FF FBDBDBBB-BDBDBIDBJDBDBK xBMBNBExercise #14BFB-FBFFFDDBDBBBFFBFFFDDBDBBB-F7FFFBDDCFLOW-PIPEBBFBÂSURGE-TANK-MAIN-INPUTFDBBFBÂSURGE-TANK-MAIN-OUTPUTBFDCCONTROL-CONNECTIONBFFSURGE-TANK-METER-OUTPUTCPORT-SENSOR-INPUTBDBBBFBBDFGF&F{FFDDB BFBSENSOR-CONTROLLER-CONNECTIONBFDB BFBBBFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "DWR" :CHARACTERS NIL :QFASLP NIL :LENGTH 2514 :CREATION-DATE 2730389545 :DIRECTORY "PICON-CLASS" :NAME "EXERCISE-15" :TYPE "PIC" :VERSION 1) hưs2Dp,lFASD-DATADDWRRalph)pFfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB x1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE iSAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK xBMBNCNEXT-NEW-STATEMENT-NUMBERF CFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDEXERCISE-15FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?Exercise 151DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBnDBK iSBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBvDBK iSBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB~DBK iSBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK iSBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK iSBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK iSBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK iSBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK iSBMBN1DBIDBJDCDEFINITIOND BK lSBMBNÁSTATEMENT-TEXTDDC=DTANK-BOILINGCCONDITIONNILlet tank-boiling be a named conditionCSTATEMENT-NUMBER?FBACKTRACK-TO-GET-VALUE?B-1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBFFFFD DCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBcMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDSIMULATION-STATEMENTDBK oSBMBNBDDSIMULATEÁCOOLER-SWITCHDCIFDC>CT1FFsimulate COOLER-SWITCH with 0 then if T1 > 212then 1 else 0BFB-F>FIFrFoDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFF>FIFrFoDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-F3FOFjF\BDBDBBB-F$F_FFlBDTHERMOCOUPLE-TEMPERATURE-PORT-SENSORDSENSOR-TRACING-REQUESTSB-SENSOR-ENGINEERING-UNITÀON-OFFSENSOR-CURRENCY-INTERVALFF,FFJFBDBDBB-F*FgF FBDBDBBB-BDBDBIDBJDBDBK kSBMBNBDDBBBDCPICON-WAVEFFF,simulate T1 with wave with central value 200 andldeviation 25 and period 20 minutesBFB-F?FtFFDDBDBBBFF?FtFFDDBDBBB-F4FzF{FBDBDBBB-F%FF FBDBDBBB-BDBDBIDBJDFREE-TEXT-STATEMENTDBK rSBMBNBl2BFB-FFFFDDBDBBBFFFFFDDBDBBB-F FFFBCDBDBBB-BDBDBIDBJDIF-THEN-RULED BK zSBMBNBDDBDBBFDDSENDDCooler appears to be malfunctioning.DDESTINATIONOPERATORlif cooler-switch = 1 then ,send "Cooler appears to be malfunctioning." to operatorCSTATEMENT-KEYWORDSUNSPECIFIEDSTATEMENT-CATEGORIESÁCHECK-COOLINGBFB-FFFFqDDBDBBBFFFFFqDDBDBBB-FFFFBlDBDBBB-FFFFtBmDBDBBB-BDBDBIDBJDBADBK rSBMBNBl1BF B-FFFFDDBDBBBFFFFFDDBDBBB-F FFFBDBDBBB-BDBDBIDBJDB_D BK ySBMBNBDDBDBBFDDCONCLUDEBDACTIVATEDBCATEGORYBr,if T1 > 212 then conclude tank-boiling ,and activate check-cooling rulesBFPICON-RULE-SCAN-INTERVALFB-FFFyFDDBDBBBFFFFyFDDBDBBB-FFFqFBDBDBBB-FFFAFBDBDBBB-BDBDBIDBJDBADBK xBMBNBExercise #15BFB-FHFFFDDBDBBBFFHFFFDDBDBBB-F=FFFBDCSURGE-TANKBFFxFgFTANKDDCFLOW-PIPEBBFBCPORT-SENSOR-INPUTDF.FFeDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFDBBFBBBFDBBF FSURGE-TANK-METER-OUTPUTB FDBBBF BÂSURGE-TANK-MAIN-INPUTFqDBBF BÂSURGE-TANK-MAIN-OUTPUTBFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "DWR" :CHARACTERS NIL :QFASLP NIL :LENGTH 1970 :CREATION-DATE 2730390631 :DIRECTORY "PICON-CLASS" :NAME "EXERCISE-16" :TYPE "PIC" :VERSION 1) hưs2Dp,lFASD-DATADDWRRalphltFfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB x1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE SAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK xBMBNCNEXT-NEW-STATEMENT-NUMBERFCFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDEXERCISE-16FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?Exercise 161DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBnDBK SBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBvDBK SBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB~DBK SBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK SBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK SBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK SBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK SBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK SBMBN1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMNILFFFFDDCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBcMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDIF-THEN-RULED BK p:BMBNÁSTATEMENT-TEXTDDCIFDC>CF1DCCOMPOUND-VARIABLEBSETPOINTDDSENDDlF1 exceeds setpoint by ~6FDC-BDBBBDDESTINATIONOPERATORCEVERY-TIMElif F1 > F1 setpoint then send "F1 exceeds setpoint by ***"with F1 - F1 setpoint to operator every timeCSTATEMENT-NUMBER?FPICON-RULE-SCAN-INTERVALFB-FFF FDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFFF FDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FFFFBDBDBBB-FFFFBDBDBBB-BDBDBIDBJDSIMULATION-STATEMENTDBK WBMBNBDDSIMULATEBBDCPICON-WAVEFdFF,simulate F1 with wave with central value 100 andldeviation 20 and period 8 minutesBFB-F/FFFDDBDBBBFF/FFFDDBDBBB-F$FFFBDBDBBB-FFFFBDBDBBB-BDBDBIDBJDBDBK WBMBNBDDBF1-4BFdsimulate F1 setpoint with 100BFB-F0FFFDDBDBBBFF0FFFDDBDBBB-F%FF!FB/DMAGNETIC-FLOWMETER-FLOW-THRU-SENSORDSENSOR-TRACING-REQUESTSB-FF_FFBDCR-L-1-IN-1-OUT-FEEDBACK-CONTROLLERBF9F9FaFaBDON-OFF-CONTROL-VALVEBFFvF"FCV1DBDBBB-BDBDBIDBJDFREE-TEXT-STATEMENTDBK xBMBNBExercise #16BFB-F<FFFDDBDBBBFF<FFFDDBDBBB-F1FFFBcDDCFLOW-PIPEBFBÃTHRU-SENSOR-OUTPUT-CONNECTIONBFDCCONTROL-CONNECTIONBFFSENSOR-CONTROLLER-CONNECTIONCONTROLLER-INPUTBDBBFFCCONTROLLER-OUTPUTVALVE-CONTROL-CONNECTIONBDBBBFBÁSETPOINT-INPUTFDBBBFBÂVALVE-INPUT-CONNECTIONFDBBFFVALVE-OUTPUT-CONNECTIONTHRU-SENSOR-INPUT-CONNECTIONBB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "DWR" :CHARACTERS NIL :QFASLP NIL :LENGTH 2563 :CREATION-DATE 2730390226 :DIRECTORY "PICON-CLASS" :NAME "EXERCISE-17" :TYPE "PIC" :VERSION 1) hưs2Dp,lFASD-DATADDWRRalphrFfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB x1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE SAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK xBMBNCNEXT-NEW-STATEMENT-NUMBERFCFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDEXERCISE-17FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?Exercise 171DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBnDBK SBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBvDBK SBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB~DBK SBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK SBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK SBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK SBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK SBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK SBMBN1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMNILFFFFD DCR-L-1-IN-1-OUT-FEEDBACK-CONTROLLERD SETPOINT-LOW-LIMIT?FPSETPOINT-HIGH-LIMIT?FdCSETPOINT-MINIMUM-INTERVAL-BETWEEN-CHANGES?FSETPOINT-MAXIMUM-CHANGE-PER-ADJUSTMENT?ǀPDISPLAY-SETPOINT-VALUESB-FlFqFFF1-XDMAGNETIC-FLOWMETER-FLOW-THRU-SENSORDSENSOR-TRACING-REQUESTSB-FFFFCF1DON-OFF-CONTROL-VALVEBF?FF]FCV1DCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBcMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDFREE-TEXT-STATEMENTDBK ):BMBNÁSTATEMENT-TEXTl4CSTATEMENT-NUMBER?F B-F6FFFnDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFF6FFFnDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-F+F~F#FqBDBDBBB-BDBDBIDBJDSIMULATION-STATEMENTDBK WBMBNBDDSIMULATEBBDCPICON-WAVEFdFF,simulate F1 with wave with central value 100 andldeviation 20 and period 8 minutesBFB-FFFF^DDBDBBBFFFFF^DDBDBBB-F F~FFqB DBDBBB-FFnF,FaB DBDBBB-BDBDBIDBJDBDBK ):BMBNBl3BF B-F6FFFDDBDBBBFF6FFFDDBDBBB-F+FF#FB/DBDBBB-BDBDBIDBJDBDBK WBMBNBDDBF1-4FdDCCOMPOUND-VARIABLEBSETPOINTsimulate F1 setpoint with 100 then F1 setpointBFB-FFFFDDBDBBBFFFFFDDBDBBB-F FFFBRDBDBBB-BDBDBIDBJDCUNCONDITIONAL-RULED BK .WBMBNBDDCIFTRUEDDSET-SETPOINTBDC+FdSETPOINT-CHANGE,set F1 setpoint = 100 + setpoint-changeBF PICON-RULE-SCAN-INTERVALFB-FFFZFDDBDBBBFFFFZFDDBDBBB-F FFRFB{DBDBBB-BDBDBIDBJDBDBK WBMBNBl2BFB-F6FFFDDBDBBBFF6FFFDDBDBBB-F+FF#FBDBDBBB-BDBDBIDBJDBDBK WBMBNBl1BFB-F6FFFDDBDBBBFF6FFFDDBDBBB-F+FF#FBDBDBBB-BDBDBIDBJDCDEFINITIOND BK -WBMBNBDDC=BvDC-FdBlsetpoint-change = 100 - F1BF BACKTRACK-TO-GET-VALUE?B-B-FFFFDDBDBBBFFFFFDDBDBBB-F FF#FBDBDBBB-BDBDBIDBJDBDBK xBMBNBExercise #17BFB-F>FFFDDBDBBBFF>FFFDDBDBBB-F3FFFBDDCCONTROL-CONNECTIONBFCCONTROLLER-OUTPUTVALVE-CONTROL-CONNECTIONBDBBBBÁSETPOINT-INPUTFDCFLOW-PIPEBFBÃTHRU-SENSOR-OUTPUT-CONNECTIONBFDBBFSENSOR-CONTROLLER-CONNECTIONCONTROLLER-INPUTBDB!BBFBÂVALVE-INPUT-CONNECTIONFDB!BFFVALVE-OUTPUT-CONNECTIONTHRU-SENSOR-INPUT-CONNECTIONBB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "DWR" :CHARACTERS NIL :QFASLP NIL :LENGTH 1674 :CREATION-DATE 2730390292 :DIRECTORY "PICON-CLASS" :NAME "EXERCISE-18" :TYPE "PIC" :VERSION 1) hưs2Dp,lFASD-DATADDWRRalphsFfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB x1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE ~?AUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK xBMBNCNEXT-NEW-STATEMENT-NUMBERFCFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDEXERCISE-18FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?Exercise 181DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBnDBK ~?BMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBvDBK ~?BMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB~DBK ~?BMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK ~?BMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK ~?BMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK ~?BMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK ~?BMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK ~?BMBN1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMNILFFFFDDTHERMOCOUPLE-TEMPERATURE-PORT-SENSORDSENSOR-TRACING-REQUESTSB-SENSOR-CURRENCY-INTERVALFFFFFT12DCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBcMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDIF-THEN-RULED BK ?BMBNÁSTATEMENT-TEXTDDCIFDC>BFdDDSENDDThe square root of T12 is ~6FDFUNCALLDBJSQUARE-ROOTBDDESTINATIONOPERATORCEVERY-TIME,if T12 > 100 then send "The square root of T12 is ***" with call square-root (T12) to operator every timeCSTATEMENT-NUMBER?FPICON-RULE-SCAN-INTERVALF<B-F'FFF(DDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFF'FFF(DDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FFFNFBDBDBBB-F FFFBDBDBBB-F FFHF%BDBDBBB-BDBDBIDBJDSIMULATION-STATEMENTDBK ?BMBNBDDSIMULATEBBDCPICON-WAVEFdF2F,lsimulate T12 with wave with central value 100 andldeviation 50 and period 5 minutesBFB-FFZFF4DDBDBBBFFFZFF4DDBDBBB-FFTFFGBDBDBBB-FFDFLF7BDBDBBB-BDBDBIDBJDFREE-TEXT-STATEMENTDBK xBMBNBExercise #18BFB-F@FFFDDBDBBBFF@FFFDDBDBBB-F5FFFB=DDCFLOW-PIPEBBBCPORT-SENSOR-INPUTFDCCONTROL-CONNECTIONBBSENSOR-CONTROLLER-CONNECTIONBFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "dwr" :CHARACTERS NIL :QFASLP NIL :LENGTH 3201 :CREATION-DATE 2731005770 :DIRECTORY "PICON-CLASS" :NAME "EXERCISE-19" :TYPE "PIC" :VERSION 2) hưs2Dp,lFASD-DATADgazMiloKFfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB K1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE SAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK KBMDBNGAZCNEXT-NEW-STATEMENT-NUMBERF"CFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDEXERCISE-19FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?Exercise 191DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBpDBK SBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBxDBK SBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDBDBK SBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK SBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK SBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK SBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK SBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK SBMBN1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMNILFFFFDDCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBeMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDFREE-TEXT-STATEMENTDBK xBMBNÁSTATEMENT-TEXTExercise 19CSTATEMENT-NUMBER?F!B-FFF4FDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFFF4FDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FFF,FBDBDBBB-BDBDBIDBJDIF-THEN-RULED BK /BMGMSBDDCIFDC>DC+CV1CF1DCCOMPOUND-VARIABLEBSETPOINTBif v1 + f1 + f1 setpoint > 0.0 then ldo nothingBFPICON-RULE-SCAN-INTERVALFB-FF#F?FIDDBDBBBFFF#F?FIDDBDBBB-FF)FGF6BDBDBBB-F{F9F"FFBDBDBBB-BDBDBIDBJDCUNCONDITIONAL-RULED BK JBMDBBNBWBDDBTRUEDDSET-SETPOINTBDFUNCALLDBJCGET-VALUEset F1 setpoint = call get-value ()BFBF B-FFFHFDDBDBBBFFFFHFDDBDBBB-FF FPFB#DÁOUTPUT-DISPLAYDSENSOR-TRACING-REQUESTSB-SENSOR-CURRENCY-INTERVALFF'FFFBDON-OFF-CONTROL-VALVEBFFFF7FhBDMAGNETIC-FLOWMETER-FLOW-THRU-SENSORDBBB-CSENSOR-FAILURE-ACTION-LISTDDDSENDD~6FÀERRORDDESTINATIONOPERATORCEVERY-TIMElsend "***" with error to operator levery timeFF/FFjBDCR-L-1-IN-1-OUT-FEEDBACK-CONTROLLERD SETPOINT-LOW-LIMIT?SETPOINT-HIGH-LIMIT?FdCSETPOINT-MINIMUM-INTERVAL-BETWEEN-CHANGES?F SETPOINT-MAXIMUM-CHANGE-PER-ADJUSTMENT?FdDISPLAY-SETPOINT-VALUESB-FQF!FyFF1-XDBDBBB-BDBDBIDBJDSIMULATION-STATEMENTDBK k)BMBBDDSIMULATEBF2DBDC*FdBDCPICON-WAVEF lsimulate f1 with 50 then 100*v1 + wave with central value 0 and deviation 2.0 and period 12 seconds,BFB-FFWF1FDDBDBBBFFFWF1FDDBDBBB-FFQFZFDBDBDBBB-F|FAFoF4BDBDBBB-F|F1F9F$BDBDBBB-F|F!F}FBDBDBBB-BDBDBIDBJDBwDBK a)BMBBDDByERR1-OLDERR1lsimulate err1-old with 0 then err1BFB-FFvFRF`DDBDBBBFFFvFRF`DDBDBBB-FFpFZFcBDBDBBB-BDBDBIDBJDBwDBK g)BMBBDDByBDMAXDMINDBBDB{CK1DBDC-BBDC/DB{CDELTA-TIMEBTAU1simulate v1 with .5 then max(0.0, min(1.0, v1 + K1 * ((err1 - err1-old) + delta-time * err1 / tau1)))BFB-FFFF}DDBDBBBFFFFF}DDBDBBB-FFF FBDBDBBB-F|FFFBDBDBBB-BDBDBIDBJDBwDBK g)BMBBDDByBDBBDBBBlsimulate err1 with 0 then f1 - f1 setpointBFB-FFF FDDBDBBBFFFF FDDBDBBB-FFFFBDBDBBB-BDBDBIDBJDBwDBK b)BMBBDDByB@@lsimulate tau1 with 20.0 then 20.0BFB-FFF[FDDBDBBBFFFF[FDDBDBBB-FFFcFB7DBDBBB-BDBDBIDBJDBwDBK o)BMBBDDByBnr?5lsimulate k1 with -.001 then -.007BFB-FFF[FDDBDBBBFFFF[FDDBDBBB-FFFcFBXDBDBBB-BDBDBIDBJDBwDBK ")BMDBNBBDDByF1-4F2DBBBsimulate F1 setpoint with 50 then F1 setpointBFB-FFFFDDBDBBBFFFFFDDBDBBB-FFF F B{DDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFDCFLOW-PIPEBBFBÂVALVE-INPUT-CONNECTIONFDBBFFVALVE-OUTPUT-CONNECTIONTHRU-SENSOR-INPUT-CONNECTIONBDBBFBÃTHRU-SENSOR-OUTPUT-CONNECTIONBFDBBFFBCONTROLLER-INPUTBDBBFFCCONTROLLER-OUTPUTVALVE-CONTROL-CONNECTIONBDBBBFBÁSETPOINT-INPUTFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "DWR" :CHARACTERS NIL :QFASLP NIL :LENGTH 1682 :CREATION-DATE 2730382729 :DIRECTORY "PICON-CLASS" :NAME "EXERCISE-2" :TYPE "PIC" :VERSION 1) hưs2Dp,lFASD-DATADDWRRalphUFfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB x1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE ?AUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK xBMBNCNEXT-NEW-STATEMENT-NUMBERFCFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDCEXERCISE-2FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?lExercise 21DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBnDBK ?BMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBvDBK ?BMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB~DBK ?BMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK UBMBNWARNING-MESSAGE-REPEAT-INTERVALF<1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK ?BMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK ?BMBN1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMNILFFFFDDCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBcMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDSIMULATION-STATEMENTDBK plBMBNÁSTATEMENT-TEXTDDSIMULATEÀPORT-1DCIFDCBDDSENDDPORT-1 is reading ~6FBDDESTINATIONOPERATORCEVERY-TIME,if PORT-1 > 0 then send "PORT-1 is reading ***" with PORT-1 tooperator every timeBFPICON-RULE-SCAN-INTERVALFB-FFYFFDDBDBBBFFFYFFDDBDBBB-FF_F3FlBDBDBBB-FFoFF|BDBDBBB-FFFFBDTHERMOCOUPLE-TEMPERATURE-PORT-SENSORDSENSOR-TRACING-REQUESTSB-FFhFFJBDBDBBB-BDBDBIDBJDFREE-TEXT-STATEMENTDBK xBMBNBExercise #2BFB-FEFFFDDBDBBBFFEFFFDDBDBBB-F:FFFBGDDCFLOW-PIPEBBFBCPORT-SENSOR-INPUTFDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "DWR" :CHARACTERS NIL :QFASLP NIL :LENGTH 1700 :CREATION-DATE 2730382837 :DIRECTORY "PICON-CLASS" :NAME "EXERCISE-3" :TYPE "PIC" :VERSION 1) hưs2Dp,lFASD-DATADDWRRalphUFfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB x1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE ?AUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK xBMBNCNEXT-NEW-STATEMENT-NUMBERFCFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDCEXERCISE-3FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?lExercise 31DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBnDBK ?BMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBvDBK ?BMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB~DBK ?BMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK lBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK ?BMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK ?BMBN1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMNILFFFFDDCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBcMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDSIMULATION-STATEMENTDBK wlBMBNÁSTATEMENT-TEXTDDSIMULATECF1BDCPICON-WAVEFF2FX,simulate F1 with wave with central value 200 andldeviation 50 and period 10 minutesCSTATEMENT-NUMBER?FB-FF FF1DDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFF FF1DDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FFFFBDBDBBB-FF!FvF.BDBDBBB-BDBDBIDBJDBDBK xlBMBNBDDBCP1DMAXDC*ǀYBlsimulate P1 with 0 then max (0, .35 * F1)BF B-FF FF DDBDBBBFFF FF DDBDBBB-FFFF BDCGUAGE-PRESSURE-THRU-SENSORDSENSOR-TRACING-REQUESTSB-F(FFFFyBDMAGNETIC-FLOWMETER-FLOW-THRU-SENSORDBB-FFFF(FnBDCCENTRIFUGAL-VARIABLE-COMPUTER-PUMPBFFFFXBDBDBBB-BDBDBIDBJDFREE-TEXT-STATEMENTDBK xBMBNBExercise #3BFB-FEFFFDDBDBBBFFEFFFDDBDBBB-F:FFFB.DDCFLOW-PIPEBFBÃTHRU-SENSOR-OUTPUT-CONNECTIONBFDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFDBKBFFBMTHRU-SENSOR-INPUT-CONNECTIONBDBPBFBBRBFDBPBBFBCPUMP-CONTROLLER-CONNECTIONFDBKBBFBÂPUMP-INPUT-CONNECTIONFDBKBFFÂPUMP-OUTPUT-CONNECTIONBWBB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "DWR" :CHARACTERS NIL :QFASLP NIL :LENGTH 1800 :CREATION-DATE 2730382934 :DIRECTORY "PICON-CLASS" :NAME "EXERCISE-4" :TYPE "PIC" :VERSION 2) hưs2Dp,lFASD-DATADDWRRalphVVFfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB x1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE ?AUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK xBMBNCNEXT-NEW-STATEMENT-NUMBERFCFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDCEXERCISE-4FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?lExercise 41DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBnDBK ?BMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBvDBK ?BMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB~DBK ?BMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK lBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK ?BMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK ?BMBN1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMNILFFFFDDCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBcMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDSIMULATION-STATEMENTDBK ;BMBNÁSTATEMENT-TEXTDDSIMULATECL1BDCPICON-WAVEFdF2FX,simulate L1 with wave with central value 100 andldeviation 50 and period 10 minutesCSTATEMENT-NUMBER?FB-FFFFDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFFFFDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FFFFBDBDBBB-FFFFBDBDBBB-BDBDBIDBJDIF-THEN-RULED BK 7BMBNBDDCIFCL1-IS-HIGHDDSENDDlL1 is reading high at ~6FBDDESTINATIONOPERATORCEVERY-TIMEif l1-is-high then send "L1 is reading high at ***" with L1 to operator every timeBFPICON-RULE-SCAN-INTERVALFCPICON-RULE-ALERT-INTERVALF B-FFHF#F"DDBDBBBFFFHF#F"DDBDBBB-FFBFF5BDBDBBB-FF2FdF%BDBDBBB-BDBDBIDBJDCDEFINITIOND BK ;BMBNBDDC=DBCCONDITIONDC>BFdlet condition l1-is-high = L1 > 100BFBACKTRACK-TO-GET-VALUE?B-B-FFoFFYDDBDBBBFFFoFFYDDBDBBB-FFiFF\B/DDIFFERENTIAL-PRESSURE-LEVEL-PORT-SENSORDSENSOR-CURRENCY-INTERVALF SENSOR-TRACING-REQUESTSB-FFF FBDBDBBB-BDBDBIDBJDFREE-TEXT-STATEMENTDBK xBMBNBExercise #4BFB-FEFFFDDBDBBBFFEFFFDDBDBBB-F:FFFBYDDCFLOW-PIPEBBFBCPORT-SENSOR-INPUTFDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "DWR" :CHARACTERS NIL :QFASLP NIL :LENGTH 3050 :CREATION-DATE 2730382989 :DIRECTORY "PICON-CLASS" :NAME "EXERCISE-5" :TYPE "PIC" :VERSION 1) hưs2Dp,lFASD-DATADDWRRalphVFfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB x1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE ?AUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK xBMBNCNEXT-NEW-STATEMENT-NUMBERFCFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDCEXERCISE-5FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?lExercise 51DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBnDBK ?BMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBvDBK ?BMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB~DBK ?BMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK lBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK ?BMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK ?BMBN1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMNILFFFFDDCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBcMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDFREE-TEXT-STATEMENTDBK !BMBNÁSTATEMENT-TEXTl3CSTATEMENT-NUMBER?FB-F1FYFFoDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFF1FYFFoDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-F&F_FFlBDBDBBB-BDBDBIDBJDIF-THEN-RULED BK "BMBNBDDCIFDANDTANK-LEVEL-IS-RISINGDC>CL1F5DDSENDDThere is a fluid balance problem. It appears that the tank is filling up rather than remaining constant.DDESTINATIONOPERATOR,if tank-level-is-rising and L1 > 53 then send "There is a fluid balance problem. It appears ,that the tank is filling up rather than ,remaining constant." to operatorCSTATEMENT-KEYWORDSTANKBFB-FFYFFDDBDBBBFFFYFFDDBDBBB-FF_FFlBDBDBBB-FFoFF|BDBDBBB-FFFrFBDBDBBB-FFF*FBDBDBBB-BDBDBIDBJDBDBK [;BMBNBl2BFB-F2FFF2DDBDBBBFF2FFF2DDBDBBB-F'F"FF/B(DBDBBB-BDBDBIDBJDBDBK [;BMBNBl1BFB-F3F FF DDBDBBBFF3F FF DDBDBBB-F(FF F BEDBDBBB-BDBDBIDBJDCDEFINITIOND BK "BMBNBDDC=DBCCONDITIONDBBDÁDELAYED-VALUEBFllet condition tank-level-is-rising = L1 > ,L1 as of 30 seconds agoBFBACKTRACK-TO-GET-VALUE?B-B-FFF|FCDDBDBBBFFFF|FCDDBDBBB-FF#FtF0BkDBDBBB-FF3F(F@BlDBDBBB-BDBDBIDBJDBD BK K;BMBNBDDBDBDABSDC-CF1CF2FDDÀFOCUSB,if abs (F1 - F2) > 4 then focus on TANKBFPICON-RULE-SCAN-INTERVALFB-FF FaF DDBDBBBFFF FaF DDBDBBB-FFFYF BDMAGNETIC-FLOWMETER-FLOW-THRU-SENSORDSENSOR-TRACING-REQUESTSB-FFFFdBDBDBB-FFWFFBDDIFFERENTIAL-PRESSURE-LEVEL-PORT-SENSORDSENSOR-CURRENCY-INTERVALFBB-FeFFFBDACCUMULATORBFqFaF%F/BDBDBBB-BDBDBIDBJDSIMULATION-STATEMENTDBK 3;BMBNBDDSIMULATEBBDCPICON-WAVEFF Fh,simulate F1 with wave with central value 130 andldeviation 12 and period 6 minutesBFB-FFpFFDDBDBBBFFFpFFDDBDBBB-FFvFFBDBDBBB-FFF#FBDBDBBB-BDBDBIDBJDBDBK >;BMBNBDDBBF2DC+DC/DBBBFBsimulate L1 with 50 then (F1 - F2) / 3600 + L1BFB-F FNFFdDDBDBBBFF FNFFdDDBDBBB-FFTFFaBDBDBBB-BDBDBIDBJDBDBK 8;BMBNBDDBBBDBFnF Fh,simulate F2 with wave with central value 110 andldeviation 32 and period 6 minutesBFB-F FFFCDDBDBBBFF FFFCDDBDBBB-FF#FF0B2DBDBBB-FF3F"F@B3DBDBBB-BDBDBIDBJDBDBK xBMBNBExercise #5BFB-FFFFFDDBDBBBFFFFFFDDBDBBB-F;FFFBWDDCFLOW-PIPEBFF ÃTHRU-SENSOR-OUTPUT-CONNECTIONÂACCUMULATOR-MAIN-INPUTBDBtBBFBTHRU-SENSOR-INPUT-CONNECTIONFDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFDBtBFBBwBFDB~BFBBBFDBtBF FACCUMULATOR-MAIN-OUTPUTB{BDB~BFBBBFDB~BF FACCUMULATOR-METER-OUTPUTCPORT-SENSOR-INPUTFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "DWR" :CHARACTERS NIL :QFASLP NIL :LENGTH 2705 :CREATION-DATE 2730383178 :DIRECTORY "PICON-CLASS" :NAME "EXERCISE-6" :TYPE "PIC" :VERSION 1) hưs2Dp,lFASD-DATADDWRRalphJWFfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB "x1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE ?AUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK "xBMBNCNEXT-NEW-STATEMENT-NUMBERF#CFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDCEXERCISE-6FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?lExercise 61DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBnDBK ?BMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBvDBK ?BMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB~DBK ?BMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK lBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK ?BMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK ?BMBN1DBIDBJDCDEFINITIOND BK b;BMBNÁSTATEMENT-TEXTDDC=DLEVEL-IS-INCREASINGCCONDITIONNILlet level-is-increasing be a named conditionCSTATEMENT-NUMBER?FBACKTRACK-TO-GET-VALUE?B-1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBFFFFD DCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBcMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDFREE-TEXT-STATEMENTDBK e;BMBNBl2BF B-F1FFFDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFF1FFFDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-F&FFFBDBDBBB-BDBDBIDBJDIF-THEN-RULEDBK d;BMBNBDDCIFBDDSENDD,The tank level is now increasing - Check limitsDDESTINATIONOPERATOR,if level-is-increasing then send,"The tank level is now increasing - Check limits" to operatorBFB-FFFF'DDBDBBBFFFFF'DDBDBBB-FF FFBDBDBBB-FFFFBDBDBBB-FFFF$BDBDBBB-BDBDBIDBJDBD BK c;BMBNBDDBDC>CF1CF2DDCONCLUDEBif F1 > F2 then conclude level-is-increasingBFPICON-RULE-SCAN-INTERVALFB-FF5FFDDBDBBBFFF5FFDDBDBBB-FF/FF"B0DBDBBB-BDBDBIDBJDBDBK e;BMBNBl1BFB-F1F6FF DDBDBBBFF1F6FF DDBDBBB-F&F0FF#BPDMAGNETIC-FLOWMETER-FLOW-THRU-SENSORDSENSOR-TRACING-REQUESTSB-FF~F FCB*DDIFFERENTIAL-PRESSURE-LEVEL-PORT-SENSORDSENSOR-CURRENCY-INTERVALFBmB-FFFFCL1DBlDBmB-FFF~FB)DACCUMULATORBFNFFHFVTANKDBDBBB-BDBDBIDBJDSIMULATION-STATEMENTDBK y;BMBNBDDSIMULATEB)BDCPICON-WAVEFsF FhFh,simulate F1 with wave with central value 115 and,deviation 12 and period 6 minutes and phase 360BFB-FFpFFDDBDBBBFFFpFFDDBDBBB-FFvFFBDBDBBB-FFFFBDBDBBB-BDBDBIDBJDBDBK >;BMBNBDDBB|F2DC+DC/DC-B)B*FB|simulate L1 with 50 then (F1 - F2) / 3600 + L1BFB-F FNFFdDDBDBBBFF FNFFdDDBDBBB-FFTFFaBDBDBBB-BDBDBIDBJDBDBK y;BMBNBDDBB*BDBFnFFh,simulate F2 with wave with central value 110 andldeviation 22 and period 6 minutesBFB-F FFFCDDBDBBBFF FFFCDDBDBBB-FF#FF0BDBDBBB-FF3F"F@BDBDBBB-BDBDBIDBJDBDBK !xBMBNBExercise #6BFB-FFFFFDDBDBBBFFFFFFDDBDBBB-F;FFFB DDCFLOW-PIPEBFBÃTHRU-SENSOR-OUTPUT-CONNECTIONBFDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFDB/BFBB1BFDB*BBFBTHRU-SENSOR-INPUT-CONNECTIONFDB*BFFB,ÂACCUMULATOR-MAIN-INPUTBDB/BFBB1BFDB*BFFACCUMULATOR-MAIN-OUTPUTB8BDB/BFFACCUMULATOR-METER-OUTPUTCPORT-SENSOR-INPUTFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "DWR" :CHARACTERS NIL :QFASLP NIL :LENGTH 1837 :CREATION-DATE 2730383264 :DIRECTORY "PICON-CLASS" :NAME "EXERCISE-7" :TYPE "PIC" :VERSION 1) hưs2Dp,lFASD-DATADDWRRalphWFfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB #x1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE ?AUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK #xBMBNCNEXT-NEW-STATEMENT-NUMBERF%CFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDCEXERCISE-7FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?lExercise 71DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBnDBK ?BMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBvDBK ?BMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB~DBK ?BMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK lBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK ?BMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK ?BMBN1DBIDBJDCDEFINITIOND BK b;BMBNÁSTATEMENT-TEXTDDC=DLEVEL-IS-INCREASINGCCONDITIONNILlet level-is-increasing be a named conditionCSTATEMENT-NUMBER?FBACKTRACK-TO-GET-VALUE?B-1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBFFFFDDCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBcMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDÁWHENEVER-RULED BK ;BMBNBDDWHENEVERPRESSUREDF PSIGDDSENDDlPressure IncreaseDDESTINATIONOPERATORDDBDlPressure DecreaseDBBwhenever PRESSURE varies by 10 psig: if increase then send "Pressure Increase" to operator; if decrease then send "Pressure Decrease" tol operatorBF$PICON-RULE-SCAN-INTERVALFB-FF5FFDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFF5FFDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FF;FFHBDBDBBB-FFKFFXBDBDBBB-FF[F)FhBDBDBBB-FFkFFxBDBDBBB-FF{F;FBDBDBBB-BDBDBIDBJDSIMULATION-STATEMENTDBK ;BMBNBDDSIMULATEBBDCPICON-WAVEFFdFXsimulate PRESSURE with wave with central value1000 and deviation 100 and period 10 minutesBF#B-FF"FFDDBDBBBFFF"FFDDBDBBB-FFFFB+DBDBBB-FF FFB,DCGUAGE-PRESSURE-PORT-SENSORDSENSOR-TRACING-REQUESTSB-SENSOR-CURRENCY-INTERVALF F FF'FeBDBDBBB-BDBDBIDBJDFREE-TEXT-STATEMENTDBK #xBMBNBExercise #7BFB-FFFFFDDBDBBBFFFFFFDDBDBBB-F;FFFB[DDCFLOW-PIPEBBFBCPORT-SENSOR-INPUTFDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "DWR" :CHARACTERS NIL :QFASLP NIL :LENGTH 2591 :CREATION-DATE 2730383388 :DIRECTORY "PICON-CLASS" :NAME "EXERCISE-8" :TYPE "PIC" :VERSION 1) hưs2Dp,lFASD-DATADDWRRalphXFfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB %x1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE ?AUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK %xBMBNCNEXT-NEW-STATEMENT-NUMBERFCFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDCEXERCISE-8FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?lExercise 81DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBnDBK ?BMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBvDBK ?BMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB~DBK ?BMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK ?BMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK ?BMBN1DBIDBJDCDEFINITIOND BK .BMBNÁSTATEMENT-TEXTDDC=DCSTART-TIMENUMERICNILlet start-time be a numeric variableCSTATEMENT-NUMBER?FBACKTRACK-TO-GET-VALUE?BSAMPLING-INTERVAL-FOR-HISTORIC-REASONS?CINDEFINITE1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBFFFFDDCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBcMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDIF-THEN-RULED BK .BMBNBDDCIFDANDDC>ELAPSED-TIMEFrDC 370 and elapsed-time < 430 then,send "Run time was: ***, which started at ***" lwith elapsed-time, start-time to operatorSTATEMENT-CATEGORIESRUN-STOPBFB-FF(FF^DDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFF(FF^DDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FF.FF;BDBDBBB-FF>FFKBDBDBBB-FFNFF[BDBDBBB-BDBDBIDBJDSIMULATION-STATEMENTDBK w.BMBNBDDSIMULATEÀCLOCKBTIME,simulate CLOCK with timeBF B-FFFFDDBDBBBFFFFFDDBDBBB-FFFFBDBDBBB-BDBDBIDBJDBD BK w.BMBNBDDBDBBBif CLOCK > 0 then do nothingBF PICON-RULE-SCAN-INTERVALFB-FFF=FDDBDBBBFFFF=FDDBDBBB-FFF5FB=DCNAPH-CHROMATOGRAPH-ANALYTICAL-PORT-SENSORDSENSOR-CURRENCY-INTERVALFSENSOR-TRACING-REQUESTSB-FFFFBDBDBBB-BDBDBIDBJDBD BK .BMBNBDDBBBlet elapsed-time be a numeric variableBF BBBBB-FFFFDDBDBBBFFFFFDDBDBBB-FFFFBhDBDBBB-BDBDBIDBJDBD BK .BMBNBDDBDBBFDDCINCREMENTBF DACTIVATEDBCATEGORYBif elapsed-time < 400 then ,increment elapsed-time by 10 and,activate run-stop rulesBCOUNTERBFCPICON-RULE-ALERT-INTERVALF B-FFFoFDDBDBBBFFFFoFDDBDBBB-FFF+F BDBDBBB-FFFgFBDBDBBB-FFFFBDBDBBB-BDBDBIDBJDINITIAL-RULEDBK .BMBNBDDCINITIALLYDDBDRunning Excercise 8DBBDSETBBDBDBBBlinitially lsend "Running Excercise 8" to operator andlset start-time = time and activate counter rulesBFB-FFFF=DDBDBBBFFFFF=DDBDBBB-FF}FnFpBDBDBBB-FFmFF`BDBDBBB-FF]F1FPBDBDBBB-FFMF F@BDBDBBB-BDBDBIDBJDFREE-TEXT-STATEMENTDBK %xBMBNBExercise #8BFB-FGFFFDDBDBBBFFGFFFDDBDBBB-F<FFFBDDCFLOW-PIPEBBFBCPORT-SENSOR-INPUTFDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "DWR" :CHARACTERS NIL :QFASLP NIL :LENGTH 1902 :CREATION-DATE 2730389052 :DIRECTORY "PICON-CLASS" :NAME "EXERCISE-9" :TYPE "PIC" :VERSION 1) hưs2Dp,lFASD-DATADDWRRalph>nFfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB x1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE ?AUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK xBMBNCNEXT-NEW-STATEMENT-NUMBERF CFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDCEXERCISE-9FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?lExercise 91DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBnDBK ?BMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBvDBK ?BMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB~DBK ?BMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK ?BMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK ?BMBN1DBIDBJDCDEFINITIOND BK ;BMBNÁSTATEMENT-TEXTDDC=DINITIAL-TIMENUMERICNILlet initial-time be a numeric variableCSTATEMENT-NUMBER?FBACKTRACK-TO-GET-VALUE?BSAMPLING-INTERVAL-FOR-HISTORIC-REASONS?CINDEFINITE1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBFFFFDDCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBcMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDSIMULATION-STATEMENTDBK ?BMBNBDDSIMULATECT1BDCPICON-WAVEFFFX,simulate T1 with wave with central value 200 andldeviation 20 and period 10 minutesBFB-FFFF,DDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFFFF,DDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FF FFBDBDBBB-FFFoF)BDBDBBB-BDBDBIDBJDCUNCONDITIONAL-RULED BK )IBMBNBDDCIFTRUEDDSENDDT1 = ~6F at time: ~6F minutesBDC/DC-TIMEBF<DDESTINATIONLOGCEVERY-TIMEsend "T1 = *** at time: *** minutes" with T1, ( time - initial-time) / 60 to log every timeBFPICON-RULE-SCAN-INTERVALF<B-FF7FFDDBDBBBFFF7FFDDBDBBB-FF1FF$BDBDBBB-FF!FFBDBDBBB-BDBDBIDBJDINITIAL-RULEDBK ;BMBNBDDCINITIALLYDDSETBB linitially set initial-time = timeBFB-FF^FFHDDBDBBBFFF^FFHDDBDBBB-FFXFFKBCDTHERMOCOUPLE-TEMPERATURE-PORT-SENSORDSENSOR-TRACING-REQUESTSB-SENSOR-CURRENCY-INTERVALFFFFF~BDBDBBB-BDBDBIDBJDFREE-TEXT-STATEMENTDBK xBMBNBExercise #9BFB-FEFFFDDBDBBBFFEFFFDDBDBBB-F:FFFBlDDCFLOW-PIPEBBFBCPORT-SENSOR-INPUTFDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 8 :AUTHOR "dwr" :QFASLP NIL :LENGTH 16824 :CREATION-DATE 2730905810 :CHARACTERS T :DIRECTORY "PICON-CLASS" :NAME "LAB-SESSION-1" :TYPE "TEXT" :VERSION 20) -*- Mode:Text; Fonts:(CPTFONTB) -*-PICON Lab Session # 1--------------------- PURPOSE ------- The purpose of this first lab session is to familiarize the student with the Lisp Machine environment enough to utilize PICON. The PICON course teaches enough about the Lambda and the Lisp Machine environment to sufficiently use PICON yet due to the extremely rich programming environment, it is not possible to cover all its capabilities. Before starting, however, it is necessary to understand some unique things about the Lisp environment:- When typing LISP statements, such as (print-herald), notice that there is no need to enter a key. In Lisp, a balancing right parenthesis closes the expression and passes it to Lisp for evaluation.- In other places on the Lisp machine, however it IS necessary to enter a key, such as the editor. In cases where entering the key are necessary they will be clearly noted. - While using the Lisp machine, many commands are entered using lisp commands like: (hostat), which will display a listing of the network status, or by using function keys. When function keys are necessary, they will be designated by a preceeding "<" (less than) and a trailing ">" (greater than). Between the <> will be the keyboard key to press. So, to view the network status using a function key try: H Notice the message after the network status report:Type a space to flush By typing a the exposed window will be removed and the topmost window will then be exposed.- Many other commands are available on a Lisp Machine are accessed by "control" keys. These are described as follows:CTRL-A is the notation for holdingdown the CTRL key whilealso typing an "A".META-B is the notation for holdingdown the META key whilealso typing a "B".CTRL-SHIFT-C is the notation for holdingdown both the CTRL andSHIFT keys while typinga "C" .META-CTRL-is the notation forholding down the CTRLand META keys while typingan key. On Lisp machines, the most recently used application is simply left exposed on the screen. The screen now exposed was the last used. The active screen is also indicated by a blinking cursor. Lab session 1 instructions: --------------------------- 1) Select the Lisp Listener window: --------------------------------Type: LIt is readily apparent when you are in a Lisp Listenerwindow because you will see "Lisp Listener 1", or possibly some other number, in the lower left corner of the screen. 2) Login to the Lambda: -------------------- (login "your-initials" t) - For example (login "joe" t)Notice that you do not need to type a carriage return.As mentioned before, the right parenthesis will close the expression and pass it to lisp for evaluation.The login function puts your initials in the status line, at the very bottom of the screen, and will use your initials whenever an update is performed. When you see a "T" appear, this indicates that your loginattempt was successful. 3) Type: (print-herald) -------------------------------------This will show you some general information about thesystem you are working with. Notice that the key labeled is a key, not letters to be typed. The keyis found on the top row of keys in the middle. 4) Type: (print-disk-label) --------------------------This will show a layout of the sections of the hard disk.Each line of this display represents a "partition" or"band" of the disk. "Band" is the more commonly usedterminology at LMI. Locate the bands beginning with theletters LOD. These bands are used to store an executablebinary system which, once copied into memory, will bethe running system. Locate the LOD band prefixed by a *.At the very end of this line is a description of theband. The * indicates which band is currently selected.So, the software you are running should correspond tothe description on this line.You should be already set to LOD3, containing PICONsoftware. This is the band we will be using this week.You don't need to do anything to the environment by wayof changing bands unless you are not on LOD3. If you arenot, please notify a lab instructor.Other bands: PAGE,1 - is used for virtual paging. LMC1,2 - is used to store microcode software. FILE,1 - is the area of disk used to store files. 5) Type: -----------------------A table will appear showing all of the systems availablein this version of the software. The list should looklike:1 PICON WindowC ConverseE Editor F Font Editand so on.....Each item on this list is a system. Each system has itsown window. So, by selecting a system, a new window willappear allowing access to that system. For example, trytyping: 1 (type the key then type a 1 key.)This will select the PICON system since PICON is boundto the 1 key combination. Access to PICON isnow available. Try going into the editor by typing: E(Depending on how the editor was last exited by the person just using this machine, if any, will effect how the window looks. It will probably be blank.)We will furthur discuss the editor later this week. Return to Lisp by typing: L. 6) Hardcopy capability. --------------------There are several ways to get hardcopy on the Lisp Machinedepending on the type of output you desire. There arebasically two kinds:Text file printouts:To obtain a file printout assuming it isprintable, type from lisp: (hardcopy-file "picon:picon;picon-system.lisp")Screen dumps:To obtain a screen dump, select the screen youwish to dump then print it: 1 (To select the PICON window) Q (To send the screen to the printer. The screen will flash and beep to indicate spooling and printing is occuring.)NOTE: Q is a generalized screen dumping facility which will print the entire window as it appears on the screen. There is currently no way to print only a portion of the PICON window. Your printouts are printed in the machine room, and willbe given to you by a lab instructor after they have printed. 7) Getting to Lisp: ----------------Many times there is much confusion about how to get intolisp on the Lisp Machine. Basically lisp is everywhere tobe found. Each system is built literally on top of lispso that at every level in the system you always haveaccess to lisp. The FIGURE 1 illustrates the LispMachine environment:FIGURE 1-------- 7) Getting to Lisp (continued): ----------------------------Of course by going to the Lisp Listener Window - Lyou can get to lisp. Even while in PICON, lisp is availableas this diagram shows. To illustrate this, type: 1 (gets you into PICON) (type the key - third fromthe right on top row.)You are now in lisp. Type:(print-disk-label)To return to your application, type: (type the key - second fromthe right on top row.)The key will also return you to the top level systemif you should find yourself stuck in lisp, unless you arein the Lisp Listener, of course. Return to the Lisp Listener Window by:Typing: L 8) Special terminal keys: ----------------------The key has some uses which will be useful to youduring the week.- Type: C As you can see this reverses the bit complement of the screen. If this is undesirable, do it again, to toggle it off.- Type: 0 M(by typing the three keys one after another.) Next, type: (listf "picon:picon;") This command lists the directory PICON on the local machine. Notice that the printing on the display "wraps" without any pausing for confirmation. The sequence just entered, 0 M, disables "more" processing, or in other words, prevents pausing at the bottom of the screen. To enable "more" processing: Type: 1 M Type: CTRL-C (The CTRL key held down while typing a "C".) Typing a CTRL-C in lisp has the effect of presenting the last command typed into lisp back to the user. In this case it is the "listf" command. This gives you the opportunity to either edit the command or have it evaluated again. Since we have not discussed how to do editing on the Lisp Machine yet, we'll defer this, but we can re-use the same command. To do this just type: (To the right of the key) Notice that now, as the directory list processes, at the end of the page, there is the message **MORE**. To proceed, type a . - To see the other key variations, type: This is comprehensive list represents all of the variations of the key. 9) Getting Help. -------------Depending on where you are in a particular system there maybe help available. The key is generally a good choicefor determining if help is available at all in a particularsystem.- Help in Lisp. Type: (This gives a list of the kinds of help that are available). Type: CTRL- (This shows another kind of help for certain keys.) You've already seen and help. 10) File naming conventions: ------------------------File names on a Lisp Machine are constructed as follows:- The logial machine where the file resides followed by a colon. Eg.lm: or duke: - The directory where the file is located on a particular logical machine followed by a semi-colon. Eg.picon; or fred;- The file name followed by a period. Eg.picon-system. or lisp-hacks. - a file extension to furthur describe the file. Eg.lisp or pic or textWhen these parts of the filename are put together, they are called a pathname. Examples of correct pathnames are:lm:picon;picon-system.lispduke:fred;homework.textlm:picon-kb-files;chemical-plant.picFile extensions:- Files having an extension of "lisp" are considered lisp source files containing lisp source code. - Files having an extension of "text" are considered to be purely text files containing no code. An example of a text file is this lab-exercise-1.- Files having an extension of "pic" are considered to be PICON knowledge base files. These are non-printable and non-readable except by PICON software. PICON has printing facilities for viewing the KB in hardcopy.- Files having an extension of "pri" are considered to be a printable version of a PICON knowledge base. These are generated by PICON. This week during class, you will be using 2X2 PLUS machines.This (2 by 2 PLUS) means that there are two users permachine. Each two users have the same disk and file system.This makes it important that when creating files that youpreface your files with your name of initials to make itunique.You should always use the pathname:picon:picon;during this week as this is where your files will be stored. 11) Using the Editor. -----------------Type: E (This puts you into the ZMACS editor)The ZMACS editor is an extremely rich and comprehensiveediting facility and is too complex to discuss completely.We will make some attempt at learning a few capabilitieswhich we need for this week. Managing directories: Type: META-X A "mini" buffer at the bottom of the screen will appear. The mini buffer will accept a command. Type: dired (This will do a DIRectory EDit) The dired will prompt you for a directory to edit. Type: picon:picon; After a few seconds, the editor window will fill up with a list of files which looks like: DUKE: PICON; *.*#* Free=24069, Reserved=4904, Used=46027 (1478 pages used in PICON;) AI-BASE.QFASL #1 12 6144(16) ! 03/14/86 19:02:47 AI-BASE-GRAMMAR.LISP #1 21 21192(8)! 03/14/86 15:19:13 AI-BASE-GRAMMAR.QFASL #1 12 6144(16)! 03/14/86 19:29:25 AI-BASE-SYSTEM.LISP #1 2 1895(8)! 03/12/86 09:57:15 AI-DBMS.QFASL #1 12 6144(16) ! 03/12/86 12:17:00 AI-FRAMES.QFASL #1 28 14336(16)! 02/28/86 14:59:01 AI-PARSE.QFASL #1 60 30720(16) ! 02/03/86 19:15:35 AI-SYSTEMS-SYSTEM.LISP #1 2 1745(8)! 01/29/86 19:23:35 AI-UTILITY.QFASL #1 44 22528(16)! 03/19/86 23:05:55 AI-WINDOW.QFASL #1 100 51200(16)! 03/12/86 13:33:32 BLOCK.QFASL #1 40 20480(16) ! 03/14/86 19:05:39 CAPTURE.QFASL #1 56 28672(16) ! 03/14/86 19:24:11 CLASS-DEMO.PIC #1 7 3173(16) ! 03/13/86 19:40:55 CLASS-DEMO.PIC #2 7 3328(16) ! 03/12/86 12:52:44 CLASS-DEMO.PIC #3 8 3766(16) ! 03/12/86 23:00:24 CLASS-DEMO.PRI #1 8 8143(8) ! 03/12/86 23:01:04 (Abbreviated for brevity)... The dired command has some very powerfull functionalityyet we will only be examining a small portion of itscapabilities. On each line of the dired display there isa particular file with information describing it. To operate on a particular file, move the mouse arrowto the file you wish to use. For this exercise movemouse to COPYRIGHT.TEXT - CLICK Right with the mouse. - A menu will appear showing several options. - CLICK Left with mouse on "View File". - The file COPYRIGHT.TEXT will be displayed in a window for "View Only". - By typing or the view screen will be removed. - Now CLICK Right with the mouse on COPYRIGHT.TEXT again. - This time select "Edit File" by CLICKing Left. - When the file COPYRIGHT.TEXT appears this time it's in an editor buffer where modifications may be made to it. But Please Don't. - To get rid of this editor buffer, type CTRL-X then K. Then type a . You will then be prompted to confirm deleting this buffer. Type again. The buffer will then be removed. This does not affect the file in any way. 12) Peek Program. -------------Select the Peek program by typing: PThis will display a screen with options at the top and alist of helpful text. Respond to the message: "Type any character to flush" by typing any character.Peek gives different options for viewing internal systemactivity. - Type a "P" or select "Active Processes" by clicking LEFT with the mouse. This displays a list of all the active processes within the Lisp Machine. - Type an "H" or select "Hostat" by clicking LEFT with the mouse. This displays a status of all the Lisp Machines on the LMI Network. - Other options include:StatisticsDevicesMemory AreasWindow HierarchyFile ServersChaosnetFile System Status 13) Return to Top Level Lisp Listener by typing L. What you should have learned in this exercise: ----------------------------------------------- - How to recognize special keyboard commands, in particular, theuse of various keys. - How to login. - How to view the system herald. - How to view the disk label. - How to see which systems are available for use by looking atsystem help. - How to move between systems such as Lisp and PICON. - How to get into lisp from anywhere in the Lisp Machine environment. - How to use the key. - How to get various kinds of help. - How to recognize and construct pathnames in the file system. - How to use the dired program in the editor. - How to use the Peek program. LMFL(:BYTE-SIZE 8 :AUTHOR "dwr" :QFASLP NIL :LENGTH 18352 :CREATION-DATE 2730905454 :CHARACTERS T :DIRECTORY "PICON-CLASS" :NAME "LAB-SESSION-2" :TYPE "TEXT" :VERSION 17) -*- Mode:Text; Fonts:(CPTFONTB) -*-PICON Lab Session # 2--------------------- PURPOSE ------- The purpose of this second lab session is to familiarize the student with the introductory use of PICON including:- Overview of PICON window and its contents- Creation of simple schematics- Use of some of the system facilities Mouse and Keyboard Commands: ----------------------------Because PICON makes heavy use of the mouse in the userinterface the mouse commands are given a notation toeasily distinguish them. The following table shows thenotation that the course exercises will use with thecorresponding meaning to the symbol.[L] - Single LEFT Click [M] - Single MIDDLE Click[R] - Single RIGHT Click[L2] - Double LEFT Click[M2] - Double MIDDLE Click[R2] - Double RIGHT Click . NOTE: when performing double clicks they must come quickly together. Done too slowly, will result in two individual single clicks. . If you have difficulty with the double clicks, you may alternativly use the Roman numeral keys located in the upper left part of the keyboard. In PICON the Roman Numeral keys have special significance: - Single LEFT Click - Double LEFT Click - Single MIDDLE Click - Single RIGHT Click Other Special keys: ------------------- A) Scrolling Capability:There are other special keys on the keyboard which have special significance in PICON. - thumb-up- Scroll up. - thumb-down- Scroll down. - finger-left- Scroll left. - finger-right- Scroll right.which are found on the very right side of the keyboard areused by PICON to cause scrolling to occur on the window inwhich the mouse arrow is positioned, provided that windowallows scrolling. B) Scaling Capability: - CTRL-S - Smaller, incrementally. - CTRL-B - Bigger, incrementally. - CTRL-F - Full scale, not incremental. - CTRL-Q - Quarter scale, not incremental. - CTRL-Y - 1/8 current size. - CTRL-Z - 8 times current size. - CTRL-N - Narrower, incrementally. - CTRL-W - Wider, incrementally. - CTRL-R - Shorter or reduced, incrementally. - CTRL-T - Taller, incrementally. - CTRL-O - Centers the schematic in selected window (where cursor is) - CTRL-E - Expands the background are of selected window. (Refer to to Appendix A, Quick Reference Guide in the PICON User's Guide for more detail on these functions. Lab Session 2 Script: --------------------- 1) Select the PICON system: ------------------------Type: 1 2) Identify PICON Window Panes: ---------------------------- You should now see the PICON window exposed. Take a moment to locate the following areas on the screen:- Interaction-pane: the largest window on the screen. - Overview-pane: the horizontally oriented pane on thelower portion of the screen.- Command-pane: the window having the mouse-sensitivecommand options.- Title-pane: contains the title for the application andis located in the top right corner.- Subcommand-pane: located in lower right corner,containing editing commands during rule creation. 3) Create a simple schematic diagram: ----------------------------------If the screen you are working on already has aschematic loaded, you will need to clear it beforestarting these exercises. To clear the schematicand start with a new one, follow these instructions:- [L] on "Load".- Type: dummy into the window where you see a flashing cursor.- Type: key.Build a schematic diagram containing an accumulator,2 flow sensors, input pump, tank level sensor, anda surge-tank. Follow the sequence below to createthis diagram. When finished, it should look like FIGURE 1 on page 7. Add the accumulator:- [L] on "Add Icon".- [L] on "Accumulator".- The icon should now be attached to the mouse. You should move the icon to the middle of the Interaction-pane and place the icon on the schematic by [L]. Refer to FIGURE 1 placing the accumulator next to marker #3. - If you find that the placement was not correct, the icon may be easily moved. Clicking [L2] on an icon which has been placed on the schematic, will attach it to the mouse and allow placing it somewhere else. Also will behave like [L2]. Add the first of the two flow sensors:- [L] on "Add Icon".- [L] on "sensor".- [L] on "thru-pipe-sensor".- [L] on "flow-thru-sensor".- [L] on "magnetic-flowmeter-flow-thru-sensor".- At this point a sensor icon will appear and be attached to the mouse. Position the icon so so that it lines up with the left input port of the accumulator. This location is marked by marker #2 in FIGURE #1. - [L] to place the icon on the schematic.FIGURE 1-------- 3) Create a simple schematic diagram (continued): ---------------------------------------------- - To connect the sensor's output port (on the right side) to the accumulator's input port (left top), [L] on the end of the accumulator's output port. Notice that the connection is now attached to the mouse. Draw it toward the sensor's output port. Once they are very close (basically close enough to distinguish it from any other port) you may [L] and the connection will be established. Note that you could have started with the sensor and connected it to the accumulator if you wished.Add the second flow-sensor:- Position the mouse on the first flow-sensor that was just added to the schematic.- [L] on the flow-sensor.- This action will cause a "copy" to be generated of whatever you [L] on.- Place this flow-sensor on the schematic next to marker #5. - Connect this flow-sensor to the accumulator the way the first one was connected.Add the pump:- [L] on "Add Icon".- [L] on "pump".- [L] on "variable-computer-pump".- [L] on "centrifugal-variable-computer-pump".- Position the pump icon on the schematic in the designated place.- Connect the pump to the front of the input flow sensor.Add the surge tank:- [L] on "Add Icon".- [L] on "surge-tank".- Position this icon on the schematic.- [L] to place it in the desired location.- Connect it to the output of the flow sensor's output port.Add the tank level sensor:- [L] on "Add Icon".- [L] on "sensor".- [L] on "port-sensor".- [L] on "level-port-sensor".- [L] on "sonic-level-port-sensor".- Position this icon next to the upper output port on the right side of the accumulator.- [L] to place it on the schematic.- Connect it to the accumulator. 4) Save this schematic: --------------------To protect from lossage, it is generally a good ideato backup your work periodically. PICON provides aconvenient way to do this.- [L] on "Save"- Type: CTRL- to remove the name "dummy".- Type: xxx-schematic (where xxx are your initials or name. Follow the name of your file by typing a key.) At this point, PICON copies all the schematic elements into a file named:xxx-schematic.pic (where the .pic, as you may remember, is the notation for a knowledge base file) PICON then returns you to the schematic where you may resume building your schematic.- To verify that your file was created, do the following: . [L] on "Load". . [L] on "Get Names" ("Get Names" is found in the lower right portion of the screen in the subcommand pane) . PICON reads the default directory, and then shows a list of all the knowledge base files known to exist. Your file should be on the list.- Since your file is already resident on the screen, there is no need to load it again. To exit from the "Load" menu type . Had you wanted to load a file at this point, you would select the file by [L] on the file you wished to load. Then by typing the file would be loaded. 5) Add attribute knowledge to the schematic: ------------------------------------------ Refer to FIGURE 2. Notice the various icons which were added to the schematic, have names now. In addition to names, they have been given other important attributes which make them usable by PICON. Follow the instructions below to add the proper attributes for this example.- Modify the attributes for the "pump": . [M] on the pump. . Locate the slot titled "Pump name". Notice the value of this attribute is "none". . To change an attribute value for any attribute, [L] on the current value. So, in this case position the mouse on the word "none" and [L]. This action is called "activating" a "gap" or "parsing position". You'll notice that there are three periods which represent the text cursor. . To enter a new value, just type the name you wish to give the pump.Type: pump . When editing attributes (also called slots) all entries must be terminated by typing . . You'll notice a second attribute called "Maximum flow rate". This is a specialized slot not required by the inference engine. We'll discuss these special slots later. . To exit from this "frame" type a or [L] on "Exit".- Edit the attributes for the "input flow sensor": . [M] on the "flow-sensor". . You'll notice that the attributes for a sensor are quite different than others. There is additional information necessary to provide since the sensor provides numeric information back to the inference engine. . [L] on the word "none" in the attribute for "Tag name for sensor". . Type: F1 for the name. . "Engineering unit" has a default value which is appropriate for a flow sensor: "BPH".FIGURE 2-------- . [L] on "BPH". Depending on where you clicked, your display may look like:... BPH or,B ... PH or, BP ... H or,BPH ... The reason for this is that certain words found in attribute values, like "none" are keywords, where words like "BPH" are not. Words that are not keywords are treated as text, therefore editable. To get avoid this, it is best to always position the mouse to the right edge of the word you are trying to edit and then [L]. So, position the mouse to the right edge of the letter "H" in "BPH" and click [L]. Now type the key (found on the top row of function keys just to the left of the middle of the keyboard). This action clears out the text to the left of the cursor. Your display should only have a blinking cursor and no text. . Notice that in the command pane, that there are two menus which appear there. - The first is a data-type menu. It describes thetype of data which is expected in the slot you areediting. In this case, engineering units areexpected. The class of data is a symbol. Thisis a basic differentiation between things likenumnbers, strings, or symbols. - The second menu is mouse-sensitive. It allows youto use the mouse to copy one of the choices intothe slot you are editing. Since bph is a goodchoice for our flow measurements, select "BPH"using [L]. Follow this by typing toterminate the entry. . The next attribute is "Currency interval". . Notice that there is a default value of 15 seconds. Change it to 20 seconds. . There is no need to change "Smoothing factor". . "display current value?" should be changed to "Yes" so that as PICON runs you will be able to see the values next to the sensor icon. [L] on "no". Notice that since yes/no values are keywords, and there are only two choices, the "no" is just changed to "yes". . Don't change "Actions to take on data supplier problems" doesn't need to be changed right now. We'll discuss this later. . If this sensor has been edited properly, the Usage slot should say "In use". If it does then type a or click [L] on "Exit". . The accumulator should be be given a name of "tank". . The level sensor should be given the following attributes:Tag name:L1Engineering unit:FTCurrency interval:30 secondsDisplay current value: yes . The output flow sensor should have:Tag name:F2Engineering unit:BPHCurrency interval:15 secondsDisplay current value: yes . The surge-tank should be given a tag name of "surge".- Your schematic should look like Figure #2. Save your knowledge base again. 6) Modify your title pane: ------------------------ The title pane of your knowledge base can be changed to reflect what the contents are. Follow the sequence below to do this. . [L] on "Visit". The visit facility allows you to look around your knowledge base, in accordance with the criteria you set. You can view parameters, which are lower level frames containing special congiguration information about PICON. Or, you make visit rules or icons which exist on the schematic. . [L] on "parameters for". . [L] on "knowledge base". . Type: . . Once the Knowledge base parameter frame appears, you may edit the slot values in the same way as the sensor icon attributes. . Modify the first slot called "Name of knowledge base" by clicking [L] on the right side of the text: "PICON". . Type . Now type any name you wish for the title. Be sure to put the name into string quotes: For example: "New Knowledge" would be a correct title. Follow the entry by typing . . You may also change the font that the title is displayed in. Modify the second slot to do this. The menu will tell you which fonts are available. . Type a or [L] on "Exit" to return to visit specification. This specification is editable and may be changed by clicking [L] on the part you wish to edit. Try looking at the parameters for the editor. To do this follow these instructions:- Position cursor after the words "knowledge base".- [L]- Type as many time as necessary to delete the words "knowledge base".- [L] on "editor".- Type the key.- To proceed and clear the screen, type a after you finish reviewing this parameter. . To visit something else, [L] on the part of the visit statement you wish to change otherwise type a or [L] on "Exit" to return to Top level command menu.7) Save your knowledge base: ------------------------- Again save your knowledge base, so that the new title stored in the knowledge base frame will be saved with the file.8) Extended text editing commands: ------------------------------- . [L] on "Add Statement". . [L] on "free-text-statement". . Move box to an empty area of the screen and place the box on the schematic by clicking [L]. . At the blinking cursor (the ... which is blinking) type the following:the quick brown fox jumped over the lazy brown dog__________________________________________________ . Familiarize yourself with the following extended editor commands from the keyboard: Cursor Movement Commands: -------------------------TOP- - move left 1 word from the cursor. [To enter TOP-, hold down the key andsimultaneously type a j.TOP- - move right 1 word from the cursor.TOP- - move cursor to the beginning of text. TOP- - move cursor to the end of text. CTRL- - move active gap to next gap forward. Destructive Editor Commands: ---------------------------- - deletes a character to the left. - deletes a character to the right. CTRL- - deletes a word to the left.CTRL- - deletes a word to the rightCTRL-- (hyphen) - deletes to begining of block or to the next gap.CTRL-_ (underscore) - ditto. CTRL-+ - deletes to the end of the block or to the next gap. CTRL-= - ditto Macro Style Editor Commands: ---------------------------- These commands are used to copy and restore pieces of text for manipulating rules. To use these, you must be editing a rule and have an active "gap". To copy the latest entry which was killed, type: CTRL-X CTRL-Y - Yanks the latest entry in the kill buffer and inserts at active gap. To put something into the kill buffer, use any of the last 4 "destructive" editor commands. Then if you wish to yank a successive entry, type successive META-Y commandsto yank these other entries. File import and export capabilities. It is possible to copy the content of a rule into a file and from a file into a rule. CTRL-X CTRL-I - Will prompt for a file name to load and will write the file into the rule at the active gap. CTRL-X CTRL-O - Will prompt for a file name to writeout to the disk, copying the entirerule into that file. What you should have learned in this exercise: ----------------------------------------------- - How to distinguish the various PICON keyboard and mousecommands. - How to identify the various window panes in the PICON window. - How to create a simple schematic diagram. - How to provide attributes to icons on the schematic. - How to save a knowledge base. - How to retrieve parameters, and modify them. - How to use the extended editor commands.LMFL(:BYTE-SIZE 8 :AUTHOR "DWR" :QFASLP NIL :LENGTH 11098 :CREATION-DATE 2730896482 :CHARACTERS T :DIRECTORY "PICON-CLASS" :NAME "LAB-SESSION-3" :TYPE "TEXT" :VERSION 10) -*- Mode:Text; Fonts:(CPTFONTB) -*-PICON Lab Session # 3--------------------- PURPOSE ------- The purpose of this third lab session is to build upon the material presented in exercise #2 to add simulation capability and rules to the knowledge base. Lab Session 2 Script: --------------------- 1) Create a simulation for the schematic built in Lab Sesison #2. --------------------------------------------------------------PICON simulations are created in order to test inference rulesin a knowledge base. Since there is no physical environment toactually connect to, in terms of a process, a simulation willhave to be developed in order to test your knowledge base. Thisis accomplished by writing SIMULATION statements. Follow thesequence below to write a simulation for the schematic youcreated in Lab Session #2. 2) Simulate the values for F1 on the schematic: -------------------------------------------- . [L] on "Add Statement". . [L] on "simulation-statement". . A small box with 3 dots in it will be attached to the mouse. Position the mouse such that the box is below the schematic and leaves enough room to type into the box. Click [L]. . You will see the word "simulate" followed by the cursor. The specification for simulation statement is next. . Notice the sub-command menu pane in the lower right corner of the screen. These extended editor commands are mouse- sensitive and can be used while editing rules.Their uses are described below:New Line - Inserts a carriage return at the point -------- of the existing cursor.Back up - Erases one word or marked region to the------- left of the cursor. A marked region is the text within two gaps (...).Restore - Copies the definition of the most------- recently installed version since the last or was entered.End - Same as typing key.---Exit - Same as typing in that it leaves---- the rule just as it is without installing it. . Type: F1 with wave Notice that at this point, PICON types ahead because the next few keywords are unique. The statement should look like:simulate F1 with wave with central value ... -------------------------------------------- . Provide a central value for the wave:Type: 100 . PICON will provide the text for the next argument which is deviation. Type 80 . The statment should now look like:simulate F1 with wave with central value 100 and deviation ... ------------------------------------------------ . PICON will now type: and period. The statement should look like:simulate F1 with wave with central value 100 and deviation 80 and period ... ------------------------------------------------ . For period, type: 5 minutes. The completed statement should look like:simulate F1 with wave with central value 100 and deviation 80 and period 5 minutes ... ------------------------------------------------ . The cursor will still be blinking at the end of the statement. To complete the rule type . . This simulation statement is now installed. 3) Simulate the values for F2 on the schematic: -------------------------------------------- . [NOTE: you may click [L] on the rule, having the mouse positioned just outside the box, in order to copy the rule. This "copy" then can be placed on the schematic and edited to make it look as the rule you desire to create] . The statement should read:simulate F2 with wave with central value 100 and deviation 40 and period 5 minutes ------------------------------------------------ 4) Simulate the value for L1: -------------------------- . The statement should read:simulate L1 with 500 then (F1 - F2 ) * TANK-AREA / 3600 + L1------------------------------------ 5) Simulate TANK-AREA since it is referenced by L1: ------------------------------------------------simulate local TANK-AREA with 100--------------------------------- (Simulating "local" will be explained later.) 6) Create rules of inference which use the simulation: --------------------------------------------------- After adding these SIMULATION statements, the model is complete. Now, all that remains is to write rules which request data from sensors, make judgements about that data, and make recommendations about system activity.- The following rules are designed to simply compute the change in flow, and thus determine if the tank will overflow based on the changes in the level. It is not necessary that you understand the context of these rules, but rather just how to create and manipulate them on the schematic.- Complete the following: . [L] on "Add Statement". . [L] on "if-then-rule". . With the small box attached, position the box where you wish on the schematic. You can move statements on the schematic just as easily as icons. [L2] on the outside edge of the statement you wish to move. The rule will now be attached to the mouse. Position the box and [L] to place it on the schematic. If you move a statement, the cursor in that statement is deactivated. So, once the statement is placed, you must reactivate the cursor by clicking [L] on the "..." in the statement. . Type in, or use the mouse and the menus, to create this rule: if flow-delta > 0 and L1 > tank-level-limit then conclude tank-level-is-rising and send "Tank level is too high!" to operator --------------------------------------------------- If you should make a syntactical mistake in entering the rule, PICON will make a buzzing sound, then flash the screen, and then place an elipse (...) in the rule to indicate where the error is. Even if you try to type on a rule which has an error PICON will refuse to accept it. You may then reactivate the "..." by clicking [L], and view the menus to see the proper options at that point in the rule. . The rule's attibutes must also be modified in order to give the rule more specific information about how the inference engine is to treat it. . Position the mouse inside the rule box and [M]. . Locate the slot named "Scan interval". Position the mouse after the word "none" and click [L]. The word "none" should be replaced by a blinking "...". . Type: 10 seconds . . Type a to return to the schematic. . This rule is now complete. 7) Add the DEFINITION for tank-level-limit: ---------------------------------------- . [L] on "Add Statement". . [L] on "definition". . Position the box below the if-then-rule on the schematic. . Type the following: tank-level-limit = 586 ----------------------------- . This definition is complete. 8) Add the definition of flow-delta: --------------------------------- . [L] on "Add Statement". . [L] on "definition". . Position the box below the if-then-rule on the schematic. . Type the following: flow-delta = F1 - F2 --------------------------- . This definition is complete. 9) Test the knowledge base: ------------------------ These statements complete this knowledge base. Your rules should now be tested. . Before starting the test, you should save your work. . Click [L] on "Run". As the inference engine starts, you should see numbers appearing next to all three sensors which are changing. When L1 exceeds the tank-level-limit variable (which = 585) and F1 - F2 > 0, you should get the message: "Tank level is too high!" 10) PICON Messages and Explanation: ------------------------------- As the message gets printed, notice that it is mouse- sensitive. This means the mouse, as it is passed over the message, causes a box to be drawn around the message. By clicking [L] on the message, a tree is drawn indicating the chain of reasoning which PICON used to create the message. Using the "hand" and "finger" keys, examine this tree to see how the inference engine used the rules and sensors you've just added.- This is commonly refered to as an "Explanation" subsystem which "explains" the reasoning which led up to creating the advice given. Although this is not truly an explanation, it serves to show the rules (written in english) which were used and therefore serves to explain the advice.- There exist three knowledge bases on file which are completed versions of each of the three steps you've just completed. To check your work, or to see how somthing was done, just load the appropriate file by clicking [L] on "Load", and then selecting one of: CLASS-SCHEMATIC - for a look at the schematic without attributes or rules. CLASS-MODEL - for a look at the schematic with attributes, and simulation statements but no rules. CLASS-KB - for a look at the completed knowledge base. 11) Print this knowledge base: -------------------------- This would be a good opportunity to get a hardcopy of your finished knowledge base: . [L] on "Print". . [L] on "statements". . [L] on "and". . [L] on "icons". . [L] on "and" . [L] on "parameters for". . [L] on "everything". . Type . . At this point PICON will print a message indicating a file is being created which contains your knowledge base in printable form. . To actually print the file to the printer: - Type: (You are now in lisp underneath PICON) - Type: (hardcopy-file "lm:picon;name-of-file.pri") (Where "name-of-file" is the knowledge base file name.) - If you make any typing mistakes, you may get thrown into the error handler. To get out of the error handler, you should type: and try typing the command again. - Type: (This returns you to top level PICON after being in lisp) What you should have learned in this exercise: ----------------------------------------------- - How to add simulation statements and rules to a schematic. - How to edit attributes of rules. - How to invoke and use the display of the inference tree. - How to print your knowledge base.LMFL(:BYTE-SIZE 8 :AUTHOR "dwr" :QFASLP NIL :LENGTH 11122 :CREATION-DATE 2730906296 :CHARACTERS T :DIRECTORY "PICON-CLASS" :NAME "LAB-SESSION-3" :TYPE "TEXT" :VERSION 11) -*- Mode:Text; Fonts:(CPTFONTB) -*-PICON Lab Session # 3--------------------- PURPOSE ------- The purpose of this third lab session is to build upon the material presented in exercise #2 to add simulation capability and rules to the knowledge base. Lab Session 2 Script: --------------------- 1) Create a simulation for the schematic built in Lab Sesison #2. --------------------------------------------------------------PICON simulations are created in order to test inference rulesin a knowledge base. Since there is no physical environment toactually connect to, in terms of a process, a simulation willhave to be developed in order to test your knowledge base. Thisis accomplished by writing SIMULATION statements. Follow thesequence below to write a simulation for the schematic youcreated in Lab Session #2. 2) Simulate the values for F1 on the schematic: -------------------------------------------- . [L] on "Add Statement". . [L] on "simulation-statement". . A small box with 3 dots in it will be attached to the mouse. Position the mouse such that the box is below the schematic and leaves enough room to type into the box. Click [L]. . You will see the word "simulate" followed by the cursor. The specification for simulation statement is next. . Notice the sub-command menu pane in the lower right corner of the screen. These extended editor commands are mouse- sensitive and can be used while editing rules.Their uses are described below:New Line - Inserts a carriage return at the point -------- of the existing cursor.Back up - Erases one word or marked region to the------- left of the cursor. A marked region is the text within two gaps (...).Restore - Copies the definition of the most------- recently installed version since the last or was entered.End - Same as typing key.---Exit - Same as typing in that it leaves---- the rule just as it is without installing it. . Type: F1 with wave (Notice that at this point, PICON types ahead because the next few keywords are unique.) The statement should look like:simulate F1 with wave with central value ... -------------------------------------------- . Provide a central value for the wave:Type: 100 . PICON will provide the text for the next argument which is deviation. Type 80 . The statment should now look like:simulate F1 with wave with central value 100 and deviation ... ------------------------------------------------ Type: 80 . PICON will now type: and period. The statement should look like:simulate F1 with wave with central value 100 and deviation 80 and period ... ------------------------------------------------Type: 5 minutes . The completed statement should look like:simulate F1 with wave with central value 100 and deviation 80 and period 5 minutes ... ------------------------------------------------ . The cursor will still be blinking at the end of the statement. To complete the rule type . . This simulation statement is now installed. 3) Simulate the values for F2 on the schematic: -------------------------------------------- . [NOTE: you may click [L] on the rule, having the mouse positioned just outside the box, in order to copy the rule. This "copy" then can be placed on the schematic and edited to make it look as the rule you desire to create] . The statement should read:simulate F2 with wave with central value 100 and deviation 40 and period 5 minutes ------------------------------------------------  4) Simulate the value for L1: -------------------------- . The statement should read:simulate L1 with 500 then (F1 - F2 ) * TANK-AREA / 3600 + L1------------------------------------ 5) Simulate TANK-AREA since it is referenced by L1: ------------------------------------------------simulate local TANK-AREA with 100--------------------------------- (Simulating "local" will be explained later.) 6) Create rules of inference which use the simulation: --------------------------------------------------- After adding these SIMULATION statements, the model is complete. Now, all that remains is to write rules which request data from sensors, make judgements about that data, and make recommendations about system activity.- The following rules are designed to simply compute the change in flow, and thus determine if the tank will overflow based on the changes in the level. It is not necessary that you understand the context of these rules, but rather just how to create and manipulate them on the schematic.- Complete the following: . [L] on "Add Statement". . [L] on "if-then-rule". . With the small box attached, position the box where you wish on the schematic. You can move statements on the schematic just as easily as icons. [L2] on the outside edge of the statement you wish to move. The rule will now be attached to the mouse. Position the box and [L] to place it on the schematic. If you move a statement, the cursor in that statement is deactivated. So, once the statement is placed, you must reactivate the cursor by clicking [L] on the "..." in the statement. . Type in, or use the mouse and the menus, to create this rule: if flow-delta > 0 and L1 > tank-level-limit then conclude tank-level-is-rising and send "Tank level is too high!" to operator --------------------------------------------------- If you should make a syntactical mistake in entering the rule, PICON will make a buzzing sound, then flash the screen, and then place an elipse (...) in the rule to indicate where the error is. Even if you try to type on a rule which has an error PICON will refuse to accept it. You may then reactivate the "..." by clicking [L], and view the menus to see the proper options at that point in the rule. . The rule's attibutes must also be modified in order to give the rule more specific information about how the inference engine is to treat it. . Position the mouse inside the rule box and [M]. . Locate the slot named "Scan interval". Position the mouse after the word "none" and click [L]. The word "none" should be replaced by a blinking "...". . Type: 10 seconds . . Type a to return to the schematic. . This rule is now complete. 7) Add the DEFINITION for tank-level-limit: ---------------------------------------- . [L] on "Add Statement". . [L] on "definition". . Position the box below the if-then-rule on the schematic. . Type the following: tank-level-limit = 586 ----------------------------- . This definition is complete. 8) Add the definition of flow-delta: --------------------------------- . [L] on "Add Statement". . [L] on "definition". . Position the box below the if-then-rule on the schematic. . Type the following: flow-delta = F1 - F2 --------------------------- . This definition is complete. 9) Test the knowledge base: ------------------------ These statements complete this knowledge base. Your rules should now be tested. . Before starting the test, you should save your work. . Click [L] on "Run". As the inference engine starts, you should see numbers appearing next to all three sensors which are changing. When L1 exceeds the tank-level-limit variable (which = 585) and F1 - F2 > 0, you should get the message: "Tank level is too high!" 10) PICON Messages and Explanation: ------------------------------- As the message gets printed, notice that it is mouse- sensitive. This means the mouse, as it is passed over the message, causes a box to be drawn around the message. By clicking [L] on the message, a tree is drawn indicating the chain of reasoning which PICON used to create the message. Using the "hand" and "finger" keys, examine this tree to see how the inference engine used the rules and sensors you've just added.- This is commonly refered to as an "Explanation" subsystem which "explains" the reasoning which led up to creating the advice given. Although this is not truly an explanation, it serves to show the rules (written in english) which were used and therefore serves to explain the advice.- There exist three knowledge bases on file which are completed versions of each of the three steps you've just completed. To check your work, or to see how somthing was done, just load the appropriate file by clicking [L] on "Load", and then selecting one of: CLASS-SCHEMATIC - for a look at the schematic without attributes or rules. CLASS-MODEL - for a look at the schematic with attributes, and simulation statements but no rules. CLASS-KB - for a look at the completed knowledge base. 11) Print this knowledge base: -------------------------- This would be a good opportunity to get a hardcopy of your finished knowledge base: . [L] on "Print". . [L] on "statements". . [L] on "and". . [L] on "icons". . [L] on "and" . [L] on "parameters for". . [L] on "everything". . Type . . At this point PICON will print a message indicating a file is being created which contains your knowledge base in printable form. . To actually print the file to the printer: - Type: (You are now in lisp underneath PICON) - Type: (hardcopy-file "lm:picon;name-of-file.pri") (Where "name-of-file" is the knowledge base file name.) - If you make any typing mistakes, you may get thrown into the error handler. To get out of the error handler, you should type: and try typing the command again. - Type: (This returns you to top level PICON after being in lisp) What you should have learned in this exercise: ----------------------------------------------- - How to add simulation statements and rules to a schematic. - How to edit attributes of rules. - How to invoke and use the display of the inference tree. - How to print your knowledge base.LMFL(:BYTE-SIZE 8 :AUTHOR "DWR" :QFASLP NIL :LENGTH 18677 :CREATION-DATE 2730896499 :CHARACTERS T :DIRECTORY "PICON-CLASS" :NAME "LAB-SESSION-4" :TYPE "TEXT" :VERSION 19) -*- Mode:Text; Fonts:(CPTFONTB) -*-PICON Lab Session # 4--------------------- PURPOSE ------- The purpose of this fourth lab session is to present a series of exercises in the form of knowledge bases, which you load, which will teach principles of the PICON simulator, and rule inferencing. After certain exercises, there will be a problem for you to solve. After you have created your solution you may load the indicated solution knowledge base to see how the solution should look.- EXERCISE 1. ----------- This exercise demonstrates how to develop a simulation for a sensor, and then to use that sensor's value in an inference rule. . [L] on "Load". . [L] on "Get Names". (This command is found in the sub- command pane in the lower right part of the screen) . [L] on "EXERCISE-1". . Type . . Exercise 1 Script: 1) The sensor T1 is a temperature port sensor added from the hierarchy of icons. 2) The simulation statement will provide values into PICON according to the wave function shown. 3) Then finally a rule which uses the values provided by the simulator will react to changes in the values. 4) Click [L] on "Run". Notice that as T1 exceeds 212, the message is printed. Notice, though, that messages are not necessarily printed every time the condition is true. There is a built in message suppresion feature called "repetition control". To have the message always print (basically disabling repetition control for this rule), add the clause "every time" after the "to operator" clause of the statement. This is discussed later in more detail. 5) Position the mouse on T1. Click [M]. This shows the attributes for the sensor. Click [M] again. For sensors which have values, this graph you see will be generated. To get back to the top level, type , then again.- EXERCISE 2. ----------- This exercise demonstrates the use of IF-THEN reasoning in a PICON SIMULATION statement. Also illustrated is how to use the variable "time" in the simulator. . [L] on "Load". . [L] on "EXERCISE-2". . Type . . Exercise 2 Script: 1) The sensor PORT-1 is a temperature port-sensor. 2) The simulation statement will provide conditional values to PORT-1 depending upon the value of the variable TIME. 3) The IF-THEN rule will query the value of PORT-1 every 25 seconds beacuse the scan interval of the rule = 25 seconds. 4) Click [L] on "Run". 5) The values for PORT-1 will change in accordance with the simulation statement. Notice the CLOCK. If the CLOCK < 100 then PORT-1 reads 1; if CLOCK < 200 then PORT-1 = 2, otherwise PORT-1 = 3. 6) By including the clause "every time", this forces the message to be printed each time the rule is tested with no supression of messages. 7) Notice also that the value of PORT-1 has been imbedded into the text of the message. This is accomplished by "place holding" where the value is to be placed using "***" and adding the clause "with PORT-1". 8) You may also notice that time here is not actual wall clock time. The simulator runs as fast at it can (usually about 20 times faster than real time). This can be changed, and will be discussed later.- EXERCISE 3. ----------- This exercise illustrates further uses of the simulator particularly how to use other variables in the statements. . [L] on "Load". . [L] on "EXERCISE-3". . Type . . Exercise 3 Script: 1) Examine the simulation statement for P1. Notice that it depends upon the values received for F1 in order for itself to get a value. Notice the use of the MAX function. This keeps P1 from ever being < 0. 2) The simulation for F1 is a simple wave function as has already been discussed. 3) Select RUN. 4) Can you determine why no messages are being printed and why no sensor values are being displayed? 5) Write an IF-THEN rule on the schematic which will send an appropriate message to the OPERATOR if F1 should ever exceed 200. 6) Try running PICON with your new rule. Does it work? If your rule doesn't work, check the following: - Does it have a scan interval? It must have one in order to be regularly scheduled by the inference engine. - Use the visit facility to visit statements which may have syntax related problems or inconsistencies:> [L] on "Visit".> [L] on "statements".> [L] on "having".> [L] on "problems" (This is a general problem category. As you can see, there are more specific problems to look for.)> Type: .> One of two things will occur: 1) If there are no problems found, then a block will appear with a note claiming that there are "No such fames". 2) If any problems are found, the main window will be scrolled to the statement having the problem, and flash that statement. You may at this point click [M] on the statement to examine the usage note which will describe the problem. If there is a note, it may keep the inference from properly using the rule. 7) Why are no values being displayed for P1? 8) Load the solution file to verify your work. - Load the file: SOLUTION-3 from the load menu. - Run this solution and verify yours arrives at the same solution.- EXERCISE 4. ----------- This exercise illustrates the ability of PICON to build DEFINITION statements which describe a relationship, and then allow other rules to use those definitions. This exercise also shows the use of "alert" intervals. . Load EXERCISE-4. . Exercise 4 Script: 1) The IF-THEN rule refers to the condition "l1-is-high" defined by the "LET condition" statement. This statement looks like:let condition l1-is-high = L1 > 100___________________________________ The IF-THEN rule is scheduled every 30 seconds (due to the scan interval) and in the event that the rule evaluates to true, executes every 10 seconds (due to the alert interval). As the IF-THEN rule requests the value of l1-is-high, the definition for l1-is-high is evaluated, or backward chained to. The evaluation will yield a true or unknown value. If true, will satisfy the IF-THEN rule and cause the actions specified in the right-hand-side of the rule to be carried out. The actions are to send a message out to the operator every time the condition is true. Also notice the interval at which the message is printed. Every 10 seconds (because of the alert interval) the rule is tested and the message is printed. When the condition stops being true, the inference engine stops using the alert interval and resumes using the scan interval. 2) Run this example by selecting RUN. 3) As the rules run, a message is printed indicating that L1 is reading high. Click [L] on the message as it appears in the message window. Examine the "inference" tree which is displayed, to see the line of reasoning which caused the message to be sent. 4) Type to return to resume running the inference engine. 5) As the inference engine continues to run, change remove the alert interval from the IF-THEN rule as follows: - [M] on the IF-THEN rule. - Change the value of the alert interval from 10 seconds to none. - Type: to complete the entry. - Type: to return to the command pane. Notice that the message now only prints every 30 seconds. By removing the alert interval, the rule only executes every 30 seconds, and therefore prints the message likewise. 6) Write another DEFINITION statement by adding it to the schematic by defining the condition l1-is-low if L1 should drop below 100. 7) Then write another IF-THEN rule displaying an appropriate message should this condition be true. Include the value of the sensor L1 in the text of the message. 8) Test your new rules by running the inference engine again. 9) Verify that your rules work by loading SOLUTION-4 and matching the results.- EXERCISE 5. ----------- This exercise illustrates the use of the "focus" and "activate" techniques for invoking sets of rules from a rule. This is essentially forward chaining. . Load EXERCISE-5. . Exercise 5 Script: 1) The IF-THEN rule #1 checks a simple flow balance. If it finds a discrepancy, then a "focus" is done. This "focus" invokes IF-THEN rule #3. This happens because the attribute "associated unit" in rule #3 is = TANK. When any rule then does a "focus on tank" rule #3 is checked. Click [M] on rule #3 to see that its associated unit slot contains "TANK". 2) Notice that rule #3 is invoked by forward chaining from rule #1. Rule #3 then, must backward chain to the definition statement (rule #2) describing the condition tank-level- is-rising. If rule #2 evaluates true, rule #3 uses that result and must then determine if L1 > 53. If both parts of the antecedent are true, the rule then, is considered true and its actions are carried out. 3) Run EXERCISE-5. 4) Click [L] on the message which prints in the message window. This generates the inference tree. Notice the layout of the rules and the way in which the chaining has caused them to display. 5) As an alternative way of activating rules from other rules, there is an "activate" command. This is a generalized facility which works the same as "focus" but allows the use of other slots of the rule rather than just the associated units slot. Modify rule #1 so that it reads: if abs (F1- F2) > 4 then activate tank-checking rules _____________________________________________________ Also, click [M] on rule #3. Change the "Associated units" slot to "unspecified" (this is an option in the menus). Also change the "Categories" slot to "tank-checking". Now [L] on "Run". Notice the same behavior occurs. The effect is the same. You may also use other slot values besides just the category.- EXERCISE 6. ----------- This exercise illustrates the use of concluding (which also involves forward chaining) in IF-THEN rules. . Load EXERCISE-6. . Exercise 6 Script: 1) Rule #1 simply tests F1 > F2 and if so, concludes level-is-increasing. Several things happen as a result of concluding. o A variable named "level-is-increasing" had already been created by PICON for you. It is a definition statement saying:let level-is-increasing be a named condition __________________________________ o These definitions are not resident on the schematic. You can review them by retrieving them. For example:- [L] on "Retrieve".- [L] on "definition for".- Type: level-is-increasing A frame will appear showing the definition statement. Notice that its currency interval is "derived". This means that the currency interval for the objects which concluded this condition will be used for the condition itself. In this case the smallest of F1's and F2's currency intervals will be used for level-is-increasing's currency interval. o The boolean variable "level-is-increasing" is given a value of true. o Any other rule in the knowledge base that has in its left hand side or premise the named- condition, is immediately tested. This is forward chaining on the conclusion. This then causes rule #2 to be tested by the inference engine. 2) Modify the knowledge base to create a conclusion level-is-decreasing if the opposite is true. Then create another IF-THEN rule to use the new conclusion. 3) Run your knowledge base and compare it to SOLUTION-6. In SOLUTION-6 you will notice that the rule uses an "else" clause instead of creating another rule to look for the opposite case. This has the advantage of only one rule being scheduled by the inference engine rather than two. This is always desirable (to keep the number of rules with a scan interval to a minumum) for efficiency sake. 4) Modify your rule(s) to print the messages every time the rule(s) is/are true, rather than allowing the repetition control to supress the messages. - CASE STUDY 1. ------------- Now that you have learned several techniques in dealing with rules and the simulator, a "case" study problem is presented allowing you to use these techniques. . Load The file: CASE-STUDY-1 from the PICON Load menu. . Problem description:A model has been developed which contains: 1) A schematic diagram 2) A simulation model This case study then needs simply the rules which monitorthe situations as they develop and report problems in theprocess. There is no capability in this case study to adjust the values which sensors are providing which limits your rules to advisory level ONLY. In a later session you will be able to control the environment.When any of the following constraints are violated, anappropriate message must be sent to the process operator. . System constraints:a) Sensor F1 measures the incoming flow into TANK-1 from MIX-1. This flow must be closely monitored and controlled due to the instability of the chemicals. Occasionaly PUMP-1 will malfunction causing flow in the input line to exceed its tolerance. Define a condition which will be true in the event F1 ever reads higher than 60. This is a critical condition and must be checked every 20 seconds. If this condition ever occurs, notify the operator with an appropriate message.b) The maximum that TANK-1 can be is 420 feet. For protection from overfill, a warning should be sent out to the operator if L1 should read above 380. Also if L1 is greater than 380 the condition should be watched more often and reported that the condition still exists.c) Sensor F2 measures the incoming flow into TANK-1 from MIX-2. Like F1, this sensor's readings must be watched closely to insure the mix of chemicals is properly balanced in order to aviod an accident or a spill. F2 should be monitored every 20 seconds also but its values must be under 100. Again, if this constraint is violated, send a message.d) If L1 ever exceeds the safety margin of 380 (see step b) it is necessary to determine if the tank-level is still increasing. If it is, then an appropriate message should be printed. This test for tank-level should only be made in the event that constraint (b) was violated.e) The CLOCK sensor indicates the number of simulated seconds the simulation has been running. When the CLOCK reaches 2000 this marks the end of the simulation, and a message to that effect should be sent to the operator. . Save your knowledge base into a file name other than CASE-STUDY-1.- Something like xxx-case-1 where xxx are your initials would be fine. . Test your rules as you create them to verify your results using the existing simulation statements. . Load and run CASE-1-SOLUTION to verify your work. . Alternative solutions to the case study:- You could have used "focus" or "activate" instead of the "conclude" which was used in the solution. There are no operational differences between focus, activate and conclude except the specifications, of course. There are, however, different times you may wish to use one in preference over another. Because activate is really a generalized focus capability, they will be considered the same in the following discussion. o If you suspect a general problem in your domain, such as a fire, which has many possible causes, it may seem more intuitive to activate "fire-checking" rules than to conclude "there-is-possibly-a-fire". The rules which have a category equal to "fire-checking" would get activated without explicitly stating in the antecedent "if there-is-possibly-a-fire ...". The antecedent would look for a specific thing to check rather than saying, for example:if there-is-possibly-a-fire and T32-54D > 212 then ... o If you have definitely concluded that a situation is known, you may want to conclude versus activating or focusing. What you should have learned in this exercise: ----------------------------------------------- - How to use the "Get Names" feature during knowledge base loading. - How to write a simulation for a sensor. - How to use a sensor's simulated values in a rule. - Understand how message supression functions by using the "repetitioncontrol" function. - How to generate a graph showing a plot of a sensor's history. - How to use the variable time in a simulation. - How to print data values in message output to the PICON messagepane. - How to write simulations using other simulated values. - How to define conditions and access those conditions in IF-THENrules. - How to make use of the scan and alert intervals. - How to use the "focus" mechanism to invoke forward chaining. - How to conclude a named condition. - How to use the retrieve capability for PICON statements. - How to differentiate between activating and concluding.LMFL(:BYTE-SIZE 8 :AUTHOR "DWR" :QFASLP NIL :LENGTH 7497 :CREATION-DATE 2730896519 :CHARACTERS T :DIRECTORY "PICON-CLASS" :NAME "LAB-SESSION-5" :TYPE "TEXT" :VERSION 6) -*- Mode:Text; Fonts:(CPTFONTB) -*-PICON Lab Session # 5--------------------- PURPOSE ------- The purpose of this fifth lab session is to furthur extend your knowledge of how to build and use other types of PICON statements and techniques.- EXERCISE 7. ------------ This exercise illustrates the use of WHENEVER rules. . [L] on "Load". . [L] on "EXERCISE-7". . Type . . Exercise 7 Script: 1) The syntax of this rule expresses the functionality very well. In the event that the there has been a difference of 10 since either the last time this rule was true or since the first time the rule was true, the appropriate message will be displayed. NOTE: See the PICON Users Guide for more information on the WHENEVER rule.- EXERCISE 8. ------------ This exercise illustrates the use of INITIAL rules. . [L] on "Load". . [L] on "EXERCISE-8". . Type . . Exercise 8 Script: 1) The INITIAL rule very simply gets run "initially" after the RUN command selected. There are times, though, after selecting RUN, that the INITIAL rule will not run. These exceptions are noted below: a) The INITIAL rule is only executed from a "halted" state. In other words, if the system was "suspended" or "aborted out of" (using the key to stop PICON instead of HALT) then the INITIAL rule does not get run. A "halted" state can be created in only 2 ways:i) If during the running of PICON the HALT command is selected.ii) If the RESET command is selected, and HALT is furthur selected, and confirmed. (the RESET command is useful when the system is suspended and you wish to have a "halted" state) b) The INITIAL rule only runs once from a halted state and never again during the same run. c) There can be as many INITIAL rules as you wish. There is no way to control in which order they are executed, however. 2) Run this example. The printing of the message is all that happens. Try the following: a) [L] on "Halt". [L] on "Run". Notice that the INITIAL rule is executed again. b) Type: . (This stops (suspends) the PICON system.) [L] on Run. (This resumes the PICON system from where it was suspended.) Notice that the INITIAL rule is NOT re-executed. c) [L] on "Suspend". [L] on "Run". Notice that the INITIAL rule is NOT re-executed.- EXERCISE 9. ------------ This exercise illustrates the use of UNCONDITIONAL rules and other techniques on the use of the variable time. . [L] on "Load". . [L] on "EXERCISE-9". . Type . . Exercise 9 Script: 1) The INITIAL rule sets the value of initial-time = time. This has the effect of starting a "stopwatch" setting the value of initial-time to time. Then at any time during the simulation, the elapsed time can be computed by subtracting intial-time from time. All of this may seem unnecessary. The variable time, however, is respresented differently than just a simple number. 2) Next, using the UNCONDITIONAL rule, the value of T1 and the elapsed time are recorded into a log file for monitoring purposes. Since this is a simulation and no real log file has been created, the message is routed to the engineer's workstation (this screen). We will discuss the subject of message routing later. 3) Run this example and note that the message is printed at one minute intervals. The scan interval for the UNCONDITIONAL rule is 1 minute as the message prints "every time".- EXERCISE 10. ------------- This exercise illustrates the use of "STEP" variables. . [L] on "Load". . [L] on "EXERCISE-10". . Type . . Exercise 10 Script: 1) The DEFINITION rule defines the step variable wave-step to have 3 different steps, namely: a) start-wave b) wave-increasing c) wave-decreasing This step variable then is allowed to only be one of the three which are defined. 2) The INITIAL rule gives the wave-step step variable its initial value of "start-wave". One could also set the initial value by saying "initialize wave-step". Notice the different grammar for manipulating step variables. This grammar consist of: a) advance - adjusts the value to any of the other permissible values b) is - to determine if the step variable is equal to something c) not - to negate equality d) is before - equivalent to less than e) is after - equivalent to greater than f) is at or after - equivalent to greater or equal g) initialize - sets step variable to beginning. 3) The IF-THEN rule then checks to see if F1 is increasing. If so, then the step variable is advanced to the wave- increasing step. 4) Select RUN. 5) Notice that there is no mechanism to detect if the wave is decreasing. 6) Set up the appropriate statement(s) which would fix this problem. See SOLUTION-10 for the answer.- EXERCISE 11. ------------- This exercise shows how to make use of historical sensor data in rules. This historical data is accessed in terms of a delayed value or a rate of change in values. . [L] on "Load". . [L] on "EXERCISE-11". . Type . . Exercise 11 Script: 1) The simulation developed here shows a flow-meter (F1) which monitors incoming flow, and a tank level sensor (L1) which reports the value of the tank's level. 2) The simulation for F1 initially ramps up, then remains constant for a period, then ramps down to zero. 3) The simulation for L1 is based upon the values for F1 and the area of the tank. Here is the equation for L1: L1 = Old L1 + .0167 * (F1 / tank-area) where tank-area = 2.02 4) The IF-THEN rule determines the change in the level (L1) by subtracting the value as of 30 seconds ago. This is then stored in the variable delta-level. 5) If delta-level is found to be changing too fast, an appropriate message is sent to the operator. Buried in the text of the message is the average value of F1 over 5 minutes. This is how to access the average value. 6) Run this knowledge base. Notice the ****** which is printed in the message. Since insufficient data has been collected to compute an average, the ******'s get printed. What you should have learned in this exercise: ----------------------------------------------- - How to use the WHENEVER rule. - How to use the INITIAL rule. - How to HALT and SUSPEND the system. - How to use UNCONDITIONAL rules. - Further uses of step variables. - How to use historical data functions such as:. Old values.. Average values.. Rate of change (not discussed, see manual).. Std deviation (not discussed, see manual).LMFL(:BYTE-SIZE 8 :AUTHOR "DWR" :QFASLP NIL :LENGTH 11104 :CREATION-DATE 2730896540 :CHARACTERS T :DIRECTORY "PICON-CLASS" :NAME "LAB-SESSION-6" :TYPE "TEXT" :VERSION 10) -*- Mode:Text; Fonts:(CPTFONTB HL12I) -*-PICON Lab Session # 6_____________________ PURPOSE _______ The purpose of this sixth lab session is to introduce a sort of "tool kit" of techniques in dealing with certain kinds of problems. - EXERCISE 12. _____________ This exercise illustrates how to monitor and control activities which depend upon a time interval to properly function. This exercise will show how to compute the time it takes to fill up the tank. manipulate "timer" variables. . [L] on "Load". . [L] on "EXERCISE-12". . Type . . Exercise 12 Script: 1) Rule #1 makes the conclusion that the tank-is-filling if L1 has been increasing. Notice the use of historical data. This causes forward chaining on the conclusion thus invoking rule #3. When it is determined that L1 is not increasing, the conclusion tank-is-filling is negated, again causing forward chaining, but this time on the "not tank-is-filling" conclusion, thus invoking rule #2. The scan interval of rule #1 is 10 seconds as is the currency interval of L1. Here are some notes on the different intervals in PICON: - The scan interval, as you may remember, is the frequency at which the rule tests its antecedent. - The currency interval establishes the sampling rate at which data is acquired from the data supplier (whatever that might be.) It also serves to establish the length of time which this data is considered. Once a sensor's currency interval has expired, a new value must be obtained from the data supplier in order for a rule to use it. - Just having a sensor present on the schematic, is not enough, however, to obtain values. A rule MUST exist which requests the value of the sensor. This rule, depending on the type, primary or secondary, will determine the way in which data values are supplied. This will be discussed furthur in the RTIME lecture. 2) Rule #3 then is chained-to when tank-is-filling is true. The value of fill-time is incremented by 10 seconds when rule #3 is activated. The INITIAL rule (#4) takes care of initializing fill-time before the start of the simulation. It is important to intialize variables which are incremented. 3) When the "else" clause of rule #1 is concluded, it stops the incrementing of fill-time, and causes rule #2 to print out the fill time. 4) This is a useful technique for controlling timed events. Notice that only 1 rule has been given a scan interval, namely rule #1. It is always a good practice to keep the number of rules with a scan interval (called primary rules) to a minimum. 5) Run this knowledge base and observe its behavior. 6) Modify this knowledge base to print the value of the time it takes for the tank to empty. See SOLUTION-12 for a possible method.- EXERCISE 13. _____________ This exercise illustrates how to monitor "timed" events using "step" variables as well as the techniques used in the previous exercise. . [L] on "Load". . [L] on "EXERCISE-13". . Type . . Exercise 13 Script: 1) In the same way as the first exercise, a timer is started is the level is found to be increasing. The difference in the exercises stems from the use of step variables to control the timer. This method gives the capability of controlling when the timer is actually running and what its state has been. This is accomplished by checking the filling-step to see that it has been filling and it is actually is increasing. Notice that there is no initial message saying that the "fill time = 0.0". Nor does the message repeat, because the filling step is not = filling. 2) Run this knowledge base. 3) Modify this exercise to print drain time in a like manner using the step variable approach.- EXERCISE 14. _____________ This exercise reviews the "focus" capability. . [L] on "Load". . [L] on "EXERCISE-14". . Type . . Exercise 14 Script: 1) Rule #1 checks for T1 > 212 and does a conclude and a focus in the case that it is true. 2) IF the cooler-switch = 1, in other words the cooler is apparently on, there must be a malfunction. 3) Run this knowledge base. 4) Add a rule which will check the cooler-switch = 0 and send a message to the operator to turn the switch on.- EXERCISE 15. _____________ This exercise reviews the activate command. . [L] on "Load". . [L] on "EXERCISE-15". . Type . . Exercise 15 Script: 1) Rule #1, if true will invoke rule #2 becuse of "activating" CHECK-COOLING rules. [M] on rule #2 to see that its category = CHECK-COOLING. 2) Run this knowledge base. 3) Change rule #2 to have a category of CHECK-COOLER and an associated unit of TANK and activate rules only having this combination of attributes. See SOLUTION #15 for a possible answer. - EXERCISE 16. _____________ This exercise illustrates how to make use of feedback controller information in rules. . [L] on "Load". . [L] on "EXERCISE-16". . Type . . Exercise 16 Script: 1) The IF-THEN rule checks the value of F1 - F1 setpoint. F1 refers to the process value whereas F1 setpoint refers to the desired setting for F1. PICON allows rules to change the setpoints for various sensors which will be discussed in the next exercise. In addition to setpoints the following information may also be used: - high limit - The high limit of this sensor value. - low limit - The low limit of this sensor value. - output - The controllers adjustment to the physical device that it is connected to; this would be a pump or valve probably. 2) Notice that the F1 setpoint had to be specially simulated. 3) Run this knowledge base.- EXERCISE 17. _____________ This exercise illustrates how to control a process using setpoint control within the simulation. . [L] on "Load". . [L] on "EXERCISE-17". . Type . . Exercise 17 Script: 1) Rule #1 defines a variable named setpoint-change and sets it equal to 100 - F1. 2) Rule #2 unconditionally sets F1 setpoint equal to 100 + setpoint-change. This attempts to keep the readings for F1 as steady as possible. 3) Notice the structure of the simulation statement. Remember that while in the simulator, if you wish data to be passed from the simulator to PICON and in this case, from PICON to the data supplier, you must provide it in the apprpriate place. F1 setpoint is initially set to 100 then after that will evaluate to whoever sets it. 4) Run this knowledge base. 5) Modify this example such that F1 setpoint will be 79 if F1 is > 100, and 121 if F1 is below 100. See SOLUTION-17.- EXERCISE 18. _____________ This exercise illustrates how to invoke lisp call statements from PICON rules. . [L] on "Load". . [L] on "EXERCISE-18". . Type . . Exercise 18 Script: 1) The IF-then rule checks for T12 > 100 and then sends a message with the square root of T12 imbedded in the text. 2) The lisp code for the function square-root is contained in the file:picon:picon;square-root-code.lisp_________________________________ 3) Read the lisp code which describes this function:a) Type: E (Go to the editor.)b) Type: CTRL-X CTRL-F (Find a file.) c) Type: picon:picon;square-root-code.lisp d) The file will be loaded into a buffer and enable editing.e) Type: META-X compile buffer f) This will compile the function and allow PICON then to use it in a rule.g) Type: 1h) Click [L] on "Run". 4) This example is just to show you how to invoke lisp code from a PICON rule. A listing of the square-root function is shown in FIGURE 1. FIGURE 1________- EXERCISE 19. _____________ This exercise illustrates how to invoke lisp call statements from PICON rules. . [L] on "Load". . [L] on "EXERCISE-19". . Type: E To get into the editor. . Type: CTRL-X CTRL-F . Type: prompt-code.lisp . You should see two function definitions and a defvar for: - (defvar input-value) - prompt-for-new-value - get-current-value . The function 1prompt-for-new-value* will ask you for a new input value for what you are controlling, in this case the setpoint to a controller. . The second function, 1get-current-value* simply passes back the value you provided after you were prompted. . The variable 1input-value *holds the value you provided in 1prompt-for-new-value*. - CASE STUDY #2 _____________ This case study builds upon the first case study presented in Lab Session 4. Since the solution to Case Study 1 is stored in in case-1-solution and has also been provided in case-study-2, use this as a starting place in which to build you solution to this case study. . [L] on "Load". . [L] on "CASE-STUDY-2 . . You should add your new rules into this file. When you save it, use a name other than CASE-STUDY-2. . Problem description: This scenario must be monitored for the following: 1) The time it takes to fill the tank must be recorded to a log for tracking purposes. 2) The time to drain the tank and pass the fluid through the filter must be less than 999 seconds. 3) Use the control technique used in EXERCISE-19 to provide new setpoint values for the tank level controller by entering new values into the lisp function provided. 4) Save your solution and load "CASE-2-SOLUTION" for one possible method for a solution. What you should have learned in this exercise: ----------------------------------------------- - How to monitor and control activities which depend upon the use of time. - How, in more detail, the forward chaining "focus" works, in terms of its behavior based on the scan and alert intervals. - How to simulate and access feedback controller information. - How to set the value of a controller setpoint in order to control a particular function. - How to manually set a controller's setpoint using a lisp function. - How to call lisp functions from rules. LMFL(:BYTE-SIZE 8 :AUTHOR "DWR" :QFASLP NIL :LENGTH 3145 :CREATION-DATE 2729272863 :CHARACTERS T :DIRECTORY "PICON-CLASS" :NAME "LAB-SESSION-7" :TYPE "TEXT" :VERSION 4) -*- Mode:Text; Fonts:(CPTFONTB) -*-PICON Lab Session # 7--------------------- PURPOSE ------- The purpose of this seventh lab session is to assist you in creating your own icons. 1) The icon definitions are stored as follows: ___________________________________________a) PICON-ICONS.QFASLIs the "root" of the icon library.This file cannot be modified.b) CODE-FOR-LMI-PICON-DEMOS.LISP This file contains avarietyof usefull icons typicallyused inthe LMI demos. The icons inthis file typically consist ofpetro-chemical process-controlreleated equipment.c) USER-ICONS.LISP This is a customized file of misc. icons which have been accumulated over several beta sites.d) CLASS-ICONS.LISPThis file contains three example iconsfor PICON class. You should refer tothis file for help in building youricons. 2) To get started, follow this procedure: ______________________________________a) Type: Eb) Type: CTRL-X CTRL-Fc) Type: picon:picon;class-icons.lisp d) This will display an editor buffer which will allow you to manipulate your icons. As you can see, there are three examples you can follow to create your icons. Before proceeding do the following:- Type: CTRL-X CTRL-W (the command to write a file)- Type: xxx-icons.lisp (where xxx = your initials)- This will simply write out a version of this file for you to use without affecting any other students' work. From now on, refer to your file by the name you just gave it. e) Refer to the ZMACS Command Summary (provided) to familiarize yourself with the editor commands. Several of the more common commands are listed here:Move R 1 Char - CTRL-FMove L 1 Char - CTRL-BMove R 1 Word - META-FMove L 1 Word - META-BPage Ahead - CTRL-vPage Back - META-vLine Down - CTRL-nLine Up - CTRL-pLine Begin - CTRL-aLine End - CTRL-eErase R 1 Char - Erase L 1 Char - CTRL-dErase R 1 Word - META-Erase L 1 Word - META-dErase Line - CTRL-k (from cursor position to the right) Compile Expression - CTRL-Shift-c while the blinking cursor is on the expression you wish to compile. 3) Create an Icon. _______________a) Create a special piping icon which looks like the following picture:FIGURE 1________ 3) Create an Icon, continued. --------------------------b) The icon should be called piping, and have a parent of process-equipment.c) The piping icon should have 1 input port on the left and two output ports on the right. 4) When you have finished adding icons, save your file by: Typing: CTRL-X CTRL-S (saves the file under the last name it was written to - the name you earlier supplied)LMFL(:BYTE-SIZE 8 :AUTHOR "dwr" :QFASLP NIL :LENGTH 578 :CREATION-DATE 2713276428 :CHARACTERS T :DIRECTORY "PICON-CLASS" :NAME "LAB-SESSION-9" :TYPE "TEXT" :VERSION 1) 4) Once PICON is loaded, (this is when PICON displays the PICON window) do the following: a) type: ;this allows you to talk to Lisp underneath PICON. b) type: (load "user-kb.lisp") ;notice that you don't have to specify the logical machine, and directory in this case. When you loaded the file LOAD (in step 3 above) that established the directory where the LOAD file existed (namely DUKE:PICON-CLASS;) as the default directory from now on.c) type: ;this puts you back into PICON control.LMFL(:BYTE-SIZE 8 :AUTHOR "DWR" :QFASLP NIL :LENGTH 90 :CREATION-DATE 2725724052 :CHARACTERS T :DIRECTORY "PICON-CLASS" :NAME "LAB-SESSION-MASTER" :TYPE "TEXT" :VERSION 1) -*- Mode:Text; Fonts:(CPTFONTB) -*-PICON Lab Session # ^---------------------LMFL(:BYTE-SIZE 16 :AUTHOR "LB" :CHARACTERS NIL :QFASLP NIL :LENGTH 8657 :CREATION-DATE 2734444547 :DIRECTORY "PICON-CLASS" :NAME "LB-CASE-1" :TYPE "PIC" :VERSION 1) hưs2Dp,lFASD-DATADlLBRalphPFfFDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB 1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE KAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK BMDBNCLBCNEXT-NEW-STATEMENT-NUMBERF~CFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDCASE-STUDY-1FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?Case Study 11DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBpDBK KBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBxDBK KBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDBDBK KBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK KBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK KBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK '=BMBNMESSAGE-MUST-PRINT-INTERVALF1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK KBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK KBMBN1DBIDBJDCDEFINITIOND BK rBMBWÁSTATEMENT-TEXTDDC=DCPUMP1-MALFUNCTIONCCONDITIONNILllet pump1-malfunction be a named conditionCSTATEMENT-NUMBER?FyBACKTRACK-TO-GET-VALUE?B-1DBIDBJDBD BK pBMBWBDDBDPUMP-MALFUNCTIONBBllet pump-malfunction be a named conditionBFwBB-1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBF( FFv FD/DCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBeMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDIF-THEN-RULEDBK BMBWBDDCIFDBÀCLOCKFDDSENDDend simulationDDESTINATIONOPERATORif clock = 2000 then send "end simulation" to operatorBF|B-F F|FFDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFF F|FFDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-F FFFBDBDBBB-BDBDBIDBJDBDBK }BMBWBDDBDNOTDCCL1F|DDBD,WARNING: tank-1 overfill danger l1 ~6FBADBBif l1 > 380 then send "WARNING: tank-1 overfill danger l1 ***" with l1 to operatorBFzPICON-RULE-SCAN-INTERVALFCPICON-RULE-ALERT-INTERVALFB-F F-FFCDDBDBBBFF F-FFCDDBDBBB-F F3FF@BJDBDBBB-BDBDBIDBJDBD BK rBMBWBDDBDBBBllet pump1-malfunction be a named conditionBFxBB-B-F FF3F%DDBDBBBFF FF3F%DDBDBBB-F FF;F"BnDBDBBB-BDBDBIDBJDBD BK rBMBWBDDBDB@CF1F<DDCONCLUDEBlif f1 > 60 then conclude pump1-malfunctionBFrBMFB-F FF2FDDBDBBBFF FF2FDDBDBBB-F F F:BDBDBBB-BDBDBIDBJDFREE-TEXT-STATEMENTDBK gBMBWBRules added by Lauralee Barrett 26 Aug 1986BFnB-F F7F:F!DDBDBBBFF F7F:F!DDBDBBB-F F1FBF$BDCNAPH-CHROMATOGRAPH-ANALYTICAL-PORT-SENSORDSENSOR-CURRENCY-INTERVALF SENSOR-TRACING-REQUESTSB-FFF!FBDBDBBB-BDBDBIDBJDSIMULATION-STATEMENTDBK mHBMBNBDDSIMULATECP2DMAXDC*CF4ǀ3e33simulate P2 with 0 then (max ( 0 ,F4 * 12.65))BF(B-FFxF FDDBDBBBFFFxF FDDBDBBB-FF~F FBDBDBBB-BDBDBIDBJDBD BK BMBNBDDBDB@BBif clock > 0 then do nothingBFBMF B-F F{FFeDDBDBBBFF F{FFeDDBDBBB-F FuFFhBDBDBBB-BDBDBIDBJDBD BK CBMBNBDDBDB@BBlif P2 > 0 then do nothingBFiBMF B-F FFFDDBDBBBFF FFFDDBDBBB-F FFFB)DBDBBB-BDBDBIDBJDBD BK  BMBNBDDBDB@CP1Blif P1 > 0 then do nothingBF*BMF B-F FFFDDBDBBBFF FFFDDBDBBB-F FFFBLDBDBBB-BDBDBIDBJDBD BK  BMBNBDDBDB@BBlif F4 > 0 then do nothingBF)BMF B-F FFFDDBDBBBFF FFFDDBDBBB-F FFFBnDBDBBB-BDBDBIDBJDBD BK BMBNBDDBDB@CF3Blif F3 > 0 then do nothingBF!BMF B-F FFFDDBDBBBFF FFFDDBDBBB-F F FFBDBDBBB-BDBDBIDBJDBD BK {BMDBNBWBDDBDB@BBlif F2 > 0 then do nothingBFBMFB-F F6FF DDBDBBBFF F6FF DDBDBBB-F F0FF#BDBDBBB-BDBDBIDBJDBD BK CBMBNBDDBDB@BBlif F1 > 0 then do nothingBFBMF B-F F[FFEDDBDBBBFF F[FFEDDBDBBB-F FUFFHBDBDBBB-BDBDBIDBJDBD BK xBMDBNBWBDDBDB@BABlif L1 > 0 then do nothingBFBMF B-F FFFkDDBDBBBFF FFFkDDBDBBB-F F{FFnBDBDBBB-BDBDBIDBJDBDBK MBMBNBDlThe purpose of these rules is to force thedisplaying of sensor values on the schematicBF_B-F FFFDDBDBBBFF FFFDDBDBBB-F FF FBDBDBBB-Fw FFFBDBDBBB-BDBDBIDBJDBDBK 18BMBNBDDBCTEMP-STARTBFPsimulate temp-start with 80BF.B-FFF FDDBDBBBFFFF FDDBDBBB-FFF FB@DBDBBB-BDBDBIDBJDBDBK CBMBNBDDBSIM-TANK-AREA-2Bǀplsimulate sim-tank-area-2 with 3.5BFjB-FQFoF FDDBDBBBFFQFoF FDDBDBBB-F\FuF FBaDBDBBB-BDBDBIDBJDBDBK N=BMBNBDDBÁSIM-TANK-AREABǀ@ ,simulate sim-tank-area with 2.02BFWB-FZFFF F\DDBDBBBFFZFFF F\DDBDBBB-FeFLF FYBDBDBBB-BDBDBIDBJDBDBK p8BMBNBDDBBTIME,simulate clock with 0 then timeBFB-FcFF F5DDBDBBBFFcFF F5DDBDBBB-FnF%F F2BDBDBBB-BDBDBIDBJDBDBK 98BMBNBDDBCTEMP-WAVEBDCPICON-WAVEFFFpF`T,simulate local temp-wave with wave with centrallvalue 2000 and deviation 2000 and period 8 hours ,and phase 21600BF-B-FFF F DDBDBBBFFFF F DDBDBBB-FFFc FBDBDBBB-FFF FBDBDBBB-FFFRFBDBDBBB-BDBDBIDBJDBDBK CBMBNBDDBBHDBǀPBlsimulate P1 with 0 then (2.5 * F3)BF\B-FKFF FDDBDBBBFFKFF FDDBDBBB-FVFF FBDBDBBB-BDBDBIDBJDBDBK ]HBMBNBDDBF3-WAVEBDBFPF<ǀ3S33simulate local f3-wave with wave with centralvalue 80 and deviation 0 and period 1 minute and noise 1.3BFkB-FF(F F^DDBDBBBFFF(F F^DDBDBBB-FF.Fx F;B"DBDBBB-FF>F FKB#DBDBBB-FFNFgF[B$DBDBBB-BDBDBIDBJDBDBK mHBMBNBDDBBDBDC-BǀVsimulate F4 with 0 then (max ( 0, f3 - .021))BF'B-FFF F DDBDBBBFFFF F DDBDBBB-FFF FBUDBDBBB-BDBDBIDBJDBDBK \HBMBNBDDBBDBDBBFDBDBBFDMINBDC+Bǀ3c33DBDBBF,simulate F3 with 0 then if time < 1200 then 0 else if time < 1800 then (min (f3-wave, (F3 + 3.1))) else if time < 2000 then 0 else 0BF"B-FFF FDDBDBBBFFFF FDDBDBBB-FFFsFBDBDBBB-FFFFBDBDBBB-FFF FBDBDBBB-FFFFBDBDBBB-BDBDBIDBJDBDBK CBMBNBD DBBBDBDBBFDBFdFdFXFDBDBBFDBFdF<ǀffffDBDBBFXDBFdFdFXFlsimulate F2 with ,if time < 150 then wave, with central value 100 and deviation 100 and, period 600 seconds and phase 450 elseif time < 450 then wave with central value 100l and deviation 0 and period 1 minute and noise .4 else ,if time < 600 then wave, with central value 100 and deviation 100 andl period 600 seconds and phase 450 else 0BFhB-FmF&F FpDDBDBBBFFmF&F FpD DBDBBB-FxF FFBDBDBBB-FFFUFBDBDBBB-FF- F BDBDBBB-FFFFBDBDBBB-FF F$ F-BDBDBBB-FF0F F=BDBDBBB-FF@FUFMBDBDBBB-FFPF- F]BDBDBBB-FF`F FmBDBDBBB-BDBDBIDBJDBDBK CBMBNBD DBBBDBDBBFDBF<F<FXFDBDBBFDBF<F<ǀLDBDBBFXDBF<F<FXFlsimulate F1 with B with central value 60 and deviation 60 andBlif time < 450 then wave with central value 60 and deviation 0 and period 1 minute and noise .3 else ,if time < 600 then wave with central value 60 and deviation 60 andl period 600 seconds and phase 450 else 0BFB-FFF FADDBDBBBFFFF FAD DBDBBB-FFF4FBODBDBBB-FFFyFBDBDBBB-FFF? FBPDBDBBB-FFF FBDBDBBB-FFFl FBQDBDBBB-FFF FtBRDBDBBB-FFqFyFdBSDBDBBB-FFaF? FTBTDBDBBB-FFQF$ FDBUDBDBBB-BDBDBIDBJDBD BK bBMDBNBWBD BCGAP-VALUElsimulate T1 with 125 then if time < 600 then 80 else ,if time < 900 then wavel with cen...tral value 80 and deviation 170 andl period 1200 seconds and phase 300 else if time < 2400 then 250 else ,if time < 3000 then wave, with central value 125 and deviation 125 and period 2400 seconds and phase 1200 else 70DBJDFF B-BFB-FFF FDDBDGAPS-IN-TEXTDDFF BBBFFFF FD DBDBBB-FF}FFpBDBDBBB-FFmFF`BDBDBBB-FF]FFPBDBDBBB-FFMF F@BDBDBBB-FF=FZ F0BDBDBBB-FF-FF BDBDBBB-FFFFBDBDBBB-FF F FBDBDBBB-FFFu FBDBDBBB-BDBDBIDBJDBDBK HBMBNBD DBBADBDBBFXDByDBzBADBǀ=DFDC/BBDBǀ=DFDBBB^FDBDBBFFDBDBBFDBFFFFF,simulate L1 with 0 then lif time < 600 then min ((L1 + (.01666 * (F1 / sim-tank-area)) + (.01666 * (F2 / sim-tank-area-2))), 400) elseif time < 1200 then 397 else ,if time < 1800 then wave, with central value 400 and deviation 400 andl period 1200 seconds and phase 1800 and shape ramp-down else 0BFB-F[F)F FDDBDBBBFF[F)F FD DBDBBB-FfF#F=FB"DBDBBB-FuFFFB#DBDBBB-FuFF FB$DBDBBB-FuFF FB%DBDBBB-FuFFyFB&DBDBBB-FuFFLFB'DBDBBB-FuFF FB(DBDBBB-FuFF~ FB)DBDBBB-FuFFFB*DMAGNETIC-FLOWMETER-FLOW-THRU-SENSORDBB-FbFFDF4BDTHERMOCOUPLE-TEMPERATURE-PORT-SENSORDBF BB-FFFrFCT1DBDBBB-BDBDBIDBJDBDBK >BMBNB,Chemical Mixing ProcessBF%B-F'FFFFDDBDBBBFF'FFFFDDBDBBB-FFFNFBDÁMATERIAL-SINKBFFlF5FÀTANK-2DCGUAGE-PRESSURE-THRU-SENSORDBB-FFFFBDÁHEAT-EXCHANGERBFlFFFÀCOOLERDBwDBB-F>FF\FBDMATERIAL-SOURCEBF>FFFaÀMIX-2DCCENTRIFUGAL-VARIABLE-COMPUTER-PUMPBFF"FFJÀPUMP-2DBwDBB-FFFFDBDTWO-INPUT-MIXED-TANKBF)F|FeF"ÀTANK-1DBDBB-BFFhFFFzBADBDBB-FFFFOBHDEQUAL-PERCENTAGE-VARIABLE-CONTROL-VALVEBF<FFF_CV1DBwDBB-FFFpF]BDBBFFoFFGÀPUMP-1DBBFBFFF0ÀMIX-1DDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFDCFLOW-PIPEBFF(ÃTHRU-SENSOR-OUTPUT-CONNECTIONMIXED-TANK-INPUT-PORT-2FTDBBFBBBFDBBF&FÂPUMP-OUTPUT-CONNECTIONTHRU-SENSOR-INPUT-CONNECTIONBDBBFBBBFDBBF#FHEAT-TRANSFER-OUTPUT-PORT-1CPORT-SENSOR-INPUTBDBBBF+BVALVE-CONTROL-CONNECTIONFDBBF)BBBFDBBBF&BCPUMP-CONTROLLER-CONNECTIONFDBBF"F!B SINK-INPUT-PORTF2DBBF"BBBFDBBBF#BCHEAT-TRANSFER-INPUT-PORT-1FDBBF#F$HEAT-TRANSFER-OUTPUT-PORT-2BBDBBF*F#B CHEAT-TRANSFER-INPUT-PORT-2DFFvFF@DBBF$F"B BBDBBF$BBBFDBBF%F&HOLDER-OUTPUT-CONNECTIONÂPUMP-INPUT-CONNECTIONBDBBF'F*B BBDBBF'BBBFDBBF(F'BIBBDBBBF)BBDF!F DBBF*BBBFDBBF+F(VALVE-OUTPUT-CONNECTIONMIXED-TANK-INPUT-PORT-1BDBBF,F+B ÂVALVE-INPUT-CONNECTIONBDBBF,BBBFDBBBF-BB%FDBBF-F,BBBDBBF.F-BIBJBB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "LB" :CHARACTERS NIL :QFASLP NIL :LENGTH 8941 :CREATION-DATE 2734453283 :DIRECTORY "PICON-CLASS" :NAME "LB-CASE-1" :TYPE "PIC" :VERSION 2) hưs2Dp,lFASD-DATADlLBRalph)rFfFDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB 1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE KAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK BMDBNCLBCNEXT-NEW-STATEMENT-NUMBERFCFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDCASE-STUDY-1FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?Case Study 11DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBpDBK KBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBxDBK KBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDBDBK KBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK KBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK KBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK '=BMBNMESSAGE-MUST-PRINT-INTERVALF1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK KBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK KBMBN1DBIDBJDCDEFINITIOND BK pBMBWÁSTATEMENT-TEXTDDC=DPUMP-MALFUNCTIONCCONDITIONNILllet pump-malfunction be a named conditionCSTATEMENT-NUMBER?FwBACKTRACK-TO-GET-VALUE?B-1DBIDBJDBD BK rBMBWBDDBDCPUMP1-MALFUNCTIONBBllet pump1-malfunction be a named conditionBFyBB-1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBF( FFv FD/DCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBeMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDIF-THEN-RULED BK BMBWBDDCIFDC>CF1F<DDSENDD,pump malfunction, mix-1 to tank-1 flow ~6F >60BDDESTINATIONOPERATORlif f1 > 60 then send "pump malfunction, mix-1 to tank-1 flow *** >,60" with f1 to operatorBFrPICON-RULE-SCAN-INTERVALFB-F FFZFDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFF FFZFDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-F F FbFBDBDBBB-F FFFBDBDBBB-BDBDBIDBJDBD BK BMBWBDDBDBDÁRATE-OF-CHANGECL1FFDDBD,tank level ~6F still increasingBDBB,if the rate per second over 15 seconds of l1 > 0,then send "tank level *** still increasing" withl1 to operatorCSTATEMENT-KEYWORDSTANKBF~B-F FFFDDBDBBBFF FFFDDBDBBB-F FFFB&DBDBBB-F FFFB'DBDBBB-F FF' FB(DBDBBB-BDBDBIDBJDBD BK BMBWBDDBDBÀCLOCKFDDBDend simulationDBBif clock > 2000 then send "end simulation" to operatorBF|BFB-F F|FFDDBDBBBFF F|FFDDBDBBB-F FFFB]DBDBBB-BDBDBIDBJDBD BK BMBWBDDBDCCF2FdDDBD,pump malfunction, mix-2 to tank-1flow ~6F > 100B}DBB,if f2  100 then send "pump malfunction, mix-2 to tank-1flow *** > 100" with f2 to operatorBF{BFB-F FKFFqDDBDBBBFF FKFFqDDBDBBB-F FQFF^BDBDBBB-F FaFkFnBDBDBBB-BDBDBIDBJDBD BK BMBWBDDBDBBF|DDBD,WARNING: tank-1 overfill danger level ~6F > 380BDBBDÀFOCUSB+if l1 > 380 then send "WARNING: tank-1 overfill danger level *** > 380" with l1 to operatorland focus on tankBFzBFCPICON-RULE-ALERT-INTERVALFB-F FFqFCDDBDBBBFF FFqFCDDBDBBB-F F#FyF0BDBDBBB-F F3F F@BDBDBBB-BDBDBIDBJDFREE-TEXT-STATEMENTDBK BMBWBRules added by Lauralee Barrett 26 Aug 1986BFnB-F F7F:F!DDBDBBBFF F7F:F!DDBDBBB-F F1FBF$BDCNAPH-CHROMATOGRAPH-ANALYTICAL-PORT-SENSORDSENSOR-CURRENCY-INTERVALF SENSOR-TRACING-REQUESTSB-FFF!FBTDBDBBB-BDBDBIDBJDSIMULATION-STATEMENTDBK mHBMBNBDDSIMULATECP2DMAXDC*CF4ǀ3e33simulate P2 with 0 then (max ( 0 ,F4 * 12.65))BF(B-FFxF FDDBDBBBFFFxF FDDBDBBB-FF~F FBDBDBBB-BDBDBIDBJDBD BK BMBNBDDBDBBTBif clock > 0 then do nothingBFBF B-F F{FFeDDBDBBBFF F{FFeDDBDBBB-F FuFFhB3DBDBBB-BDBDBIDBJDBD BK CBMBNBDDBDBBBlif P2 > 0 then do nothingBFiBF B-F FFFDDBDBBBFF FFFDDBDBBB-F FFFBUDBDBBB-BDBDBIDBJDBD BK  BMBNBDDBDBCP1Blif P1 > 0 then do nothingBF*BF B-F FFFDDBDBBBFF FFFDDBDBBB-F FFFBxDBDBBB-BDBDBIDBJDBD BK  BMBNBDDBDBB Blif F4 > 0 then do nothingBF)BF B-F FFFDDBDBBBFF FFFDDBDBBB-F FFFBDBDBBB-BDBDBIDBJDBD BK BMBNBDDBDBCF3Blif F3 > 0 then do nothingBF!BF B-F FFFDDBDBBBFF FFFDDBDBBB-F F FFBDBDBBB-BDBDBIDBJDBD BK {BMDBNBWBDDBDBB}Blif F2 > 0 then do nothingBFBFB-F F6FF DDBDBBBFF F6FF DDBDBBB-F F0FF#BDBDBBB-BDBDBIDBJDBD BK CBMBNBDDBDBBBlif F1 > 0 then do nothingBFBF B-F F[FFEDDBDBBBFF F[FFEDDBDBBB-F FUFFHBDBDBBB-BDBDBIDBJDBD BK xBMDBNBWBDDBDBBBlif L1 > 0 then do nothingBFBF B-F FFFkDDBDBBBFF FFFkDDBDBBB-F F{FFnB%DBDBBB-BDBDBIDBJDBDBK MBMBNBDlThe purpose of these rules is to force thedisplaying of sensor values on the schematicBF_B-F FFFDDBDBBBFF FFFDDBDBBB-F FF FBDDBDBBB-Fw FFFBEDBDBBB-BDBDBIDBJDBDBK 18BMBNBDDBCTEMP-STARTBFPsimulate temp-start with 80BF.B-FFF FDDBDBBBFFFF FDDBDBBB-FFF FBlDBDBBB-BDBDBIDBJDBDBK CBMBNBDDBSIM-TANK-AREA-2Bǀplsimulate sim-tank-area-2 with 3.5BFjB-FQFoF FDDBDBBBFFQFoF FDDBDBBB-F\FuF FBDBDBBB-BDBDBIDBJDBDBK N=BMBNBDDBÁSIM-TANK-AREABǀ@ ,simulate sim-tank-area with 2.02BFWB-FZFFF F\DDBDBBBFFZFFF F\DDBDBBB-FeFLF FYBDBDBBB-BDBDBIDBJDBDBK p8BMBNBDDBBTTIME,simulate clock with 0 then timeBFB-FcFF F5DDBDBBBFFcFF F5DDBDBBB-FnF%F F2BDBDBBB-BDBDBIDBJDBDBK 98BMBNBDDBCTEMP-WAVEBDCPICON-WAVEFFFpF`T,simulate local temp-wave with wave with centrallvalue 2000 and deviation 2000 and period 8 hours ,and phase 21600BF-B-FFF F DDBDBBBFFFF F DDBDBBB-FFFc FBDBDBBB-FFF FBDBDBBB-FFFRFBDBDBBB-BDBDBIDBJDBDBK CBMBNBDDBBtDB ǀPBlsimulate P1 with 0 then (2.5 * F3)BF\B-FKFF FDDBDBBBFFKFF FDDBDBBB-FVFF FB'DBDBBB-BDBDBIDBJDBDBK ]HBMBNBDDBF3-WAVEBDBFPF<ǀ3S33simulate local f3-wave with wave with centralvalue 80 and deviation 0 and period 1 minute and noise 1.3BFkB-FF(F F^DDBDBBBFFF(F F^DDBDBBB-FF.Fx F;BNDBDBBB-FF>F FKBODBDBBB-FFNFgF[BPDBDBBB-BDBDBIDBJDBDBK mHBMBNBDDBB DB DC-BǀVsimulate F4 with 0 then (max ( 0, f3 - .021))BF'B-FFF F DDBDBBBFFFF F DDBDBBB-FFF FBDBDBBB-BDBDBIDBJDBDBK \HBMBNBDDBBDBDCBMBNB,Chemical Mixing ProcessBF%B-F'FFFFDDBDBBBFF'FFFFDDBDBBB-FFFNFBDÁMATERIAL-SINKBFFlF5FÀTANK-2DCGUAGE-PRESSURE-THRU-SENSORDBB-FFFFBDÁHEAT-EXCHANGERBFlFFFÀCOOLERDBDBB-F>FF\FB DMATERIAL-SOURCEBF>FFFaÀMIX-2DCCENTRIFUGAL-VARIABLE-COMPUTER-PUMPBFF"FFJÀPUMP-2DBDBB-FFFFDBDTWO-INPUT-MIXED-TANKBF)F|FeF"ÀTANK-1DBDBB-BFFhFFFzBDBDBB-FFFFOBtDEQUAL-PERCENTAGE-VARIABLE-CONTROL-VALVEBF<FFF_CV1DBDBB-FFFpF]BDBBFFoFFGÀPUMP-1DBBFBFFF0ÀMIX-1DDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFDCFLOW-PIPEBFF(ÃTHRU-SENSOR-OUTPUT-CONNECTIONMIXED-TANK-INPUT-PORT-2FTDB.BFBB0BFDB3BF&FÂPUMP-OUTPUT-CONNECTIONTHRU-SENSOR-INPUT-CONNECTIONBDB.BFBB0BFDB3BF#FHEAT-TRANSFER-OUTPUT-PORT-1CPORT-SENSOR-INPUTBDB.BBF+BVALVE-CONTROL-CONNECTIONFDB.BF)BB0BFDB.BBF&BCPUMP-CONTROLLER-CONNECTIONFDB3BF"F!B6SINK-INPUT-PORTF2DB.BF"BB0BFDB3BBF#BCHEAT-TRANSFER-INPUT-PORT-1FDB3BF#F$HEAT-TRANSFER-OUTPUT-PORT-2B@BDB3BF*F#B6CHEAT-TRANSFER-INPUT-PORT-2DFFvFF@DB3BF$F"B6B@BDB.BF$BB0BFDB3BF%F&HOLDER-OUTPUT-CONNECTIONÂPUMP-INPUT-CONNECTIONBDB3BF'F*B6B@BDB.BF'BB0BFDB3BF(F'BvB@BDB3BBF)BBHDF!F DB.BF*BB0BFDB3BF+F(VALVE-OUTPUT-CONNECTIONMIXED-TANK-INPUT-PORT-1BDB3BF,F+B6ÂVALVE-INPUT-CONNECTIONBDB.BF,BB0BFDB.BBF-BBRFDB3BF-F,B?B@BDB3BF.F-BvBwBB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "LB" :CHARACTERS NIL :QFASLP NIL :LENGTH 2720 :CREATION-DATE 2734455505 :DIRECTORY "PICON-CLASS" :NAME "LB-EXERCISE-10" :TYPE "PIC" :VERSION 1) hưs2Dp,lFASD-DATADlLBRalphzFfFDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB B1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE LAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK 0BMDBNCLBCNEXT-NEW-STATEMENT-NUMBERF CFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDEXERCISE-10FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?Exercise 101DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBpDBK LBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBxDBK LBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDBDBK LBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK LBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK LBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK LBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK LBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK LBMBN1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMNILFFFFD DCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBeMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDIF-THEN-RULED BK ?BMBWÁSTATEMENT-TEXTDDCIFDCISCWAVE-STEPWAVE-DECREASINGDDSENDDlWave for f1 is decreasingDDESTINATIONOPERATORlif wave-step is wave-decreasing then send ,"Wave for f1 is decreasing" to operatorCSTATEMENT-NUMBER?FPICON-RULE-SCAN-INTERVALF B-FFbF{FDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFFbF{FDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FFhFsFuBDBDBBB-FFxFgFBDBDBBB-BDBDBIDBJDBD BK DIBMBNBDDBDBBWAVE-INCREASINGDDBDlWave for F1 is increasingDBBlif wave-step is wave-increasing then send,"Wave for F1 is increasing" to operatorBFBF B-FF#FpFDDBDBBBFFF#FpFDDBDBBB-FFFhFBDBDBBB-FF FeBDBDBBB-BDBDBIDBJDBD BK 3BMBWBDDBDCB*DB+B*FDDB/BBlif f1 > f1 as of 15 seconds ago then advance stepvariable wave-step to wave-increasingBFBF B-FFZFF4DDBDBBBFFFZFF4DDBDBBB-FFTFFGBDBDBBB-FFDFSF7BDBDBBB-BDBDBIDBJDCDEFINITIONDBK qMBMBNBDDSTEP-VARIABLE-DEFINITIONBDCSTART-WAVEBBllet step variable wave-step be start-wave,,wave-increasing, wave-decreasingBFB-FFFyFkDDBDBBBFFFFyFkDDBDBBB-FFFqF~BDBDBBB-FF{F&FnBDBDBBB-BDBDBIDBJDINITIAL-RULEDBK MBMBNBDDCINITIALLYDDB/BBDBDBegin wave monitoring.DBBinitially advance step variable wave-step to start-wave andlsend "Begin wave monitoring." to operatorBFB-FFFFDDBDBBBFFFFFDDBDBBB-FFF FBDBDBBB-FFFwFBDBDBBB-BDBDBIDBJDFREE-TEXT-STATEMENTDBK xBMBNBExercise #10BFB-FCFFFDDBDBBBFFCFFFDDBDBBB-F8FFFBDDCFLOW-PIPEBBFBTHRU-SENSOR-INPUT-CONNECTIONFDB1BFBÃTHRU-SENSOR-OUTPUT-CONNECTIONBFDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "LB" :CHARACTERS NIL :QFASLP NIL :LENGTH 4392 :CREATION-DATE 2734466461 :DIRECTORY "PICON-CLASS" :NAME "LB-EXERCISE-12" :TYPE "PIC" :VERSION 1) hưs2Dp,lFASD-DATADlLBRalphFfFDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB 1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE MAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK BMDBNWJBCLBCNEXT-NEW-STATEMENT-NUMBERF&CFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDEXERCISE-12FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?Exercise 121DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBqDBK MBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDByDBK MBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDBDBK MBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK MBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK MBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK MBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK MBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK MBMBN1DBIDBJDCDEFINITIOND BK BMBXÁSTATEMENT-TEXTDDC=DCEMPTY-TIMENUMERICNILlet empty-time be a numeric variableCSTATEMENT-NUMBER?F$BACKTRACK-TO-GET-VALUE?B1DBIDBJDBD BK BMBXBDDBDÁTANK-EMPTYINGCCONDITIONBlet tank-emptying be a named conditionBF!BB-1DBIDBJDBD BK RBMBNBDDBDÀTIMERBB,let timer be a numeric variableBFBBSAMPLING-INTERVAL-FOR-HISTORIC-REASONS?CINDEFINITE1DBIDBJDBD BK RBMBNBDDBDTANK-IS-FILLINGBB,let tank-is-filling be a named conditionBFBB-1DBIDBJDBD BK RBMBNBDDBDCFILL-TIMEBBlet fill-time be a numeric variableBFBBBB1DBIDBJDBD BK RBMBNBDDBDÁTIMER-STARTEDBBlet timer-started be a named conditionBFBB-1DBIDBJDBD BK RBMBNBDDBDÁTIMER-RUNNINGBBlet timer-running be a named conditionBFBB-1DBIDBJDBD BK -RBMBNBDDBDCFILL-TIMERBBlet fill-timer be a numeric variableBFBB1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBFpFnFFnDDCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBfMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDIF-THEN-RULEDBK BMBXBDDCIFBDDCINCREMENTBDF INTERVAL,if tank-emptying then increment empty-time by 10 secondsBF%B-FFQFF;DDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFFQFF;DDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTB$B-FFKFF>B1DB!DB"B$B-B%DB&DBIDBJDINITIAL-RULEDBK BMBXBDDCINITIALLYDDSETBinitially set empty-time = 0BF#B-FFpFFZDDB>DB?BB@FFFpFFZDDBGDBHB$B-FFjFF]B[DB!DB"B$B-B%DB&DBIDBJDB'DBK BMBXBDDB)DNOTBDDSENDDlEmptying time ~6F BDDESTINATIONOPERATORif not tank-emptying then send,"Emptying time *** " with empty-time to operatorBF"B-FVF>F{FDDB>DB?BB@FFVF>F{FDDBGDBHB$B-FKF8F>F+BDBGDBHB$B-F<F(FsFBDB!DB"B$B-B%DB&DBIDBJDB'DBK BMBXBDDB)DCDB?BB@FFFFnFpFHDDBGDBHB$B-F;FhFYF[BDBGDBHB$B-F,FXFhFKBDDIFFERENTIAL-PRESSURE-LEVEL-PORT-SENSORDSENSOR-CURRENCY-INTERVALF SENSOR-TRACING-REQUESTSB-FFfFFÀCLOCKDACCUMULATORBF2F,FdF^TANKDB!DB"B$B-B%DB&DBIDBJDFREE-TEXT-STATEMENTDBK 7RBMBNBl4BFB-F.FFFvDDB>DB?BB@FF.FFFvDDBGDBHB$B-F#FFFyBDB!DB"B$B-B%DB&DBIDBJDBDBK 7RBMBNBl3BFB-F.FFFDDB>DB?BB@FF.FFFDDBGDBHB$B-F#FFFB DB!DB"B$B-B%DB&DBIDBJDBDBK 7RBMBNBl2BFB-F.FFFDDB>DB?BB@FF.FFFDDBGDBHB$B-F#FFFB(DB!DB"B$B-B%DB&DBIDBJDBDBK 7RBMBNBl1BFB-F-F!FF DDB>DB?BB@FF-F!FF DDBGDBHB$B-F"FFFBEDB!DB"B$B-B%DB&DBIDBJDBSDBK MBMBNBDDBUDDBVBinitially set fill-time = 0BF B-F FFFvDDB>DB?BB@FF FFFvDDBGDBHB$B-FFFFyBfDB!DB"B$B-B%DB&DBIDBJDB'DBK 8BMBNBDDB)BDDB*BDF B,lif tank-is-filling then increment fill-time by 10 secondsBFB-F FFFDDB>DB?BB@FF FFFDDBGDBHB$B-FFFFBDB!DB"B$B-B%DB&DBIDBJDB'DBK BMDBNBWBDDB)DByBDDB{D,Fill time = ~6FBDB~Bif not tank-is-filling thenlsend "Fill time = ***" with fill-time to operatorBFB-F FFFDDB>DB?BB@FF FFFDDBGDBHB$B-FFFFBDBGDBHB$B-FFFFBDB!DB"B$B-B%DB&DBIDBJDB'D BK 8BMBNBDDB)DC>BDBBF DDBBDDBBif L1 > L1 as of 10 seconds ago then conclude tank-is-filling lelse conclude not tank-is-fillingBFPICON-RULE-SCAN-INTERVALF B-F F!F3FDDB>DB?BB@FF F!F3FDDBGDBHB$B-FFF+FBDBGDBHB$B-FF F5FBDBDBF BB-FFeFFBDB!DB"B$B-B%DB&DBIDBJDB'D BK QBMBNBDDB)DBBBif CLOCK > 0 then do nothingBF BF B-FF6FFLDDB>DB?BB@FFF6FFLDDBGDBHB$B-FF<FFIBDB!DB"B$B-B%DB&DBIDBJDBDBK xBMBNBExercise #12BFB-F3FLFF6DDB>DB?BB@FF3FLFF6DDBGDBHB$B-F(FFFF9B-DB!DB"B$B-B%DB&DBIDBJDSIMULATION-STATEMENTDBK RBMBNBDDSIMULATEBBTIME,simulate clock with timeBF B-FF5F$FKDDB>DB?BB@FFF5F$FKDDBGDBHB$B-FF;F,FHBNDB!DB"B$B-B%DB&DBIDBJDBIDBK {BMDBNBWBDDBKBDB)DBBLF,DC+BDB)DBBLFXFKDMAXDC-B}33simulate L1 with 0 then if time < 300 then (L1 + .25) else if time < 600 then 75 else lmax (0, L1 - .15)BFB-FFFF'DDB>DB?BB@FFFFF'DDBGDBHB$B-FFFFBDBGDBHB$B-FFFFBDBGDBHB$B-FFF\F$BDDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFDCFLOW-PIPEBBFBÂACCUMULATOR-MAIN-INPUTFDBBFBACCUMULATOR-MAIN-OUTPUTBFDBBFFACCUMULATOR-METER-OUTPUTCPORT-SENSOR-INPUTF%DBBFBBBFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "LB" :CHARACTERS NIL :QFASLP NIL :LENGTH 4279 :CREATION-DATE 2734466754 :DIRECTORY "PICON-CLASS" :NAME "LB-EXERCISE-12" :TYPE "PIC" :VERSION 2) hưs2Dp,lFASD-DATADlLBRalphĦFfFDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB 1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE MAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK BMDBNWJBCLBCNEXT-NEW-STATEMENT-NUMBERF&CFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDEXERCISE-12FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?Exercise 121DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBqDBK MBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDByDBK MBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDBDBK MBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK MBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK MBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK MBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK MBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK MBMBN1DBIDBJDCDEFINITIOND BK -RBMBNÁSTATEMENT-TEXTDDC=DCFILL-TIMERNUMERICNILlet fill-timer be a numeric variableCSTATEMENT-NUMBER?FBACKTRACK-TO-GET-VALUE?B1DBIDBJDBD BK RBMBNBDDBDÁTIMER-RUNNINGCCONDITIONBlet timer-running be a named conditionBFBB-1DBIDBJDBD BK RBMBNBDDBDÁTIMER-STARTEDBBlet timer-started be a named conditionBFBB-1DBIDBJDBD BK RBMBNBDDBDCFILL-TIMEBBlet fill-time be a numeric variableBFBBSAMPLING-INTERVAL-FOR-HISTORIC-REASONS?CINDEFINITE1DBIDBJDBD BK RBMBNBDDBDTANK-IS-FILLINGBB,let tank-is-filling be a named conditionBFBB-1DBIDBJDBD BK RBMBNBDDBDÀTIMERBB,let timer be a numeric variableBFBBBB1DBIDBJDBD BK BMBXBDDBDÁTANK-EMPTYINGBBlet tank-emptying be a named conditionBF!BB-1DBIDBJDBD BK BMBXBDDBDCEMPTY-TIMEBBlet empty-time be a numeric variableBF$BB1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBFpFnFFnDDCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBfMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDIF-THEN-RULEDBK BMBXBDDCIFBDDCINCREMENTBDF INTERVAL,if tank-emptying then increment empty-time by 10 secondsBF%B-FFQFF;DDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFFQFF;DDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTB$B-FFKFF>B1DB!DB"B$B-B%DB&DBIDBJDB'DBK BMBXBDDB)DNOTBDDSENDDlEmptying time ~6F BDDESTINATIONOPERATORif not tank-emptying then send,"Emptying time *** " with empty-time to operatorBF"B-FVF>F{FDDB>DB?BB@FFVF>F{FDDBGDBHB$B-FKF8F>F+B_DBGDBHB$B-F<F(FsFB`DB!DB"B$B-B%DB&DBIDBJDB'DBK BMBXBDDB)DCDB?BB@FFFFnFpFHDDBGDBHB$B-F;FhFYF[BDBGDBHB$B-F,FXFhFKBDDIFFERENTIAL-PRESSURE-LEVEL-PORT-SENSORDSENSOR-CURRENCY-INTERVALF SENSOR-TRACING-REQUESTSB-FFfFFÀCLOCKDACCUMULATORBF2F,FdF^TANKDB!DB"B$B-B%DB&DBIDBJDFREE-TEXT-STATEMENTDBK 7RBMBNBl4BFB-F.FFFvDDB>DB?BB@FF.FFFvDDBGDBHB$B-F#FFFyBDB!DB"B$B-B%DB&DBIDBJDBDBK 7RBMBNBl3BFB-F.FFFDDB>DB?BB@FF.FFFDDBGDBHB$B-F#FFFBDB!DB"B$B-B%DB&DBIDBJDBDBK 7RBMBNBl2BFB-F.FFFDDB>DB?BB@FF.FFFDDBGDBHB$B-F#FFFBDB!DB"B$B-B%DB&DBIDBJDBDBK 7RBMBNBl1BFB-F-F!FF DDB>DB?BB@FF-F!FF DDBGDBHB$B-F"FFFB DB!DB"B$B-B%DB&DBIDBJDINITIAL-RULEDBK BMDBNBXBDDCINITIALLYDDSETBDB@Blinitially set fill-time = 0 and set empty-time = 0BF B-F FFFvDDB>DB?BB@FF FFFvDDBGDBHB$B-FFFFyBGDB!DB"B$B-B%DB&DBIDBJDB'DBK 8BMBNBDDB)BDDB*BDF B,lif tank-is-filling then increment fill-time by 10 secondsBFB-F FFFDDB>DB?BB@FF FFFDDBGDBHB$B-FFFFBjDB!DB"B$B-B%DB&DBIDBJDB'DBK BMDBNBWBDDB)DBTBDDBVD,Fill time = ~6FBDBYBZif not tank-is-filling thenlsend "Fill time = ***" with fill-time to operatorBFB-F FFFDDB>DB?BB@FF FFFDDBGDBHB$B-FFFFBDBGDBHB$B-FFFFBDB!DB"B$B-B%DB&DBIDBJDB'D BK 8BMBNBDDB)DC>BDBBF DDBBDDBBif L1 > L1 as of 10 seconds ago then conclude tank-is-filling lelse conclude not tank-is-fillingBFPICON-RULE-SCAN-INTERVALF B-F F!F3FDDB>DB?BB@FF F!F3FDDBGDBHB$B-FFF+FBDBGDBHB$B-FF F5FBDBDBF BB-FFeFFBDB!DB"B$B-B%DB&DBIDBJDB'D BK QBMBNBDDB)DBBBif CLOCK > 0 then do nothingBF BF B-FF6FFLDDB>DB?BB@FFF6FFLDDBGDBHB$B-FF<FFIBDB!DB"B$B-B%DB&DBIDBJDBDBK xBMBNBExercise #12BFB-F3FLFF6DDB>DB?BB@FF3FLFF6DDBGDBHB$B-F(FFFF9BDB!DB"B$B-B%DB&DBIDBJDSIMULATION-STATEMENTDBK RBMBNBDDSIMULATEBBTIME,simulate clock with timeBF B-FF5F$FKDDB>DB?BB@FFF5F$FKDDBGDBHB$B-FF;F,FHB/DB!DB"B$B-B%DB&DBIDBJDB*DBK {BMDBNBWBDDB,BDB)DBB-F,DC+BDB)DBB-FXFKDMAXDC-B}33simulate L1 with 0 then if time < 300 then (L1 + .25) else if time < 600 then 75 else lmax (0, L1 - .15)BFB-FFFF'DDB>DB?BB@FFFFF'DDBGDBHB$B-FFFFB`DBGDBHB$B-FFFFBaDBGDBHB$B-FFF\F$BbDDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFDCFLOW-PIPEBBFBÂACCUMULATOR-MAIN-INPUTFDBBFBACCUMULATOR-MAIN-OUTPUTBFDBBFF ACCUMULATOR-METER-OUTPUTCPORT-SENSOR-INPUTF%DBBF BBBFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "LB" :CHARACTERS NIL :QFASLP NIL :LENGTH 4283 :CREATION-DATE 2734467220 :DIRECTORY "PICON-CLASS" :NAME "LB-EXERCISE-12" :TYPE "PIC" :VERSION 3) hưs2Dp,lFASD-DATADlLBRalphFfFDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB 1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE MAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK BMDBNWJBCLBCNEXT-NEW-STATEMENT-NUMBERF&CFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDEXERCISE-12FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?Exercise 121DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBqDBK MBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDByDBK MBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDBDBK MBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK MBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK MBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK MBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK MBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK MBMBN1DBIDBJDCDEFINITIOND BK BMBXÁSTATEMENT-TEXTDDC=DCEMPTY-TIMENUMERICNILlet empty-time be a numeric variableCSTATEMENT-NUMBER?F$BACKTRACK-TO-GET-VALUE?B1DBIDBJDBD BK BMBXBDDBDÁTANK-EMPTYINGCCONDITIONBlet tank-emptying be a named conditionBF!BB-1DBIDBJDBD BK RBMBNBDDBDÀTIMERBB,let timer be a numeric variableBFBBSAMPLING-INTERVAL-FOR-HISTORIC-REASONS?CINDEFINITE1DBIDBJDBD BK RBMBNBDDBDTANK-IS-FILLINGBB,let tank-is-filling be a named conditionBFBB-1DBIDBJDBD BK RBMBNBDDBDCFILL-TIMEBBlet fill-time be a numeric variableBFBBBB1DBIDBJDBD BK RBMBNBDDBDÁTIMER-STARTEDBBlet timer-started be a named conditionBFBB-1DBIDBJDBD BK RBMBNBDDBDÁTIMER-RUNNINGBBlet timer-running be a named conditionBFBB-1DBIDBJDBD BK -RBMBNBDDBDCFILL-TIMERBBlet fill-timer be a numeric variableBFBB1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBFpFnFFnDDCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBfMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDIF-THEN-RULEDBK BMBXBDDCIFBDDCINCREMENTBDF INTERVAL,if tank-emptying then increment empty-time by 10 secondsBF%B-FFQFF;DDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFFQFF;DDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTB$B-FFKFF>B1DB!DB"B$B-B%DB&DBIDBJDB'DBK BMBXBDDB)DNOTBDDSENDDlEmptying time ~6F BDDESTINATIONOPERATORif not tank-emptying then send,"Emptying time *** " with empty-time to operatorBF"B-FVF>F{FDDB>DB?BB@FFVF>F{FDDBGDBHB$B-FKF8F>F+B_DBGDBHB$B-F<F(FsFB`DB!DB"B$B-B%DB&DBIDBJDB'D BK BMBXBDDB)DCDB?BB@FFFFnFpFHDDBGDBHB$B-F;FhFYF[BDBGDBHB$B-F,FXFhFKBDDIFFERENTIAL-PRESSURE-LEVEL-PORT-SENSORDSENSOR-CURRENCY-INTERVALF SENSOR-TRACING-REQUESTSB-FFfFFÀCLOCKDACCUMULATORBF2F,FdF^TANKDB!DB"B$B-B%DB&DBIDBJDFREE-TEXT-STATEMENTDBK 7RBMBNBl4BFB-F.FFFvDDB>DB?BB@FF.FFFvDDBGDBHB$B-F#FFFyBDB!DB"B$B-B%DB&DBIDBJDBDBK 7RBMBNBl3BFB-F.FFFDDB>DB?BB@FF.FFFDDBGDBHB$B-F#FFFBDB!DB"B$B-B%DB&DBIDBJDBDBK 7RBMBNBl2BFB-F.FFFDDB>DB?BB@FF.FFFDDBGDBHB$B-F#FFFBDB!DB"B$B-B%DB&DBIDBJDBDBK 7RBMBNBl1BFB-F-F!FF DDB>DB?BB@FF-F!FF DDBGDBHB$B-F"FFFB"DB!DB"B$B-B%DB&DBIDBJDINITIAL-RULEDBK BMDBNBXBDDCINITIALLYDDSETBDBBBlinitially set fill-time = 0 and set empty-time = 0BF B-F FFFvDDB>DB?BB@FF FFFvDDBGDBHB$B-FFFFyBIDB!DB"B$B-B%DB&DBIDBJDB'DBK 8BMBNBDDB)BDDB*BDF B,lif tank-is-filling then increment fill-time by 10 secondsBFB-F FFFDDB>DB?BB@FF FFFDDBGDBHB$B-FFFFBlDB!DB"B$B-B%DB&DBIDBJDB'DBK BMDBNBWBDDB)DBTBDDBVD,Fill time = ~6FBDBYBZif not tank-is-filling thenlsend "Fill time = ***" with fill-time to operatorBFB-F FFFDDB>DB?BB@FF FFFDDBGDBHB$B-FFFFBDBGDBHB$B-FFFFBDB!DB"B$B-B%DB&DBIDBJDB'D BK 8BMBNBDDB)DC>BDBBF DDBBDDBBif L1 > L1 as of 10 seconds ago then conclude tank-is-filling lelse conclude not tank-is-fillingBFBF B-F F!F3FDDB>DB?BB@FF F!F3FDDBGDBHB$B-FFF+FBDBGDBHB$B-FF F5FBDBDBF BB-FFeFFBDB!DB"B$B-B%DB&DBIDBJDB'D BK QBMBNBDDB)DBBBif CLOCK > 0 then do nothingBF BF B-FF6FFLDDB>DB?BB@FFF6FFLDDBGDBHB$B-FF<FFIBDB!DB"B$B-B%DB&DBIDBJDBDBK xBMBNBExercise #12BFB-F3FLFF6DDB>DB?BB@FF3FLFF6DDBGDBHB$B-F(FFFF9BDB!DB"B$B-B%DB&DBIDBJDSIMULATION-STATEMENTDBK RBMBNBDDSIMULATEBBTIME,simulate clock with timeBF B-FF5F$FKDDB>DB?BB@FFF5F$FKDDBGDBHB$B-FF;F,FHB0DB!DB"B$B-B%DB&DBIDBJDB+DBK {BMDBNBWBDDB-BDB)DBB.F,DC+BDB)DBB.FXFKDMAXDC-B}33simulate L1 with 0 then if time < 300 then (L1 + .25) else if time < 600 then 75 else lmax (0, L1 - .15)BFB-FFFF'DDB>DB?BB@FFFFF'DDBGDBHB$B-FFFFBaDBGDBHB$B-FFFFBbDBGDBHB$B-FFF\F$BcDDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFDCFLOW-PIPEBBFBÂACCUMULATOR-MAIN-INPUTFDBBFBACCUMULATOR-MAIN-OUTPUTBFDBBFF ACCUMULATOR-METER-OUTPUTCPORT-SENSOR-INPUTF%DBBF BBBFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "LB" :CHARACTERS NIL :QFASLP NIL :LENGTH 4938 :CREATION-DATE 2734522020 :DIRECTORY "PICON-CLASS" :NAME "LB-EXERCISE-13" :TYPE "PIC" :VERSION 1) hưs2Dp,lFASD-DATADlLBRalph~FfFDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB 1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE MAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK BMDBNCLBCNEXT-NEW-STATEMENT-NUMBERF&CFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDEXERCISE-13FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?Exercise 131DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBpDBK MBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBxDBK MBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDBDBK MBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK MBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK MBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK MBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK MBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK MBMBN1DBIDBJDCDEFINITIOND BK BMBWÁSTATEMENT-TEXTDDC=DCEMPTY-TIMENUMERICNILlet empty-time be a numeric variableCSTATEMENT-NUMBER?F$BACKTRACK-TO-GET-VALUE?B1DBIDBJDBD BK BMBWBDDBDÁTANK-EMPTYINGCCONDITIONBlet tank-emptying be a named conditionBF!BB-1DBIDBJDBD BK RBMBNBDDBDÀTIMERBB,let timer be a numeric variableBFBBSAMPLING-INTERVAL-FOR-HISTORIC-REASONS?CINDEFINITE1DBIDBJDBD BK RBMBNBDDBDTANK-IS-FILLINGBB,let tank-is-filling be a named conditionBFBB-1DBIDBJDBD BK RBMBNBDDBDCFILL-TIMEBBlet fill-time be a numeric variableBFBBBB1DBIDBJDBD BK RBMBNBDDBDÁTIMER-STARTEDBBlet timer-started be a named conditionBFBB-1DBIDBJDBD BK RBMBNBDDBDÁTIMER-RUNNINGBBlet timer-running be a named conditionBFBB-1DBIDBJDBD BK -RBMBNBDDBDCFILL-TIMERBBlet fill-timer be a numeric variableBFBB1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBFFFFDDCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBeMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDIF-THEN-RULEDBK BMBWBDDCIFBDDCINCREMENTBDF INTERVAL,if tank-emptying then increment empty-time by 10,secondsBF#B-FxF>F:FdDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFxF>F:FdDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTB#B-FFDF2FQB0DBGDBHB#B-FFTFFaB1DB DB!B#B-B$DB%DBIDBJDB&DBK BMBWBDDB(DANDDNOTBDCISFILLING-STEPDRAININGDDSENDDEmpty time ~6FBDDESTINATIONOPERATORDADVANCEB^NOT-SURElif not tank-emptying and filling-step is drainingthen send "Empty time ***" with empty-time tooperator and advance step variable filling-step to not-sureBF"B-FyFFF8DDB>DB?BB@FFyFFF8DDBGDBHB#B-FFFEFBnDBGDBHB#B-FFF'F%BoDBGDBHB#B-FF(FF5BpDB DB!B#B-B$DB%DBIDBJDB&D BK BMBWBDDB(DCDB?BB@FFyF<FFDDBGDBHB#B-FF6FF)BDBGDBHB#B-FF&FFBDBGDBHB#B-FFFF BDB DB!B#B-B$DB%DBIDBJDFREE-TEXT-STATEMENTDBK 7RBMBNBl3BFB-F7FIFF3DDB>DB?BB@FF7FIFF3DDBGDBHB#B-F,FCF$F6BDB DB!B#B-B$DB%DBIDBJDB&DBK 8BMBNBDDB(BDDB)BDF B+lif tank-is-filling then increment fill-time by 10 secondsBFB-FFIFF3DDB>DB?BB@FFFIFF3DDBGDBHB#B-F FCFF6BDB DB!B#B-B$DB%DBIDBJDBDBK 7RBMBNBl2BFB-F7FFFwDDB>DB?BB@FF7FFFwDDBGDBHB#B-F,FF$FzBDB DB!B#B-B$DB%DBIDBJDB&DBK .BMBNBDDB(DBZDB[BDB]B^FILLINGDDBbD,Fill time = ~6FBDBeBfDBiB^Bj,if not tank-is-filling and filling-step is filling thensend "Fill time = ***" with fill-time to operator andadvance step variable filling-step to not-sureBFB-FFFFWDDB>DB?BB@FFFFFWDDBGDBHB#B-F FFFzB?DBGDBHB#B-FFwFFjB@DBGDBHB#B-FFgFFZBADDIFFERENTIAL-PRESSURE-LEVEL-PORT-SENSORDSENSOR-CURRENCY-INTERVALF SENSOR-TRACING-REQUESTSB-FFFFÀCLOCKDBjDBkF BmB-FFFFBDACCUMULATORBFFFFTANKDB DB!B#B-B$DB%DBIDBJDBDBK RBMBNBl5BFB-F7F)FF?DDB>DB?BB@FF7F)FF?DDBGDBHB#B-F,F/F$F<BDB DB!B#B-B$DB%DBIDBJDBDBK RBMBNBDDSTEP-VARIABLE-DEFINITIONB^DBjB5B_let step variable filling-step be not-sure, filling, drainingBFB-FF)F!F?DDB>DB?BB@FFF)F!F?DDBGDBHB#B-F F/FF<BDB DB!B#B-B$DB%DBIDBJDBDBK 7RBMBNBl4BFB-F8FFFDDB>DB?BB@FF8FFFDDBGDBHB#B-F-FF%FBDB DB!B#B-B$DB%DBIDBJDINITIAL-RULEDBK BMDBNBWBDDCINITIALLYDDSETBDBBDBiB^Bjlinitially ,set fill-time = 0 and set empty-time = 0 and advance step variable filling-step to not-sureBF B-FF'FsFDDB>DB?BB@FFF'FsFDDBGDBHB#B-F F!FFBDBGDBHB#B-FFFkFBDBGDBHB#B-FFFF BDBGDBHB#B-FFF FBDB DB!B#B-B$DB%DBIDBJDBDBK 7RBMBNBl1BFB-F9FFFDDB>DB?BB@FF9FFFDDBGDBHB#B-F.FF&FBDB DB!B#B-B$DB%DBIDBJDB&D BK .BMBNBDDB(DC>BDBBF DDBBDBiB^B5DDBBlif L1 > L1 as of 10 seconds ago then conclude tank-is-filling andadvance step variable filling-step to fillinglelse conclude not tank-is-fillingBFBF B-FFFDFDDB>DB?BB@FFFFDFDDBGDBHB#B-F FF<FBDDBGDBHB#B-FFFFBEDBGDBHB#B-FFF+FBFDB DB!B#B-B$DB%DBIDBJDBDBK xBMBNBExercise #13BFB-F>FFFDDB>DB?BB@FF>FFFDDBGDBHB#B-F3FFFBqDB DB!B#B-B$DB%DBIDBJDB&D BK QBMBNBDDB(DB:BsBif CLOCK > 0 then do nothingBF BF B-FFFFDDB>DB?BB@FFFFFDDBGDBHB#B-FFFFBDB DB!B#B-B$DB%DBIDBJDSIMULATION-STATEMENTDBK RBMBNBDDSIMULATEBsBTIME,simulate clock with timeBF B-FFF3FDDB>DB?BB@FFFF3FDDBGDBHB#B-FFF;FBDB DB!B#B-B$DB%DBIDBJDBDBK QBMBNBDDBBDB(DBBF,DC+Bǀ@DB(DBBFXFKDMAXDC-BǀL̬simulate L1 with 0 then if time < 300 then (L1 + .25) else if time < 600 then 75 else lmax (0, L1 - .15)BFB-FFKFFDDB>DB?BB@FFFKFFDDBGDBHB#B-FFQFpF^BDBGDBHB#B-FFaFFnBDBGDBHB#B-FFqFkF~BDDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFDBBFBBBFDCFLOW-PIPEBBF BÂACCUMULATOR-MAIN-INPUTFDBBF FACCUMULATOR-METER-OUTPUTCPORT-SENSOR-INPUTBB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "LB" :CHARACTERS NIL :QFASLP NIL :LENGTH 2583 :CREATION-DATE 2734547436 :DIRECTORY "PICON-CLASS" :NAME "LB-EXERCISE-14" :TYPE "PIC" :VERSION 1) hưs2Dp,lFASD-DATADlLBRalphFfFDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB >1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE iSAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK xBMBNCNEXT-NEW-STATEMENT-NUMBERF CFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDEXERCISE-14FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?Exercise 141DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBnDBK iSBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBvDBK iSBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB~DBK iSBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK iSBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK iSBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK iSBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK iSBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK iSBMBN1DBIDBJDCDEFINITIOND BK lSBMBNÁSTATEMENT-TEXTDDC=DTANK-BOILINGCCONDITIONNILlet tank-boiling be a named conditionCSTATEMENT-NUMBER?FBACKTRACK-TO-GET-VALUE?B-1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBFFFFD DCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBcMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDFREE-TEXT-STATEMENTDBK rSBMBNBl2BFB-FFFFzDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFFFFzDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-F FFF}BDBDBBB-BDBDBIDBJDIF-THEN-RULED BK =BMDBNCLBBDDCIFDBÁCOOLER-SWITCHFDDSENDDCooler appears to be malfunctioning.DDESTINATIONOPERATORDDBDOPERATOR turn cooler switch ONDBBlif cooler-switch = 1 then ,send "Cooler appears to be malfunctioning." to operator else send "OPERATOR turn cooler switch ON" to,operatorCSTATEMENT-KEYWORDSTANKBFB-FFF$FKDDBDBBBFFFF$FKDDBDBBB-FFFF~BDBDBBB-FF{FFnBDBDBBB-FFkFF^BDBDBBB-FF[FFNB DBDBBB-BDBDBIDBJDBDBK rSBMBNBl1BF B-FFFFDDBDBBBFFFFFDDBDBBB-F FFFB;DBDBBB-BDBDBIDBJDBD BK lSBMBNBDDBDC>CT1FDDCONCLUDEBDÀFOCUSB ,if T1 > 212 then conclude tank-boiling land focus on TANKBFPICON-RULE-SCAN-INTERVALFB-FFF|FDDBDBBBFFFF|FDDBDBBB-FFFtFBbDBDBBB-FFFCFBcDCSURGE-TANKBFFxFgFB DTHERMOCOUPLE-TEMPERATURE-PORT-SENSORDSENSOR-TRACING-REQUESTSB-SENSOR-ENGINEERING-UNITÀON-OFFSENSOR-CURRENCY-INTERVALFFFFFBDBDBB-FFF$FBYDBDBBB-BDBDBIDBJDSIMULATION-STATEMENTDBK oSBMBNBDDSIMULATEBDBDBXBYFFsimulate COOLER-SWITCH with 0 then if T1 > 212then 1 else 0BFB-F>F1FrFWDDBDBBBFF>F1FrFWDDBDBBB-F3F7FjFDBDBDBBB-F$FGFFTBDBDBBB-BDBDBIDBJDBDBK kSBMBNBDDBBYBDCPICON-WAVEFFF,simulate T1 with wave with central value 200 andldeviation 25 and period 20 minutesBFB-F?FFF"DDBDBBBFF?FFF"DDBDBBB-F4FF{FBDBDBBB-F%FF FBDBDBBB-BDBDBIDBJDBDBK xBMBNBExercise #14BFB-FBFFFDDBDBBBFFBFFFDDBDBBB-F7FFFBDDCFLOW-PIPEBBFBÂSURGE-TANK-MAIN-INPUTFDBBFBÂSURGE-TANK-MAIN-OUTPUTBFDCCONTROL-CONNECTIONBFFSURGE-TANK-METER-OUTPUTCPORT-SENSOR-INPUTBDBBBFBB$DFGF&F{FFDDB BFBSENSOR-CONTROLLER-CONNECTIONBFDB BFBB/BFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "LB" :CHARACTERS NIL :QFASLP NIL :LENGTH 2571 :CREATION-DATE 2734547930 :DIRECTORY "PICON-CLASS" :NAME "LB-EXERCISE-15" :TYPE "PIC" :VERSION 1) hưs2Dp,lFASD-DATADlLBRalphFfFDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB F1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE iSAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK xBMBNCNEXT-NEW-STATEMENT-NUMBERF CFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDEXERCISE-15FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?Exercise 151DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBnDBK iSBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBvDBK iSBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB~DBK iSBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK iSBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK iSBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK iSBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK iSBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK iSBMBN1DBIDBJDCDEFINITIOND BK lSBMBNÁSTATEMENT-TEXTDDC=DTANK-BOILINGCCONDITIONNILlet tank-boiling be a named conditionCSTATEMENT-NUMBER?FBACKTRACK-TO-GET-VALUE?B-1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBFFFFD DCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBcMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDSIMULATION-STATEMENTDBK oSBMBNBDDSIMULATEÁCOOLER-SWITCHDCIFDC>CT1FFsimulate COOLER-SWITCH with 0 then if T1 > 212then 1 else 0BFB-F>FIFrFoDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFF>FIFrFoDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-F3FOFjF\BDBDBBB-F$F_FFlBDTHERMOCOUPLE-TEMPERATURE-PORT-SENSORDSENSOR-TRACING-REQUESTSB-SENSOR-ENGINEERING-UNITÀON-OFFSENSOR-CURRENCY-INTERVALFF,FFJFBDBDBB-F*FgF FBDBDBBB-BDBDBIDBJDBDBK kSBMBNBDDBBBDCPICON-WAVEFFF,simulate T1 with wave with central value 200 andldeviation 25 and period 20 minutesBFB-F?FtFFDDBDBBBFF?FtFFDDBDBBB-F4FzF{FBDBDBBB-F%FF FBDBDBBB-BDBDBIDBJDFREE-TEXT-STATEMENTDBK rSBMBNBl2BFB-FFFFDDBDBBBFFFFFDDBDBBB-F FFFBCDBDBBB-BDBDBIDBJDIF-THEN-RULED BK CBMDBNCLBBDDBDBBFDDSENDDCooler appears to be malfunctioning.DDESTINATIONOPERATORlif cooler-switch = 1 then ,send "Cooler appears to be malfunctioning." to operatorCSTATEMENT-KEYWORDSTANKSTATEMENT-CATEGORIESCHECK-COOLERBFB-FFFFqDDBDBBBFFFFFqDDBDBBB-FFFFBnDBDBBB-FFFFtBoDBDBBB-BDBDBIDBJDBADBK rSBMBNBl1BF B-FFFFDDBDBBBFFFFFDDBDBBB-F FFFBDBDBBB-BDBDBIDBJDB_D BK EBMDBNBaBDDBDBBFDDCONCLUDEBDACTIVATEDANDDBCATEGORYBtDBASSOCIATED-UNITBr,if T1 > 212 then conclude tank-boiling and activate check-cooler rules withassociated-unit = tankBFPICON-RULE-SCAN-INTERVALFB-FFFyFDDBDBBBFFFFyFDDBDBBB-FFFqFBDBDBBB-FFFeFBDBDBBB-FFFFBDBDBBB-BDBDBIDBJDBADBK xBMBNBExercise #15BFB-FHFFFDDBDBBBFFHFFFDDBDBBB-F=FFFBDCSURGE-TANKBFFxFgFBrDDCFLOW-PIPEBBFBCPORT-SENSOR-INPUTDF.FFeDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFDBBFBBBFDBBF FSURGE-TANK-METER-OUTPUTBFDBBBF BÂSURGE-TANK-MAIN-INPUTFqDBBF BÂSURGE-TANK-MAIN-OUTPUTBFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "LB" :CHARACTERS NIL :QFASLP NIL :LENGTH 2449 :CREATION-DATE 2734550856 :DIRECTORY "PICON-CLASS" :NAME "LB-EXERCISE-17" :TYPE "PIC" :VERSION 1) hưs2Dp,lFASD-DATADlLBRalphNFfFDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB w1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE SAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK sBMDBNCLBCNEXT-NEW-STATEMENT-NUMBERFCFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDEXERCISE-17FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?Exercise 171DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBpDBK SBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBxDBK SBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDBDBK SBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK SBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK SBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK SBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK SBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK SBMBN1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMNILFFFFD DCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBeMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDIF-THEN-RULED BK uBMBWÁSTATEMENT-TEXTDDCIFDC>CF1FdDDSET-SETPOINTBFODDBBFylif f1 > 100 then set f1 setpoint = 79 else set f1setpoint = 121CSTATEMENT-NUMBER?FPICON-RULE-SCAN-INTERVALFB-FFFFDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFFFFDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FFFFBDBDBBB-FFFxFBDCR-L-1-IN-1-OUT-FEEDBACK-CONTROLLERD SETPOINT-LOW-LIMIT?FPSETPOINT-HIGH-LIMIT?FdCSETPOINT-MINIMUM-INTERVAL-BETWEEN-CHANGES?FSETPOINT-MAXIMUM-CHANGE-PER-ADJUSTMENT?ǀPDISPLAY-SETPOINT-VALUESB-FlFqFFF1-XDMAGNETIC-FLOWMETER-FLOW-THRU-SENSORDSENSOR-TRACING-REQUESTSB-FFFFBDON-OFF-CONTROL-VALVEBF?FF]FCV1DBDBBB-BDBDBIDBJDFREE-TEXT-STATEMENTDBK ):BMBNBl4BF B-F6FFFnDDBDBBBFF6FFFnDDBDBBB-F+F~F#FqBDBDBBB-BDBDBIDBJDSIMULATION-STATEMENTDBK WBMBNBDDSIMULATEBBDCPICON-WAVEFdFF,simulate F1 with wave with central value 100 andldeviation 20 and period 8 minutesBFB-FFFF^DDBDBBBFFFFF^DDBDBBB-F F~FFqB@DBDBBB-FFnF,FaBADBDBBB-BDBDBIDBJDBDBK ):BMBNBl3BF B-F6FFFDDBDBBBFF6FFFDDBDBBB-F+FF#FBeDBDBBB-BDBDBIDBJDB7DBK WBMBNBDDB9F1-4FdDCCOMPOUND-VARIABLEBSETPOINTsimulate F1 setpoint with 100 then F1 setpointBFB-FFFFDDBDBBBFFFFFDDBDBBB-F FFFBDBDBBB-BDBDBIDBJDBDBK WBMBNBl2BFB-F6FFFDDBDBBBFF6FFFDDBDBBB-F+FF#FBDBDBBB-BDBDBIDBJDBDBK WBMBNBl1BFB-F6FFFDDBDBBBFF6FFFDDBDBBB-F+FF#FBDBDBBB-BDBDBIDBJDBDBK xBMBNBExercise #17BFB-F>FFFDDBDBBBFF>FFFDDBDBBB-F3FFFBDDCCONTROL-CONNECTIONBFFCCONTROLLER-OUTPUTVALVE-CONTROL-CONNECTIONBDBBBFBÁSETPOINT-INPUTFDCFLOW-PIPEBFBÃTHRU-SENSOR-OUTPUT-CONNECTIONBFDBBFFSENSOR-CONTROLLER-CONNECTIONCONTROLLER-INPUTBDBBBFBÂVALVE-INPUT-CONNECTIONFDBBFFVALVE-OUTPUT-CONNECTIONTHRU-SENSOR-INPUT-CONNECTIONBB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "LB" :CHARACTERS NIL :QFASLP NIL :LENGTH 1919 :CREATION-DATE 2734377712 :DIRECTORY "PICON-CLASS" :NAME "LB-EXERCISE-3" :TYPE "PIC" :VERSION 1) hưs2Dp,lFASD-DATADlLBRalphJFfFDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB 1|1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE ?AUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK .|BMDBNCLBCNEXT-NEW-STATEMENT-NUMBERFCFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDCEXERCISE-3FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?lExercise 31DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBpDBK ?BMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBxDBK ?BMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDBDBK ?BMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK lBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK ?BMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK ?BMBN1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMNILFFFFDDCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBeMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDIF-THEN-RULEDBK 0|BMBWÁSTATEMENT-TEXTDDCIFDC>CF1FDDSENDD,~6F highBDDESTINATIONOPERATORCEVERY-TIMEif F1 > 200 then send "*** high" with f1 tooperator every timeCSTATEMENT-NUMBER?FB-FFFFDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFFFFDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FFFFBDBDBBB-FFFFBDBDBBB-BDBDBIDBJDSIMULATION-STATEMENTDBK wlBMBNBDDSIMULATEBBDCPICON-WAVEFF2FX,simulate F1 with wave with central value 200 andldeviation 50 and period 10 minutesBFB-FF FF1DDBDBBBFFF FF1DDBDBBB-FFFFBDBDBBB-FF!FvF.BDBDBBB-BDBDBIDBJDBDBK xlBMBNBDDBCP1DMAXDC*ǀYBlsimulate P1 with 0 then max (0, .35 * F1)BF B-FF FF DDBDBBBFFF FF DDBDBBB-FFFF B0DCGUAGE-PRESSURE-THRU-SENSORDSENSOR-TRACING-REQUESTSB-F(FFFFyB'DMAGNETIC-FLOWMETER-FLOW-THRU-SENSORDBNB-FFFF(FnBDCCENTRIFUGAL-VARIABLE-COMPUTER-PUMPBFFFFXBDBDBBB-BDBDBIDBJDFREE-TEXT-STATEMENTDBK xBMBNBExercise #3BFB-FEFFFDDBDBBBFFEFFFDDBDBBB-F:FFFBdDDCFLOW-PIPEBFBÃTHRU-SENSOR-OUTPUT-CONNECTIONBFDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFDBBFFBTHRU-SENSOR-INPUT-CONNECTIONBDBBFBBBFDBBBFBCPUMP-CONTROLLER-CONNECTIONFDBBBFBÂPUMP-INPUT-CONNECTIONFDBBFFÂPUMP-OUTPUT-CONNECTIONBBB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "LB" :CHARACTERS NIL :QFASLP NIL :LENGTH 1926 :CREATION-DATE 2734378014 :DIRECTORY "PICON-CLASS" :NAME "LB-EXERCISE-3" :TYPE "PIC" :VERSION 2) hưs2Dp,lFASD-DATADlLBRalphLFfFDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB 6|1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE ?AUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK .|BMDBNCLBCNEXT-NEW-STATEMENT-NUMBERFCFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDCEXERCISE-3FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?lExercise 31DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBpDBK ?BMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBxDBK ?BMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDBDBK ?BMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK lBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK ?BMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK ?BMBN1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMNILFFFFDDCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBeMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDIF-THEN-RULEDBK 5|BMBWÁSTATEMENT-TEXTDDCIFDC>CF1FDDSENDD,F1 reading ~6F BDDESTINATIONOPERATORCEVERY-TIMElif F1 > 200 then send "F1 reading *** " with F1 tooperator every timeCSTATEMENT-NUMBER?FB-FFFFDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFFFFDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FFFFBDBDBBB-FFFFBDBDBBB-BDBDBIDBJDSIMULATION-STATEMENTDBK wlBMBNBDDSIMULATEBBDCPICON-WAVEFF2FX,simulate F1 with wave with central value 200 andldeviation 50 and period 10 minutesBFB-FF FF1DDBDBBBFFF FF1DDBDBBB-FFFFBDBDBBB-FF!FvF.BDBDBBB-BDBDBIDBJDBDBK xlBMBNBDDBCP1DMAXDC*ǀYBlsimulate P1 with 0 then max (0, .35 * F1)BF B-FF FF DDBDBBBFFF FF DDBDBBB-FFFF B0DCGUAGE-PRESSURE-THRU-SENSORDSENSOR-TRACING-REQUESTSB-F(FFFFyB'DMAGNETIC-FLOWMETER-FLOW-THRU-SENSORDBNB-FFFF(FnBDCCENTRIFUGAL-VARIABLE-COMPUTER-PUMPBFFFFXBDBDBBB-BDBDBIDBJDFREE-TEXT-STATEMENTDBK xBMBNBExercise #3BFB-FEFFFDDBDBBBFFEFFFDDBDBBB-F:FFFBdDDCFLOW-PIPEBFBÃTHRU-SENSOR-OUTPUT-CONNECTIONBFDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFDBBFFBTHRU-SENSOR-INPUT-CONNECTIONBDBBFBBBFDBBBFBCPUMP-CONTROLLER-CONNECTIONFDBBBFBÂPUMP-INPUT-CONNECTIONFDBBFFÂPUMP-OUTPUT-CONNECTIONBBB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "LB" :CHARACTERS NIL :QFASLP NIL :LENGTH 2106 :CREATION-DATE 2734378623 :DIRECTORY "PICON-CLASS" :NAME "LB-EXERCISE-3" :TYPE "PIC" :VERSION 3) hưs2Dp,lFASD-DATADlLBRalphNFfFDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB A|1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE ?AUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK =|BMDBNCLBCNEXT-NEW-STATEMENT-NUMBERFCFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDCEXERCISE-3FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?lExercise 31DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBpDBK ?BMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBxDBK ?BMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDBDBK ?BMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK lBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK ?BMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK ?BMBN1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMNILFFFFDDCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBeMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDIF-THEN-RULED BK @|BMBWÁSTATEMENT-TEXTDDCIFDC>CP1FFDDSENDDP1 reading ~6FBDDESTINATIONOPERATORlif P1 > 70 then send "P1 reading ***" with P1 to operatorCSTATEMENT-NUMBER?FPICON-RULE-SCAN-INTERVALF B-FFF@FDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFFF@FDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FFF8FBDBDBBB-BDBDBIDBJDBD BK 9|BMBWBDDBDBCF1FDDBD,F1 reading ~6F BDBBlif F1 > 200 then send "F1 reading *** " with F1 to,operatorBFBF B-FFFFDDBDBBBFFFFFDDBDBBB-FFFFBDBDBBB-FFFrFBDBDBBB-BDBDBIDBJDSIMULATION-STATEMENTDBK wlBMBNBDDSIMULATEBBDCPICON-WAVEFF2FX,simulate F1 with wave with central value 200 andldeviation 50 and period 10 minutesBFB-FF FF1DDBDBBBFFF FF1DDBDBBB-FFFFB+DBDBBB-FF!FvF.B,DBDBBB-BDBDBIDBJDB"DBK xlBMBNBDDB$BDMAXDC*ǀYBlsimulate P1 with 0 then max (0, .35 * F1)BF B-FF FF DDBDBBBFFF FF DDBDBBB-FFFF BXDCGUAGE-PRESSURE-THRU-SENSORDSENSOR-TRACING-REQUESTSB-F(FFFFyBDMAGNETIC-FLOWMETER-FLOW-THRU-SENSORDBvB-FFFF(FnBDCCENTRIFUGAL-VARIABLE-COMPUTER-PUMPBFFFFXBDBDBBB-BDBDBIDBJDFREE-TEXT-STATEMENTDBK xBMBNBExercise #3BFB-FEFFFDDBDBBBFFEFFFDDBDBBB-F:FFFBDDCFLOW-PIPEBFBÃTHRU-SENSOR-OUTPUT-CONNECTIONBFDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFDBBFFBTHRU-SENSOR-INPUT-CONNECTIONBDBBFBBBFDBBBFBCPUMP-CONTROLLER-CONNECTIONFDBBBFBÂPUMP-INPUT-CONNECTIONFDBBFFÂPUMP-OUTPUT-CONNECTIONBBB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "LB" :CHARACTERS NIL :QFASLP NIL :LENGTH 2148 :CREATION-DATE 2734379429 :DIRECTORY "PICON-CLASS" :NAME "LB-EXERCISE-4" :TYPE "PIC" :VERSION 1) hưs2Dp,lFASD-DATADlLBRalphQFfFDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB N|1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE ?AUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK L|BMDBNCLBCNEXT-NEW-STATEMENT-NUMBERFCFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDCEXERCISE-4FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?lExercise 41DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBpDBK ?BMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBxDBK ?BMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDBDBK ?BMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK lBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK ?BMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK ?BMBN1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMNILFFFFDDCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBeMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDIF-THEN-RULED BK M|BMBWÁSTATEMENT-TEXTDDCIFCL1-IS-LOWDDSENDDlL1 reads low, ~6FCL1DDESTINATIONOPERATORCEVERY-TIME,if l1-is-low then send "L1 reads low, ***" withlL1 to operator every timeCSTATEMENT-NUMBER?FPICON-RULE-SCAN-INTERVALFB-FFkFFDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFFkFFDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FFqFF~BDBDBBB-FFF7FBDBDBBB-BDBDBIDBJDCDEFINITIOND BK L|BMBWBDDC=DBCCONDITIONDCBFdlet condition l1-is-high = L1 > 100BFBB-B-FFoFFYDDBDBBBFFFoFFYDDBDBBB-FFiFF\BDDIFFERENTIAL-PRESSURE-LEVEL-PORT-SENSORDSENSOR-CURRENCY-INTERVALF SENSOR-TRACING-REQUESTSB-FFF FBDBDBBB-BDBDBIDBJDFREE-TEXT-STATEMENTDBK xBMBNBExercise #4BFB-FEFFFDDBDBBBFFEFFFDDBDBBB-F:FFFBDDCFLOW-PIPEBBFBCPORT-SENSOR-INPUTFDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "LB" :CHARACTERS NIL :QFASLP NIL :LENGTH 3155 :CREATION-DATE 2734434749 :DIRECTORY "PICON-CLASS" :NAME "LB-EXERCISE-6" :TYPE "PIC" :VERSION 1) hưs2Dp,lFASD-DATADlLBRalph)FfFDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB 1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE ?AUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK BMDBNCLBCNEXT-NEW-STATEMENT-NUMBERF&CFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDCEXERCISE-6FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?lExercise 61DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBpDBK ?BMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBxDBK ?BMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDBDBK ?BMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK lBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK ?BMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK ?BMBN1DBIDBJDCDEFINITIOND BK BMBWÁSTATEMENT-TEXTDDC=DLEVEL-IS-DECREASINGCCONDITIONNILlet level-is-decreasing be a named conditionCSTATEMENT-NUMBER?F$BACKTRACK-TO-GET-VALUE?B-1DBIDBJDBD BK b;BMBNBDDBDLEVEL-IS-INCREASINGBBlet level-is-increasing be a named conditionBFBB-1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBFFFFDDCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBeMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDIF-THEN-RULEDBK BMBWBDDCIFBDDSENDDltank is decreasingDDESTINATIONOPERATORCEVERY-TIMElif level-is-decreasing then send "tank is decreasing" to operatorlevery timeBF%B-FFPFLFvDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFFPFLFvDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FFVFDFcBDBDBBB-FFfFFsBDBDBBB-BDBDBIDBJDBDBK BMDBNBWBDDBBDDBD,The tank level is now increasing - Check limitsDBB,if level-is-increasing then send,"The tank level is now increasing - Check limits" to operatorBFB-F FFF$DDBDBBBFF FFF$DDBDBBB-FF FFBDBDBBB-FFFFBDBDBBB-FFFF!BDBDBBB-BDBDBIDBJDBD BK BMBWBDDBDCBFBGDDBIBif F1 > F2 then conclude level-is-increasingBFBPFB-FF5FFDDBDBBBFFF5FFDDBDBBB-FF/FF"BDBDBBB-BDBDBIDBJDBlDBK e;BMBNBl1BFB-F1F6FF DDBDBBBFF1F6FF DDBDBBB-F&F0FF#BDMAGNETIC-FLOWMETER-FLOW-THRU-SENSORDSENSOR-TRACING-REQUESTSB-FF~F FCBGDDIFFERENTIAL-PRESSURE-LEVEL-PORT-SENSORDSENSOR-CURRENCY-INTERVALFBB-FFFFCL1DBDBB-FFF~FBFDACCUMULATORBFNFFHFVTANKDBDBBB-BDBDBIDBJDSIMULATION-STATEMENTDBK y;BMBNBDDSIMULATEBFBDCPICON-WAVEFsF FhFh,simulate F1 with wave with central value 115 and,deviation 12 and period 6 minutes and phase 360BFB-FFpFFDDBDBBBFFFpFFDDBDBBB-FFvFFBDBDBBB-FFFFBDBDBBB-BDBDBIDBJDBDBK >;BMBNBDDBBF2DC+DC/DC-BFBGFBsimulate L1 with 50 then (F1 - F2) / 3600 + L1BFB-F FNFFdDDBDBBBFF FNFFdDDBDBBB-FFTFFaB%DBDBBB-BDBDBIDBJDBDBK y;BMBNBDDBBGBDBFnFFh,simulate F2 with wave with central value 110 andldeviation 22 and period 6 minutesBFB-F FFFCDDBDBBBFF FFFCDDBDBBB-FF#FF0BHDBDBBB-FF3F"F@BIDBDBBB-BDBDBIDBJDBlDBK !xBMBNBExercise #6BFB-FFFFFDDBDBBBFFFFFFDDBDBBB-F;FFFBmDDCFLOW-PIPEBFBÃTHRU-SENSOR-OUTPUT-CONNECTIONBFDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFDBBFBBBFDBBBFBTHRU-SENSOR-INPUT-CONNECTIONFDBBFF BÂACCUMULATOR-MAIN-INPUTBDBBFBBBFDBBF FACCUMULATOR-MAIN-OUTPUTBBDBBF FACCUMULATOR-METER-OUTPUTCPORT-SENSOR-INPUTFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 8 :AUTHOR "LB" :QFASLP NIL :LENGTH 1681 :CREATION-DATE 2734525669 :CHARACTERS T :DIRECTORY "PICON-CLASS" :NAME "LB-ICONS" :TYPE "LISP" :VERSION 1) ;;; -*- Mode:LISP; Package:PICON; Fonts:(HL12B); Base:10 -*-;;; These are some examples of how to create icons.(def-frame-type (piping process-equipment) (pipe-op-input-connection (:input :left 50) flow-pipe) (pipe-op-output-connection-1 (:output :right 10) flow-pipe) (pipe-op-output-connection-2 (:output :right 90) flow-pipe) (image-description '#.(make-image-description (size 100 100) (position-for-name nil 80) (circular-arc (10 40) (0 50) (10 60)) (circular-arc (10 40) (20 50) (10 60)) (fill (10 50)) (line (10 40) (60 40)) (line (10 60) (60 60)) (circular-arc (60 40) (70 50) (60 60)) (line (60 40) (80 10)) (line (60 60) (80 90)) (line (70 50) (90 20)) (line (70 50) (90 80)) (circular-arc (90 0) (100 10) (90 20)) (circular-arc (90 0) (80 10) (90 20)) (fill (90 10)) (circular-arc (90 80) (100 90) (90 100)) (circular-arc (90 80) (80 90) (90 100)) (fill (90 90)))))(def-frame-type (test process-equipment :abstract))(def-frame-type (run-one test) (start-op-input-connection (:input :left 10) flow-pipe) (start-op-output-connection (:output :right 10) flow-pipe) (image-description '#.(make-image-description (size 20 20) (position-for-name nil 30) (polyline (0 0) (20 0) (20 20) (0 20) (0 0)) (fill (10 10)))))(def-frame-type (run-two test) (stop-op-input-connection (:input :left 10) flow-pipe) (stop-op-output-connection (:output :right 10) flow-pipe) (image-description '#.(make-image-description (size 30 30) (position-for-name nil 35) (polyline (0 0) (30 0) (30 30) (0 30) (0 0)) (circle (5 15) (15 5) (25 15)) (fill (5 5)))))LMFL(:BYTE-SIZE 8 :AUTHOR "LB" :QFASLP NIL :LENGTH 2443 :CREATION-DATE 2734546980 :CHARACTERS T :DIRECTORY "PICON-CLASS" :NAME "LB-ICONS" :TYPE "LISP" :VERSION 2) ;;; -*- Mode:LISP; Package:PICON; Fonts:(HL12B); Base:10 -*-;;; These are some examples of how to create icons.(def-frame-type (piping process-equipment) (pipe-op-input-connection (:input :left 50) flow-pipe) (pipe-op-output-connection-1 (:output :right 10) flow-pipe) (pipe-op-output-connection-2 (:output :right 90) flow-pipe) (image-description '#.(make-image-description (size 100 100) (position-for-name nil 80) (circular-arc (10 40) (0 50) (10 60)) (circular-arc (10 40) (20 50) (10 60)) (fill (10 50)) (line (10 40) (60 40)) (line (10 60) (60 60)) (circular-arc (60 40) (70 50) (60 60)) (line (60 40) (80 10)) (line (60 60) (80 90)) (line (70 50) (90 20)) (line (70 50) (90 80)) (circular-arc (90 0) (100 10) (90 20)) (circular-arc (90 0) (80 10) (90 20)) (fill (90 10)) (circular-arc (90 80) (100 90) (90 100)) (circular-arc (90 80) (80 90) (90 100)) (fill (90 90)))))(def-frame-type (test process-equipment :abstract))(def-frame-type (run-one test) (start-op-input-connection (:input :left 10) flow-pipe) (start-op-output-connection (:output :right 10) flow-pipe) (image-description '#.(make-image-description (size 20 20) (position-for-name nil 30) (polyline (0 0) (20 0) (20 20) (0 20) (0 0)) (fill (10 10)))))(def-frame-type (run-two test) (stop-op-input-connection (:input :left 10) flow-pipe) (stop-op-output-connection (:output :right 10) flow-pipe) (image-description '#.(make-image-description (size 30 30) (position-for-name nil 35) (polyline (0 0) (30 0) (30 30) (0 30) (0 0)) (circle (5 15) (15 5) (25 15)) (fill (5 5)))))(def-frame-type (star test) (image-description '#.(make-image-description (size 60 50) (block-outline) (line (10 20) (40 20)) (line (40 20) (17 40)) (line (17 40) (25 10)) (line (25 10) (32 40)) (line (32 40) (10 20)) (fill (25 25)) ) ))(def-frame-type (david-star test) (image-description '#.(make-image-description (size 60 50) (block-outline) (polygon (10 40) (25 10) (40 40)) (polygon (10 20) (40 20) (25 50)) ) ))(def-frame-type (heart test) (image-description '#.(make-image-description (size 50 50) (block-outline) (circular-arc (10 20) (15 10) (25 20)) (circular-arc (25 20) (35 10) (40 20)) (line (40 20) (25 40)) (line (25 40) (10 20)) ) ))LMFL(:BYTE-SIZE 8 :AUTHOR "WILDE" :QFASLP NIL :LENGTH 15483 :CREATION-DATE 2732624618 :CHARACTERS T :DIRECTORY "PICON-CLASS" :NAME "MIKE-CASE-2" :TYPE "PRI" :VERSION 1)  This is RALPH: PICON-CLASS; MIKE-CASE-2.PRI#1 (created 5 aug 86 10:23), based on RALPH: PICON-CLASS; CASE-STUDY-2.PIC#1 (created 17 may 86 1:46), as possibly modified on-line.STATEMENTS(3) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 18 may 86 12:57 Usage ....................... = In usesimulate L1 with 0 then if time < 600 then min ((L1 + (.01666 * (F1 / sim-tank-area)) + (.01666 * (F2 / sim-tank-area-2))), 400) else if time < 1200 then 397 else if time < 1800 then wave with central value 400 and deviation 400 and period 1200 seconds and phase 1800 and shape ramp-down else 0(4) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 10 seconds Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 7 may 86 3:29 Usage ....................... = In useif L1 > 0 then do nothing(5) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 10 seconds Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 17 may 86 15:07 Usage ....................... = In useif F1 > 0 then do nothing(6) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 10 seconds Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 17 may 86 15:08 Usage ....................... = In useif F2 > 0 then do nothing(7) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 17 may 86 16:45 Usage ....................... = In usesimulate F1 with if time < 150 then wave with central value 60 and deviation 60 and period 600 seconds and phase 450 else if time < 450 then wave with central value 60 and deviation 0 and period 1 minute and noise .3 else if time < 600 then wave with central value 60 and deviation 60 and period 600 seconds and phase 450 else 0(24) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 17 may 86 15:00 Usage ....................... = In usesimulate T1 with 125 then if time < 600 then 80 else if time < 900 then wave with central value 80 and deviation 170 and period 1200 seconds and phase 300 else if time < 2400 then 250 else if time < 3000 then wave with central value 125 and deviation 125 and period 2400 seconds and phase 1200 else 70(28) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 15 may 86 15:44 Usage ....................... = In usesimulate clock with 0 then time(29) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 10 seconds Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 7 may 86 5:09 Usage ....................... = In useif clock > 0 then do nothing(33) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 10 seconds Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 7 may 86 5:19 Usage ....................... = In useif F3 > 0 then do nothing(34) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 18 may 86 11:40 Usage ....................... = In usesimulate F3 with 0 then if time < 1200 then 0 else if time < 1800 then (min (f3-wave, (F3 + 3.1))) else if time < 2000 then 0 else 0(37) Free Text Statement Authors ..................... = DWR Last changed ................ = 16 may 86 19:39 Usage ....................... = Brand-newChemical Mixing Process(39) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 17 may 86 0:50 Usage ....................... = In usesimulate F4 with 0 then F3 * L2 setpoint / max (1, L2)(40) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 17 may 86 0:39 Usage ....................... = In usesimulate P2 with 0 then F3 * (L2 / L2 setpoint)(41) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 10 seconds Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 7 may 86 9:55 Usage ....................... = In useif F4 > 0 then do nothing(42) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 10 seconds Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 7 may 86 9:55 Usage ....................... = In useif P1 > 0 then do nothing(45) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 15 may 86 14:49 Usage ....................... = In usesimulate local temp-wave with wave with central value 2000 and deviation 2000 and period 8 hours and phase 21600(46) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 15 may 86 14:41 Usage ....................... = In usesimulate temp-start with 80(87) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 16 may 86 12:30 Usage ....................... = In usesimulate sim-tank-area with 2.02(92) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 17 may 86 16:33 Usage ....................... = In usesimulate P1 with 0 then (2.5 * F3)(95) Free Text Statement Authors ..................... = DWR Last changed ................ = 19 may 86 9:35 Usage ....................... = Brand-newThe purpose of these rules is to force the displaying of sensor values on the schematic(104) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 17 may 86 16:45 Usage ....................... = In usesimulate F2 with if time < 150 then wave with central value 100 and deviation 100 and period 600 seconds and phase 450 else if time < 450 then wave with central value 100 and deviation 0 and period 1 minute and noise .4 else if time < 600 then wave with central value 100 and deviation 100 and period 600 seconds and phase 450 else 0(105) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 10 seconds Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 17 may 86 16:37 Usage ....................... = In useif P2 > 0 then do nothing(106) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 17 may 86 16:40 Usage ....................... = In usesimulate sim-tank-area-2 with 3.5(107) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 18 may 86 11:41 Usage ....................... = In usesimulate local f3-wave with wave with central value 80 and deviation 0 and period 1 minute and noise 1.3(109) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 20 seconds Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 18 may 86 12:41 Usage ....................... = In useif F1 > 60 then send " F1 is reading *** and should not exceed 60" with F1 to operator(110) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 20 seconds Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 18 may 86 12:41 Usage ....................... = In useif F2 > 100 then send " F2 is reading *** and should not exceed 100" with F2 to operator(112) Definition Categories .................. = ... Associated units ............ = ... Trace this? ................. = no Currency interval ........... = derived Should backtracking be used to = yes determine the value? Authors ..................... = DWR Last changed ................ = 18 may 86 12:42 Usage ....................... = In usetank-level-safety-limit = 380(113) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 1 minute Alert interval .............. = 20 seconds Authors ..................... = DWR Last changed ................ = 18 may 86 12:55 Usage ....................... = In useif L1 > tank-level-safety-limit then send "Tank level: *** is over safety limit of ***" with L1, tank-level-safety-limit to operator every 1 minute and conclude tank-level-is-dangerously-high(115) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = none Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 18 may 86 12:53 Usage ....................... = In useif tank-level-is-dangerously-high and there-is-incoming-flow then send "Tank level is above safety limit and is still increasing." to operator every time(116) Definition Categories .................. = ... Associated units ............ = ... Trace this? ................. = no Currency interval ........... = derived Should backtracking be used to = yes determine the value? Authors ..................... = DWR Last changed ................ = 18 may 86 12:52 Usage ....................... = In uselet tank-level-is-dangerously-high be a named condition(117) Definition Categories .................. = ... Associated units ............ = ... Trace this? ................. = no Currency interval ........... = derived Should backtracking be used to = yes determine the value? Authors ..................... = DWR Last changed ................ = 18 may 86 12:53 Usage ....................... = In uselet condition there-is-incoming-flow = F1 > 0 or F2 > 0(118) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 1 minute Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 15 may 86 14:08 Usage ....................... = In useif CLOCK > 2000 then send "The simulation has completed." to operator(119) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 17 may 86 0:34 Usage ....................... = In usesimulate L2 with 0 then ( F4 / tank-2-area) / 3600 + L2(120) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 17 may 86 0:00 Usage ....................... = In usesimulate L2 setpoint with 250 then L2 setpoint(122) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 17 may 86 0:33 Usage ....................... = In usesimulate tank-2-area with 1.12(123) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 10 seconds Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 16 may 86 23:57 Usage ....................... = In useif L2 > 0 then do nothingLMFL(:BYTE-SIZE 8 :AUTHOR "WILDE" :QFASLP NIL :LENGTH 21942 :CREATION-DATE 2732624717 :CHARACTERS T :DIRECTORY "PICON-CLASS" :NAME "MIKE-CASE-2-SOLUTION" :TYPE "PRI" :VERSION 1)  This is RALPH: PICON-CLASS; MIKE-CASE-2-SOLUTION.PRI#1 (created 5 aug 86 10:25), based on RALPH: PICON-CLASS; CASE-2-SOLUTION.PIC#2 (created 17 may 86 0:51), as possibly modified on-line.STATEMENTS(3) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 18 may 86 12:57 Usage ....................... = In usesimulate L1 with 0 then if time < 600 then min ((L1 + (.01666 * (F1 / sim-tank-area)) + (.01666 * (F2 / sim-tank-area-2))), 400) else if time < 1200 then 397 else if time < 1800 then wave with central value 400 and deviation 400 and period 1200 seconds and phase 1800 and shape ramp-down else 0(4) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 10 seconds Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 7 may 86 3:29 Usage ....................... = In useif L1 > 0 then do nothing(5) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 10 seconds Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 17 may 86 15:07 Usage ....................... = In useif F1 > 0 then do nothing(6) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 10 seconds Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 17 may 86 15:08 Usage ....................... = In useif F2 > 0 then do nothing(7) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 17 may 86 16:45 Usage ....................... = In usesimulate F1 with if time < 150 then wave with central value 60 and deviation 60 and period 600 seconds and phase 450 else if time < 450 then wave with central value 60 and deviation 0 and period 1 minute and noise .3 else if time < 600 then wave with central value 60 and deviation 60 and period 600 seconds and phase 450 else 0(24) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 17 may 86 15:00 Usage ....................... = In usesimulate T1 with 125 then if time < 600 then 80 else if time < 900 then wave with central value 80 and deviation 170 and period 1200 seconds and phase 300 else if time < 2400 then 250 else if time < 3000 then wave with central value 125 and deviation 125 and period 2400 seconds and phase 1200 else 70(28) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 15 may 86 15:44 Usage ....................... = In usesimulate clock with 0 then time(29) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 10 seconds Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 7 may 86 5:09 Usage ....................... = In useif clock > 0 then do nothing(33) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 10 seconds Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 7 may 86 5:19 Usage ....................... = In useif F3 > 0 then do nothing(34) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 18 may 86 11:40 Usage ....................... = In usesimulate F3 with 0 then if time < 1200 then 0 else if time < 1800 then (min (f3-wave, (F3 + 3.1))) else if time < 2000 then 0 else 0(37) Free Text Statement Authors ..................... = DWR Last changed ................ = 16 may 86 19:39 Usage ....................... = Brand-newChemical Mixing Process(39) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 17 may 86 0:50 Usage ....................... = In usesimulate F4 with 0 then F3 * L2 setpoint / max (1, L2)(40) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 17 may 86 0:39 Usage ....................... = In usesimulate P2 with 0 then F3 * (L2 / L2 setpoint)(41) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 10 seconds Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 7 may 86 9:55 Usage ....................... = In useif F4 > 0 then do nothing(42) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 10 seconds Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 7 may 86 9:55 Usage ....................... = In useif P1 > 0 then do nothing(45) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 15 may 86 14:49 Usage ....................... = In usesimulate local temp-wave with wave with central value 2000 and deviation 2000 and period 8 hours and phase 21600(46) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 15 may 86 14:41 Usage ....................... = In usesimulate temp-start with 80(87) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 16 may 86 12:30 Usage ....................... = In usesimulate sim-tank-area with 2.02(92) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 17 may 86 16:33 Usage ....................... = In usesimulate P1 with 0 then (2.5 * F3)(95) Free Text Statement Authors ..................... = DWR Last changed ................ = 19 may 86 9:35 Usage ....................... = Brand-newThe purpose of these rules is to force the displaying of sensor values on the schematic(104) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 17 may 86 16:45 Usage ....................... = In usesimulate F2 with if time < 150 then wave with central value 100 and deviation 100 and period 600 seconds and phase 450 else if time < 450 then wave with central value 100 and deviation 0 and period 1 minute and noise .4 else if time < 600 then wave with central value 100 and deviation 100 and period 600 seconds and phase 450 else 0(105) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 10 seconds Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 17 may 86 16:37 Usage ....................... = In useif P2 > 0 then do nothing(106) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 17 may 86 16:40 Usage ....................... = In usesimulate sim-tank-area-2 with 3.5(107) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 18 may 86 11:41 Usage ....................... = In usesimulate local f3-wave with wave with central value 80 and deviation 0 and period 1 minute and noise 1.3(109) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 20 seconds Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 18 may 86 12:41 Usage ....................... = In useif F1 > 60 then send " F1 is reading *** and should not exceed 60" with F1 to operator(110) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 20 seconds Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 18 may 86 12:41 Usage ....................... = In useif F2 > 100 then send " F2 is reading *** and should not exceed 100" with F2 to operator(112) Definition Categories .................. = ... Associated units ............ = ... Trace this? ................. = no Currency interval ........... = derived Should backtracking be used to = yes determine the value? Authors ..................... = DWR Last changed ................ = 18 may 86 12:42 Usage ....................... = In usetank-level-safety-limit = 380(113) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 1 minute Alert interval .............. = 20 seconds Authors ..................... = DWR Last changed ................ = 18 may 86 12:55 Usage ....................... = In useif L1 > tank-level-safety-limit then send "Tank level: *** is over safety limit of ***" with L1, tank-level-safety-limit to operator every 1 minute and conclude tank-level-is-dangerously-high(115) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = none Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 18 may 86 12:53 Usage ....................... = In useif tank-level-is-dangerously-high and there-is-incoming-flow then send "Tank level is above safety limit and is still increasing." to operator every time(116) Definition Categories .................. = ... Associated units ............ = ... Trace this? ................. = no Currency interval ........... = derived Should backtracking be used to = yes determine the value? Authors ..................... = DWR Last changed ................ = 18 may 86 12:52 Usage ....................... = In uselet tank-level-is-dangerously-high be a named condition(117) Definition Categories .................. = ... Associated units ............ = ... Trace this? ................. = no Currency interval ........... = derived Should backtracking be used to = yes determine the value? Authors ..................... = DWR Last changed ................ = 18 may 86 12:53 Usage ....................... = In uselet condition there-is-incoming-flow = F1 > 0 or F2 > 0(118) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 1 minute Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 15 may 86 14:08 Usage ....................... = In useif CLOCK > 2000 then send "The simulation has completed." to operator(119) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 17 may 86 0:34 Usage ....................... = In usesimulate L2 with 0 then ( F4 / tank-2-area) / 3600 + L2(120) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 17 may 86 0:00 Usage ....................... = In usesimulate L2 setpoint with 250 then L2 setpoint(122) Simulation Statement Categories .................. = ... Associated units ............ = ... Authors ..................... = DWR Last changed ................ = 17 may 86 0:33 Usage ....................... = In usesimulate tank-2-area with 1.12(123) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 10 seconds Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 16 may 86 23:57 Usage ....................... = In useif L2 > 0 then do nothing(124) Initial Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Authors ..................... = DWR Last changed ................ = 17 may 86 0:11 Usage ....................... = In useinitially set fill-time = 0 and set drain-time = 0(125) Definition Categories .................. = ... Associated units ............ = ... Trace this? ................. = no Currency interval ........... = derived Should backtracking be used to = no determine the value? Authors ..................... = DWR Last changed ................ = 17 may 86 0:11 Usage ....................... = In uselet fill-time be a numeric variable(126) Definition Categories .................. = ... Associated units ............ = ... Trace this? ................. = no Currency interval ........... = derived Should backtracking be used to = no determine the value? Authors ..................... = DWR Last changed ................ = 17 may 86 0:11 Usage ....................... = In uselet drain-time be a numeric variable(127) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 30 seconds Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 17 may 86 0:23 Usage ....................... = In useif L1 > L1 as of 30 seconds ago then conclude tank-is-filling and advance step variable fill-stage to filling else conclude not tank-is-filling(128) Definition Categories .................. = ... Associated units ............ = ... Trace this? ................. = no Currency interval ........... = derived Should backtracking be used to = ... determine the value? Authors ..................... = DWR Last changed ................ = 17 may 86 0:12 Usage ....................... = In uselet step variable fill-stage be filling, draining, unknown(132) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 30 seconds Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 17 may 86 0:23 Usage ....................... = In useif L1 < L1 as of 30 seconds ago then conclude tank-is-draining and advance step variable fill-stage to draining else conclude not tank-is-draining(133) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = none Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 17 may 86 0:22 Usage ....................... = In useif tank-is-filling then increment fill-time by 30(134) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = none Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 17 may 86 0:30 Usage ....................... = In useif tank-is-draining then increment drain-time by 30(135) Definition Categories .................. = ... Associated units ............ = ... Trace this? ................. = no Currency interval ........... = derived Should backtracking be used to = yes determine the value? Authors ..................... = DWR Last changed ................ = 17 may 86 0:23 Usage ....................... = In uselet tank-is-draining be a named condition(136) Definition Categories .................. = ... Associated units ............ = ... Trace this? ................. = no Currency interval ........... = derived Should backtracking be used to = yes determine the value? Authors ..................... = DWR Last changed ................ = 17 may 86 0:23 Usage ....................... = In uselet tank-is-filling be a named condition(137) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no  Scan interval ............... = none Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 17 may 86 0:24 Usage ....................... = In useif not tank-is-filling and fill-stage is filling then advance step variable fill-stage to unknown and send "Fill time was: ***" with fill-time to log(138) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = none Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 17 may 86 0:27 Usage ....................... = In useif not tank-is-draining and fill-stage is draining then advance step variable fill-stage to unknown and send "Drain time was: ***" with drain-time to log(139) If Then Rule Categories .................. = ... Associated units ............ = ... Priority .................... = 1 Trace this? ................. = no Scan interval ............... = 30 seconds Alert interval .............. = none Authors ..................... = DWR Last changed ................ = 17 may 86 0:41 Usage ....................... = In useif L2 > 100 then set L2 setpoint = 50 else set L2 setpoint = 100LMFL(:BYTE-SIZE 8 :AUTHOR "DWR" :QFASLP NIL :LENGTH 866 :CREATION-DATE 2729444076 :CHARACTERS T :DIRECTORY "PICON-CLASS" :NAME "PICON-KEYBOARD-INPUT" :TYPE "LISP" :VERSION 2) ;;; -*- Mode:LISP; Package:PICON; Base:10 -*-(defmacro def-intercept-character (character &body body) (let ((character-var (gensym))(character-function (gensym))) `(let ((,character-function #'(lambda (character &rest ignore)(setq inhibit-scheduling-flag nil)(progn . ,body)(values character t))) (,character-var ,character)) (if (not (assoc ,character-var tv:kbd-intercepted-characters)) (push `(,,character-var ,,character-function) tv:kbd-intercepted-characters) (setf (cadr (assoc ,character-var tv:kbd-intercepted-characters)) ,character-function))))) (def-intercept-character #\macro (get-keyboard-value))(defvar input-value)(defun get-keyboard-value (title) (format t "~%Enter a ~d:" title) (setq input-value (read)))(defun return-value () (values input-value 999))LMFL(:BYTE-SIZE 8 :AUTHOR "DWR" :QFASLP NIL :LENGTH 858 :CREATION-DATE 2730897469 :CHARACTERS T :DIRECTORY "PICON-CLASS" :NAME "PICON-KEYBOARD-INPUT" :TYPE "LISP" :VERSION 3) ;;; -*- Mode:LISP; Package:PICON; Base:10 -*-(defmacro def-intercept-character (character &body body) (let ((character-var (gensym))(character-function (gensym))) `(let ((,character-function #'(lambda (character &rest ignore)(setq inhibit-scheduling-flag nil)(progn . ,body)(values character t))) (,character-var ,character)) (if (not (assoc ,character-var tv:kbd-intercepted-characters)) (push `(,,character-var ,,character-function) tv:kbd-intercepted-characters) (setf (cadr (assoc ,character-var tv:kbd-intercepted-characters)) ,character-function))))) (def-intercept-character #\macro (get-keyboard-value))(defvar input-value)(defun get-keyboard-value () (format t "~%Enter a value:") (setq input-value (read)))(defun return-value () (values input-value 999))LMFL(:BYTE-SIZE 16 :AUTHOR "TROY" :CHARACTERS NIL :QFASLP NIL :LENGTH 966 :CREATION-DATE 2734521499 :DIRECTORY "PICON-CLASS" :NAME "PICON-KEYBOARD-INPUT" :TYPE "QFASL" :VERSION 3) hưs2Dp,COMPILE-DATADTROYDuke(|FfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITEpB ,ANDOVERpB QFASL-SOURCE-FILE-UNIQUE-ID1DplFSMAKE-FASLOAD-PATHNAMEDpB+QUOTERALPHDB:DSKDB:PICON-CLASSDB:PICON-KEYBOARD-INPUTDB:LISPDB:FpB BASEF pB ,PACKAGEpB PICON1DplSIlDEFMACRO-SET-INDENTATION-FOR-ZWEIDB:DEF-INTERCEPT-CHARACTERDB:FBTˀ$`0F<BTFB@pBQ,MACRO-REPORT-ARGS-ERRORÀGENSYMLETFUNCTIONÀLAMBDADCCHARACTERÀ&RESTÀIGNOREDSETQINHIBIT-SCHEDULING-FLAGNILÀPROGNDDÀVALUESBfB-CIFNOTÀASSOCDplTVlKBD-INTERCEPTED-CHARACTERSPUSHpBQlXR-BQ-LISTSETFCADRDDpB EXPR-SXHASHdDpB ,MACROS-EXPANDEDDpBQlXR-BQ-CONSpBQXR-BQ-LIST*B{DpB(,ARG-MAPDDpBQl*MACROARG*DpBQl*MACROENVIRONMENT*DpB(lLOCAL-MAPDDBfDBODYDÁCHARACTER-VARDCCHARACTER-FUNCTIONDpSYSTEM,FUNCTION-PARENTBTDARGLISTBfÀ&BODYBEZU8E|ŀK@MABBCBDCE D D D D DAEZD|Vz|Uz|UzBE@E|Uz|UzDDDBED|Vz|UzDDBECE|UzD|VzDDDBED|Vz|UzCE|Uz|Uz|UDÀMACROBOBT1DBcDDÀG0431DBdDBeBiBmDBnDCGET-KEYBOARD-VALUEBpDÀG0430FDBrDBsDBtBBwDByDB{BBBwDB|DB}DBtBBwB1DpBQ,DEFVAR-1INPUT-VALUEBˀ F B@FBÀFORMAT,~%Enter a value:READE BOBRETURN-VALUEˀ F B@FBFDDOB1DpBQ,FASL-RECORD-FILE-MACROS-EXPANDEDDB:DDB{qDBҗDB?LMFL(:BYTE-SIZE 8 :AUTHOR "dwr" :QFASLP NIL :LENGTH 1241 :CREATION-DATE 2730912283 :CHARACTERS T :DIRECTORY "PICON-CLASS" :NAME "SCHEDULE" :TYPE "TEXT" :VERSION 10)  P I C O N Course Schedule_____________________________Monday 8:30 - 9:00 Coffee and Doughnuts 9:00 - 10:00 Introduction to PICON and Expert Systems 11:00 - 12:00 PICON Demonstration12:30 - 2:00 Lunch 2:00 - 3:00 Schematic Capture and Manipulation 3:00 - 4:30 Lab - Lab Sessions 1, 2, 3 4:30 - ? "Get Acquainted with the LMI'ers" PartyTuesday 8:00 - 9:00 Optional Lab Time 9:00 - 12:30 Rules 12:30 - 2:00 Lunch 2:00 - 5:00 Lab - Lab Sessions 3, 4, 5Wednesday 8:00 - 9:00 Optional Lab Time 9:00 - 10:30 Icon Customization and User Hooks 10:30 - 12:30 Lab - Lab Session 712:30 - 2:00 Lunch 2:00 - 3:30 Simulation and Modeling (Mike Levin) 3:30 - 4:30 FAULTS Demonstration 4:30 - 5:00 Question and AnswerThursday 8:00 - 9:00 Optional Lab Time 9:00 - 11:00 RTIME Theory and Application 11:30 - 12:30 RTIME Demonstration 112:30 - 2:00 Lunch 2:00 - 5:00 Lab - Finish all remaining lab sessions 5:30 - Course DinnerFriday 8:00 - 9:00 Optional Lab Time 9:00 - 10:30 Knowledge Engineering 11:00 - ?? Future Plans - Cambridge (Lowell Hawkinson)10:30 - 12:00 Optional Lab TimeLMFL(:BYTE-SIZE 16 :AUTHOR "dwr" :CHARACTERS NIL :QFASLP NIL :LENGTH 2962 :CREATION-DATE 2725885771 :DIRECTORY "PICON-CLASS" :NAME "SOLUTION-10" :TYPE "PIC" :VERSION 3) hưs2Dp,lFASD-DATADdwrRalphyKFfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB M1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE LAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK MBMBNCNEXT-NEW-STATEMENT-NUMBERF CFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?Solution 101DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBkDBK LBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBsDBK LBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB{DBK LBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK LBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK LBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK LBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK LBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK LBMBN1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMNILFFFFD DCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpB`MEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDIF-THEN-RULED BK MBMBNÁSTATEMENT-TEXTDDCIFDCISCWAVE-STEPWAVE-DECREASINGDDSENDDlWave for F1 is decreasingDDESTINATIONOPERATORlif wave-step is wave-decreasing then send,"Wave for F1 is decreasing" to operatorCSTATEMENT-NUMBER?FPICON-RULE-SCAN-INTERVALF B-FFFjFDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFFFjFDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FFFbFBDBDBBB-FFF_FBDBDBBB-BDBDBIDBJDBD BK MBMBNBDDBDCBDBBFDDBBB&lif f1 > f1 as of 15 seconds ago then advance stepvariable wave-step to wave-increasingBFBF B-FF&FFLDDBDBBBFFF&FFLDDBDBBB-FF,FF9B[DBDBBB-FF<FMFIB\DBDBBB-BDBDBIDBJDCDEFINITIONDBK qMBMBNBDDSTEP-VARIABLE-DEFINITIONBDCSTART-WAVEB&Bllet step variable wave-step be start-wave,,wave-increasing, wave-decreasingBFB-FFFsFDDBDBBBFFFFsFDDBDBBB-FFFkF BDBDBBB-FFF FBDBDBBB-BDBDBIDBJDINITIAL-RULEDBK MBMBNBDDCINITIALLYDDBBBDBDBegin wave monitoring.DBBinitially advance step variable wave-step to start-wave andlsend "Begin wave monitoring." to operatorBFB-FF8F FDDBDBBBFFF8F FDDBDBBB-FF2FF%BDBDBBB-FF"FpFBDBDBBB-BDBDBIDBJDSIMULATION-STATEMENTDBK jMBMBNBDDSIMULATEBBDCPICON-WAVEFdF2F,simulate F1 with wave with central value 100 andldeviation 50 and period 20 minutesBFB-FFYFFDDBDBBBFFFYFFDDBDBBB-FF_FFlBDBDBBB-FFoFEF|BDMAGNETIC-FLOWMETER-FLOW-THRU-SENSORDSENSOR-TRACING-REQUESTSB-FFFFBDBDBBB-BDBDBIDBJDFREE-TEXT-STATEMENTDBK MBMBNBDSolution #10 ,l1) By adding 2 more rules, the solution is achieved. One rule to advance the step variable, and one to send a message in the, event that F1 is decreasing. l2) Or alternatively add a single rule which checks, advances, and sends a message all in one rule.BFB-FCFF'F|DDBDBBBFFCFF'F|DDBDBBB-F8FFFBDBDBBB-F)FF*FBDBDBBB-F)FFFBDBDBBB-F)FFFBDBDBBB-F)FF FBDBDBBB-F)FFFBDBDBBB-F)FFFBDDCFLOW-PIPEBBFBTHRU-SENSOR-INPUT-CONNECTIONFDBWBFBÃTHRU-SENSOR-OUTPUT-CONNECTIONBFDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "DWR" :CHARACTERS NIL :QFASLP NIL :LENGTH 4067 :CREATION-DATE 2730896996 :DIRECTORY "PICON-CLASS" :NAME "SOLUTION-12" :TYPE "PIC" :VERSION 5) hưs2Dp,lFASD-DATADDWRRalphƢd.FfFDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB 1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE MAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK BMBNCNEXT-NEW-STATEMENT-NUMBERF$CFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDSOLUTION-12FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?Solution 121DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBnDBK MBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBvDBK MBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB~DBK MBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK MBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK MBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK MBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK MBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK MBMBN1DBIDBJDCDEFINITIOND BK RBMBNÁSTATEMENT-TEXTDDC=DÀTIMERNUMERICNIL,let timer be a numeric variableCSTATEMENT-NUMBER?FBACKTRACK-TO-GET-VALUE?BSAMPLING-INTERVAL-FOR-HISTORIC-REASONS?CINDEFINITE1DBIDBJDBD BK RBMBNBDDBDTANK-IS-FILLINGCCONDITIONB,let tank-is-filling be a named conditionBFBB-1DBIDBJDBD BK RBMBNBDDBDCFILL-TIMEBBlet fill-time be a numeric variableBFBBBB1DBIDBJDBD BK RBMBNBDDBDÁTIMER-STARTEDBBlet timer-started be a named conditionBFBB-1DBIDBJDBD BK RBMBNBDDBDÁTIMER-RUNNINGBBlet timer-running be a named conditionBFBB-1DBIDBJDBD BK -RBMBNBDDBDCFILL-TIMERBBlet fill-timer be a numeric variableBFBB1DBIDBJDBD BK ERBMBNBDDBDTANK-IS-EMPTYINGBBllet tank-is-emptying be a named conditionBFBB-1DBIDBJDBD BK GRBMBNBDDBDCDRAIN-TIMEBBlet drain-time be a numeric variableBF!BB1DBIDBJDBD BK HRBMBNBDDBDTANK-IS-DRAININGBBllet tank-is-draining be a named conditionBF"BB-1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBFFFFDDDIFFERENTIAL-PRESSURE-LEVEL-PORT-SENSORDSENSOR-CURRENCY-INTERVALF SENSOR-TRACING-REQUESTSB-FFFFÀCLOCKDB*DB+F B-B-FFFFCL1DACCUMULATORBFFF~FTANKDCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBcMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDINITIAL-RULEDBK GRBMBNBDDCINITIALLYDDSETBDBMB linitially set fill-time = 0 andlset drain-time = 0BF B-F#FdFEFDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFF#FdFEFDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBGB-FFjFFwBTDBlDBmBGB-F FzFMFBUDBlDBmBGB-F FFhFBVDBDDBEBGB-BHDBIDBIDBJDIF-THEN-RULEDBK 8BMBNBDDCIFBDDCINCREMENTBDF INTERVALlif tank-is-filling then increment fill-time by 10 secondsBFB-F#FEFF[DDBcDBdBBeFF#FEFF[DDBlDBmBGB-FFKFFXBDBDDBEBGB-BHDBIDBIDBJDBDBK 8BMBNBDDBBDDBB DF Bif tank-is-draining then increment drain-time by 10 secondsBF#B-F#F%FF;DDBcDBdBBeF.F#F%FF;DDBlDBmBGB-FF+FF8BDBDDBEBGB-BHDBIDBIDBJDBDBK GRBMBNBDDBDNOTBDDSENDD,Fill time = ~6FBDDESTINATIONOPERATORif not tank-is-filling thenlsend "Fill time = ***" with fill-time to operatorBFB-F$F FFDDBcDBdBBeFF$F FFDDBlDBmBGB-FFF'F BDBlDBmBGB-F F FFBDBDDBEBGB-BHDBIDBIDBJDBDBK HRBMBNBDDBDBBDDBD,Drain time = ~6FB DBBif not tank-is-draining thensend "Drain time = ***" with drain-time to operatorBF B-F$F8FFDDBcDBdBBeFF$F8FFDDBlDBmBGB-FF2FF%BDBlDBmBGB-F F"FFBDBDDBEBGB-BHDBIDBIDBJDBD BK 8BMBNBDDBDC>B;DÁDELAYED-VALUEB;F DDCONCLUDEBDDCONCLUDE-NOTBif L1 > L1 as of 10 seconds ago then conclude tank-is-filling lelse conclude not tank-is-fillingBFPICON-RULE-SCAN-INTERVALF B-F$FfFF@DDBcDBdBBeFF$FfFF@DDBlDBmBGB-FF`FFSB7DBlDBmBGB-F FPFFCB8DBDDBEBGB-BHDBIDBIDBJDBD BK 8BMBNBDDBDC 0 then do nothingBF B;F B-F)FFFDDBcDBdBBeFF)FFFDDBlDBmBGB-FFFFBDBDDBEBGB-BHDBIDBIDBJDFREE-TEXT-STATEMENTDBK BMBNBDSolution #12lThese rules and statements represent the solution to EXERCISE #12.See the script for furthur details.BFB-FBFF1FDDBcDBdBBeFFBFF1FDDBlDBmBGB-F7FFFBDBlDBmBGB-F(FF)FBDBlDBmBGB-F(FFFBDBDDBEBGB-BHDBIDBIDBJDSIMULATION-STATEMENTDBK RBMBNBDDSIMULATEB3BTIME,simulate clock with timeBF B-FFF3FDDBcDBdBBeFFFF3FDDBlDBmBGB-FFF;FBDBDDBEBGB-BHDBIDBIDBJDBDBK QBMBNBDDBB;DBDB^BF,DC+B;ǀ@DBDB^BFXFKDMAXDC-B;ǀL̬simulate L1 with 0 then if time < 300 then (L1 + .25) else if time < 600 then 75 else lmax (0, L1 - .15)BFB-FFKFFDDBcDBdBBeFFFKFFDDBlDBmBGB-FFQFpF^BDBlDBmBGB-FFaFFnBDBlDBmBGB-FFqFkF~BDDCCONTROL-CONNECTIONBBSENSOR-CONTROLLER-CONNECTIONBFDB<BFBB>BFDCFLOW-PIPEBBFBÂACCUMULATOR-MAIN-INPUTFDBDBFBACCUMULATOR-MAIN-OUTPUTBFDB<BFFACCUMULATOR-METER-OUTPUTCPORT-SENSOR-INPUTBB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "DWR" :CHARACTERS NIL :QFASLP NIL :LENGTH 5001 :CREATION-DATE 2730896811 :DIRECTORY "PICON-CLASS" :NAME "SOLUTION-13" :TYPE "PIC" :VERSION 5) hưs2Dp,lFASD-DATADDWRRalphƢ-FfFDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB 1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE MAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK BMDBNSJWCNEXT-NEW-STATEMENT-NUMBERF%CFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDSOLUTION-13FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?Solution 131DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBpDBK MBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBxDBK MBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDBDBK MBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK MBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK MBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK MBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK MBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK MBMBN1DBIDBJDCDEFINITIOND BK -RBMBNÁSTATEMENT-TEXTDDC=DCFILL-TIMERNUMERICNILlet fill-timer be a numeric variableCSTATEMENT-NUMBER?FBACKTRACK-TO-GET-VALUE?B1DBIDBJDBD BK RBMBNBDDBDÁTIMER-RUNNINGCCONDITIONBlet timer-running be a named conditionBFBB-1DBIDBJDBD BK RBMBNBDDBDÁTIMER-STARTEDBBlet timer-started be a named conditionBFBB-1DBIDBJDBD BK RBMBNBDDBDCFILL-TIMEBBlet fill-time be a numeric variableBFBBSAMPLING-INTERVAL-FOR-HISTORIC-REASONS?CINDEFINITE1DBIDBJDBD BK RBMBNBDDBDTANK-IS-FILLINGBB,let tank-is-filling be a named conditionBFBB-1DBIDBJDBD BK RBMBNBDDBDÀTIMERBB,let timer be a numeric variableBFBBBB1DBIDBJDBD BK 8BMBNBDDBDCDRAIN-TIMEBBlet drain-time be a numeric variableBF BB1DBIDBJDBD BK 8BMBNBDDBDTANK-IS-DRAININGBBllet tank-is-draining be a named conditionBF"BB-1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBFFFFDDCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBeMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDIF-THEN-RULEDBK .BMBNBDDCIFBDDCINCREMENTBDF INTERVALif tank-is-draining then increment drain-time by 10 secondsBF$B-FFFFDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEF7FFFFDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTB#B-F FFFB0DB DB!B#B-B$DB%DBIDBJDB&DBK .BMDBNBWBDDB(DANDDNOTBDCISFILLING-STEPDRAININGDDSENDD,Drian time = ~6FBDDESTINATIONOPERATORDCINITIALIZEBDADVANCEBXNOT-SURElif not tank-is-draining and filling-step is draining then,send "Drian time = ***" with drain-time to operator and,initialize timer and advance step variable filling-step to not-sureBF#B-FFFFDDB=DB>BB?FFFFFDDBFDBGB#B-F FFFBjDBFDBGB#B-FFFFBkDBFDBGB#B-FFFFBlDBFDBGB#B-FFFFBmDB DB!B#B-B$DB%DBIDBJDFREE-TEXT-STATEMENTDBK 7RBMBNBl2BFB-F6FFFxDDB=DB>BB?FF6FFFxDDBFDBGB#B-F+FF#F{BDB DB!B#B-B$DB%DBIDBJDB&DBK RBMBNBDDB(DBTDBUBDBWBXFILLINGDDB\D,Fill time = ~6FBDB_B`DBcBDBeBXBf,if not tank-is-filling and filling-step is filling thensend "Fill time = ***" with fill-time to operator andBlto not-sureBFB-FFFFHDDB=DB>BB?FFFFFHDDBFDBGB#B-F FFF{BDBFDBGB#B-FFxFFkBDBFDBGB#B-FFhFF[BlDBFDBGB#B-FFXFFKBDDIFFERENTIAL-PRESSURE-LEVEL-PORT-SENSORDSENSOR-CURRENCY-INTERVALF SENSOR-TRACING-REQUESTSB-FLFRFjFpÀCLOCKDBDBF BB-FFFFCL1DACCUMULATORBFFF@FTANKDB DB!B#B-B$DB%DBIDBJDB&D BK .BMBNBDDB(DCBB?F[FFHFPF~DDBFDBGB#B-F FNFHF[B DBFDBGB#B-FF^FFkB!DBFDBGB#B-FFnF7F{B"DB DB!B#B-B$DB%DBIDBJDINITIAL-RULEDBK 8BMBNBDDCINITIALLYDDSETBDBPBDBeBXBflinitially ,set fill-time = 0 and set drain-time = 0land advance step variable filling-step to not-sureBF B-FFFFDDB=DB>BB?FFFFFDDBFDBGB#B-F FFFBXDBFDBGB#B-FFFjF BYDBFDBGB#B-FFFFBZDB DB!B#B-B$DB%DBIDBJDBDBK 7RBMBNBl3BFB-F8F8FF"DDB=DB>BB?FF8F8FF"DDBFDBGB#B-F-F2F%F%BDB DB!B#B-B$DB%DBIDBJDBDBK RBMBNBl5BFB-F7F)FF?DDB=DB>BB?FF7F)FF?DDBFDBGB#B-F,F/F$F<BDB DB!B#B-B$DB%DBIDBJDBDBK RBMBNBDDSTEP-VARIABLE-DEFINITIONBXDBfBBYlet step variable filling-step be not-sure, filling, drainingBFB-FF)F!F?DDB=DB>BB?FFF)F!F?DDBFDBGB#B-F F/FF<BDB DB!B#B-B$DB%DBIDBJDBDBK 7RBMBNBl4BFB-F8FFFDDB=DB>BB?FF8FFFDDBFDBGB#B-F-FF%FBDB DB!B#B-B$DB%DBIDBJDB&DBK 8BMBNBDDB(BDDB)BDF B+lif tank-is-filling then increment fill-time by 10 secondsBFB-FF8FF"DDB=DB>BB?FFF8FF"DDBFDBGB#B-F F2FF%BDB DB!B#B-B$DB%DBIDBJDBDBK 7RBMBNBl1BFB-F9FFFDDB=DB>BB?FF9FFFDDBFDBGB#B-F.FF&FBDB DB!B#B-B$DB%DBIDBJDB&D BK .BMBNBDDB(DC>B DBB F DDBBDBeBXBDDBBlif L1 > L1 as of 10 seconds ago then conclude tank-is-filling andadvance step variable filling-step to fillinglelse conclude not tank-is-fillingBFB%F B-FFFDFDDB=DB>BB?FFFFDFDDBFDBGB#B-F FF<FBFDBFDBGB#B-FFFFBGDBFDBGB#B-FFF+FBHDB DB!B#B-B$DB%DBIDBJDBDBK BMBNBSolution #13BFB-F>FFFDDB=DB>BB?FF>FFFDDBFDBGB#B-F3FFFBsDB DB!B#B-B$DB%DBIDBJDB&D BK QBMBNBDDB(DB<BBif CLOCK > 0 then do nothingBF B%F B-FFFFDDB=DB>BB?FFFFFDDBFDBGB#B-FFFFBDB DB!B#B-B$DB%DBIDBJDSIMULATION-STATEMENTDBK RBMBNBDDSIMULATEBBTIME,simulate clock with timeBF B-FFF3FDDB=DB>BB?FFFF3FDDBFDBGB#B-FFF;FBDB DB!B#B-B$DB%DBIDBJDBDBK QBMBNBDDBB DB(DBBF,DC+B ǀ@DB(DBBFXFKDMAXDC-B ǀL̬simulate L1 with 0 then if time < 300 then (L1 + .25) else if time < 600 then 75 else lmax (0, L1 - .15)BFB-FFKFFDDB=DB>BB?FFFKFFDDBFDBGB#B-FFQFpF^BDBFDBGB#B-FFaFFnBDBFDBGB#B-FFqFkF~BDDCFLOW-PIPEBBFBCPORT-SENSOR-INPUTFDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFDBBFBBBFDBBBFBÂACCUMULATOR-MAIN-INPUTFDBBFBACCUMULATOR-MAIN-OUTPUTBFDBBFFACCUMULATOR-METER-OUTPUTBBB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "DWR" :CHARACTERS NIL :QFASLP NIL :LENGTH 2796 :CREATION-DATE 2725588653 :DIRECTORY "PICON-CLASS" :NAME "SOLUTION-14" :TYPE "PIC" :VERSION 5) hưs2Dp,lFASD-DATADDWRRalphu.FfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB ]:1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE iSAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK ]:BMBNCNEXT-NEW-STATEMENT-NUMBERF CFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDSOLUTION-14FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?Solution 141DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBnDBK iSBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBvDBK iSBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB~DBK iSBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK iSBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK iSBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK iSBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK iSBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK iSBMBN1DBIDBJDCDEFINITIOND BK lSBMBNÁSTATEMENT-TEXTDDC=DTANK-BOILINGCCONDITIONNILlet tank-boiling be a named conditionCSTATEMENT-NUMBER?FBACKTRACK-TO-GET-VALUE?B-1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBFFFFD DCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBcMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDFREE-TEXT-STATEMENTDBK Z:BMBNBl3BF B-FFaFFKDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFFaFFKDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-F F[FFNBDBDBBB-BDBDBIDBJDIF-THEN-RULED BK Z:BMBNBDDCIFDBÁCOOLER-SWITCHDDSENDD,Turn on cooler. Tank is boiling.DDESTINATIONOPERATORlif cooler-switch = 0 then send "Turn on cooler. Tank is boiling." to operatorCSTATEMENT-KEYWORDSTANKBF B-FFaFF;DDBDBBBF4FFaFF;DDBDBBB-FF[FFNBDBDBBB-FFKFF>BDTHERMOCOUPLE-TEMPERATURE-PORT-SENSORDSENSOR-TRACING-REQUESTSB-SENSOR-ENGINEERING-UNITÀON-OFFSENSOR-CURRENCY-INTERVALFF%FFCFBDB%DB&B-F<F^FF|CT1DBDBBB-BDBDBIDBJDSIMULATION-STATEMENTDBK kSBMBNBDDSIMULATEB6BDCPICON-WAVEFFF,simulate T1 with wave with central value 200 andldeviation 25 and period 20 minutesBFB-F>F_FFDDBDBBBFF>F_FFDDBDBBB-F3FeF|FrBADBDBBB-F$FuF FBBDBDBBB-BDBDBIDBJDBDBK rSBMBNBl2BFB-FFFF}DDBDBBBFFFFF}DDBDBBB-F FFFBfDBDBBB-BDBDBIDBJDBD BK \:BMBNBDDBDBBFDDBDCooler appears to be malfunctioning.DBBlif cooler-switch = 1 then ,send "Cooler appears to be malfunctioning." to operatorBBBFB-FFFFnDDBDBBBFFFFFnDDBDBBB-FFFFBDBDBBB-FF~FFqBDBDBBB-BDBDBIDBJDBDBK rSBMBNBl1BF B-FFFFDDBDBBBFFFFFDDBDBBB-F FFFBDBDBBB-BDBDBIDBJDBD BK lSBMBNBDDBDC>B6FDDCONCLUDEBDÀFOCUSB,if T1 > 212 then conclude tank-boiling land focus on TANKBFPICON-RULE-SCAN-INTERVALFB-FFF{FDDBDBBBFFFF{FDDBDBBB-FFFsFBDBDBBB-FFFDFBDCSURGE-TANKBFFxFgFBDBDBBB-BDBDBIDBJDB8DBK oSBMBNBDDB:BDBDBB6FFsimulate COOLER-SWITCH with 0 then if T1 > 212then 1 else 0BFB-F>F1FrFWDDBDBBBFF>F1FrFWDDBDBBB-F3F7FjFDB DBDBBB-F$FGFFTB DBDBBB-BDBDBIDBJDBDBK ]:BMBNBSolution #14BFB-FBFFFDDBDBBBFFBFFFDDBDBBB-F7FFFB/DDCFLOW-PIPEBF BÂSURGE-TANK-MAIN-OUTPUTBFDBLBBFBCPORT-SENSOR-INPUTDFJFFBDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFDBXBFBBZBFDBXBF FSURGE-TANK-METER-OUTPUTBRFDBLBBF BÂSURGE-TANK-MAIN-INPUTFdB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "DWR" :CHARACTERS NIL :QFASLP NIL :LENGTH 2581 :CREATION-DATE 2725589216 :DIRECTORY "PICON-CLASS" :NAME "SOLUTION-15" :TYPE "PIC" :VERSION 4) hưs2Dp,lFASD-DATADDWRRalphu0FfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB f:1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE iSAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK f:BMBNCNEXT-NEW-STATEMENT-NUMBERF CFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDSOLUTION-15FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?Solution 151DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBnDBK iSBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBvDBK iSBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB~DBK iSBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK iSBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK iSBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK iSBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK iSBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK iSBMBN1DBIDBJDCDEFINITIOND BK lSBMBNÁSTATEMENT-TEXTDDC=DTANK-BOILINGCCONDITIONNILlet tank-boiling be a named conditionCSTATEMENT-NUMBER?FBACKTRACK-TO-GET-VALUE?B-1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBFFFFD DCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBcMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDSIMULATION-STATEMENTDBK kSBMBNBDDSIMULATECT1BDCPICON-WAVEFFF,simulate T1 with wave with central value 200 andldeviation 25 and period 20 minutesBFB-F?FlFFDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFF?FlFFDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-F4FrF{FBDBDBBB-F%FF FBDTHERMOCOUPLE-TEMPERATURE-PORT-SENSORDSENSOR-TRACING-REQUESTSB-SENSOR-ENGINEERING-UNITÀON-OFFSENSOR-CURRENCY-INTERVALFFUFFsFÁCOOLER-SWITCHDBDBB-FFaFFBDBDBBB-BDBDBIDBJDFREE-TEXT-STATEMENTDBK rSBMBNBl1BF B-F F|FFfDDBDBBBFF F|FFfDDBDBBB-FFvF FiBDBDBBB-BDBDBIDBJDBDBK rSBMBNBl2BFB-FFFFDDBDBBBFFFFFDDBDBBB-FFF FB2DBDBBB-BDBDBIDBJDIF-THEN-RULED BK e:BMBNBDDCIFDBB FDDSENDDCooler appears to be malfunctioning.DDESTINATIONOPERATORlif cooler-switch = 1 then ,send "Cooler appears to be malfunctioning." to operatorCSTATEMENT-KEYWORDSTANKSTATEMENT-CATEGORIESCHECK-COOLERBFB-FFFFDDBDBBBFFFFFDDBDBBB-FFF FB\DBDBBB-FFF F B]DBDBBB-BDBDBIDBJDBND BK e:BMBNBDDBPDC>BFDDCONCLUDEBDACTIVATEDANDDBCATEGORYBbDBASSOCIATED-UNITB`,if T1 > 212 then conclude tank-boiling and activate rules with category = check-cooler and, associated-unit = tankBFPICON-RULE-SCAN-INTERVALFB-FF|FFFDDBDBBBFFF|FFFDDBDBBB-FFvFkFiBDBDBBB-FFfFFYBDBDBBB-FFVFzFIBDBDBBB-BDBDBIDBJDBDBK f:BMBNBSolution #15BFB-FHFFFDDBDBBBFFHFFFDDBDBBB-F=FFFBDCSURGE-TANKBFFxFgFB`DBDBBB-BDBDBIDBJDBDBK oSBMBNBDDBB DBPDBBFFsimulate COOLER-SWITCH with 0 then if T1 > 212then 1 else 0BFB-F>F1FrFWDDBDBBBFF>F1FrFWDDBDBBB-F3F7FjFDBDBDBBB-F$FGFFTBDDCFLOW-PIPEBBFBCPORT-SENSOR-INPUTDF9FFDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFDBBFBBBFDBBFFSURGE-TANK-METER-OUTPUTBFDBBBFBÂSURGE-TANK-MAIN-INPUTFzDBBFBÂSURGE-TANK-MAIN-OUTPUTBFjB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "DWR" :CHARACTERS NIL :QFASLP NIL :LENGTH 2681 :CREATION-DATE 2730896893 :DIRECTORY "PICON-CLASS" :NAME "SOLUTION-17" :TYPE "PIC" :VERSION 2) hưs2Dp,lFASD-DATADDWRRalphƢ-FfFDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB 1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE SAUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK BMBNCNEXT-NEW-STATEMENT-NUMBERFCFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDSOLUTION-17FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?Solution 171DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBnDBK SBMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBvDBK SBMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB~DBK SBMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK SBMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK SBMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK SBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK SBMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK SBMBN1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMNILFFFFD DCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBcMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDFREE-TEXT-STATEMENTDBK 0:BMBNÁSTATEMENT-TEXTl3CSTATEMENT-NUMBER?FB-F'FF FDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFF'FF FDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FFFFBDBDBBB-BDBDBIDBJDBDBK 0:BMBNBl4BF B-F(FF FDDBDBBBFF(FF FDDBDBBB-FFFFBDBDBBB-BDBDBIDBJDBDBK WBMBNBl1BFB-F/FoFFYDDBDBBBFF/FoFFYDDBDBBB-F$FiFF\BDBDBBB-BDBDBIDBJDBDBK WBMBNBl2BFB-F/FHFF2DDBDBBBFF/FHFF2DDBDBBB-F$FBFF5BDBDBBB-BDBDBIDBJDIF-THEN-RULED BK 1:BMBNBDDCIFDC>CF1FdDDSET-SETPOINTB;Fyif F1 > 100 then set F1 setpoint = 121BFPICON-RULE-SCAN-INTERVALFB-F FIF\F3DDBDBBBFF FIF\F3DDBDBBB-FFCFTF6BCDBDBBB-BDBDBIDBJDB7D BK 1:BMBNBDDB9DCB;FOif F1 < 100 then set F1 setpoint = 79BFBFFB-F FpFSFZDDBDBBBFF FpFSFZDDBDBBB-FFjFKF]BjDBDBBB-BDBDBIDBJDSIMULATION-STATEMENTDBK WBMBNBDDSIMULATEB;BDCPICON-WAVEFdFF,simulate F1 with wave with central value 100 andldeviation 20 and period 8 minutesBFB-FFFFDDBDBBBFFFFFDDBDBBB-FFFFBDBDBBB-FFF<FBDBDBBB-BDBDBIDBJDBDBK WBMBNBDDBF1-4FdDCCOMPOUND-VARIABLEB;SETPOINTsimulate F1 setpoint with 100 then F1 setpointBFB-FFFFDDBDBBBFFFFFDDBDBBB-FFFFBDMAGNETIC-FLOWMETER-FLOW-THRU-SENSORDSENSOR-TRACING-REQUESTSB-FLFCFjF~B;DON-OFF-CONTROL-VALVEBFFZF{F|CV1DCR-L-1-IN-1-OUT-FEEDBACK-CONTROLLERD SETPOINT-LOW-LIMIT?FOSETPOINT-HIGH-LIMIT?FyCSETPOINT-MINIMUM-INTERVAL-BETWEEN-CHANGES?FSETPOINT-MAXIMUM-CHANGE-PER-ADJUSTMENT?F2DISPLAY-SETPOINT-VALUESB-F+FFFAF1-XDBDBBB-BDBDBIDBJDBDBK BMBNBDSolution #17 will modify this example such that F1 setpoint will be 79 if F1 is > 100, and 121 if F1 is below 100. Refer to the script ,for this exercise for more information.BFB-F>FF>FDDBDBBBFF>FF>FDDBDBBB-F3FF0FBDBDBBB-F$FF6FBDBDBBB-F$FF:FBDDCFLOW-PIPEBFBÃTHRU-SENSOR-OUTPUT-CONNECTIONBFDCCONTROL-CONNECTIONBFF SENSOR-CONTROLLER-CONNECTIONCONTROLLER-INPUTBDB&BBF BÂVALVE-INPUT-CONNECTIONFDB&BF FVALVE-OUTPUT-CONNECTIONTHRU-SENSOR-INPUT-CONNECTIONBDB+BF F CCONTROLLER-OUTPUTVALVE-CONTROL-CONNECTIONBDB+BBF BÁSETPOINT-INPUTFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "DWR" :CHARACTERS NIL :QFASLP NIL :LENGTH 2588 :CREATION-DATE 2730897247 :DIRECTORY "PICON-CLASS" :NAME "SOLUTION-3" :TYPE "PIC" :VERSION 4) hưs2Dp,lFASD-DATADDWRRalphƢe/FfFDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB 1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE ?AUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK BMBNCNEXT-NEW-STATEMENT-NUMBERFCFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDCSOLUTION-3FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?lSolution 31DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBnDBK ?BMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBvDBK ?BMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB~DBK ?BMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK lBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK ?BMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK ?BMBN1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMNILFFFFD DCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBcMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDFREE-TEXT-STATEMENTDBK BMBNÁSTATEMENT-TEXTlNo rule is requesting P1.CSTATEMENT-NUMBER?FB-FF-FFCDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFF-FFCDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FF3FF@BDBDBBB-BDBDBIDBJDBDBK BMBNBAnswer to Question in Exercise #3 on step 7.BFB-FFFF$DDBDBBBFFFFF$DDBDBBB-FFF|F!BDBDBBB-BDBDBIDBJDBDBK BMBNBDSensors weren't displaying values because there were no rules requesting values.BFB-FF&FDDBDBBBFFF&FDDBDBBB-FF FFBDBDBBB-FFFFBDBDBBB-BDBDBIDBJDBDBK BMBNBAnswer to Question in Exercise #3 on step 4.BFB-FFAFF+DDBDBBBFFFAFF+DDBDBBB-FF;F|F.B#DBDBBB-BDBDBIDBJDIF-THEN-RULED BK lBMBNBDDCIFDC>CF1FDDSENDDF1 is reading high.DDESTINATIONOPERATORlif F1 > 200 then send "F1 is reading high." to operatorBF PICON-RULE-SCAN-INTERVALFB-FFF}FpDDBDBBBFFFF}FpDDBDBBB-FFFWFBODBDBBB-FFFuFsBPDBDBBB-BDBDBIDBJDBDBK BMBNB,Solution to Exercise #3:BF B-FFF0FDDBDBBBFFFF0FDDBDBBB-FFF8FBvDBDBBB-BDBDBIDBJDBDBK BMBNBSolution #3BFB-FBFFFDDBDBBBFFBFFFDDBDBBB-F7FFFBDCGUAGE-PRESSURE-THRU-SENSORDSENSOR-TRACING-REQUESTSB-FFFFCP1DMAGNETIC-FLOWMETER-FLOW-THRU-SENSORDBB-FFFbFBCDCCENTRIFUGAL-VARIABLE-COMPUTER-PUMPBFFFFBDBDBBB-BDBDBIDBJDSIMULATION-STATEMENTDBK xlBMBNBDDSIMULATEBDMAXDC*ǀYBClsimulate P1 with 0 then max (0, .35 * F1)BF B-FFFFDDBDBBBFFFFFDDBDBBB-FF FFBDBDBBB-BDBDBIDBJDBDBK wlBMBNBDDBBCBDCPICON-WAVEFF2FX,simulate F1 with wave with central value 200 andldeviation 50 and period 10 minutesBFB-FF%FFKDDBDBBBFFF%FFKDDBDBBB-FF+FF8BDBDBBB-FF;FZFHBDDCFLOW-PIPEBFBÃTHRU-SENSOR-OUTPUT-CONNECTIONBFDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFDBBFFBTHRU-SENSOR-INPUT-CONNECTIONBDBBFBB BFDBBBF BCPUMP-CONTROLLER-CONNECTIONFDBBBF BÂPUMP-INPUT-CONNECTIONFDBBF FÂPUMP-OUTPUT-CONNECTIONB%FB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "dwr" :CHARACTERS NIL :QFASLP NIL :LENGTH 2131 :CREATION-DATE 2727457380 :DIRECTORY "PICON-CLASS" :NAME "SOLUTION-4" :TYPE "PIC" :VERSION 2) hưs2Dp,lFASD-DATADdwrRalphjFfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB 1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE ?AUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK BMBNCNEXT-NEW-STATEMENT-NUMBERFCFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDCSOLUTION-4FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?lSolution 41DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBnDBK ?BMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBvDBK ?BMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB~DBK ?BMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK lBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK ?BMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK ?BMBN1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMNILFFFFDDCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBcMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDSIMULATION-STATEMENTDBK ;BMBNÁSTATEMENT-TEXTDDSIMULATECL1BDCPICON-WAVEFdF2FX,simulate L1 with wave with central value 100 andldeviation 50 and period 10 minutesCSTATEMENT-NUMBER?FB-FF>FFdDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFFF>FFdDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FFDFFQBDBDBBB-FFTFpFaBDBDBBB-BDBDBIDBJDIF-THEN-RULED BK +;BMBNBDDCIFCL1-IS-LOWDDSENDDlL1 is reporting low at ~6FBDDESTINATIONOPERATORif l1-is-low then send "L1 is reporting low at ***" with L1 to operatorBFPICON-RULE-SCAN-INTERVALFB-FFF F"DDBDBBBFFFF F"DDBDBBB-FFFFBDBDBBB-FFFFBDBDBBB-BDBDBIDBJDBD BK !;BMBNBDDBCL1-IS-HIGHDDBDlL1 is reading high at ~6FBDBBif l1-is-high then send "L1 is reading high at ***" with L1 to operatorBFBFB-FF9F FDDBDBBBFFF9F FDDBDBBB-FF3FF&B+DBDBBB-FF#FFB,DBDBBB-BDBDBIDBJDCDEFINITIOND BK *;BMBNBDDC=DBCCONDITIONDCBFdlet condition l1-is-high = L1 > 100BFB\B-B-FFFoFuDDBDBBBFFFFoFuDDBDBBB-FFFgFxB}DDIFFERENTIAL-PRESSURE-LEVEL-PORT-SENSORDSENSOR-CURRENCY-INTERVALF(SENSOR-TRACING-REQUESTSB-FFFFBDBDBBB-BDBDBIDBJDFREE-TEXT-STATEMENTDBK *;BMBNBSolution #4BFB-FEFFFDDBDBBBFFEFFFDDBDBBB-F:FFFBDDCFLOW-PIPEBBFBCPORT-SENSOR-INPUTFDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "dwr" :CHARACTERS NIL :QFASLP NIL :LENGTH 3186 :CREATION-DATE 2727463612 :DIRECTORY "PICON-CLASS" :NAME "SOLUTION-6" :TYPE "PIC" :VERSION 2) hưs2Dp,lFASD-DATADdwrRalphFfFuDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB n1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE ?AUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK nBMBNCNEXT-NEW-STATEMENT-NUMBERF&CFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDCSOLUTION-6FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?lSolution 61DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBnDBK ?BMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBvDBK ?BMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB~DBK ?BMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK lBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK ?BMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK ?BMBN1DBIDBJDCDEFINITIOND BK b;BMBNÁSTATEMENT-TEXTDDC=DLEVEL-IS-INCREASINGCCONDITIONNILlet level-is-increasing be a named conditionCSTATEMENT-NUMBER?FBACKTRACK-TO-GET-VALUE?B-1DBIDBJDBD BK r;BMBNBDDBDLEVEL-IS-DECREASINGBBlet level-is-decreasing be a named conditionBF#BB-1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBFFFFDDCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBcMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDFREE-TEXT-STATEMENTDBK t;BMBNBl3BF%B-F$FAF FWDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFF$FAF FWDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-FFGFFTBDBDBBB-BDBDBIDBJDIF-THEN-RULEDBK t;BMBNBDDCIFBDDSENDD,The tank level is now decreasing - Check limitsDDESTINATIONOPERATOR,if level-is-decreasing then send,"The tank level is now decreasing - Check limits" to operatorBF$B-FF@FFvDDBDBBBFFF@FFvDDBDBBB-FFFF'FSBDBDBBB-FFVFFcB DBDBBB-FFfFuFsB DBDBBB-BDBDBIDBJDBDBK d;BMBNBDDBBDDBD,The tank level is now increasing - Check limitsDBB,if level-is-increasing then send,"The tank level is now increasing - Check limits" to operatorBFB-FFFF/DDBDBBBFFFFF/DDBDBBB-FFF&F B:DBDBBB-FFFFB;DBDBBB-FFFvF,B<DBDBBB-BDBDBIDBJDBDBK e;BMBNBl2BF B-F%FF FDDBDBBBFF%FF FDDBDBBB-FFFF BfDBDBBB-BDBDBIDBJDBD BK r;BMBNBDDBDC>CF1CF2DDCONCLUDEBDDBBlif F1 > F2 then conclude level-is-increasing elseconclude level-is-decreasingBFPICON-RULE-SCAN-INTERVALFB-FFAFFDDBDBBBFFFAFFDDBDBBB-FF;FF.BDBDBBB-FF+FFBDBDBBB-BDBDBIDBJDBDBK e;BMBNBl1BFB-F&FAF F+DDBDBBBFF&FAF F+DDBDBBB-FF;FF.BDMAGNETIC-FLOWMETER-FLOW-THRU-SENSORDSENSOR-TRACING-REQUESTSB-FFF FEBDDIFFERENTIAL-PRESSURE-LEVEL-PORT-SENSORDSENSOR-CURRENCY-INTERVALFBB-FFFFCL1DACCUMULATORBFQFFEFYTANKDBDBB-FFFFBDBDBBB-BDBDBIDBJDSIMULATION-STATEMENTDBK w;BMBNBDDSIMULATEBBDCPICON-WAVEFsF FhFh,simulate F1 with wave with central value 115 and,deviation 12 and period 6 minutes and phase 360BFB-FFpFFDDBDBBBFFFpFFDDBDBBB-FFvFFBDBDBBB-FFFFBDBDBBB-BDBDBIDBJDBDBK >;BMBNBDDBBF2DC+DC/DC-BBFBsimulate L1 with 50 then (F1 - F2) / 3600 + L1BFB-F FNFFdDDBDBBBFF FNFFdDDBDBBB-FFTFFaB)DBDBBB-BDBDBIDBJDBDBK w;BMBNBDDBBBDBFnFFh,simulate F2 with wave with central value 110 andldeviation 22 and period 6 minutesBFB-F FFFCDDBDBBBFF FFFCDDBDBBB-FF#FF0BLDBDBBB-FF3F"F@BMDBDBBB-BDBDBIDBJDBDBK mBMBNBSolution #6BFB-FFFFFDDBDBBBFFFFFFDDBDBBB-F;FFFBqDDCFLOW-PIPEBFBÃTHRU-SENSOR-OUTPUT-CONNECTIONBFDCCONTROL-CONNECTIONBFBSENSOR-CONTROLLER-CONNECTIONBFDBBFBBBFDBBFFACCUMULATOR-MAIN-OUTPUTTHRU-SENSOR-INPUT-CONNECTIONBDBBFFACCUMULATOR-METER-OUTPUTCPORT-SENSOR-INPUTFDBBBF BBFDBBF FBÂACCUMULATOR-MAIN-INPUTBDBBF BBBFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 16 :AUTHOR "DWR" :CHARACTERS NIL :QFASLP NIL :LENGTH 2655 :CREATION-DATE 2730897351 :DIRECTORY "PICON-CLASS" :NAME "SOLUTION-7" :TYPE "PIC" :VERSION 3) hưs2Dp,lFASD-DATADDWRRalphƢ/FfFDp,COMPILER,NEW-DESTINATIONSpGLOBALlTpB SITELMIpB ,PACKAGEPICONpB BASEF 1DSETQDATE-AND-TIME-OF-APPLICATION-KB 1DCDEABSORB-ALL-RECORDED-ABSORPTIONS1DCLEAR-KNOWLEDGE-BASE1DÂCLEAR-INFERENCE-ENGINE1DB:ALL-MENU-PARAMETERSDCRECONSTRUCT-FRAME-FROM-DESCRIPTIONDÀQUOTEDBHDÁLATEST-CHANGE ?AUTHORSDWR1DB:OVERALL-PROGRAM-PARAMETER-STRUCTUREDBIDBJDBUDBK BMBNCNEXT-NEW-STATEMENT-NUMBERF(CFUNCTION-TO-RUN-ON-RESET-COMMAND?CRESET-PICON-ENGINEFUNCTION-TO-RUN-ON-RUN-COMMAND?RUN-PICON-ENGINECSTANDARD-DIRECTORYPICON: PICON;PROTECTED-APPLICATION-KB-FILE-NAMESDCSOLUTION-7FONT-FOR-NAME-OF-PROGRAMpFONTSMETSIB-NAME-OF-PROGRAM?lSolution 71DB:ÂSUPERBLOCK-PARAMETERSDBIDBJDBnDBK ?BMBN1DB:ÂCONNECTION-PARAMETERSDBIDBJDBvDBK ?BMBN1DB:ÂTEXT-BLOCK-PARAMETERSDBIDBJDB~DBK ?BMBN1DB:DATA-SUPPLIER-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CHISTORY-PARAMETERSDBIDBJDBDBK ?BMBN1DB:CMESSAGE-PARAMETERSDBIDBJDBDBK lBMBN1DB:CPICON-SIMULATOR-PARAMETERSDBIDBJDBDBK ?BMBN1DB:RTIME-PARAMETERSDBIDBJDBDBK ?BMBN1DBIDBJDCDEFINITIOND BK b;BMBNÁSTATEMENT-TEXTDDC=DLEVEL-IS-INCREASINGCCONDITIONNILlet level-is-increasing be a named conditionCSTATEMENT-NUMBER?FBACKTRACK-TO-GET-VALUE?B-1DREPLACE-OUTERMOST-BLOCKDBIDBJDÁBLOCK-DIAGRAMBFFFFDDCGUAGE-PRESSURE-PORT-SENSORDSENSOR-TRACING-REQUESTSB-SENSOR-CURRENCY-INTERVALF FFFFPRESSUREDCSLOT-TABLEDFULL-SCALE-FONT-FOR-TEXTpBcMEDFNTB-ÂFRAMES-THIS-REPRESENTSDLISTDBIDBJDBD BK ;BMBNBDDBÁDELTA-PRESSUREDC-BDÁDELAYED-VALUEBFdelta-pressure = PRESSURE - PRESSURE as of 30 seconds agoBF'BB-B-F2FFcFDDCSLOT-CELLDSLOT-THIS-REPRESENTSBCMAXIMUM-LENGTH-FOR-A-LINEFF2FFcFDDÁTEXT-FRAGMENTDCFULL-SCALE-FONT-FOR-TEXT-FRAGMENTBB-F'FF[FBDBDBBB-FFFFBDBDBBB-BDBDBIDBJDSIMULATION-STATEMENTDBK ;BMBNBDDSIMULATEBBDCPICON-WAVEFFdFXsimulate PRESSURE with wave with central value1000 and deviation 100 and period 10 minutesBF#B-F0FFFDDBDBBBFF0FFFDDBDBBB-F%FFxFBDBDBBB-FFFuFBDBDBBB-BDBDBIDBJDFREE-TEXT-STATEMENTDBK ;BMBNBNOTE 1: use ->> with PRESSURE - PRESSURE as of 30 seconds agoBF%B-FFF6FF DDBDBBBFFFF6FF DDBDBBB-F;F0FF#B8DBDBBB-BDBDBIDBJDÁWHENEVER-RULED BK ;BMBNBDDWHENEVERBDF PSIGDDSENDD,Pressure Increase of ~6FBDDESTINATIONOPERATORDDBZD,Pressure Decrease of ~6FDABSBDB]B^whenever PRESSURE varies by 10 psig: if increase then send "Pressure Increase of ***" with, delta-pressure to operator; if decrease then send "Pressure Decrease of ***" with abs ( delta-pressure) to operatorBF$PICON-RULE-SCAN-INTERVALFB-F3F0FFDDBDBBBFF3F0FFDDBDBBB-F(F6F$FCBjDBDBBB-FFFFFSBkDBDBBB-FFVFFcBlDBDBBB-FFfFFsBmDBDBBB-FFvF*FBnDBDBBB-BDBDBIDBJDB6DBK ;BMBNBD Solution #7:l1) One of several approaches may be used here. If you wish to see values current as of the time the message displays, just call out the sensor name(s) in the "with" clause of the send (like NOTE 1).,2) Or, you may choose to store the value in a variable and just reference it at the time the message is printed. This is the wayl that the WHENEVER rule has been modified. This method has the advantage of displaying the values which corrospond to the l message rather than being out of sync.BFB-FFFFHF]DDBDBBBFFFFFHF]D DBDBBB-F;FFFBDBDBBB-F,FF%FBDBDBBB-F,FF7FBDBDBBB-F,FF@FBDBDBBB-F,FFFBDBDBBB-F,FF.FBDBDBBB-F,FFFBDBDBBB-F,F}FFpBDBDBBB-F,FmFDF`BDDCFLOW-PIPEBBBCPORT-SENSOR-INPUTFDCCONTROL-CONNECTIONBBSENSOR-CONTROLLER-CONNECTIONBFB1DFINISH-INSTALLING-KNOWLEDGELMFL(:BYTE-SIZE 8 :AUTHOR "dwr" :QFASLP NIL :LENGTH 273 :CREATION-DATE 2725668453 :CHARACTERS T :DIRECTORY "PICON-CLASS" :NAME "SQUARE-ROOT-CODE" :TYPE "LISP" :VERSION 1) ;;; -*- Mode:LISP; Package:PICON; Base:10 -*-(defun square-root (picon-variable) (let (value expiration) (multiple-value (value expiration) (get-value-of-variable picon-variable)) (if expiration(values (sqrt value) expiration) (values nil nil))))