Home

ECLiPS English Control Language Programming

image

Contents

1. Use Specifies whether a variable constant or both may be used for this parameter Required Specifies whether this parameter is required in the function call The parameters that are not required are at the end of the parameter list No parameters may be entered following one that has not been used Actual This is where the variable or constant for the parameter is entered for this particular function call Table Functions The set of table functions individual descriptions to follow allow the User to perform several functions using data in a table or array type fashion Tables in General Allof these functions work on the same tables or arrays of data A Table is a two dimen sional array of values that can be either floating point numbers float integer numbers integer sequence of characters string or binary numbers digital I O status Every element of that table must be of the same type and when the Table is defined the type of variable is established There can be a maximum number of 100 Tables each assigned a unique number from 1 to 100 These tables can be of any size determined by the number of rows and columns assigned to them until the maximum amount of memory allocated for Table use is con sumed There is 20K bytes of memory reserved for use with table functions A Table must first be defined before it can be used This is done using the four Table De fine functions The Swap_Table_Value functions named Swap_Tab
2. Now select the Display option from the menu Several types of program information can be displayed from this menu Select the Current State of a Task option and then the Mix_Station Task from the list of Tasks The display in the Terminal Log shows that the Current State is Lower_Mixer and the time ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Force Trace PLC I O 6 Now select the Force option from the menu and then Set or Modify Force List A window appears that shows all of the items forced and their current value Press lt Ins gt to add an item to the list and then select Digital Points Select the Mix er_Down_Switch and force it ON The Mix_Station Task goes to the Mix_Chemicals State notice the Mixer_Motor goes ON for 10 seconds and then the Mixer_Up_Motor comes ON Force the Mixer_Up_Switch ON and the program goes to Wait_For_Can_Re moval State and on the next scan to the PowerUp State since the Can_At_Mix input is OFF To see a history of the execution of the program select the Trace option from the menu Select the Upload Trace from Controller option to see the Trace display The top line gives the time and date of the upload Next a table of State changes is dis played showing the starting State and the resulting State and which Task with the most current State change at the top of the list The Trace display is a valuable
3. At this stage the goal is to just describe the application not force some solution Some of the independent Tasks are quite obvious others which require interaction with other Tasks are more difficult to identify at first This is usually a repetitive process where orig inal efforts must be adjusted as the outline progresses As with most activities proficien cy increases with the number of efforts If you are having trouble identifying the Tasks in your particular application please don t hesitate to call our customer support line at 800 323 3343 You may call even if you don t have a specific question but would simply like to discuss the concept of Task architecture Identify The States 3 2 Once the Tasks are determined then the States of each Task should be identified The States describe the actual condition the outputs and responses to inputs at a certain point in the control process The States form the control sequence and are really a pic ture of how this piece of the process Task should behave See the discussion of States in the State Logic Control Theory section of this manual At this point in the design stage the goal is to determine that the correct action can be accomplished with the chosen Task architecture Simply give each State a descriptive name fitting the major attribute of the activity that takes place when that State becomes active Typical State names are Send Message Add Water Raise Drill Star
4. When the State Engine is in Simulation Mode it does not communicate with the I O The State Engine does execute its program but there is no transfer of inputs or outputs To test a program in Simulation Mode digital I O and flags may be forced and analog variable values may be changed The current State of a Task may also be changed To change to normal mode with the I O System enabled choose this option again This option may not be chosen when the State Engine is executing a program Enable Disable CCM Port The CCM port is the one not designated to be the programming port When enabled the CCM port responds to commands using the CCM protocol The default state of the CCM port is disabled See the Series 90 70 State Logic Control System section for more information of the serial ports CCM Port Number Selects which serial port is the CCM port This port cannot also be the programming port Set CCM Station Address Setting the CCM station number for the State Engine gives the State Engine a number in the range 1 89 The State Engine then only responds to commands using the specified station address Enable Disable Automatic Program Execution on Power Up The default SLP response to power up is to be in halt mode If automatic execution is enabled the program starts running automatically when power is applied to the system The SLP configurations active when power was lost are still active when automatic execution is enabled The
5. e If Test_Char not_equal String Relational Term lt String Value gt equal not_equal lt String Value gt If String_Entry equal Formula 1 String Control Characters Any ASCII character can be imbedded in a String constant by using the character The is followed by the and then the two digit hexadecimal number for the ASCII character If String Input equals 01Start The previous conditional expression checks the string variable String Input to see if the characters of the string are ASCII 1 followed by the word Start Chapter 8 Reference 8 11 8 12 Current State Conditional Term The Current State Conditional is a Task Name followed by the keywords EQUAL or Not Equal and then a State Name This conditional is used to test the current State of another Task Current State Conditional lt Task Name gt equal not equal lt State Name gt e If Pump_Monitor Task is in the Backwash State Complex Conditionals Conditionals can be preceded by the NOT keyword and several can be joined by the AND or OR keywords and parenthesis can be used to change order of evaluation e IfHydraulic_Pump_Control Task is in the Over_Pressure State or Hydraulic_Pressure is above 23 56 If 1 seconds and not Temperature_Setpoint greater than 4 67 Settling_Value If Spin_Drive is ON and Pour_Ladle is not_in Pouring State or not Mold_Number above 67 Character Input Conditional
6. Conveyor Statements III Conveyor A Power Up 1 Ifacan is at the start position go to the Fill Station Wait State Fill Station Wait When the Fill Station is in the Power Up State or the Fill Station is in the Wait for Can Removal State go to the Mix Station Wait State Mix Station Wait When the Mix Station is in the Power Up State or the Mix Station is in the Wait for Can Removal State go to the Start Conveyor State Start Conveyor Run Conveyor When a can is not in the start position go to the Moving Cans State E Moving Cans Run Conveyor When a can is at the Fill Station go to the Power Up State When a can is at the Mix Station go to the Power Up State Conveyor Task Outline One item to note in these Statements is that the Start Conveyor State and Moving Cans State both specify that the conveyor be running These Statements are consistent with the idea that the actions or outputs for each State are specified in that State If an output is ON in one State it is not automatically ON in the next State but must be explicitly stated to be ON in the next State Writing the Program This section demonstrates writing the ECLiPS control program from an outline of the control application First the I O for the application are defined on paper then the actual entry of the control process is described keystroke by keystroke Identify the I O 4 8 The outline has been written in general terms de
7. Menu use the lt F2 gt key The lt Ctrl gt key plus letters refer to options from the List Menu or for Debug Mode selections for example lt Ctrl D gt lists the Digital Points de fined in the program The lt F4 gt key is used for Define Menu options the lt F5 gt key is used for the Find Menu options lt F6 gt for Add Menu options and lt F8 gt for the Text options ECLiPS Word Processing Functions A program developed using ECLiPS is simply a document of ASCII text The ECLiPS editor is fundamentally a word processor with specialized functions for editing a State Logic program The Text option offered on the Program Mode Menu is very useful for manipulating blocks of program text The Text functions are used to copy move and delete blocks These functions are very useful for manipulating blocks of the program When any of the Text functions are used the block defined is saved in memory This memory location is called the Paste Buffer The Paste Buffer always contains the last block highlighted for any of the Text operations The contents of the Paste Buffer are pasted into the program at the cursor location by pressing the lt Ctrl U gt keys The PASTE function may be used to move or copy blocks of text The PASTE function is also useful for copying blocks from one program to another ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Use the following steps to copy a block from
8. Power Up B Lower Mixer C Mix Chemicals D Raise Mixer E Wait for Can Removal III Conveyor A Power Up B Fill Station Wait C Mix Station Wait D Start Conveyor E Moving Cans Outline with All Tasks and States Identify the Statements 4 6 This section fills in the lowest and most specific level of the outline The actions and transitions of each State are identified and placed into the outline The Statements are entered for each Task in turn The Statements within the text appear in bold type Fill Station Statements There is one transition and no action in the Power Up State see sections 2 and 3 for a discussion of the terms used here The condition of the Statement is whether or not a can is at the station and the target State is the Pour Chemical 1 State The Statement for the Power Up State can be written If a can is at the Fill Station go to the Pour Chemical 1 State For the Pour Chemical 1 State the action is pouring the chemical The Statement for this action can be written Pour Chemical 1 The transition is to go to Pour Chemical 2 State when 20 pounds of chemical 1 are in the can A Statement for the transition is When the weight of the can contents is over 20 pounds go to Pour Chemical 2 State Pour Chemical 2 State is almost identical to Pour Chemical 1 State Pour Chemical 2 If the weight of the can contents is over 30 pounds then go to Wait for Can Removal State The last State Wait fo
9. PowerUp The The Current Word in Text option defines the word where the cursor is now lo cated hot key lt F4 gt The Digital Point Names and Addresses and Analog Channel Configuration and Scaling choices define only I O names The Undefined Words Throughout the Text hot key lt ALT F4 gt choice finds all of the undefined words in the program displaying them to be defined one at a time Lets start by selecting the Undefined Words Throughout the Text option The first un defined word found is Can_At_Fill a80010 Define Can_At_Fill as State Power Integer Variable is ON go to the Pour_Che Floating Point Variable String Variable Task Fill_Station State Pour_Chem_1 Open Chem_Valve_l When Fill_Weight_Input is above 20 pound State Pour_Chem_2 Open Chem_Valve_2 If Fill_Weight_Input is above 30 pounds then go to Wait_for_Can_Remova State State Wait_for_Can_Removal When Can_At_Fill is off go to PowerUp Task Mix Station State PowerUp Character Variable Analog Channel Register Variable Internal Flag Keyword Synonym Filler Word Comm Port Name PID Loop Name Task State Name Edit the Word Leave Word Undefined ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B GFK 0731B A menu now appears with choices to identify the type of word Can_At_Fill we know is a limit switch and therefore we choose Digital
10. Task Group This menu option is displayed only when the project is split into more than one Task Group The options offered on the Task Group Menu provide tools for managing the various Task Groups Make a New Task Group This option causes a new Task Group to be created Enter the name of the new Task Group and the first Task name when instructed to do so ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Remove a Task Group Use this option to delete a Task Group Select the Task Group to delete from the list of Task Groups displayed When there is only one Task Group remaining the Program Mode menu no longer offers the Task Group option and the Break Up the Project into Separate Task Groups option is again displayed on the Project menu The program text of the Task Group is erased but all of the definitions remain Give the Current Task Group a New Name This option is used to change Task Group names The name can be up to 20 characters long Change the Order of the Task Groups Normally the order of Tasks does not have any affect on the execution of the program Digital outputs are not set until the end of the scan but variable values are changed im mediately and changes to another Task s current State are made immediately so that the order that the Tasks are executed could make a difference to program results Use this option to change the order of execution of the Task Groups Sele
11. The syntax for this conditional is the keyword READ followed by a variable name This conditional is true when a character input message is completed The character input is stored in the variable listed Optionally this conditional can specify the port from which the input is received If this option is used the keyword FROM follows the variable name and then a communica tions port name is listed Another option is to receive the input from R Registers of CPU The syntax for this op tion is again to use the keyword from followed by the keyword R Register then the starting register number the keyword for and then the number of registers to read When using this option the variable receiving the data must be a string variable Each byte of the R_Registers read is stored in the string variable Character Input Read lt Variable Name gt from lt Communications Port Name gt R_Register lt Register Number gt for lt Integer Number gt Read Menu_Choice from Operator_Station Read Error_String from R_Register 46 for 20 R_Registers The first example reads data into the variable named Menu_Choice from the commu nications port named Operator_Station The second example reads 40 characters into the string variable Error_String from the 20 CPU R Registers starting at R46 ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B A GO Functional Term must always follow the charact
12. e If Count gt 5 go gt gt Greater than or equal to Operator 5 e If Count gt 5 go lt gt Not_equal Not Equal Operator 5 e If Count lt gt 5 go AND Operator for Conditional and Functional 7 Terms e If Count gt 5 AND Top_Switch is ON e Actuate Pump_5 AND Pump_6 OR OR Operator for Relational Conditional Terms Only e If Vat lt 98 degrees OR Fuel lt 12 NOT Operator for Relational Conditional gt Terms Only e If NOT Inlet_Pressure gt 100 psi Miscellaneous Keywords Keyword Synonyms Meaning Examples AM Time Suffix e If Time is past 3 00 AM go Friday Day of week number 5 e If day_of_week Friday go From Used in Read Terms to identify a port name e Read Name from Port_1 then go to the Stretch State Max_Time Used to set the maximum time diagnostic for a State e State PowerUp Max_Time 2 5 Monday Day of week number 1 e If day_of_week Monday go Not Logical NOT in a conditional expression e If not Count gt 1 or Count lt 10 go Off False Test for Digital I O for not set state Not_True Not _Tripped e If Switch is Off go On True Tripped Test for Digital I O for set state e If Switch is On go Chapter 8 Reference 8 23 O PM r Logical OR in a conditional expression e If Count gt 1 or Count lt 10 go Inactive Name of the State in Which No Actions Occur e Put the Manual Task into the Inactive State Time suffix e
13. lt M gt to get the Monitor menu Se lect the Add a New Monitor Table option and enter States for the name of the Monitor table Select the Current State of a Task option from the list of categories to monitor One at a time select each of the Task Names to monitor by highlighting the name in the list and pressing lt Enter gt Now continue to press lt Esc gt until a monitor table is dis played at the bottom of the screen Chapter 6 Online Tutorial 6 5 View Now we are ready to have the program go through its steps First lets display the pro gram Select the View option from the menu and then select the View English Text in Current Task Group option Notice lt Ctrl V gt is the hot key for this selection With the arrow key move the cursor to the word Can_At_Fill and press the lt Alt F gt key as shown in the bottom bar for functions Choose the Look up the Current Word and Display its Value option Notice the resulting window displays the word definition plus its current value This option is also invoked by pressing the hot key lt F4 gt Press lt C gt to change the value From the resulting window force Can_At_Fill ON No tice that the Fill Station Task is now in the Pour_Chem_1 State Now move the cursor to the word Chem_Valve_1 and press the hot key lt F4 gt Chem_Valve_1 is ON as it should be when Pour_Chem_1 State of the Fill_Station Task is active Now move the cursor to the Fill_Weight
14. option from the menu Select Another Task Group This option displays a list of Task Groups so another Task Group may be viewed Go to the Beginning of Another Task To go to the beginning of another task press lt F7 gt and select the Task name from a list of the defined Task names in the project The cursor will move to the beginning of the selected Task GFK 0731B Chapter 8 Reference 8 83 8 84 Look up the Current Word and Display its Value This powerful function displays the definition of the word at the cursor If the word has some value then that value is displayed and an option presented to change that value If the cursor is located on a Task name the current State of the Task is displayed and an option to change the current State is offered If the cursor is on an I O name the defini tion is displayed and from the window the current value can be forced to another value Similarly variable definitions are displayed and options presented to change those val ues Current State of Each Task This function displays the active State of every Task The display is updated twice per second providing a realistic view of the current status of the process Each Task name is displayed followed by its current State View Event Queue The Event Queue includes time stamped data about the Controller such as Run Halt Power Up Power Down Critical Run T ime Errors etc The user may view up to the last 64 entries with 6 being
15. 3000 in increments of 500 The number of States is 500 to 3000 in increments of 500 The maximum limits cannot be selected for both the number of States and number of Names for I O and variables The maximum total number for States plus names is 4500 If the ECLiPS computer does not have enough memory for the selected limits ECLiPS displays an error message and allows the Setup limits to be reselected There are two reasons to select smaller than maximum size limits for the ECLiPS setup options First ECLiPS requires less free conventional memory with lower defined limits The second reason is that ECLiPS uses a page swapping system and therefore does some operations faster when using the smaller limits If there is not enough conventional memory available to load ECLiPS the Setup screen is displayed to reconfigure ECLiPS for a smaller number of States and or variables After these quantities are changed ECLiPS is restarted Another way to deal with the problem of not enough memory to run ECLiPS is to free up conventional memory in your PC by eliminating device drivers and Terminate and Stay Resident TSR programs by changing your CONFIG SYS and AUTOEXEC BAT files If you are using DOS 5 x loading DOS HIGH also frees up additional conventional memory To use the maximum settings for the number of States and Variables DOS must be loaded into high memory area ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0
16. GENERAL 8 1 ThisAgreementshallbe governed by the laws ofthe State of Virginia without regard to its conflictoflaw provisions The provisions of the United Nations C onvention on the Internationals aleof Goods shall not apply to this Agreement Shouldyou have any questions concerning this Agreement youmaycontactGE by writing to GE PO Box 8106 Charlottesville VA 22906 YOUACKNOWLEDGETHAT YOU HAVEREADTHISAGREEMENT UNDERSTANDIT ANDAGREE TO BEBOUND BY ITS TERMS ANDCONDITIONS YOUFURTHER AGREE THAT IT IS THE COMPLETE ANDEXCLUSIVESTATEMENT OF THE AGREEMENT BETWEEN US AND SUPERSEDES ANY PRO POSALOR PRIOR AGREEMENT ORAL OR WRITTEN AND ANY OTHER COMMUNICATIONS BE TWEENUS RELATINGTOTHESUBJ ECTMATTEROFTHISAGREEMENT FURTHER NOCHANGEOR AMENDMENTTO THIS AGREEMENT SHALL BE EFFECTIVE UNLESS AGREED TO BY WRITTEN INSTRUMENTSIGNED BY A DULY AUTHORIZEBEPRESENTATIVEOFGE GFK 0731B Chapter 1 Overview GFK 0731B Getting Started This section has general foundational information about the ECLiPS software product There is a general overview of the product instructions on using this manual installa tion procedures hardware requirements and sources of information about using ECLiPS ECLiPS stands for English Control Language Programming System ECLiPS is a com plete environment programming tool and on line debugger for creating and monitor ing State Logic type control programs using natural English terms phr
17. Guide March 1998 GFK 0731B Developing State Logic Programs with ECLIPS Developing State Logic programs can be characterized as entering a description of your control system into a template The template is the Finite State Machine model built into the State Engine in the control hardware ECLiPS is a tool and framework for entering that description into the template ECLiPS will provide all of the commands and tools you will need to load virtually any control application into the State Logic template The primary element of the template s structure is the TASK Each Task can be subdi vided into an unlimited number of States The I O related activity and State change rules are described in each State with a collection of STATEMENTS Statements are the ECLiPS command set you use to describe what you want to have happen at each State of each Task In ECLiPS Statements are normal English words phrases or sentences An unlimited number of Statements can be used in any State Therefore State Logic programs are a hierarchy of TASKS subdivided by STATES de scribed by STATEMENTS TASK Drill TASK NAME State Drill_Advancing STATE NAME Turn Fwd_Solenoid on After 3 seconds start Drill_Motor When Fwd_Limit_Switch is tripped go to Retracting State Go to Send_Message_1 if 17 seconds pass STATEMENT State Retracting Actuate Rev_Solenoid STATEMENT When Home_ Switch is tripped go to the Increment_Counter State State Increment_Coun
18. List lt Enter gt Write the Name into the Program or lt gt gt Edit the Name and or Configura tion Data a80025 States Tasks Diagnostics Perform Functions 1 0 Variables Keywords PID Loops Comm Ports Register Variables Numeric Integer and Float Variables String and Character Variables Keywords and Synonyms Filler Words Internal Flags PID Loops and Initial Values PID Loop Parameters Communication Ports Mathematical Functions SIN COS Etc Reserved System Variables Figure 8 9 List Menu Digital Points This option lists in alphabetical order all of the discrete points defined for the program The list includes the name the type I Q M G T S SA SB SC and the number This list may be modified by adding deleting or editing existing names Analog Channels Allof the analog channel names are listed along with the analog type AI AQ and the number that identifies each channel This list may be modified by adding deleting or editing existing names The block type and configuration for each channel may also ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B be edited here When an analog channel is defined or changed that channel can be scaled changing the raw values to engineering unit values Register Variables Allof the Register variables are listed along with the R register numbers and whether the type is integer
19. Point from the menu Next a form is displayed to identify how this digital point is stored and accessed in the CPU of the Series 90 control system a80011 Circuit Name Can_At_Fill Discrete type 1 Number 1 512 Input or Output State Wait_for_Can_Removal When Can_At_Fill is off go to PowerUp Task Mix_Station State PowerUp Fill in the form as shown in the I O Data Screen above The name is displayed for the first option The second option is the discrete type Press any key and a list of all of the types is displayed Select I for the Can_At_Fill input by highlighting the I option and pressing lt Enter gt Now enter 1 for the number of this I discrete point Next select Input for the Input Output option Inputs can be tested and outputs can be either tested or changed The mapping of the discrete types to physical hardware I O modules is accomplished by the configuration of the CPU with the Logicmaster 90 software package See the section on CPU Configuration in the Debug Mode Tutorial Section of this manual or you can find CPU configuration information in the Reference section The next undefined word Chem_Valve_1 is now displayed Again define Chem_Valve_1 as a digital point but make it a Q discrete type number 1 and Output With respect to the CPU l s are inputs and Q s outputs After completing the definition of Chem_Valve_1 digital point ECLiPS finds Fill_Weight_Input as the next
20. System part check the Table of Contents for the Reference section 6 2 ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B 6 Enable Outputs and Start Program Running During program execution the CPU must be in run mode with the outputs enabled Use Logicmaster 90 to set the status of the CPU before executing the State Logic program To start the Series 90 70 CPU running the outputs with output scanning enabled follow these steps from the Logicmaster 90 first screen 1 Press lt F2 gt for the configuration package Press lt F3 gt for the PLC Control and Status Screen Press lt F1 gt for the RUN STOP PLC Screen Pe E Press lt TAB gt until RUN OUT EN is displayed in the highlighted block DownLoad a Program To download a completed program to the State Engine the ECLiPS computer must be connected with a serial cable to the SLP programmimg port which is port 1 by default Use the serial cable included with ECLiPS along with the appropriate adaptors for your system To download the program choose the PROJECT choice from the Program Mode menu then the Download Project to the Controller option ECLiPS now provides the option of checking the program for undefined words Choose either yes or no If there are any errors in the program a message is displayed in the bottom bar of the screen Use lt Alt F gt to access help information describing the error Follow this procedure to do
21. Task o a ae to Another Last aoe Error Task lt F8 gt Marka Block a Block CopyaBlock a Block Move Move Block Remove a Remove a Block SS PEEN ExitForm pak y Frame Loop in Form lt F10 gt Toggle Program Debug Modes Hot Key Definitions 8 44 ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Miscellaneous Key Definitions Deletes RemoweiCutCharactermem OOOO Homes Leftsdeorsacened OOOO Right side of Screen Field Ie pal sUpe Uptime o Doms Domim OOOO C Rigs Rim Chre OOO Se ee lt Tab gt Insert 4 spaces Next Item in a List Menu Carriage Return Select Item Caneel Operation Series 90 70 State Logic Control System This section describes the Series 90 70 State Logic control system using the State Logic Processor SLP Descriptions include the SLP CPU interface how to setup your system serial port setup and scanning considerations SLP CPU Interface ECLiPS programs execute in the State Logic Processor SLP The SLP is a module with the State Engine operating system imbedded that plugs into one of the slots of a Series 90 70 PLC chassis The CPU is the direct interface to the I O and other VME products used in the control system The SLP accesses the CPU memory to use the system I O and communicate to other VME modules Communication between the SLP and CPU is across the Series 90 70 backplane This section describes the CPU memory acces
22. a ee Indicates that the term before or after may be used at this point Group Terms Together Language Structure Notational Conventions Program Hierarchy TST Task lt Task Name gt lt State gt State lt State Name gt lt Statement gt Statement lt Conditional Expression gt lt Functional Expression gt lt Functional Expression gt lt Conditional Expression gt 8 16 ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Functional Structures Syntax Functional Expression Functional Term Functional Term lt Turn On Discretes Term gt lt Assign Values Term gt lt Change Active States Term gt lt Send Serial Information Term gt lt PID Control Term gt lt Change Serial Port Configuration Term gt lt Execute Perform Functions Term gt Turn On Discrete Term Actuate lt Digital I O Name gt lt Internal Flag Name gt Assign Values Term lt Make Term gt lt Math Assignment Term gt lt Set_Bit Clear_Bit Term gt Make Term Make lt Numeric Assignment Term gt lt Character Assignment Term gt lt String Assignment Term gt Numeric Assignment Term lt Numeric Variable Name gt lt Analog I O Name gt equal lt Numeric Value gt Character Assignment Term lt Character Variable Name gt equal lt Character Value gt String Assignment Term lt String Variable Name gt
23. activated and Alarm be comes the active State Any other State may test this flag to instantly see whether there is a smoke alarm activated Creating Process Diagnostics GFK 0731B One of the advantages of using the Adatek State engine approach to control is the ease with which on line process diagnostics can be added to the control program Because the control program describes the process any aberrations to the normal process can be detected and a response pre programmed Creating Diagnostic Routines The diagnostics can be added as Statements inside of States in Control Tasks or whole new States within the Tasks or as complete new Tasks If the desired response to an abnormal occurrence is simply a message or closing a digi tal output to turn on a light or sound an alarm then that condition should be inserted as a Conditional Term in the appropriate Task If Tank_Pressure exceeds 90 psi then write OVER PRESSURE CONDITION to the Operator and turn on the Alarm and go to the Alarm_Light State If the occurrence of the condition needs to trigger a more elaborate response or if it should alter the normal sequence of operation then a Conditional Term should be in serted that is followed by a go to instruction that transfers the Task to a State where the diagnostic procedure takes over If the occurrence can happen in multiple States then a separate Task that checks for the occurrence and forces the control State into
24. and used throughout the program 2 Task and State names are typed in all upper case 3 Standardize abbreviations such as LS for limit switch LT for light etc Comments Comments should be used in the program to clarify confusing or complex logic To in sert a comment in the program simple type an exclamation mark followed by the comment ECLiPS ignores any text following the exclamation mark on that line Com ments may be inserted after any program lines or take up an entire program line Program Scan The State Engine operating system is a scanning system The scan cycle starts at the start of the program scanning the active State of every Task During program execution there is always one and only one State active in each Task The operating system completes a scan of the program hundreds of times every second During the scan of the active State of a Task each Statement of the State is scanned in the order that it appears Keep in mind that a Statement is a series of Terms terminated by a period TASK 1 a80002 State 1 Statement 1 State 2 Statement 1 L y Statement 2 State 3 Statement 1 TASK 2 State 1 Statement iene Statement 274 L Statement 3 State 2 Statement 1 TASK 3 Figure 5 1 Program Scan GFK 0731B Chapter 5 Helpful Hints 5 7 5 8 The actions specified by Functional Terms are executed when the Term is scanned Each Statement must have at least one Functional Term C
25. available from different key combinations To make changes to I O names and specifications choose the LIST option from the menu then select DIGITAL or ANALOG Next highlight the I O name from the list and press the right arrow key gt At this point the name and all of the specifications for the I O point may be changed ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Program the Mix Station Task GFK 0731B The tutorial continues by programming the Mixing Station Task of the example On power up the mix station is waiting for a can to arrive The limit switch Can_At_Mix senses when a can is in place After this switch is on the mixer is lowered by turning the Mixer_Down_Motor digital output on When the mixer is in mixing position which is sensed by the Mixer_Down_Switch the Mixer_Motor is turned on for 10 seconds The mixer is then raised by turning Mixer_Up_Motor on When the Mixer_Up_Switch is on the mixer stops rising The mixer waits for the can to be removed and another one to be set in place to repeat the operation Start programming this Task by first choosing the ADD option from the menu Enter Mix_Station for the Task name Add the rest of the Task as it appears in the following screen a80012 Task Mix_Station State PowerUp If Can_At_Mix is tripped go to the Lower_Mixer State State Lower_Mixer Max_Time 20 Turn on the Mixer_Down_Motor until the Mixer_Down
26. discrete outputs are OFF by default their normal condition Outputs are only ON if they are being turned ON by a program Statement in an active State This arrangement enables the State Logic model to have a one to one correspondence between the control program and the real world States in the program exactly reflect the States of the machine being controlled There are other direct benefits of the outputs being OFF by default While writing the State Logic program the programmer need not be concerned with turning any outputs OFE Having to be concerned with turning outputs OFF adds much complexity not to mention a great deal of logic to a control program Another feature of this arrangement appears when troubleshooting or debugging an executing program To see which outputs are ON at any point in time one only need check the State definitions of the active States of each Task Any outputs set ON in these States are ON and all others are OFF Outputs are turned on by using the keyword Start or any of the synonyms such as Turn_On Energize Actuate etc Outputs are turned off when another State that does NOT turn on the output becomes active An example is listed below GFK 0731B 5 1 Task Drill_Press_1 State PowerUp If Clamp1 and part_in_place are true go to Advancing State Advancing Turn_On Forward_Motor When Drilll_Forward_LS is true then Go to Retracting State Retracting Turn_On Reverse_Motor When Drilll_Home_L5S is
27. discusses the setup of the Series 90 70 control system then each of the menu options is explained and finally the ECLiPS specifications are displayed Language Description This section describes the details of using English to create a control program The de tailed information describes how to structure the English program using keywords filler words names references to I O programming PID Loops grammatical rules and special perform functions Program Structure GFK 0731B There is a hierarchy in the structure of an ECLiPS program Each program is divided into one or more Tasks each Task is divided into one or more States etc The figure below lists each element of the hierarchy in descending order of significance Program Task State Statement Expression Term Word ECLiPS Program Hierarchy This hierarchy of Tasks States and Statements are explained in sections 2 and 3 of this manual A program is a collection of Tasks and Tasks are a collection of States which describe a sequence of actions There may be many Tasks all executing simultaneously Each State is described by one or more Statements and each Statement consists of Expressions Expressions are constructed from Terms which are composed of words In the program each Task begins with the keyword Task followed by a colon then a Task Name Task Assembly Each Task includes all of the States from the start of the Task to the beginning of the ne
28. discussion of the State Engine scan procedure Interaction Between Tasks GFK 0731B Returning to the automobile engine State Logic model we can see that we could de scribe the entire range of actions of an automobile engine as a collection of Tasks Fur ther we can identify the different States through which each individual Task could pass during operation Further we should be able to see how we could use Statements to describe all of the actions possible for each State and the input conditions that would dictate which of the possibilities would actually happen But the engine wouldn t work unless we synchronized the timing of Task s execution with one another The Starting System can work perfectly but if the Fuel System Task doesn t provide a squirt of gas into the cylinder during the time the Starting System Task is in the Starting State the engine won t run The same is true of the Electrical System Chapter 2 State Logic Control Theory 2 9 2 10 Task which needs to provide voltage to the spark plug at the right time in relation to the Fuel System Task Mechanical System Task and Starting System Task if the engine is to start running AllTasks have two natural synchronization points PowerUp and Shutdown In between the Tasks will execute based on their own instructions and without regard to the other Tasks unless the program developer instructs the Task to do otherwise Joining the Tasks in time at various points in th
29. entered at the keyboard are printed in bold italics e Allreferences to individual keys are enclosed in angle brackets lt gt e Sample program lines to show examples but not necessarily entered into your computer are displayed in a box a e Displays showing computer screens are all captures of actual ECLiPS displays with rounded corners on the surrounding box References to menu options appear between double quote marks Make a New Project Brief Description of the Manual Sections 1 Getting Started Getting Started is the section you are now reading Getting Started tells you how to install ECLiPS on your DOS based computer and other particulars related to accessing information 2 State Logic Control Theory ECLiPS is an interface that allows you to tap into the substantial power and flexibility of State Logic control This section provides some basics about the underlying concepts and philosophy of State Logic Control Regardless of what you may already know about State Logic it is extremely important that you read this section carefully 3 Creating an ECLiPS Control Program This section explains how a control application is programmed using ECLiPS 4 Programming Tutorial This section walks you through the creation of a simple application programmed in State Logic with ECLiPS 1 2 ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B 5 Helpful Hints This section contains i
30. equal lt String Value gt Math Assignment Term lt Add Term gt lt Subtract Term gt lt Multiply Term gt lt Divide Term gt Add Term Add lt Numeric Constant gt lt Variable Name gt lt Variable Name gt Subtract Term Subtract lt Numeric Constant gt lt Variable Name gt lt Variable Name gt Multiply Term Multiply lt Variable Name gt lt Numeric Constant gt lt Variable Name gt Divide Term Divide lt Variable Name gt lt Numeric Constant gt lt Variable Name gt Set_Bit Clear_Bit Term Set Bit Clear Bit lt Integer Variable Name gt lt Integer Number gt Change State Term Go lt State Name gt Make lt Task Name gt equal lt State Name gt Suspend Task Resume Task lt Task Name gt Send Serial Data Term Write lt Serial Data gt lt Port Name gt R Register lt Number gt PID Loop Control Term lt Start PID Term gt lt Stop PID Term gt Start _PID Term Start PID lt PID Loop Name gt Stop _PID Term Stop Pid lt PID Loop Name gt with lt Numeric Constant gt Port Configuration Term Set Commport lt Port Name gt lt Parameter Value List gt Perform Function Term Perform lt Function Name gt with lt P arameter lue List gt GFK 0731B Chapter 8 Reference 8 17 8 18 Conditional Structures Conditional Expression lt Test Conditional gt lt Character Input Conditional gt Charac
31. floating point value is converted to an integer value observing the following rules 1 All values are rounded to the nearest number 2 Values outside the integer range are clipped to 32768 or 32767 Floating point operations require more time to perform than integer operations There fore refrain from floating point operations as much as possible if response time is critical to your application Numeric Value lt Numeric Constant gt lt Calculation gt lt Numeric Variable Name gt lt Analog I O Name gt lt PID Value gt Calculation lt Numeric Value gt lt Operator gt lt Numeric Value gt lt System Functions gt lt Numeric Value gt System Functions SIN COS TAN ARCTAN SQRT EXP LN RANDOM Numeric Constant lt Floating Point Number gt lt Integer Number gt PID Value lt PID Loop Name gt lt PID Parameter Keyword gt Character Value lt Character Variable Name gt lt Character gt String Value lt String Variable Name gt lt Character String gt Up to 80 characters GFK 0731B Chapter 8 Reference 8 15 Language Structure Summary Notational Conventions The following notational conventions are used throughout this section to rigorously de fine the required structure Identifies Keywords Encloses terms which are optional Encloses terms which may be repeated Encloses a generic description of a term
32. hele ea one alain ds ested Using the System Clock 6 eens Standard Predefined Keyword Set 0 60 c cece eee Filler Words 4 2 6 atic eked We eM heen ne eee ea ee A Rs PID EOOpS orosta ppi Pile acest nee ata ae ea nah ee ee aa E eat Perform FUNCHONS eneit nepie sea wary Ree aa bet anaes bea eet ane teeta Perform Function Forms 0 Specialized Perform Functions 6666s Keyboard Definitions 0 0 0 6 0 eee ees Series 90 70 State Logic Control System 6 6 SIP CPU et lace rona T beat dnc dea E A e RA neti ET eee How to Setup Your System 6 eee eee Serial POLS estas tt BAN io Son na Sh a ed elie hat a Miho as Analog Scaling and Update Rates 666s State Engine Scan Considerations sunsu cece eee eee eee Other State Engine Setup Options 6 66 e eee eee eee Making a Permanent Copy of the Terminal Log Simulation Mode erra riada ei e cece eee eee Setting the System Clock se ae eee eee ee ECLiPS Menu System sirier rtu enh e aa E AE Ea E E EE a Program Mode terssi onre E AR EE A teed O estes tales Debug Mode ci 09 tani eraa EE A E E E KEE tag da ERE a ei Online Modify 6 666 i ae a e E Setup and ECLIPS Memory Usage 6c c eee c eee CUE ee tere nies cad eke te cttt oe E tes E ae sot ibe ien Specifications a eea esas ce Died Rebel ease eee ee de ECLiPS English Control Language Programming System User s G
33. in the R registers in the CPU of the system Use R Registers to store information that needs to be used by the CPU ladder program or some other device that accesses the CPU memory The R Register variables can be designated to be either integer or floating point type An integer R_Register variable uses one R register and a floating point R Register variable uses two R registers Floating point and Integer Variables are stored in SLP memory locations Use these variables when the values are used only in the SLP program ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Numerical Data Types There are two numerical data types integer and floating point Integer data is limited to the range of 32768 to 32767 Floating point data is limited to the range of 1 2E 38 to 3 4E 38 with an effective precision of seven decimal digits Integer constants are whole numbers in the range 32768 to 32767 Integer constants can be specified in hexadecimal format by preceding the number with ie 77FE Floating point constants are numbers using decimal points numbers outside the range for integers or numbers using scientific notation Data types maybe mixed freely within expressions If any of the operations in an expres sion require floating point notation all of the data elements are converted to floating point values Ifa floating point value is assigned to a variable of integer variable type the
34. in the Terminal Log These messages may be operator instructions or menus for the operator to enter information into the control program Allerror messages are written into the terminal log with the time that the event occurs This is an important record of events for troubleshooting or debugging a program be cause messages displayed in the Run T ime Error window overwrite the previous mes sage so that messages may be lost before they can be noted in this window The Terminal Log also records together with the current time the response of the State Engine to the Debug Mode commands Display Change and Force The first message is displayed at the top of this window with the next messages appear ing below the previous ones The oldest messages scroll out the top of the window when the window fills Messages scrolled off the screen can still be viewed by pressing the up arrow key After scrolling you must press lt End gt to exit the scroll mode and again have access to the Debug Mode menu 6 4 ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B 6 Error and Status Windows There are two windows on the line below the Terminal Log window The one on the left displays any run time error messages such as a divide by zero message or an open circuit fault message Notice that the error message is cleared by pressing lt Ctrl R gt The smaller window on the right displays the current status of the c
35. is a combination of conditions such as If Motor_A is on and the Red_Clamp is closed or If Motor_A and Main_Conveyor is on There may be many Functional and Conditional Terms in a Statement Using Keywords Synonyms and Filler Words 3 6 Keywords are the words in a Statement that ECLiPS recognizes as instructions to per form some function Keyword can be words that cause an action such as the word ac tuate when applied to a contact output Or they can cause a conditional comparison such as the word if or be part of the comparison such as the symbol gt ECLiPS comes with default keywords assigned Some of these keywords also have syn onyms defined Using a synonym in the program is the same as using a keyword A detailed list of all the keywords are given in the reference section and described in detail ECLiPS also comes with several filler words such as the or a defined Filler words have no meaning to the control program The sole purpose of filler words is to make ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B program Statements more readable and understandable The user can place filler words anywhere in the Statement Commas and other punctuation may also be used for clarity without effecting program execution The only punctuation which has meaning is the period and the exclamation mark The exclamation mark is used to document or add comm
36. main menu of the Logicmaster 90 configuration software press I O lt F1 gt The screen displays a representation of the modules in a rack To add an SLP to the con figuration highlight the desired slot then press Other lt F8 gt and then PCM lt F1 gt Now press Zoom lt F10 gt to view the current configuration Press lt Enter gt to enter the highlighted catalog number and display the PCM detail screen Now set the Configuration Mode to NONE for the 90 70 SLP First highlight the Config Mode option and repeatedly press the lt Tab gt key until NONE is displayed on the screen The serial ports are under program control and the parameters are initialized by the State Logic Processor Now press the lt Esc gt key to save the configuration and return to the rack display The display should now show a PCM in the correct slot Send the configuration to the PLC CPU and the configuration is complete Enter the Initialization Ladder Program Because many of the CPU memory types are retentive hold their value over a power outage there must be a Ladder Logic program in the CPU which clears memory loca tions on power up so that outputs that are ON when power is lost are not ON again when power returns The program to clear the memory locations is included on the ECLiPS distribution disks Follow the instructions in the Reference Section of this manu al on Clearing Outputs on Power Up This section is in the Series 90 70 State Logic Con trol
37. menu also allow the highlighted element to be entered directly into the program at the current cursor location when the lt Enter gt key is pressed GFK 0731B Chapter 5 Helpful Hints 5 11 Chapter 6 Online Tutorial This section is a tutorial that explains the steps necessary to get a control program run ning in the State Logic Processor This section covers configuring the Series 90 70 CPU with Logicmaster 90 and how to load execute monitor and interact with an ECLiPS control program To demonstrate these features this section uses the Conveyor program completed in the Programming Tutorial section of this manual The I O definitions of this program may have to be changed to be consistent with available I O hardware or the simulation mode can be used to run the program without being attached to any I O hardware Most of the explanations of this section describe the use of ECLiPS s Debug Mode To view in ECLiPS all of the topics of this section ECLiPS must be connected to a Series 90 70 State Logic Processor through the programming port Not all of the Debug Mode options are discussed in this section For a thorough explanation of all Debug Mode menu options see the Debug Mode part of the Reference Section of this manual Setting Up the Series 90 70 State Logic Control System The first step in getting your control program executing in the Series 90 70 State Logic control system is to setup the CPU of the system Use Logicmaster
38. of the first parameter for the loop The loop CCM numbers will be in multiples of 21 so that if the first loop is 4001 the second is 4022 The order of the parameters is listed in the following table 8 60 ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B GFK 0731B ee o a o a em ooo f o gt oa Be ooo fo oa ooa e ooo fo o ooa Poes vee j 9 if_id DA a DAC PY C ff id CvMinimm PY Seim PY soo ooo f e ooa Twe f e o a rine o a Pd mein PY C a aime o a o a amean P A AY A A A A A ee ee Table 8 2 PID Parameter Table The Status parameter is the only one that is not a floating point value represented in IEEE format This parameter has information about the PID loop operation contained in the lowest 4 bits of the value of this register as follows Bit 0 Block Down Bit 1 Block Up Bit 2 Track Mode Bit 3 Inverse Mode If the bits are set the corresponding status is true The other bits are reserved and should not be changed If the minimum and maximum values of a parameter equal 0 the parameter is consid ered to be a percentage in the range of 0 0 to 100 0 Otherwise the minimum and maximum values are used with the parameter value to calculate of percentage used in the PID calculations Chapter 8 Reference 8 61 Analog Scaling and Update Rates Analog modules transfer raw numerical integer values to PLCs Each increment repre sents a step on the full ran
39. one Task Group is required Enter the name of the new Task Group and first Task of the group when prompted to do so When a project exists in more than one Task Group another option is displayed on the Program Mode menu Task Group and this option no longer appears on the Proj ect Menu Text These are typical block manipulation functions found in most text editors When this option is selected the indicator word BLOCK is displayed in the top bar of the screen ECLiPS is now ready for you to select a block of text for manipulation Use the cursor keys to highlight the block of text to be manipulated The lt Enter gt key is used to com plete the operation The operation may also be terminated at any time by pressing lt Esc gt Copy the Selected Block of Text This function copies a selected block of text from one location to another point in the text Move the Selected Block of Text This function moves a selected block of text from one location to another point in the text Remove the Selected Block of Text This function removes a selected block of text permanently It is possible however to undo the last removal by pressing lt Ctrl U gt Perform Multiple Copies of the Selected Block This function copies a selected block of text from one location any number of other points in the text Move the cursor to each location for another copy and press lt Enter gt This operation is terminated by pressing lt Esc gt
40. one program to another program Press lt F8 gt the Hot Key for the Text functions e Highlight the desired block by using the cursor movement keys e Press the lt Enter gt key and choose the COPY option from the menu e Press the lt Esc gt key to cancel the operation the paste buffer now e hasa copy of the block e Load another program into ECLiPS e Press lt Ctrl U gt to enter a copy of the block at the cursor location How to Use ECLIiPS Lists ECLiPS uses lists to display the elements of the control program including I O points keywords filler words and variable names The arrow keys and the lt Page Up gt and lt Page Down gt keys are used to move through the list Also use lt Ctrl End gt and lt Ctrl Home gt to move to the end or the start of the list The elements of the list are displayed in alphabetical order One method to quickly find an element is to enter the letters of the element When a letter key is pressed the first element starting with that letter is highlighted Pressing another letter key causes the first element starting with those two letters to be highlighted It is possible to enter all of the letters of the element to highlight it but usually a few letters brings the highlight close to the target element Generally the lt Ins gt key is used to add the lt Del gt key to delete and the lt Esc gt key to exit the list Lists displayed using the List option from the Program Mode main
41. operator_panel and go to the PowerUp State If main_tank pressure is more than 250 psi go to the Issue_Warning State State Issue Warning Write PRESSURE ABOVE NORMAL Go to the Pinpoint_Problem State State Pinpoint_Problem If Plant_Overview Task is in the Start Up State and Pump_One is on write MAIN PUMP ON DURING START UP SHUTDOWN WILL BEGIN IN 30 SECONDS to the Plant_Alert_Board and go to the ShutDown State If the Normal_Run State of the Pressure_Control Task is active and the Relief_Valve is true write Main Tank pressure relief valve is probably jammed to Terminal_3 State ShutDown When 30 seconds have passed go to the Begin Shutdown State Example Diagnostic Task 2 12 ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Chapter Creating A Control Program 3 This section presents the fundamental concepts of how a control program can be built using ECLiPS Every designer will develop his own style in using ECLiPS ECLiPS is designed to support and even to encourage personal or corporate program development styles Initially however it is suggested that the following procedure be followed in creating your first control system program with ECLiPS This procedure is split into two steps 1 Outline the Application 2 Write the Program Outline the Application In this step the control problem is analyzed using a top down design strategy where the components
42. project For this option the ladder program uses VME reads and writes to move information between the SLP and CPU 3 To doa powerup initialization of the CPU Q outputs Since the Q data area is retentive this rung of logic is necessary to turn OFF Q outputs that might have been ON before power is lost to the system 4 To perform the functions of a watchdog timer which detects whether the SLP is functioning properly If the SLP stops functioning the Series 90 system is stopped These rungs must be used in conjunction with the watchdog Task in the State Logic program When the Make a New Project option is selected from the Project menu ECLiPS offers to enter the watchdog Task automatically This Task may be added to a project at any time by importing the Watchdog project located in the ECLIPS S90 70 directory It is strongly advised that this watchdog setup be used because the system may not behave as expected if the SLP fails or stops communicating with the CPU The watchdog system assures that the control system is stopped if the SLP stops executing properly Ladder Logic program files for performing the necessary CPU functions have been in cluded with the ECLiPS distribution disks These files are on ECLiPS distribution disk 2 To select the right file for your application determine the interface method and CPU for the system and then refer to the following table Interface Type 731 CPU 771 CPU 781 CPU CO 731 SDE CO 7
43. search the entire file the user may first press lt Ctrl Home gt to go to the start of the program before using the FIND function Replace a Text String with Another This function allows a user to replace a single occurrence of a particular string with another The string to be replaced is entered first then the replacement string is entered Aconfirmation box is displayed before the replacement takes place Replace All Occurrences of a Text String This function replaces all occurrences of the entered string with the replacement string without prompting the user for confirmation Perform the Next Find or Replace This function uses the previously entered find and replacement strings If no previous find or replace has been initiated this function executes as the Replace function de scribed above ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B GFK 0731B Go to the Beginning of Another Task This function allows the user to enter the name of any Task The cursor is then placed at the start of that Task Go to the Last Project Error This function places the cursor on the line where the last project error was found during the last Send or Check for Errors After being placed at the occurrence of the error the user may move freely about the file The error message is also displayed once again on the bottom line of the screen Project This menu contains project management functions nee
44. steps necessary to get a control program running in the State Logic Processor This chapter covers con figuring the Series 90 70 CPU with Logicmaster 90 and how to load execute monitor and interact with an ECLiPS control program Chapter 7 Creating Program Documentation This chapter describes how to use the ECLiPS program documentation features The topics covered are printing program doc umentation including the English program I O map Data Listing Task and State listing and Cross Reference Listing Printing information for using the CCM protocol and docu menting the ECLiPS program are also covered Chapter 8 Reference This chapter is designed to provide information about the de tails of the ECLiPS control language and how to use the ECLiPS software package The chapter starts with a description of the State Logic Language and Keywords then dis cusses the setup of the Series 90 70 control system then each of the menu options is explained and finally the ECLiPS specifications are displayed State Logic is a registered trademark of Adatek Inc Preface We Welcome Your Comments and Suggestions At GE Intelligent Platforms we strive to produce quality technical documentation After you have used this manual please take a few moments to complete and return the Reader s Comment Card located on the next page vi ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Contents Ch
45. the diagnostic State may be the best way to perform the on line diagnostic Because the control program written in ECLiPS is self descriptive and each State de scribes what should be happening and what should happen next it is easy to insert diag nostics after the control program is finished Chapter 2 State Logic Control Theory 2 11 In addition to the ability to add diagnostic logic with Statements States and diagnostic Tasks ECLiPS also contains several functions to help the user automate the process of adding them There are three primary techniques for adding diagnostic capability to a State Logic con trol program 1 Each time a new State is added the user is given the opportunity to enter a maximum time for which that State can be active The maximum time selected will be shown automatically in the program after the State name 2 An add diagnostics choice is available from the menu If selected the user will be given a choice of the type of diagnostic to add and a fill in the blanks screen Once the screen is filled in the Diagnostic State will be written automatically and inserted into the program 3 Diagnostic logic can be created in the same fashion as control activities are accomplished by using Task States and Statements to describe the desired diagnostic activity Task PINPOINT_FAILURE State Check_Pressures If main_tank_pressure is less than 100 psi write Pressure too low check tank door seal to
46. therefrom 6 TERM AND TERMINATION 6 1 You may terminate the license granted hereunder at any time by destroying the Licensed Software together with all copies thereof and notifyingGE in writing thatall use ofthe Licensed Software has ceased and that same has been destroyed 6 2 GE uponthirty 30 days notice may terminate this Agreementoranylicensehere under if Customer fails to perform any obligation or undertaking to be performed by it under this Agreementor if Customer attempts to assign this Agreement without the prior written consent of GE Within twenty 20 days after any such termination ofthis Agreement C ustomer shall certify in writing to GE thatall use of the Licensed Software has ceased and thatsame has been re turned or destroyed in accordance with GE instructions 63 Sections 4 6 and 7 of this Agreement shall survive any expiration or termination and remainin effect Terminationofthis Agreementorany license hereundershallnotrelieve C ustomerof its obligation to pay any and all outstanding charges hereunder nor entitle C ustomer to any refund of such charges previously paid 7 EXPORT 71 you intend to export orreexport directly or indirectly the software products or techni cal information relating thereto supplied hereunder or any portion thereof itis your responsibility to assure compliance with U S export control regulations and if appropriate to secure any required export licenses in your own name 8
47. true then Go to the Counter State In the Advancing State the Forward_Motor is turned on When the Drill1_Forward_LS digital input is true the machine will go to the retracting State The Forward_Motor out put will then be turned off because it was NOT turned on during this State The operating system assumes that if an output is not actuated during an active State that the output is OFE When actuating an output remember to continue to actuate or turn_on or energize that output in all successive States that also require that output to be ON Note NOTE An output stays ON during the time when the operating system goes from one State definition to another since State transitions do not take any time The following example demonstrates how to keep an output ON for successive State definitions Task Fill State PowerUp Energize Fill_A Write Filling tank with liquid A Go to the Weight State State Weight Energize Fill_A If Weight_Input gt 20 lbs Go to Fill_B State If there are several States where the same outputs are turned ON again and again then probably the program should be rewritten and another Task added to control the out puts that are ON in several successive States Write Term Considerations 5 2 The write term is interpreted in a somewhat different manner from the rest of the terms Most terms are executed every time they are scanned Some terms may not be scanned if preceding conditional ter
48. units are handled in ECLiPS The analog circuit configuration is set up so that the value returned represents the units desired The units specified in the ECLiPS pro gram serves documentation purposes but has no effect on the operation of the control program Define this word as a filler word by choosing the Filler Word option from the define menu This concludes the programming of a complete State Logic Task Notice that this Task by itself could be a completely independent program if the Fill Station were the only part of the application to control Take some time to explore the menus which offer some of the ECLiPS convenience features The next section describes how to check the program and make changes Checking Your Work and Making Changes At this point all words have been defined but there may be errors in the program and most often changes need to be made throughout the life of a program This sections dis cusses checking the program for errors and how to make program changes To check the project for errors choose PROJECT from the menu and then the Error Check the Current Project option from the next menu hot key lt Shift F2 gt ECLiPS may ask if you want to check for undefined words Answer NO to this option If ECLiPS finds no errors a form is displayed showing the statistics on the current project If there is an error an error message is displayed in the bottom bar of the screen To demonstrate how errors are displa
49. uses the Reset tuning constant Its result is an accumulation of the product of the error signal times the Reset over time Even though an error signal is cur rently zero value the integral portion may provide a result because previous error sig nals have accumulated The Derivative term uses the Rate tuning constant The derivative term s result immedi ately allows an error signal to have its full effect then returns the term s value to zero as time goes on The amount of the Derivative term output for a given error and the rate it decays is affected by the value of the Rate tuning constant The total output of the PID is the sum of the results of the three terms Figure 1 shows a simplified diagram of the algorithm Typically the Proportional and Integral terms are used more often alone without Derivative because this provides a more stable control performance The Derivative term allows more anticipation and quick response but at a penalty of possible over response and undesirable process disturbances a80023 Proportional Term Bias Setpoint i Integrat Gain t Term Outpu fa rh ee Derivative Term Input Figure 8 1 PID Algorithms When the process variable differs from the setpoint such as at the time of a step change in the setpoint the proportional term immediately causes the output of the controller to change As time passes the integral term integrates the controller in the same direction The a
50. 001 NV RE Figure 2 1 State Diagrams The Task may transition from one State to any other State in the Task depending on how the State instructions are specified by the system designer The target State of all transi tions is always pre defined A State description may describe several different State transitions based on differing input information Each Task is always in one and only one State at any time and the transfer from one State to another does not consume any time ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Project CHEMICAL PROCESS Task Make_Compound_5 State PowerUp If the Manual_Switch is on and Start_Pushbutton is pressed go to the Add_Water State Go to Add_Water if Auto_Switch is on State Add_Water Run Pump_1 until Tank_Gauge equals 35 gallons then go to the Add_Chemicals State State Add_Chemicals When the Chemical_Management Task is in the Mixing State turn Pump_2 on When Tank_Guage equals 39 gallons send Tank Filled to operator_panel and go to the Mixing State State Mixing If hour is past 8 AM start the exhaust_system Start Main_Mixer If 20 seconds pass and the Mixer_Monitor is less_than 100 rpms go to the Wait_3 State Go to the Cooking State after 90 seconds State Wait_3 Write PROCESS SHUT DOWN BECAUSE MATERIAL IS TOO THICK Go to PowerUp State when Reset_Button is pushed Task Description in ECLiPS An impo
51. 2 will integrate down below its high limit and remove PID_1 Block_Up and return the com plete loop to normal Using the Block_Up and Block_Down inputs any amount of cascading of PIDs can be accomplished without reset windup occurring and with bumpless transfers from one mode to another Tuning and Scaling The Gain Reset and Rate constants can be adjusted to obtain the desired PID perfor mance such as speed of response and over shoot In addition each PID has a high limit and low limit that can be set to limit the output to less than its full range when desired These limits automatically employ anti reset windup Within the PID algorithm all signals are treated as being 0 to 100 Each input and the output and the high low limits have scaling constants associated with them Values giv en for this parameter are converted to a percentage of the range specified by the scaling constants If these constants are left blank at programming time that input is assumed to be al ready 0 to 100 Values given for this parameter are assumed to be a percentage which has already been scaled By using the scaling factors the output can be scaled to have a live 0 that is go from 100 to 100 This is a valuable tool at times when cascading PIDs and the up stream PID needs the ability to overcome and move the downstream PID across its full range PID Summary The state engine provides up to ten PID algorithms Each algorithm is identical a
52. 3 GE has personnel specially trained throughout the country to provide customer support for ECLiPS and other Adatek products which work together with GE control products Call GE Intelligent Platforms technical support line at 1 800 828 5747 Register Your Product Be sure to fill out the registration card in the inside pocket of the front manual cover By registering your product you can be assured that you are informed about new upgrades and other State Logic product updates 1 4 ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Chapter State Logic Control Theory 2 This chapter has two main topics The first part discusses State Logic Control Theory and how it differs from traditional control models The second part discusses the ECLiPS implementation of State Logic Control State Logic Control Theory State Logic Control has its roots in Finite State Machine Theory developed by nine teenth century mathematicians Because its philosophy is a natural fit to real time sys tems Finite State Machines have become the strategy of choice in disciplines such as electronics and compiler design It has not been used until recently in industrial control design since few products offered easy access to the strategy Adatek products provide a means of applying this philosophy easily in all automation applications The Concept of Finite States The basic concept of State Logic is that a process can be de
53. 31B GFK 0731B When the User selects one of these functions from the Perform menu the following in formation will be requested Number_of_table the Table number from 1 to 100 Type_of_operation the type of operation R for read or W for write to be performed with R meaning to take a value from the table and place it in the variable and W to enter the value of the variable into the table Row_number the row number of the element to be read from or written into Column_number the column number of the element to be read from or written into Variable the name of the variable to be used to store the Table value during a read or get the value during a write The State Engine will generate run time critical errors if the Table selected does not match the type of Swap being used or if the row and column numbers are out of range for the selected Table Initializing Tables The three Init_Table functions allow the User to set values for multiple elements in a Table at one time There are three distinct functions of different types so that ECLiPS can check to make sure the variable named is of the same type as the Table specified There is no initialization function for String Tables Init_Table_Int Init_Table_Flt Init_Table_Dig When the User selects one of these functions from the Perform menu the following in formation will be requested Number_of_table the Table number from 1 to 100 Row_number the row number of the first elemen
54. 54 Identify the CPU to be Used Whenever you start a new project ECLiPS asks you to identify the system CPU This selection can also be made at any time from the DEFINE menu by selecting the PLC Type option The CPU selection affects the amount of memory available see the section on SLP Memory Capacities for more information on CPU memory capacities The different CPU s also affect the execution speed because of varying clock speeds and micro pro cessor types ECLiPS produces different programs for the different CPU types The CPU type at translation time determines the type of control program that ECLiPS creates Programs created for a larger CPU execute properly on a smaller CPU but the reverse is not true Select SLP CPU Communications Mode For the easiest setup procedure and input output assignments use the Co Processor mode If a high performance system is required use one of the Controller modes If a high performance system requires both State and Ladder Logic control use the Control ler Large mode but for State Logic only high performance systems use the Controller Small mode The mode selection is made from the same screen that the CPU type is specified Select the PLC Type option from the DEFINE menu State Logic Alone or Hybrid State Ladder Logic System The State Logic Control System can be a State Logic only system or a multi processing system with State Logic executing in the SLP and Relay Ladde
55. 71 SDE CO 781 SDE Controller Small SML 731 SDE SML 771 SDE SML 781 SDE Controller Large LRG 731 SDE LRG 771 SDE LRG 781 SDE Ladder Logic Program Files Chapter 8 Reference 8 55 8 56 These files contain Ladder Logic to initialize memory locations used be the SLP The files for the controller interface methods also contain the necessary logic to perform the memory communications between the SLP and the CPU Use the Logicmaster 90 software package that comes with ECLiPS to configure the hard ware of the system and to enter the Ladder Logic program file into the CPU The fol lowing steps describe how to use Logicmaster 90 to perform these functions 1 After starting Logicmaster select the configuration package key lt F2 gt 2 Create a program folder for your application by entering a folder name 3 Setup the configuration of each chassis slot to match the hardware used in the system key lt F1 gt Configure the SLP as a PCM with Configuration Mode as NONE Press lt Esc gt when completed 4 Change CPU memory allocation for AI and AQ First press lt F2 gt then lt F4 gt and change the value for analog memory to 256 for both AI and AQ Press lt Esc gt twice to return to configuration menu 5 The configuration is now complete so press lt Esc gt again to exit the configuration package 6 Enter the Programmer Package by pressing lt F1 gt Then select the folder that you just created in the Configuration P
56. 731B Quit ECLiPS also makes use of Expanded and Extended memory if they are available with appropriate memory managers installed By using Expanded and or Extended memory ECLiPS can be configured for more States and Variables and also executes faster The Expanded memory and memory manager must be version LIM 3 2 or higher and the Extended memory and memory manager must be version XMS 2 0 or higher EMM386 SYS can be used for Expanded memory and HIMEM SYS can be used for Extended memory One megabyte of added memory is enough to provide the maximum capacity and speed for ECLiPS operations Use this option to exit ECLiPS and return to DOS Specifications GFK 0731B These specifications are for ECLiPS when running under DOS 5 0 with DOS loaded in the Upper Memory Area The only specifications that change when running under an older DOS is the number of Tasks which becomes 100 and the number of Names which becomes 700 DOS must always be loaded into the High Memory Area when using DOS 5 0 with ECLiPS Tasks States Per Task Total Number of States Statements per State Integer Variables range 32768 to 32767 Floating Point Variables range 1 175494E 38 to 3 402823E 38 String Variables String Variable Size acters Character Variables PID Loops Internal Flags Number of Timers Timer Resolution cond Number of Characters per Write Term State Changes Listed in Trace Display Force Table Size Monito
57. 90 to configure the Series 90 70 PLC for each of the modules used in the system Use the serial cable plus the 9 pin to 15 pin adaptor included with ECLiPS to connect the computer running Logicmaster 90 to the Series 90 70 CPU Refer to the Logicmaster 90 User s Manual for information about configuring the CPU and other modules used in the system Configuring the State Logic Processor GFK 0731B Use this description of configuring the State Logic Processor SLP as an example for con figuring the other modules in your system There are obviously differences between modules but this description should get you started in the right direction Use the Logicmaster 90 configuration software to add the SLP to the Series 90 I O config uration Logicmaster 90 is used to describe the modules present in the PLC racks Rack and slot location and other features for each module are entered by completing setup screens that describe the modules in a rack This tutorial describes how to execute pro grams without using any I O modules so you may want to have just a CPU and an SLP in your Series 90 70 control system for the demonstration purposes of this tutorial kacr corY REF VU DELETE UNDEL CFGSEL TRG CS SE CS SSE CRE CE SS C oe RACK J 415 6 PERRIER AN NED CONFIGURATION 55W I D SLMSONSYSTENS aa ONFIG VALID U EPLACE eS Figure 6 1 Sample Logicmaster Configuration Screen From the
58. B The operator enters the type of can after it is placed onto the conveyor A message is sent to the screen prompting the operator to enter the type of can placed on the conveyor State PowerUp If the Can_In_Place is on write Enter type of can A or B then lt ENTER gt and go to the Operator_Input State State Operator_Input Read Can_Type then go to the Fill_Station_Wait State Enter the program changes as shown above First the PowerUp State of the Conveyor Task is changed so that a message is sent to the screen after the Can_In_Place switch is tripped A new State is added which reads the operator s entry at the keyboard This State is called Operator_Input and becomes active after the Can_In_Place switch is ON As soon as this input is entered at the keyboard the State transitions to the Ready_To_Move State and the conveyor Task continues execution as before When adding States to a program make sure the cursor is at the position where the new State is to appear before selecting the ADD option from the menu or merely type in the program changes as they appear above Define Can_Type to be a string variable The write term is a functional term which must appear after the conditional term in the Statement The write term sends everything that appears inside the double quote marks to the terminal therefore the period is sent to the terminal as part of the message transmitted and does not indicate the end of the Stateme
59. Chapter 8 Reference 8 79 Debug Mode 8 80 Quit Leave Program Mode and return to the Main Menu In debug mode ECLiPS communicates to the State Engine through the serial ports of the host computer All information sent to the controller is controlled and formatted by ECLiPS and all data coming in from the controller is analyzed and manipulated prior to being displayed on the screen To enter the Debug Mode the PRJ and TG0 files of the project loaded in the State En gine must be in the current directory of the ECLiPS host computer If these files have a different date time stamp from the program in the State Engine ECLiPS issues an error message and denies access to the Debug Mode Before starting the Debug Mode ECLiPS compares the date and time of the last changes the program with the date and time of the program in the controller If the program in the controller is not the same version as the one in ECLiPS an error message is dis played The version of the program used by ECLiPS must match the version of the one in the controller There is a menu system for interacting with the State Engine with the program running or halted The following sections describe each of the menu options Project These functions are used to manage the State Logic Processor manage program execu tion start or stop or simulation mode manage serial ports and logs change SLP config uration and download a new program Run Program in the Control
60. Conveyor and Mov ing_Cans States that the conveyor motor is on Start and Run are synonyms but more importantly if an output is to be on in a State it must be explicitly turned on even if it were on in the previous State The inputs Can_At_Fill and Can_At_Mix are used in the other Tasks and can also be used in this Task The State Engine scans the active States of each Task one Statement at a time If a com mand to transition to another State is scanned the remaining Statements are not scanned The final two Statements of Moving_Cans State demonstrate these scanning characteristics since if the first conditional is true the next Statement is not scanned Check the program again for errors Correct any problems found Now save the pro gram by choosing PROJECT from the menu and then the Save Current Project to Disk option Congratulations You have just programmed an application using State Logic ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Advanced Programming Terms and Diagnostics GFK 0731B The program developed so far demonstrates the basics of the State Logic Control theory This program is now changed to demonstrate how to send messages to a terminal read information from a keyboard add some diagnostics and program a counter Read and Write Terms Assume that after the program has been operating for awhile a decision is made to use two different types of cans types A and
61. D Rate 0 00 Min Scale Max Scale Setpoint 50 00 0 00 0 00 Process Var 900 00 200 00 800 00 Control Var 0 00 0 00 0 00 Bias 0 00 Low Limit 0 00 High Limit 100 00 th6 10306 Open Wire Running Press lt F9 gt to Exit Form lt PageUp Down gt Prev Next Loop Press the lt Fl gt Key for System Help on the Current Topic Figure 8 10 PID Loop Tuning Screen PLC I O This option is used to view definitions of program names referring to CPU memory loca tions Analog point discrete point and register variable definitions are all displayed us ing this option After selecting the category of I O to view a list shows all of the names of that category plus the type and location number Select the name from the list to see the same form used to define that I O name The input output designation also appears in this form ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Faults Use this option to display and clear both PLC and I O faults When the option to display a fault table is displayed that table is then displayed on the screen To clear a fault table just select that option from the menu The display lists the current time the last time faults were cleared total number of faults in the table and faults since the last time faults were cleared The PLC Faults Table displays general system faults for different slots in the Series 90 70 chassis The I O Fault Table displays s
62. ERVICEFURNISHEDHERE UNDER EXCEEDTHE QUOTEDCHARGES FOR THELICENSEDSOFTWARE ANY SUCH LIABILITY SHALLTER MINATEUPONTHETER MINATION OF THE WARRANTY PERIODASSETFORTHINSEC TION 4 4 3 IfGE furnishes Customer with advice orotherassistance which concerns Licensed Software or any portion thereof supplied hereunder or any system or equipment on which any such software maybe installed and whichis notrequired pursuantto this Agreement the furnishing ofsuch advice or assistance willnotsubjectGE to any liability whether in contract warranty tort in cluding negligence or otherwise 44 The products to be licensed or sold hereunder are not intended for use in any nuclear chemical or weapons production facility or activity or other activity where failure of the products could lead directly to death personalinjury orsevere physical or environmentaldamage Ifso used GE disclaims allliability forany damages arising as aresultofthe hazardous nature of the busi ness in question including but not limited to nuclear chemical or environmental damage injury or contamination andCustomershallindemnify hold harmless anddefendGE its officers direc tors employees and agents againstall such liability whether based on contract warranty tort in cluding negligence or any otherlegal theory regardless of whetherGE had knowledge of the possibility of such damages 5 INDEMNITY 5 1 GE warrants that the Application Sof
63. Engine does not change any outputs and does not look at any of the inputs This mode is useful to debug a new program before connecting the I O or for trouble shooting a machine problem without interacting with I O points The State Engine set to this mode executes the program GFK 0731B Chapter 8 Reference 8 67 Make the program execute as desired by using the CHANGE option to change current States of the Tasks variable values and analog values Use the FORCE option to change I O or flag status Changes can also be made by using the VIEW option to display the English program Put the cursor on a name to display the current value then a new val ue may be entered Setting the System Clock The CPU has a clock that maintains the current month day day of the week hour min ute and second These values are always available through the System Variables Month Day Day_of_Week Hour Minute and Second The clock cannot be changed from the State Logic Processor The time must be changed in the CPU using Logicmaster 90 After the time has been changed in the CPU and cycle power to the system The CPU time is transferred to the SLP on power up and at mid night ECLiIPS Menu System ECLiPS is a menu driver program with the Main Menu displayed when the program is started The main menu offers five options Program Mode Debug Mode Online Modifying Setup Quit Program Mode 8 68 The ECLiPS Program Mode is a highly specialized
64. GE Intelligent Platforms State Logic Products ECLiPS English Control Language Programming System For Series 90 70 PLC User s Guide GFK0731B March 2010 GFL 002 Warnings Cautions and Notes as Used in this Publication Warning notices are used in this publication to emphasize that hazardous voltages currents temperatures or other conditions that could cause personal injury exist in this equipment or may be associated with its use In situations where inattention could cause either personal injury or damage to equipment a Warning notice is used Caution notices are used where equipment might be damaged if care is not taken Note Notes merely call attention to information that is especially significant to understanding and operating the equipment This document is based on information available at the time of its publication While efforts have been made to be accurate the information contained herein does not purport to cover all details or variations in hardware or software nor to provide for every possible contingency in connection with installation operation or maintenance Features may be described herein which are not present in all hardware and software systems GE Intelligent Platforms assumes no obligation of notice to holders of this document with respect to changes subsequently made GE Intelligent Platforms makes no representation or warranty expressed implied or statutory with respect to and assumes
65. If Time is past 3 00 PM go e If day_of_week Saturday go Seconds Used for comparison in a Time Term e Wait 3 2 seconds go e If 3 2 seconds have passed go Sunday Day of week number 7 e If day_of_week Sunday go Thursday Day of week number 4 e If day_of_week Thursday go Tuesday Day of week number 2 e If day_of_week Tuesday go Wednesday Day of week number 3 e If day_of_week Friday go With Prefix for data that is needed by a function e Stop_PID Kiln_Temperature with 45 679 e Perform Get_User_Input with Clear_Screen Y R_Register Used to indicate R registers in the Read or Write Term e Read Status_String from R_Register 69 for 23 R_Registers Start_In_Last_STATE Indicates that the Task should start in the state that was Filler Words PID Loops active when the program was stopped e Task Compressor_Control Start_In_Last_State Filler words have no functionality ie they do not change the meaning of any of the statements in which they appear Filler words should only be used to increase the clarity of the English text For example go to the Motion State looks better and sounds better than go Motion To some programmers however typing fewer words is better The State Engine controller provides the capabilities of modulating control through the use of the PID algorithm Each State Engine provides the User with up to ten PID algo rithms that are continuously executed at User sele
66. LiPS English Control Language Programming System User s Guide March 1998 GFK 0731B GFK 0731B Make Output Base Adjustments When the Controller interface option is used the ranges of all memory types are split in half The highest numbers are all outputs and the lowest are inputs For the Controller Large option the smallest output reference or base number of the outputs can be ad justed thus changing the number of inputs and outputs To change the output base for a memory type select the PLC I O Output Base option from the DEFINE menu The current base and the span of choices are displayed in the form Enter the new output base for any of the memory types listed Setup Series 90 70 CPU There are two steps to setting up the CPU of the system First the CPU must be configured with Logicmaster for what ever hardware modules are installed in the Series 90 chassis Second rungs of Ladder Logic are entered into the CPU program area There are four reasons to have Ladder Logic running in the CPU 1 To use the flexibility of two processors and do some of the control operations using the CPU This hybrid State Ladder Logic control system is used when some parts of an application are very time critical or when the control is performed by the CPU and the SLP is use for diagnostics or application simulation 2 To manage the SLP CPU communications when one of the Controller interface options Small or Large is selected for the
67. Log The Debug Mode main screen is called the Terminal Log This log displays messages sent from the running control program plus run time error messages and records of the use of the FORCE DISPLAY and CHANGE functions A time stamp accompanies all of these messages except for the information received from the running program The Terminal Log stores these messages so that even those messages that have scrolled off the screen can be reviewed To see information scrolled off the screen press the up arrow key until to scroll the information back down into the screen There is a limited amount of space available so that when there is no more storage space the oldest in formation is overwritten When the Terminal Log storage space is full and the up arrow is continuously pressed the information displayed eventually goes from the oldest back again to the newest information To make a permanent record of the Terminal Log select one of the Log options from the Debug Mode PROJECT menu Using these options all of the information displayed in the Terminal Log screen can be sent out the parallel printer port or entered into a disk file When either log is activated an appropriate indication is displayed in the top bar of the screen Simulation Mode The State Engine can be put in Simulation Mode through the option on the Debug Mode PROJECT menu When this mode is active the State Engine is completely disconnected from the real world I O the State
68. OR Last Modified 8 28 90 8 56 Can_At_Fill Task Fill_Station State PowerUp State Wait_for_Can_Removal Task Conveyor State Moving_Cans Can_At_Mix Task Mix_Station State PowerUp State Wait_for_Can_Removal Task Conveyor State Moving Cans Can_In_Place Task Conveyor State PowerUp State Start_Conveyor Cross Reference List CCM Protocol Listing The CCM Protocol Listing option on the print setup form produces data for use in communicating to the State Engine using the CCM protocol This protocol is typically used by host computers and computers running Graphical User Interface GUI pro grams to extract or change information in the State Engine The CCM information printed lists the CCM type the CCM type number and the CCM number of the ele ments of the ECLiPS program 7 6 ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B The following example uses the Conveyor program created in the Programming Tuto rial section CCM List Project CONVEYOR Last Modified 11 11 91 18 08 Digital Names Name CCM Type CCM Type CCM Number Can_At_Fill Discretel O 2or3 33 Can_At_Mix Discretel O 2or3 36 Can_In_Place Discretel O 2or3 43 e e Analog Channel Names Name CCM Type CCM Type CCM Number Fill_Weight_Input Register 1 41 Task and State Names Task Name CCM Type CCM Type CCM Number FILL_STATION Register 1 9501 State Name State Number POWERUP 1 POUR_CHEM_1 2
69. POUR_CHEM_2 3 WAIT_FOR_CAN_REMOVAL 4 Page 1 CCM Protocol Listing GFK 0731B Chapter 7 Creating Program Documentation 7 7 Commenting the ECLiPS Program AILECLiPS programs inherently include automatic documentation due to the descrip tive nature of the English program There are times when the description of the process requires additional explanation Explanations or comments may be entered at any line of the program To create a comment in ECLiPS simply type an exclamation mark followed by the commenting text All text following the on the line is considered to be a comment and is ignored by the ECLiPS translator Some commenting techniques are shown in the following program segment Project CONVEYOR Programmer Jo Simple Description This is sample documentation ATAATABAATARTAUAAUAUUADAADASUABAATAGTAUAOAUUADAGUASAADAGTAUAAOAUOAOAAUANOADAOUAGIAUARTAOUAOAOUADOADAOUARIATARTAOAADAOOADD This Task Describes the Fill Station activities Task Fill_ Station State PowerUp This State is active when power is first applied If Can_At_Fill is ON then go to the Pour_Chem_1 State 7 8 ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Chapter 8 Reference This section is designed to provide information about the details of the ECLiPS control language and how to use the ECLiPS software package The section starts with a description of the State Logic Language and Keywords then
70. Place Switch is ON and Manual Switch is OFE go to Move State Statements are often complete English sentences since very specific operations are spe cified at this level of the outline In fact feel free to specify Statements in any comfort able format Some additional examples combine the State actions with the transitions Run Mixer Motor When 5 seconds have elapsed then go to Raise Mixer State Write Drill Bit is Dull to operator then go to Retract Drill State Read Command from Operator then go to Report State Writing The Program With this outline in place the ECLiPS program is almost completely written The fin ished program is very close to the outline There may be some changes to the outline because of some naming conventions for how Task State and some other names are entered into the program ECLiPS can not pro vide for the full expressiveness of the English language so some of the sentence constructions may have to be changed although many alternative structures and the ability to make custom changes to ECLiPS are provided Also the outline is in a general format with no specific reference to the actual I O of the system so that the wording of the outline usually becomes more specific in the program GFK 0731B Chapter 3 Creating a Control Program 3 3 To write the program the Tasks States and Statements of the outline are entered into the project using the ECLiPS editor which is active whenever ECLiPS
71. States the only time the cutter is started is when the Engage_Cutter State is ac tive Traditional approaches allow for ingenious methods to simulate the States of the process to protect from an inadvertent pressing of the Cut_Push_Button at the wrong time These traditional methods add considerably to the complexity of the system de sign especially in intricate systems Because a State Machine model reflects sequence of operation over time the model em bedded in the controller matches the actual model the real world process follows This model makes it possible to define the control system by describing the process Because the model matches the real world program development and modification is always simpler and easier to understand Program developers can more easily build ad vanced diagnostics for the process into the program because the control program is a precise model of the process and it is easy to detect when that normal behavior is not followed A Collection of Tasks is a State Logic Program Finite state machines or tasks define sequential operations Processes though usually have more than one sequence of operations executing concurrently State programs are usually a collection of Tasks matching the actual real physical Tasks that are inherently part of the process under control The State Logic control program is a collection of Tasks which execute concurrently 2 4 ECLiPS English Control Language Programming System User s
72. _Input word and press lt F4 gt then change the analog input to 20 1 The current State is now Pour_Chem_2 Check the condition of Chem_Valve_2 and Chem_Valve_1 Change Fill_Weight_Input to 30 1 to go to the Wait_For_Can_Removal State Put the cursor on Can_At_Fill again and clear the forced condition so that Fill_Station Task goes back to the PowerUp State Remember to change the Fill_Weight_Input back to zero before repeating this cycle Controlling and Observing the Mix Station Change Display In this section we explore other ways to change elements of the program and watch the results of those changes First lets create a more detailed monitor table Select the Add a New Monitor Table option again and call it Mix Station Enter all of the digital points used in the Mix Station Task Can_At_Mix Mixer_Down_Motor Mixer_Down_Switch Mixer_Motor Mixer_Up_Motor Mixer_Up_Switch Now select the Change option from the menu This option allows changes to other elements of the program Select the Current State of a Task option Now select the Mix_Station from the list of Tasks and then select Lower_Mixer from the list of States A message is displayed in the Terminal Log stating the action that was executed and the current time Notice that the Mixer_Down_Motor is now ON Also note that if this State stays active for more than 20 seconds the Max_Time message is displayed in the Run T ime Error window and in the Terminal Log
73. _PID heat Configuration 8 58 8 68 State Logic Control Theory 2 1 STATEMENTS psl ez 6 315 5 6 1 62 18 3 STATES p 1 b 5 2 6 3 2 4 3 8 1 8 3 8 19 8 21 8 70 Stop_PID 8 17 8 21 String B1578 String Manipulation 8 40 String Variables 3 8 8 14 8 61 Subtract 8 17 8 21 Subtract Term 8 5 Sunday 8 24 Suspend_Task 8 6 8 21 Swap_Table_Value 8 34 Synonyms 3 6 System Clock 8 19 8 69 T Table 8 33 TAN 8 22 Task Group Task State List 7 5 Technical Support Line 1 4 Terminal Log 8 68 Text String 8 75 8 84 Third Party VME Interface 8 53 Thursday 8 24 Time Counter 8 43 Time Variables 3 8 8 14 8 19 Timer 5 5 8 10 s 18 Trace 6 7 8 85 Track_Mode 8 27 Translate 8 77 Tuesday 8 24 Tuning 8 28 U Underscores UNINSTALL 1 3 User Menu 8 44 V Variables 3 7 8 72 View 6 6 8 84 W Wait 8 20 Wednesday 8 24 With 8 24 Write 4 19 J 5 2 8 21 Write Term8 7 GFK 0731B
74. _Switch is tripped then go to Mix_Chemicals State Mix_Chemicals Run the Mixer_Motor for 10 seconds then go to Raise_Mixer State State Raise_Mixer Max_Time 30 Turn on the Mixer_Up_Motor until the Mixer_Up_Switch is tripped then go to Wait_for_Can_Removal State State Wait_for_Can_Removal When Can_At_Mix is off go to PowerUp Define all of the undefined words The only required operation not discussed during the programming of the Fill Station is how to define a synonym for a keyword Tripped must be defined as a synonym for ON Choose Keyword Synonym option from the LIST menu A list of keyword and synonyms appears Select ON in the list and press lt Enter gt so that tripped is now a synonym for ON Lets try another new option Use the maximum time diagnostic option for States Low er_Mixer and Raise_Mixer These diagnostics are added so that if either the Mix er_Up_Switch or Mixer_Down_Switch fails a message saying that either the Low er_Mixer or Raise_Mixer State has been active too long is displayed This Task introduces the use of the WAIT term Statement as shown in the Mix_Chemi cals State All timing functions start when the State they are in becomes active Chapter 4 Programming Tutorial 4 17 Conveyor 4 18 On power up the conveyor waits for a can to be placed in the start position which is sensed by digital input Can_In_Place Now both the Fill_Station Task and the Mix_Sta tion Task are ch
75. ackage 7 Select Program Display Edit lt F1 gt 8 Select Region lt F9 gt 9 Select Include lt F4 gt 10 Now put ECLiPS disk 2 into drive A and enter the Ladder Logic program file name selected from the table above as follows A lt filename gt For the Coprocessor mode with the 731 CPU enter A CO 731 This operations loads the Ladder Logic program from the file and incorporates it with any existing Ladder program 11 11 Press lt Enter gt and the program file is incorporated into the program 12 12 Press lt Esc gt to return to the Programmer Package starting screen Then press lt F3 gt for PLC Control and Status 13 13 Press the lt Tab gt key until RUN OUT EN is displayed in the block and press lt Enter gt The Ladder Logic program for the watchdog timer is called WATCHDOG SDE and is also provided on disk number 2 Repeat this procedure to incorporate the watchdog file with the other rungs in the CPU The same watchdog file is used for all CPU and interface types The CPU is now set up for State Logic program execution The chassis slot I O hardware is configured the Ladder Logic program is loaded into the CPU and the CPU is in RUN mode with outputs enabled ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Serial Ports GFK 0731B The State Logic Processor SLP has two serial ports One of these ports may be desig nated as the Programming Port the one which conne
76. ad Term is encountered in the execution of a State it is treated as a Condition al Term that isn t satisfied until characters are received from one of the serial ports Once the complete message is received it places the characters in the designated variable for use by the rest of the program and then allows the active State to execute the next State ment ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B The Read Term can be used to communicate to any serial input device This would in clude operator interface devices such as terminals smart panels and personal comput ers It would also include intelligent sensors such as weigh scales and the various smart pressure and flow transmitters now sold by various manufactures Together the Read and Write Terms make communicating with the operator very power ful yet simple It also makes it easy to communicate with intelligent sensors controllers and other machines that populate the plant or factory Any one of the serial ports may be set up for the CCM2 communications protocol Using this protocol enables the State Engine controller to be a slave on a CCM2 network Typi cally the protocol is used to communicate with Graphical User Interface Software such as CIMPLICITY Genesis The FIX INTOUCH Factory Link Screenware II etc Scan Overview The State Engine which executes the control program continuously scans the inputs and the control program Th
77. ad from a serial port or status of any system variable including State activity from other Tasks Chapter 2 State Logic Control Theory 2 7 Functional and Conditional Terms are listed below using typical ECLiPS terminology Functional Terms Conditional Terms Actuate Start Turn on If when Go Read get Add Subtract Divide etc Make Set Write Start_PID Stop PID Suspend_Task Resume_Task Perform Communication Functions 2 8 State Wait_For_Command Read Start_Command from Operator_Panel then go to the Start_Process State If 20 seconds pass go to the Operator_Prompt State State Operator_Prompt Write PLEASE SELECT BATCH AND START PROCESS to the Operator_Panel then go to Wait_for_Command State Problem_Report Write PROCESS SHUT DOWN BECAUSE MATERIAL IS TOO THICK Go to PowerUp State when Reset_Button is pushed State Start_Process Highlighted Communication Functions The Adatek controllers have two very powerful serial communication functions These are a Read and a Write Term for the various serial ports The Write Term allows characters to be written to any of the serial ports in the controller These can be connected to operator interface terminals or smart panels to present full screen displays or simple messages These ports can also be connected to intelligent ac tuators or control devices such as a robot controller to provide set points and operating commands When a Re
78. ake Near COS Test_Value EXP exp e ee a power Make Inverse EXP Transfer N exp Natural logarithm base e Make Test_Value LN Input 3 4 RANDOM Random number generator Generates a random number 0 1 e Make Simulated_Inp Set_Time Random SIN exp Sine where 65535 lt exp lt 65535 e Make Vector1 SIN Strain_Gauge SORT exp Square Root e Make Out_Pot SQRT Flow_Meter TAN exp Tangent where 65535 lt exp lt 65535 e Make Slope TAN TRIM In_Flow N Pe eee Operator e Make Count Amount 2 Modulus Modulus Operator integer operands only e IfCount 5 0 go Times eon Operator Make Count Amount 2 Divided_By RE PRN Operator Make Count Amount 2 Plus Addition Operator Make Count Amount 2 Minus an Operator Make Count Amount 2 Bitwise_And AND bits operator e Value Code Bitwise_And Mask Bitwise_Or OR bits operator e Setup Code Bitwise_Or Mask Is Equal Equals Assignment oe Into e Make Count 8 22 ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Relational Operators Keyword Synonyms Meaning Examples Is Equal Equals Into Comparison Operator 5 e If Count 5 go lt Less Under Less than Operator 5 e If Count lt 5 go lt lt Less then or equal to Operator 5 e If Count lt 5 go gt Greater Above More Greater than Operator
79. al Terms accompany Functional Terms in a Statement the Functional Term is executed when all of the Conditional Terms are satisfied There are four types of conditional Terms see the reference section Conditional Terms are satisfied as follows 1 Read When valid data is received at the appropriate channel 2 If When the conditional expression is TRUE To understand how Statements are scanned assume that the Statement Conditional Terms precede the Functional Terms and that the scan proceeds from left to right ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B a80003 Functional Term Satisfied Conditional Term Functional Term i ses Unsatisfied Conditional acta Functional Term ae Satisfied Conditional Term t Unsatisfied Conditional Term Functional Term Y Figure 8 6 Statement Scan The Statements of a State are executed in the order that they are written into the pro gram Functional Terms of Statements with no Conditional Terms are always executed Conditional Terms in Statements control whether or not the Functional Terms in those Statements are executed If all of the Conditional Terms are satisfied the Functional Terms are executed If any of the Conditional Terms are not satisfied none of the Func tional Terms are executed The Statements are executed one at a time In this manner every Statement of the active State is evaluated Th
80. amined the same way that any other integer variable is examined There are four type of time counters each one being incremented at a different time period tenth of a second second minute and hour There may be 10 of the hour counters and 30 of each of the other counters active at a time The Time Counter form that ECLiPS displays when this Perform Function is selected has three parameters that define what the function call Action Specifies how the function is applied to the counter The data type of this parameter is character and it may be specified by a variable or as a constant A description of the possible choices for this parameter follows A Assigns the specified variable to be a counter that is incremented as specified in the Time Interval parameter The variable is incremented only when it is enabled E Enables a defined counter to begin counting the time interval specified when the counter is Assigned H Halts the counter from being incremented The variable storing the time count maintains its value To start counting again this counter must be Enabled D Deallocates the counter The variable is no longer a counter freeing up space for one more counter of that type to be Assigned Integer Name Specifies the integer variable name to be used as a time counter The named must be defined as an integer variable separately Time Interval Specifies what time period m
81. anced_Magnitude lt SIN Current_Angle 45 6 go to Reposition State Numerical expressions may be much more complicated using any of the operators in any order and nested in parenthesis to change order of evaluation or make the expres sion more readable Up to 18 levels of parenthesis may be used Operator Precedence Operators are executed according to the precedence listed in the operator keyword table The operators with the lowest precedence number are executed first Operators with the same precedence are executed left to right Use parenthesis to change the order of execution Variables are used to store some information in memory All variables are identified by a unique name that is assigned when the undefined words in the program are defined Each variable can be configured to save the value over a power cycle or be initialized when the program is started There are two main categories of variables ASCII and numeric Calculations may refer to the value stored in any of the numeric variables Chapter 8 Reference 8 13 8 14 ASCII Variables The ASCII variable types are Character String and R Register Character Variables store one character and use one byte of memory String Variables store up to 80 characters and use 80 bytes of memory String Variables store any ASCII characters Control characters are used in the string variable by using the followed by the and then two digits that are the hexadecimal number for the ASCII c
82. ange of States in other Tasks when the E Stop Button is activated The State that the other Tasks would be transitioned to by the by the E Stop Task would contain a descrip tion of the desired response to the E Stop button being pushed This is how such a Task might look in ECLiPS Task E Stop State Emergency If the E Stop Button is pushed put the Generating Task into the Safe State and the Switching Task into the Controlled_Stop State then go to the Wait_for_Reset State ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B 3 Using the Current State of a Task State as an Conditional Term The current active State Status of any Task is a variable in ECLiPS and can be treated as an input condition to make a Conditional Term within a State of any other Task An ECLiPS example follows Task Start_Motors State Check_Conditions If the Conveyor Task is in the Running State then go to the Start_Main_Motors State Otherwise go to the Send_Message State 4 Using internal flags to signal another Task Internal flags are set and tested just as are digital outputs One or several Tasks may set a flag for another set of Tasks to test for example Task Smoke_Alarm_Monitor State PowerUp Turn on the Smoke_Alarm_OK flag If the Dock_Detector is on or the Boiler_Detector is on or the Transfer_Detector is on go to the Alarm State The Smoke_Alarm_OK flag is true until one of the detectors is
83. ange the values of the Real Time Clock The time variables are second minute hour day day of the week and month Use these variables to set the clock or to check the current time Register Variables Register Variables are stored in the CPU R memory locations and may be either floating point integer or character data type Register variables are used when a CPU Ladder Logic Program or some other module in the Series 90 system needs to access the data used in the State Logic program ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Program Scan GFK 0731B The State Engine operating system is a scanning system The scan cycle starts at the start of the program scanning the active State of every Task During program execution there is always one and only one State active in each Task The operating system completes a scan of the program hundreds of times every second During the scan of the active State of a Task each Statement of the State is scanned in the order that it appears Keep in mind that a Statement is a series of Terms terminated by a period a80002 TASK 1 State 1 Statement 1 State 2 Statement 1 Lye Statement 2 State 3 Statement 1 TASK 2 State 1 Statement 1 j Ly Statement 24 C y Statement 3 State 2 Statement 1 TASK 3 Figure 3 1 Program Scan The actions specified by Functional Terms are executed when the Functional Term is scann
84. apter 1 Getting Started sesin Jiawei an eae bia en gi a eS wee ats 1 1 OVerview sen keie ii Sta Oe a aie wid i OL here eb SE 1 1 How to Use this Manual 0 0 eee eens 1 2 Brief Description of the Manual Sections 0c eee 1 2 Hardware Requirements 66 c cece eee eee 1 3 Installation cc preet enne ahs wagner en E Remake E E oe ea bre tea EER 1 3 Getting Help rt adan rat n APS AE Naat Bealls et stolen ar e ia 8 1 4 Register Your Product 6 66 ccc eens 1 4 Chapter 2 State Logic Control Theory ccc cccccceccceccees 2 1 State Logic Control Theory 0 2 1 The Concept of Finite States 0 nee eee 2 1 What Makes State Control Logic Different 060 000s eee 2 4 A Collection of Tasks is a State Logic Program 0 2000 2 4 Developing State Logic Programs with ECLiPS 0 e eee ee 2 5 Tasks Sequences of States 00 2 6 States The Building Blocks of a Task 06 6 c eee eee eee 2 6 Statements The Command Set for State Descriptions 2 7 Communication Functions 6 00066 c cece eee eee 2 8 SCAM OVERVIEW afar aie desk ais ae e ie ae ests epee hla eet a 2 9 Interaction Between Tasks 0000s 2 9 Creating Process Diagnostics 0 6 c eee eee ee 2 11 Chapter 3 Creating A Control Program 0 ccc cee eee e eee eens 3 1 Outline the Application 0 0 0 0 ea aei cee e
85. ariable value must be between 0 and 32767 There are several ways to make a timer that uses a period of time greater than 10 min utes The common methods use State transitions to reset a State timer State Heater_On_One_Hour Actuate Vat_Heater If Ten_Minute_Counter is gt 6 go to Start_Process State Wait 600 seconds then go to Timer_Counter State State Timer_Counter Add 1 to Ten_Minute_Counter and go to Heater_On_One_Hour State Also note that there is a perform function that can be used to measure elapsed time ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B GFK 0731B Relational Conditional Term Relational Terms test a variable or analog values The Term is a value followed by a rela tional operator then another value The values tested can be numbers calculations vari able names and analog names Relational Test Conditional lt Numeric Relational Term gt lt Character Relational Term gt lt String Relational Term gt Numeric Relational Term lt Numeric Value gt lt Relational Operator gt lt Numeric Value gt e If Parts_Count 500 e If Flow_Meter_Input is above Flow_High_Limit e If Canister_Pressure Atmosphere lt Pressure_Limit Safety_Margin See the section Mathematical Calculations for a discussion on how to use calculations Character Relational Term lt Character Value gt equal not_equal lt Character Value gt
86. ases and sen tences The State Logic control programs created by ECLiPS are executed by one of the hard ware platforms with the State Engine operating system The platform for this version of ECLIiPS is the State Logic Processor SLP installed in a GE Series 90 PLC system The SLP is a module that is installed into a Series 90 PLC rack along with the Central Pro cessing Unit CPU The SLP accesses the CPU register and I O tables through the Series 90 backplane and the CPU controls the I O through its normal program execution cycle This is a multipro cessor system since the CPU may also execute a control program while the SLP is executing a control program 1 1 How to Use this Manual State Logic differs significantly from traditional approaches to control therefore it is very important to read sections 2 and 3 State Logic Theory and Creating an ECLiPS Program After reading these sections install ECLiPS in the computer and follow along with the Programming Tutorial in section 4 The Programming Tutorial is designed to be com pleted without connecting to any State Engine controller There are also sections on helpful hints and documenting the program but the reference section is the section most often used after the initial exposure to ECLiPS The reference section has details about the ECLiPS State Language using ECLiPS functions and inter facing to the State Engine Notational Conventions e Alltext that should be
87. at another Task should be created is that a program segment requires an output to be turned ON in several States or an input is repeatedly monitored in several States This type of structure indicates that more than one activity is being controlled by one Task and a new Task should be used so that Tasks are used to control only one activ ity at a time When Tasks are used for more than one activity the complexity of the programming in creases Therefore inordinate program complexity is another clue that there are too many activities being controlled by one Task Read Term Considerations 5 4 A Read Term is the READ keyword followed by a variable This Term causes the proces sor to Read an input from the keyboard or from R CPU registers and store the input into the variable that follows READ The Read Term is a conditional Term and must be followed by aGO Term The Read is satisfied when valid input to the variable is com pleted Input to the variable is completed when valid data for the variable is received at the spe cified communications port Any of the variables may be used with the Read Term and the type of data received must match the variable type to be valid If the data type does not match the variable type the data received is ignored and the Read Term continues to wait for valid input If a character variable is used with READ the first character received at the port is stored in the variable and the READ conditional is
88. at manage the transfer of information between the SLP and the CPU See the section titled Setup Series 90 70 CPU for a list of the transfer program files and how to incorporate them into the CPU program These transfer programs assume that the SLP is in the slot next to the CPU and that the SLP memory range setup is at default values If either a different slot is used or different memory ranges selected these transfer programs must be changed Call one of the technical support hot lines for help making these changes Chapter 8 Reference 8 51 8 52 Whether the Co Processor method or Controller methods are used the CPU must be placed in the run mode and I O enabled for the State Logic program to access the real worldl O Third Party VME Interface To use information provided by third party VME products transfer the information be tween the CPU and the VME product with logic in a Ladder Logic program executing in the CPU Use the VME READs and VME WRITEs to accomplish this transfer to and from CPU memory locations accessed by the SLP Refer to the Logicmaster 90 User s Manual for information on using these terms in a Ladder Logic program Clearing Outputs at Power Up Much of the discrete memory in the CPU is retentive meaning that its value is saved when power is lost because the memory is battery backed These discrete locations must be cleared when power is first applied to the system otherwise outputs that were ON when powe
89. at the cursor location Use this choice is useful when you are not sure what of a word s definition If the word is not defined ECLiPS presents a list of possible definitions ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Undefined Words Throughout the Text This option searches the entire program for undefined words When one is found the user is given a list of possible types for the word When a definition has been made the next undefined word is located and the process continues until the end of the text is reached PLC I O Analog Digital Register Use this option to define data elements I O points or Register Variables that are stored in the CPU memory Select the type to define and fill in the displayed form Series 90 Scan Rates This option allows the programmer to customize the scanning of his analog channels When analog channels are scaled ECLiPS converts the raw analog values to floating point numbers Since floating point operations use a lot of time the analog values and their conversion to floating point values are not updated every scan Unscaled analog channels are updated ever scan Use this option to change ECLiPS default analog scanning scheme A form is provided to show how the analog channels are scanned There are 8 columns and 10 rows The entry in each one of the 80 locations represents a block of 8 analog channels Each 1 10 of a second a collection of analo
90. ate by using the Swap_Table_Value_Flt function the variable Melt ing_Point can be made equal to one of the elements of Table 1 where Table 1 contains the parameters for this particular product run Using the Init_Table_Float Tables containing parameters for each style of product that can be made on the line can be initialized When the Operator selects a style of product in the Select_Product_Style State the Copy_Table_To_Table function can be used to move those parameters into Table 1 the Table in which Melting_Point finds its values for this style and product run ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B BCD I O Representation General At times input and output devices are used for data entry or display that use BCD repre sentation Thumb wheel switches and LCD displays are possible examples The devices are connected either to digital inputs or digital outputs where 4 hardware inputs or outputs represent 1 digit of the display The display or switch then uses a binary code representation from 0 to 9 There are 16 total possibilities 4 outputs or in puts represent 2 to the 4th or 16 possible combinations and the remaining 6 are used for such things as minus sign decimal point and null or space character on a display The two functions BCD_In_Conversion and Output_BCD_Conversion allow the User to designate a series of consecutive digital inputs or outputs to be treated as if they ar
91. ation Task 0 6 6 6 4 17 CONVEYOR ais Lu Mh A DE Ue tas AG ae hae dan ihe iach A i 4 18 Advanced Programming Terms and Diagnostics 6 45 4 19 Chapter 5 Help fil Hints iiaee ten eal E eee ates oa ante 5 1 Prosrammin ge Pints ceshissine a eh arted a E a E eE atch 5 5 1 Outputs are OFF by Default 0 eee eee 5 1 Write Term Considerations 6 0 6 c cece eee 5 2 Calculations and a Scanning Operating System 5 3 TASK DESE I ran oea e seer gent ao Aan bute E E E E EE 5 3 Read Term Considerations suasasns rera rr rarene 5 4 Timer Considerations 0 6 eee eens 5 5 Documentation Hints 1 0 0 eee eee 5 6 Hints for Using ECLiPS Features 0 66 ccc 5 10 How to Use the ECLiPS Menus 6 5 66 5 10 Using ECLiPS Hot Keys iiri pt ene eee eee 5 10 ECLiPS Word Processing Functions 606 c eee 5 10 How to Use ECLiPS Lists 1 cee eee 5 11 GFK 0731B ECLiPS English Control Language Programming System User s Guide March 1998 viii Contents Online Tutorial isos wcice ch esenseeadae toe i A aioe a Raw Setting Up the Series 90 70 State Logic Control System Configuring the State Logic Processor 000 0c cece ee eee Enter the Initialization Ladder Program 00 600 e eee Enable Outputs and Start Program Running 4 DownLoad a Program 6 eens Debug Mode Screen neces Put SEP i
92. ations protocol defined by GE The State Engine acts as a slave in a master to slave architecture The remote master com puter must poll to retrieve data from the State Engine All communications are initiated by the host The CCM2 protocol defines the message structure framing error checking and han dling and timing for all message types At the lower physical level the serial port of the State Engine is electrically RS 232 and can be configured for any Baud rate parity and stop bits desired via a command in the program executing in the State Engine Use the Set_Commport keyword in the ECLiPS control program followed by the parameters to configure the port so that CCM2 communications port electrically matches the serial port of the master computer Either of the 2 serial ports can be a CCM2 Communications port The CCM port is al ways the port that is not the programming port Chapter 8 Reference 8 57 8 58 Enabling CCM2 Communication Both serial ports are normally normal serial ports using no communications protocol To use the CCM2 communications protocol on the CCM port the CCM2 Communications must be enabled To enable CCM2 Communications select the State Engine Configura tion option from the Debug Mode PROJECT menu There are other CCM2 options on this menu The CCM2 options available are Enable CCM Protocol Port Disable CCM Protocol Port Set CCM Protocol Station Address The State Engine using CCM2 only r
93. c tasks alarm tasks operator interface tasks and so on States The Building Blocks of a Task 2 6 Task Mix_Station State PowerUp If Can_At_Mix is on write Mixing Can and go to Lower_Mixer State Lower_Mixer Run Mixer_Down_Motor until Mixer_Down_Switch is tripped then go to Mix_Chemicals State State Mix_Chemicals Start the Mixer_Motor When 10 seconds have passed go to Raise_Mixer State Raise_Mixer Run Mixer_Up_Motor until Mixer_Up_Switch is tripped then go to Mix_Complete State Mix_Complete When Can_At_Mix is off go to PowerUp Five State Task Example with a Single State Highlighted In the automobile engine example we said an engine is viewed as a collection of Tasks Fuel System Task Electrical System Task Starting System Task and so on Each of those Tasks is further described as a precise set of States through which that Task will pass while the engine operates The automobile engine s Starting System Task has several possible States For example we know there is a State in which the key is on the engine is not running and the starter ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B motor is not cranking the engine over We know there must be another State in which the key is in another position the engine is not yet running but the starter motor is cranking the engine over There are also States in which the key is on the engine is run ning and t
94. can to arrive at the station Nor mally this State might be called Wait for Can but since this is the State that is active on start up it is named Power Up Every Task must have a State named Power Up which is active when the program starts execution The other States are given brief descriptive names Pour Chemical 1 Pour Chemical 2 and Wait for Can Removal With the naming of the Fill Station States the outline at this stage is as follows I Fill Station A Power Up B Pour Chemical 1 C Pour Chemical 2 D Wait for Can Removal II Mix Station III Conveyor Outline with Tasks and Fill Station States Mix Station States The Mix Station has five distinct steps which describe the sequence of operations at this station Step 1 During this step the station is waiting for a can to arrive at the station After a can arrives the next step starts Step 2 Now the mixer is lowered into the can When the mixer is down the process goes to the next step Step 3 The action of this step is to mix the contents of the can The process goes to the next step after the contents have been mixed for 10 seconds Step 4 During this step the mixer is raised After the mixer is all the way up the last step begins Step 5 The final State waits for the can to be removed When a can is removed the procedure repeats by going to step 1 again ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B I F
95. cilities Make a New Project This function starts a new program If there are unsaved changes from the current pro gram a prompt to save the program is displayed Note To copy the current project be sure to use the copy option changing the path and saving the project copies only the current Task Group Chapter 8 Reference 8 75 8 76 Import Data from Another Project This function adds data from another project into the current one Any of the following categories of data may be imported e AllProject Sections The entire project Comm Port Configuration This section contains Communication Port Configuration data e English Text The program statements e PID Loop Configuration This section contains the PID loop initial values and names e Variable Names This includes all variable names Print Project Data This option allows the user to print any of the sets of information listed below e English text e I OMap e Data List e Task StateList e Cross Reference List e CCM Protocol Listing See the Creating Program Documentation section of this manual for more detailed in formation on these categories The Header and Footer entered on this form will be stored on disk so they can be used for all print jobs The Output to option directs the print data to the printer if the word printer is entered or to a file To direct the output to a file just enter the file name for this option Tran
96. ck_Down inputs are true GFK 0731B Chapter 8 Reference 8 31 The outputs may be used in the ECLiPS program by specifying the PID name followed by the appropriate keyword For example the ECLiPS program statement If Tank_Level LL_Status is true go to the Reset State makes Reset the active State of this task Tuning Constants The PID algorithm also has several adjustable tuning constants These include the Gain Reset and Rate the high limit and low limit and a bias value The bias is a value that is added to the output at all times and can be used to insure a minimum output from the PID The high and low limits set maximum and minimum values within the scale maximum and minimum that the controller output will not exceed When these limits are reached the appropriate status output is set and anti reset windup techniques automatically go into affect for that PID Every PID also can be selected to be either a direct acting or inverse acting controller This is a parameter selected at programming time A direct acting controller will inte grate from 0 to 100 if the setpoint is greater than the process variable A reverse acting controller will integrate from 0 to 100 when the process variable is greater than the setpoint All other features are exactly the same whether the PID is in the direct or in verse mode The following is asummary of User selected values These values are all entered in the PID Loop Configuration form disp
97. conventions are used throughout this section to rigorously define the required structure e If Forward_Limit_Switchis on e If Part_Ready_Flag is off Several digitals can be specified in the same expression joined by AND or OR keywords as follows If Top_Limit_Switch or Bottom_Limit_Switch and Counter_Weight_Switch are OFF The ANDs have a lower precedence and are therefore executed first Timer Conditional Term The Timer Conditional is a number or variable followed by the keyword SECONDS The timer has a resolution of 1 100 of a second and the number used to indicate the number of seconds can be a floating point number Timer Conditional lt Numeric Constant gt lt Integer Variable Name gt seconds e If3 76 seconds have passed then An integer variable can also be used to specify the number of seconds The value of the variable indicates the number of hundredths of a second so that a value of 100 would indicate a time of 1 second e If Wait_Time seconds then Timers always refer to the amount of time that the State has been active A common mistake is to assume that the timer starts when it is scanned e If Track_Monitor is ON and 5 3 seconds have passed The timer above refers to the time that the State has been active and is not influenced by the condition of the Track_Monitor The timer number must be in the range of 0 01 to 600 00 seconds or 10 minutes When using an integer variable the v
98. crete 8 46 Display Date and Time 8 44 Divide 8 21 Divide Term 8 6 Documentation 7 1 DOS 1 3 DOS 5 0 8 90 Download 6 3 Drive Index 1 Index Index 2 E ECLiPS Memory 8 89 Energize 8 21 English Code 7 2 Error 6 5 8 82 Error Setup 8 68 Event Queue EXP 8 22 Expanded Memory 1 3 8 90 Expressions 8 2 F Faults 6 7 8 88 Files 8 57 8 68 8 77 Filler Words 5 6 8 24 8 72 Find 8 75 Finite States 2 1 Flags 3 8 8 4 8 72 Floating Point 8 14 Floating point 8 15 Floating Point Variables 3 8 8 61 For 8 20 Force 6 7 8 86 Formatting 8 8 Friday 8 23 FROM 8 12 8 23 Function Key 8 45 Functional Expressions 8 2 8 3 8 17 Functional Terms 8 21 G Get User Input 8 44 Go s 13 8 19 8 21 GO Term 8 6 H HAIT Hardware Requirements 1 3 Hot Keys 5 10 5 45 Hour 8 19 I O Map 7 3 159 5 20 Import 8 77 Inactive 8 24 Inactive State 8 6 Initialization 6 2 Initializing Tables Input 8 47 Installation 1 3 Integer 8 15 Integer Variables 3 7 8 14 8 61 Internal Flags K Keyboard Definitions 8 45 Keywords 3 6 8 1 8 20 8 72 L Language Structure 8 2 Lists 5 11 8 71 LN 8 22 Log 6 4 8 68 Log File 8 82 Logicmaster 908 57 Make 8 21 Make Term Mathematical Calculations GFK 0731B GFK 0731B Mathematical Operators 8 22 Max_Time 8 23 Memory Capacities Memory T
99. ct the Task Group name from the list and then enter the number to indicate the Task Group s new position in the list Join Two Task Groups Together Use this option to bring separate Task Groups together to form a single Task Group When there is only one Task Group remaining the Program Mode menu no longer of fers the Task Group option and the Break Up the Project into Separate Task Groups option is again displayed on the Project menu Select the name of the Task Group from the list The selected Task Group is then ap pended to the end of the current Task Group Switch to Another Task Group Use the option to change to another Task Group Select the name of the Task Group from the list displayed Security This function allows the user to fill in a security table containing passwords for ECLiPS and the 4 access levels of OnTOP The password for ECLiPS covers access to the entire program while each of the levels for OnTOP has a separate password Level 4 provides unlimited access to all OnTOP functions For each of the other levels of OnTOP security select the functions they may be accessed The functions that may be selected are Force Run Halt Change Tune PID Loops and Modify Monitor Tables Note Each level of OnTOP security must have a specified password If ANY of the levels does not have a password entered then someone may gain access to OnTOP by just pressing lt ENTER gt when asked for a password GFK 0731B
100. cted time intervals These PID algo rithms can be connected to field inputs and outputs or interconnected in cascaded and other fashions to implement the User s desired control strategy Those who are already familiar with traditional PID control might want to skip the PID Algorithm Philosophy section and go directly to the PID Summary section The PID Summary section is asummary of the features available with the PID controllers and is probably all those familiar with PID loops need read For those Users needing or want ing a more detailed discussion the PID Algorithm Philosophy section provides the de tails ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B GFK 0731B PID Algorithm Philosophy The State Engine PID employs a traditional algorithm that compares a setpoint with a process variable to generate an error signal The error signal is acted upon by any or all of three parts proportional integral or derivative and the resulting output is the action that should be taken by the process actuator Each of the three parts has a tuning constant associated with it that can be adjusted to affect how the control action occurs The Proportional part or term uses the Gain tuning constant Its result is simply the product of the error the difference between the process input and the setpoint multiplied by the Gain It is an instantaneous value that changes as the error changes The Integral term
101. ction of the controller hopefully brings the process variable closer to the setpoint This causes the error to become smaller and decreases the proportional term but the integral term continues to increase as it adds on the error signal over time Ultimately the process variable equals the setpoint and the error is zero causing the pro portional term s value to be zero In addition the integral portion is no longer changing because the error is zero therefore the controller output remains constant equal to the value the integral term accumulated Any changes in process variable or setpoint cause an error and the controller will integrate to adjust the output to bring the system to equi librium Chapter 8 Reference 8 25 8 26 The addition of the derivative term makes the controller react more extremely when the error is first detected Then as a function of the Rate tuning constant this reaction decays out allowing the integral term to bring the system into balance and remove the error Simple PID Loop Many applications only require a simple PID loop to achieve the desired control results A process variable represented by an analog input is compared with a setpoint with the output of the PID controller being directly sent to a field actuator by means of an analog output To set up this simple loop the User needs only choose the Define PID function from the Define menu in ECLiPS The User then enters the name of the anal
102. cts the SLP to ECLiPS or OnTOP These serial ports can be RS232 RS 422 485 type ports See the sections on Write and Read Terms in the Language Description section of this manual for a discussion of how to program communications through the serial ports Configuring Serial Ports The attributes of each serial port may be changed by the State Logic Control program The parameters are changed by the Set_Commport keyword There is a discussion of using the Set_Commport keyword in the section that explains the LIST menu options Designating the Programming Port The programming port is the State Processor serial port to which ECLiPS or OnTOP is connected If ECLiPS or OnTOP is not connected to the programming port the SLP can not communicate to these software packages Port one is the default programming port To change the programming port select the State Engine Configuration option from the Debug Mode PROJECT menu Selecting RS 422 485 Serial Port Option By default both serial ports are RS 232 ports communicating at 19200 baud Either port can be changed to be an RS 422 485 port See the Series 90 70 State Logic Processor User s Manual for more information the serial ports especially the signal pin connec tions for the ports To select a serial port to be RS 422 485 select the State Engine Configuration option from the Debug Mode PROJECT menu CCM2 Protocol Serial Port CCM2 protocol is a standard open communic
103. ded to manipulate the files that make up a project There are functions that act upon the entire project such as retrieve and save as well as functions to utilize portions of a project such as import Retrieve a Project from Disk This function provides the user with a list of projects in the current working directory from which to choose After the selection the cursor is placed in the editor at the begin ning of the program Save Current Project to Disk This function saves the project in the current working directory Copy the Current Project to a New One This function creates a copy of the current program including all name definitions and configurations You give the new project a name and then there are two identical proj ects with different names Note To copy the current project be sure to use the copy option changing the path and saving the project copies only the current Task Group New Path Drive for Projects This function changes the current drive and or directory where ECLiPS uses this drive and directory when saving and retrieving programs Any valid drive and path may be entered ECLiPS creates several files when it processes the ECLiPS program The filenames of the created files use the project name with several different extensions These files are stored in the current directory To move a project to another directory or another com puter simply copy all of these files to the new location using DOS copying fa
104. digits will be displayed and no error will be generated If there is not enough digits for all the num bers to the left of the decimal point the display will not be output and a non critical error will be generated ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Shift_Register The Shift_Register function allows the User to shift values from one integer variable to another by a User selected number of bits The User can define up to 28 integer variables and connect them together to form a shift register The User then can shift the contents of each variable by a selected number of bits up to 64 to the right or left The User can choose to have the shift behave in a circular fashion where the bits from the variable farthest to the right shift to the farthest variable to the left Or the shift can be a fill type shift where the bits fall off the end and do not circle back to the first integer In the case of a fill type shift the User can choose the value 0 or 1 that is placed in the locations left empty by the shift If more than 28 integers are to be connected two shift registers can be cascaded by hav ing variable_28 of the first shift be the same as variable_1 of the next shift The User defined function parameters are Number_of_bits the number of bits to shift the registers 0 to 63 Shift_direction either R right or L for left The direction of the shift Type_of_shift either C for ci
105. e Start_Cooking Actuate Heater Wait 10 seconds go to the mixing State A logical ERROR in using a timer is demonstrated below Task Drill State PowerUp Go to the Punch_Down State State Punch_Down Energize Punch_Down_Output When Punch_Down_LS is true and if 3 seconds have passed Go to the Punch_Up State If it takes 3 or more seconds between the time the Punch_Down_Output is energized and when the punch down limit switch is met the Wait timer is immediately satisfied If the desired action is to wait 3 seconds after the Punch_Down_L5S is true then another State can be added as follows Task Drill State PowerUp Go to the Punch_Down State State Punch_Down Energize Punch_Down_Output When Punch_Down_LS is true Go to the Punch_Wait State State Punch_Wait Energize Punch_Down_Output Wait 3 seconds go to the Punch_Up State Chapter 5 Helpful Hints 5 5 Documentation Hints This section offers advice on how to more effectively use the ECLiPS documentation fea tures Descriptive Names When naming Tasks States I O and other data types it is extremely useful to use de scriptive names This will prove to be very helpful when debugging the program and when troubleshooting the production machine The following program provides an ex ample of descriptive name use Task Fill_Station State PowerUp If Can_At_Fill is on go to the Pour_Chem_1 State State Pour_Chem_1 Turn on Chem_Valve_1 When Fi
106. e groups of 4 BCD digits The functions then translate between the I O and either State Engine integer or float variables BCD_In_Convert The BCD_In_Convert translates between a series of digital inputs and an integer or float variable The User specifies the name of the first digital input in the series and the num ber of BCD digits 4 inputs per digit that represent the variable The User also specifies the type of variable and the name of the variable to store the converted value The inputs will be taken in hardware consecutive order and the number of digits can be on more than one block or card as long as the cards have consecutive addresses The User only need define with an English name the first digital input and initialize the blocks or cards involved BCD uses the standard binary representation for the numerical digits 0 to 9 There is no true standard for the minus sign or decimal point character Therefore the function has the provision for the User to optionally specify the hexadecimal number A B C D E or F where means hexadecimal number to ECLiPS that is the pattern for these two characters The function parameters are Starting input the English name of the first digital input in the string of consecutive inputs that form the BCD digits Number_of_BCD_digits the number of BCD digits The number of digital inputs in the string will be 4 times the number of dig its Variable_name the name of the variable t
107. e CPU Chapter 8 Reference 8 19 The current time values may also be saved using the Time Variables Make Start_Hour Hour Start_Minute Minute and Start_Second Second Use this flexible method of saving the current time to create any type of elapsed time timer needed Subtract the saved variables from the current Time Variables to get the elapsed time Number_Of_Hours Hour Start_Hour This Statement gives the number of hours that the clock has changed since the Start_Hour variable has been set Be careful to account effects of other Time variable rollover such as minutes going from 59 to 00 Standard Predefined Keyword Set This is the set of Keywords supplied with ECLiPS Up to 10 synonyms may be added for each Keyword The Default Keyword may also be changed The Keywords are broken into four categories Conditional terms Functional terms Operators and miscellaneous words that modify the meaning of a Statement In the following tables the default key word is displayed in bold print with some suggested synonyms in normal print Conditional Terms Keyword Synonyms Meaning Examples If When Test conditions and values actions executed when test returns TRUE condition e When the Forward_Limit_Switch is ON go e If Count is gt 1 go e If 3 56 seconds have passed For Until Test conditions and values actions are executed when the test returns a False condition e Actuate Stop_Light until Parts_Coun
108. e Timeout Diagnostic is not available LIST The LIST menu is the same for both Program and Modify Modes but there are some restrictions limiting changes and additions for 1 O and variables DEFINE The Modify Mode DEFINE menu does not allow new 1 O to be defined and the PLC 1 O Scan Rate option which specifies how often analog 1 O are scanned is not available FIND All of the options from the Program Mode FIND menu are offered in Modify Mode except the option to find the start of another Task PROJECT The only 2 options on the Modify Mode PROJECT menu are Translate and Download and just Translate The Translate Only option does an error check an then transfers to the Debug Mode The Task changes made in Modify Mode are not loaded into the controller These changes are not abandoned yet When the QUIT option is selected from the DEBUG menu ECLiPS asks whether to return to Online Editing or abandon the changes TEXT The TEXT options are identical to the Program Mode options SECURITY There is no SECURITY option on the Modify Mode menu QUIT The QUIT option returns to the Main Menu Setup and ECLIPS Memory Usage 8 88 The setup option is used to configure the ECLiPS system The two options that can be selected are the maximum number of defined data elements Discrete 1 O Flags Analog 1 Qand Variables to be used in the project and the maximum number of States in the project The number of data elements is may be from 500 to
109. e in sub string If the Operation character is an s the function will use the string variable named in the Reference_variable as a sub string and store those ASCII characters in the sub string defined by the starting and ending character numbers The characters in the string named as the Reference_value will be stored until the end of that string is reached or until the last character number in the main string is reached I for extract and convert to Integer If the Operation character is an I the function will extract the sub string defined by the starting and ending character numbers and convert those ASCII characters into an inte ger value and store that value at the integer variable named in the Reference_variable i For Convert integer To ASCII And Store In String If the Operation character is an i the function will convert the value stored at the integer variable named in the Reference_variable to ASCII and store that value into the sub string location defined by the starting and ending character numbers ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B F for extract and convert to Float If the Operation character is a FE the function will extract the sub string defined by the starting and ending character numbers and convert those ASCII characters into a float value and store that value at the float variable named in the Reference_variable f For Convert float To ASCII And Store In S
110. e not satisfied and Conditional Terms the Functional Terms are not executed For simplicity this rule assumes that the Conditional Terms are ANDed together See the reference section about combining Conditional Terms using the AND and OR logical keywords The Statements are executed one at a time In this manner every Statement of the active State is evaluated There are two types of Functional Terms that can prevent the execution of the rest of the Statements in a State One is the Halt command which stops program execution The other is the go to command which immediately causes another State to become the active State No Terms in a State are scanned after a GO is scanned in that State If Start_Pushbutton is pushed go to Start_Up State Write Press Start Push Button Now If 30 seconds have passed go to the Restart_Buzzer State This series of Statements causes the Start_Up State to become the active State when the input represented by Start_Pushbutton name is true When GO Term is scanned all Terms or Statements following this Term are not executed and at the next controller cycle the scan of this Task starts at the first Statement of the Start_Up State During the program scan any changes to variables are made immediately Therefore a variable change in one Task is visible by the rest of the program during the same scan On the other hand digital I O and Flag and analog values are made at the end of the scan T
111. e operation of the process under control is not difficult There are several techniques for accomplishing this coordination A good working knowledge of how to implement Task interaction is important to the efficient development of State Logic control programs The following are a few examples of situations and techniques for controlling Task inter action 1 Using a Variable to link Task Activities One way to communicate between Tasks is by using a variable Any Task has access to all variables even if the value for that variable is controlled by a different Task An example of States in two Tasks using the same variable Task Make_Parts State Refill_Bin If the Parts_count is greater that 100 pieces go to the Refill_State Otherwise go to the Grab_Base_Part State Task Conveyor_Control State Start_Station When Part_In_Place Switch is tripped then Add 1 to Parts_Count and go to Start_Conveyor 2 Changing the State of one Task from another Task A common technique for implementing this type of Task interaction might be in connection with an Emergency Stop Button Commonly a designer may want every State of a Task or Tasks to take a specific action should an E Stop Button be pushed It would work perfectly well to specify the recognition of and reaction to the E Stop button activation in every State but this would be unnecessarily cumbersome A much more efficient method would be to create a separate E Stop Task that forces a ch
112. e register and I O memory locations available in the CPU The part used by the SLP must form a contiguous block within the limits of the selected CPU and interface type Use this option to identify the lowest number of the block accessed by the SLP for each memory type A form is displayed to identify the base or starting number of the block to be used by the SLP program PLC Output Base This option appears on the menu only when the interface type is chosen to be Controller Large When either of the Controller types is chosen each of the memory types is split in halves so that one half are all inputs and the other half all outputs These designations cannot be changed when one of the data elements is defined This option though does allows the base or starting number for the outputs to be ad justed so that the numbers of inputs and outputs can be changed All of the upper part are outputs and the lower part inputs By adjusting the location of the base of the out puts the size of each part is changed Find These functions move the cursor around in the English text quickly and allow single and global replacements of text Find a Text String This function allows a user to enter any string of characters that may be present in the English text ECLiPS then begins searching forward through the English text from the current cursor location until the first occurrence is found The cursor is then placed at that position If it is desired to
113. e through the current serial port an information panel is displayed presenting sev eral options Select the Try to Connect Again option to attempt to connect to a State Engine again Use this option to make another attempt to communicate with the State Engine usually after checking cable connections or powering up the State Engine Use the Change Host Comm Port Settings option to change the current port to COM1 or COM2 or to change the baud rate setting After the change is saved ECLiPS trys to complete the download operation Select the Abandon Operation option to stop the download operation and return to the editor Error Check the Current Project This function checks the project for errors issuing a statistics report if there are no errors If an error occurs the cursor is placed at the line of the error and an error message is dis played If no errors are found a statistics report including data such as project size and number of Tasks and States will be displayed on the screen The Error Check causes the project to be saved and asks whether to check for undefined words Also a translation is made and saved to disk All the operations of a download are made except actually sending the translated program to the controller Translate Project The translation is the changing of the English program to a format executable by the State Engine This translated program is saved in a file in the current directory and ha
114. ecked to make sure they are not in the middle of their operations so that the conveyor can be started Both of these Tasks must be in either the PowerUp or the Wait_for_Can_removal State before the Conveyor Task goes to the Start_Conveyor State The conveyor runs until the starting can has moved off the Can_In_Place switch then the conveyor runs until a can either reaches the fill station or the mix station The con veyor now stops and waits until a new can is placed in the starting position Now you should be able to enter the Conveyor Task on your own a80018 Task Conveyor State PowerUp If Can_In_Place is ON go to Fill_Station_Wait State State Fill_Station_Wait When the Fill_Station Task is in the PowerUp State or the Fill_Station Task is in the Wait_for_Can_Removal State go to Mix_Station_Wait State State Mix_Station_Wait When the Mix_Station Task is in the PowerUp State or the Mix_Station Task is in the Wait_for_Can_Removal State go to the Start_Conveyor State State Start_Conveyor Start Conveyor_Motor When Can_In_Place is OFF go to Moving_Cans State State Moving_Cans Run Conveyor_Motor When Can_At_Fill or Can_At_Mix is ON go to the PowerUp State Figure 4 4 Conveyor Task There are several important points illustrated by the program lines for this Task Notice the States Fill_Station_Wait and Mix_Station_Wait how to test for multiple conditions using the OR logical operator Also notice that in both the Start_
115. ecognizes and responds to messages sent to its ad dress which may be any number from 1 to 89 The default address will be 1 and the User should assign a Station Address to match the number the Remote Master expects The Station Address should be validated or assigned before CCM2 protocol communications is enabled If the Disable function is chosen all CCM2 communications is immediately discontin ued even if in the middle of a message and all inputs on that serial port are taken to be ASCII character inputs that will be handled as appropriate to the current State Engine program execution CCM Data Types The CCM2 as well as many other standard protocols were designed for host computer communication with PLCs To access State Engine data the CCM host computer must identify each data element with a CCM number and a CCM type The types of informa tion accessible from the State Engine plus the respective CCM information are listed in the following table fanaog7O OO PD toopFarancies E Integer Variables ft 601 700 Floating Point Variables 1 70 800 String Variables a M ooo Character Variables fF 1 9001 9500 Discretel O Table 8 1 State Engine Data Types and CCM References oe oe oe paj a a in ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B GFK 0731B The State Engine assigns this CCM information to each data element in the program To access this informa
116. ed Each Statement must have at least one Functional Term Conditional Terms are optional If there are no Conditional Terms in a Statement the Functional Terms are al ways executed during each scan When Conditional Terms accompany Functional Terms in a Statement the Functional Term is executed when all of the Conditional Terms are satisfied There are four types of conditional Terms see the reference section Conditional Terms are satisfied as follows 1 Read When valid data is received at the appropriate channel 2 If When the conditional expression is TRUE To understand how Statements are scanned assume that the Statement Conditional Terms precede the Functional Terms and that the scan proceeds from left to right Chapter 3 Creating a Control Program 3 9 3 10 a80003 Functional Term Ba Satisfied Conditional Term Functional Term Ka Unsatisfied Conditional a Functional Term ae Satisfied Conditional Term Unsatisfied Conditional Term 7 Functional Term Figure 3 2 Statement Scan The Statements of a State are executed in the order that they are written into the pro gram Functional Terms of Statements with no Conditional Terms are always executed Conditional Terms in Statements control whether or not the Functional Terms in those Statements are executed If all of the Conditional Terms are satisfied the Functional Terms are executed If any of the Conditional Terms ar
117. editor and compiler designed to create State Logic control programs for one of the State Engine controllers This section ex plains all of the menu selections available in the ECLiPS Program Mode The ECLiPS program includes the English text the name definitions and system setup information The English text is edited by the wordprocessing functions and other spe cial functions are available to help enter some of the program text Another class functions define names used in the program to identify I O points vari ables Tasks States and elements of the control program Still more functions are used to specify system parameters such as security scan control and system setup options These functions are available through the Program Mode menu accessed by pressing lt F3 gt The following sections proceed through all of the menu options available in the Program Mode describing how to use each one Add All of the ADD options are used to add program lines to the English text through the use of fill in the blanks forms The ADD options always enter text into the program This text is no different from text entered from the keyboard and may be edited as other text is edited ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Add a New State This option prompts the user to enter a name for the new State followed by an optional Max Time diagnostic value The Max Time diagnostic displays a run time me
118. ee eee 3 1 Identify the Tasks iridir aiins oree ea a aT KAE E E AAE E ERE E 3 1 Identify The States 10 ar na E r a E E eee 3 2 Identify the Statements 0 66 3 3 Writing The Prograimic ccccc ci acce a ae Pasei SEA a ad Mae Ae ss 3 3 Using English Names in the ECLiPS Program 000000 3 4 Statement Structures o ee aaa eee eee 3 5 Constructing Statements ssas sanane rrer errara rrr rarene 3 6 Using Keywords Synonyms and Filler Words 000005 3 6 Using Variables oe dse iaio e eE E E ER EE EEE E E RS 3 7 Programi Scari der serr aces pedea A ea nee ae PRAM na er AA REA 3 9 GFK 0731B ECLiPS English Control Language Programming System User s Guide March 1998 vii Contents Chapter 4 Programming Tutorial 4 views baal aseniwad eka ba ei nee duos 4 1 Tutorial Procedure ie ced es vee Weeds ds eee eed eee ee OS ewe eee eae 4 1 The Control Application 0 0 6 4 2 Outline the Application eiecit oeie e E a E E eee eee 4 3 Identify the Tasks meretee ena eee Ea 4 3 Identify the States 6 eee eee eee 4 3 Identify the Statements s mesha mened ee e Koe A EE E 4 6 Writing the Program oi ses sanee a A Ee eee eens 4 8 Identify thel O nencia ek a ae cee teed E aE 4 8 The Basics of ECLIPS terp rin a eee E E 4 9 Program the Fill Station Task 2 0 66 0 6666s 4 11 Define Undefined Words 0 4 14 Checking Your Work and Making Changes 0000005 4 16 Program the Mix St
119. een 1 and 10 corresponding with the position in the list of tables ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Select a Monitor Table This function will display a list of the available monitor tables and allow the user to select one The selected table will then become active in the monitor window Modify the Current Monitor Table This allows a user to add and remove elements from the current monitor table The list below shows the types of elements that may be monitored Analog Channels String and Character Variables Digital Points Internal Flags Numeric Integer and Floating Point Variables Register Variables Reserved System Variables Current State of a Task Remove Current Table This function removes the current monitor table Clear All Monitor Tables This function clears all of the defined monitor tables View View English Text This function allows the user to view the English text while debugging There are sever al functions available while the text is being viewed Find a Text String To find a string of text in the English Text press lt ALT F gt then select Find a Text String Enter the String of text to find and press lt ENTER gt Perform the Next Find To find another occurrence of the string of text entered in the Find option press lt F5 gt or press lt ALT F gt then select the Perform the Next Find of the Entered Test String
120. ents to the control program Keywords are the vocabulary of ECLiPS and together with filler words make it possible to easily write understandable descriptions that are the control program This vocabu lary may be changed to suit any desired convention All of the keywords synonyms and filler words may be changed ECLiPS can therefore be configured so that the pro gram is written in a foreign language A menu based window function allows the user to make these assignments at any time during an ECLiPS programming session In addition another menu based window function allows the user to see a list of all synonyms previously assigned and to select one to enter into the program Use the flexibility to create a language that fits the terminology of the industry or plant etc where ECLiPS is to be used The written ECLiPS programs become even clearer to all involved with operating and maintaining the plant as they use the English names for the process points and the local terminology for the actions and descriptions Using Variables Statements manipulate variables in addition to controlling the I O At times the applica tion requires responses to values other than those represented by real field sensors Ex amples of this might be the number of parts built during a shift the flow through a pipe calculated based upon the pressure drop across the pipe the style of part being built this production run etc Items stored in variables are the
121. er input conditional and there can not be any other Terms in the Statement If two character input conditionals for the same port are written in the same State it is unknown which conditional receives a mes sage from the port The types of variables used with the Read are Integer Variables Floating Point Variables String Variables Character Variables If the type of data received does not match the variable type the input is ignored and the conditional is not satisfied An example of invalid data is entering string of charac ters to a numeric variable The input is completed and the conditional is true when an end of message character is received at the port The default end of message character is the carriage return so that normally the input is completed when the lt Enter gt key is pressed The end of message character may be changed by the Set_Commport Functional Expression Input to a character variable is complete as soon as one character is received so that a character is stored and the GO executed as soon as any character is received IMPORTANT Character variables cannot be used to receive input through the pro gramming port when connected to ECLiPS or OnTOP Mathematical Calculations Variables GFK 0731B Mathematical calculations are used in Functional Terms as in this assignment Term Make Pointer_Position Last_Position Forward_Pressure 345 8 and in Conditional Terms as in this comparison term If Adv
122. ere are two types of Functional Terms that can prevent the execution of the rest of the Statements in a State One is the Halt command which stops program execution The other is the go to command which immediately causes another State to become the active State For example If Start_Pushbutton is pushed go to Start_Up State G0 to Restart State causes the Start_Up State to become the active State when the process input represented by Start_Pushbutton is true All Terms or Statements following this Statement are not executed and at the next controller cycle the scan of this Task starts at the first Statement of the Start_Up State GFK 0731B Chapter 8 Reference 8 65 8 66 TASK 1 State 1 Statement 1 State 2 GO Statement Statement 2 State 3 Statement 1 TASK 2 State 1 Statement 1 C GO Statement Statement 3 State 2 Statement 1 TASK 3 Figure 8 7 Program Scan with GO Terms p Functional Term E a Satisfied Conditional Term GO Functional Term E Unsatisfied Conditional Term F nctional Term Satisfied Conditional Term Unsatisfied Conditional Term Functional Term Figure 8 8 Statement Scan with GO Terms During the program scan any changes to variable and analog values are made immedi ately Therefore a variable change in one Task is visible by the rest of the program dur ing the same scan On the other hand digital I O and Flag conditions are made at the end o
123. ese scans occur hundreds of times each second Before each program scan all of the inputs are scanned so that each Statement of the program makes decisions based on the same input information During the scan of the program the active State of each Task is scanned Each State ment of a State is scanned in order from the first Statement to the last unless a GO Term is encountered As soon as a Go is scanned no more Terms in this State are scanned and the scan moves to the active State of the next Task Another State is scanned during the next scan sweep While scanning a Statement the scan evaluates all conditional Terms before implement ing the action described by the functional Terms If any conditional Term is not satisfied or false the scan of this Statement is stopped the functional Terms are not implemented and the scan resumes at the next Statement of the State The State Engine keeps a table of all digital outputs and flags which are set ON during the program scan Only the outputs set ON by one of the functional Terms in one of the active States during the scan are set ON all others are OFE The real world outputs and flags are set ON at the end of the scan Therefore an output does not go OFF during the transition from one active State to the next when that output is set ON in both States This scan discussion is a general overview of the program and I O parts of the scan The reference section of this manual has a more detailed
124. f the program dur ing the same scan On the other hand digital I O and Flag conditions are made at the end of the scan Therefore if one Task makes a change to the condition of a digital out put or Flag the condition cannot be tested by another Task until the next scan through the program Chapter 5 Helpful Hints 5 9 Hints for Using ECLIPS Features How to Use the ECLIPS Menus There is one starting menu for each mode of ECLiPS Press lt F3 gt to view the main menu when in Program Mode or Debug Mode Options are selected from all ECLiPS menus in the same manner Use the up and down arrow keys to highlight the option and press the lt Enter gt key A quicker method of making a selection is to press the highlighted letter of the desired option Each option has a letter usually the first letter that is displayed in a different color or highlighted for monochrome monitors Using ECLIPS Hot Keys The most popular menu options may be selected without using any menus by pressing a Hot Key Any Hot Keys are listed to the right of the option on the menu where the op tion is displayed A full listing of all key functions is available at any time by pressing the help key lt F1 gt twice The Reference section of this manual has a table of Hot Keys in the Keyboard Defini tions section Notice that the Hot Keys are assigned in a manner to make it easy to re member their functions All of the Hot Keys which refer to options from the Project
125. f the same type and the Table that the values are co pied from must have a less or equal number of rows and columns than the other Table The Table s elements will be copied into the corresponding Table s elements If the first has less rows or columns than the second then the elements that do not exist in the first Table will be left unchanged in the second Table When the User selects one of these functions from the Perform menu the following in formation will be requested Table_To_Copy_From the number of the Table from which the values will be copied Its row number and column number must be less than the other Tableidentified Table_To_Copy_Into the number of the Table the values will be written into The State Engine will generate run time critical errors if the two Tables selected are not the same type or if the Table to copy from is larger than the other Table Table Uses There are many uses for the Table functions As an example the Table functions are valu able in applications where the set up of parameters varies depending on the product under manufacture on the process line Batch process recipes or flexible manufacturing assembly lines are examples The ECLiPS program can be written using English name variables for parameters throughout with statements such as If Oven_temp_1 is greater than Melting point used throughout the program description of the process Then in a State lets call it the Select_Product St
126. f the scan Therefore if one Task makes a change to the condition of a digital out put or Flag the condition cannot be tested by another Task until the next scan through the program ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Other State Engine Setup Options Run time Error Setup The are several errors which may occur during execution of the State Logic program such as divide by zero or integer overflow or perform function errors Run time errors are divided into critical and non critical categories The default response of the State Engine is to halt the program when a critical error oc curs and to continue program execution after a non critical error These responses may be changed through options on the Debug Mode PROJECT menu Automatically Start Program Execution By default the State Engine powers up in the Halted mode The State Engine can be set up to automatically start running the program when power comes on To set up the State Engine to automatically execute the program on power up select the State Engine Configuration option from the Debug Mode PROJECT menu When set to automatically run the program the previous settings of other State Engine setup op tions are also invoked on power up including programming port CCM Enables CCM Station Number Error Response Setup serial port RS 422 485 status and Simulation Mode Status Making a Permanent Copy of the Terminal
127. fined as a sequence of States Each State is defined by two components actions that occur while that State is active and the transitions to other States In the control world actions are turning ON digital outputs setting variable and analog output values sending messages to an operator etc Turn ON Mixer_Motor is an example of an ECLiPS program line describing the action of a State Transitions are a little more complicated since they are themselves defined by two com ponents the condition controlling the transition and the target State If Part_In_Place switch is ON go to Start_Conveyor State is an ECLiPS program line representing a transition of a State In the control world conditions controlling transitions are the status of the digital inputs the values of vari ables and analog inputs elapsed time etc The target State is the one which becomes active when the condition is true A sequence of states often forms a complete loop of activity In pure Finite State Ma chine science these sequences are each called State Machines ECLiPS calls each such sequence a TASK GFK 0731B 2 1 2 2 It is traditional to diagram Finite State Machines with circles and arrows The actions of a State are written inside the circles The arrows show the transitions with the condition component of the transition written next to the arrow The following unlabeled State diagrams show two simple Finite State Machines or Tasks a80
128. formation is transferred between the SLP and the CPU This selection is chosen from the CPU Type option on the Define menu and is also presented whenever a new project is created The possible choices are Co Processor Controller Small and Controller SLP CPU INTERFACE a80013 CI INFORMATION S TRANSFER Pa SERIES g0 70 LJ BACKPLANE P Figure 8 3 SLP CPU Interfaces The Co Processor method of transfer is easy to implement since the communications between the SLP and the CPU are handled automatically by the SLP and the input and output designations for each of the memory types can be mixed throughout the range for that type The Controller methods are faster since the communications are handled by Ladder rungs of logic executing in the CPU The ranges for each of the memory types is split so that the upper range is all outputs and the lower range is all inputs These inputs and outputs cannot be mixed when the Controller interface methods are used ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Co Processor Interface Option The Co Processor interface method allows the discrete and register values to be set up specifically for the needs of each application Use the Co Processor method for either State Logic only control or with hybrid State Ladder Logic control systems a80014 COP ROGE CSUR MODE SLP MEMORY ACCESS SLP MEMORY RANGE BASE T
129. g at the R register number which follows the R_Register keyword In the example above the characters in the string ERROR Number 16 are stored in successive bytes starting at R10 The serial data can be a mixture of typed text variable values ASCII control characters and formatting characters The typed text are any characters entered directly from the keyboard The text may in clude carriage returns so that several lines can be entered in one Write Term Multiple line messages can be formatted in the program exactly as they appear on an terminal screen Write Opening Operator MENU 1 Change Today s Date 2 Change the Current Time 3 Engage Startup Procedure 4 Restart the Process to Operator_Panel The menu from this Write Term appears on the operator screen just as it does in the pro gram The limit of the number of characters between the quotes is 512 which is about 7 full 80 character lines of text Variable values are sent out the port by preceding a variable name with a Write Current parts count is Part_Count to Operator_Terminal If Part_Count is 10 at the time the Write Term is sent this Statement displays the follow ing line on the screen connected to the port named Operator_Terminal Current parts count is 10 Chapter 8 Reference 8 7 Formatting Characters that are used with the Write Term follow NOCRLF Write Terms always send a carriage return line feed pair follo
130. g channels are scanned The entries in each row represent the blocks of channels that are scanned for that 1 10 second time interval There are 8 columns each representing a block of 8 channels so that up to 84 analog channels can be scanned every 1 10 second If a block is to be scanned every interval or 10 times a second then that block must appear once in every row of the form There are 4 data entry locations at the top of the form To enter values into the form fill in these data entry locations for the Time Entry Row Block Entry Column Type and Number Item is entered into the form when the Number value is entered PID Loop Initial Values The data entered in this form are the initial values given to the PID Loop when it is started under program control See the section on PID Loops for more information on these values Communication Port Configuration The values entered in this form may be used to enter a communications port name or configure a communications port See the Communications Port part of the System Con figuration Section and the LIST option for more information about serial port configura tion and use PLC Type Use this option to specify the CPU model number and the type of SLP to CPU interface used for this project See the SLP to CPU Interface section of this manual for more in formation about these selections GFK 0731B Chapter 8 Reference 8 73 8 74 PLC I O Ranges The SLP uses a part of the availabl
131. g unit value for 0 scale or blank to Scale use 0 Low Limit Minimum allowable value for the Output GFK 0731B Chapter 8 Reference 8 29 8 30 Low Limit Max LL_Max Engineering unit value for 100 scale or blank Scale to use 100 Low Limit Min LL_Min Engineering unit value for 0 scale or blank to Scale use 0 There are also PID status and command bits associated with each PID loop These bits indicate information about the status of the PID loop or may be used to control the PID loop To use these bits in an ECLiPS program the PID name is used followed by the key word for the bit The ECLiPS statement If Tank_Level High_Limit_Status is true go to Manual_Mode State makes Manual_Mode the active State of the Task if the output of Tank_Level PID loop is at the high limit value The ECLiPS statement Set_Bit Tank_Level Track_Mode makes the Tank_Level PID loop tack the output so that there is no error signal PID Command and Status Bits Status or Keyword Description Command Bit Block Up Block Up When this bit is set the PID does not integrate up for a positive error signal Used for Anti_Reset Windup Block Down Block_Down When this bit is set the PID does not integrate down for a negative error signal Used for Anti_Reset Windup Track Mode Track_Mode When this bit is set the PID tracks the output so that no error is calculated Used for a bumpless transfer to automatic mode High Limit Status High_Limit_Sta
132. ge for the module Some normal ranges of raw analog values are 0 to 4095 or 32768 to 32767 These raw values represent some real world values For example a scale might have a range of 0 to 50 pounds actually sending an analog signal of 0 5 volts to an analog module The module converts the analog signal to an integer value in the range of 0 to 4095 If the scale detects 25 pounds it sends a 2 5 volt signal to the analog module which converts the voltage to a number 2047 You can have ECLiPS do the conversions of raw analog values to real world engineering units for you After each analog channel is defined ECLiPS asks if you want to scale this channel If the answer is YES a form is displayed which accepts four values which speci fy how the scaling is done The D A and A D values are the raw values and the engineering units are the converted values Two scaling points where the conversion of A D or D A value to engineering val ue is known are specified In the example of the scale the low scaling point values are 0 for the A D or D A and 0 for the engineering units The high point is 4095 for the A D or D A and 50 for the engineering units After these points are specified the State Engine can convert any other raw value to the correct real world value so that a raw value of 2047 is converted to 25 for use in the State Logic program When analog channels are scaled the State Engine converts the raw analog values to floating point number
133. general overview of the product instructions on using this manual installation procedures hardware requirements and sources of information about using ECLiPS Chapter 2 State Logic Control Theory This chapter has two main topics The first part discusses State Logic Control Theory and how it differs from traditional control models The second part discusses the ECLiPS implementation of State Logic Control Chapter 3 Creating A Control Program This chapter presents the fundamental con cepts of how a control program can be built using ECLiPS Every designer will develop his own style in using ECLiPS ECLiPS is designed to support and even to encourage personal or corporate program development styles Chapter 4 Programming Tutorial This chapter presents a step by step procedure for writing a control program for a specific application Follow along duplicating each key board entry on your own computer Watch for the text displayed in bold italics these are the lines that you should enter Chapter 5 Helpful Hints The hints and suggestions found in this chapter have been developed by ECLiPS and State Language programmers in an effort to make the user s first programming experience as productive as possible There are two parts to this chapter one giving hints for programming and the other has suggestions for using the tools provided as part of ECLiPS Chapter 6 Online Tutorial This chapter is a tutorial that explains the
134. gister types are described in the following table R Stores a value in sixteen bits State Logic Program Register Variables access these memory locations A Register Variable can be either an integer or floating point value Floating point values use 2 R registers The write and read terms can also access these locations for character values SAI Real world analog inputs These locations store the value of the inputs following the last scan of analog values AQ Real world analog outputs The CPU transfers these values to the analog outputs during the normal execution cycle Register Memory Types State Logic program references to CPU memory locations are user selected names that are identified by the memory type and a number representing the storage location ie Q14 Input Output Memory Designation Every CPU memory location used in the SLP program is specified to be either an input or an output to the State Logic program Output memory locations can be changed WRITTEN or used READ by a State Logic program but inputs can only be read Therefore if the State Logic program is going to change a memory location it must be defined as an output but if the Ladder Logic program in the CPU is going to change the memory location it must be defined as an input for the State Logic program The CPU and SLP cannot both change the same memory locations Any communication between a State Logic program and a Ladder Logic program re quires
135. haracter for example Make Test_String equals abc 1 Bxyz Is an assignment to a String Variable to store the characters abc the escape character and then xyz The R Register Variables can also be used to store character information in the CPU R registers Use the Write term to send characters to the R Register variables and the Read term to retrieve characters from the Register locations Two characters are stored in every R location Use the R Registers when the stored information needs to be used by either the CPU ladder program or some other device that can access the CPU memory locations Numeric Variables The numeric variable types are Integer Floating Point Time Analog and R Register The numeric data types are described later in this section Analog Variable are the analog 1 O connected to the system Analog values are floating point if they are scaled and integer if left unscaled The scaling option is selected when the analog channel is defined Time Variables store the current time information from the SLP system clock The reserved time variables are second minute hour day and month These variables are integer values and should not be changed To set the clock use Logicmaster 90 to set the CPU clock and then cycle power to the system On power up the SLP clock is initialized To keep the SLP clock in synch with the CPU it is reset to the CPU clock once every day at midnight R_RegisterVariables are stored
136. he inputs and outputs can be mixed over the range of each memory type If program performance is an issue it is important to keep the outputs contiguous If the outputs are split up there is an adverse effect on the system response time The translator issues a warning if the outputs are not contiguous Whether the Co Processor method or Controller methods are used the CPU must be placed in the run mode and I O enabled for the State Logic program to access the real worldl O GFK 0731B Chapter 8 Reference 8 49 8 50 Controller Interface Options The Controller options provide higher system performance and require rungs of ladder logic in a program running in the CPU to handle the information transfer The Small Controller option is used for State Logic only control systems The Large Controller op tion for a dual processor hybrid State Relay Logic system with the CPU executing a con trol program concurrently with the SLP execution of a State Logic program For both of the Controller types the ranges of each memory type are split into two sec tions the upper part is all outputs and the lower part inputs By default each range of memory type is split in half When an I O or register number is selected ECLiPS auto matically selects the input output option a80015 CONTROLLER SMALL MODE SLP MEMORY ACCESS RAR S X SLP MEMORY INPUTS OUTPUTS RANGE BASE The exception to this rule is how the actual I O points are co
137. he starter motor is no longer cranking the engine Each Task is divided into States The aggregate activity described by all of the States of a Task defines all the possible behavior of that Task under all conditions A State defines the values for the outputs sends messages performs calculations and assigns values to data variables States also describe transitions to other States Only one State is active and executed in a Task at any time If two States need to be active at the same time then a concurrent Task is required Every Task must have at least one State When the controller is powered up the Task goes to this State called the PowerUp State which is the first State in the execution se quence of the Task Thereafter activity can move to any other State based on the State ments in the active State Statements The Command Set for State Descriptions GFK 0731B State Raise_Mixer Write Mixer Moving to Operator_Panel Turn on the Mixer_Up_Motor When the Mixer_Up_Switch is tripped then go to Mix_Complete Example ECLiPS State with One complete Statement Highlighted In the automobile engine Starting System example we would find that to make a com plete description of the Starting System Task activity would have to be described in greater detail We could break down each State into a set of Statements that completely described the full and possible ranges of activity of that State Let s give the name Star
138. herefore if one Task makes a change to the condition of a digital output or Flag the condition cannot be tested by another Task until the next scan through the program ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Chapter Programming Tutorial 4 This section presents a step by step procedure for writing a control program for a specific application Follow along duplicating each keyboard entry on your own computer Watch for the text displayed in bolditalics these are the lines that you should enter To best understand this tutorial you should first read the sections on State Logic Control Theory and Creating a Control Program sections 2 and 3 Tutorial Procedure Allthat is required to follow along with this tutorial is a computer with ECLiPS installed All of the examples in this section deal with programming and can be executed without connecting ECLiPS to a State Logic Processor On the other hand the Online Tutorial section describing run time debugging and monitoring functions does require ECLiPS to be connected to an SLP The programming procedure described in the Creating an ECLiPS Control Program section is used in this tutorial The first step in creating a control program is to write a general outline of the application e Identify the Highest Level of the Outline The Tasks Decompose each Task into its Sequence of States Write the Statements which Describe the Acti
139. iable range checking diagnostic is identical to the analog range checking diagnos tic except it checks variable values instead of analog values Adda Perform Function The Perform functions implement special purpose operations ECLiPS automatically enters the English instructions for these functions from information entered in the pro vided form Perform functions are Functional Terms and must be the only Terms in the Statement There may be an unlimited number of Perform functions in a State For a more detailed description of the perform functions see the Language Description part of the Reference Section of this manual GFK 0731B Chapter 8 Reference 8 69 8 70 List The List option is used to view and change lists of user defined names for I O points variables PID Loops Communication Ports and Internal Flags The predefined lists of Keywords Filler Words Math Functions PID Parameters and System Time Variables are also available from the List option All of the lists may be modified except the Math Functions Time Variables and PID Parameters The List option is also useful for select ing aname and entering it into the program at the current cursor location When the list option is selected the LIST menu is displayed showing all of the categories of names After selecting a name category the bottom bar displays the keys available to perform different functions with the LIST lt Ins gt Add to List lt Del gt Delete from
140. ial Port Configuration Term The Term to change the configuration of a serial port is the Set_Commport keyword fol lowed by a port name and then a list of parameters and their values Port Configuration Term Set Commport lt P ort Name gt _ lt P arameter Value List gt This Functional Term is automatically entered into the program by using the Commu nication Ports option on the LIST menu Select the port and press the right arrow key gt to change the configuration options When configuration is complete select the Insert Reconfiguration Data for the Port option from the next menu The entire Term is entered into the program at the current cursor location ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Perform Function Term This Term is the Perform keyword followed by the function name the keyword _with and then a list of parameters and values Perform Function Term Perform lt F unction Name gt with lt Parameter Value List gt This Term is entered automatically by ECLiPS at the end of the State where the cursor is located First select the Add option from the menu then the Add a Perform Function option Fill in the blanks that are displayed after selecting the function desired ConditionalExpressions GFK 0731B Conditional Expressions are used for receiving information in a serial port and for test ing a value or status The Functional Ex
141. ill Station A Power Up B Pour Chemical 1 C Pour Chemical 2 D Wait for Can Removal II Mix Station A Power Up B Lower Mixer C Mix Chemicals D Raise Mixer E Wait for Can Removal III Conveyor Outline Showing Fill Station and Mix Station States Conveyor States The conveyor operation is described by a series of five steps Step 1 During the starting step the Conveyor waits for a can to be placed on the conveyor When a can is in place the next step starts Step 2 This step is a check on the Fill Station to see if it is finished with its operations When the Fill Station is either waiting for a can to be removed Step 4 or waiting for a can to arrive Step 1 the next step is started Step 3 Similar to the previous step this step checks the Mix Station to see if it has completed its operations If the Mix Station is either waiting for a can to be removed or a can to arrive the conveyor may be started and the next step is started Step 4 This step starts the conveyor moving and continues until the can placed in the starting position has moved enough for another can to be placed on the conveyor Step 5 During this step the conveyer continues to run until a can reaches either one of the two stations then the procedure restarts at the first step GFK 0731B Chapter 4 Programming Tutorial 4 5 I Fill Station A Power Up B Pour Chemical 1 C Pour Chemical 2 D Wait for Can Removal II Mix Station A
142. immediately satisfied causing the following GO Term to be executed All other variable types used with READ wait for an End Of Message Character to be received before the input is satisfied The default End Of Mes sage Character is a Carriage Return so that normally the READ is satisfied when the lt Enter gt key is pressed The End OF Message Character can be changed by using the Set_CommPort keyword It is possible to have two Read Terms for the same port to be active at the same time This arrangement can only happen if the Read terms are in separate Tasks When two ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Read terms are active at the same time it cannot be predicted which one may receive the next input from the port It is a good practice to place all read terms for the same port in the same Task so that only one Read is active at a time Timer Considerations GFK 0731B Alltimers in ECLiPS monitor the time that the current State has been active This meth od of establishing a timer applies to the IF FOR and WAIT conditional terms Another way to think of the Wait Statement is as a conditional term that says On the condition that this State has been active for __ seconds If the State has been active for the amount of time specified the condition will be seen as a satisfied condition An example follows Task Cook State PowerUp Go to the Start_Cooking State Stat
143. in_Heater on if Start_Switch is on Write Parts Run Complete to User_Panel Statement examples with Functional Terms highlighted After 3 seconds pass start Drill_ Motor Turn Main_Heater on if Start_Switch is on Open Vent when temperature is greater than 100 degrees Statement example with Conditional Terms highlighted Functional Terms describe an action to perform when they are reached in the execution of a Task Conditional Terms describe a condition that needs to be evaluated to decide whether the Functional Terms in the Statement should be executed at this time A Functional Term such as turn_on Motor_A or close the Red_Clamp generally has a verb that describes the action such as turn_on close plus a variable name or I O name such as Motor_A Red_Clamp Terms are combined to form Statements Most Statements will be a sentence or a phrase A Statement may be entirely made up of a Functional Term such as Turn_on the Auto matic_Mode_Lite A Statement can also be a combination of Functional Terms such as Turn_on the Automatic_Mode_Lite and the Main_Conveyor Often a Statement is a combination of a Conditional Term and a Functional Term such as If Motor_A is on turn_on the Automatic_Mode_Lite and start Main_Conveyor Every Statement must always have at least one Functional Term A Statement can con tain more than one Conditional Term or a Conditional Term that
144. ing for the User to select Number_of_table the Table number from 1 to 100 Type_of_table the type of variables I for integer D for digital or F for float S for String stored in the Table elements Number_of_rows the number of rows of the table Number_of_columns the number of columns Save_value_over_halt indicates whether the Table should be saved through a halt run cycle Y or N At State Engine run time a non critical error with a message will be generated if the Table number specified has already been defined The Table will not be re defined and the original definition will be retained To avoid this error the User should place this function in a State that only executes once The only other non critical run time error that can occur is if the table number specified is greater than 100 Entering and Retrieving Table Values There are four Swap_Table_Value functions that are exactly the same except they work on the three different types of Tables Swap_Table_Value_Int Swap_Table_Value_Fit Swap_Table_Value_Dig Swap_Table_Value_Str These functions allow the User to write a value from a variable of the same type into a Table element or to read a value from a Table element to a variable There are four dis tinct functions of different types so that ECLiPS can check to make sure the variable named is of the same type as the Table specified ECLiPS English Control Language Programming System User s Guide March 1998 GFK 07
145. ing sections there are several examples of how to use the various State Logic expressions plus a description of the different ways to use the expressions There are so many different combinations possible that it is necessary to use some notational conventions to rigorously define all of the possible structures Identifies Keywords Encloses terms which are optional Encloses terms which may be repeated Encloses a generic description of a term Pe i Indicates that the term before or after may be used at this point Group Terms Together Language Structure Notational Conventions ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B The State Logic hierarchy terms described in the previous section are now specified using these notational conventions Program lt Task gt A program is one or more Tasks Task Task lt Task Name gt Start_In_Last_State lt State gt A Task is the keyword Task followed by a colon and then optionally the keyword Start_In_Last_State then a Task name and one or more States State State lt State Name gt lt Statement gt A State is the keyword State followed by a colon then a State name and optionally one or more Statements A State does not require any Statements Statement lt Conditional Expression gt lt Functional Expression gt lt F unctional Expression gt lt Conditional Expression gt Ever
146. is displayed to enter the Name of the State that is created the format of the display the communications port to send the information and the State to branch to after the operation is completed Get User Input This function enters program text used to retrieve information through a communica tions port A form is displayed for entering the following options Current State Name of the State that is created Clear Screen Option of clearing the screen before the prompt is displayed Screen Message Prompt telling operator to enter some information Input Variable Variable that stores the input Comm Port Which port is used Branch To State State that becomes active when this process is completed User Menu This function will display a menu of up to 10 items and then wait for the user to enter a selection If the selection is valid it will branch to desired State for that selection This is very useful when creating a user interface for the control program GFK 0731B Chapter 8 Reference 8 43 Keyboard Definitions Function Key Definitions Functions lt Alt Key gt lt Ctrl Key gt lt Shift Key gt Help Toggle Insert Project Error Help Overtype Mode lt F2 gt Save File to Disk Send to Controller Retrieve from Disk Check for Errors Menu o a L TERE View Define All Current Word Undefined Words Find Replace Replace Text Replace All Next lt Fo gt Add Add State Add Add
147. is in Program Mode Another part of creating the program is specifying I O names and circuit configurations Defining the I O may be done before after or during the writing of the program Using English Names in the ECLiPS Program 3 4 When you start a new program ECLiPS asks for the name of the first Task After the name is entered ECLiPS starts the program for you by writing the Task keyword fol lowed by a colon and the Task name ECLiPS also writes the first State name PowerUp into the program Tasks States I O points and variables can all be assigned English names Names can be as brief and code like or as descriptive as you wish Clever descriptive names that fit well to the primary attribute of that State activity is strongly encouraged This will pay dividends in future program modifying clear docu mentation and easier troubleshooting Further good descriptive names will enhance the quality of the automatic diagnostics that can be created by linking Task State and I O names together for automatic diagnos tic output information Each name can have up to a twenty characters These characters may be letters num bers or the underscore character _ Names must begin with a letter The name must be a continuous string of characters ie no spaces are allowed Because ECLiPS uses the space character as a way to tell where one word ends and the next begins as we normally do in written English a name can not contain a s
148. ive purposes the designer should use the underscore character _ to separate words or use uppercase to start every new word Right_Forward_Clamp RightForwardClamp Digital Inputs Names Switch detecting can at start of conveyor Can_In_Place Switch detecting can at fill station Can_At_Fill Switch detecting can at mix station Can_At_Mix Switch indicating mixer in up position Mixer_Up_Switch Switch indicating mixer in down position Mixer_Down_Switch Digital Outputs Valve for chemical 1 Chem_Valve_1 Valve for chemical 2 Chem_Valve_2 Mixer motor Mixer_Motor Mixer up motor Mixer_Up_Motor Mixer down motor Mixer_Down_Motor Conveyor motor Conveyor_Motor Analog Input Weight scale at the fill station Fill_Weight_Input Conveyor Project I O Names The Basics of ECLIPS GFK 0731B This section discusses the fundamentals of operating ECLiPS bringing us to the point that we may begin programming After you have followed the installation instructions from section 1 enter ECLIPS at your keyboard then press lt Enter gt to start the ECLiPS program The display on the monitor has a bar on top which displays the name of the current proj ect and a two line instruction bar at the bottom Look to the top and bottom bars for in formation on the actions of certain keys or other helpful information throughout your work with ECLiPS ECLiPS is a menu driven program which means that most of the available operations are chosen from a series
149. l Flags The names of all of the flags are listed in alphabetical order Flags are most often used to communicate between Tasks PID Loops and Initial Values The names of all of the PID loops are listed in alphabetical order Press lt Enter gt key to enter the PID name into the program Other options also enter new PID loops or delete the selected loop GFK 0731B Chapter 8 Reference 8 71 8 72 The most common use of this option is to enter the initial values of the PID parameters When the right arrow key is pressed a form is provided to enter these values See the Language Description section for a discussion of using PID loops PID Loop Parameters Allof the PID loop parameters are listed in alphabetical order To use these parameters in a program the parameter name follows the PID loop name The programming line Make Tank_Temperature Gain equal to Second_Stage_Gain assigns a new value to the gain parameter of the Tank_Temperature PID Loop Use this list to view the names of the PID Parameters or to enter the selected parameter into the program ar the cursor location Communication Ports Use this option to change communication port names and parameters to enter a Com munications Port Name into the program at the current cursor location or to enter a Statement into the program to change the serial port parameter settings The program Statement that changes the serial port parameters uses the Set_Commport keyword In orde
150. l State of the Fill_Station Task In this State the program is waiting for the can to be moved If the weight of the can goes over 31 pounds in this State then we know one of the valves is stuck in the open position ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B When the problem is detected the process transitions to an alarm State where a message is sent to the operator s screen and the Task halts until the operator resets the alarm condition To enter the diagnostic follow this procedure Place the cursor at the end of the Wait_for_Can_Removal State Now choose the ADD option from the program menu and then the Add an Analog Range Checking Diagnostic choice from the next menu A list displays all of the defined analog channels only one in our case Choose this chan nel which is now entered into the diagnostic form displayed on the screen Enter 31 as the high limit value press lt Enter gt and then enter alarm in the first Branch to blank Alarm is the name of the State created to respond to our alarm condition When com plete press lt F9 gt and answer yes that you want to save the entered data A program line is entered into the text which performs this diagnostic Add the following States to the program State Alarm Write Chemical valves not closed Write Hit any key then lt ENTER gt to reset this alarm Go to Reset_Alarm State State Reset_Alarm Read Alar
151. layed for initializing a PID loop PID loops are initial ized in program mode using the LIST and DEFINE options from the program mode menu Perform Functions 8 32 The Perform functions implement operations which are more complicated than the com mon State Language Terms ECLiPS presents a form which has a template of informa tion that is entered by the programmer When this form is completed ECLiPS enters the English text for the proper execution of the function The State where a Perform function appears should usually be structured so that the Perform is executed for only one scan A common error in using Performs is that the program is structured such that the Perform is executed several times ie each time the State is scanned Perform functions are Functional Terms and must be the only Terms in the Statement ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Perform Function Forms GFK 0731B ECLiPS presents a form to enter the parameters for the Perform functions Except for the specialized Perform functions described in the next section most of the forms are tables providing information about each of the parameters The column headings of the table follow Parameter Name Type Use Required Actual Parameter Name identifies the parameter describe in this row of the table Type specifies the parameter data type and may be integer floating point character string digital or any type
152. le_Value_Int Swap_Table_Value_Float Swap_Table_Value_Dig and Swap_Table_Str allow the User to either write a value from a variable of the same type into a Table element or read a value from a Table element into a variable of the same type The Init_Table functions named Init_Table_Integer Init_Table_Float and Init_Table_Digi tal allow the user to store multiple values into a Table at one time There is no initializa tion function for a string table The Copy_Table_To_Table function allows the User to copy one Table s value into another Table Chapter 8 Reference 8 33 8 34 All Table functions check to make certain that when a Table is selected for use it fits the definition that has been previously creates Thus a Swap_Value to a Table defined as in teger must have an integer variable or both Tables selected in a Copy_Table_To_Table must be of the same type or a Swap_Value cannot refer to a row number for a table that is greater than the total number of rows defined for that Table In the event of misuse of the functions being detected either ECLiPS will produce an er ror at download time or and this is most likely an error message will be generated at run time It should be noted for all the Table functions the row number comes first followed by the column number Define_Table The User must define every Table he Uses with this function When this function is se lected from the Perform menu a menu will display the follow
153. lection determines the discrete and register ranges that can be accessed by the control program ECLiPS generates different control programs depending on the type of CPU selected 731 732 771 772 or 781 782 Whenever a new project is created ECLiPS asks for the CPU type The CPU type can be changed at any time with the PLC Type option from the DEFINE menu The different programs depending on the selected type are created when the program is translated Programs configured for one CPU can be run in a system that has the selected CPU or more advanced CPU A program configured for 781 782 CPU can run only on that CPU A program configured as 771 772 canrun on that CPU or the 781 782 CPU Program configured for a 731 732 CPU can run in a system with any CPU Chapter 8 Reference 8 47 8 48 The State Logic program can access a set number of points for each of the I O types and registers These points must form a continuous block anywhere within the range of the selected CPU To assign a range for the discretes or registers select the I Oand Regis ter Range option from the Define menu Fill in the form which specifies the base or lowest number for the SLP block For example if the base number selected for AI is 201 the 256 AIs that the SLP can access start from 201 and end at 456 in the AI storage tables of the CPU CPU SLP Interface Methods Each 90 70 program must be configured for the interface type which specifies how in
154. lement complex control strategies They can be actuated by any active State of a Task They have been assigned names based upon the PID Loop with which they are associated These names are Track_Mode Block_Up and Block_Down These inputs are controlled with the Set_Bit and Clear_Bit keywords If a PID Loop is named Tank_Level then the ECLiPS program statement Set_Bit Tank_Level Track_Mode puts PID loop Tank_Level into tracking mode The Track_Mode input when set puts the PID loop into a track mode where the output is not changed by the PID and the algorithm is set up to perform a bumpless transfer when the Track_Mode input goes back to being false This signal would be used with a Manual Aitomatic station to obtain Manual Auto bumpless transfer The other two inputs PID_Block_Up and PID_Block_Down limit the PID loop to inte grating in only one direction and tracking in the other direction For example when Block_Up is true the PID is allowed to integrate down towards zero when the error signal the difference between setpoint and process variable is negative If the error sig nal is positive however the output will not change and the integral portion will not be allowed to wind up Block_Down works exactly opposite These two inputs can be used to provide Anti Reset Windup when one PID is cascaded into another PID If during the course of operation the down stream PID reaches the point it can no longer integrate in response to the u
155. ler This command puts the controller into Run mode Halt Program in the Controller This command halts the program in the controller immediately without any prompt Communication Port Reset The communication port may become disabled by improper data transfer or noise on the serial cable so this function is available to reset the port and restore communications with the controller Start Printer Output This function allows the user to send all of the data that is displayed in the terminal log out to a printer attached to the parallel port LPT1 When the printer log is active the word PRINT appears in the top bar of the screen If there is a printer error the printer log is no longer active and an error message is displayed To stop the printer log select that option from the menu ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B GFK 0731B Activate Log File Output This function allows the data sent to the terminal log to also be sent to a disk file with a user given name of up to 8 characters The log file name is given an extension of LOG The log file is limited in size to 100K bytes When the file size reaches 100k the logging of data is terminated State Engine Configuration This option is used to setup the State Engine Several setup options are displayed on the following form This form shows the current condition and provides a space to make changes Toggle Simulation Mode
156. ll Weight_Input is above 20 go to Pour_Chem_2 State Pour_Chem_2 Open Chem_Valve_2 until Fill_Weight_Input is above 30 lbs then go to Wait_for_Can_Removal State Wait_for_Can_Removal When Can_At Fill is OFF go to PowerUp This program is easy to understand because of the names chosen for the Task State and I O channel names selected Underscores The use of underscores is also helpful when naming Tasks States and I O The previous example also demonstrates the use of the underscore to help clarify the name of an I O point The underscore is necessary for the compiler s interpretation of the English text A word is always considered complete when a space is found after text Therefore to separate letters in one word like an I O point name the underscore acts as a space with out causing the compiler to see the descriptive name as two individual words Another popular way to separate words is to capitalize each word but use no spaces PowerUp CanAtFill e FillWeightInput e PunchDown In either case it is best to be consistent throughout the project ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Programming Conventions It is also suggested that the company using ECLiPS decide on a few programming con ventions to increase the standardized look of all of the programs created in one compa ny Some suggested conventions include 1 The default keywords should be selected
157. ll of the names of CPU memory types defined in the State Logic program The types included are I Q AI AQ T M G S SA SB SC and R The defined names are listed in numerical order according to type The reference number for each name is also listed as follows I OMap Project CONVEYOR Last Modified 8 28 90 8 56 l Discrete Inputs I1 Can_In_Place I2 Can_At_Fill I3 Can_At_Mix I4 Mixer_Down_Switch 15 Mixer_Up_Switch Q Discrete Outputs Q1 Chem_Valve_1 Q2 Chem_Valve_2 Q3 Mixer_Down_Motor Q4 Mixer_Motor Q5 Mixer_Up_Motor Q6 Conveyor_Motor AI Analog Inputs AI1 _ Fill_Weight_Input Riverside Plant Page 1 I O Map Chapter 7 Creating Program Documentation 7 3 Data List The data list option prints all of the names of data elements that have been defined in the program The data list groups the names according to the type of element and each group is listed in alphabetical order The types are listed in the following table Digital Point Name Analog Channel Name Floating Point Variable Integer Variable String Variable Character Variable Internal Flag Types of Data Elements Included in Data List The following is an example of the Date List print out for the Conveyor program Data List Project CONVEYOR Last Modified 8 28 90 8 56 Digital Point Names Can_At_Fill I2 Can_At_Mix I3 Can_In_Place I1 Chem_Valve_1 Q1 Chem_Valve_2 Q2 Conveyor_Motor Q6 Mi
158. lt Numeric Value gt lt System Functions gt lt Numeric Value gt lt Character Variable Name gt lt Character gt String Value lt String Variable Name gt lt Character String gt Up to 80 characters Grammatical Rules Every Task must begin with the word Task followed by the Task name e Every State must begin with the word State followed by the State name e Every Statement must end with a period e Every Statement must have a functional expression e Only one Go is allowed per Statement but there may be several in a State e Ifa Read Term is used in a Statement it must be accompanied by a Go in the same Statement There may be no other Terms in the Statement Only one Read is allowed per State A Perform function must be the only Term in a Statement Using the System Clock GFK 0731B The CPU has a clock that maintains the current month day day of the week hour min ute and second These values are always available to the State Logic Processor through the Time Variables Month Day Day_of_Week Hour Minute and Second These variables represent an integer values that may be used by program statements or accessed using the DISPLAY debug mode menu option These are READ ONLY values that cannot be change from the State Logic Processor To change the clock settings use Logicmaster to change the time values in th
159. m_Reset then go to Wait_for_Can_Removal State Now when the faulty conditions occurs the program displays the alarm message and how to reset the alarm so the process can continue After the alarm condition is reset the process returns to the Wait_for_Can_Removal State Assume that the problem has been corrected and the can has been removed or some of the chemicals removed so that the process does not reenter the alarm State Note that the conveyor does not move until the Fill_Station Task is in the PowerUp State Define Alarm_Reset to be a string variable This alarm diagnostic is the first instance where the States of a Task are not strictly se quential States can be written in any order in the Task and GO Terms may transition to any other State in a Task Now that you have programmed your first applications using State Logic you have a fundamental knowledge of ECLiPS which is sufficient for many applications GFK 0731B Chapter 4 Programming Tutorial 4 21 Chapter Helpful Hints 5 The hints and suggestions found in this section have been developed by ECLiPS and State Language programmers in an effort to make the user s first programming experi ence as productive as possible There are two parts to this section one giving hints for programming and the other has suggestions for using the tools provided as part of ECLiPS Programming Hints Outputs are OFF by Default One of the key featuresa of the State Logic model is that the
160. metic but will instead set itself so that when track ing is removed the PID output gradually goes to the proper value and avoids the bump This is called bumpless transfer Each of the ten PID algorithms have logical signals associated with them that use the name Track_Mode and the actual PID name As an example if the User named the first PID algorithm Tank_Level then the logical signal would be called Tank_Level Track_Mode When Track_Mode is made true then the PID automatically discontinues its normal algorithm and begins tracking its output and preparing for bumpless transfer The User can set the Track_Mode variable from any active State Using this variable the User can create any tracking strategy he desires Anti R eset Windup Using a cascaded PID strategy can cause the User some subtle problems In the example shown in Figure 2 if PID 2 has reached its maximum and PID 1 still has an error signal because the setpoint does not equal PV1 then PID 1 would continue to integrate The output of PID 1 would continue to increase but it would have no affect on PID 2 since it is already at its maximum However when the error signal of PID 1 reversed direction and caused PID 1 to begin integrating in the opposite direction PID 1 would have to in tegrate below the threshold value it was when PID 2 reached its maximum before it would have any affect on PID 2 This excess amount of output PID 1 has accumulated is commonly referred to as reset
161. ms are not true but the write term executes only once for the entire time that the state remains active As soon as there is a state change the write term again will write its message when scanned ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B State OverTempAlarm Write Over Temperature Alarm Press reset switch to OperatorStation If ResetSwitch is pressed go to PowerUp State Wait 10 seconds then go to OverTempAlarm State The previous program segment writes the alarm message once every ten seconds until the reset switch is pressed Calculations and a Scanning Operating System Task Design GFK 0731B Because the State Engine operating system is a scanning system each Statement of the active State of each Task is scanned many times every second Because of this scanning design care must be taken when using mathematical operations The make structure is executed each time it is scanned If there is a mathematical opera tion in the Make that operation is performed each scan This may result in unexpected values generated by the Make State Check_For_Part Make Parts Count Parts Count 1 If Photo_sensor is ON then go to the PowerUp State The State above will cause the variable Parts_Count to be incremented every scan that the State is active and the Photo_Sensor is ON Instead of incrementing the count by one it may be incremented by several hundred The correct
162. n Run Mode isis ne aiee Soh Seta tebe Gare Sei hs Toggle Simulation Mode 0 0666 RUN or HALT Program cso 6 ya ari met eens Controlling and Observing the Fill Station n naa 0c c cece ee eee Monitors eara ea cnet eaaa eae b ands cree ates orb a aat ment tee alts PID Loop Tuning Screen 6 eee eens Viewing and Clearing CPU Faults 0 cee eee Creating Program Documentation 00 cece cece eens Program Documentation Features 0 0 0 cece ee eee Header MOte srera 1S ae en Bt See eh be ee BA be is Directing the Output eet i a nee Documentation Options 0 666 c cece eee eee Commenting the ECLiPS Program 0 6 66 eee ee ECLiPS English Control Language Programming System User s Guide March 1998 ix 6 1 6 1 6 1 6 2 6 3 6 3 6 4 6 5 6 5 6 5 6 5 6 6 6 6 6 6 6 7 6 7 6 7 6 7 6 7 7 1 7 1 7 2 7 2 7 2 Chapter 8 GFK 0731B Contents Reference seana presina cane E E wheres alae ink eRe Language Description 1 1 eee eens Program Structure tirish iene ei ira do habs Sat ea et Language Structure Notational Conventions 000005 Functional Expressions rss reina pieereis piepe eee eee Conditional Expressions 0 066 Mathematical Calculations 0666 Variables Glo enei Reeth SL ihe so Be lanai ESE etka teed Language Structure Summary 666 cece eee eee Grammatical Rules ni cutee teliet heise
163. n ofthe Application S oftware will be unin terrupted or error free or that it will meet Customer s needs All other portions of the Licensed Soft ware are provided as is without warranty of any kind 3 2 WITHRESPECTTOTHESOFTWAREWHICHISTHESUBJ ECTOFTHISAGREEMENT THE FOREGOINGWARRANTIES ARE EXCLUSIVE AND ARE IN LIEU OF ALL OTHER WARRANTIES WHETHERWRITTEN ORAL IMPLIEDOR STATUTORY NO IMPLIED OR STATUTORYWARRANTYOF MERCHANTABILITYOR FITNESS FOR A PARTICULAR PURPOSE SHALL APPLY 4 LIMITATION OF LIABILITY 4 1 INNOEVENT WHETHER AS ARESULTOF BREACH OF CONTRACT BREACH OF WAR RANTY TOR T INCLUDINGNEGLIGENCE JOROTHERWISESHALLGEORITSSUPPLIERSBE LIABLEFORANYSPECIALCONSEQUENTIALINCIDENTALOR PENAL DAMAGES INCLUDING BUT NOTLIMITEDTO LOSSOFPROFITORREVENUES LOSSOFUSEOFTHELICENSEDSOFTWAREOR ANY PARTTHEREOF OR ANY ASSOCIATE DEQUIP MENT DAMAGE TO ASSOCIATE DEQUIP MENT COSTOF CAPITAL COSTOFSUBSTITUTEPRODUCTS FACILITIES SERVICESORREPLACEMENT POWER DOWNTIMECOSTS ORCLAIMSOFCUSTOMER SCUSTOMERSANDTRANSFEREESOR SUCHDAMAGESEVENIFGEHASBEENADVISEDOFTHEPOSSIBILITYOFSUCHDAMAGES 4 2 EXCEPTASPROVIDEDINSECTIONS INDEMNITY INNOEVENT WHETHERASARESULT OFBREACH OF CONTRACT OR WARRANTY TORT INCLUDINGNEGLIGENCE OROTHERWISE SHALLGE LIABILITY TO CUSTOMER FOR ANY LOSS OR DAMAGE ARISING OUT OF OR RESUITINGFROMTHISAGREEMENT OR FROM ITS PERFORMANCE OR BREACH OR FROM THE LICENSEDSOFTWARE OR ANY PART THEREFORE OR FROM ANY S
164. n reads and displays the file of the previous Trace display which is stored on disk ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B GFK 0731B Setup Trace List This option allows the user to setup the Tasks that will be traced stored in the Trace buff er Upon entering this function a list of the currently traced Tasks will be displayed and the user may add or delete Tasks Clear Trace List Reset the buffer to Trace all Tasks Force These functions allow a user to force Digital points and Internal Flags and analog chan nels To change variable values use the CHANGE option Forced items remain in the forced state independent of real world conditions or program actions The only way that a forced condition changes is for the force option to be used again to either change the forced value or clear the force Once the force is cleared outputs go to whatever condi tions specified by the program and inputs go to whatever value is set by the CPU Set or Modify Force List When invoked this function displays a list of all currently forced I O and internal flags and allows the user to add remove or change any of the entries Clear All Forces This function allows the user to completely clear the force table Entries cleared are re moved from the table and the values allowed to be changed by the State Logic program or by the CPU Display The display function displays the current value
165. n the software provided under this Agreement you must make provision for any required operating system software licenses 2 LICENSE 2 1 Exceptas provided in section 2 2 below you are granted only a personal non transfer able nonexclusive license to use the Licensed Software only on the Designated Computer You may copy the Licensed Software into machine readable form for backup purposes in supportof your use ofthe Licensed Software on the Designated Computer limited to one copy No other copies shall be made unless authorized in writing by GE You may not reverse compile or disassemble the software The Licensed S oftware comprising proprietary trade secretinformation of GEand or its licensors shall be held in confidence by Customer and protected from disclosure to third par ties No title to the intellectual property is transferred You mustreproduce and include all applicable copyright notices on any copy 2 2 IfyouareanauthorizedGE distributor or an Original E quipmentM anufacturerwho incorporates the Licensed S oftware into your equipmentfor sale to an end user you may transfer the Licensed S oftware to an end user provided thatthe end useragrees to be bound by the provisions of this Agreement 2 3 GE licensors having a proprietary interestin the Licensed S oftware shallhave the right to enforce such interests including the right to terminate this Agreementin the eventofa breach of its terms pertaining to such proprietary interes
166. n top of the program menu There is a check by project on this menu showing the choice which caused the current menu to be dis played The older menu becomes the current menu if the escape key is pressed Choose the Make a New Project choice from the menu A box appears indicating that the operation is making a new project and that the name of the project must be entered ECLiPS will create some new files with this name and various extensions so the name must conform to MS DOS file name requirements ie eight characters first character a letter letters numbers and the _ and characters allowed Enter the name of the proj ect CONVEYOR The next two options define the type of project that is create The first option selects the type of CPU 731 732 771 772 781 782 in the Series 90 70 control system Select the CPU that you are using This option can be changed at any time The next option selects the method of information transfer between the SLP and the CPU The Co processor option selects the SLP to do the transfer while the Controller options large and small selects the CPU to do the transfer The Controller options are for high speed applications and the Co processor option provides more flexibility The Controller options use a ladder program in the CPU to accomplish the transfer The small version is for applications where the CPU is not doing any control but the large version can be used when the CPU has a Ladder Logic prog
167. nd Number_B_Cans to be integer variables This change demonstrates the concept of variables Variables hold some data which may be manipulated compared and written to the screen The string variable Can_Type is compared to two different given strings Strings are en closed in double quote marks so in our write Statements we are writing out strings of characters We manipulate the two integer variables by incrementing them by 1 if the preceding conditional is true These variables hold the value of the counter Notice there is a short way to perform simple addition Add 1 to Number_B_Cans These program lines demonstrate the use of variables in write Statements The indi cates that the value of the following variable is what is to be printed not the variable name See the reference section or help system for other formatting functions available for the write term Diagnostic Programmed diagnostics provide alternate paths of program execution when machine faults occur Often the alternate path produces an alarm condition which requires an operator response stops the process or merely records the event Perhaps in the process there is a problem with the valves which control the flow of the chemicals flowing into the can These valves may not close completely causing the chemicals to flow onto the conveyor when the can is moved toward the mixing station To deal with this problem a diagnostic is added to the Wait_for_Can_Remova
168. nd can be executed at User selected time intervals with the minimum interval being 1 second The PID algorithms can each be independent or can be cascaded together with the out put of one PID becoming the input to another Each PID features built in bumpless trans fer and anti reset windup features Each PID is initialized in the Program mode of ECLiPS using either the LIST or DEFINE option from the program mode menu PID Loops are tuned on line in the Debug mode or using OnTOP Each PID loop is given an alpha numeric name which can be up to twenty characters in length All references to the PID loop use this name To start a PID Loop use the Start_PID keyword For example the statement Start_PID Tank_Level starts the PID Loop name Tank_Level To stop a PID Loop use the Stop_PID keyword For example the Statement Stop_PID Tank_Level with 10 stops the PID Loop named Tank_Level and sets the output to 10 ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B PID Parameters Each PID loop is defined by the values of several parameters These parameters are ini tialized when the PID loop is first defined and can be changed by program statements during program execution or through the tuning forms provided in debug mode and OnTOP The program refers to these parameters by specifying the name of the PID loop followed by the parameter keyword For example the ECLiPS program statement Make Tank_Level Set
169. nfigured when using the Small Controller option All of the lI s and AI s are inputs and the Q s and AQ s are outputs Since the Small Controller type is used only when there is no Ladder Logic used there is no need for the inputs to the CPU to be anything but inputs to the SLP or outputs to the CPU to be anything but outputs to the CPU In the Large Controller option the split point between inputs and outputs is modifiable by changing the number where the outputs start If the Large Controller option is se lected then the DEFINE menu displays the option PLC I O Output Base The starting point of the outputs can be changed anywhere within the range for the memory type If the output base is set to the start of the range all locations are outputs All locations are inputs when the output base is set to the maximum value ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B GFK 0731B a80016 CONTROLLER LARGE MODE Sur MEMORY ACCESS SLP MEMORY INPUTS QUTPUTS RANGE BASE OUTPUT BASE The controller options require some memory transfer functions in a Relay Ladder Logic program executing in the CPU The Large Controller option is used if a RLL application is being controlled at the same time the SLP is executing a State Logic program other wise the Small version is used Disk number 2 of the ECLiPS distribution disks contains several SDE files with ladder programs th
170. nformation to make your first programming efforts more efficient with hints on programming and ECLiPS features These are the most important user hints and suggestions that we have learned in feedback from ECLiPS users 6 Online Tutorial This section introduces you to the various on line and process monitoring tools and techniques available to help debug and troubleshoot the State Logic program 7 Creating Program Documentation This section explains what types of program documentation can be created 8 Reference The Reference Manual is a comprehensive explanation of the ECLiPS commands and procedures This section contains a glossary of terms Hardware Requirements IBM PC compatible or PS2 640K RAM Extended or expanded memory optional DOS version 3 1 or higher Hard Disk 5 25 inch or 3 5 inch floppy disk drive Serial Port Any printer Optional DO OST Oe GOT eB e a Color or monochrome monitor Installation GFK 0731B To install ECLiPS insert disk 1 into drive A or B and make this drive the current logged drive Type INSTALL and hit lt Enter gt Choose the INSTALL option Be ready to specify the hard drive where ECLiPS is to be installed Follow the instructions for insert ing other disks The installation program displays a message when the installation is complete ECLIiPS is copy protected so that only one installation is allowed per set of distribution disks If an attempt is made to run ECLiPS with
171. nglish program I O map Data Listing Task and State listing and Cross Reference Listing Printing informa tion for using the CCM protocol and documenting the ECLiPS program are also covered Program Documentation Features ECLiPS provides excellent self documenting features that are easily selected and printed from a Project Print Setup screen To get into the Project Print Setup screen select lt F3 gt from the Program mode of ECLiPS From the menu select Project and then Print from the next menu The following screen appears a80022 Project Print Setup Header Footer Output to Printer English Code 1 0 Map Data List Task State List Cross Reference List CCM Protocol Listing Number of Copies 66 Lines Per Page GFK 0731B 7 1 Header F ooter The Header entry is printed on the top of each page of documentation The footer entry is printed on the bottom of each page of documentation Type the desired header and footer information in the highlighted box The Header and Footer will accept up to 40 characters of information Directing the Output The Output To option specifies where the documentation is to be sent If Printer is entered for this option the documentation is sent to the printer connected to the parallel port ECLiPS interprets any other name entered for this option to be a file name and the selected documentation options are sent to a disk to be stored in a file Documen
172. nn aca discal Mase ele Sade gia i eee EEE eae aa Figure 8 10 PID Loop Tuning Screen 0 0 0 c cece eee ECLiPS English Control Language Programming System User s Guide March 1998 xi GFK 0731B Contents Table 8 1 State Engine Data Types and CCM References Table 8 2 PID Parameter Table 0 0 0 e cece eee eee ECLiPS English Control Language Programming System User s Guide March 1998 xii GE ntelligentPl atforms North America Inc Software License Agreement YOU SHOULD CAREFULLY READ THE FOLLOWING TERMS AND CONDITIONS BEFORE OPENING THIS PACKAGE OPENING THIS PACKAGE SIGNI FIES YOUR ACCEPTANCE OF THESE TERMS AND CONDITIONS IF YOU DO NOT AGREE WITH THEM YOU SHOULD PROMPTLY RETURN THE PACK AGE UNOPENED ALONG WITH ANY OTHER ITEM THAT WAS INCLUDED IN THE SAME CATALOG NUMBER FOR FULL CREDIT You as the Customer agree as follows 1 DEFINITIONS Application S oftware shall meanthose portions ofthe Licensed Software in object code form only createdby GE Designated Computer shall mean the one 1 computer upon which Customer shall run the Li censed Software Licensed Software shall mean the Application Software plus any other software in object code form only supplied by GE pursuant to this Agreement The Licensed Software may include third party software including butnotlimited to operating systems licensed to GE If no oper ating system software is included i
173. no responsibility for the accuracy completeness sufficiency or usefulness of the information contained herein No warranties of merchantability or fitness for purpose shall apply indicates a trademark of GE Intelligent Platforms Inc and or its affiliates All other trademarks are the property of their respective owners Copyright 2010 GE Intelligent Platforms Inc All Rights Reserved Contact Information If you purchased this product through an Authorized Channel Partner please contact the seller directly General Contact Information Online technical support and http www ge ip com support GlobalCare Additional information http Awww ge ip com Solution Provider solutionprovider ip ge com Technical Support If you have technical problems that cannot be resolved with the information in this guide please contact us by telephone or email or on the web at www ge ip com support Americas 1 780 420 2010 if toll free 800 option is unavailable Technical Support Email support ip ge com Europe the Middle East and Africa 4352 26 722 780 if toll free 800 option is unavailable or if dialing from a mobile telephone Asia Pacific support ip ip ge com ini i 21 3217 4826 su cn i i customercare cn ip ge com China Preface Content of this Manual GFK 0731B Chapter 1 Getting Started This chapter has general foundational information about the ECLiPS software product There is a
174. nt The read term is a conditional term which is not satisfied or true until the lt Enter gt key is pressed signaling the end of the operator input Therefore the read term must be used with some care so that a time critical Task is not delayed waiting for some input from the keyboard As soon as the lt Enter gt key is pressed the conditional is satisfied and Ready_To_Move becomes the new active State Chapter 4 Programming Tutorial 4 19 4 20 Counter Assume also that the decision to change the application includes keeping track of the number of each type of can that has been placed on the conveyor A counter is created for each type of can ECLiPS provides a complete range of mathematical functions in cluding trigonometric and transcendental functions A new State is created which becomes active after the operator completes his input This State adds 1 to one of two variables holding the number of cans of the particular type After the counters are set we write the number of each can type to the screen Change States in the Conveyor Task as follows State Operator_Input Read Can_Type then go to the Counter State State Counter If Can_Type A make Number_A_Cans Number_A_Cans 1 If Can_Type B Add 1 to Number_B_Cans Write The number of type A cans is Number_A_Cans Write The number of type B cans is Number_B_Cans Go to Fill_Station_Wait Define the variables Number_A_Cans a
175. o optionally specify the hexadecimal number A B C D E or F where means hexadecimal number to ECLiPS that is the pattern for these three characters The function parameters are Starting output the English name of the first digital output in the string of consecutive outputs that form the BCD digits all of the other outputs used must be defined Number_of_BCD_digits the number of BCD digits The number of digital outputs in the string will be 4 times the number of digits Variable_name the name of the variable that is to be translated and output Variable_type the type of variable either I for integer or F for float Minus_sign_pattern a hexadecimal number from A to F that gives the pattern for a digit that should be recognized as the minus sign Null_character_pat a hexadecimal number from A to F that gives the pattern for a digit that should be recognized as the null or space character Decimal_point_pat a hexadecimal number from A to F that gives the pattern for a digit that should be recognized as the decimal point Number_decimal_dig the number of decimal digits the digits to the right of the decimal point that should be output Note If the Number_decimal_dig parameter is used then the Decimal_point_pat is not optional and must also be used Note if the value is too large to display in the Number_of_BCD_digits specified but there is enough room for all the digits to the left of the decimal point those
176. o store the translated value Variable_type the type of variable either integer or float Minus sign_pattern a hexadecimal number from A to F that gives the pattern for a digit that should be recognized as the minus sign Decimal_point_pat a hexadecimal number from A to F that gives the pattern for a digit that should be recognized as the decimal point Note the minus sign and decimal point are optional A minus sign can be specified without a decimal point but if a decimal point is specified the minus sign must also be specified GFK 0731B Chapter 8 Reference 8 37 Output_BCD_Conver The Output_BCD_Convert translates between a an integer or float variable and a series of digital outputs The User specifies the name of the first digital output in the series and the number of BCD digits 4 outputs per digit that represent the variable The User also specifies the type of variable and the name of the variable where the value to be con verted is stored The outputs are in hardware consecutive order and the number of digits can be on more than one block or card as long as the cards have consecutive addresses The User only need define with an English name the first digital output and initialize the blocks or cards involved BCD uses the standard binary representation for the numerical digits 0 to 9 There is no true standard for the minus sign or decimal point or null space character Therefore the function has the provision for the User t
177. of State Logic States e State PowerUp go to the Motion State Stop_PID Halt a PID Loop and set the output value e Stop_PID Main_Loop with 234 5 Subtract Subtract a value from a variable e Subtract 1 from Count Task Identifies the Name of State Logic Tasks e Task Main e If the Main Task is in the PowerUp State go Set_Bit Set a condition TRUE or a bit of a 16 bit integer value to 1 e Set_Bit Flowmeter_Counter HSC_OUTPUT_ENABLE e Set_Bit Integer_Variable_10 Clear_Bit Set a condition FALSE or a bit of a 16 bit integer value to 0 e Clear Bit Resolver_Counter HSC_RESET PRELOAD e Clear Bit Integer_Variable_215 Suspend_Task Stop the execution of a Task no State is active e If Level gt alarm Suspend_Task Automatic Resume_Task Restart the execution of a task the State that was active when the Task was suspended is made the active State e If Level lt alarm Resume Task Automatic Write Send data out the comm port e Write Error Message to Operator_Console GFK 0731B Chapter 8 Reference 8 2 Mathematical Operators Keyword Synonyms Meaning Examples 0 Parentheses Used to group terms to change order of operation Up to 18 levels of paren theses are permitted Parentheses may be used in mathematical expressions and with relational conditional terms ARCTAN exp Arctangent where 65535 lt exp lt 65535 e Make Overlay ARCTAN Hyp 2 COS exp Cosine where 65535 lt exp lt 65535 e M
178. of menus The main menu is displayed when ECLiPS is first started Chapter 4 Programming Tutorial 4 9 4 10 The bar at the bottom describes how to use the menu Use the up and down arrow keys to move the highlight bar to the desired choice then press lt Enter gt Selections can also be made by pressing the highlighted letter of the desired choice Some options also dis play a hot key which shows the keys to press to activate the menu option without going through the menu The first screen shows the main menu a80005 PROJECT CCM DOC ECLiPS Main Menu Write and Modify Control Programs Test and Monitor a Program On Line ONLINE MODIFY Modify a Task while On Line Configure Maximum Sizes Exit ECLiPS and Return to DOS Use lt t gt to Highlight an Item lt Enter gt to Select it or lt Esc gt to Cancel Press the lt Fl gt Key for System Help on the Current Topic Figure 4 2 Main Menu The instruction bar also indicates that pressing lt Esc gt cancels the operation and that pressing lt F1 gt enters the HELP system The function of these keys is consistent throughout the program Selections from all menus are made the same way Pressing lt F1 gt always provides help information on the current operation therefore it is referred to as a context sensitive help system While the help screen is displayed pressing lt F1 gt again displays functions which may be executed by pressing other func tion keys S
179. of the main problem are identified at the top level and then each of these components is broken down into its separate parts This decomposition of the problem continues until the application is completely described The State Logic Control model invites top down design because of the hierarchy of its elements Tasks States and State ments as described in the previous section There are several different formats to aid in the top down design process including structure charts and structured flow charts but we use a simple outline approach Identify the Tasks The goal of this step is to identify the Tasks of the application We start at the highest level decomposing the problem into its general components See the discussion on Tasks in the State Logic Control Theory section of this manual Think of the independent operations which must be accomplished to achieve goals of the application The natural separations of activity often become Tasks The goal is to decompose the problem into parts that can be defined as sequences of I O operation Any cycles which repeat even with some variations are prime candidates to be Tasks An important concept for identifying Tasks is that Tasks are a set of sequential operations Events which occur in parallel or concurrently should be in separate Tasks GFK 0731B 3 1 These main sections of the outline should be general descriptive phrases such as Bore Cylinder Load Boiler Fill Vat Retrieve Part
180. of the selected element together with the current time in the Terminal Log When the type of data to display is selected a list of names of that type are displayed Select the name to display from this list The follow ing data types can be displayed with the Display function Analog Channels String and Character Variables Digital Points Internal Flags Numeric Integer and Floating Point Variables Register Variables Reserved System Variables Current State of a Task Chapter 8 Reference 8 85 8 86 Change The change function allows the user to enter a new value for the selected item After the new value is entered it is sent to the controller immediately Also the change is reported to the Terminal Log together with the current time The following data types can be changed using the Change function String and Character Variables Numeric Integer and Floating Point Variables Register Variables Current State of a Task PID Loops This option appears on the debug main menu only if the program has defined a PID loop Choose this option to tune a PID loop while the process is running To tune a PID loop change the parameters displayed a80026 PROJECT PID Terminal Log Press f to Scroll Back in Log Is on eee PID Loop Configuration Initial Values Loop Name Tank_Level Block Down Low Limit ry Update Period 2 Block Up N High Limit N Gain 1 00 Track Mode N Track Monitor N Reset 30 00 Inverse Dir
181. og input the name of the analog output and the various initial settings for the tuning constants The setpoint and tuning constants can be changed while the process is on line by using the Tuning function in either the Debug mode of ECLiPS or OnTop Complex PID Control In some cases a more complex strategy using PID algorithms may be desired Rather than the output of the PID going directly to an analog output a cascaded PID strategy can be used in which the output of one PID goes to the input of another PID a80024 Manual Auto Station Process Variable 2 Process Variable 1 Setpoint 1 Figure 8 2 Cascaded PID Loops In this example PID 1 compares process variable PV1 with the desired setpoint The out put of that controller is then fed into PID 2 as a setpoint and is compared with process variable PV2 Generally the second PID PID 2 called the downstream PID will be tuned to have a faster response time It will act first to move the controller quickly in the right direction and then the slower acting upstream PID will act to integrate out the er ror between the control variable and its desired setpoint The PID algorithm can use an analog input as its input as in the case of PID 1 or any floating point variable In the case of PID 2 the input to PID 2 can be defined as the out put of PID 1 Likewise the setpoint can be a constant or a named variable or as in this case an analog input To set this strategy j
182. ome help screens display instructions on how to view additional help screens To return from the help screens press lt Esc gt Choose the PROGRAM menu by using the up down arrow keys to highlight your choice and then pressing the enter key Now press lt F3 gt to view the PROGRAM menu You should spend some time exploring the menu options since these options represent most of the functions available in ECLiPS The reference section has details on the use of these options Also use the context sensitive help which explains the highlighted option of each menu when you press lt F1 gt Select the PROJECT choice by moving the high lighted bar with the arrow keys or merely pressing lt P gt ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B a80006 States Tasks Diagnostics Perform Functions 1 0 Variables Keywords PID Loops Comm Ports Save Current Project to Dis Copy the Current Project to New One New Path Drive for Projects Make a New Project Import Data from Another Project Print Project Data Translate and Download Project to the Controller Alt F2 Error Check the Current Project Shift F2 Translate Project Download Project to the controller Delete a Project from Disk Break Up the Project into Separate Task Groups Figure 4 3 Project Menu The project menu is now displayed with several choices relating to specific projects No tice that the project menu is overlaid o
183. onditional Terms are optional If there are no Conditional Terms in a Statement the Functional Terms are always executed during each scan When Conditional Terms accompany Functional Terms in a Statement the Functional Term is executed when all of the Conditional Terms are satisfied There are four types of conditional Terms see the reference section Conditional Terms are satisfied as follows 1 Read When valid data is received at the appropriate channel 2 If When the conditional expression is TRUE To understand how Statements are scanned assume that the Statement Conditional Terms precede the Functional Terms and that the scan proceeds from left to right Functional i ial Satisfied Conditional Term Functional Term Unsatisfied Conditional Term Satisfied Conditional Term Unsatisfied Conditional Term E Functional Term a80003 Functional Term Figure 5 2 Statement Scan The Statements of a State are executed in the order that they are written into the pro gram Functional Terms of Statements with no Conditional Terms are always executed Conditional Terms in Statements control whether or not the Functional Terms in those Statements are executed If all of the Conditional Terms are satisfied the Functional Terms are executed If any of the Conditional Terms are not satisfied none of the Func tional Terms are executed The Statements are executed one at a time In this manner ever
184. ontroller ie running or halted The status window also indicates when a discrete or analog I O point is forced Put SLP in Run Mode Press lt F3 gt to view the menu then select the Project option Use this menu to put the SLP in Simulation Mode and start the Conveyor program running Use the Simulation Mode to run the program without interacting with any I O hardware Toggle Simulation Mode Simulation Mode is used to disconnect the actual I O from a running program This mode is useful to test a program before actually connecting to the real world and to trou bleshoot an existing program by disconnecting the machine from the State Engine con troller If you are using simulation mode for this tutorial select this option from the PROJECT menu now The controller must be in Halt Mode to activate the Simulation Mode RUN or HALT Program Use these menu options on the PROJECT menu to start or stop program execution Start the program running now Controlling and Observing the Fill Station Monitor GFK 0731B This section describes the features available to control and examine program execution These examples assume that the State Logic Processor is executing in Simulation Mode although these exercises are more informative using real world I O The program must be exercised to observe how it executes First lets create a monitor table to watch the program change States Bring up the menu with the lt F3 gt key Next press
185. or floating point Integer values use 1 register and floating point val ues use 2 registers All floating point numbers are represented in 32 bit IEEE format Numeric Integer and Float Variables Variable names followed by the type are listed in alphabetical order Integer variables store values in the range of 32 768 to 32 767 The range for floating point variables is 1 175494E 38 to 3 402823E 38 String and Character Variables String variables may be up to 100 characters in length and character variables store a single character The names are listed in alphabetical order along with the type See the section on the String Manipulation Perform Function for operations that can be per formed on string variables Keywords and Synonyms Allof the words defined as keywords and their synonyms are listed with the default keyword first followed by all of the synonyms of that keyword From this display use the following keys lt Ins gt adds another synonym to the selected keyword lt Del gt deletes the selected keyword lt Enter gt writes the name into the program at the cursor location lt gt gt edits the word lt lt gt Makes the selected synonym the new default keyword Filler Words A Filler word is one which is ignored by the ECLiPS translator Filler words clarify the meaning of the control program This list is managed by using the same keys that are used with the Keyword list Interna
186. or the mix station the conveyor stops The process now repeats by waiting for another can to be placed in the starting position ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Outline the Application The first step in creating an ECLiPS program as shown in section 3 is to outline the ap plication using a top down approach The control problem is first described in general terms These terms are successively broken down into more specific details First Tasks are identified then each Task is defined by a sequence of States and each State is de fined by a collection of Statements Identify the Tasks A Task is a sequence of events or steps See the discussions about Tasks in the State Log ic Control Theory and Creating a Control Program sections Several Tasks are used to describe sequences which execute during the same time period yet are independent from each other Tasks describe sequential activity which may occur in parallel with oth er Task activities In choosing the Tasks for this problem notice that the fill station and the mix station op erate completely independently from each other No occurrence at one station has any effect on the operation of the other station The operation of each station can also be described as a sequence of events Therefore the operation of each station is chosen to be a separate Task The operation of the conveyor is chosen as the third Task since its o
187. ory type to Q and assigning the Qs to be contiguous with the Qs in the system Remember that this change must be made to the Ladder Logic program in the CPU as well as the State Logic program in the SLP ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B How to Setup Your System This section describes the step by step procedure for setting up your Series 90 70 State Logic control system First the steps are listed and then each step is described in detail Identify the CPU to be used in the Series 90 70 PLC Select the SLP CPU communications mode Determine whether the system is State Logic only or a hybrid State Ladder logic system 4 Make memory range adjustments if necessary Make output memory base adjustments if necessary Transfer Ladder Logic rungs from the ECLiPS distribution disks into the CPU program using Logicmaster 90 Configure the Series 90 70 Control System Series 90 70 State Logic Control System Setup 480017 START SELECT CPU FOR EASY FOR HIGH SETUP PERFORMANCE CO PROCESSOR CONTROLLER TRANSFER MODE TRANSFER MODE HYBRID HYBRID STATE LOGIC E STATE LADDER NEY w ae LOGIC USE DEFAULT ADJUST MEMORY USE SMALL USE LARGE MEMORY SETUP RANGES OPTION OPTION IF NECESSARY ADJUST MEMORY RANGES IF NECESSARY i ADJUST QUPUT BASES IF NECESSARY Figure 8 4 Series 90 70 State Logic Setup Decision Tree GFK 0731B Chapter 8 Reference 8 53 8
188. out proper installation a message is dis played saying that this is an unauthorized version of ECLiPS The installation program does not allow a second installation from the distribution disks If there is a need to move ECLiPS to another computer use the UNINSTALL option of the installation program This option removes ECLiPS from the computer it is installed on The distribution disks are modified to allow ECLiPS to be installed again on another computer To run ECLiPS make sure that ECLIPS S90 70 is the current directory by typing CD ECLIPS S90 70and then press lt Enter gt Now type ECLIPS to start the program Chapter 1 Getting Started 1 3 Getting Help There are three ways to get help 1 ECLiPS Help System ECLiPS has a built in help system that can always be accessed by pressing the key on your keyboard marked lt F1 gt This help system is context sensitive meaning that ECLiPS provides the helpful information you need based on the location of the cursor on the screen or the highlighted menu option at the moment you ask for help More information about using the ECLiPS help system can be found in the reference section of this manual 2 ECLiPS Reference Manual The reference section of this manual contains helpful information organized by the command function or procedure name Use the main index at the back of this manual or the reference section index at the beginning of the reference section to locate information
189. p State when the program starts Asa reminder as to which State will begin the sequence when power is applied to the con troller the first State of every Task must be named PowerUp While every Task in a controller must have a unique name to differentiate it from the others States in different Tasks may have the same name All States within one common Task must have a unique name but a State in one Task can be named the same as one in a different Task As with Tasks names chosen for the States should be descriptive By using combinations of words that describe something unique to the State such as the action performed or function of the State the program becomes self documenting Using descriptive names makes it possible for people other than the original designer to use and modify a se quence at a later date with minimum learning time spent trying to understand the pro gram Naming I O Circuits Variables and Internal Flags Each input and output from and to the field enters and leaves the controller through some particular hardware card A name is given to each of these I O points All refer ences to I O circuits use the assigned name Names are also used for variables and internal flags All names must be unique A vari able must not have the same name as a State or a flag must not use the name of a Task The only exception to this rule is that States in different Tasks may use duplicate names The English name should be descripti
190. pace To construct a multiple word name for descriptive purposes the designer should use the underscore character _ to separate words or use uppercase to start every new word Table Movement TableMovement Naming Tasks Task names are arbitrary It is suggested that Task names be descriptive of the activity they represent This descriptive use of names means clearer documentation and the ability to create automatic diagnostic output messages by combining Task State and I O names to make complete messages A Task may be added to the program by using the Add a New Task option from the Add Menu or just typing in the Task keyword followed by a colon and the Task name Each Task is assigned a name as it is built and each Task must have a unique name This name appears at the beginning of every Task Every time the designer wants to refer to the Task using ECLiPS such as in writing other Task sequences during debugging or dur ing diagnostics development the English Task name should be used Naming States Each Task contains one or more States Similar to Tasks a name is assigned to every State of the program either through the Add menu or directly into the program using the ECLiPS editor Once assigned these names are used when performing any func tions associated with States while using ECLiPS ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Each Task always begins execution in the PowerU
191. pecific circuit faults Both tables list the date and time of the fault Quit Leave Debug Mode and return to Main Menu Online Modify The Online Modify option is used to change the program without halting program execution One Task of the program is changed at a time When the Task changes are complete ECLiPS translates the entire project checking for any programming errors The State that is to be active when the changed Task starts executing is specified and then the changed Task is downloaded The changed Task replaces the old one at the start of the first scan after the Task is downloaded Modify Mode Menu Options The programmer is can change the project while the program is running using most of the same menu options available in Program Mode The differences in the menu options offered in Modify Mode reflect the editing limitations for this mode e One Task is modified at a time e No discrete analog 1 O or Register Variables may be added or changed e States may be added or deleted but the number of States in the modified Task is limited to 2 more than the number of States in the largest Task of the project e Variables may be added but not made retentive and existing variables may not be changed or deleted Online Modify Restrictions GFK 0731B Chapter 8 Reference 8 87 Online Modify Menu Differences from Program Mode ADD The changes in the ADD menu from Program Mode are that Tasks cannot be added and the Stat
192. peration can be de scribed as a sequence of events and some of the actions occur simultaneously to the ac tions of both stations I Fill Station II Mix Station III Conveyor Outline with Tasks Only Since each Task operates concurrently with the other Tasks the order of Tasks in the out line has no meaning Identify the States Now each Task is decomposed into the States which define the Task The Tasks are de fined in the order that they appear in the outline See the sections on State Logic Con trol Theory and Creating a Control Program for more information about States Fill Station States Looking at the Fill Station Task sequence of events we see that there are four distinct steps each defined by the status of the process at that point in time Step 1 On power up the fill station waits for a can to arrive at the station When a can arrives the status of the process changes Step 2 Chemical 1 starts to pour into the can Chemical 1 continues to pour into the can until 20 pounds of chemical 1 are in the can GFK 0731B Chapter 4 Programming Tutorial 4 3 4 4 Step 3 Now chemical 2 starts pouring into the can The next State of the process starts when 10 pounds of chemical 2 are in the can Step 4 The last State is waiting for the can to be removed from the fill station When the can is removed the procedure repeats by starting again with step 1 When the process starts the fill station Task waits for a
193. point 45 sets the setpoint of PID loop named Tank_Level to 45 The following table lists each of the parameters with a description and keyword to iden tify the parameter in an ECLiPS program statement PID Loop Parameters Parameter Action Action Direct or Loop_Action Set to D or I to make PID integrate from 0 Inverse toward 100 if the setpoint gt process variable direct acting or process variable gt setpoint inverse acting Gain for the PID Setpoint Setpoint Name of the variable acting as setpoint or a value to use as the initial value Setpoint Max Scale SP_Max Engineering unit value for 100 scale or blank to use 100 Setpoint Min Scale Engineering unit value for 0 scale or blank to use 0 Process Variable Name of the process variable Process Var Max PV_Max Engineering unit value for 100 scale or blank Scale to use 100 Process Var Min PV_Min Engineering unit value for 0 scale or blank to Scale use 0 Control Variable Control_Var The output of the PID loop analog output channel or floating point variable Control Var Max CV_Max Engineering unit value for 100 scale or blank Scale to use 100 Control Var Min CV_Min Engineering unit value for 0 scale or blank to Scale use 0 Amount to be added to the Output High Limit High_Limit Maximum allowable value for the Output High Limit Max HL_Max Engineering unit value for 100 scale or blank Scale to use 100 High Limit Min HL_Min Engineerin
194. pression in a Statement is executed only if the Conditional Expression in the Statement is true The usual action that is dependent on a conditional is a transition to another State Conditional Expression lt Test Conditional gt lt Character Input Conditional gt Test Conditional The test conditional starts with the keyword If and is followed by one of the four types of Test Conditional Terms The keyword NOT can precede the conditional term Several Conditional Terms can be joined by the AND and OR keywords The AND Terms have lower precedence and are therefore executed first The order of execution can be changed by use of parenthesis and parenthesis can be nested Test Conditional If NOT lt Conditional Term gt OR AND NOT lt Conditional Term gt The type of Conditional Test Terms are Digital Timer Relational and Current State Conditional Term lt Digital Test Conditional gt lt Timer Test Conditional gt lt Relational Test Conditional gt lt Current State Test Conditional gt Digital Conditional The Digital Conditional Term tests the status of digital I O circuits and internal flags This term is a discrete name followed by the keyword ON or OFE Digital Test Conditional lt Digital I O Name gt lt Flag Name gt AND OR lt Digital I O Name gt lt Flag Name gt ON OFF Chapter 8 Reference 8 9 8 10 e The following notational
195. pstream PID s output as when it reaches full scale then any further integrating of the upstream PID would be counter productive These inputs can stop that excess integration in the counter productive direc tion while allowing immediate response in the opposite direction which is the direction that will have an affect on the down stream PID Using the Track Block_Up and Block_Down signals allow the User to build very sophis ticated controls If all that is needed is a simple single loop controller these inputs can be ignored A more detailed discussion of these inputs and their use is in the PID Algorithm Philosophy Section PID Output The PID outputs consist of a floating point value output that can either be assigned di rectly to an analog output or to a floating point variable for use such as the input to another PID or in some calculation Internal to the PID the output s range is 0 to 100 Like the inputs the output also has a scaling constant that allows the User to set the maximum and minimum scale This allows the User to make the output be a 100 to 100 controller or any other engineering units desired If the maximum and mini mum scale constants are left blank the PID output is 0 to 100 The other three outputs are digital variables that indicate the status of the PID algorithm They are Track_Mode HL_Status and LL_Status The two limit outputs are true when either the PID has reached its limit or the Block_Up or Blo
196. r Can Removal has no action and one transition The Statement for this State is When there is no can at the station go to the Power Up State ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B I Fill Station A Power Up 1 Ifa can is at the Fill Station go to the Pour Chemical 1 State B Pour Chemical 1 1 Pour Chemical 1 2 When the weight of the can contents is over 20 pounds go to Pour Chemical 2 State C Pour Chemical 2 1 Pour chemical 2 2 Ifthe weight of the contents of the can is over 30 pounds then go to Wait for Can Removal State D Wait for Can Removal 1 When there is no can at the station go to the Power Up State Fill Station Task Outline Mix Station Statements The Statements for the Mix Station are very similar to those for the Fill Station The com pleted outline for the Mix Station follows II Mix Station A Power Up 1 Ifa can is at the Mix Station go to the Lower Mixer State B Lower Mixer 1 Lower the mixer 2 When the Mixer is in the down position go to Mix Chemicals State C Mix Chemicals 1 Mix the chemicals for 10 seconds then go to the Raise Mixer State D Raise Mixer 1 Raise the mixer 2 When the Mixer is in the up position then go to the Wait for Can Removal State E Wait for Can Removal 1 When there is no can at the mix station go to the Power Up State Mix Station Task Outline GFK 0731B Chapter 4 Programming Tutorial 4 7
197. r Logic executing in the CPU There are also some systems which require more than one SLP For most systems that are State Logic only there is no need to change the default memory ranges In a multiple SLP system one of the SLP programs probably would access memory outside of the default ranges State Logic only systems using the Con troller interface mode should select the Controller Small option Systems that are hybrid State Ladder Logic may need to change the default memory ranges although many can use the default ranges For hybrid control systems using the Controller interface mode must use the Controller Large option Make Memory Range Adjustments If memory range adjustments are necessary make these adjustments after selecting the CPU and the interface mode It is also a good idea to make the range adjustments before assigning any State Logic names to memory locations If the new range does not include an existing name ECLiPS aborts the change Make changes to memory ranges by selecting the PLCI O Ranges option from the DE FINE menu To change the range enter a new base or first location for the block of memory to be accessed by the State Logic program ECLiPS displays the span of pos sible selections for the base of each memory type If the State Logic program accesses all of the available CPU memory for a particular memory type ECLiPS indicates that the range cannot be adjusted by giving a span of bases of 1 1 EC
198. r Table Size Monitor Tables Total Variable Plus I O Chapter 8 Reference 3000 1000 1 100 second 3000 8 89 GFK 0731B A Actuate 8 21 Actuate Term 8 4 Ada a721 Add Term 8 5 AMEZ Analog Inputs Outputs 8 61 Analog Scaling 8 63 Analog Variables 8 14 AND SSIES Anti Reset Windup 8 27 ARCTAN 8 22 ASCII Variables AUTOEXEC BAT Automatic Program Execution 8 82 Automatically Start Program 8 68 B BCD 8 38 BCD_In_Convert 8 38 Bitwise _And 8 22 Bitwise_Or 8 22 Block_Down 8 28 Block_Up Bumpless Transfer 8 26 C Calculations 5 3 8 15 Cascaded PID Loops 8 26 CCM Protocol Listing 7 6 ccm2 s 58 8 82 Change State 8 17 Change State Term 8 6 Character 8 15 8 17 8 18 Character Variables 3 8 8 13 8 14 8 61 Clear_Bit 8 4 8 17 8 21 Index Clearing Outputs at Power Up 8 53 Clock sf Co P rocessor 8 50 Comments 5 7 7 8 Communication Functions Conditional Expressions 8 2 8 9 Conditional Terms 8 20 CONFIG SYS 8 89 Configuration 8 17 Configuring 6 1 Configuring Serial Ports 8 58 Controller 8 51 Copy 8 76 Copy_Table_To_Table 8 36 cos 8 22 Counter 4 20 CPU 8 48 Cross Reference List 7 6 Current State B 12 8 18 8 61 6 55 D Data List Data Types 8 15 Day 8 19 Day_of_Week 8 19 Debug Mode 8 81 Define 4 14 8 73 Define_Table 8 34 Diagnostics 2 11 4 20 8 70 Digitall O Dis
199. r for the communications port parameters to be changed the State ment using the Set_Commport keyword must be executed by the program To enter the Statement to change the serial port parameters press the right arrow key to edit the parameters in a form When finished press lt Enter gt then select the Insert Re configuration Data for Port option ECLiPS now enters the instructions into the pro gram Remember that just changing the parameter form does not change the port set up but the Set_Commport Statement must be executed in the program See the Control System Configuration part of the Reference Section for more informa tion about the serial ports Mathematical Functions The advanced mathematical functions are listed Press lt Enter gt to write the function name into the program at the cursor location See the section on mathematical calcula tions in the Reference section of this manual Reserved System Variable Names The time and date variables are listed Use these time variables to access the system clock The clock can only be read using these variables in the program To change the clock settings use Logicmaster 90 to change the clock in the CPU then cycle power in the system Define These options are used the meaning of words used in the ECLiPS program and to speci fy system configurations Each of the options is described below The Current Word in the Text This option displays the definition of the word
200. r was lost may go ON when power is back on again To accomplish this initialization a rung of ladder logic in the CPU program is used to clear the SLP outputs This rung uses the First Scan contact and block clears to initialize the SLP outputs Watchdog Timer The watchdog timer is designed to stop the control system if the SLP fails or stops communicating with the CPU ECLiPS provides an option to include a watchdog Task into the State Logic program every time a new project is started The watchdog Task can also be added to the program at any time by importing the watchdog project that is stored in the same directory as ECLiPS This Task is designed to work in conjunction with rungs of logic executing in the CPU program The rungs of ladder logic are included in the file called WATCHDOG SDE on disk 2 of the ECLiPS distribution disks See the section on setting up the system CPU for an explanation of how to incorporate this file with an existing ladder program The watchdog rungs of ladder logic should not be used without the watchdog Task included in the State Logic program If the watchdog timer does shut down the system the fault PLC CPU Software Fault appears in the fault table The default watchdog system provided is a generic system that does add some time to the scan time of the system To minimize the scan time impact customize the watchdog Task and ladder logic by changing the Heartbeat and SLP Running outputs from G mem
201. ram that is also doing some control operations Select the Co processor option for this exercise Program the Fill Station Task GFK 0731B In this section we program the Fill Station Task with ECLiPS A box now appears for the name of the first Task Enter the name of the first Task now Fill_Station Remember that names in ECLiPS have no spaces Chapter 4 Programming Tutorial 4 11 4 12 ECLiPS first asks whether to include the Watchdog Timer Task and whether to restart this Task in the State that was active when the program was halted Select NO for both of these options ECLiPS now asks for a diagnostic value for the maximum length that the PowerUp State should be active This is a diagnostic option which we will discuss later For now just hit the lt Enter gt key which tells ECLiPS not to include this option ECLiPS has named the first State of this Task PowerUp Every Task must have a Power Up State which is the State that is active when the program starts ECLiPS now displays the first Task s name and its first State PowerUp Next enter the first Statement at your keyboard If Can_At_Fillis on go to the Pour_Chem_1State This is a complete description of the first State This Statement varies slightly from the Statement in the outline to accommodate direct references to I O devices and the nam ing conventions This is how your screen should now appear a80007 Task Fill Station State PowerUp If Can_At_Fill i
202. rcular or F for fill The way the shift will act when the last variable is reached Fill_value either 1 or 0 The value that will be placed in the bits of the variables that have been shifter in a F or fill type shift No meaning in a circular shift Variable_1 the name of the first integer variable and therefore the variable farthest to the left in the shift register Variable_2 the name of the second integer variable in the shift register Variable_28 the name of the 28th or last integer variable and there fore the variable farthest to the right in the shift register Note only Variable_1 must exist all others are optional String Manipulation The String_Manipulation function allows the User to perform various functions upon a string variable String variables can be up to 80 characters long and often are used for inputting data from an ASCII oriented device such as a bar code reader or outputting to a similar device such as a scale or robot General In many cases the 80 characters is not one piece of data but a series of sub strings each containing unique data Thus the ability to extract the sub strings convert the data to integer or float and store in a variable and store a sub string into a larger string is some times needed GFK 0731B Chapter 8 Reference 8 39 8 40 The string manipulation function is in reality several functions in one The User defines the name of the string to be manipulated and the number of the
203. re ON only when a State turning them On is active On the other hand a variable maintains its value independent of which State is active GFK 0731B Chapter 3 Creating a Control Program 3 7 3 8 Internal Flag Internal flags are variables that act like digital outputs but do not produce any physical output from the controller An internal flag can be set true by a State in one Task and then checked by a State in another Task These flags can be used to coordinate the actions of different independent Tasks An internal flag is like a digital output in that if an active State is not setting it true the controller will automatically turn it OFE Floating Point Variable This variable type is used to store numbers that are not whole numbers or numbers outside the range of integer variables When variables are needed with a math function generally it should be a real variable String Variable This variable type stores a collection or string of characters These characters can be any alpha numeric or control character represented by an ASCII code This type of variable is a little more complicated and is used mainly in accepting inputs or creating outputs to serial communication devices Character Variable Character variables store one single ASCII character This type of variable is especially useful for operator interfaces when the operator must enter a single character Time Variables The time variables are used to view or ch
204. results of calculations totals that are being accumulated over time something that must be remembered from one time period to the next and constants that may be changed or tuned Each variable is assigned a name during pro gram development Once created each variable is available to be shared between Tasks and States within Tasks One State may assign a value to the variable and another State or the same State at a later time period uses the value of the variable in making a decision Once a vari able is assigned a value that variable maintains that value until a program Statement assigns a new value to that variable Variables can be made to hold their values over a halt or power cycle When using ECLiPS to write programs or monitor running controllers or generate diag nostics the user needs to only refer to the variable by its English name Remember that choosing descriptive names for variables helps to make the program self documenting The different variable types are listed below Integer Variables This type of variable represents a whole number from 32767 to 32768 Integer variables have many uses including counts menu choices and item quantities Integer variables can also be used as logical variables or variables that have only two possible values either 1 or 0 Variables used in this manner can be thought of as true or false on or off etc Using integer variables in this manner differs from using flags since flags a
205. rtant point is that Finite State Theory does not create or invent TASKS TASKS are already an inherent part of every process to be controlled Programming with a state control language is merely the act of describing the process GFK 0731B Chapter 2 State Logic Control Theory 2 3 What Makes State Control Logic Different Both State Logic and traditional methods of control test the condition of the inputs and internal data to decide how to control a system The fundamental difference of State Logic is its inherent ability to also use the current condition State of the process in mak ing control decisions Traditional methods of control artificially simulate different States with internal contacts or data values Consider the following States State Ready_For_Cutting Turn on the Cutter_Ready_Light When the Cut_Push_Button is pressed go to the Engage_Cutter State State Engage_Cutter Start the Cutter_Blade When the Cut_Complete_Detector is tripped go to the Raise_Blade State These States describe a situation where the only time that the cutter should be activated from the push button is when the machine is ready for the cutting operation State Log ic inherently allows the system designer to take the State of the process into the decision By making the only transition to the Engage_Cutter State be in the Ready_For_Cutting State the designer limits the time that the Cut_Push_Button has any affect on the Cut ter_Blade In these
206. ry Select the project top be downloaded to the controller A new project cannot be down loaded when the program is running When the program is running ECLiPS asks whether to stop the program or cancel the download Reset and Clear the State Engine Use this option to clear the State Engine program memory and return all configuration parameters to the default condition The State Engine setup options returned to their default state are CCM port setup error handling setup programming port selection and automatic run setup Monitor Monitor is an on going display of the current values of all the selected elements Up to 6 elements may be included in a monitor table at any time and up to 10 monitor tables may be defined Monitor tables have user given names of up to 30 characters each Spaces can be part of a Monitor Table name Enable Display This function activates the display of the monitor tables While a table is displayed the user may press lt Tab gt to switch to the next table If there are no tables defined the user will be prompted to add a new one Disable Display This function disables the monitor display but the tables are saved for the next time they are needed Add a New Monitor Table This function allows the user to add a new monitor table as long as there are currently less than 10 It acts the same way as Monitor Setup If no name is given to the table it will default to Number X where X is a number betw
207. s Since floating point operations use a lot of time the analog val ues and their conversion to floating point values are not updated every scan Converse ly unscaled analog channels are always updated every scan The State Engine uses a default scheme of scanning the analog channels at 1 10 second intervals To inspect or change this scheme choose the Series 90 Scan Rates from the DEFINE menu Use this option to change ECLiPS default analog scanning scheme A form is provided to show how the analog channels are scanned There are 8 columns and 10 rows The entry in each one of the 80 locations represents a block of 8 analog channels Each 1 10 of a second a collection of analog channels are scanned The entries in each row represent the blocks of channels that are scanned for that 1 10 second time interval There are 8 columns each representing a block of 8 channels so that up to 84 analog channels can be scanned every 1 10 second If a block is to be scanned every interval or 10 times a second then that block must appear once in every row of the form There are 4 data entry locations at the top of the form To enter values into the form fill in these data entry locations for the Time Entry Row Block Entry Column Type and Number Item is entered into the form when the Number value is entered State Engine Scan Considerations 8 62 The State Engine operating system is a scanning system There are several steps that are exec
208. s the project name with a PSM extension This options does all of the functions of the Er ror Check but does not ask whether to check for undefined words Download Project to the Controller This option sends the current project to the State Engine without any new translations Use this option when there have been no changes to the program since the last transla tion Eliminating the translation step saves time for the download If there have been changes to the program since the last translation an attempt to connect to the State En gine after the download will result in an error message from the State Engine saying that the program on disk is more recent than the one in the controller At this point the pro gram must be translated first then downloaded again Delete the Project from Disk When this option is selected a list of all projects in the current directory except the cur rent project are listed Select the project to delete from the list and press lt Enter gt Chapter 8 Reference 8 77 8 78 Make a New Task Group Use this option to create a new Task Group Initially the project is created all in one Task Group but for organizational reasons the project can be split into up to ten groups of Tasks Another reason to use more than one Task Group is that each Task Group is limited to 64K characters including all spaces and comments Therefore if the English program is to take up more than 64K Bytes of memory space more than
209. s ON go to Pour_Chem_1 To enter the next State hit lt F3 gt to view the menu select ADD then Add a New State Enter the State name Pour_Chem_1 You are asked to specify the maximum time for the State to be active each time a State is created From now on until we discuss this op tion just hit lt ENTER gt to ignore this option Now describe this State by entering the following Statements OpenChem_Valve_1 When Fill_Weight_Input is above 20 pounds go to Pour_Chem_State_2 The first Statement turns on the output which controls the valve for the first chemical The second Statement defines the only transition of the State which will happen after 20 pounds of chemical 1 have entered the can ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B It is not necessary to use the ADD functions to enter a new State To enter the next State make some space at the end of the program by pressing the lt Enter gt key twice Now just enter at the keyboard the following State Pour_Chem_2 Enter the description of this State as follows OpenChem_Valve_2 If the Fill_Weight_Input is greater than 30 pounds then go to Wait_for_Can_Removal ECLiPS provides some of the flexibility of expression in that functions can be specified in more than one choice of expressions These last two States are very similar in function but have been specified in different ways See the Basic Programming Structure sec
210. scribing the activities of the application To write the actual program real world outputs and inputs must be specified The actual assignment of names to input and output circuits may be done before during or after the program is written In this section the actual I O devices and their program names are specified The table in this section identifies the actual I O devices for this application and the names to be used in the program See the Effective Use of English Names part of the Creating a Control Program section of this manual Clever descriptive names that fit well to the primary attribute of that circuit s function is strongly encouraged This practice pays dividends in future program modifying clear documentation and easier troubleshooting ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Further good descriptive names will enhance the quality of the automatic diagnostics that can be created by linking Task State and I O names together for automatic diagnos tic output information Each name can have up to a twenty characters Names can contain letters numbers and the underscore character _ but must begin with a letter The name must be a continu ous string of characters Because ECLiPS uses the space character as a way to tell where one word ends and the next begins as we normally do in written English a name can not contain a space To construct a multiple word name for descript
211. se options include serial port setups error handling configura tion CCM setup and programming port designation Error Handling Setup There are two classes of run time errors generated by the State Engine critical and non critical This option allows the State Engine to be configured to either halt the pro gram or continue running when an error in either one of these two classes occurs When this option is chosen the first the response to critical and next to non critical er rors is chosen This setup may be changed at any time Chapter 8 Reference 8 8 8 82 Change Programming Port This option allows serial port chosen to be the programming port to be changed The programming port is the one that connects the State Engine to ECLiPS The default pro gramming port is port 1 This port cannot be the same port as the CCM port Enter the number of the port that is the new programming port If the programming port is changed the current connection between the State Engine and ECLiPS is no long er valid ECLiPS must now be connected to the new port Enable Disable RS 422 Designation for the Ports This option controls whether the designated port is an RS 422 485 port or an RS 232 port Either port can be either designation Download Project to the Controller Use this option to download a new program to the State Engine First the option to se lect a new directory is presented and then a list of projects from the current directo
212. sed by the SLP the different communica tion methods and how to set up your system CPU Memory Accessed by the SLP ECLiPS programs access discrete and register types of memory stored in the CPU Dis crete types are bit oriented being either ON or OFF 1 or 0 The discrete types accessed by the SLP are lI Q M T G S SA SB SC The following table de scribes each of the discrete memory types GFK 0731B Chapter 8 Reference 8 45 8 46 Memory Reference Reference Description Yl Real world discrete inputs These locations store the status of the inputs following the last scan of the inputs by the CPU of the system Q Real world discrete outputs These locations store the status of the outputs as last set by the control programs The CPU updates the real world outputs during its normal execution cycle M Internal discrete references These references are used to store intermediate conditions used in the logic decisions in the program Temporary internal references G Global Data references This data can be shared be tween multiple devices using the Genius Communica tions Module to communicate over a Genius commu nications bus S SA SB SC System Status references References system fault information Discrete Memory Types Register memory types store a value using sixteen bits of memory space The types of register storage are R Registers R analog inputs AI and analog outputs AQ These re
213. sed to change the current State of a Task The Suspend_Task keyword puts the named Task into the Inactive State The operating system gives every Task a State named Inactive When a Task is in the Inactive State this Task performs no activity and the only way to exit this State is for another Task to change its current State The inactive State can also be used with the GO keyword The Resume_Task keyword causes the named Task to go to the State that was active be fore being suspended e If Water_Level is above 45 5 feet then Suspend_Task Fill_Tank e If Water_Level is below 43 8 feet Resume_Task Fill_ Tank ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B GFK 0731B Sending Serial Data Write Term The Write Term is the keyword Write followed by data to send inside double quotes Optionally a communications port name or R_Register numbers may be specified fol lowing the data to be sent If no port name or R_Register is specified the data is sent to the programming port Send Serial Data Term Write lt Serial Data gt lt Port Name gt R_Register_ lt Number gt Write Push Start Button to Operator_Control Write ERROR Number 16 to R_Register 10 The data is directed to either serial port which is named or to a series of R_Registers If the data is directed to R_Registers the string of characters are stored in the Series 90 reg ister reference table beginnin
214. slate and Download Project to the Controller Use this option to load the program into the State Engine through the programming port The program is saved to disk checked for errors translated and transmitted to the State Engine through the serial port To translate the program ECLiPS creates a control program for the State Engine from the English program This translated program is saved in a file in the current directory and has the project name with a PSM extension This option always causes the program to be translated If there have been no changes to the program since the last translation use the Download only option to eliminate the translation step If the program has been changed since the last time it was saved ECLiPS asks whether to check for undefined words Answer YES to have ECLiPS present all undefined words one at a time for definition Answer NO to skip the undefined word search for a faster download When a program is downloaded it is automatically saved to disk and a backup of the previous file with a BKO extension is created ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B GFK 0731B The download function always checks the program for errors If an error is found the cursor is placed at the line where the error occurred and a message is provided with an explanation of the error The program is sent out the current serial port If ECLiPS cannot communicate to a State Engin
215. ssage if the State is active longer than the specified time If no the diagnostic is required for this State just hit lt Enter gt with no value specified in the Max Time entry window The new State is inserted directly after the State where the cursor is located in the English text Adda New Task This option adds a new Task to the current program ECLiPS asks if this Task should start in the State that was active when the controller was stopped A prompt is displayed for the Max Time value for the PowerUp State of this Task The new Task name plus the PowerUp State name is inserted directly at the end of the Task where the cursor is lo cated Add a State Time Out Diagnostic This option adds the program text for a State Time Out Diagnostic This option enters a Statement at the cursor location that transitions to another State in the event the State has been active for the specified amount of time This time must be in the range of 01 to 600 00 seconds Add an Analog Range Checking Diagnostic This procedure works on any analog channel Select an analog channel from the list and enter the high and low limits along with the State to branch to should the limit be ex ceeded When the form is completed the ECLiPS enters the diagnostic instructions into the program at the current cursor position The English program instructions can be edited just as any other program Statements are edited Add a Variable Range Checking Diagnostic The var
216. starting and ending character if a sub string within that string is of interest The start and end must be less than 80 the first character is number 1 and the start must be smaller than the end or a run time error is generated The User also defines the type of manipulation see following sections and a reference variable that is used by the operation The parameters defined by the User for the func tion are String_name the name of the string to manipulate Start_character_num the number of the starting character used in the string The first character is 1 End_character_num the number of the ending character used in the string The last character is 80 Operation a character code that defines the operation to be performed see following section for definition Reference_variable the name of the reference variable to be used in this manipu lation The variable type required depends on the Operation and the State Engine generates a critical error if a mismatch occurs Search_Character the name of a Character_Variable or the actual character to be matched by this operation This is an optional parameter which only needs to be entered when the match M opera tion is chosen Operations E for Extract If the Operation character is an E the function will extract the sub string defined by the starting and ending characters and copy those ASCII character numbers to the string variable named in the Reference_variable s For stor
217. t 23 e Turn on Alarm_Light for 2 seconds then go to Reset Read Get input from comm port or CPU Registers must be used with GO term e Read Name from Port_1 then go Display_Name e Read Status_String from R_Register 69 for 23 R_Registers then go to Display_Status State Wait Time Delay must be used with GO term e Wait 2 34 seconds then go to Restart State 8 20 ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Functional Terms Keyword Synonyms Meaning Examples Energize Start Actuate Turn on a Digital Point s Turn Run Open Turn_On e Start Conveyor_Motor e Energize Forward_Solenoid e Actuate Backwash_Pump and Backwash_Pump_Light Add Add a value to a variable e Add 2 to Count Divide Divide a variable by a value e Divide Count by 2 Go Make another State the Active State e If Switch1 is On go to the Motion State Halt Stop the process immediately e Jf Alarm is On Halt Make Put Place Set Assignment operator initiator e Make Total 56 Multiply erie a variable by a value e Multiply Count by 2 Perform Execute Invoke an ECLiPS Perform function e Perform Display_Date_Time with Set_Commport Change comm port settings while running e Set CommportPort_1 with Baud_Rate 9600 Data_Bits 8 Parity N Stop_Bits 2 Auto_Echo Y Xon_Xoff Y Receiver_On N End_of_Message_Char h0d Start_PID Invoke a PID Loop Start_PID Main_Loop State Identifies the Name
218. t Motor State names identify the general action of the State The specific actions and the transi tions are specified in the Statements ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Identify the Statements This level is the most specific level of the outline Statements specify detailed actions which are to occur while this State is active and the transitions to other States See the discussion of Statements in the State Logic Control section of this manual The actions specified by Statements include digital outputs that are to be ON changes in analog output values changes in variable values and messages to be sent Examples of actions as specified in Statements are Turn ON Pump 5 Start Mixer Motor Write Operation complete to Operator Add 1 to Parts Count Turn ON Forward Solenoid Statements also specify the transitions of a State Both the condition for transition and the target State are identified The status of digital inputs values of analog inputs and variables and elapsed time are used to specify conditions for a transition State names specify the target State that becomes active when the condition is true Typical transi tions as they would appear in an outline are If Forward Limit Switch is ON go to the Drill State If Vat Temperature is less than 45 degrees go to Raise Temperature State When 10 Seconds have Passed go to Raise Mixer State If Part in
219. t where the values listed are to be stored Column_number the column number of the first element where the values listed are to be stored Number_of_values the number of values that will be stored in the following consecutive Table elements Value_1 a constant or the name of a variable of the same type as the Table to be stored in the first Table element identified by the Row_number and Column_number Value_2 a constant or the name of a variable of the same type as the Table to be stored in the first Table element after the Table element identified by the Row_number and Column_number Value_28 a constant or the name of a variable of the same type as the Table to be stored in the last Table element identified by the Row_number and Column_number Chapter 8 Reference 8 35 8 36 There can be up to 28 values initialized with each individual function and they can begin at any Table element location Each column element of a row is filled in before the next value is placed in the next row The State Engine will generate run time critical errors if the Table selected does not match the type of Swap being used or if the row and column numbers are out of range for the selected Table or if the number of values added to the starting element position would go beyond the last element defined for the Table Copy_Table_To_Table The Copy_Table_To_Table function allows the User to copy one Table s values into another Table The Tables must be o
220. t_Side_Length by 4 5 e Divide Box_Volumn by Volumn_Adjustment Set_Bit Clear_Bit Term TheSet_Bit Clear_Bit Term is used to set a High Speed Counter Command bit or assign individual bits of a variable First the Set_Bit or Clear_Bit keyword is used If a variable bit is being set the variable name is followed by the zero based bit number Set_Bit Clear_Bit Term Set Bit Clear Bit lt Integer Variable Name gt lt Integer Number gt e Set_Bit Transfer_Status 2 e Clear_Bit Tac_Register Changing Active States Term There are three ways of changing the active State of a Task A Task can change its own State change the active State of another Task or cause any Task to become inactive or resume its previous active State Change State Term Go lt State Name gt Make lt Task Name gt equal lt State Name gt Suspend Task Resume Task lt Task Name gt The GO term is the means by which a Task transitions to another State Only the Go and the State name are mandatory All other words are optional as in the following exam ples The Go may appear in any Statement but there may only be one Go per Statement e Go to the Forward_Motion State Tasks control other Tasks by merely setting the Task to a new State value e Put the Assembly_Control Task into the Emergency_Stop State In this example put is a synonym for make and into is a synonym for equal The Suspend_Task and Resume_Task Keywords are also u
221. table outputs test ON only when verification that the output is ON is received back from the block Variable values are updated immediately and flags set ON are not tested as true until the next scan 6 Service CCM Messages If there is a completed message received from the CCM serial port that command is executed 7 PID Update PID Loops are updated when the update time period for the loop is completed Program Scan The program scan starts at the start of the program scanning the active State of every Task During program execution there is always one and only one State active in each Task The operating system completes a scan of the program tens and maybe hundreds of times every second During the scan of the active State of a Task each Statement of the State is scanned in the order that it appears Keep in mind that a Statement is a series of Terms terminated by a period GFK 0731B Chapter 8 Reference 8 63 8 64 TASK 1 a80002 State 1 Statement 1 State 2 Statement 1 State 3 Statement 1 TASK 2 State 1 Statement 1 eee oe Statement 2 ee Statement 3 State 2 Statement 1 TASK 3 Figure 8 5 Program Scan The actions specified by Functional Terms are executed when the Term is scanned Each Statement must have at least one Functional Term Conditional Terms are optional If there are no Conditional Terms in a Statement the Functional Terms are always executed during each scan When Condition
222. tation Options This section describes each of the documentation options and shows a sample of the documentation produced when the option is selected The Up and Down arrow keys are used to move the highlighted cursor to the options To have a selection printed with the documentation package type a lt Y gt next to the option to be printed or a lt N gt to suppress a selection from being printed Actually pressing any other key causes the form to toggle the display between Y and N for the highlighted option For the Number of Copies and lines per page options type in the appropriate number Press lt ENTER gt after selecting the number of packages to print Press lt F9 gt to start printing the docu mentation out the host computer s parallel port English Code The ECLiPS program is printed when this option is selected The name of the project and the date and time that the program was last modified is printed at the top of the page A page number is printed at the bottom of the page An example is listed below Project CONVEYOR Last Modified 8 28 90 8 56 Task Fill Station State PowerUp If Can_At_Fill is on go to Pour_Chem_1 State State Pour_Chem_1 Open Chem_Valve_2 If Fill_Weight_Input is above 30 pounds Then go to Wait_for_Can_Removal Riverside Plan English Code 7 2 ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B GFK 0731B O Map The I O Map is a list of a
223. ter Add 1 to Parts_Count Write Parts Count equals Parts_Count to operator_display If Parts Count is less than 24 go to the PowerUp State If Parts Count is 24 go to the Send_Message_2 State State Send_Message_1 Write DRILL BIT DULL to message_board go to Retracting State State Send_Message_2 Send RUN COMPLETED to operator_display go to New_Cycle State TASK Setup_DISPLAY State Operator_Panel Sample Task with Some Elements Labeled GFK 0731B Chapter 2 State Logic Control Theory 2 5 Tasks Sequences of States By design a machine or process is a collection of Tasks that operate concurrently A car engine has an electrical system a fuel system a mechanical motion system cooling sys tem exhaust system and a starting system that while independent in action must be coordinated in time for the engine to work Similarly all industrial processes machines and systems will contain several Tasks that are mutually exclusive in activity yet joined in time While the Tasks are independent in action they are naturally related in time since all Tasks come to life at power up and stop with shutdown The control system designer can divide the overall process into individual Tasks to exactly mirror the system The types of Tasks that may be created are unlimited Typical Task types include motion control tasks mode control tasks filling tasks measuring tasks shutdown tasks data recording tasks diagnosti
224. ter Input Read lt Variable Name gt from lt Communications Port Name gt R_Register lt Register Number gt for Integer Number gt Test Conditional If NOT lt Conditional Term gt OR AND NOT lt Conditional Term gt Conditional Term lt Digital Test Conditional gt lt Timer Test Conditional gt lt Relational Test Conditional gt lt Cur rent State Test Conditional gt Digital Test Conditional lt Digital I O Name gt lt Flag Name gt AND OR lt Digital I O Name gt lt Flag Name gt ON OFF Timer Conditional lt Numeric Constant gt lt Integer Variable Name gt seconds Current State Conditional lt Task Name gt equal not equal lt State Name gt Relational Test Conditional lt Numeric Relational Term gt lt Character Relational Term gt lt String Relational Term gt Numeric Relational Term lt Numeric Value gt lt Relational Operator gt lt Numeric Value gt Character Relational Term lt Character Value gt equal not equal lt Character Value gt String Relational Term lt String Value gt equal not equal lt String Value gt ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Value Expressions Numeric Value lt Numeric Constant gt lt Calculation gt lt Numeric Variable Name gt lt Analog I O Name gt lt PID Value gt Calculation lt Numeric Value gt lt Operator gt
225. that an output to one program must be an input to the other Therefore Q s which are outputs to the CPU may be used as inputs to the State Logic program logic and l s normally inputs to the CPU may be changed and thus are actually outputs to the State Logic program ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B GFK 0731B Specific situations where these types of definitions are used are for communications be tween the two programs when the SLP is used to provide diagnostics for an existing ladder program and when the SLP is used to simulate the real world response to a lad der program State Logic Processor Memory Capacities The CPU selection determines the I O and register ranges that can be accessed by the control program ECLiPS generates different control programs depending on the type of CPUselected 731 732 771 772 0r781 782 The State Logic program can access a set number of points for each of the discrete and register memory types These points must form a continuous block anywhere within the range provided by the selected CPU The SLP obviously cannot access any more dis crete or register memory locations than those provided by the CPU in the system 90 70 CPU and SLP I O and Register Capacity Programs with I O transfer type Co_Processor are limited to 2000 M I O Programs with I O transfer type Controller are limited to 600 R registers CPU Selection The CPU se
226. the default number to view View System Status This includes system date time memory usage and current scan rates in milliseconds The scan rate information specifies the average scan rates for the last 1000 scans The scan is also split into the time for State Logic to be scanned and the time for the transfer of I O data between the SLP and CPU Trace The Trace is a collection of the most recent program State transitions This option allows the user to display the history of State transitions on the screen for all Tasks or selected Tasks Upload Trace from the Controller This function will upload the Trace data from the controller and display it for the user to browse through The Trace is also stored in a file on the logged disk and directory so that it may be viewed at a later time Each upload of the Trace information overwrites the previous upload saved to disk The Trace is stored in a file with the project name and a TRC extension for example CONVEYOR TRC The display shows each State transition listing the starting State the resulting State and the time of the transition The most recent transition is at the top of the list There are string search functions available to help find a specific State transition Press lt ALT F gt to access these search functions Also the up and down arrows and lt Pg Up gt and lt Pg Dn gt keys are used to move through the listing Display the Previously Uploaded Trace This functio
227. ting to the State in which we are actually trying to make the engine start up and run on its own In the Starting State we could make a Statement like When the ignition key is in position three go to the Crank_Starter_Motor State representing one of the Statements that form a part of the complete description of all possible actions of the Starting State in the Starting System Task If the car was equipped with an automatic transmission the Statement might need to read If the transmission is in neutral or park and the ignition key is in position three then go to the Crank_Start er_Motor State The actions of a State are described with a Statement or a collection of Statements In ECLiPS a Statement is a collection of Terms describing the desired actions for that State Statements end with a period and can be thought of as sentences although punctua tion and proper grammar are not required There are two types of Terms used in a Statement Functional and Conditional Functional Terms perform a specific action including turning on digital outputs setting analog outputs to values performing calculations setting variables to values transfer ring to another State or communicating with other devices Conditional Terms perform some decision making test which enables or prevents execu tion of the functional Term in the Statement The conditions that can be checked for in clude digital point status analog values a re
228. tion in the Reference section of this manual Enter the next State called Wait_for_Can_Removal as follows State Wait_for_Can_Removal When Can_At_fillis OFF go to PowerUp Notice that ECLiPS is not case sensitive ie it does not recognize differences between upper and lower case letters The following is how your screen should appear a80008 Task Fill_Station State PowerUp If Can_At_Fill is ON go to Pour_Chem_1 State Pour_Chem_1 Open Chem_Valve_l When Fill_Weight_Input is above 20 pounds go to Pour_Chem_2 State Pour_Chem_2 Chem_Valve_2 Fill_Weight_Input is above 30 pounds go to the Wait_for_Can_Removal State Wait_for_Can_Removal Can_At_Fill is off go to PowerUp GFK 0731B Chapter 4 Programming Tutorial 4 13 Define Undefined Words 4 14 Allnames and undefined words used in the program must be defined for the control program to execute Call up the menu by hitting lt F3 gt then select the DEFINE choice The choices on the DEFINE menu offer several different ways to define the critical words of the program a80009 States Tasks Diagnostics Perform Functions 1 0 Variables Keywords PID Loops Comm Ports 1 0 PID Loops Comm Ports Words in the Text Hot Key Undefined Words Throughout the Text PLC 1 0 Analog Digital Register Series 90 1 0 Scan Rates PID Loop Initial Values Communication Port Configuration PLC Type PLC I O Ranges Task Mix_Station State
229. tion of how to do mathematical calcula tions Math Assignment Term This Term does a simple arithmetic operation on a variable value then assigns the new value to the variable The four terms are add subtract multiply and divide Math Assignment Term lt Add Term gt lt Subtract Term gt lt Multiply Term gt lt Divide Term gt The Add Term is the keyword Add followed by a number or variable name then a vari able name Add Term Add lt Numeric Constant gt lt Variable Name gt lt Variable Name gt e Add 1 to Parts_Count e Add Second_Shift_Parts_Count to Total_Parts_Count The Subtract Term is the keyword Subtract followed by a number or numeric variable name then a variable name Subtract Term Subtract lt Numeric Constant gt lt Variable Name gt lt Variable Name gt Subtract 2 78 from Starting_Value Subtract Tare_Weight from Test_Weight The Multiply Term is the keyword Multiply followed by a variable name then a number or variable name Multiply Term Multiply lt Variable Name gt lt Numeric Constant gt lt Variable Name gt e Multiply Parts_Lost by 2 Multiply Machine_Strokes by Strokes_Per_Cycle Chapter 8 Reference 8 5 The Divide Term is the keyword Divide followed by a variable name then a number or variable name Divide Term Divide lt Variable Name gt lt Numeric Constant gt lt Variable Name gt e Divide Righ
230. tion use the Print option of the Program Mode Project menu The CCM information about each data element of the State Logic program is displayed by the printout The following is a sample of the CCM information print out 5 Integer Variable Names Oven_Baking Time 7001 Name CCM Number Pf StateName State Numer Oooo i a a Oooo i i o E E Part of the CCM protocol is for the message from the Master to define the type starting register and total number of bytes to be read or written The Master needs to specify the correct number of bytes depending upon the type of variable The byte count and other considerations for each of the data types follow Chapter 8 Reference 8 59 Task Current State Integer Variables Floating Point Variables Digital Inputs Outputs Internal Flags Analog Inputs Outputs String Variables Character Variables PID Loop Parameters The value stored in the designated register represents the cur rent State of this Task Current States can be changed and monitored using the CCM protocol This value uses 1 register or 2 bytes ina CCM message The inactive State is repre sented by a value of 0 Warning If an invalid number is writ ten to put a Task into a State that does not exist the program continues to execute but that Task does nothing This data type uses 1 register or 2 bytes ina CCM message Any Register Variables that are integers are in this class These values use 2 registers or 4 b
231. tool for debugging and troubleshooting a program The Tasks for which State changes are displayed can be changed so that unwanted changes are not included It is often desirable to see what I O memory locations are assigned to the program names To inspect the names and definitions select PLCI O from the menu Select the memory type and then the name from the list for the form that lists the I O name type number and input or output PID Loop Tuning Screen This option only appears in the Debug Mode menu when the program loaded into the State Engine has a PID loop defined After choosing this option a list of defined PID loops is displayed Select the desired PID loop from the list to use the tuning screen The tuning screen displays the values of the PID parameters and the status of the loop The values are continuously updated as they change Use this screen to tune the loop by changing parameter values Viewing and Clearing CPU Faults GFK 0731B Select the option for CPU faults to list the current fault table in the CPU Both the PLC faults and the I O faults can be displayed You may clear the fault tables from this dis play Note that the fault tables are not available when running in simulation mode Chapter 6 Online Tutorial 6 7 Chapter Creating Program Documentation This section describes how to use the ECLiPS program documentation features The top ics covered are printing program documentation including the E
232. tring If the Operation character is a f the function will convert the value stored at the float variable named in the Reference_variable to ASCII and store that value into the sub string location defined by the starting and ending character numbers C for Concatenate If the Operation character is a C the function will concatenate or add the string of char acters named in Reference_variable to the main string The resulting main string can not exceed 80 characters so the addition of the Reference_variable characters will be trun cated at that time L for string Length If the Operation character is an L the function will calculate the number of characters in the string and put that number into the integer variable named by Reference_variable M for Match the Given Character with a Character in the String If the operation character is an M the function matches the character in the Search_Character parameter to the first character in the sub string designated by start ing character and ending character values The position of the first match is returned in the Reference_Variable Errors in General The functions check to make sure when conversions to or from ASCII are performed that legal values will result and produce errors if they do not GFK 0731B Chapter 8 Reference 8 4 Time Counter This time function is designed to keep track of the elapsed time of an event The time is stored in named integer variables that can be ex
233. ts 2 4 EXCEPTASPROVIDEDINSECTION2 2ABOVE IF YOUTRANSFERPOSSESSIONOFANY COPYOF THE LICENSEDSOFTWARE TO ANOTHER PARTY WITHOUTWRITTENCONSENTOFGE YOUR LICENSE IS AUTOMATICALLY TERMINATED Any attempt otherwise to sublicense assign or transfer any of the right duties or obligations hereunderis void 2 5 Ifthe Licensed Software is being acquired on behalfofthe U S Government Department ofDefense the LicensedS oftware is subjectto Restricted Rights including the legend to be affixed to the software as setforthin DOD Supplementto the F ederalAcquisitionR egulations DFAR s para graph 252 227 7013 c 1 If software is being acquired on behalf of any other U S Government entity unit or agency the Government s rights shall be as defined in paragraph 52 227 19 c 2 of the F ederal Acquisition R egulations FAR s 3 WARRANTY 3 1 GE warrants thatthe Application Software will be in substantial conformance with thespecifications in the manual pertaining thereto as of the date of shipment by GE If within ninety 90 days of date of shipment it is shown that the Application Software does not meet this warranty GE will atits option either correctthe defector errorinthe Application S oftware free ofcharge ormake available to Customer satisfactory substitute software or as alastresort return to Customerallpayments made as license fees and terminate the license with respectto the Application Softwareaffected GE does notwarrantthat operatio
234. tus When this bit is set the PID output has reached the high limit parameter or Block_Up for this PID is true This is a read only bit Low Limit Status Low_Limit_Status When this bit is set the PID output has reached the low limit parameter value or Block_Down is true for this PID loop This is a read only bit PID Inputs There are 5 inputs to the PID algorithm Two of the inputs are the process variable and setpoint These are either analog inputs or calculated real variables such as the output of another PID The setpoint can also be a constant which can be adjusted on line from the PID tuning menu available in OnTOP or the ECLiPS Debug Mode The two analog inputs process variable and setpoint are treated as 0 to 100 signals inside the algorithm for mathematical purposes Each input and output has a maximum ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B and minimum scale parameter associated with it When the User programs the PID he sets the minimum engineering unit which will correspond to 0 and the maximum en gineering unit that will correspond to 100 for that input The PID algorithm will inter nally scale the inputs generating a percentage of the scaling range before they are used If the minimum and maximum scale parameters are left blank the algorithm assumes that input is a percentage already scaled 0 to 100 The other three inputs are digital values and can be used to imp
235. tware shall be delivered free of any rightful claim forinfringementofany United States patentor copyright Ifnotified promptly in writing and given authority informationandassistance GE shalldefend ormay settle atits expense any suitor proceeding against Customer so far as based on a claimed infringement which would result in a breach of this warrantyandGE shall pay alldamages and costs awarded therein againstC us tomer due to such breach In case the Application Software is in such suitheld to constitute such an infringementandits use is enjoined GE shall atits expense and option eitherprocure forC us tomer the right to continued use or replace same with a non infringing productor part or modify the Application Software so that it becomes non infringing or remove the software and refund the li cense charge pertaining thereto less reasonable depreciation for any period of use and any trans portation costs separately paid by Customer The foregoing states the entire liability of E for patentand copyright infringement by the Licensed Software or any partthereof 5 2 The indemnity under the preceding paragraph shall not apply to any use of Application Software in conjunction with any other product in a combination not furnished byGE as a part ofthis transaction As to any suchuse in such combination GE assumes noliability whatsoev erfor patentand copyrightinfringementand Customer will hold GE harmless against any in fringementclaims arising
236. uide March 1998 X 8 1 8 1 8 1 8 2 8 3 8 9 8 13 8 13 8 16 8 19 8 19 8 20 8 24 8 24 8 32 8 33 8 44 8 45 8 46 8 46 8 54 8 58 8 63 8 63 8 68 8 68 8 68 8 69 8 69 8 69 8 81 8 88 8 89 8 90 8 90 GFK 0731B Contents Figure 2 1 State Diagrams pe eiere e enia E E eee eee eee Figure 3 1 Program S aM sect toes dhe Sale ts as aa ee Gh aa is ne ae a dhe Figure 3 2 Statement Scan oora i e E eens Figure 4 1 Tutorial Application Drawing 0666s Figure 4 2 Main Men s iseda bisnis mirata cee eens Figure 4 3 Project Menu setsit oaase eitn eee eens Figure 4 4 Conveyor Task 0 00 renerien nnn Figure 5 1 Program Scans are ipen ane p nee Figure 5 2 Statement Scan ssrotisierm iet d eia nee Figure 5 3 Program Scan with GO Terms 0 66666 Figure 5 4 Statement Scan with GO Terms 6 06 ce cece Figure 6 1 Sample Logicmaster Configuration Screen 045 Figure 6 2 Debug Mode Screen 2 6 ces Figure 8 1 PID Algorithms sy raiet nait a aa Ea aA AEE EE Figure 8 2 Cascaded PID Loops 2 0 nee Figure 8 3 SLP CPU Interfaces 0 6 eee eee eee Figure 8 4 Series 90 70 State Logic Setup Decision Tree Figure 8 5 Program SCAN epid na e AE ene Figure 8 6 Statement Scan 1 6 66 Figure 8 7 Program Scan with GO Terms 000066 Figure 8 8 Statement Scan with GO Terms 6006 c cece eee Figure 8 9 List Menu rei
237. ump2 e Energize Clamp_1 Clamp_2 Clamp_3 and Clamp_Flag Assigning Values Make Math Assignment Set_Bit Clear_Bit To assign values use the Make Term Math Assignment Terms Set_Bit Clear_BitTerms These Terms assign values to variables and analog I O points Assign Values Term lt Make Term gt lt Math Assignment Term gt lt Set_Bit Clear_Bit Term gt Make Term The Make Term is used to assign a value to a variable or analog I O point The Term starts with the keyword Make an is followed by a variable or analog name the keyword equal then a number or a calculated value Make Term Make lt Numeric Assignment Term gt lt Character Assignment Term gt lt String Assignment Term gt Numeric Assignment Term lt Numeric Variable Name gt lt Analog I O Name gt lt PID Value gt equal lt Numeric Value gt Character Assignment Term lt Character Variable Name gt equal lt Character Value gt String Assignment Term lt String Variable Name gt equal lt String Value gt Make Flow_Setpoint equal 25 e Make Valve_Control 67 89 Make Total_Defects equal Temperature_Failures Stress_Failures ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B GFK 0731B Make Output_String equal Enter setpoint now Make Test_Character Make Tank_Level_PID Bias equal 34 456 See the section Calculated Values for a descrip
238. ust pass before incrementing the counter The data type of this parameter is character and is specified by either a variable or a constant This parameter is required only if the action parameter is an A Assign For other actions this parameter may be left blank A description of the possible choices for this parameter follows T Specifies the counter to be incremented every tenth of a second S Specifies the counter to be incremented every second M Specifies the counter to be incremented every minute H Specifies the counter to be incremented every hour Note Each of the time counters has a maximum value of 32 767 If you expect the value is going to exceed the maximum use the next larger counter type For example use a minute counter instead of a second counter After reaching the maximum the counter still continues to increment becoming a negative number 8 42 ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Specialized Perform Functions Alloff the above functions have specific parameters which are passed to the function These parameters are all chosen by filling in similar forms which specify parameter type and whether or not it is required The following performs have unique ways that the operations are specified Display Date and Time This function displays the current date and time in the desired format After choosing this option a form
239. ust use the PID Define menu and name the input and setpoint as described in Section Bumpless Transfer Figure 2 also shows a Manual Auto station between the PID output and the actual ana log output card This station allows the User to place the station in Manual and then by means of Raise and Lower pushbuttons change the actual value of the Manual Auto output In the Auto mode the value of the Manual Auto station is equal to the output of the PID ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B GFK 0731B When the M A station is in Manual the station value can and usually will be forced toa value other than one that will make the setpoint equal the process variable input If the PID followed its normal operation the integral term would continue to integrate be cause of the error signal between the process variable and setpoint This would leave a difference between the PID output which is the Auto input to the M A station and the actual M A output Then when Auto mode is selected this difference would cause a jump or bump in the M A output This would upset the process and is desirable to avoid To prevent this bump from happening the PID needs to have another mode of opera tion besides its automatic mode In this mode called tracking the PID output will be maintained at what ever value it is set to such as the M A output in this example The PID will not perform its normal arith
240. uted in sequence to complete a scan These steps are continuously repeated while the State Engine is in operation One of the steps executed when the State Engine is running a program is the scan of the program The first section below discusses all of the steps executed for each scan cycle and the next section discusses the program scan step ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Steps of the Scan Cycle These are the steps that the State Engine executes each scan cycle 1 Character Input Service The State Engine retrieves messages that have completely received from the serial ports and dispatches them These messages may be inputs to READ terms or ECLiPS or On TOP commands 2 Real Time Clock The State Engine updates the current time registers from the Real Time Clock 3 Transfer Digital I O Inputs are written from the CPU to the State Engine Input Image Table Outputs written from State Engine Output Image Table to PCIM and then the output image table is cleared 4 Transfer Analog I O Analog output values are sent to the CPU and input values are read from the CPU when the update time for a block of analog channels has elapsed High speed analog channels are updated every scan 5 Program is Scanned The active State of every Task is scanned The State Engine looks to the Input Image Table for tests of digital inputs Digital outputs that are to be ON are set in the output image
241. ve and can be made up of several words attached by the underscore character ECLiPS allows the user to define I O points or other name other elements of the program at any time during the programming process Statement Structures GFK 0731B The greatest difference between the outline and the ECLiPS program is in the expression of the Statements This section describes how to express the Statements in an ECLiPS program State Drill_Advancing Turn Fwd_Solenoid on After 3 seconds pass start Drill_Motor When Fwd_Limit_Switch is tripped go to the Retracting State If 17 seconds pass go to the Send_Message State Example ECLIiPS State with Four Statements Most States consist of several Statements that describe what action is to happen while the Task is in that State what conditions will cause a transfer and to what State the Task transfers to With ECLiPS these Statements are written in descriptive English generally but not necessarily consistent with the rules of English grammar Statements are short sentences or phrases that describe the desired actions in a way that anyone can read and understand A Statement always ends with a period just as a sentence does in English Chapter 3 Creating a Control Program 3 5 Constructing Statements There are two types of Terms in a Statement functional indicating some action taken and conditional indicating some test for decision making After 3 seconds pass start Drill_Motor Turn Ma
242. vity of Each State The next step is to write the control program from this outline e Modify the outline to specify Names of Program Elements Define these Names and Configure the I O Circuits GFK 0731B 4 1 The Control Application 4 2 Fill Station Mix Station y Mixer_Up_ Switch 7 Mixer_Down_Motor Chem_Valve_1 Chem_Valve_2 Mixer_Down_Switch Miner Mixer_Up_ Motor Can_At_Mix Can_In_Place Can_At_Fill Fill_ Weight_Input SCALE Conveyor_Motor Figure 4 1 Tutorial Application Drawing The application used for this tutorial is a conveyor belt which moves cans to two stations along the belt The first station is a filling station which fills the can with two different chemicals and the second station mixes the chemicals When a can arrives at the fill station 20 pounds of chemical 1 are poured into the can Then 10 pounds of chemical 2 are poured into the can When the can is removed from the station there is a wait until the next can arrives and then this sequence of operations is repeated The mixing station waits for a can to arrive then lowers a mixer into the can The mixer is turned ON for 10 seconds and then raised to the up position The process restarts af ter the can is removed from the station The conveyor waits for a can to be placed at a starting position Then if both stations are finished with their operations the conveyor starts moving When a can gets to the fill station
243. way to construct this counter is to put it after the conditional so that it is executed only once before the next State becomes active State Check_For_Part If Photo_Sensor is ON then Make Parts Count Parts_Count 1 and go to the PowerUp State Tasks should be designed to control operations that are executed in parallel or at the same time as other operations This might be a motion operation that happens in paral lel with operator interface activity An emergency stop push button is an example of a function that should be placed in its own Task The Task can be called ESTOP for example and its only function is to monitor the emergency stop button and coordinate the activity of the other Tasks Chapter 5 Helpful Hints 5 3 Task ESTOP State PowerUp Let Reset 0 If the emergency_stop button is pressed Go to the Shut_down State State Shut_down Make Fill_Can Task Shut_Down State Make Conveyor Task Shut_Down State Make Temp_Control Task Shut_Down State Go to the Wait_Reset State State Wait_Reset If the Reset button is pressed Let Reset 1 Go to the PowerUp State This example uses one Task to determine if an emergency stop button has been pressed and then forces the other Tasks to go to their own shut down States Notice that States in different Tasks can have the same name The integer variable Reset is used to commu nicate to the other Tasks when the Reset button has been pressed An indication th
244. windup The upstream controller PID 1 needs to be prevented from winding up An input called Block_Up will transfer the PID algorithm into a mode such that it will not integrate in the Up towards 100 direction This is called anti reset windup The PID will still be able to integrate down if the error signal reverses direction That is if the process variable is less than the setpoint the PID will not integrate up If the pro cess variable becomes greater than the setpoint the PID will integrate down The Block_Down input works exactly opposite In the case of Figure 2 if the setpoint for PID 1 is greater than PV1 PID 1 output will continually increase This is the setpoint for PID 2 and assume it is already greater than PV2 and PID 2 has reached its high limit There is no profit in PID 1 output getting larger since PID 2 can not respond to its demand PID 2 is already at its limit Therefore the User should set the PID_1 Block_Up input true and stop the PID from winding up fur ther Then when either PV2 increases or the high limit on PID 2 is changed which will allow further action by PID 2 the PID_1 Block_Up input can be set false and PID 1 can resume integrating Or if PV1 rises above the setpoint in response to the control action PID 1 will begin integrating the output of PID 1 in the lower direction which is permissible Chapter 8 Reference 8 27 8 28 When PID 1 output falls below the input PV2 into the downstream PID 2 PID
245. wing each message Use this formatting feature suppresses these terminating characters CRLF sends a carriage return line feed character pair CRLF X X number of carriage return line feeds CLS Clear the Screen sends 25 carriage return line feeds SPACE X X number of spaces CHR X The ASCII character for the value in the is sent X The ASCII character for the hexadecimal value X is sent e The character is used to place two words together without any spaces in between them For example Pressurepsi would look like one long variable name to ECLiPS and would yield an error message But Pressure psi would yield the desired result of the value directly followed by the character string psi e To send a double quote sign use 22 or CHR 34 To send per cent sign use All other keyboard characters are sent by simply typing them between the quotes PID Loops Control Terms Start_PID Stop PID PID Loop control Statements start with the keywords StartPID or StopPID followed by the PID Loop Name If stopping a PID loop a value which sets the value of the control variable can follow the PID loop name PID Loop Control Term Start_PID Term Stop PID Term Start PID Term Start_PID lt PID Loop Name gt Stop PID Term Stop_Pid lt PID Loop Name gt with lt Numeric Constant gt e Start_PID Oven_1 e Stop_PID KILNS with 456 29 Change Ser
246. wn load the Conveyor program discussed in the Programming Tutorial section of this manual After a successful download a screen displaying the statistics of the project is displayed Strike any key to go on line ie enter Debug Mode The usual way to change modes is using the lt F10 gt key Try hitting the lt F10 gt key now to change modes back to the Pro gram Mode Hit lt F10 gt again to return to Debug Mode GFK 0731B Chapter 6 Online Tutorial 6 3 s Debug Mode Screen a80021 Press to Scroll Back in Log Run Time Errors lt Ctrl R gt Reset Message Controller Status ees a ee Figure 6 2 Debug Mode Screen At the top of the screen is the familiar bar displaying the name of the project As in the Program Mode the bottom bar shows the current use of some of the more important function keys lt F10 gt returns ECLiPS to program mode for editing the project Notice that the help system continues to be accessed by pressing lt F1 gt and that the action of lt F3 gt brings up the main menu for this mode just as it does in Program Mode Terminal Log There is a window below the top bar titled Terminal Log Any messages sent by the State Engine controller are displayed in this window There are several different types of messages that the State Engine may send to the terminal log All programmed Write Terms which send characters to the serial port that connects ECLIiPS to the State Engine are displayed
247. word to define This word is the name of an analog input so choose the Analog Channel option from the define menu The analog options are similar the only change being the analog types Choose AI for this analog input num ber 1 and Input After these options are chosen ECLiPS asks if you want to enter scaling values for this analog channel Scaling an analog channel means that the raw data used by the I O module is converted into a different range of values for the State Logic Program The converted value is a floating point value while the raw values are integers Select the YES option to scale the Fill_Weight_Input analog channel A form is displayed to specify how raw analog values D A or A D are converted to engineering units The range of raw values is selected during the configuration of the CPU using Logicmaster 90 Chapter 4 Programming Tutorial 4 15 Assuming that the analog channel configuration is 0 4095 fill in the A D or D A values in the form as 0 for the Low Point and 4095 for the high point The Fill_Weight_Input represents a scale which measures from 0 to 50 pounds Enter 0 for the Low Point engi neering units value and 50 for the High value All references to this analog input in the program return a floating point value from 0 to 50 Chem_Valve_2 is the next undefined word which must be defined as a digital output The next word to define is pounds The definition of this word demonstrates how engi neering
248. xer_Down_Motor Q3 Mixer_Down_Switch I4 Mixer_Motor Q4 Mixer_Up_Switch I5 Mixer_Up_Motor Q5 Analog Channel Names Fill_Weight_Input AI1 Data List ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B Task State List The Task State option prints each Task name of the program followed by all of the State names in that Task This listing produces a good overview of the process especially when the Task and State names are descriptive of the operation performed An example is listed below Task State List Project CONVEYOR Last Modified 8 28 90 8 56 TASK FILL_STATION STATE POWERUP STATE POUR_CHEM_1 STATE POUR_CHEM_2 STATE WAIT_FOR_CAN_REMOVAL TASK MIX_STATION STATE POWERUP STATE LOWER_MIXER MAX_TIME 20 STATE MIX_CHEMICALS STATE RAISE_MIXER MAX_TIME 30 STATE WAIT_FOR_CAN_REMOVAL TASK CONVEYOR STATE POWERUP STATE FILL_STATION_WAIT STATE MIX_STATION_WAIT STATE START_CONVEYOR STATE MOVING_CANS Task State List GFK 0731B Chapter 7 Creating Program Documentation 7 5 Cross Reference List The Cross Reference List produces a list of all the data elements of the program In dented below each element is printed every Task State combination where that element is used in the program This print out is a valuable tool when debugging or troubleshooting a program An ex ample of a Cross Reference List is shown below Cross Reference List Project CONVEY
249. xt Task Similarly each State begins with the keyword State followed by a colon then a State Name State Attach_Arm Each State includes all of the Statements from the start of the State to the beginning the next State Statements like English sentences are terminated by a period The first Statement of a State begins right after the State name and includes all of the expressions appearing be fore the period There are two types of expressions Conditional and Functional Functional expressions describe some action that the controller executes Conditional expressions describe a condition which must be true for the functional expression in the statement to be executed Expressions consist of one or more Terms connected with logical AND OR operators Terms express the fundamental actions and status tests of the program Terms are built from words All words are classified into one of three categories Keywords Names and Filler words All filler words are ignored when the program is translated into a control program therefore the keywords and names are the only important words in a Term Words are separated by spaces ECLiPS comes with a set of keywords which are appropriate for many control applica tions The programmer can define synonyms for the keywords and even change the default keywords The set of filler words is similarly controlled by the programmer Language Structure Notational Conventions 8 2 In the follow
250. y Statement must have a Functional Expression and may or may not have a Condi tional Expression The Conditional Expression may come before or after the Functional Expression Functional Expressions GFK 0731B Functional Expressions are composed of one or more Functional Terms There is no limit to the number of Functional Terms used in a functional expression Functional Expression Functional Term Functional Terms describe any action or changes in the control system turning on out puts sending messages out a serial port making a new State the active State of a Task setting analog output values and changing variable values setting serial port parame ters starting and stopping PID loop execution and doing specialized Perform functions are all performed by Functional Terms Functional Term lt Turn On Discretes Term gt lt Assign Values Term gt lt Change Active States Term gt lt Send Serial Information Term gt lt PID Control Term gt lt Change Serial Port Configuration Term gt lt Execute Perform Functions Term gt Chapter 8 Reference 8 3 Turning ON Discretes Actuate Term The Actuate Term is used to turn on Digital I O Points and Internal Flags This Term starts with the keyword Actuate followed by one or more discrete names Turn On Discrete Term Actuate lt Digital I O Name gt lt Internal Flag Name gt e Actuate the Ready_Light e Start Pump_1 and P
251. y Statement of the active State is evaluated There are two types of Functional Terms that can prevent the execution of the rest of the Statements in a State One is the Halt command which stops program execution The other is the go to command which immediately causes another State to become the active State For example If Start_Pushbutton is pushed go to Start_Up State GO to Restart_State causes the Start_Up State to become the active State when the process input represented by Start_Pushbutton is true All Terms or Statements following this Statement are not executed and at the next controller cycle the scan of this Task starts at the first Statement of the Start_Up State ECLiPS English Control Language Programming System User s Guide March 1998 GFK 0731B GFK 0731B TASK 1 State 1 Statement 1 State 2 GO Statement 5 Statement 2 State 3 Statement 1 TASK 2 State 1 Statement 1 C GO Statement Statement 3 State 2 Statement 1 TASK 3 Figure 5 3 Program Scan with GO Terms pe Functional Term Satisfied Conditional Term GO Functional Term a Unsatisfied Conditional Term F nctio al Term Satisfied Conditional Term Unsatisfied Conditional Term Functional Term Figure 5 4 Statement Scan with GO Terms During the program scan any changes to variable and analog values are made immedi ately Therefore a variable change in one Task is visible by the rest o
252. yed delete the period following the last Statement of the program Now check the project for errors When the error message is displayed press the lt CTRL F1 gt to view the help message for this error To view definitions of the words for the project or to view other system attributes choose the LIST option from the menu A list of topics to view appears Choose from the list of topics to view the specific word definitions The bar at the bottom of the screen shows several functions available to manipulate or use these definitions The functions avail able are inserting a new definition deleting a definition and editing the definition In addition the word defined may be entered into the program at the current cursor loca tion The LIST option is very useful with large applications since it is difficult to remem ber all of the words that have been defined To make changes in the text of the program ECLiPS provides the basic functions of a word processor To move through the text use the arrow keys lt HOME gt and lt END gt keys and lt PAGE UP gt and lt PAGE DOWN gt keys Use the backspace and delete keys to erase text the enter key to add new lines lt ALT F1 gt to toggle between insert mode and overtype mode and the tab key to indent To perform more advanced text editing operations use the FIND and TEXT options from the menu Press the lt F1 gt key twice displays a keyboard summary containing several pages of the functions
253. ypes 8 48 Menus 5 10 Minute Modulus 8 22 Monday 8 23 Monitor 6 5 8 83 Month 8 19 Multiply 8 17 8 21 Multiply Term 8 5 N Names 3 4 5 6 NOT 8 9 8 23 Numeric Variables O off 8 23 On 823 Online Modify 8 88 Output 8 47 Output_BCD_Convert 8 39 P Path 8 76 Perform 8 19 8 21 8 70 Perform Functions 8 9 8 17 8 32 PID Command and Status Bits 8 30 PID Inputs8 30 PID Loop Parameters 8 61 Pi Loops 7 BS 7 20457 5 87 PID Output 8 31 PID Parameters Index PID Value 8 15 8 19 PLC Type 8 74 PM 8 24 Precedence 8 13 Print 7 1 8 77 Printer 8 81 Program Mode 8 69 Programming Port 8 58 8 83 R R Register 8 7 8 24 R_Register Variables RANDOM 8 22 Ranges 8 55 8 75 READ 19 5 4 5 12 8 19 520 Register 8 46 Register Variables 3 8 8 72 Relational Operators 8 23 Relational Terms Replace 8 75 Restart_In_Last_STATE Restart_In_Last_State 8 3 Resume_Task Retrieve 8 76 RS 232 RS 422 485 8 58 8 83 RUN 6 5 S Saturday 8 24 Save 8 76 Second 8 19 Seconds 8 24 Security 8 80 Serial Data 8 17 Serial Ports l 7 8 58 8 78 Series 90 Scan Rates 8 74 Index 3 Index Index 4 Set_Bit 8 4 8 17 Set Commport 8 Setup 8 89 Shift_Register 8 40 Simulation Mode 6 5 8 68 8 82 SIN 8 22 SLP CPUInterface Specifications SORT 8 22 Start
254. ytes of space and are stored in IEEE format To use these values the host computer must be able to interpret the 4 bytes as an IEEE floating point number Any Register Variables that are floating point values are in this class These points are represented by the right most bit of the transferred byte A 1 represents ON and a 0 represents OFF Note that since digital points are OFF by default an output set ON with CCM will only be ON for one scan and then State Engine operating system turns it OFF Each flag is represented by a bit in the data transmitted The first bit refers to the flag specified and the other bits repre sent other flags At least one byte or 8 flags are represented in every transmission Therefore when writing to flags at least 8 flags ar set at a time State Logic treats flags as discrete 1 O in that they are OFF by default Therefore a flag set through CCM is ON for one scan only The State Logic oper ating system turns OFF the flag in the next scan Analog I O are floating point values and therefore require 2 registers or 4 bytes The host must be able to interpret this value as an IEEE floating point number Analog channels designated high speed channels are integer information us ing only 2 of the 4 bytes String variables can be up to 80 bytes or 40 registers long Characters are 1 byte There are 21 parameters associated with each PID loop The register number displayed in the printout represents the number

Download Pdf Manuals

image

Related Search

Related Contents

Rooftop Split 40RT  42. Case study of high yield cassava varieties in  Micro Innovations USB455P User's Manual  Manual de Instalação e Manutenção - Extranet  Document complet  enfer o u paradis  

Copyright © All rights reserved.
Failed to retrieve file