Home
WindLDR 4.10 Tutorial
Contents
1. 8 i Close Help To manipulate your program with the Point Write command 1 Click Online gt Monitor from the Menu Commands toolbar 2 Click Online 2 Point Write from the Menu Commands tool bar 3 Type the desired operand in the left box and press the Tab key to display its current value 4 Overwrite the current value by typing a new one into the right box on the same line Press Enter In the above example D0 is being changed from 0 to 500 and the preset value of T1 is being changed from 0 to 300 2001 IDEC CORPORATION 4 BASIC PROGRAMMING INSTRUCTIONS 4 18 BASIC INSTRUCTIONS WINDLDR TUTORIAL NO and NC Conventions It is important to understand the correlation between an external field device that is wired to a PLC the devices operation conditions and the PLC s input logic programming The illustrations below show how you can program any switch wired to a PLC as either NO or NC and how this affects the controlled output 10001 00000 10001 00001 10001 00000 4 10001 00001 External Switch is Closed ON 4 BASIC PROGRAMMING INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTIONS 4 19 The following figure illustrates the position of the external field device and its affect on the programmed ladder logic Monitor Screen Display Rung External Programmed On Off Input Device Logic
2. When the timer T or counter C is used as X0 through Xn or YO through Yn the current value of the timer counter is read out 2001 IDEC CORPORATION 15 XY CONVERSION 15 2 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL S1 Format Number Select a format number 0 through 29 A maximum of 30 formats for XY conversions can be set Xn X Value Enter a value for the X coordinate The integer value can be 0 through 32767 If the X value becomes negative a user program execution error will result turning on special internal relay M8004 and the ERROR LED Yn Y Value Enter a value for the Y coordinate The integer value can be 32768 through 32767 Valid Data Types Word W Integer I Double Word D Long L X When a bit operand such as input I output Q internal relay M or shift register R is designated as Xn or Yn 16 points integer data type are used When a word operand such as timer T counter C data register D or link register L is designated as Xn or Yn 1 point integer data type is used 15 XY CONVERSION 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 15 3 Convert X to Y CVXTY H CVXIYS I 52 DI When an input is on the X value designated by operand S2 is converted into corresponding Y value according to the linear relationship defined in the XYFS instruction Operand S1 selects a format from a
3. Inputs Outputs With expansion 10 135 Q0 Q31 Micro C Alone 10 115 90 91 With expansion 10 1597 0 0597 ONC Alone 10 1277 Q0 Q277 5 10 Type CPU 10 5 Q0 Q5 Q g Alone 16 I O Type CPU 10 110 Q0 Q6 gt p 24 1 0 Type CPU 10 115 90 91 2 130 1107 30 Q107 zb 24 I O type CPU only g MicroSmart 20 1 0 Type CPU I0 113 00 07 With Expansion 130 1187 Q30 0187 2 20 0 Type CPU 10 113 00 07 gt a With Expansion 130 1307 Q30 Q307 9 40 1 0 Type CPU 10 127 00 017 With Expansion 130 1307 Q0 Q307 Input Allocation for the Micro Micro C ONC and MicroSmart 2001 IDEC CORPORATION 9 ADVANCED INSTRUCTIONS INTRODUCTIONS 9 6 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Exercise 9 Creating a Data Move Program Micro Micro C ONC and MicroSmart series In this exercise you will use the data move instruction MOV to move different values into the preset of the counter The preset values of the counter 6 and 12 represent the number of packages in a soda packaging plant One pushbutton represents each package Complete the following steps to create a MOV program When completed your program screen should look like this W WindLDR 2 11w C WINDLDR MOVE LDR File Edit View Configure Compile Online Window Help a ale 2 l E B m Se amp Y IPAE du 2 E T
4. y 0 12 h Comment 6 Click the OK button or press the ENTER key to confirm The 12 contact displays at the beginning of Rung 2 7 SET RESET INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTION 9 Step 6 Enter the Pump A Reset Output Coil on Rung 2 To enter the reset output coil 1 Click the Reset 4 icon 2 Click on Column 2 of Rung 2 The Reset RST dialog box displays 3 Enter QO in the Tag Name field of the dialog box Notice that the properties for the Pump A output coil automati cally display in the Allocation Number and Tag Name Com ment fields Your completed dialog box should look like this Reset Type Tag Name Output C Output Not C Set Tag pup is Allocation 00000 C Reset Comment 0 R 4 Click the OK button or press the ENTER key to confirm The 00 reset output coil displays at the end of Rung 2 2001 IDEC CORPORATION 7 SET RESET INSTRUCTIONS 7 10 BASIC INSTRUCTIONS WINDLDR TUTORIAL Step 7 Enter a Comment for Rung 2 To enter a rung comment 1 Click anywhere on Rung 2 2 Click Edit Rung comment from the Menu Commands e toolbar or click the Rung comment sl icon The Rung Comment Dialog screen displays 3 Click in the white area of the dialog screen and enter When I2 comes on QO will reset or unlatch 4 Click OK to save the comments The run
5. clock Read Tag Name Calendar Read ii Allocation Calendar Write Number iiid Les Hace Clock Read Tag Name po6 Hour C Clock Write Comment 93 rinute D98 Seconc N 3 Enter D96 in the Tag Name and Allocation Number fields 4 In the Tag Name Comment field enter D96 Hour D97 Minute D98 Second 5 Click OK Notice that Rung 1 now has two lines The clock read instruction displays at the end of Rung 1 Line 2 2001 IDEC CORPORATION 13 CALENDAR CLOCK INSTRUCTIONS 13 12 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Step 6 Enter an Comparison instruction on Rung 2 To enter an comparison instruction 1 Click the Compare 2 Click on Column 2 of Rung 2 The Compare Equal To dialog box displays Compare Equal To Tia 51 52 D1 CMP CMP lt gt as I 00093 0000 0010 Repeat Repeat Repeat Data 0 is Sunday 10 is On Register the first fif 293 0 CMP2 Day of Week Day of Week Sundays Data Type wos 3 In the S1 column enter D93 D93 The Data Register Day of Week 4 In the 2 column enter 0 0 0 is Sunday the first Day of Week 5 In the D1 column enter M10 M10 M10 is On if D93 0 Sundays 6 Click OK The CMP2 icon displays on Rung 2 13 CALENDAR C
6. 3 Click the CMP option in the Type field 4 Select Word from the Data Type field 5 Enter D20 D20 and Result of D10 50 in the S1 column 6 Enter 17500 17500 and A critical set value in the S2 column 7 Enter Q2 Q2 and Alarm On Wired to Q2 in the D1 column 8 Click OK 2001 IDEC CORPORATION 10 ARITHMETIC COMPARISON INSTRUCTIONS WINDLDR TUTORIAL 10 18 ADVANCED INSTRUCTIONS Step 6 Save the Program To name and save this program 1 Click as from the menu commands toolbar The Save As dialog box displays 2 Enter ARITHM in File Name field of the dialog box 3 Click the OK button or press the ENTER key to confirm Step 7 Print Transfer and Monitor the Program To print this program refer to page 4 9 To transfer this program refer to page 4 12 To monitor this program refer to page 4 13 10 ARITHMETIC COMPARISON INSTRUCTIONS 2001 1 WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 10 19 Binary Arithmetic Instructions FA Series PLCs The binary arithmetic instructions make it possible for you to program compu tations using addition subtraction multiplication and division For addition and subtraction operations internal relay M307 707 is used to carry or borrow Add with Carry JADDC F147 47 Iz Symbol JADDC S DO operand CY gt DO CY When an input is on the data S and the carry M307
7. 4 Click OK to save the comments The rung comments display above Rung 1 4 BASIC PROGRAMMING INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTIONS 4 27 Step 6 Save the Program gt To name and save this program 1 Click File gt Save as from the Menu Commands toolbar The Save As dialog box displays 2 Enter STARI2 in File Name field of the dialog box 3 Click the OK button or press the ENTER key to confirm Step 7 Print Transfer and Monitor the Program To print this program please refer to page 4 9 To transfer this program refer to page 4 12 To monitor this program refer to page 4 13 2001 IDEC CORPORATION 4 BASIC PROGRAMMING INSTRUCTIONS 4 28 BASIC INSTRUCTIONS WINDLDR TUTORIAL 4 BASIC PROGRAMMING INSTRUCTIONS 2001 IDEC CORPORATION 5 TIMER INSTRUCTIONS Introduction to Timers TML TIM TMH and TMS Timers are used for time delay functions in PLC programs just as relay timers are used in relay logic control systems When power is placed to the control terminals the timing circuit starts timing When the preset time setting is reached it allows current to flow to the coil of the relay thus operating the controlled contacts Micro 1 FA1J 2J FA3S CP11 CP11T Timers These PLCs have 80 built in timers TO T79 of the timers are 100msec timedown timers TIM Each timer must be programmed with an input to control the timer and may be p
8. gt aai xisiel ciated a Advanced Instructions Toolbar p gt Basic Instructions Toolbar a Tes esp mes m e This program shows a Normally Open contact I1 turning on an Output 00 5 is Pump A is 0 1 Wired to 1 Wired to 00 Start 1 Column OpenNet coMt 000 0100000 3 GETTING STARTED 2001 IDEC CORPORATION WINDLDR TUTORIAL 3 3 NOTE You can enlarge your screen by clicking the maximize button in the upper right corner of the WindLDR screen and then clicking the maximize button in the upper right corner of the ladder program screen Program Editing Features There are four ways to create edit WindLDR programs 1 Advanced and Basic Instruction Toolbars Each icon in these toolbars represents a programming instruction To insert an instruction in your program simply click on the instruction icon and then click in the area of your program screen where you wish to place your instruction This point and click easy to use method is the convention for all exercises in this tutorial 2 Hot Keys To use a hot key to access an instruction type the first letter of the instruc tion you wish to insert e g O for Output The Coil Selection Dialog box lists all instructions beginning with O You can then scroll down to the desired instruction and click the OK button or press the ENTER key to
9. 2 Enter MOVE in File Name field of the dialog box 3 Click the OK button or press the ENTER key to confirm Step 5 Print Transfer and Monitor the Program S To print this program please refer to page 4 9 To transfer this program refer to page 4 12 To monitor this program refer to page 4 13 2001 IDEC CORPORATION 9 ADVANCED INSTRUCTIONS INTRODUCTIONS 9 10 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Data Move FA series NOTE Different FA series PLCs may have different move instructions such as WMOV word move and WBMOV word block move Refer to your individual PLC s instruction manual for details The WMOV word move and WBMOV word block move instructions are used for transferring word data to data registers The WNSET word N set instruction is used for setting the data to be displayed or printed to data registers The WNRS word N repeat set instruction is used for clearing a series of data registers The data move instructions are executed in each scan while the input is on Use a level input or pulse input as requires Operand Designation isp S Source including special internal relays ece S Source excluding constants and external settings NW c NW Number of data blocks such as data registers in word 2 bytes F147 F 47 F147 IZ 220 HHHH HHHH WMOV ipS D IO Symbol WMOV isp S D S2D When the input is on 16 bit data from the operand designated by S is set to
10. 7 eg o eo mm o ee i sof caf ined HH 2 s e The Potentiometer value varies on a scale from 0 to 249 This value is constantly read to D10 when D10 is greater or equal to 100 Output 02 will come On Otherwise 02 will remain off Always On D10 value contact M0317 Set Value D10 100 of 100 Q2 Comes On Conversion to mnemonics succeeded Code file created Step 1 Create the Basic Program Logic Open Contacts Tag Names and Comments as Illustrated in Exercises 1 8 1 Click the New icon nj to open a new file 2001 IDEC CORPORATION 11 ANALOG READ INSTRUCTIONS 11 6 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Step 2 Enter the Analog Read Instruction on Rung 1 To enter the analog read instruction 1 Click the Analog Read x icon 2 Click on Column 2 of Rung 1 The Analog Read 0 ANRO dialog box displays Analog Read 0 Type Tag Name 6 Analog Read 0 Allocation 5010 lumber N Tag p10 value Comment 9 545 3 Enter D10 in both the Tag Name and Allocation Number fields 4 Enter D10 value 0 249 in the Tag Name Comment field 5 Click OK The analog read instruction displays at the end of Rung 1 11 ANALOG READ INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 11 7 Step 3 Enter the Comparison Instruction on Rung 2 To enter the comparis
11. File Edit View Configure Compile Online Window Help SIR Hse a 936 e repe i eb emm e e e o a ca a ivo e n e gt gt 0 57 x esp en This program shows a Normally Open contact 11 used with SOT to latch Q0 Another Normally Closed contact I2 used with SOT to unlatch Q0 SOT executes for one scan only when contact I1 goes from off to on Pump is wired to Q0 SOT executes for one scan only when the Normally Closed contact I2 goes from on to off 0 12 Pump is Unlatch wired to Q0 000 02 00000 Conversion to mnemonics succeeded Code file created Step 1 Open the SETRSET Program from Exercise 6 8 SINGLE OUTPUT INSTRUCTIONS 2001 WINDLDR TUTORIAL BASIC INSTRUCTIONS 8 11 Step 2 Enter an SOT Instruction on Rung 1 To enter an SOT instruction 1 Click the SOT icon 2 Click on Column 2 of Rung 1 The SOT instruction displays next to the contact on Rung 1 Step 3 Enter an SOT Instruction on Rung 2 Change I2 on the second Rung from normally open to normally closed To do so 1 Double click on contact I2 2 Click on normally closed NC instead of normally open NO Step 4 Enter an SOT Instruction on Rung 2 Repeat the instructions in Step 2 to add an SOT instruction on Rung 2 2001 IDEC CORPORATION 8 SINGLE OUTPUT INSTRUCTIONS 8 12 BASIC INSTRUCTION
12. WindLDR displays the programmed function settings for your PLC NOTE Make sure that the Port field is set to your computers serial communication port 3 Click the OK button or press the ENTER key to confirm 2001 IDEC CORPORATION 4 BASIC PROGRAMMING INSTRUCTIONS 4 12 BASIC INSTRUCTIONS WINDLDR TUTORIAL Transferring a Program After setting the communication ports you are ready to transfer the START 1 program to the PLC To transfer your program to the PLC 1 Click Compile Convert Ladder from the Menu Commands toolbar 2 Click Online Download program from the Menu Com mands toolbar If the program is not already compiled a warning box displays ask ing you to recompile the ladder 3 Click the Yes button A second dialog box displays stating that the conversion to mnemonics succeeded If WindLDR encounters an error in your ladder pro gram an error message will display at this point 4 Click the OK button The Download Dialog box displays Micro 3C Download Program Dialog x Download To Transfer Mode Ladder To Mnemonic Conversion gt c PB ss ra A Loads C 501 3 Conversion to memories succeeded Code fie created a By Download Device 000 mm PLC Start Program Size 00254 PLC Stop Automatic stop before download Comm Settings Automatic start after download Help 5 Click the OK button or press the ENTER key to confirm If the download is succ
13. l D37 D D o UC NO D100 54 0000 D35 l The first in first out FIFO data file is created using data registers starting with D30 The first record as specified by the first in pointer is stored in data register D32 Programming can be used to initialize the FIFO data file The constant value zero is set to D30 as the first in pointer to store the first record to D32 first in pointer is not used Eight records are cleared to zero 14 TRANSMIT RECEIVE INSTRUCTIONS 2001 IDEC CORPORATION 15 XY CONVERSION ONC Only XY Conversion The ONC and the FA series CPUs have coordinate conversion instructions These ONC instructions convert one data point of one plane to a corresponding point of another plane using a linear relationship between values of X and Y The ONC instructions are Convert X to Y CVXTY Convert Y to X CVYTX and Average AVRG XY Format Set XYFS XYFS I S1 YO Xn Yn When input is on the format for XY conversion is set The number of XY coordinates defining the linear relationship between X and Y can be 2 to 32 points 0 n 31 Valid Operands Standard Processing Operand Function Q M T C R Constant Repeat Format 1 Source 1 0 29 number X0 Xn X value X X X XX 0to32767 Transmit 32768 to YO Yn TOME X XX X X X XX 32767
14. 4 BASIC PROGRAMMING INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTIONS 4 23 Step 3 Enter the Start 2 Contact on Line 2 To enter the Start 2 contact 1 Click the Draw Line icon Notice that the pointer changes from an arrow to a pencil 2 Click the crossbar to the right of the Start 1 contact on Rung 1 and drag the pointer down to Line 2 of Rung 1 A line connecting Line 1 with Line 2 on Rung Idisplays 3 Click the Normally Open 4H icon Notice that the pointer returns to an arrow 4 Click on the Column 1 of Line 2 The Normally Open LOD dialog box displays 5 Enter Start 2 in the Tag Name field of the dialog box 6 Enter I2 in the Allocation Number field 7 Enter N O P B is wired to I2 in the Tag Name Comment field 2001 IDEC CORPORATION 4 BASIC PROGRAMMING INSTRUCTIONS 4 24 BASIC INSTRUCTIONS WINDLDR TUTORIAL Your completed dialog box should look like this Normally Open x 2 Tag Nome Normally Open Allocation po 7 Number C Normally Closed 0 is Comment to I2 8 Click the OK button press the ENTER key to confirm Notice that Rung 1 now has two lines The Start 2 contact displays at the beginning of Line 2 Step 4 Enter the Pump B Output Coil on Line 2 To enter the Pump B output coil 1 Click the Draw Line icon 2 Click the crossbar to the left of the Pump A output coil on the Lin
15. WINDLDR TUTORIAL BASIC INSTRUCTION 6 15 Step 6 Enter a Counter Comparison on Rung 2 To enter a counter comparison 1 Press the ENTER key to move to Rung 2 2 Click the Counter Comparison eal icon 3 Click on Column 1 of Rung 2 The Counter Comparison CC dialog box displays 4 Enter C000 in the Tag Name field of the dialog box Notice that the properties for the Counter instruction auto matically display in the Allocation Number and Tag Name Comment fields 5 Enter preset value 1 in the Preset Value field Your completed dialog box should look like this Counter Comparison Type Tag Name r ls ag Name Counter Comparison Allocation Number Counter Comparison gt C Timer Comparison Preset 0001 Value i Timer Comparison TC gt counter Data Register Comparison DC Comment C Data Register Comparison DC gt 6 Click the OK button or press the ENTER key to confirm The counter comparison instruction displays at the beginning of Rung 2 2001 IDEC CORPORATION 6 COUNTER INSTRUCTIONS 6 16 BASIC INSTRUCTIONS WINDLDR TUTORIAL Step 7 Enter the Pump A Output Coil on Rung 2 To enter the Pump A output coil 1 Click the Output icon 2 Click on Column 2 of Rung 2 The Output OUT dialog box displays 3 Enter Pump A in the Tag Name field Enter QO in Allocation Number
16. in the CVXTY instruction number equals 30 plus the value assigned to LL from 0 to 9 for the corre sponding XYFS instruction For example if the XYFS instruction number is 803 the CVXTY instruction number must be 833 The XYFS instruction is only required once to set up the X Y coordinates for many conversions both CVXTY and CVYTX However up to ten XYFS instructions can also be used to set up different linear relationships between X and Y for different conversions When different XYFS instructions are used make sure that the dd variable in the CVXTY instruction number corresponds to the appropriate LL variable for the desired XYFS instruction Values for the source S X can be 0 to 9999 and values for the destination D Y be 9999 to 9999 The destination operand cannot be a timer or a counter Conversion is only executed within the range that is defined by the XYFS instruction If the X value exceeds the range designated to corresponding Y values a numeric value error will occur 15 XY CONVERSION 2001 IDEC CORPORATION INDEX A action items identifying 1 2 adding up counters Micro 1 6 4 adjust ADJ instructions See also calendar clock instructions 13 1 adjusting calendar clock using a user program 13 39 advanced instructions applicable PLCs 1 2 destination operands 9 2 9 3 input condition 9 2 source operands 9 2 9 3 structure of 9 1 toolbar 3 3 analog potentiometers 11 1
17. n nds Always On B Contact 10317 296 Hour 297 Minutes 298 Seconds always On The Data 0 is Sunday M10 is On Contact Register the first if D93 0 Always On The Data 1 is Monday M20 is On Contact Register the Second if 293 1 Day of Week Day of Week Mondays 40317 M0020 Always On 296 Hour 296 7 hm M30 is On Contact 297 Minutes The Freezer if D96 198 Seconds Goes Off 7 M30 is On Freezer if D96 Off Sunday 7 7 AM and On M0030 Q0000 M30 is On Freezer if D96 Off Sunday 7 AM and On M0030 00000 3 COMI 000 06 000 01 Erase Horizontal Vertical Lines Step 1 Open a new program Click the New icon nj to open a new file 2001 IDEC CORPORATION 13 CALENDAR CLOCK INSTRUCTIONS 13 8 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Step 2 Enter an NO Contact on Rung 1 S To enter an NO contact 1 Click the Normally Open HH icon 2 Click on Column 1 of Rung 1 The Normally Open LOD dialog box displays Normally Open x Type Tag Name Normally Open Allocation Normally Numbers 0317 Always On Comment tact 3 Enter M0317 in the Tag Name and Allocation Number fields 4 Enter Always On Contact in the Name Comment field 5 Click OK 13 CALENDAR CLOCK INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL AD
18. 10msec timer TMH e Imsec timer TMS All In One type CPU module has a total of 32 timers for the 10 I O type CPU or 100 timers for the 16 I O or 24 I O type CPU Slim Type CPU Module has a total of 100 timers for 20I O type CPU or 40 I O type CPU This timers can be programmed in a user program Each timer must be allocated to a unique num ber 0 255 Allocation Numbers All In One Type CPU Slim Type CPU Preset Value 10VOType 16VOType 24V0Type 2010 4010 CPU CPU CPU Type CPU TML Constant 0 65535 Data Registers TIM 5 10 I O Type TMH TO T31 0 799 TO T99 TO T99 TO T99 D0 D399 Other Types TMS D0 D1299 D2000 D7999 2001 IDEC CORPORATION 5 TIMER INSTRUCTIONS 5 6 BASIC INSTRUCTIONS WINDLDR TUTORIAL Ladder Diagram TIM Program List TO Prgm Adrs Instruction Data 1 TIM 0 100 3 LOD I n T9 90 4 AND TO 5 OUT QO Timing Chart ON 10 opp ON TO opp ON opp ON QO ofr 5 TIMER INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTIONS 5 7 Exercise 3 Creating an On Delay Timer Program In this exercise you will write an on delay timer program that uses a PLC input to turn on an output after a time delay The figure below illustrates an input output scenario in which a normally open NO pushbutton is used to turn on a pump after a 10 second delay You will use
19. All PLC systems consist of five basic components and a programming device to enter instructions With larger PLCs these components are usually modular and a system is constructed by placing the appropriate modules in a rack In the larger I O PLCs like the FA series the ONC and the 24 I O MicroSmart the power supply the CPU and the I O cards are all separate modules they are then combined to complete the PLC In the smaller brick type controllers like the Micro 1 Micro Micro C and the 10 16 I O MicroSmart all of compo nents are usually contained in the same housing Programming evice 2 PLC OVERVIEW Power Supply Input Devices Pushbuttons Proximity Sensors Light Switches Photoelectrics Selector Switches Output Devices Relays Starters Solenoids Pilot Lights Displays PLC System Components 2001 IDEC CORPORATION WINDLDR TUTORIAL 2 3 Programming Device The programming device allows the programmer to enter instructions into the PLC s memory This is typically accomplished either by a hand held programmer or by a PC with programming software such as IDEC s WindLDR IDEC offers both methods of programming Power Supply The power supply takes line voltage typically 120V AC and converts it to 12V or 24V DC which is required by the CPU and the internal circuits of the input output interface Central Processing Unit CPU The CPU is the brain of the
20. WINDLDR TUTORIAL 2001 IDEC Corporation All rights reserved Produced and printed in the United States of America Important Information While every effort has been made to ensure that the information contained within this document is accurate under no circumstances shall IDEC Corpora tion be held liable or responsible for indirect or consequential damages resulting from the use of or the application of IDEC programmable logic controller com ponents individually or in combination with other equipment In line with our policy of continuous improvement we reserve the right to make product changes without notice All persons using these components must be willing to accept responsibility for choosing the correct component to suit their application and for choosing an application appropriate for the component individually or in combination with other equipment All diagrams and examples in this manual are for illustrative purposes only In no way does the inclusion of these diagrams and examples in this manual constitute a guarantee as to their suitability for any specific application To test and approve all programs prior to installation is the responsibility of the end user 2001 WINDLDR TUTORIAL By using IDEC Corporation software product you are consenting to be bound by the IDEC Corporation software end user license agreement included as a part of this package If yo
21. 32768 to 2 Source 2 Y value XIX 32767 Destina D1 Desti tion to ae aie E nation 1 store results A Internal relays MO through M2557 can be designated as D1 Special internal relays cannot be designated as D1 When the timer T or counter C is used as S2 the timer counter current value is read out When the timer T or counter C is used as D1 the data is written in as a preset value which can be 0 though 65535 The data conversion error is 0 5 NOTE The only type of valid data for an XY conversion is an integer 15 XY CONVERSION 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 15 5 Average AVRG H AVRG 51 52 53 Di D2 When an input is on the sampling data designated by operand S1 is processed according to the sampling conditions designated by operands S2 and 3 When sampling is complete the average maximum and minimum values are stored to the three consecutive operands starting with the operand designated by D1 Then sampling completion output designated by operand D2 is turned on This instruction is effective for the data processing of analog input values A maximum of 10 AVRG instructions can be programmed in a user program Valid Operands Standard Processing Operand Function IQ R D L Constant Repeat 51
22. In both the Tag Name and Allocation Number fields enter TO Enter 1800 in the Preset Value field 5 Enter 3 Min Timer Auto Reset in the Tag Name Comment field 6 Click OK 1O ARITHMETIC COMPARISON INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 10 29 3 Step 3 Enter an Addition Operand Instruction on Rung 2 To enter an addition operand instruction 1 Click on Column 2 of Rung 2 2 Type TAdd on your keyboard The 10 000 Addition 3 Operand dialog box displays The completed dialog box should look like this 10 000 Addition 3 Operand x tees 51 52 D 6 10 000 Addition Operand 500 00020 10 000 Subtraction 3 T000 0500 D0020 3 Min Timer constant 0 500 Auto Reset value 500 jinto D20 3 Click the 10 000 Addition 3 Operand option in the Type field 4 Enter TO TO and 3 Min Timer Auto Reset in the 51 column 5 Enter 500 500 and constant value 500 in the 52 column 6 Enter D20 D20 and TO 500 into D20 in the D column 7 Click OK 2001 IDEC CORPORATION 10 ARITHMETIC COMPARISON INSTRUCTIONS 10 30 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Step 4 Enter a Comparison Instruction on Rung 3 To enter an comparison instruction 1 Click the Word Comparison icon 2 Click on Column 2 of Rung 3 The Word Greater Than or Equal To dialog box displays The com pleted dialog box should look like this
23. Input Instructions 4 1 Output Instructions 4 2 Exercise 1 Creating a Start Stop Program 4 3 Closing a Program 4 10 Configuring the Communication Port 4 11 Transferring a Program 4 12 Monitoring a Program 4 13 Online 4 14 1 PLC Status 4 14 2 Batch Monitor 4 15 3 Communication Error 4 16 4 Point Write 4 17 NO and NC Conventions 4 18 NC Inputs 4 19 Exercise 2 Creating a Multiple Start Stop Program 4 20 TABLE OF CONTENTS 2001 4 6 WINDLDR TUTORIAL I Chapter 5 Introduction to Timers TML TIM TMH and TMS 5 1 Micro 1 FA1J 2J FA3S CP11 CP11T Timers 5 1 FA3S CP 12 13 Timers 5 1 Micro and Micro C Timers 5 3 ONC Timers 5 4 MicroSmart Timers 5 5 Exercise 3 Creating an On Delay Timer Program 5 7 Exercise 4 Timer Comparison Instruction and TC2 5 15 Chapter 6 Introduction to Counters CNT 6 1 Micro 1 FA1J 2J FA3S CP11 CP11T Counters 6 1 Micro3 Micro3C ONC and MicroSmart Counters 6 2 Introduction to Counter Comparisons 6 6 CC and CC gt 6 6 Exercise 5 Creating a Counter Program 6 8 Chapter 7 SET and RST Reset 00 7 1 Exercise 6 Creating a Set Reset Program 7 2 Chapter 8 Micro Micro C ONC and MicroSmart Single Output Up SOTU and Down SOTD Instructions 8 1 Micro 1 FA Js and FA3Ss Single Output SOT Instruction 8 2 2001 TABLE O
24. Source 1 Sampling data X m S3 Bongo ens XXIX X end input 0 to 53 Source 3 Sampling cycles 65535 First operand number to xX X store results D1 Desti nation 1 D2 Desti Sampling com _ 2 pletion output NOTE The only type of valid data for an XY conversion is an integer 2001 IDEC CORPORATION 15 XY CONVERSION 15 6 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Exercise 17 Creating an X Y Linear Relationship This exercise demonstrates how to set up two coordinate points to define the lin ear relationship between X and Y The two points are X0 YO 0 0 and X1 Y1 4000 2000 Once these are set there is an X to Y conversion as well as a Y to X conversion Follow the steps below to create a linear conversion relationship When com pleted your program screen should look like this IW WindLDR 2 11 C WINDLDR XYCNYS File Edit View Configure Compile Online Window Help NA Foye zi This is to converstion program If any two points line are determined this XY instructions determine all the remaining points This program allows the X values to he converted to Y values and Visa Versa The points are 0 0 and 4000 2000 Initialize i y value y value y value Pulse i initial Pt i
25. Step 4 Enter a Multiplication instruction on Rung 3 To enter an multiplication instruction 1 Click the Binary Arithmetic icon 2 Click on Column 2 of Rung 3 The Binary Arithmetic dialog box displays The completed dialog box should look like this Multiplication Type 51 52 C Addition C Subtraction Multiplication C Division Repeat Repeat Repeat pois o o N D10 Stores 50 D10 Result of 3000 leach scan 010 50 Data Type 3 Click the Multiplication option in the Type field 4 Select Word from the Data Type field 5 Enter D10 D10 and D10 Stores C4 3000 in the S1 column 6 Enter 50 50 and 50 D10 each scan in the S2 column 7 Enter D20 D20 and Result of D10 50 in the D1 column 8 Click OK 1O ARITHMETIC COMPARISON INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 10 17 Step 5 Enter a Comparison Instruction on Rung 4 To enter an comparison instruction 1 Click the Comparison icon 2 Click on Column 2 of Rung 4 The Compare Equal To dialog box displays The completed dialog box should look like this Compare Equal To Tono 15 52 3 ype CMP 17500 CMP lt gt C CMP 11500 00002 CMP gt N Repeat Repeat Repeat C CMP lt Result of A critical Alarm wel D10 50 set value Wired to 02 Data Type
26. TUTORIAL ADVANCED INSTRUCTIONS 10 21 Multiplication JMUL DO x operand gt D1 00 F147 D1 upper 4 digits 6 HHHH DO lower 4 digits When an input is on the data JMUL S of DO is multiplied by the data designated by 5 The result is set to DO and D1 Prior to this instruction mul symbol MUL 3 tiplication must be set to DO NOTE When a multiplier or multiplicand exceeds 9999 a numeric value error occurs Normal Range of Product DO Operand Carry DO Minimum 0 0 0 0 Maximum 9999 9999 9998 0001 When the result is less than 10 000 or 2710 in hexadecimal it is set to DO and zero is set to D1 When the result is more than 9999 or 270F in hexadecimal it is set to D1 as upper digits 2001 IDEC CORPORATION 10 ARITHMETIC COMPARISON INSTRUCTIONS 10 22 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Division JDIV DO operand gt D1 00 F147 F 47 D1 remainder DO quotient 7 HHHH When an input is on the data of DO is divided by the data JDIV 6 designated by 5 The quotient is set to DO and the remainder is set to D1 Prior to this instruction the data must be set to DO as a dividend NOTE When the divisor is 0 or when the divisor or divi dend exceeds 9999 a numeric value error occurs NOTE When D0 is smaller than the operand the quotient equals zero and the original data of DO becomes the remainder Normal Range of Quotient Quotient
27. are added The result is set to DO and the carry M307 Prior to this instruction the data to be added must be set to DO and the carry must also be reset as required NOTE When the sum including the carry is 20 000 or more a numeric value error will occur Computing Example DO Operand Carry DO 1 900 020 901 0 2000 120 2001 1000 9000 021 0000 9999 9999 121 9999 2001 IDEC CORPORATION 10 ARITHMETIC COMPARISON INSTRUCTIONS 10 20 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Normal Range of Sum DO Operand Carry DO Minimum 0 0 020 0 Maximum 9999 9999 121 9999 Subtraction with Borrow JSUBB DO operand BY gt D0 BW F147 F 47 When an input is on the data HHHH S is subtracted from the data of DO The borrow M307 is JSUBB 5 also subtracted from 120 and SER the result is set to DO and bor row M307 Prior to this instruction the data from Symbol JSUBB gt which to be subtracted must be set to DO and the borrow must also be reset as required A negative value is indicated as its positive complement with respect to 10 000 To determine the absolute value of a negative value subtract the positive complement from zero NOTE When the result is less than 10 000 or greater than 9999 a numeric value error will occur 10 ARITHMETIC COMPARISON INSTRUCTIONS 2001 1 WINDLDR
28. confirm your selection 3 Cut and Paste Select the coil ladder line or rung using your mouse Then either click the Copy icon or use CNTR c Finally select the location on your program screen where you wish to place your instruction and either click the Paste icon or use CNTR v 2001 IDEC CORPORATION 3 GETTING STARTED 3 4 WINDLDR TUTORIAL 4 Right Mouse Button You can also access instructions by clicking your right mouse button and selecting the desired instruction from a series of drop down menus For a more detailed description of functions accessible through the right mouse button please refer to the WindLDR Reference Manual Deleting an Entry To delete an instruction from your program screen click on the instruction and press the DELETE key or click your right mouse button to access the Delete command To delete a rung column or ladder line click on the appropriate area and then click your right mouse button to access the Delete command NOTE To delete a line vertical or horizontal use the Eraser icon in the Basic Instructions Toolbar Or use the keyboard commands CNTR gt e M or desired To create a line vertical or horizontal use the Pencil icon in the Basic Instructions Toolbar Or use the keyboard commands SHIFT gt e M or desired 3 GETTING STARTED 2001 IDEC CORPORATION WINDLDR TUTORIAL 3 5 Selecting Your P
29. ela de potototo esr ce nd ied o 2 ESESBL ERES VES ERES ER ESI SA This program shows a Normally Open contact I1 used with a SOTU to latch Q0 Another contact I2 used with SOTD to unlatch Q0 SOTU executes for one scan only when contact I1 goes from off to on Pump A is wired to Q0 SOTD executes for one scan only when contact I2 goes from on to off Pump is Unlatch wired to Q0 Conversion to mnemonics succeeded Code file created Step 1 Open the SETRSET Program from Exercise 6 2001 IDEC CORPORATION 8 SINGLE OUTPUT INSTRUCTIONS 8 6 BASIC INSTRUCTIONS WINDLDR TUTORIAL Step 2 Enter an SOTU Instruction on Rung 1 To enter an SOTU instruction 1 Click the SOTU icon 2 Click on Column 2 of Rung 1 The SOTU instruction displays next to the 1 contact on Rung 1 Step 3 Enter an SOTD Instruction on Rung 2 Repeat the instructions in Step 2 to add an SOTD instruction on Rung 2 Step 4 Enter a Comment for Rung 1 To enter a rung comment 1 Click anywhere on Rung 1 2 Click Edit Edit Rung comment from the Menu Com 772 mands toolbar or click the Rung comment a icon The Rung Comment Dialog screen displays 8 SINGLE OUTPUT INSTRUCTIONS 2001 WINDLDR TUTORIAL BASIC INSTRUCTIONS 8 7 3 Click in the white area below the existing text in the dialog
30. s preset value and must be OFF for the counter to operate When the counted value reaches 0 the output will turn ON Ladder Diagram of Preset Input Up Down Reversible Counter 10 QO Il Up Down Selection 2001 IDEC CORPORATION 6 COUNTER INSTRUCTIONS 6 6 BASIC INSTRUCTIONS WINDLDR TUTORIAL Introduction to Counter Comparisons CC and CC gt The CC instruction is an equivalent comparison instruction for counted values This instruction will constantly compare counted values to the value that has been programmed When the counter value equals the given value the desired output will be initiated The CC2 instruction is an equal to or greater than comparison instruction for counted values This instruction will constantly compare counted values to the value that has been programmed When the counter value is equal to or greater than the given value the desired output will be initiated Counter Comparisons When a counter comparison instruction is programmed two addresses are required The circuit for a counter comparison instruction must be programmed in the following order the CC or CC2 instruction a counter number 0 through 255 depending upon the PLC followed by the preset value to com pare from 0 to 65535 for ONC and MicroSmart and 0 to 9999 for the remain ing PLCs The preset value can be designated using a decimal constant or a data register only When a data register is used the data of the
31. the elements from this figure to create your program CONTROL SYSTEMS APPLICATION INDUSTRIAL TANK START 1 Q PUMP TO PRODUCTION Start 1 NO alternate action pushbutton wired to I1 Pump A Wired to QO 2001 IDEC CORPORATION 5 TIMER INSTRUCTIONS 5 8 BASIC INSTRUCTIONS WINDLDR TUTORIAL Follow the steps below to create an on delay timer program When completed your program screen should look like this W WindLDR 2 11 C WINDLDR TIMERS LDR File Edit View Configure Compile Online Window Help ees e 0341 coles es v erae ve e o e Mex seo soro zu d ave T sso ss 88 FC zl 9 Po s E This program shows an On Delay Timer for Pump A The Pump will turn on 10 sec after Start 1 input is switched on H 0 P B is Wired to I1 10 Sec Timer On Delay 000 0100 Start 1 10 Sec Timer On Delay T000 Reading rung 3 Pump is Wired to Q0 01 000 01 Step 1 Click the New DJ Icon to Open a New File A blank ladder logic program screen displays 5 TIMER INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTIONS 5 9 Step 2 Enter the Start 1 Contact S To enter the Start 1 contact 1 Click the Normally Open 4 H icon Notice that as you move the pointer away from the icon
32. 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTION 6 13 Step 4 Enter the Start 2 Pulse Contact on Line 2 To enter the Start 2 pulse contact 1 Click the Normally Open d H icon 2 Click on Column 1 of Line 2 The Normally Open LOD dialog box displays 3 Enter Start 2 in the Tag Name field of the dialog box 4 Enter I2 in the Allocation Number field 5 Enter N O P B to count up in the Tag Name Comment field Your completed dialog box should look like this Normally Open ibm Tag Name Normally Open Allocation Normally Closed Number Tag Name Comment 6 Click the OK button or press the ENTER key to confirm The Start 2 contact displays at the beginning of Line 2 2001 IDEC CORPORATION 6 COUNTER INSTRUCTIONS 6 14 BASIC INSTRUCTIONS WINDLDR TUTORIAL Step 5 Enter a Rung Comment To enter a rung comment 1 Click Edit gt Rung comment from the Menu Commands y toolbar or click the Rung comment icon The Rung Comment Dialog screen displays 2 Click in the white area of the dialog screen and enter This is a counter program using comparison instructions to turn on Pump A and pump B wired to outputs Q0 and Q1 Starting with counter CO with preset value of 3 When counter 0 receives 3 counts it resets itself 3 Click OK to save the comments The rung comment displays above Rung 1 6 COUNTER INSTRUCTIONS 2001 IDEC CORPORATION
33. 3 12 selecting font 3 12 Function Area and Communications Settings dialog boxes 3 9 single output SOT instructions 8 2 timers 5 1 Micro3 analog potentiometers 11 1 binary arithmetic instructions 10 1 parameters 3 12 Ladder Preview 4 8 latch commands See also SET instructions 7 1 calendar clock instructions 13 1 comparison instructions 10 7 counter table 6 3 counters 6 2 data move 9 1 light emitting diode LED 2 4 Function Area and Communications line Settings dialog boxes 3 9 create 3 4 input allocation table 9 5 load LOD instruction 4 1 single output down SOTD load not LODN instruction 4 1 instructions 8 1 8 2 load out program creating See also single output up SOTU input output program creating 4 7 instructions 8 1 8 2 logic defined See also ladder logic 2 1 _ timers 5 3 5 6 Micro3C M analog potentiometer 11 1 binary arithmetic instructions 10 1 calendar clock instructions 13 1 maximizing screens 3 3 comparison instructions 10 7 2001 INDEX counter table 6 3 counters 6 2 data move 9 1 Function Area and Communications Settings dialog boxes 3 9 input allocation table 9 5 receive RXD instructions 14 3 15 3 15 4 15 5 single output down SOTD instructions 8 1 8 2 single output up SOTU instructions 8 1 8 2 timers 5 3 5 6 transmit TXD instructions 14 1 MicroSmart analog potentiometer 11 1 binary arithmeti
34. ARITH in File Name field of the dialog box 3 Click the OK button or press the ENTER key to confirm Step 7 Print Transfer and Monitor the Program To print this program refer to page 4 9 To transfer this program refer to page 4 12 To monitor this program refer to page 4 13 10 ARITHMETIC COMPARISON INSTRUCTIONS 2001 1 11 ANALOG READ INSTRUCTIONS For Micro Micro C and MicroSmart Only Introduction to Analog Read Instructions The Micro Micro C and MicroSmart PLCs have analog potentiometers in the front panel of the unit The Micro C 10 I O Micro and MicroSmart 10 16 20 and 40 I O type CPU have one potentiometer ANRO for Micro and Micro C and D8057 for MicroSmart The 16 and 24 I O Micro and 24 I O MicroSmart PLCs have two potentiometers ANRO and ANRI for Micro3 and D8057 and D8058 for MicroSmart The potentiometer s can be addressed to any memory location in the PLC for purposes such as changing timer or counter presets The 0 249 range of the potentiometer can be scaled with mathematical instructions Analog Read 0 ANRO When an input is on the value 0 249 set with analog potentiometer 0 is read to the data register designated as the destination This instruction is useful for adjusting preset values of the timer TIM TMH and TMS and pulse PULS and PWM instructions ANRO De Data Register 2001 IDEC CORPORATION 11 ANALOG READ INSTRUCT
35. Allocation froo 100 msec Timer mdi C 10 msec Timer Ut 0100 R C 1 msec Timer 5 Tag Name 10 sec Timer Comment 7 Click the OK button or press the ENTER key to confirm The Timer instruction displays next to Start 1 on Rung 1 2001 IDEC CORPORATION 5 TIMER INSTRUCTIONS 5 12 BASIC INSTRUCTIONS WINDLDR TUTORIAL Step 4 Enter a Comment for Rung 1 To enter a rung comment 1 Click anywhere on Rung 1 2 Click Edit Rung comment from the Menu Commands toolbar or click the Rung comment icon The Rung Comment Dialog screen displays 3 Click in the white area of the dialog screen and enter This program shows an On Delay Timer for Pump A The Pump will turn on 10 sec after Start 1 input is switched on NOTE WindLDR does not restrict the number of characters in the tag name editor However you are advised to stay below 10 characters per line so that the width of the rung will be appropriate 4 Click OK to save the comments The rung comment displays above Rung 1 5 TIMER INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTIONS 5 13 Step 5 Enter an NO Contact on Rung 2 To enter an NO contact 1 Press the ENTER key to move to Rung 2 2 Click the Normally Open icon 3 Click on Column 1 of Rung 2 The Normally Open LOD dialog box displays 4 Enter TO in the Tag Name field of the dial
36. C is used as S1 or S2 the current value of the timer counter is read out Since the SUM instruction is executed in each scan while the input is on a pulse input from the SOTU or SOTD instruction should be used as required NOTE For further details about the ROOT and SUM instructions refer to the ONC user s manual 1O ARITHMETIC COMPARISON INSTRUCTIONS 2001 1 WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 10 5 Valid Operands Standard Processing Operand PLC Function CPU Type Q M T C R D Constant Repeat Micro and o 0 0 0 Micro C 2 0 0 0 0 0 ONC 0 597 0 597 2557 255 255 255 7999 0 4 9 1 99 S 10 I O 0 5 0 3 0 317 0 31 0 31 0 63 0 399 RO 1 99 3 51 gt 0 0 10 0 6 0 o lo 0 8 E a Source 1 5 24 10 0 107 0 107 1277 5 22 127 1299 65535 m MicroSmart D20K3 E Eu 0 99 0 99 9 9 1 99 1 OQ D20RKI 1277 127 1299 65535 aS D20RS1 0 307 0 307 0 o 0 jo 40 0 307 0 307 1277 0 99 9 127 1299 65535 1 99 Micro and 0 lo 0 0 99 0 Micro3C 0535 0531 cama as Sai keai iias 65535 eee 0 0 0 0 0 ONC 0 597 0 597 2557 255 255 255 7999 0 4 9 1 99 S E 10 I O 0 5 0 3 0 317 0 31 0 31 0 63 0 399 1 99 5 S2 gt 0 0 10 0 6 lo o Jo Jo gt 99 0 l Source 2 5 24 I O 0 107 0 107
37. D20 Data Type 3 Click Convert Y to X CVYTX in the Type field 4 Enter 1 1 First Point in the S1 field 5 Enter D11 D11 Y value in D11 in the S2 field 6 Enter D20 D20 Converted Y value In D20 in the D1 field 7 Click OK The CVYTX I instruction displays on Rung 3 15 XY CONVERSION 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 15 15 Step 10 Enter a Rung Comment for Rung 3 To enter a comment for Rung 3 1 Click anywhere on Rung 3 2 Click Edit gt Rung comment from the Menu Commands y toolbar or click the Rung comment a icon The Rung Comment Dialog screen displays 3 Click in the white area of the dialog screen and enter When is on the Y value D11 is converted to x value and stored in d20 Click OK to save the comments The rung comment displays above Rung 3 2001 IDEC CORPORATION 15 XY CONVERSION 15 16 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Step 11 Save the Program S To name and save this program 1 Click File Save as from the Menu Commands toolbar The Save As dialog box displays 2 Enter XYCONVS in the File Name field of the dialog box 3 Click the OK button or press the ENTER key to confirm Step 12 Print Transfer and Monitor the Program S To print this program please refer to page 4 9 To transfer this program refer to page 4 12 To monitor this program refer to page 4 13 15 XY CONVER
38. D20 3 Source Repeat 0 Destination Repeat 3 10 110 D20 110 D11 111 D21 110 12 112 D22 110 When both S1 and D1 are designated with a repeat as many operands as repeat cycles starting with the operand designated by S1 are moved to the same quan tity of operands starting with the operand designated by D1 MOV SIR DIR REP 0 DIO 3 Source Repeat 3 Destination Repeat 3 D10 110 D20j 110 11 1 111 L D21 111 12 112 1022 2 2001 IDEC CORPORATION 13 CALENDAR CLOCK INSTRUCTIONS 13 6 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Exercise 15 Creating a Calendar Clock Program In this exercise you will learn how to read the clock and calendar values of a PLC and use them to control certain events at a specific time The following example explains how you can program the Micro PLC to turn a factory freezer off at 7A M Sundays and back on at 7A M Mondays of every week of the year IDEC s newest PLC the MicroSmart 13 CALENDAR CLOCK INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 13 7 Follow the steps below to create a clock calendar program When completed your program screen should look like this
39. DO zero to 9999 Remainder D1 zero to divisor 1 10 ARITHMETIC COMPARISON INSTRUCTIONS 2001 1 WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 10 23 10 000 Addition 3 Operand TADD3 S S gt D CY When an input is on the data designated by S1 and S2 are added The result is set to the operand designated by D and the carry M307 Symbol TADD3 51 5 D 10 000 Subtraction 3 Operand TSUB3 5 29 D BY When an input is on the data designated by 52 is subtracted from the data designated by D1 The result is set to the operand designated by D and the borrow M307 Symbol TSUB3 51 5 D 10 000 Multiplication TMUL F147 F 47 F 47 5 D 1 upper digits 163 HEHE D lower digits When an input is on the data designated by D is multiplied H by the data designated by S The result is set to D and D 1 Symbol TMUL 5 D 2001 IDEC CORPORATION 10 ARITHMETIC COMPARISON INSTRUCTIONS 10 24 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL 10 000 Division TDIV F147 47 F 47 D S gt D quotient 173 HHHH D 1 remainder When an input is on the data designated by D is divided by HF the data designated by S The quotient is set to D and the remainder is set to 0 1 Symbol TDIV S D FUN30 and FUN31 are used together for setting timer counter preset values or other operands using external digital switches Comparis
40. Even Default Auto Start Stop Bits 1 58 Port COM1 PLC Network Settings 6 27 C XN Device No 000 x Cancel Defauit_ List Help FA Series Function Area and Communications Settings Dialog Boxes 3 GETTING STARTED 2001 IDEC CORPORATION WINDLDR TUTORIAL 3 11 MicroSmart Function Area Settings x Special Input Communication Others Use Stop Input Communication Port Settings T i 0 OK Lis eme ue oe X Cancel Data Bits 7 Default Run Stop Selection at Memory Backup Error Pai Even gt 99 G Run C Stop Stop Bits 1 zi 7 Hep COM1 xj PLC Network Settings 11 C 1N Device No 000 v OK X Cancel 49 Default List 7 Help MicroSmart Function Area and Communications Settings Dialog Boxes 2001 IDEC CORPORATION 3 GETTING STARTED 3 12 WINDLDR TUTORIAL Choosing Ladder Preferences To customize your WindLDR ladder logic program screen click Configure gt Ladder preferences from the Menu Commands toolbar For the purposes of this tutorial choose the settings shown below Rung Display Coil Parameters IV Show Rung Comment Coil Width Iv Show Rung Coil Height 2 2 Iv Show Tag Name Line Width n I Show Allocation Number Tag Comment L
41. Expansion Unit eyo Default Z MicroSmart configuration 5 4 None M0 Points 8 7 B C 10Point Type 20Point Type Ti C 16 Point Type 20 Point 40 Point Type rr FA Series ONC Cancel FA 2J FA 3S CP11 FA 3S CP12 FA 3S CP13 Micro 1 Use as Default aa Default FA 3S CP11T Use as Default Default OpenNet 2001 4 6 WINDLDR TUTORIAL 3 7 5 Click the OK button or press the ENTER key to confirm Notice that you return to the PLC selection dialog box 6 Click the Use as Default button at the bottom of the PLC selection dialog box The selected PLC type displays in the Default field 7 Click the OK button or press the ENTER key to confirm The selected PLC type appears in the status bar at the bottom of the WindLDR screen IMPORTANT When installed WindLDR defaults to the ONC If you select another PLC a message appears Changing the PLC will cause certain changes to be made These changes cannot be undone Pro ceed Click Yes to accept this The correct toolbars for your PLC display 2001 IDEC CORPORATION 3 GETTING STARTED 3 8 WINDLDR TUTORIAL Configuring PLC Function and Communication Settings After you choose the correct PLC type make sure that the PLC function settings are configured properly For the purpose o
42. FA3S High Performance Series 14 22 Serial Transmitting STXFT and STXEX 14 22 Serial TX Format STXFT 14 22 Communication Status STDR 14 23 Serial RX Format STXFT User Defined Communication 14 24 Serial RX Execute STXEX User Defined Communication 14 25 Designating Data Comparison or Conversion 14 26 User Defined Communication Mode UDCMS 14 27 Example Serial Receiving 14 28 Example Serial Receiving 14 30 Example Bar Code Reading with FIFO File 14 30 Chapter 15 XY ConvetsIonz coils du e EILEEN NES PE 15 1 XY Format Set XYFS 15 1 Valid Operands Standard Processing 15 1 Valid Data Types 15 2 Valid Operands Standard Processing 15 3 Valid Operands Standard Processing 15 4 Valid Operands Standard Processing 15 5 Exercise 17 Creating an X Y Linear Relationship 15 6 FA3S Series XY Conversion 15 17 XY Format Set XYFS Linear Conversion 15 17 Convert X to Y CVXTY 15 17 dS WIE Index I TABLE OF CONTENTS 2001 4 6 1 INTRODUCTION The WindLDR Tutorial is an introduction to IDEC s third release of WindLDR ladder logic programming and monitoring software for all of pro grammable logic controllers PLCs the Micro series the FA series the ONC series and the MicroSmart This tutorial is a good starting point for first time users of IDEC s WindLDR and PLCs Once you are familiar with WindLDR the WindLDR Reference Manual an
43. INSTRUCTIONS 10 2 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Subtraction SUB e When an input is on the 16 bit Micro Micro C and MicroSmart or 16 or 32 bit ONC word data designated by source operand 52 is sub tracted from the 16 bit word data designated by source operand S1 The result is set to H SUB S1 R S2 R DI R RE 51 852 D1 BW destination operand D1 and borrow M303 Micro or Micro C or M8003 ONC or MicroSmart Multiplication MUL MUL SIR SXR DIR REP 51 92 D When an input Is on the 16 bit Micro Micro C and MicroSmart or 16 or 32 bit ONC word data designated by source operand 51 is multi plied by the 16 bit word data designated by source operand S2 The result is set to 32 Bit Data designated by destination operand D1 When the result exceeds 65535 error indicator ERR1 and special internal relay M304 Micro or Micro C or M8004 ONC or MicroSmart user program execution error are turned on 1O ARITHMETIC COMPARISON INSTRUCTIONS 2001 1 ere 7 wileh WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 10 3 Division DIV S1 S2 DI quotient D1 1 remainder When an input is on the 16 bit Micro C and MicroSmart or the 16 or 32 bit ONC word data designated by source operand S1 is divided by the 16 bit word data designated by source operand S2 The quotient
44. Online Window Help a x Em 4 Toe This is flow control program which shows the Micro3C controlling tank and reporting any overflow or low level to a maintenance engineer Pager If the pager is alphanemeric then the PLC can transmit text messages as well as numeric ones Always Water Tank On Level Sensor Water Tank 2000 Level I R Trigger Level Sensor Overflow TXD Instrution Water Tank 100 Level I R Trigger Level Sensor very Low TXD Instruction I R Trigger Emergency Transmission TXD Instrution Overflow Status D10 D11 I R Trigger Emergency Transmission TXD Instruction Low Level Status D12 D13 Micro 3C COMI 000 04 001 00 Insert Clock Calendar Instruction ANSMIT RECEIVE INS 2001 14 8 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL S Step 1 Click the New D Icon to Open a New File A blank ladder logic program screen displays Step 2 Enter an NO Contact on Rung 1 S To enter an NO contact 1 Click the Normally Open 2 Click on Column 1 of Rung 1 The Normally Open LOD dialog box displays Normally Open Type Tag Name Normally Open Allocation Normally Closed Number 40317 Tag Name niways Comment j 3 Enter M0317 in the Tag Name and Allocation Number fields 4 Enter Always On in the Name Comment field 5 Click OK The Alway
45. R Constant Repeat DI Destination 15 NY 99 Destination 1 to store data 498 Micro 0 99 Micro C 498 IDEC s Micro C 12 A D CONVERSION INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 12 3 Exercise 14 Creating an A D Conversion Program In this exercise you will learn how to use the A D instruction to convert the analog output of a pressure sensor to digital format data by using an A D input card This data can then be manipulated in the PLC Follow the steps below to create an A D conversion program When completed your program screen should look like this M WindLDR 2 11w C WINDLDR ANALOG File Edit View Configure Compile Online Window Help ze zB a a This programs shows a pressure analog signal being converted to a digital value in the PLC and being stored in D30 The A D instruction be selected as 8 bit or 12 Bit Always On d30 pressure Internal Relay signal The pressure signal gets converted and is constantly compared to the critical point 2000 when d30 is greater or equal to 2000 the valve opens Always On pressure Critical Valve Opens Internal Relay i i wired to Q2 3 77 run 09 12000100 Step 1 Create the Basic Program Logic Open Con tacts Tag Names and Comments as Illustrated in Exercises 1 8 Click the New icon ni to open a new file 2001 IDEC CORPO
46. Word Greater Than or Equal To me 51 52 oir Word Greater Than or Equal 1000 00001 Word Less Than or Equal to C Word Equal To 00020 1000 00001 IT 500 Constant 01 comes On into D20 value 1000 jif D10 100 3 Click the Word Greater Than or Equal option in the Type field 4 Enter D20 D20 and TO 500 into D20 in the S1 column 5 Enter 1000 1000 and Constant value 1000 in the S2 column 6 Enter Q1 Q1 and Q1 comes On if D10 1000 in the oir column 1O ARITHMETIC COMPARISON INSTRUCTIONS 2001 1 WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 10 31 Step 5 Enter a Word Move Instruction on Rung 4 To enter a word move instruction 1 Click the Word Move icon 2 Click on Column 2 of Rung 4 The Word Move dialog box displays The completed dialog box should look like this Word Move Type ispS Word Move Tag Name Allocation Number rens Tag Name 3 Min Timer Store Curren Comment Reset T0 Value 3 Enter and 3 Min Timer Auto Reset in the ispS column Enter D10 D10 and Store Current TO Value in the D column 2001 IDEC CORPORATION 10 ARITHMETIC COMPARISON INSTRUCTIONS WINDLDR TUTORIAL 10 32 ADVANCED INSTRUCTIONS Step 6 Save the Program To name and save this program 1 Click File Save as from the menu commands toolbar The Save As dialog box displays 2 Enter EA
47. a total of 32 10 point type or 100 other type counters 6 COUNTER INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTION 6 3 Micro and Micro C Counter Table Type of Counter Allocation Number Preset Value C2 C31 standard mode 0 9999 Adding Up Counters C2 15 Dd Sos high speed mode standard mode D0 D31 Dual Pulse Counters Co Reversible Counters Up Down Cl ONC Counter Table Type of Counter Allocation Number Preset Value Adding Up Counters 0 65535 Dual Pulse Counters C0 C255 Do D7999 Reversible Counters Up Down MicroSmart Counter Table Allocation Number Type of Counter Preset Value All In One Type Slim Type CPU Adding Up 0 65535 Counters exon 10 I O type only Dual Pulse x D399 2 10 type CPU C0 C99 Other CPU Mod C0 C99 20 40 I O type CPU ule Reversible 16 24 I O type CPU Counters Up Down D2000 D7999 2001 IDEC CORPORATION 6 COUNTER INSTRUCTIONS 6 4 BASIC INSTRUCTIONS WINDLDR TUTORIAL Adding Up Counters An adding counter requires two inputs and may be programmed with or without an output Ladder Diagram of Adding Up Counter The first line of the counter is the reset input When the reset input is ON the accumulated value of the counter resets to zero The input must be OFF to allow the counter to oper
48. data register becomes the preset value If the data register designated as a counter comparison preset value holds a value over 9999 Micro and Micro C or 65535 ONC and MicroSmart then a program execution error will result next error indicator ERR1 is lit and spe cial internal relay M304 Micro and Micro C or M8004 ONC and MicroS mart turns on 6 COUNTER INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTION 6 7 NOTE A data register for the preset value of the counter is applicable to the Micro Micro C ONC and MicroSmart only Ladder Diagram CC Counter to Compare QO Preset Value to Compare Ladder Diagram CC2 2C3 15 Q1 2001 IDEC CORPORATION 6 COUNTER INSTRUCTIONS 6 8 BASIC INSTRUCTIONS WINDLDR TUTORIAL Exercise 5 Creating a Counter Program In this exercise you will write a counter program that uses a counter and counter comparison instruction to switch on two outputs when the counter value reaches a predetermined level The figure below illustrates an input output scenario in which an NO pushbut ton is used to alternately turn on off two pumps You will use the elements from this figure to create your program CONTROL SYSTEMS APPLICATION INDUSTRIAL TANK PUMP A 2 PUMP B START1 PUMPA TO PRODUCTION A PUMPB Start 1 NO alternate action pushbutton wired to I1 Pump A Wired
49. designated using a data register 9 4 preset values 9 4 programs creating 5 7 5 14 5 21 5 23 uses for 5 1 toolbars advanced instructions 3 2 basic instructions 3 2 menu commands 3 2 transferring programs to a PLC See also downloading programs to a PLC 4 12 transmit data registers 14 5 dialog box 14 14 instructions 14 1 14 22 14 24 14 25 14 27 15 1 15 17 entering in a program 14 13 programs creating 14 6 15 6 valid operands 14 2 14 3 15 1 15 2 15 3 15 4 15 5 tutorial conventions 1 1 1 3 2001 4 6 INDEX WINDLDR TUTORIAL INDEX IX U unlatch command See also RST command 7 1 unlatch commands See also Reset RST instructions 7 1 up down selection reversible counters Micro 1 6 5 user program adjusting calendar clock 13 39 setting calendar clock 13 27 13 37 V Variable Data Register dialog box 14 15 WindLDR setting calendar clock 13 25 WindLDR installation CD 3 1 instructions 3 1 3 2 word operands 9 3 WINDLDR TUTORIAL 2001 IDEC CORPORATION
50. dialog box 4 Enter C000 in the Allocation Number field 5 Enter Counter 3 Reset in the Tag Name Comment field 6 COUNTER INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTION 6 11 Your completed dialog box should look like this Normally Open Type Tag Name Open Allocation opp 7 7 C Normally Closed Number counter 3 Comment poset 6 Click the OK button or press the ENTER key to confirm The Counter contact displays at the beginning of Rung 1 Step 3 Enter a Counter To enter the counter 1 Click the Counter lg icon 2 Click on Column 2 of Rung 1 The Up Counter CNT dialog box displays 3 Enter C000 in the Tag Name field of the dialog box 2001 IDEC CORPORATION 6 COUNTER INSTRUCTIONS 6 12 BASIC INSTRUCTIONS WINDLDR TUTORIAL Notice that the properties for the Counter instruction automati cally display in the Allocation Number and Tag Name Com ment fields 4 Enter 3 in the Preset Value field Your completed dialog box should look like this Up Counter x Type Tag Name amp Up Counter Allocation cog Number C Dual Pulse Counter Up Down Counter Preset 0003 Value R Tag Name counter 3 Comment 5 Click the OK button or press the ENTER key to confirm Notice that Rung 1 now has two lines The Counter instruction displays next to the Counter contact 6 COUNTER INSTRUCTIONS
51. dialog is displayed The current calendar clock data is read out from the OpenNet Controller CPU and displayed in the Calendar box Click the Change button in the Calendar box The Set Calen dar and Time dialog comes up with the date and time values read from the computer internal clock OpenNet PLC Status Run Stop Status Stop Running TIM CNT Change Status Clear Unchanged Error Status ils gt gt 0401 Calendar eu eae Protect Status Unprotected Change gt gt Nen Time Scan Time Max PLC Type FC3A CP1K PLC Version Device Number Reset COMx Reset PLC 13 CALENDAR CLOCK INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 13 27 the calendar is displayed where you can change the year month 3 4 Click the Down Arrow button on the right of Calendar then and date Enter or select new values 5 To change hours and minutes click in the Time box and type a new value or use the up down keys When new values are entered dick the OK button to transfer the new values to the CPU Setting Calendar Clock Using a User Program Another way of setting the calendar clock data is to move the values to special data registers dedicated to the calendar and clock and to turn on special internal relay M8020 by executing a user program Data registers D8015 through D8021 do not hold the current values of the calendar clock data
52. gt To name and save this program 1 Click File gt Save as from the Menu Commands toolbar The Save As dialog box displays 2 Enter TIMERS in File Name field of the dialog box 3 Click OK or press ENTER to confirm Step 8 Print Transfer and Monitor the Program To print this program please refer to page 4 9 To transfer this program refer to page 4 12 To monitor this program refer to page 4 13 Exercise 4 Timer Comparison Instruction TC and TC NOTE This option is only available with the ONC PLC All four types of timers on the ONC PLC can be used with the Timer Comparison Instruction This program shows how the timer comparison instruction is used to turn on outputs The preset value of the timer and timer comparison can be a constant of values 0 to 65535 or a data register DO to D7999 2001 IDEC CORPORATION 5 TIMER INSTRUCTIONS 5 16 BASIC INSTRUCTIONS WINDLDR TUTORIAL The TC and TC2 instructions are equivalent comparison instructions for timer current values This instruction will constantly compare current values to the value that has been programmed in When the timer value is greater than or equal to the given value the desired output will be initiated Enter the value of the timers from TO to T255 followed by the preset value to compare from 0 to 65535 or a data register to compare from 120 to 07999 Ladder Diagram TC Program List Prgm Adrs Instruction Data Prese
53. is set to destina H DIV SIR 5200 DI R REP tion operand D1 and the remain der is set to D1 1 When S2 is 0 dividing by 0 error indicator ERRI and special inter nal relay M304 Micro or Micro C or M8004 ONC user program execution error are turned on Root ROOT ONC and MicroSmart Only ROOT W Si Di Square Root of S1 D1 When an input is on the square root of the operand designated by 51 is extracted and is stored to the destination designated by D1 Valid values are 0 to 65535 The square root is rounded to two decimals Since the ROOT instruction is executed in each scan while the input is on a pulse from the SOTU or SOTD instruction should be used as required 2001 IDEC CORPORATION 10 ARITHMETIC COMPARISON INSTRUCTIONS 10 4 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Sum SUM ONC Only SUM W SI SI Di The SUM instruction can be selected ADD XOR ek for ADD or XOR operations ADD 51 to S2 added 1 XOR S1 to 52 XORed gt DI When the input is on with ADD selected all data of the operands desig nated by S1 to 52 are added The result is stored to the destination operand designated by D1 and the next operand D1 1 When the input is on with XOR selected all data of the operands desig nated by S1 to S2 are XORed The result is stored to the destination operand designated by D1 When a timer T or counter
54. isolation defined 2 4 output designating as a source or destination operand 9 4 dialog box 4 6 entering in a program 4 6 interface See also PLC components 2 4 2 5 updating 2 8 output OUT instruction 4 2 output not OUTN instruction 4 2 P PLC components 2 2 2 5 central processing unit CPU 2 3 input interface 2 4 memory 2 3 output interface 2 4 2 5 power supply 2 3 programming device 2 3 defined 2 1 2001 4 6 INDEX WINDLDR TUTORIAL INDEX VII function communication settings 3 8 scanning 2 6 2 8 communications and housekeeping 2 8 defined 2 6 executing programmed logic 2 7 reading inputs 2 7 updating outputs 2 8 selecting 3 5 3 7 PLC Selection dialog box 3 5 PLC status 4 14 point write 4 17 power supply See also PLC components 2 3 printing a program 4 9 programming device See also PLC components 2 3 Random Access Memory RAM 2 3 receive RXD data registers 14 5 instructions 14 3 15 3 15 4 15 5 repeat cycles See also advanced instructions structure of 9 1 designation See also advanced instructions structure of 9 1 Reset RST dialog box 7 9 instructions entering in a program 7 9 uses for 7 1 programs creating 7 2 7 10 right mouse button accessing instructions 3 4 deleting rungs columns ladder lines 3 4 Root 10 3 RST instructions 7 1 Rung Comment Dialog screen 4 7 rung comment entering in a program 4 7 S saving a program 4 8 screens maxim
55. items requiring a specific entry appear bold and underlined For example enter 1234 Menu instructions are separated by an arrow gt For example Click Config ure PLC Selection means to click Configure from the Menu Commands toolbar and then to click PLC Selection from the drop down menu While all keyboards are set up uniquely the ENTER RETURN or NEXT key is always written as ENTER in this manual The majority of the WindLDR screens and dialog boxes are applicable to all PLC types However some screens and dialog boxes differ depending on the PLC type Unless there is a difference among PLC types all screen and dialog box examples in this tutorial will reflect the ONC PLC 1 INTRODUCTION 2001 IDEC CORPORATION WINDLDR TUTORIAL 1 3 On Line Help Help screens are available from most menus and screen options These Help screens provide on line assistance to guide you through a process or procedure To access On Line Help click the icon in the Menu Commands toolbar at any time Contents Search Wud DR If any information on the screen displayed is of special interest then an arrow and a balloon will direct your attention to that point FA2J FA 3S CP11 11T Help Reference ntroductior PLC Features location Table al Internal Relays Basic Instructions Overview dvanced Instructions Overview Error List Menu Commands Shortcuts Issues Contact IDEC Technical Supp
56. like this Tag Name 7 Allocation Number Tag Name Comment 6 Click the OK button or press the ENTER key to confirm The Pump A set output coil displays at the end of Rung 1 7 SET RESET INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTION 7 7 Step 4 Enter a Comment for Rung 1 To enter a rung comment 1 Click anywhere on Rung 1 2 Click Edit gt Rung comment from the menu commands toolbar or click the Rung comment icon The Rung Comment Dialog screen displays 3 Click in the white area of the dialog screen and enter This program shows a normally open contact I1 latching an output QO and a normally open contact I2 unlatching it When I1 comes on once or stays on QO is set or latched 4 Click OK to save the comments The rung comment displays above Rung 1 2001 IDEC CORPORATION 7 SET RESET INSTRUCTIONS 7 8 BASIC INSTRUCTIONS WINDLDR TUTORIAL Step 5 Enter the Stop 1 Contact on Rung 2 S To enter the Stop 1 contact 1 Click the Normally Open HH icon 2 Click on Column 1 of Rung 2 The Normally Open LOD dialog box displays 3 Enter I2 in the Tag Name field of the dialog box 4 Enter I2 in the Allocation Number field 5 Enter N O I2 Unlatch in the Tag Name Comment field Your completed dialog box should look like this Normally Open x Type Tag Name gt Nomally Open allocation 55555 C Normally Closed Number
57. normally open contact I1 turnin on an output QO IMPORTANT WindLDR allows you to enter as many charac ters as desired It is recommended that you keep to the length of the line when writing rung comments You can use as many lines as you want Press ENTER to transition to the next line 4 Click OK to save the comments The rung comments display above Rung 1 2001 IDEC CORPORATION 4 BASIC PROGRAMMING INSTRUCTIONS 4 8 BASIC INSTRUCTIONS WINDLDR TUTORIAL Saving a Program 3 To name and save this program 1 Click File 3 Save as from the Menu Commands toolbar The Save As dialog box displays 2 Enter STARTI in the File Name field of the dialog box 3 Click the OK button or press the ENTER key to confirm Ladder Preview 3 To print preview this program 1 Click File gt Listings from the Menu Commands toolbar The Ladder Preview dialog box displays 2 Click your left mouse button or press the ENTER key to pre view the whole ladder program 4 BASIC PROGRAMMING INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTIONS 4 9 Printing a Program 3 To print this program 1 Click File gt Listing from the Menu Commands toolbar The Ladder dialog box displays Select Ladder with left mouse button or hit ENTER key to print The Print dialog box displays 2 Enter the correct print options and then click the OK button or press the ENTER key to confirm
58. option 4 Enter T000 in the Tag Name field of the dialog box 5 Enter T000 in the Allocation Number field 6 Enter 0007 in the Preset Value field for a 7 second compari son 7 The Tag Name Comment field automatically displays 1 Sec Timer from 10 0 Your completed dialog box should look like this Timer Comparison Type Tag Name C Counter Comparison Allocation frooo Number Counter Comparison CC gt Timer Comparison Uus 0007 Ic Timer Comparison TC gt Sec Ti Sec Timer C Data Register Comparison DC Comment 19 Data Register Comparison DC gt N 7 Click the OK button or press the ENTER key to confirm 5 TIMER INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTIONS 5 21 Step 5 Enter the Output Coil gt To enter the output coil 1 Click the Output icon 2 Click on column 2 of rung 2 The Output OUT dialog box displays 3 Enter Q0002 in the Tag Name field of the dialog box 4 Enter Q0002 in the Allocation Number field 5 Enter When 7 Q2 is on in the Tag Name Comment field Your completed dialog box should look like this Tag Name 00002 7 Comment n is on R 6 Click the OK button or press the ENTER key to confirm The Q0002 output coil displays at the end of Rung 2 2001 IDEC CORPORATION 5 TIMER INST
59. or RS422 serial communication In addition the FA3S can dial up a remote device equipped with a modem and transmit data The instructions for transmitting are similar to those for receiving including the STXFT instruction for formatting and the STXEX instruction for execution Serial TX Format STXFT STXFT cPORT STDR oir Operand Input Output Internal Shift Data Timer 10msec Constant External Relay Register Register Counter Timer Setting cPORT X e STDR X oir X X Designate execution conditions for user defined communication serial transmission e cPORT Communication port e Communication status oir Completion output signal 14 TRANSMIT RECEIVE INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 14 23 When an input is on a buffer in the system program is formatted to transmit com munication specified by the STXEX instruction with the same value for L 0 to 9 Signal is received through cPORT and set to 0 for the program loader port Communication Status STDR The operand designated by STDR is specified as the data register for the system to store the status of the current communication The data register STDR is intended to use primarily for monitoring to determine the current stage of communication or why communication is not successful If communication is proceed
60. requires more data registers the ONC has 8000 data registers DO D7999 the Micro C has 500 data registers D0 D499 and the MicroSmart 10 I O type has 400 data registers 0 399 and the 16 24 I O types have 1300 data registers 0 1299 The ONC and Micro C offer superior com munication They are capable of communicating with any RS232 intelligent device using either ASCII or binary code 2001 IDEC CORPORATION 14 TRANSMIT RECEIVE INSTRUCTIONS 14 6 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Exercise 16 Creating a Transmit Program In this exercise you will learn how to use the Micro C ONC or MicroSmart transmit instruction to automatically dial and send a message to a pager This is a flow control program which shows the Micro C controlling a tank and reporting any overflow or low level to a maintenance engineers pager If the pager is alphanumeric then the PLC can transmit text messages as well as numeric ones ANALOG CONTROL SYSTEMS APPLICATION DISTANCE SENSOR INDUSTRIAL TANK SH O TO PRODUCTION PUMPA TANK FULL 14 TRANSMIT RECEIVE INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 14 7 Follow the steps below to create a transmit program When completed your pro gram screen should look like this W WindLDR 3 00 C WINDLDR DIALIT LDR mr File Edit View Configure Compile
61. settings for 11 3 11 9 analog read 0 ANRO dialog box 11 6 instructions entering in a program 11 6 11 7 uses for 11 1 ladder logic example 11 3 programs creating 11 4 valid operands 11 2 analog read 1 ANR1 instructions uses for 11 2 valid operands 11 2 analog to digital A D converter 12 1 instructions entering in a program 12 5 uses for 12 1 programs creating 12 3 arithmetic instructions See binary arithmetic instructions basic instructions applicable PLCs 1 2 toolbar 3 3 batch monitor 4 15 binary arithmetic instructions addition ADD 10 1 10 19 10 20 10 21 10 22 10 23 10 24 division DIV 10 3 multiplication MUL 10 2 subtraction SUB 10 2 10 3 sum SUM 10 4 uses for 10 1 programs creating 10 12 10 27 valid operands 10 5 10 11 calendar read CALR 13 2 2001 4 6 calendar read CALR instructions 13 1 13 2 entering in a program 13 9 ladder logic example 13 2 uses for 13 1 calendar write CALW instructions 13 1 calendar clock adjusting using a user program 13 39 dialog box 13 9 FUN28 13 1 instructions adjust ADJ 13 1 calendar read CALR 13 2 calendar write CALW 13 1 clock read CLKR 13 1 13 3 clock write CLKW 13 1 programs creating 13 6 setting 13 36 setting using a user program 13 27 13 37 setting using WindLDR 13 25 valid operands 13 4 central processing unit CPU See also PLC components 2 3 clock function MicroSmart 13 35
62. value stored in the control register D3032 This 16 bit value has three significant bits 2001 IDEC CORPORATION 14 TRANSMIT RECEIVE INSTRUCTIONS 14 28 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Control Register D3032 16 Bits one word ojojo o olofofo xjojo o ojo x X Result Bit read out only Standard Communication 0 User Defined Communication 1 Echo Bit transmitting only No Waiting for Echo 0 Echo Waiting 1 Command Bit Standard Communication 0 User Defined Communication 1 When the command bit is set to one user defined communication is possible However user defined communication is not enabled without using the input or internal relay designated by an UDCMS instruction When the input or internal relay designated by iir is on and when the command but of control register D3032 is set to 1 user defined communication is enabled When the operand designated by iir is off the standard communication mode is used Example Serial Receiving The first example for user defined communication will demonstrate incoming data received in the format shown for dr S and processed to dr S D NOTE Data for comparison are given values and data for conversion are represented by shaded blocks 14 TRANSMIT RECEIVE INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 14 29 Before comparison desired values must be pre loaded into data registers D15 through D18
63. with respect to seconds If seconds are between 0 and 29 for current time adjust ment for seconds will be set to 0 and minutes remain the same If seconds are between 30 and 59 for current time adjustment for seconds will be set to 0 and minutes are incremented one M8021 is useful for precise timing which starts at zero seconds Example Adjusting Calendar Clock Data to O Seconds O When input I2 is turned on clock data adjust flag special internal relay M8021 is 12 M8021 turned on and the clock is adjusted with respect to seconds 2001 IDEC CORPORATION 13 CALENDAR CLOCK INSTRUCTIONS 13 40 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL 13 CALENDAR CLOCK INSTRUCTIONS 2001 IDEC CORPORATION 14 TRANSMIT RECEIVE INSTRUCTIONS For Micro C and MicroSmart Only Transmit and Receive The ONC has two RS232 loader ports the Micro C has one RS232C loader port and the MicroSmart 10 I O type CPU module has one RS232 loader port and the 16 20 24 and 40 I O and type CPU modules have one RS232 loader port with Port 2 installing an optional RS232C communication adapter FC4A that allow these controllers to communicate that is transmit and receive data with any RS232C intelligent device or remote terminal The instructions for transmitting and receiving data are as follows Transmit TXD H TXD S D When an input is on the data designated 51 is converted into a special
64. 000 and Critical point in the S2 column 7 Enter Q2 Q2 and Valve Opens wired to Q2 in the D1 column 2001 IDEC CORPORATION 12 A D CONVERSION INSTRUCTIONS 12 6 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Step 4 Save the Program gt To name and save this program 1 Click File Save as from the Menu Commands toolbar The Save As dialog box displays 2 Enter ANALOG in File Name field of the dialog box 3 Click the OK button or press the ENTER key to confirm Step 5 Print Transfer and Monitor the Program To print this program refer to page 4 9 To transfer this program refer to page 4 12 To monitor this program refer to page 4 13 12 A D CONVERSION INSTRUCTIONS 2001 IDEC CORPORATION 13 CALENDAR CLOCK INSTRUCTIONS Calendar and Clock IDEC Micro Micro C ONC series the FA3S CP11T and the MicroSmart are the only PLCs with a real time clock and calendar These PLCs can be pro grammed with date and time functions in applications in which any of these PLCs are used Calendar Clock Instructions Micro and Micro C The 16 and 24 I O type Micro and Micro C base units feature five real time calendar and clock instructions used for programming the calendar and clock calendar read CALR calendar write CALW clock read CLKR clock write CLKW and adjust ADJ These instructions cannot be used on the 10 I O type Micro base units After initially setting the calendar and clock using F
65. 001 IDEC CORPORATION 12 A D CONVERSION INSTRUCTIONS For Micro and Micro C Only Introduction to Analog Digital Instructions The analog to digital A D instruction is used in conjunction with an A D con verter The A D converter can be used with the Micro and to perform an 12 bit A D conversion The A D converter unit reads analog input signals from an analog output device such as an analog distance sensor or temperature sensor Analog Digital A D Conversion A D DI 12 When an input is the analog data from the A D converter unit FC2A AD1 AD2 AD3 or AD4 connected to input IO is converted to a digital value and is set to a data register designated by destination operand D1 The resolution of A D conversions can be either 8 bits or 12 bits NOTE The ONC and FA series PLCs have multiple analog inputs on one card These analog input points are mapped directly to the input registers FA series and to the link registers ONC For details refer to the user manual of your specific PLC 2001 IDEC CORPORATION 12 A D CONVERSION INSTRUCTIONS 12 2 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Valid Operands Standard Processing When an input is on the analog data from the A D converter unit connected to the input IO is converted to a digital value and set to a data register designated by destination operand D1 Operand Function T C
66. 001 IDEC CORPORATION 4 BASIC PROGRAMMING INSTRUCTIONS 4 2 BASIC INSTRUCTIONS WINDLDR TUTORIAL Output Instructions The output OUT instruction outputs the result of a bit logical operation to the specified operand The output not OUTN instruction outputs the inverted result of a bit logical operation to the specified operand OUT OUTN Ladder Diagram m 10 00 1 Q1 4 BASIC PROGRAMMING INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTIONS 4 3 Exercise 1 Creating a Start Stop Program In Chapter 3 Getting Started you opened WindLDR selected your PLC type set the appropriate function settings and set your ladder preferences You are now ready to create a ladder logic program using the blank program displayed on your Screen In this exercise you will write a basic ladder logic program that uses a PLC input to turn on off an output The figure below illustrates a simple input output scenario in which an normally open NO pushbutton is used to turn on off a pump You will use the elements from this figure to create your program CONTROL SYSTEMS APPLICATION INDUSTRIAL TANK START 1 PUMP A TO PRODUCTION Start 1 NO alternate action pushbutton wired to I1 Pump A Wired to QO After you create your program you will transfer it to your PLC and monitor its operation 2001 IDEC CORPORATION 4 BASIC PROGRAMMING INSTRUCTIONS 4 4 BASIC INSTRUCTIONS WIN
67. 0100 C lt gt t0001 C CMP 00000 0100 C CMP N Repeat Repeat Repeat lt Water Tank 100 Level r R Trigger ri Level Sensor very Low Instruct CMP2 Data Type Word x Cancel Help 3 Click lt in the Type field 4 Enter DO DO and Water Tank Level Sensor in the S1 col umn Enter 100 100 and 100 Level very low in the S2 column Enter M1 M1 and LR Trigger TXD Instruction in the D1 column 5 Click OK 14 TRANSMIT RECEIVE INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 14 13 Step 7 Enter a Single Output Up SOTU Instruction on Rung 2 To enter an SOTU instruction icon 2 Click on Column 2 of Rung 2 1 Click the SOTU The SOTU instruction displays next to the ZankFull contact on Rung 2 Step 8 Enter a Transmit Instruction on Rung 2 To enter a transmit instruction 1 Click the Transmit Receive 2 Click on Column 3 of Rung 2 2001 IDEC CORPORATION 14 TRANSMIT RECEIVE INSTRUCTIONS 14 14 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL The Transmit TXD dialog box displays i Di D2 een 0 18002624332__ 0010 0010 lt 00000 B4 01 gt d C RXD t0010 00010 eres Emergency Transmission Port Overflow Status D10 6 Port 1 Insert Delete Edit i 3 Click the Insert button T
68. 020 calendar clock data write flag must be turned on to set the new calendar clock data to the clock cartridge M8120 MOVW 518 DIR REP 0 DO D8015 4 MO MOVW 518 DIR REP 4 D4 D8019 3 Q M1 O MO M1 MOV W 518 08008 0 7 8125 M8120 is the initialize pulse special internal relay When the CPU starts seven MOV W instructions store calen dar clock data to data registers DO through D6 When input 10 is turned on new calendar data year month day and day of week are moved to data registers D8015 throughD8018 and internal relay MO is turned on for 1 scan time When input is turned on new clock data hour minute andsecond are moved to data registers D8019 through D8021 andinternal relay M1 is turned on for 1 scan time 13 CALENDAR CLOCK INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 13 39 When either MO or M1 is turned on calendar clock data write flag special internal relay M8020 is turned on to set the new calendar clock data to the clock cartridge M8125 is the in operation output special internal relay While the CPU is running the MOV W moves current calen dar clock data to data registers D10 through D16 Adjusting Clock Using a User Program Special internal relay M8021 clock data adjust flag is provided for adjusting the clock data When M8021 is turned on the clock is adjusted
69. 1277 uid 52 127 1299 65535 2 MicroSmart D20K3 ggs sedi ese 0 99 0 99 0 0 5 1 99 1 Q mj D20RKI 1277 127 1299 65535 ES Ds 0 307 0 307 0 0 0 0 40 I O 0 307 0 307 1277 0 99 0 99 127 1299 65535 1 99 2001 IDEC CORPORATION 10 ARITHMETIC COMPARISON INSTRUCTIONS 10 6 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Operand PLC Function Type Q M T D Constant Repeat Micro and 0 0 0 0 99 Micro C 0 31 5 l s 7 Eua 0 0 0 0 0 SD 0 597 557 255 255 255 7999 1590 9 8 10 0 0 3 0 317 0 51 0 31 0 63 0_399 1 99 m 2 16 I O m 0 6 x 5 EN ui an pr T 55 d E 1777 22 Med i5 xd pes 2410 0 107 MicroSmart 7 D20k3 m S D2053 0 0 J 5 V p20rKI 1277 15321 1532 127 1299 ER S 20851 0 307 0 0 0 401 30 1 0I O 0 307 1575 0 99 0 99 1299 99 Micro 0 99 Micro C 10 ARITHMETIC COMPARISON INSTRUCTIONS 2001 1 WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 10 7 Comparison Instructions Micro ONC and MicroSmart only Data can be compared using comparison instructions such as equal to not equal to less than greater than less than or equal to and greater than or equal to When the comparison res
70. 163 l g 65535 1731 ONC 0 0 597 0 2557 0 06 9 79991 0 4 9 1 99 597 255 255 255 8 10 I O 0 5 0 3 0 317 0 31 0 31 0 63 0 399 52 0 0 0 10 6 8 1 99 Source 2 4 0 1277 0 99 0 99 0 1299 65535 9 24 1 0 0 15 0 107 127 2 0 0 MicroSmart 3 D2053 187 187 a 5 3 0 1299 amp D20RKI zu om 20 51 307 307 0 1277 0 99 0 99 1 2000 5535 1 99 6 7999 401 x 7 307 307 2001 IDEC CORPORATION 10 ARITHMETIC COMPARISON INSTRUCTIONS 10 12 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Operand PLC Function CPUType Q M T D Constant Repeat Micro and 0 31 7 1 31 ONC 0 597 0 2557 1 99 E 10 0 0 3 0 317 g 16 I O 0 6 1 99 D2 8 0 1277 Destina 2 2410 0 107 tion 1 8 20 3 0 0 MicroSmart 8 0 3 D2053 187 187 5 g D20RKI 0 0 a 307 307 0 1277 1 99 0 0 401 gt 307 307 Exercise 11 Creating a Binary Arithmetic Comparison Program The binary arithmetic ADD SUB MUL and DIV can be used to manipulate data in the PLC and use the comparison instruction to execute a specific task 10 ARITHMETIC COMPARISON INSTRUCTIONS 2001 1 WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 10 13 Complete the following ste
71. AR CLOCK INSTRUCTIONS 13 36 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Setting Calendar Clock The calendar clock data in the clock cartridge must be set to transfer the correct data from special data registers allocated to the calendar clock Once the calen dar clock data is stored the data is held by the backup battery in the clock car tridge To Set Calendar Clock 3 1 Select Online from the menu bar the select Monitor The screen display changes to the monitor window 2 From the Online menu select PLC Status The MicroSmart PLC Status dialog box is displayed The current calendar clock data is read out from the clock cartridge and displayed in the Calendar box 3 Click the Change button in the Calendar box The Set Calen dar and Time dialog box comes up with the date and time val ues read from the computer internal clock 4 Click the Down Arrow button on the right of the Calendar then the calendar is displayed where you can change the year month and date Enter or select new values 5 To change hours and minutes click in the Time box and type a new value or use the up down keys When new values are entered click the OK button to transfer the new values to the clock cartridge 13 CALENDAR CLOCK INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 13 37 Setting Calendar Clock Using a User Program Another way of setting the calendar clock data is to store the values in sp
72. Click on Column 1 of Rung 2 The Normally Open LOD dialog box displays Normally Open x Type Tag Name Normally Open Allocation Normally Closed Number 17000 Tag Name convert Comment to y 3 Enter 10 in the Tag Name and Allocation Number fields Enter Convert X to Y in the Name Comment field 5 Click OK The Convert X to Y contact displays at the beginning of Rung 2 15 XY CONVERSION 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 15 11 3 Step 6 Enter an XY Conversion Instruction on Rung 2 To enter an XY conversion instruction 1 Click the XY Convert e icon 2 Click on Column 2 of Rung 2 The XY Convert Format XYFS dialog box displays Convert X to Y CVXTY Type Convert X to Y CVXTY 1 15 C Convert Y to X CVYTX poo1o 15 x value Converted X D10 value in D15 Data Type eoe 3 Click Convert X to Y CVXTY in the Type field 4 Enter 1 1 First Point in the S1 field 5 Enter D10 D10 X value in D10 in the S2 field 6 Enter D15 D15 Converted X value in D15 in the D1 field 7 Click OK The CVXTY I instruction displays on Rung 2 2001 IDEC CORPORATION 15 XY CONVERSION 15 12 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Step 7 Enter a Rung Comment for Rung 2 To enter a comment for Rung 2 1 Click anywhere on Rung 2 2 Click Edit gt Rung commen
73. Cross Reference 3 To cross reference the entire ladder program 1 Click File Listings from the Menu Commands toolbar The Cross Reference dialog box displays 2 Click your left mouse button or press the ENTER key to view the cross reference file NOTE You may save or print the cross reference file which is presented in the Notepad file format 2001 IDEC CORPORATION 4 BASIC PROGRAMMING INSTRUCTIONS 4 10 BASIC INSTRUCTIONS WINDLDR TUTORIAL Closing a Program To close a program 1 Click the m icon button in the upper left corner of the program screen A drop down menu displays 2 Click Close from the drop down menu 4 BASIC PROGRAMMING INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTIONS 4 1 1 Configuring the Communication Port Before you can transfer your START 1 program to the PLC you must set the proper serial port settings For this exercise you will choose the default settings for your PLC To configure the communication port 1 Click Configure gt Communication settings from Menu Commands toolbar The Communication Settings dialog box displays asking you to confirm the communication settings Communication Settings Communication Port Settings Baud Rate 9600 Cancel Data Length te Parity le Stop Bits PLC Network Settings e 11 O Device No 000 2 Click the Default button
74. DLDR TUTORIAL Follow the steps below to create a start stop program When completed your program screen should look like this W WindLDR 2 11 C WINDLDR START1 File Edit View Configure Compile Online Window Help Diela eli eel sas alele zz Sn e om SS o s ECD HEX p soto u E 6 ss c ma e MEL NAKIR Ke kA s E n n e p N This program shows a Normally Open contact I1 turning on an Output QO H O P B is Pump A is Wired to I1 Wired to QO 000 01 00000 STEP 1 Enter the Start 1 Contact To enter the Start 1 contact 1 Click the Normally Open icon Notice that as you move the pointer away from the icon the icon symbol remains next to the pointer 4 BASIC PROGRAMMING INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTIONS 4 5 2 Click on Column 1 of Rung 1 The Normally Open LOD dialog box displays You can move from field to field within a dialog box by pressing the TAB key or by clicking in the desired field 3 Enter Start 1 in the Tag Name field of the dialog box 4 Enter in the Allocation Number field 5 Enter N O P B is wired to I1 in the Tag Name Comment field Your completed dialog box should look like this Type Tag Name Normally Open C Normally Closed diii 0 P B
75. F CONTENTS IV WINDLDR TUTORIAL Exercise 7 Creating an SOTU SOTD Program Micro Micro C ONC and MicroSmart 8 3 Exercise 8 Creating an SOT Program Micr0 1 and FA Series PLCs 8 8 Chapter 9 Data Move Micro Micro C ONC and 9 1 Structure of an Advanced Instruction 9 1 Input Condition for Advanced Instructions 9 2 Source and Destination Operands 9 3 Using a Timer or Counter as the Source Operand 9 3 Using a Timer or Counter as the Destination Operand 9 4 Using an Input or Output as the Source or Destination Operand 9 4 Exercise 9 Creating a Data Move Program Micro ONC and MicroSmart series 9 6 Data Move FA series 9 10 Operand Designation 9 10 Exercise 10 Creating a Data Move Program FA series 9 11 Chapter 10 Binary Arithmetic Instructions dA cao 10 1 Addition ADD 10 1 Subtraction SUB 10 2 Multiplication MUL 10 2 Division DIV Root ROOT ONC and MicroSmart Only 10 3 Sum SUM ONC Only 10 4 Valid Operands Standard Processing 10 5 TABLE OF CONTENTS 2001 4 6 WINDLDR TUTORIAL V Comparison Instructions Micro Micro C ONC and MicroSmart only 10 7 Compare Equal To 10 7 Compare Not Equal To CMP 10 8 Compare Less Than CMP lt 10 8 Compare Greater Than CMP gt 10 9 Compare Less Than or Equal To CMP 10 9 Compare Greater Than or Equal To CMP gt 10 10 Interval Com
76. Housekeeping If required information is exchanged with other devices Single scan transitions are logged timers and counters are updated and a system diagnostics check is performed in preparation for the next scan NOTE Steps 1 3 and 4 are consolidated in the PLC s END instruction Defining Ladder Logic Input Conditions A typical line or rung in a ladder logic program contains several input conditions Each condition is like an if statement If a condition is true then a particu lar action will take place by the PLC Likewise if the same condition is not true then the action will not take place The program is solved in this manner by the PLC determining if the defined conditions are true or not Conditions are defined by the programmer as contacts either an Examine On contact or an Examine Off contact Examine On Contact Examine On contact is true when the input terminal is hot the LED light on the input is ON Examine Off Contact 1 T Examine Off contact is true when the input terminal is not hot the LED light on the input is OFF regardless of whether the input device pushbutton etc is considered a normally open NO or normally closed NC device 2 PLC OVERVIEW 2001 IDEC CORPORATION 3 GETTING STARTED Getting Started This tutorial walks you through the process of creating basic programs using the IDEC PLC instruction sets Each chapter introduces you to
77. ING INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTIONS 4 21 Follow the steps below to create a multiple Start Stop program When com pleted your program screen should look like this 5 dr i This program shows a Normally Open contact 1 turning on an Output 00 of Pump A and Q1 of Pump B Since the E Stop Switch is an external NC contact User must determine when it is off NC contact is open W C P B is Pum A is Wired to I3 Wired to QU Pump Pum B is to 01 OpenNet COMI 000 Step 1 Open the START1 Program from Exercise 1 2001 IDEC CORPORATION 4 BASIC PROGRAMMING INSTRUCTIONS 4 22 BASIC INSTRUCTIONS WINDLDR TUTORIAL Step 2 Enter the E Stop on Rung 1 S To enter the E Stop 1 Click the Normally Closed icon 2 Click on Column 2 of Rung 1 The Normally Closed LODN dialog box displays 3 Enter E Stop in the Tag Name field of the dialog box 4 Enter I3 in the Allocation Number field 5 Enter N C P B is wired to I3 in the Tag Name Comment field Your completed dialog box should look like this Normally Closed Type C Normally Open Tag Name E Stop 2 Normally Closed Allocation Number 10003 Tag Name Comment N C P B is Wired to 13 X Cancel 2 Heb 6 Click the OK button or press the ENTER key to confirm The Stop contact displays next to Start on Rung 1
78. IONS 11 2 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Analog Read 1 ANR1 When an input is on the value 0 249 set with analog potentiometer 1 is read to the data register designated as the destination This instruction is useful for adjusting the preset values of the timer TIM TMH and TMS and pulse PULS and PWM instructions ANRI p Valid Operands Standard Processing In the high speed processing mode data registers for these instructions are limited to 00 031 Since the ANRO and instructions are executed in each scan while the input is on a pulse input from an SOTU or SOTD instruc tion should be used as required Operand Function M T CIR D Constant Repeat 0 99 Destination to store Micro the analog potentio meter value 0 498 11 ANALOG READ INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 11 3 Analog Potentiometer Setting for Micro and The analog potentiometer positions and set values are shown below 588 Turned Fully to the Left Turned Fully to the Right Se 3 0 8 gt Minimum Value 0 Maximum Value 249 1 8 Analog Potentiometer 69699 10 I O type Micro has one potentiometer 16 and 24 I O Micro types have two potenti
79. LC Type You can use WindLDR to program all of IDEC s PLCs However you must choose your specific PLC type before you begin programming 3 To select the correct PLC 1 Click Configure gt PLC selection from the Menu Commands toolbar or click the Select PLC icon The PLC Selection dialog box displays 2 Click the correct PLC type 3 Click the Configure button The PLC Configuration dialog box displays 4 For the Micro 1 click the expansion unit if needed for your PLC For the Micro Micro C or Micro Smart click the spe cific base unit and expansion unit if needed for your PLC For the FA and ONC series there is no need for additional selec tions 2001 IDEC CORPORATION 3 GETTING STARTED TOR Micro 1 PLC Selection 2 FA 3S CP11 Micro 1 Configuration Use as Default Default Micro 1 Expansion Unit None Expansion Unit 8 in 6 out X Cancel Serial 1 0 Module 8 in 8 out Help Micro Expansion Unit 4 in Micro Expansion Unit 3 out Micro Expansion Unit 2 in 2 out N Analog Timer Unit 4 in 8 out Micro Micro C MicroSmart PLC Selection PLC Selection PLC 35 12 a 4 35 13 Cancel 3 35 CP12 35 CP13 Micro 1 3 Micro 3C penNet 7 Hep Use as Default Default Base Unit CPU
80. LOCK INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 13 13 Step 7 Enter an Comparison instruction on Rung 3 To enter an comparison instruction 1 Click the Compare icon 2 Click on Column 2 of Rung 3 The Compare Equal To dialog box displays Compare Equal To Type 51 gt 52 gt D1 T REP CMP 1 lt gt 0020 ei lm N D0093 0001 CMP gt Repeat Repeat Repeat p lt Data 1 is Monday 20 is gt Register the Second 11 293 1 CMP2 Day of Week Day of Week Mondays Data Type 3 3 In the S1 column enter D93 D93 The Data Register Day of Week In the S2 column enter 1 1 1 is Monday the Second Day of Week 5 In the D1 column enter M20 M20 M20 is On if D93 1 Mondays 6 Click OK The CMP2 icon displays on Rung 3 2001 IDEC CORPORATION 13 CALENDAR CLOCK INSTRUCTIONS 13 14 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Step 8 Enter an Comparison instruction on Rung 4 To enter an comparison instruction 1 Click the Compare 2 Click on Column 2 of Rung 4 The Compare Equal To dialog box displays Compare Equal To x CMP h lt gt T N D0096 0007 0030 CMP gt Repeat Repeat Repeat C C
81. MP lt 096 Hour 096 7 am 30 is On CEMPE 097 Minute The Freezer fif 296 walle D98 Second Goes Off aM Data Type vos 3 In the S1 column enter D96 D96 D96 Hour D97 Minute D98 Second 4 In the 2 column enter 7 7 1296 7 Am The Freezer Goes Off 5 In the D1 column enter M30 M30 M30 is On if D96 7 AM 6 Click OK The CMP2 icon displays on Rung 4 13 CALENDAR CLOCK INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 13 15 Step 9 Enter an NO Contact on Rung 5 lt gt To enter an NO contact 1 Click the Normally Open 2 Click on Column 1 of Rung 5 The Normally Open LOD dialog box displays Ix Normally Open Type Tag Name TTD 5 Normally Open Allocation goo Normally Closed Number Tag 10 is Comment if 93 0 Sundays N 3 Enter M10 in the Tag Name and Allocation Number fields 4 Enter M10 is On if D93 0 Sundays in the Tag Name Comment field 5 Click OK The M0010 contact displays at the beginning of Rung 5 2001 IDEC CORPORATION 13 CALENDAR CLOCK INSTRUCTIONS 13 16 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Step 10 Enter an NO Contact on Rung 5 S To enter an NO contact 1 Click the Normally Open HH icon 2 Click on Column 2 of Rung 5 The Normally Open LOD dialog box displays Normally Open
82. NS INTRODUCTIONS 9 8 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL 4 In both the Tag Name and Allocation Number fields enter 6 for S1 and C003 for D1 5 In the Tag Name Comments field enter 6 Bottles moved to C3 for S1 and Soda Packaging machine in D1 6 Click OK or press the ENTER key to confirm that the MOV instruction displays at the end of Rung 2 Step 3 Enter a MOV Instruction on Rung 3 S To enter a MOV instruction 1 Click the MOV icon sol 2 Click on Column 3 of Rung 3 The Move dialog box displays The completed dialog box should look like this ove MOV 51 Di 5 003 Move MOV C Move Not MOVN Allocation Number 0006 Repeat Repeat Tag Name Comment 6 Bottles movedto Soda Packaging Data Type 3 jachinel Word v Ok 75e 3 The Move option in the Type field is selected by default Select Word in the Data Type field 9 ADVANCED INSTRUCTIONS INTRODUCTION 2001 WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 9 9 4 In both the Tag Name and Allocation Number fields enter 12 for S1 and C003 for D1 5 In the Tag Name Comments field enter 12 Bottles moved to C3 for S1 and Soda Packaging machine in D1 4 Click OK Step 4 Save the Program gt To name and save this program 1 Click File gt Save as from the Menu Commands toolbar The Save As dialog box displays
83. ON 9 ADVANCED INSTRUCTIONS INTRODUCTIONS 9 14 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Step 4 Save the Program To name and save this program 1 Click File gt Save as from the Menu Commands toolbar The Save As dialog box displays 2 Enter WMOV in File Name field of the dialog box 3 Click the OK button or press the ENTER key to confirm Step 5 Print Transfer and Monitor the Program To print this program please refer to page 4 9 To transfer this program refer to page 4 12 To monitor this program refer to page 4 13 9 ADVANCED INSTRUCTIONS INTRODUCTION 2001 4 6 10 ARITHMETIC COMPARISON INSTRUCTIONS For Micro Micro C ONG and MicroSmart Only Binary Arithmetic Instructions The binary arithmetic instructions make it possible for you to program compu tations using addition subtraction multiplication and division For addition and subtraction operands internal relay M303 Micro and Micro C or M8003 ONC and MicroSmart are used to carry or to borrow Addition ADD H ADD SI R S2 R DI R REP 1452 D1 CY When an input is on the 16 bit Micro Micro C and MicroSmart or 16 or 32 bit ONC word data designated by source operands 1 and S2 are added The result is set to destination operand D1 and carry M303 Micro or Micro C or M8003 ONC or MicroSmart 2001 IDEC CORPORATION ARITHMETIC COMPARISON
84. PLC It receives input data performs logical deci sions based on the program and drives the outputs accordingly Memory The processor memory stores the user s program I O data timer and counter values analog values and any control constants that the programmer creates IDEC PLC user programs are stored permanently in nonvolatile Electrically Erasable Programmable Read Only Memory EEPROM Programs stored in EEPROM are safe during power outages and can be reprogrammed with the proper equipment that is a program loader Unlike EEPROM Random Access Memory RAM temporarily stores register timer and counter values in the PLC Although RAM is volatile it is backed up by a 30 day capacitor 2001 IDEC CORPORATION 2 PLC OVERVIEW 2 4 WINDLDR TUTORIAL Input Interface The input interface provides an electrical interface between the input devices and the processor s internal logic control circuits Input devices include such items as pushbuttons float and limit switches operator selector switches pressure switches and sensors OPTO COUPLER Input Circuit Program In the illustration above when the pushbutton is closed the light emitting diode LED turns on This light in turn switches on a phototransistor connected to the internal circuitry This means of keeping the input wiring and internal circuitry electrically separate is known as optical isolation Output Interface The output interface pr
85. PU configurations must be set User defined communication includes all other 1 1 and 1 N communication User defined 1 1 communication includes receiving and dialing transmitting through a modem or two way dialog with an operator interface annunciator It is also possible to accept alpha or numeric data from a bar code scanner decoder and to send alpha and numeric characters to an LED display or as Centronics compatible printer 14 TRANSMIT RECEIVE INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 14 25 Serial RX Execute STXEX User Defined Communication H SRXEX dr S oir S Ky S D eee K dr S D Execute user defined communication serial receiving e 5 First source data register e Comparison output signal cNBLK Quantity of data bocks 1 to 255 e Code for comparison conversion e dr S D Source data register for comparison or destination data register for conversion When an input turns on data is taken from the source data registers starting with dr S which are the same as the destination data registers dr D in the SRXFT instruction Incoming data is divided into blocks designated by c NBLK 1 to 255 Each block of data is represented by a value for K and a corresponding operand dr D S Used with FUN147 K can be a constant value specified by the operand or supplied by an external setting When K equals zero the blo
86. R key to confirm Step 15 Print Transfer and Monitor the Program S To print this program please refer to page 4 9 To transfer this program refer to page 4 12 To monitor this program refer to page 4 13 Real Time Clock and Calendar ONC The real time clock and calendar of the ONC features functionality and instruc tions used for programming the dates and times of events The Week Comparison Instruction This set of instructions is the week compare on off WKCMP ON OFF week table WKTBL and calendar and clock word set NSET 13 CALENDAR CLOCK INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 13 21 As many WKCMP instructions as needed can be used to turn on and off desig nated output and internal relays at predetermined times and days of the week Once the internal calendar clock is set the WKCMP ON and OFF instructions compare the predetermined time with the internal clock When the preset time is reached the internal relay or output designated as the destination operand is turned on or off as scheduled Week Compare ON WWKCMP ON WKCMP 51 S2 S3 D1 ON When the input is on the WKCMP ON instruction compares the 1 and 2 preset data with the current day and time When the current day and time reaches the resets an output or internal relay designated by operand D1 is turned on depending on the week table output control desi
87. RATION 12 A D CONVERSION INSTRUCTIONS 12 4 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Step 2 Enter an Analog to Digital Conversion Rung 1 To enter an analog to digital conversion 1 Click the Analog to Digital icon 2 Click on Column 2 of Rung 1 The Analog to Digital Conversion dialog box displays The com pleted dialog box should look like this Analog to Digital Conversion Digital Data Range D1 C 8 bits Tag Name 0 pressure ls Comment signal 3 Click 12 bits for the Digital Data Range option 4 Enter D30 in both the Tag Name and Allocation Number fields 5 Enter pressure signal in the Tag Name Comments field 12 A D CONVERSION INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 12 5 Step 3 Enter a Comparison Instruction on Rung 2 To enter a comparison instruction 1 Click the Comparison icon 2 Click on Column 2 of Rung 2 The Comparison dialog box displays The completed dialog box should look like this Compare Greater Than or Equal To 1 52 gt D1 2000 00030 2000 00002 Repeat Repeat Repeat pressure critical Valve Opens signal point wired to 02 Data Type 2 zo cun 3 Click CMP gt in the Type field 4 Select Word from the Data Type option 5 Enter D30 1230 and pressure signal in the S1 column 6 Enter 2000 2
88. RUCTIONS 5 22 BASIC INSTRUCTIONS WINDLDR TUTORIAL Step 6 Enter the Timer Comparison gt 1 Click the Timer Comparison icon 2 Click on the first column of rung 3 The Timer Comparison TC dialog box displays 3 In the Type field click the Timer Comparison TC gt option 4 Enter T000 in the Tag Name field of the dialog box 5 Enter T000 in the Allocation Number field 6 Enter 0003 in the Preset Value field for a 3 second comparison 7 The Tag Name Comment field automatically displays 1 Sec Timer from 10 0 Your completed dialog box should look like this Type 3 i yp Tag Counter Comparison Allocation Counter Comparison CC gt Wes Timer Comparison TC 0003 gt Timer Comparison TC gt C Data Register Comparison DC C Data Register Comparison DC gt 7 Click the OK button or press the ENTER key to confirm The 7C instruction displays at the beginning of rung 3 5 TIMER INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTIONS 5 23 3 Step 7 Enter the Output Coil to which to Compare To enter the output coil 1 Click the Output icon 2 Click on column 2 of rung 3 The Output OUT dialog box displays 3 Enter Q0003 in the Tag Name field of the dialog box 4 Enter Q0003 in the Allocation Number field 5 Enter When T0 gt 3 Q3 is On in the Tag Name Comment fiel
89. S WINDLDR TUTORIAL Step 5 Enter a Comment for Rung 1 To enter a rung comment 1 Click anywhere on Rung 1 2 Click Edit 3 Rung comment from the Menu Commands e toolbar or click the Rung comment sl icon The Rung Comment Dialog screen displays 3 Click in the white area below the existing text in the dialog screen and enter SOT executes for one scan only when contact I1 goes from off to on 4 Click the OK to save the comments The rung comment displays above Rung 1 8 SINGLE OUTPUT INSTRUCTIONS 2001 WINDLDR TUTORIAL BASIC INSTRUCTIONS 8 13 Step 6 Enter a Comment for Rung 2 To enter a rung comment 1 Click anywhere on Rung 2 2 Click Edit Rung comment from the Menu Commands y toolbar or click the Rung comment The Rung Comment Dialog screen displays 3 Click in the white area below the existing text in the dialog screen and enter SOT executes for one scan only when contact I2 goes from on to off 4 Click the OK to save the comments The rung comment displays above Rung 2 2001 IDEC CORPORATION 8 SINGLE OUTPUT INSTRUCTIONS 8 14 BASIC INSTRUCTIONS WINDLDR TUTORIAL Step 7 Save the Program gt To name and save this program 1 Click File gt Save as from the Menu Commands toolbar The Save As dialog box displays 2 Enter SOT in File Name field of the dialog box 3 Click the OK button or pr
90. SION 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 15 17 FA3S Series XY Conversion XY Format Set XYFS Linear Conversion H XYFS CNBLK X0 YO X1 Y1 Xn Yn Format using XY coordinates When an input is on the format for XY conversions are set The number of Xn Yn coordinates defining the linear relationship between X and Y is designated by the operand NBLK 2 to 32 points Since the XYFS instruction is executed in each scan while an input is on use a pulse input as required The initialize pulse from special internal relay M304 is recommended to set the format when the CPU operation starts A level input such as M317 will increase the scan time Convert X to Y CVXTY pecorum 5 D 1 A ee NE 2 e D 1 Assign data 5 as X find corresponding Y and place in D Similar to the ONC PLC the FA series has convert X to Y CVXTY and con vert Y to X CVYTX instructions 2001 IDEC CORPORATION 15 XY CONVERSION 15 18 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL When an input is on the value in the operand designated by S is assigned as X The linear relationship defined in the XYFS instruction is used to identify the corresponding Y This value is set to the operand designated by etc D The vari able dd can be 30 to 39 The XYFS instruction which defines the linear relationship between X and Y must precede this instruction The variable dd
91. Status Input Output NO L 2 OFF NC ON LL SEE 2 ON NC OFF 4 CLOSED NC Inputs YlY T In the first programming example the input is a NO contact When a NO con tact is ON the output is also ON Likewise when the NO contact is OFF the output is also OFF In the following exercise the E Stop emergency stop is a NC external device You must check to see if the E Stop is off or if the NC con tact becomes open 2001 IDEC CORPORATION 4 BASIC PROGRAMMING INSTRUCTIONS 4 20 BASIC INSTRUCTIONS WINDLDR TUTORIAL Exercise 2 Creating a Multiple Start Stop Program In this exercise you will add an additional LOD and OUT instruction and an E Stop to the Start Stop program from Exercise 1 The figure below illustrates a multiple input output scenario in which either of two NO pushbuttons can be used to turn on off two pumps simultaneously An emergency NC pushbutton is used to simultaneously turn off both pumps You will use the elements from this figure to create your program CONTROL SYSTEMS APPLICATION PUMP A INDUSTRIAL TANK 8 PUMP B START1 START2 E TO PRODUCTION Start 1 NO alternate action pushbutton wired to I1 Start 2 NO alternate action pushbutton wired to I2 E Stop NC alternate action emergency pushbutton wired to 13 Pump A Wired to QO Pump B Wired to Q1 4 BASIC PROGRAMM
92. TION 9 ADVANCED INSTRUCTIONS INTRODUCTIONS 9 12 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Step 2 Enter a WMOV Instruction on Rung 1 S To enter a WMOYV instruction 1 Click the WMOV icon 5 2 2 Click on Column 2 of Rung 1 The Word Move dialog box displays The completed dialog box should look like this Tag Name I pes Allocation froooo Tag Name 16 s pis mis to Comment 3 The Word Move option in the Type field is selected by default 4 In both the Tag Name and Allocation Number fields enter 10 for ispS and for D 5 In the Tag Name Comments field enter 16 bit Input Reg ister for ispS and Moved to 40 in D 6 Click OK 9 ADVANCED INSTRUCTIONS INTRODUCTION 2001 4 6 WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 9 13 Step 3 Enter a WMOV Instruction on Rung 2 S To enter a WMOYV instruction 1 Click the WMOV icon sl 2 Click on Column 2 of Rung 2 The Word Move dialog box displays The completed dialog box should look like this ispS D Tag Name J oe Allocation poooo TaN Nore Movet to 16 3 The Word Move option in the Type field is selected by default 4 both the Tag Name and Allocation Number fields enter DO for ispS and Q0 for D 5 In the Tag Name Comments field enter Moved to 40 for ispS and 16 Bit Output Register in D 6 Click OK 2001 IDEC CORPORATI
93. Type Tag Name mm gt Normally Open Allocation C Normally Closed Number Name 430 is On Comment 7 AM N 3 Enter M30 in the Tag Name and Allocation Number fields 4 Enter M30 is On if D96 7 AM in the Tag Name Comment field 5 Click OK The M0030 contact displays on Rung 5 13 CALENDAR CLOCK INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 13 17 Step 11 Enter a Reset Instruction on Rung 5 To enter a Reset instruction 1 Click the Reset reo icon 2 Click on Column 3 of Rung 5 The Reset dialog box displays Reset C Output Allocation C Output Not Number 10000 C Set Tag Name freezer Reset Comment loff sunday N 7 AM and On Monday 7 AM 3 Click the Reset option in the Type field 3 Enter QO in the Tag Name and Allocation Number fields 4 Enter Freezer Off Sunday 7 AM and On Monday 7 AM in the Tag Name Comment field 5 Click OK The Reset contact displays at the end of Rung 5 2001 IDEC CORPORATION 13 CALENDAR CLOCK INSTRUCTIONS 13 18 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Step 12 Enter an NO Contact on Rung 6 S To enter an NO contact 1 Click the Normally Open icon 2 Click on Column 1 of Rung 6 The Normally Open dialog box displays Normally Open ies Tes Nane TET Normally Open Allocati
94. UCTIONS 13 25 This example is demonstrates operation aborted on special days The output is turned on from 8 45 a m to 10 32 p m on every Monday through Friday but is not turned on December 31 through January 3 and May 3 through May 5 WKTBL 51 2 53 54 55 56 D7 1231 101 102 103 503 504 505 M8125 WKCMP SI S22 S38 DI ON 62 845 2 00 WKCMP 51 OFF 62 52 2232 S3 DI 2 00 WKTBL designates Dec 31 to Jan 3 and May 3 to May 5 as special days S1 62 specifies Monday to Friday S3 2 skips special days WKCMP ON turns on output QO at 8 45 on every Monday through Friday except on special days The WKCMP OFF turns off output QO at 22 32 on the same days Setting Calendar Clock Using WindLDR Before using the week programmer instructions for the first time the internal calendar clock must be set using WindLDR or executing a user program to transfer correct calendar clock data to special data registers allocated to the calendar clock Once the calendar clock data is stored the data is held by the backup bat tery while the CPU power is turned off 2001 IDEC CORPORATION 13 CALENDAR CLOCK INSTRUCTIONS 13 26 ADVANCED INSTRUCTIONS To Set the Calendar Clock 1 WINDLDR TUTORIAL Select Online from the WindLDR menu bar then select Moni tor The screen display changes to the monitor window From the Online menu select PLC Status The OpenNet PLC Status
95. UN function 28 the date and time are maintained If control data registers D95 D98 are enabled using FUNI0 the day of the week hour minute and second data can be read out to these data registers when the Micro or Micro C PLC is running or stopped For a detailed description of FUN28 and FUNI0 please refer to the user s man ual included with your PLC 2001 IDEC CORPORATION 13 CALENDAR CLOCK INSTRUCTIONS 13 2 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Calendar Read CALR CALR When input is on the calendar data year month day and day of week is read to four data registers starting with the designated operand D Year 0 to 99 D 1 Month 1 to 12 D 2 Day 1 to 31 D 3 Day of week 0 to 6 assigned as follows 0 1 2 3 4 5 6 Sunday Monday Tuesday Wednesday Thursday Friday Saturday Example CALR CALR 10 D30 When input 10 is on calendar data is read to data registers D30 D33 D30 Year D31 Month D32 Day D33 Day of the week 13 CALENDAR CLOCK INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 13 3 Clock Read CLKR When input is on the clock data hour minute and second is read to three data registers starting with the designated operand D Hour 0 to 23 D 1 Minute 0 to 59 D 2 Second 0 to 59 Example CLKR CLKR 2 D50 When input I2 is on clock data is read to data regist
96. UTORIAL Assignment Codes CLKST drS D10 0 12 DIO 0 drS Assignment Code 0 D10 99 drS 1 Year 0 99 011 2 drS 2 Month 1 12 D10 27 drS 3 Day 1 31 D11 4 drS 4 Day of Week 0 6 D12 5 drS 5 Hour 0 23 DI1 3 4 5 6 Minute 0 59 D12 112 drS 7 Second 0 59 Days of Week 0 1 2 3 4 5 6 Sunday Monday Tuesday Wednesday Thursday Friday Saturday Using the programming shown below the CPU clock is set according to the assignment code stored in data register D10 Each of the three possible assign ment codes is demonstrated with date and time values stored in the appropriate quantity of data registers The SOT instruction is used to execute the CLKST instruction only when input I2 turns on NOTE Additional programming is required to store the desired values in the appropri ate data registers before executing the CLKST instruction 13 CALENDAR CLOCK INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 13 33 If a zero is stored in the data register designated by drS then the next seven data registers must be preset with the appropriate values to assign the date and time The first block of data registers shown on the left is used to set Saturday Febru ary 27 1999 3 33 45 NOTE If the date or time is not w
97. VANCED INSTRUCTIONS 13 9 Step 3 Enter a Calendar Read Instruction on Rung 1 To enter a calendar read instruction 1 Click the Clock Calendar icon 2 Click on Column 2 of Rung 1 The Clock Read CLKR dialog box displays Calendar Read Type Tag Name Calendar Read Allocation Calendar Write Number 00090 C Clock Read Tag p99 Year Clock Write Comment D91 Month s 092 Day 3 Click Calendar Read in the Type field of the dialog box 4 Enter D90 in the Tag Name and Allocation Number fields 5 In the Tag Name Comment field enter D90 Year D91 Month D92 Day 6 Click OK The calendar read instruction displays at the end of Rung 1 2001 IDEC CORPORATION 13 CALENDAR CLOCK INSTRUCTIONS 13 10 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Step 4 Create a Second Line for Rung 1 To create a second line for Rung 1 1 Click the Draw Line icon 2 Click the crossbar to the right of the AlwaysOn contact on Rung 1 and drag the pointer down to the corresponding crossbar on Rung 2 A line connecting Line 1 with Line 2 displays 13 CALENDAR CLOCK INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 13 11 Step 5 Enter a Clock Read Instruction on Line 2 S To enter a clock read instruction 1 Click the Clock Calendar icon 2 Click on the last column of Line 2 The Clock Read CLKR dialog box displays
98. When an input is on the data designated by S1 and S2 are compared If the condition is met the output or internal relay designated by oir goes on If not it goes off 2001 IDEC CORPORATION 10 ARITHMETIC COMPARISON INSTRUCTIONS 10 26 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Word Equal To WEQ F147 F 47 F 47 F 47 IZ 130 RHEE RHEE RHEE P wo 3 g s Symbol WEQ 51 52 51 52 oir set on The WEQ instruction identifies an equivalent relationship Both data to be compared can be designated and the result can be an output or an internal relay When an input is on the data designated by S1 and S2 are compared If the condition is met the output or internal relay designated by oir goes on If not it goes off 1O ARITHMETIC COMPARISON INSTRUCTIONS 2001 1 WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 10 27 Exercise 12 Creating an FA Series Advanced Instruction Program The binary arithmetic ADD SUB MUL and DIV can be used to manipulate data in the FA series PLC and use the comparison instruction to execute a specific task Complete the following steps to create an advanced instruction program for the FA series PLC When completed your program screen should look like this IW WindLDR 2 11 C WINDLDR FA ARITH File Edit View Configure Compile Online Window Help aal riae 21 3 This program shows the FA series instructions used to execut
99. a new instruction and includes a programming exercise using that instruction Before you begin this tutorial you must first complete the following steps Installing WindLDR The WindLDR software is supplied on a CD and is accessed from the PC after installing the files onto the hard disk When copying the software files to the PC the application creates a directory in which the files will reside The WindLDR destination directory name is configurable but defaults to WindLDR This directory holds all of the executable files 3 To install the WindLDR software 1 Insert the installation CD into the PC s CD Rom drive 2 In Windows 95 98 2000 and NT4 0 click the Start gt Run from the task bar 3 Enter D setup exe in the Run dialog box The D indicates the CD drive Your PC s CD drive may be designated by another letter 2001 IDEC CORPORATION 3 GETTING STARTED 3 2 WINDLDR TUTORIAL A series of screens displays to walk you through the installation process 4 When prompted for the destination directory you can use the default directory C Program Files IDEC WindLDR or enter another destination directory for the installation files Starting WindLDR When you install WindLDR use Windows Explorer to create an icon for WindLDR on the PC screen To start WindLDR double click the WindLDR icon The WindLDR screen displays Menu Commands To olb ar P File Edt View Configure Compile Onine Window
100. as shown After conversion incoming data is stored in data regis ters D19 and D20 as shown 4 RD DA Cr drS D pis R pi D D17 D18 Cn D19 ASCH 2 Digits D20 HEIBIBI ASCH 4 Digits o Sa re Desired Character Hexadecimal Decimal Values Set to Data Alpha or Numeric Character Code Character Code Registers in Advance R 52 82 D 44 68 23 35 Cn OD 13 2001 IDEC CORPORATION 14 TRANSMIT RECEIVE INSTRUCTIONS 14 30 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Example Serial Receiving In the ladder diagram above five data blocks are specified in the SRXEX instruc tion The incoming data is compared or converted according to the values assigned to K1 through K5 Data Comparison Data Conversion First Block D15 82 Dis Third Block econ oc Fifth Block 13 K 302 D 19 ee ee 0000 018 1 5 ourt oc amp 204 D D20 78 as The data registers corresponding to dr S D are shown For comparison dr S D is shown as S for source For conversion dr S D is shown as D for destination Example Bar Code Reading with FIFO File In this example serial receiving is used to accept bar code data from a scanner decoder This data is then combined with first in first out FIFO data files and data search instructions to devise a security system The bar code data m
101. ate The second line is the pulse input The counter will incre ment its accumulated value every time the pulse line makes the transition from OFF to ON NOTE The reset line must be OFF to begin counting The accumulated value of the counter only increments once each time the pulse line turns ON Dual Pulse Type Reversible Counter The dual pulse counter has three lines of logic to control its operation The top line is for the control of the counter s preset operation When this line turns ON the value assigned to the counter s preset is loaded NOT 0 As with the up counters this input must be in the OFF state for the counter to count The sec 6 COUNTER INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTION 6 5 ond line is for the UP pulses and the third line is for the DOWN pulses If both the up and down pulses turn ON simultaneously the dual pulse counter will not count When the counted value reaches 0 the output will turn ON Ladder Diagram of Preset Input Reversible Counter 10 QO Up Down Selection Type Reversible Counter The up down selection counter looks similar to the dual pulse counter but there is a major difference There is only one line for the input pulses The third line of logic controls the direction of the count up or down When the up down selec tion line is ON the counter counts up when it is off the counter counts down Again the top line loads the counter
102. ated number are processed as source or destination data When a word operand such as a timer or counter is designated as a source operand the current value is read as a source data When a timer or counter is designated as the destination operand the result of the advanced instruction is set to the preset value for the timer or counter When a data register is designated as a source or destination operand the data is read from or written to the designated data register Using a Timer or Counter as the Source Operand Since all timer instructions subtract from the preset value the current value is decremented from the preset value and indicates the remaining time As described above when a timer is designated as the source operand of an advanced instruction the current value or the remaining time of the timer is read as the source data Reversible counters start counting at the preset value and the current value is incremented or decremented from the preset value Adding counters start count ing at 0 and the current value is incremented up to the preset value When any counter is designated as the source operand of an advanced instruction the cur rent value is read as the source data 2001 IDEC CORPORATION 9 ADVANCED INSTRUCTIONS INTRODUCTIONS 9 4 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Using a Timer or Counter as the Destination Operand As described above when a timer or counter is designated as the destination o
103. but hold unknown val ues before executing a user program Calendar Clock Special Data Registers Data Register No Data Value Read Write Updated D8008 Year current data 0 to 99 D8009 Month current data 1 to 12 100 msec or D8010 Day current data 1to31 D8011 Day of week current data 0 to 6 Note Read only time D8012 Hour current data 0 to 23 which ever is D8013 Minute current data 0 to 59 larger D8014 Second current data 0 to 59 2001 IDEC CORPORATION 13 CALENDAR CLOCK INSTRUCTIONS 13 28 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Data Register No Data Value Read Write Updated D8015 Year new data O to 99 D8016 Month new data 1 to 12 D8017 Day new data 1to31 D8018 Day of week new data Oto 6 Note Write only quem D8019 Hour new data O to 23 D8020 Minute new data O to 59 D8021 Second new data O to 59 Note The day of week value is assigned for both current and new data as follows 0 1 2 3 4 5 6 Sunday Monday Tuesday Wednesday Thursday Friday Saturday 13 CALENDAR CLOCK INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 13 29 Example Setting Calendar Clock Data This example demonstrates how to set calendar clock data using a ladder pro gram After storing new calendar clock data into data r
104. c instructions 10 1 clock function 13 35 counter table 6 3 counters 6 2 data move 9 1 input allocation table 9 5 single output down SOTD 8 1 8 2 single output up SOTU 8 1 8 2 timers 5 5 transmit TXD instructions 14 1 monitor PLC status 4 14 monitoring a program 4 13 move MOV instructions repeat operation 13 4 13 5 move instruction 9 1 multiple load out program creating 4 26 multiple start stop program creating 4 20 INDEX VI WINDLDR TUTORIAL naming a program 4 8 NC dialog box 5 18 Normally Closed dialog box 5 18 normally closed NC contact 4 1 conventions 4 18 inputs 4 19 normally open NO contact 4 1 conventions 4 18 dialog box 4 5 entering in a program 4 4 4 5 0 ONC binary arithmetic instructions 10 1 clock and calendar 13 20 comparison instructins 10 7 counter table 6 3 counters 6 2 data move 9 1 Function Area and Communications Settings dialog boxes 3 10 input allocation table 9 5 real time clock and calendar 13 20 single output down SOTD instructions 8 1 single output up SOTU instructions 8 1 timers 5 4 transmit TXD instructions 14 1 1 msec timedown timer TMS 5 3 100 msec timedown timer TIM 5 3 INDEX 2001 IDEC CORPORATION On Line Help 4 7 4 8 4 9 4 24 4 25 4 26 on line help accessing 1 3 on line monitoring 4 13 Online option 4 14 opcode See also advanced instructions structure of 9 1 operands destination 9 2 9 3 source 9 2 9 3 word 9 3 optical
105. ck of data is not processed no matter how dr S D is specified When K equals 100 a certain quantity of characters is not processed as specified by dr S D When K equals 1 to 99 or 1000 to 1255 the block is a comparison If K equals 1 to 99 the quantity of source data registers is specified starting with dr S D to be compared with incoming data If K equals 1000 to 1255 the incoming data 2001 IDEC CORPORATION 14 TRANSMIT RECEIVE INSTRUCTIONS 14 26 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL is compared with values of existing records in the corresponding data file zero to 255 starting with the record dr S D The quantity of data file records to be compared is specified by the next data register dr S D 1 When K equals 201 to 204 301 to 304 or 401 to 404 the block is a conversion K specifies the kind of conversion 20x 30x or 40x with x as the quantity of digits or source data registers Destination data register for the converted value is designated by dr S D NOTE With comparison or conversion incoming data is taken sequentially from data registers starting with dr S 1 corresponding to blocks to K The first data register dr S in the SRXEX instruction stores the quantity of bytes for the incoming message The output or internal relay designated by oir turns on when the comparison is true or when no comparison block exists in the SRXEX instruction When the comparison is false oir turns o
106. cking the and P buttons 2001 IDEC CORPORATION 4 BASIC PROGRAMMING INSTRUCTIONS 4 16 BASIC INSTRUCTIONS WINDLDR TUTORIAL 3 Communication Error To view a communication error 1 Click Online gt Monitor from the Menu Commands toolbar 2 Click Online gt Communication Error from the Menu Com mands toolbar Communication Error OH oj FR 0 BR TX 0 OT NG Codes Valid Send Request 0 Illegal 0 Invalid Send Request 0 RAW Protected 0 Echo back mismatch 0 Data Overrun 0 Timeout on char send 9j Force Buffer Full 0 Echo back timeout 0 Force Search Fail 0 Timeout on char recy 1 Receive Error 0 Timeout reply recy 1 Program Size Error 0 PLC reply code invalid 1 Write During Run 0 check BCC mismatch 0 Rom Pack Write 0 Unable to open COM Port 1 Read Write 0 Unable to select device 0 CRC Eror 0 PLC Returned NG Code 0 Overtime Framing 0 NG Codes M3 Generic Expansion Unit Error p Bio ae y Protect Error g atc 0 Protect Code Error 0 8 TIM CNT Preset Error 0 Vires rs 0 Clock Data Error E oz ES 9 Other Clear 4 BASIC PROGRAMMING INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTIONS 4 17 4 Point Write l
107. clock read CLKR instructions 13 1 13 3 entering in a program 13 11 ladder logic example 13 3 uses for 13 1 clock write CLKW instructions 13 1 closing a program 4 10 CNT 6 1 INDEX II WINDLDR TUTORIAL Coil Selection Dialog box 3 3 communication error 4 16 communication port configuring 4 11 communication settings 3 8 Communication Settings dialog box 4 11 comparison instructions compare equal to CMP 10 7 compare greater than 10 9 compare greater than or equal to CMP2 10 10 compare less than CMP 10 8 compare less than or equal to CMP lt 10 9 compare not equal to CMP 10 8 interval compare greater than or equal to ICMP2 10 10 uses for 10 7 programs creating 10 12 10 27 Comparison dialog box 11 7 Configuration dialog box 3 5 configure PLC function communication settings 3 8 Constant Character dialog box 14 14 14 16 counter comparisons 6 6 CC uses for 6 6 gt uses for 6 6 dialog box 6 15 errors ERR1 6 6 instructions entering in a INDEX 2001 IDEC CORPORATION program 6 15 programs creating 6 8 6 17 counter tables 6 3 counters 6 1 designating as the destination operand 9 4 designating as the source operand 9 3 dialog box 6 11 instructions entering in a program 6 11 6 12 Micro 1 adding up counters 6 4 dual pulse reversible counter 6 4 6 5 up down selection reversible counter 6 5 preset value designated using a data register 9 4 preset values 9 4 programs
108. creating 6 8 6 17 reversible vs adding 6 1 uses for 6 1 CPU central processing unit See also PLC components 2 3 create line 3 4 Cross Reference 4 9 D data entry instructions 1 2 data move 9 1 data registers designating as source or destination operand 9 3 2001 4 6 INDEX WINDLDR TUTORIAL INDEX transmit receive 14 5 defining ladder logic input conditions 2 8 delete line 3 4 deleting columns 3 4 instructions 3 4 ladder lines 3 4 rungs 3 4 destination operand See also advanced instructions structure of 9 2 9 3 dialog boxes Analog Read 0 ANRO 11 6 Clock Calendar Read 13 9 Coil Selection 3 3 Communication Settings 4 11 Configuration 3 5 Constant Character 14 14 14 16 Counter CNT 6 11 Counter Comparison 6 15 Download 4 12 Function Area Settings 3 8 Ladder Preferences 3 12 NC 5 18 Normally Open LOD 4 5 Output OUT 4 6 PLC Selection 3 5 Reset RST 7 9 Rung Comment 4 7 Set SET 7 6 Timer TIM 5 11 Timer TML 5 19 Transmit Receive TXD RXD 14 14 Variable Data Register 14 15 Download Dialog box 4 12 downloading programs to a PLC See also transferring programs to a PLC 4 12 draw line 3 4 drawing ladder lines 4 23 dual pulse reversible counters Micro 1 6 4 6 5 Electrically Erasable Read Only Memory EEPROM 2 3 ENTER key 1 2 entering instructions in the PLC See also programming device 2 3 errors ERR1 counter c
109. d Your completed dialog box should look like this Tag Name 7 Output C Output Not Set imen 0 gt 3 C Reset Comment 9 is on 6 Click the OK button or press the ENTER key to confirm The Q0003 output coil displays at the end of Rung 3 2001 IDEC CORPORATION 5 TIMER INSTRUCTIONS 5 24 BASIC INSTRUCTIONS WINDLDR TUTORIAL Step 8 Save the Program gt To name and save this program 1 Click File gt Save as from the Menu Commands toolbar The Save As dialog box displays 2 Enter TIMCOMP in File Name field of the dialog box 3 Click OK or press ENTER to confirm Step 9 Print Transfer and Monitor the Program To print this program please refer to page 4 9 To transfer this program refer to page 4 12 To monitor this program refer to page 4 13 5 TIMER INSTRUCTIONS 2001 IDEC CORPORATION 6 COUNTER INSTRUCTIONS Introduction to Counters CNT Counters like the name implies count pulses These pulses are usually made in response to an object passing by a sensor that turns the input ON and then back OFF Pulses can represent bottles cans parts or the number of times a process operation has been performed Counters can count up down or in some instances in both directions Applications for counters are almost unlimited IDEC PLCs have three types of counters adding up counters dual pulse reversible counters and up down selectio
110. d the user s manual specific to your PLC will be your primary reference guides This tutorial provides the basics to get you up and running You will accomplish the following tasks by completing the exercises in this manual e Create edit ladder logic programs using WindLDR s easy to use program editing features Print your ladder logic programs for hardcopy review e Download programs to your PLC and monitor their operation Monitor the program for testing and troubleshooting purposes Document Conventions This tutorial is divided into two sections basic and advanced instructions Basic instructions are discussed in Chapters 4 through 8 Advanced instructions are discussed in Chapters 9 through 15 2001 IDEC CORPORATION 1 INTRODUCTION 1 2 WINDLDR TUTORIAL Basic instructions are applicable to all PLC types However differing advanced instructions are applicable to each of the Micro FA series ONC series and MicroSmart PLCs Unless otherwise noted at the beginning of each chapter instructions are applicable for all PLC series Please refer to the user s manual that accompanied your PLC for a more detailed explanation of the basic and advanced instructions The following conventions are applicable to this manual Action items are denoted by the following arrow graphic 3 This symbol appears before each set of instructions Follow these steps to easily complete each lesson Action
111. e 1 and drag the pointer down to the corresponding cross bar on Line 2 A line connecting Line 1 with Line 2 displays 4 BASIC PROGRAMMING INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTIONS 4 25 3 Click the Output icon 4 Click in the last column of Line 2 The Output OUT dialog box displays 5 Enter Pump B in the Tag Name field of the dialog box 6 Enter Q1 in the Allocation Number field of the dialog box 7 Enter Pump B is wired to Q1 in the Tag Name Comment field Your completed dialog box should look like this Output Type Tag Name 7 Output Output Not Set Tag is Reset Comment 4 to 01 00001 8 Click the OK button or press the ENTER key to confirm The Pump B output coil displays at the end of Line 2 2001 IDEC CORPORATION 4 BASIC PROGRAMMING INSTRUCTIONS 4 26 BASIC INSTRUCTIONS WINDLDR TUTORIAL Step 5 Enter a Rung Comment To enter a rung comment 1 Click anywhere on Line 1 or 2 2 Click Edit gt Edit Rung comment from the Menu 772 Commands toolbar or click the Rung comment s icon The Rung Comment Dialog screen displays 3 Delete the existing comments in the dialog screen and enter This program shows a Normally Open contact I1 turnin on an Output QO of Pump and Q1 of Pump B Since the E Stop Switch is an external NC contact User must determine when it is off NC contact is open
112. e a simple task The 100msec timer times out every 3 Minutes rests itself and times again 3 Min Timer Auto Reset The TADD instruction adds the current value of 10 to 500 and stores the result in D20 Always On 3 constant TO 500 Contact Auto Reset value 500 into D20 10317 The WGE is Word Equal instruction constantly compares d20 to 1000 when a match happens Q1 will come On Always On TO 500 Constant Q1 comes On Contact into D20 value 1000 if D10 1000 M0317 Current value of Timer 10 will be captured and stored in 210 when the Match occurs 01 comes On 3 Store Current if D10 1000 Auto Reset T0 Value 35 CP11T COMI 000 01 000 00 Word Block Move WBMOV Instruction 2001 IDEC CORPORATION 10 ARITHMETIC COMPARISON INSTRUCTIONS 10 28 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Step 1 Create the Basic Program Logic Open and Closed Contacts Tag Names and Comments as Illustrated in Exercises 1 8 1 Click the New icon ni to open a new file Step 2 Enter a 100 msec Timer on Rung 1 To enter an 100 msec timer 1 Click the Timer 2 Click on Column 2 of Rung 1 The 100 msec Timer dialog box displays The completed dialog box should look like this 100 Timer Type Tag Name i Allocation Number rene Preset om Value 100 msec Timer Tag Name 3 Min Timer Comment fiuto Reset 3
113. ecial data registers dedicated to the calendar and clock and to turn on special internal relay M8016 M8017 or M8020 Data registers D8015 through D8021 do not hold the current values of the calendar clock data but hold unknown values exe cuting a user program Data idi Data Value Read Write Updated D8008 Year current data 0 to 99 D8009 Month current data 1 to 12 D8010 Day current data 1 to 31 500 msec or D8011 Day of week current data 0 to 6 Note Read only D8012 Hour current data 0 to 23 larger D8013 Minute current data 0 to 59 D8014 Second current data 0 to 59 D8015 Year new data 0 to 99 D8016 Month new data 1 to 12 D8017 Day new data 1 to 31 D8018 Day of week new data 0 to 6 Note Write only Not updated D8019 Hour new data 0 to 23 D8020 Minute new data 0 to 59 D8021 Second new data 0 to 59 Note The day of week value is assigned for both current and new data as follows 0 1 2 3 4 5 6 Sunday Monday Tuesday Wednesday Thursday Friday Saturday 2001 IDEC CORPORATION 13 CALENDAR CLOCK INSTRUCTIONS 13 38 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Example Setting Calendar Clock Data This example demonstrates how to set calendar clock data using a ladder pro gram After storing new calendar clock data into data registers D8015 through D8021 special internal relay M8
114. edence over execution on normal days 2001 IDEC CORPORATION 13 CALENDAR CLOCK INSTRUCTIONS 13 24 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL This example demonstrates operation on special days in addition to regular weekends The output is turned on from 10 18 a m to 11 03 p m on every Sat urday and Sunday Without regard to the day of week the output is also turned on December 31 through January 3 and May 3 through May 5 WKIBL 51 52 53 54 55 56 D7 M8125 1231 101 102 103 503 504 505 WKCMP 651 S2 S3 DI ON 65 1018 1 00 WKCMP 51 OFF 65 DI 00 52 53 2303 1 WKTBL designates Dec 31 to Jan 3 and May 3 to May 5 as special days 51 65 specifies Saturday and Sunday S3 1 adds special days WKCMP ON turns on output QO at 10 18 on every Saturday Sunday and special days The WKCMP OFF turns off output QO at 23 03 on the same days With Skip Days in the Week Table S3 2 On the special days programmed in the WKTBL the designated output is not turned on or off while the designated output is turned on and off every week as designated by operand S1 of WKCMP In normal execution when the current day and time coincide with the preset day S1 and time S2 the designated output is turned on or off Execution on the special days has precedence over execution on normal days 13 CALENDAR CLOCK INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTR
115. egisters D8015 through D8021 special internal relay M8020 calendar clock data write flag must be turned on to set the new calendar clock data to the CPU NSET W S1 52 53 54 55 56 S7 DI M8120 99 4 1 4 10 30 0 DO MOV W SIR DIR REP D8015 4 O 0 MOV W SIR DIR REP D4 D8019 3 MI MO M8020 MI MOV W SIR DIR REP M8125 D8008 D10 7 M8120 is the initialize pulse special internal relay 2001 IDEC CORPORATION 13 CALENDAR CLOCK INSTRUCTIONS 13 30 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL When the CPU starts the NSET moves calendar clock data to data registers DO through D6 When input 10 turns on new calendar data year month day and day of week are moved to data registers D8015 through D8018 and internal relay MO is turned on for 1 scan time When input I1 turns on new clock data hour minute and second are moved to data registers D8019 through D8021 and internal relay M1 is turned on for 1 scan time When either MO or M1 is turned on calendar clock data write flag special inter nal relay M8020 is turned on to set the new calendar clock data to the CPU M8125 is the in operation output special internal relay While the CPU is running the MOV W moves current calendar clock data to data registers D10 through D16 Real Time Clock and Calendar FA3S CP11T The FA3S series CPU with real time clock and calendar PF3S CP11T features five instructions used for pro
116. equal that of the operand designated by D 9 ADVANCED INSTRUCTIONS INTRODUCTION 2001 WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 9 11 Exercise 10 Creating a Data Move Program FA series In this exercise you will use the data move instruction WMOV to move the input register into DO This instruction moves all 16 bit I0 I7 and 110 117 into DO Follow the steps below to create a MOV program When completed your program screen should look like this W WindLDR 2 11w C WINDLDR WMOV u File Edi View Configure Compile Online Window Help sole e o salas e n oo a aa in eden S Ale Ha Oe s es nde This program shows a WMOV instruction being used to move the input register 10 17 and I10 I17 gt to Data Register 0 When 10 I1 I2 Come On then Q0 01 Q2 will be energized respectively Always On 16 bit Input Contact M0317 10000 D0000 Always On 16 Bit Output Contact M0317 D0000 00000 00 Conversion to mnemonics succeeded Code file created NOTE The MOV instruction can be used to move constants data registers inputs outputs timers counters and internal relays Step 1 Create the Basic Program Logic Open Contacts Tag Names and Comments as Illustrated in Exer cises 1 8 1 Click the New icon nj to open a new file 2001 IDEC CORPORA
117. ers 050 052 D50 Hour 0 to 23 D51 Minute 0 to 59 D52 Second 0 to 59 2001 IDEC CORPORATION 13 CALENDAR CLOCK INSTRUCTIONS 13 4 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Valid Operands Standard Processing In the high speed processing mode data registers for this instruction are limited to 00 031 Since the CALR and CLKR instructions are executed in each scan while the input is on a pulse input from an SOTU or SOTD instruction should be used as required Operand Function Q M T C R D Constant Repeat 0 99 Destination to Micro read the calen dar clock data 0 498 Micro C Repeat Operation in the Move Instruction When the source S1 is designated with a repeat as many operands as repeat cycles starting with the operand designated by S1 are moved to the destination As a result only the last of the source operands is moved to the destination MOV SIR DI REP D D10 D20 3 Source Repeat 3 Destination Repeat 0 D10O 110 D20 112 D11 m mi DI2 112 D22 13 CALENDAR CLOCK INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 13 5 When the destination D1 is designated with a repeat the source operand desig nated with S1 is moved to as many destination operands as repeat cycles starting with the destination designated by D1 MOV 51 DIR REP B DI0
118. ess the ENTER key to confirm Step 8 Print Transfer and Monitor the Program To print this program please refer to page 4 9 To transfer this program refer to page 4 12 To monitor this program refer to page 4 13 8 SINGLE OUTPUT INSTRUCTIONS 2001 9 ADVANCED INSTRUCTIONS INTRODUCTION NOTE There is no move instruction for IDEC s Micro 1 PLC Data Move Micro Micro C ONC and MicroSmart Data of different forms can be moved in a PLC with the use of an instruction such as MOV move MOVN move not IMOV indirect move IMOVN indirect move not BMOV batch move or WMOV word move This data can be digital or bit operand represented in 16 or 32 bit registers Source Operand Destination Operand Repeat Cycles MOV SIR DIR E Repeat Designation Structure of an Advanced Instruction Repeat Designation Specifies whether repeat is used for the operand or not Repeat Cycles Specifies the quantity of repeat cycles 1 31 Micro and Micro C and 1 99 ONC and Microsmart Opcode The opcode is a symbol to identify the advanced instruction 2001 IDEC CORPORATION 9 ADVANCED INSTRUCTIONS INTRODUCTION 9 2 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Source Operand The source operand specifies the 16 bit Micro Micro C and MicroSmart or 16 or 32 bit ONC word data to be processed by the advanced instruction Some advanced i
119. essful a dialog box displays confirming the download If the download is unsuccessful an error message dialog box displays 4 BASIC PROGRAMMING INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTIONS 4 13 Monitoring a Program On line monitoring allows you to monitor or view the programmed ladder logic instructions Monitoring allows you to watch inputs and outputs turn on and off and to view the operation of timers counters and other operands To monitor your START 1 program Click Online Monitor from the Menu Commands toolbar Notice that the toolbar icons disappear and the monitor screen displays If the input is powered ON energized a red highlight displays in both the NO contact and the output If the input is OFF the red highlight disappears from both the NO contact and the output W WindLDR 2 11w C WINDLDR START1 File Edit View Configure Comoe Online Window Help red highlight displays within the NO contact and output symbols when the input is powered on Wired to QO Start 1 01 00002 NOTE To exit the monitor screen click Online 3 Monitor again 2001 IDEC CORPORATION 4 BASIC PROGRAMMING INSTRUCTIONS 4 14 BASIC INSTRUCTIONS WINDLDR TUTORIAL Online The online option offers you many features which allow for powerful monitoring and manipulating of the program These features are 1 PLC Status To monitor PLC status 1 Click O
120. esti nation operand D1 is turned on When the condition is not met D1 is turned off H CMP S1 R S2 R DIR RE 51 lt 52 10 ARITHMETIC COMPARISON INSTRUCTIONS 2001 1 WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 10 9 Compare Greater Than CMP gt When an input is on the 16 bit Micro Micro C and MicroSmart or 16 or 32 bit ONC word data designated by source operands S1 and S2 are compared When S1 data is greater than S2 data the H CMP gt SIR 52 8 DIR REPH 21 gt 52 Dion destination operand D1 is turned on When the condi tion is not met D1 is turned A Compare Less Than or Equal To CMP 51 lt S2 D1 on When an input is on the 16 bit Micro Micro C and MicroSmart or 16 or 32 bit ONC word data designated by source operands S1 and S2 are compared When S1 data is less than or equal to S2 data the destination operand D1 is turned on When the condition is not met D1 is turned aff H CMP lt S1 R S2 R DI R REP 2001 IDEC CORPORATION 10 ARITHMETIC COMPARISON INSTRUCTIONS 10 10 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Compare Greater Than or Equal To CMP CMP gt SIR 528 DIR RE StS 2c kon When an input Is on the 16 bit Micro Micro C and MicroSmart or 16 or 32 bit ONC word data designated b
121. f this tutorial choose the default func tion settings To configure the function settings 1 Click Configure gt Function area settings from the Menu Commands toolbar 2 The Function Area Settings dialog box displays 3 Click the Default button for every selection to accept it Other wise perform the necessary changes and click OK 4 Click the OK button or press the ENTER key to confirm NOTE The Function Area Setting dialog box for the ONC differs from the dialog box for the Micro FA series and MicroSmart as shown on the following page Please refer to the user s manual included with your PLC for a detailed explanation of function settings Stop Input field in the Function Setting window allows you to physically bring your PLC to the stop or run mode with a designated input switch 3 GETTING STARTED 2001 IDEC CORPORATION WINDLDR TUTORIAL 3 9 Micro 1 Function Area Setting Run Stop Keep External Function Communication Communication Settings x Communication Port Settings BaudRate 7 Data Length 8 2 Cancel Parity Even n Default Stop Bits 1 Hell Port COM1 PLC Network Settings 11 C XN Device No 000 Reset Input Cancel Default List Help Micro 3C Function Area Setting Keep Processing Mode Catc
122. fer to page 4 9 To transfer this program refer to page 4 12 To monitor this program refer to page 4 13 IW WindLDR 2 11 C WINDLDR COUNTERS LDR File Edit View Configure mole Online Window Help Pump is Wired to Q0 Pum B is Wired to Q1 COMT 000 j mre TR Conversion to mnemonics succeeded Code file created OpenNet 6 COUNTER INSTRUCTIONS 2001 IDEC CORPORATION 7 SET RESET INSTRUCTIONS SET and RST Reset The SET and RST instructions are used to set on or reset off outputs inter nal relays and shift register bits The SET and RST instructions require one address which must be selected from the appropriate operand numbers The same output can be set and reset many times within a program SET and RST instructions operate in every scan while the input is on Ladder Diagram Timing Chart 5 00 10 57 00 The SET command is a Latch command The RST command is an Unlatch command 2001 IDEC CORPORATION 7 SET RESET INSTRUCTIONS 7 2 BASIC INSTRUCTIONS WINDLDR TUTORIAL Exercise 6 Creating a Set Reset Program In Exercise 1 you learned how to turn on off an output using the LOD and OUT instructions In this exercise you will use the SET and RST instructions to create a latch unlatch program The figure below illustrates a latch unlatch scenario in which an NO pushbutton is used to latch SET a pump A NO pushbutton is u
123. ff Designating Data Comparison or Conversion In the SRXEX instruction the operand designated by c NBLK designates the quantity of data blocks to be compared or converted 1 to 255 Each block of data is represented by a value for K and a corresponding operand dr S D The value for K determines the operation and the quantity of data registers or data file records to be operated on as K 0 Block of data is not processed no matter how dr S d is specified 1 to 99 Data is compared to K data registers starting with dr S D K 100 Certain characters of data are not processed as specified by dr S D 14 TRANSMIT RECEIVE INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 14 27 201 to 204 Data is converted to BCD 1 to 4 digits stored in dr S D K 301 to 304 Data is converted to hexadecimal ASCH 1 to 4 digits stored in dr S D K 401 to 404 Data is converted to hexadecimal pseudo ASCII 1 to 4 digits stored n dr S D K 1000 to 1255 Data is compared to data file K 1000 starting with record dr S D the quantity of data file records to be compared is specified by dr S D 1 User Defined Communication Mode UDCMS iir Designate whether or not user defined communication is allowed The FA3S will operate in the standard or the user defined communication mode There are two additional switches which designate user defined communication The first is the
124. field of the dialog box 5 Enter Pump A is Wired to QO in the Tag Name Comment field Your completed dialog box should look like this Tag Name 00000 Tag pup is Comment Wired to 00 6 Click the OK button or press the ENTER key to confirm The Pump A output coil displays at the end of Rung 2 6 COUNTER INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTION 6 17 Steps 8 and 9 Enter a Counter Comparison and the gt Pump Output Coil on Rung 3 Follow the instructions in Steps 6 and 7 to create a counter comparison and the Pump B output coil on Rung 3 using the following parameters For the counter comparison enter Counter in the Tag Name field and 2 in the Preset Value field of the Counter Comparison dialog box For the Pump B output coil enter Pump B in the Tag Name field Q1 in the Allocation Number field and Pump is Wired to Q1 in the Tag Name Comment field of the Output dialog box Step 10 Save the Program gt To name and save this program 1 Click File gt Save as from the Menu Commands toolbar The Save As dialog box displays 2 Enter COUNTERS in File Name field of the dialog box 3 Click the OK button or press the ENTER key to confirm 2001 IDEC CORPORATION 6 COUNTER INSTRUCTIONS 6 18 BASIC INSTRUCTIONS WINDLDR TUTORIAL Step 11 Print Transfer and Monitor the Program To print this program please re
125. format and transmitted through the loader port to a remote terminal with an RS232C port 2001 IDEC CORPORATION 14 TRANSMIT RECEIVE INSTRUCTIONS 14 2 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Valid Operands Standard Processing PLC Operand Function CPUType Q T CIR D Constant Repeat TOO 00 Micro C 0 498 FFh ONC 07999 00 8 FFh 6 9 399 0 Source 1 2 FFh E 16 or 00h MicroSmart 0 1299 EFh 20 0 1299 00h 40 I O 2000 7999 FFh 0 0 Micro C 31 287 0 0 pa 4 ee 5 597 2557 5 0 3 o E 0 9 10 I O 0 3 317 Di Des 8 16 0 0 6 nation 1 E 0 8 2410 107 MicroSmart 2 2043 0 0 m E 55 187 1977 amp D20RKI 0 D20RS1 307 i m 0 40 307 14 TRANSMIT RECEIVE INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 14 3 PLC Operand Function CPU Type l Q M T CR D Constant Repeat Micro C 0 497 ONC 9 0 7999 xe D2 066 5 10 0 399 EAS nation 2 16 i i MicroSmart z 24 I O 0 1299 2 20 0 1299 40 I O 2000 7999 Receive RXD H RXD Si D2 When input
126. g comment displays above Rung 2 7 SET RESET INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTION 7 11 Step 8 Save the Program gt To name and save this program 1 Click File gt Save as from the Menu Commands toolbar The Save As dialog box displays 2 Enter SETRSET in File Name field of the dialog box 3 Click the OK button or press the ENTER key to confirm Step 9 Print Transfer and Monitor the Program S To print this program please refer to page 4 9 To transfer this program refer to page 4 12 To monitor this program refer to page 4 13 2001 IDEC CORPORATION 7 SET RESET INSTRUCTIONS 7 12 BASIC INSTRUCTIONS WINDLDR TUTORIAL 7 SET RESET INSTRUCTIONS 2001 IDEC CORPORATION 8 SINGLE OUTPUT INSTRUCTIONS Micro Micro C ONC and MicroSmart Sin gle Output Up SOTU and Down SOTD Instructions For the Micro Micro C ONC and MicroSmart there are two SOT instruc tions single output up SOTU and single output down SOTD The SOTU instruction is comparable to the SOT instruction for the remaining IDEC PLCs The SOTU instruction looks for the transition of a given input from off to on The SOTD instruction ooks for the transition of a given input from on to off When this transition occurs the desired output will turn on for the length of one scan The SOTU or SOTD instruction converts an input signal to a one shot pulse signal The SOTU or SOTD instruction is fo
127. gnated by S3 Week Compare OFF WKCMP OFF H WKCMP 51 52 53 D1 When the input is on the WKCMP OFF instruction compares the 1 and 52 preset data with the current day and time When the current day and time reach the resets an output or internal relay des ignated by operand D1 is turned off depending on the week table output con trol designated by S3 2001 IDEC CORPORATION 13 CALENDAR CLOCK INSTRUCTIONS 13 22 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Operand Function MR T C D L Constant Repeat 0 1277 1 51 comparison data Source Hour Minute XXX XXX X X 02359 2 S2 comparison data Source Week table 53 output control XIXIXIXIXIXIXI X 02 Comparison ON out Desti ON nation XA 1 D1 Comparison OFF out put WKCMP OFF Week Table WKTBL H WKTBL 51 52 539 DI S1 S2 S3 SN gt Week Table When the input is on N blocks of special month day data in the operands desig nated by S1 S2 S3 SN are set to the week table The quantity of special days can be up to 50 The special days stored in the week table are used to add or skip days to turn on or off the comparison outputs pro grammed in subsequent WKCMP ON or WKCMP OFF instructions Operand Function IQ MR D L Constant Repeat Sou
128. gramming the clock and calendar clock set CLKST clock read CLKRD clock comparison format CLKCF clock com parison execute CLKCP and clock adjust CLKAJ After initially setting the clock the date and time are maintained and can be read out when the CPU is running or stopped 13 CALENDAR CLOCK INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 13 31 Clock Set CLKST H CLKST 5 5 1 2 5 3 clock according to assignment code S When the input is on the CPU clock is set using the data stored in a block of data registers starting with drS 1 according to the data format designated by the assignment code stored in drS The assignment code may be a zero one or two A zero specifies that the date and time are both assigned using values preset to the seven data registers following drS A one designates that time is assigned using the data preset to the three data registers following drS A two specifies that the date is assigned using values preset to the four data registers following drS The CLKST instruction is executed with each scan when the input is on Inter nal relay M630 turns on in case of a clock function interruption Operand Function IQ M RT D L Constant Repeat drs First source data register 2001 IDEC CORPORATION 13 CALENDAR CLOCK INSTRUCTIONS 13 32 ADVANCED INSTRUCTIONS WINDLDR T
129. h Input Input Filter Comm lt gt Communication Settings x Communication Port Settings Reset Input Baud Rate Data Length 7 Cancel Parity Even ER Default Stop Bits 1 9 Por COMI zi tee PLC Network Settings gt 1 C 000 x Cancel Defautt Bist Help Micro and Micro C Function Area and Communications Settings Dialog Boxes 2001 IDEC CORPORATION 3 GETTING STARTED 3 10 WINDLDR TUTORIAL OpenNet Function Area Setting x Keep Module ID Filter Catch Data Link C Communication Settings x Stop Input Reset Input Communication Port Settings Rate ET Run Stop Selection at Memory Backup Error Help Run Default C Stop Data Length 7 Parity Even Stop Bits 1 Le 1 Port COM1 j PLC Network Settings C11 N C 1N Device No 000 v x Cancel Default Help FA 2J Function Area Setting x Run Stop Keep External Function Error Output Max 1 4 gt Communication Port Settings Reset Input Baud Rate y Data Length 8 Cancel Start Group avec Parity
130. he Data Type Selection dialog box displays 4 Click the OK key or press the ENTER key to select the Con stant Character default in the Type field The Constant Character dialog box displays 5 Enter ATDT Z4 4 in the Character field Character s ATDT 18002624332 NOTE is the pager number creates eight second transmission delay 14 TRANSMIT RECEIVE INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 14 15 6 Click the OK button or press the ENTER key to confirm 7 Click the Insert button in the Transmit TXD dialog box again 8 Click Variable Data Register in the Type field of the Data Type Selection dialog box 9 Click the OK button or press the ENTER key to confirm The Variable Data Register dialog box displays Variable Data Register N Conversion Type C BIN to ASCII pw BCD to ASCII C Noni one Water Tank Level Sensor Digits REP Rom 10 Enter DO DO Water Tank Level Sensor in the DR No col umn 11 Leave the BCD to ASCII default in the Conversion Type field 12 Enter 4 in the Digits field 13 Leave the 1 default in the REP field 14 Click the OK button or press the ENTER key to confirm 2001 IDEC CORPORATION 14 TRANSMIT RECEIVE INSTRUCTIONS 14 16 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL 15 Click the Insert button in the Transmit TXD dialog box aga
131. his program shows a Soda Packaging machine where different inputs are used to determine the selection package of 6 Bottles and 12 Bottles respectively When Input I1 is on the machine will be producing 6 Bottles Packages I1 is On 6 Bottles Soda Packaging 6 Bottles i I0001 12 is On 12 Bottles OpenNet 000 03 000 02 Insert Reset RST Instruction NOTE The MOV instruction can be used to move constants data registers inputs outputs timers counters and internal relays 9 ADVANCED INSTRUCTIONS INTRODUCTION 2001 B Om WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 9 7 Step 1 Create the Basic Program Logic Open Contacts Counters SOTUs Tag Names and Comments as Illustrated in Exercises 1 8 1 Click the New icon nj to open a new file Step 2 Enter a MOV Instruction on Hung 2 To enter a MOV instruction 1 Click the MOV icon 2 Click on Column 3 of Rung 2 The Move dialog box displays The completed dialog box should look like this Move MOV 51 Di C003 G Move MOV Move Not Allocation Number 0006 C003 Repeat Repeat Name Comment Bottles movedto Soda Packaging 3 Machine Word X Conce 759 3 The Move option the field is selected by default Select Word in the Data Type field 2001 IDEC CORPORATION 9 ADVANCED INSTRUCTIO
132. ic diagram the order of solution would start at A and proceed sequentially through J Ladder Logic Sequential Flow Diagram PLC Scan The operations carried out in a PLC are accomplished by a sequential process referred to as scanning The scan time is most often the criterion when PLC speed is questioned It is essentially how quickly the PLC can look at its inputs solve the user s programmed logic and then update the outputs accordingly A more elaborate description is given on the following page 2 PLC OVERVIEW 2001 1 WINDLDR TUTORIAL 2 7 Start of Scan 1 Read Inputs TYPICAL 4 Communications and Housekeeping 2 Execute Programmed Logic 3 Update Outputs PLC Scan Read Inputs Input s status is are read into the input table The input table does not change until the next cycle of the scan when the input s status is are read in again Execute Programmed Logic The program that is stored in the PLC s memory is executed or solved Ladder logic is solved sequentially left to right and then top to bottom one rung ladder logic line at a time Logic results of the outputs are set to an internal output table 2001 IDEC CORPORATION 2 PLC OVERVIEW 2 8 WINDLDR TUTORIAL Update Outputs The output s status in the internal output table is are sent to the physical out put s e g relay starter pilot light Communications and
133. icro C ONC and MicroSmart Because most PLC instructions are executed with every scan it is sometimes necessary to use single shot commands As shown in Exercise 6 it is possible for both I1 latch and I2 unlatch to be on at the same time In this exercise you will add SOTU instructions Micro Micro C and ONC to Exercise 6 to ensure that the latch unlatch commands are executed for one scan only This minimizes conflicts in the execution of the instructions 2001 IDEC CORPORATION 8 SINGLE OUTPUT INSTRUCTIONS 8 4 BASIC INSTRUCTIONS WINDLDR TUTORIAL The figure below illustrates a latch unlatch scenario in which an NO pushbutton is used to issue a single shot command SOTU to latch SET a pump An NO pushbutton is used to issue an SOTU command to unlatch RST the pump You will use the elements from this figure to create your program CONTROL SYSTEMS APPLICATION INDUSTRIAL TANK START1 STOP 1 2 PRODUCTION PUMPA Latch NO pushbutton wired to I1 Unlatch Wired to I2 Pump A Wired to QO 8 SINGLE OUTPUT INSTRUCTIONS 2001 WINDLDR TUTORIAL BASIC INSTRUCTIONS 8 5 Follow the steps below to create an SOTU program When completed your program screen should look like this W WindLDR 2 11w C WINDLDR SOTU LDR File Edit View Configure Compile Online Window Help sle sele 2 s coles BSA
134. icroSmart The analog potentiometer positions and set values are shown below AlHn One Type CPU Module Analog Potentlometer 1 0 m Analog Potentiometer 2 24 1 0 Type Only Siim Type CPU Module Analog Potentiometer 1 2001 IDEC CORPORATION 11 ANALOG READ INSTRUCTIONS 11 10 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL e The 10 16 20 and 40 I O type CPU modules have one analog potentiometer e The 24 I O type CPU module has two analog potentiometers The values 0 through 255 set with analog potentiometers 1 and 2 are stored to data registers D8057 and D8058 respectively and updated in every scan e The alalog potentiometer be used to change the preset value for a timer or counter Special Data Registers for Analog Potentiometers CPU Module Analog Potentiometer 1 Analog Potentiometer 2 10 and 16 I O Module D8057 24 D8057 D8058 20 and 40 I O Type D8057 Example Changing Counter Present Value Using Analog Potentiometer This example demonstrates a program to change the a counter preset value using analog potentiometer 1 Analog potentiometer 1 value is stored to data regis ter D8057 which is used as a present value for counter The preset value is changed between 0 and 255 using the potentiometer 11 ANALOG READ INSTRUCTIONS 2
135. ight be used as an access code for using specialized machin ery editing confidential files or for entering high security areas In the primary mode the bar code data is compared to an existing FIFO data file When there is 14 TRANSMIT RECEIVE INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 14 31 a match access is granted If there is no match access is denied In the secondary mode a new set of approved codes may be entered into the FIFO data file by authorized personnel FA3S PLC System Bar Code Scanner The wiring for a bar code scanner decoder is shown above 7 NP 7 5 5 Dna 5 The system stores the code to indicate the communication status in data register D11 STDR Start delimiters are 255 and 0 accepting any beginning byte When Cp is received data is complete and internal relay M1 turns on to start conversion and comparison 2001 IDEC CORPORATION 14 TRANSMIT RECEIVE INSTRUCTIONS 14 32 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Incoming data for the ladder diagram below is initially stored in the data registers starting with D20 dr D for the SRXFT instruction and dr S for the SRXEX instruction as shown Incoming Data FIFO Data File l D20 Byte Count D30 First In Pointer 021 ppan D31 First Out Pointer Dz Values to be D32 Converted to BCD p33 53 JBEIBIBI and Stored in D51 8 Records D25 End Remark Cp D36
136. ill remain the same If the seconds are between 30 and 59 for the current time then the adjustment for seconds will be set to zero and minutes are incremented by one The CLKAJ instruction is useful for precise timing which starts at zero seconds The CLKAJ instruction is executed with each scan when the input is on so use a level or pulse input as necessary 13 CALENDAR CLOCK INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 13 35 Clock Comparison Format CLKCF H CLKCF CDRN CDRP DRT Comparison table gt N data sets gt 1 Comparison pattern P gt 2 format for clock comparison When the input is on a comparison table is created beginning with the data reg ister designated by drT A block of data registers beyond drT depending on cdrN and cdrP is required for storing format information The CLKCF instruc tion is executed with each scan when the input is on so use a level or pulse input as necessary Operand Input Output Internal Shift Data Timer 10msec Constant External Relay Register Register Counter Timer Setting cdrN X X X X X X X X X cdrP X X X X X X X X X drT X Clock Function MicroSmart With the optional clock cartridge FC4A PT1 installed on any type of MicroS mart CPU modules the MicroSmart can be used for time scheduled control 2001 IDEC CORPORATION 13 CALEND
137. in The Data Type Selection dialog box displays 16 Click the OK key or press the ENTER key to select the Con stant Hexadecimal default in the Type field The Constant Hexadecimal dialog box displays Constant Character Hexadecimal N 17 Enter 04 in the Hexadecimal field 18 Click OK to confirm Notice that you return to the Transmit TXD dialog box 19 In the D1 column enter M10 M10 and Emergency Over flow 20 In the D2 column enter D12 D12 and Transmission Status 14 TRANSMIT RECEIVE INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 14 17 Step 9 Enter an NO Contact on Rung 4 S To enter an NO contact 1 Click the Normally Open icon 2 Click on Column 1 of Rung 4 The Normally Open LOD dialog box displays Normally Open EA Tag Name ori Normally Open Allocation C Normally Closed Number roves N I R Trigger Comment 3 Enter 1 in the Tag Name field of the dialog box Notice that the properties for the MI contact automatically display in the Allocation Number and Tag Name Comment fields 4 Click the OK button or press the ENTER key to confirm The CmpltnD contact displays at the beginning or Rung 4 2001 IDEC CORPORATION 14 TRANSMIT RECEIVE INSTRUCTIONS 14 18 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Step 10 Enter a Single Output Up SOTU gt Instruction o
138. ines Show Mnemonics Iv Fix Columns p 5 0 Font Font style Courier New Eod Courier New Fixedsps X m Garamond Impact Bold Italic Letter Gothic d Marigold fp Marlett Modem Sample N AaBbYyZz Script Western To select the font type and size click the Font button The recommended font type and size is New Courier Bold 10 pt You are now ready to start the tutorial NOTE The text size of the rung comments is not restricted In the Tag Comment Lines field you can enter any number up to 100 Ideally IDEC recom mends that you use between 1 and 5 tag comment lines 3 GETTING STARTED 2001 IDEC CORPORATION 4 BASIC PROGRAMMING INSTRUCTIONS Introduction to Basic Programming As discussed in Chapter 2 PLC Overview a PLC examines the status of input interfaces and in response controls something through output interfaces In the following exercises you will use the most basic programming instructions to create simple input output programs Input Instructions When programming your PLC a load LOD or load not LODN instruction is used before an operand starting at the left bus of the ladder program The LOD instruction starts the logical operation with a normally open NO contact The LODN instruction starts the logical operation with a normally closed NC contact LOD LODN Ladder Diagram 2
139. ing successfully the following value will be stored in STDR STDR 10 Character array has been created waiting for transmission The result of the following status message is that the output or internal relay des ignated by OIR will be turned on to signal that communication is complete STDR 20 Transmission complete echo if specified by controller D3032 is received The following status message signals unsuccessful communication STDR 256 Transmission buffer is full when another STXEX command is sent 2001 IDEC CORPORATION 14 TRANSMIT RECEIVE INSTRUCTIONS 14 24 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Serial RX Format STXFT User Defined Communication H SRXFT cPORT STDR oir MAXSD MINSD ENDDL dr D DNLMT Il Designate execution conditions for user defined communication serial receiving e cPORT Communication port Communication status oir Completion output signal e MAXSD Maximum start delimiter e MINSD Minimum start delimiter ENDDL End delimiter First destination data register e DNLMT Maximum total bytes The FA3S has a serial port to receive and transmit R 232 and RS422 communi cation as well as communication with the program loader using FA instructions Communication is generally classified as standard or user defined Standard communication does not require programming to transmit and receive only the appropriate C
140. is Comment lea to I1 6 Click the OK button or press the ENTER key to confirm The Start I contact displays at the beginning of Rung 1 2001 IDEC CORPORATION 4 BASIC PROGRAMMING INSTRUCTIONS 4 6 BASIC INSTRUCTIONS WINDLDR TUTORIAL Step 2 Enter the Pump A Output Coil S To enter the Pump A output coil 1 Click the Output 2 Click on Column 2 of Rung 1 The Output OUT dialog box displays 3 Enter Pump A in the Tag Name field of the dialog box 4 Enter QO in the Allocation Number field 5 Enter Pump A is wired to QO in the Tag Name Comment field Your completed dialog box should look like this Output Tag Name 5 Output Allocation Output Not Number riis C Set C Reset Comment ls Tag pup is Wired to 00 NOTE Output Not does not display in the Type field of the ONC Output dialog box 6 Click the OK button or press the ENTER key to confirm The Pump A output coil displays at the end of Rung 1 4 BASIC PROGRAMMING INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTIONS 4 7 Step 3 Enter a Rung Comment To enter a rung comment 1 Click anywhere on Rung 1 2 Click Edit gt Rung comment from the Menu Com m mands toolbar or click the Rung comment sl icon The Rung Comment Dialog screen displays 3 Click in the white area of the dialog screen and enter This program shows a
141. is on the data received through the loader port from a remote terminal with an RS232C port is converted and stored in data registers according to the receive format designated by S1 2001 IDEC CORPORATION 14 TRANSMIT RECEIVE INSTRUCTIONS 14 4 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Valid Operands Standard Processing PLC Operand Function CPU Type l Q M ITICIR D Constant Repeat 22243 00h Micro C 0 498 FFh 00h ONC 0 7999 FFh S1 00h Source 1 10 0 399 FEh 0 MicroSmart T a Rea E O FFh 2 20 0 1299 5 40 I O 2000 7999 0 31 10 3 Micro C 287 8 0 0 panan ey 5 597 2557 5 0 1 0 023 95 10 10 gt I D1 Desti Ej 317 nation 1 5 16 00 10 6 0 MicroSmart un um o 0 187 10 ET IRE D20RS1 0 307 n m 40 0 307 14 TRANSMIT RECEIVE INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 14 5 PLC Operand Function CPUType 1 Q M D Constant Repeat Micro C 0 497 zu ONC 5 0 7999 a D2 Desti 2 E 0 399 un nation 2 E DORAL MicroSmart O 052242 E 20 0 1299 40 I O 2000 7999 Data Registers Since data communication
142. ithin the specified range then this invalid data will result in a numeric value end and M306 will turn on Clock Read CLKRD H CLKRD drD Clock gt D 1 D 2 D 3 according to read out code D When the input is on the current clock data is read out from the CPU to a block of data registers beginning with drD 1 according to the data format designated by the read out code stored in drD The read out code may be a zero one or two A zero specified that the data and time are both read out to 7 data registers following drD A one designates that the time is read out to 3 data registers fol lowing drD A two specifies that the date is read out to 4 data registers after drD The CLKRD instruction is executed with each scan when the input is on so use a level or pulse input signal as necessary M630 turns on to signal that the clock function has been interrupted Operand Internal Shift Data Timer 10msec Constant External P Relay Register Register Counter Timer Setting drD X 2001 IDEC CORPORATION 13 CALENDAR CLOCK INSTRUCTIONS 13 34 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Clock Adjust CLKAJ t Adjust CPU clock seconds zero When the input is on the CPU clock is adjusted with respect to seconds If sec onds are between 0 and 29 for the current time the adjustment for seconds will be set to zero and the minutes w
143. izing 3 3 selecting PLC type 3 5 3 7 serial port settings selecting 4 11 SET dialog box 7 6 instructions entering in a program 7 6 uses for 7 1 programs creating 7 2 7 10 setting calendar clock 13 36 setting calendar clock using a user program 13 27 13 37 setting calendar clock using WindLDR 13 25 single output SOT instructions entering in a program 8 6 8 11 9 7 9 8 9 12 9 13 uses for 8 2 INDEX VIII WINDLDR TUTORIAL programs creating 8 7 8 12 8 13 single output SOTD programs creating 8 3 8 8 single output down SOTD instructions entering in a program 14 18 used with advanced instructions 9 2 uses for 8 1 8 2 single output up SOTU instructions entering in a program 8 6 8 11 9 7 9 8 9 12 9 13 used with advanced instructions 9 2 uses for 8 1 8 2 programs creating 8 3 8 7 8 8 8 12 8 13 source operand See also advanced instructions structure of 9 2 9 3 start stop program creating See also input output program creating 4 3 starting WindLDR 3 2 T technical support accessing 1 3 10 msec timedown timer TMH 5 3 timer comparison program 5 15 timers designating as the destination operand 9 4 designating as the source operand 9 3 INDEX 2001 IDEC CORPORATION dialog box 5 11 5 19 FA3S CP 12 13 5 1 instructions TIM entering in a program 5 11 5 19 5 20 Micro 1 FA1J 2J FA3S CP11 CP11T 5 1 Micro3 5 3 5 6 Micro3C 5 3 5 6 MicroSmart 5 5 ONC 5 4 preset value
144. llowed by one address SOTU and SOTD instructions can be used repeatedly If an operation is started while the given input is already on then the SOTU output will not turn on The transition from off to on is what triggers the SOTU instruction NOTE The scan time on some PLCs can be much faster than the time interval needed to operate a relay output 2001 IDEC CORPORATION 8 SINGLE OUTPUT INSTRUCTIONS 8 2 BASIC INSTRUCTIONS WINDLDR TUTORIAL Ladder Diagram SOTU 10 SOTD 10 Q1 Micro 1 FA Js and FA3Ss Single Output SOT Instruction The single output SOT instruction ooks for the transition of a given input from off to on When this transition occurs the desired output will turn on for the length of one scan The SOT instruction converts an input signal to a shot pulse signal and is followed by one address The same SOT instruction cannot be used repeatedly If an operation is started while the given input is already on then the SOT output will not turn on The transition from off to on is what triggers the SOT instruction The SOT is comparable to the SOTU instruction for the Micro Micro C and ONC 8 SINGLE OUTPUT INSTRUCTIONS 2001 WINDLDR TUTORIAL BASIC INSTRUCTIONS 3 Ladder Diagram Single Shot when I1 Switches from Off to On Single Shot when I1 Switches from On to Off Exercise 7 Creating an SOTU SOTD Program Micro M
145. look like this Up Counter lt Up Counter Allocation kos C Dual Pulse Counter Up Down Counter Presa 1000 N counts Comment Parts 3 Click the Up Counter option in the Type field 4 Enter C4 in both the Tag Name and Allocation Number fields 5 Enter 1000 in the Preset Value field 6 Enter C4 Counts Parts in the Tag Name Comment field 7 Click OK 10 ARITHMETIC COMPARISON INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 10 15 Step 3 Enter an Addition Instruction on Rung 2 To enter an addition instruction 1 Click the Binary Arithmetic icon 2 Click on Column 2 of Rung 2 The Addition dialog box displays The completed dialog box should look like this Type RE Subtraction C Multiplication C Division N Repeat Repeat Repeat ko Counts Constant 010 Stores Parts jadded to C4 C4 3000 3 Click the Addition option in the Type field 4 Select Word from the Data Type field 5 Enter C4 C4 and C4 Counts Parts in the S1 column 6 Enter 3000 3000 and Constant added to C in the S2 column 7 Enter D10 D10 and D10 Stores C4 3000 in the D1 column 8 Click OK 2001 IDEC CORPORATION 10 ARITHMETIC COMPARISON INSTRUCTIONS 10 16 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL
146. maximum of 30 XY conversion formats The conversion result is set to the operand and designated by D1 Valid Operands Standard Processing Operand Function Q M T Constant Repeat S1 Source 1 Format 0 29 number 2 Source 2 X value 01032767 Destina D1 Desti tion to l ara ak at bab E nation 1 store results A Internal relays MO through M2557 can be designated as D1 Special internal relays cannot be designated as D1 When the timer T or counter C is used as S2 the timer counter current value is read out When the timer T or counter C is used as D1 the data is written in as a preset value which can be 0 though 65535 The data conversion error is 0 5 NOTE The only type of valid data for an XY conversion is an integer 2001 IDEC CORPORATION 15 XY CONVERSION 15 4 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Convert Y to X CVYTX H CVYTX S1 S2 D1 When an input is on the Y value designated by operand S2 is converted into cor responding X value according to the linear relationship defined in the XYFS instruction Operand S1 selects a format from a maximum of 30 XY conversion formats The conversion result is set to the operand and designated by D1 Valid Operands Standard Processing Operand Function 1 Constant Repeat 1 Source 1 Format 0 29 number
147. mode timer numbers 0 through 15 are available Micro and Allocation Range Increase Preset Valu Micro C Timers Numbers g crea 4 TIM Constant 100msec times 70 31 0 999 9 sec 100msec 0 9999 TMH Data registers a TO T31 0 99 99 10msec D99 10msec timer mode TMS DO to D31 0 31 0 9 999 sec 1msec high speed mode 2001 IDEC CORPORATION 5 TIMER INSTRUCTIONS 5 4 BASIC INSTRUCTIONS WINDLDR TUTORIAL ONC Timers There are four types of timers available for the ONC controllers e 1 second timer TML 100msec timer TIM 10msec timer TMH e 1 timer TMS A total of 256 timers can be programmed in a user program All timers are the timedown type Each timer must be allocated to a unique number 1255 NOTE All ONC timers are 16 bit register timers This allows a preset value of up to 65535 Allocation ONCTimer Range Increase Preset Value Numbers TML TO T255 0 65535 sec 1 sec Constant TIM TO T255 0 6553 5 sec 100msec 0 65535 TMH TO T255 0 655 35 sec 10msec Data registers 07999 TMS TO T255 0 65 535 sec 1msec 5 TIMER INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTIONS 5 5 MicroSmart Timers There are four types of timers available for the MicroSmart e 1 second timer TML 100msec timer TIM
148. n Rung 4 To enter an SOTU instruction 1 Click the SOTU Fa icon 2 Click on Column 2 of Rung 4 The SOTU instruction displays next to the 1 contact on Rung 4 Step 11 Enter a Transmit Instruction on Rung 4 S To enter a transmit instruction 1 Click the Transmit Receive icon 2 Click on Column 3 of Rung 3 The Transmit TXD dialog box displays 3 Click the Insert button in the dialog box The Data Type Selection dialog box displays 4 Click the OK button or press the ENTER key to select the Constant Character default in the Type field 14 TRANSMIT RECEIVE INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 14 19 3 The Constant Character dialog box displays t0001 D0012 t0001 D0012 Trigger Transmission ITXD Instruct Status D12 G Porti Insert Delete Edit 5 Enter ATDT180026243321111 EMPTY in the Character field Constant Character Character N 6 Click the OK button or press the ENTER key to confirm 7 Click the Insert button again 8 Click Constant Hex decimal in the Type field of the Data Type Selection dialog box 9 Click the OK button or press the ENTER key to confirm 2001 IDEC CORPORATION 14 TRANSMIT RECEIVE INSTRUCTIONS 14 20 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL The Constant Hexadecimal dialog box displays Hexadecimal 10 Enter 0D in the Hex decimal field of the dial
149. n reversible counters NOTE Reversible counters operate differently than adding counters Adding counters start at 0 and turn ON when the preset value is reached Reversible counters start at a preset value and turn ON when 0 is reached Micro 1 FA1J 2J FA3S CP11 CP11T Counters These PLCs have 45 adding up counters CNTO CNTA4 one dual pulse reversible counter CNT45 and one up down selection reversible counter CNT46 Micro 1 FA1J FA2J FA3S CP11 and FA3S CP11T Counter Table Type of Counter Value Preset Adding Up Counters CO C44 0 9999 Dual Pulse Counters C45 0 9999 Reversible Counters Up Down C46 0 9999 2001 1 ere 7 wien 6 COUNTER INSTRUCTIONS 6 2 BASIC INSTRUCTIONS WINDLDR TUTORIAL PF3S CP12 CP13 Counters These high performance PLCs have 100 adding up counters CNTO CNT 44 CNT48 CNT102 and two reversible counters CNT45 and CNT46 FA3S CP12 CP13 Counter Table Type of Counter Allocation Number Preset Value C0 C44 Adding Up Counters C48 C102 0 9999 Dual Pulse Counters C45 0 9999 Reversible Counters Up Down C46 0 9999 Micro Micro C ONC MicroSmart Counters The Micro and Micro C PLCs have 30 adding up counters 2 CNT31 one dual pulse reversible counter CNTO and one up down selection reversible counter CNT 1 The ONC has 256 counters CNTO CNT255 The MicroSmart has
150. nitial Pt second point When 10 is On X value in 210 is converted to Y value and stored in D15 Convert First X value Converted X X to Y Point in D10 value in D15 When I1 is on the Y value in D11 is converted to x value and stored in d20 3 Convert First y value Converted Y Y to X Point in 1 value in D20 COM 000 03 000 04 15 XY CONVERSION 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 15 7 S Step 1 Click the New D Icon to Open New File A blank ladder logic program screen displays Step 2 Enter an NO Contact on Rung 1 S To enter an NO contact 1 Click the Normally Open 4H icon 2 Click on Column 1 of Rung 1 The Normally Open LOD dialog box displays Normally Open Type Tag Name 6 Normally Allocation C Normally Closed Number rnitialize Comment i Is 3 Enter M8120 in the Tag Name and Allocation Number fields 4 Enter Initialize Pulse in the Name Comment field 5 Click OK The Jnitialize Pulse contact displays at the beginning of Rung 1 2001 IDEC CORPORATION 15 XY CONVERSION 15 8 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Step 3 Enter an XY Format Set Instruction on Rung 1 To enter an XY format set instruction 1 Click the XY Format Set a icon 2 Click on Column 2 of Rung 1 The XY Convert Format XYFS dialog box displays XY Convert Format XYFS yo Type XY Conve
151. nline gt Monitor from the Menu Commands toolbar 2 Click Online 2 PLC Status from the Menu Commands tool OpenNet PLC Status Run Stop Status Stop Running li re 1 Scan Time Max 2 TIM CNT Change Status 5 m PLC Type FC3A CP1K Clear Unchanged PLC Version al Error Status Device Number 255 Calendar Reset COMK Ema Protect Status Unprotected 4 BASIC PROGRAMMING INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTIONS 4 15 2 Batch Monitor Batch monitor allows you to monitor an array of inputs outputs timers counters data registers and so forth by simply selecting the operand Batch Monitor Dialog Operand No 4 gt Comment d Change Close 00000 10010 00020 00030 00040 10050 10060 90070 7 10001 10011 00021 00031 00041 00051 00061 00071 10002 10012 00022 00032 00042 00052 00062 00072 10003 10013 00023 00033 00043 00053 00063 00073 10004 00014 00024 00034 00044 00054 00064 00074 10005 10015 00025 00035 00045 00055 00065 00075 10005 00016 00026 00036 00046 00056 00055 00076 00007 00017 00027 00037 00047 00057 00067 00077 To monitor your programs in batches 1 Click Online 3 Monitor from the Menu Commands toolbar 2 Click Online gt Batch Monitor from the Menu Commands tool bar 3 Type the desired operand and starting address 4 Scroll forward and backward by cli
152. nstructions require two source operands Destination Operand The destination operand specifies the 16 bit word data to store the result of the advanced instruction Some advanced instructions require two destination operands Input Condition for Advanced Instructions Almost all advanced instructions must be preceded by a contact except no operation NOP and high speed HSCO HSC3 instructions The high speed mode is applicable for Micro and PLCs only The input condition can be programmed using a bit operand such as an input output internal relay or shift register A timer or counter can also be used as an input condition to turn on the contact when the timer times out or the counter counts out While the input condition is on the advanced instruction is executed in each scan To execute the advanced instruction only at the rising or falling edge of the input use the single output up SOTU or single output down SOTD instruction SOTUL MOV 51 01 REP 10 D10 D20 9 ADVANCED INSTRUCTIONS INTRODUCTION 2001 4 6 WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 9 3 Source and Destination Operands The source and destination operands specify 16 bit Micro Micro C and MicroSmart or 16 or 32 bit ONC word data When a bit operand such as input output internal relay or shift register is designated as a source or destina tion operand 16 or 32 points starting with the design
153. og box Notice that the properties for the Timer contact automatically dis play in the Allocation Number and Tag Name Comment fields 5 Enter 10 Sec Timer on Delay in the Tag Name Comment field Your completed dialog box should look like this Normally Open Type Tag Name Normally Open Allocation ow Normally Closed Number Tag Name 10 lt Timer Comment lon Delay N 6 Click the OK button or press the ENTER key to confirm The Timer contact displays at the beginning of Rung 2 2001 IDEC CORPORATION 5 TIMER INSTRUCTIONS 5 14 BASIC INSTRUCTIONS WINDLDR TUTORIAL Step 6 Enter the Pump A Output Coil on Rung 2 S To enter the Pump A output coil 1 Click the Output icon 2 Click on Column 2 of Rung 2 The Output OUT dialog box displays 3 Enter Pump A in the Tag Name field of the dialog box 4 Enter Q0 in the Allocation Number field 5 Enter Pump A is wired to QO in the Tag Name Comment field Your completed dialog box should look like this Tag Name Tag Name Pump is Comment tired to 00 ls NOTE Output Not does not display in the Type field of the Micro 1 and FA series Output dialog box 6 Click the OK button or press the ENTER key to confirm The Pump A output coil displays at the end of Rung 2 5 TIMER INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTIONS 5 15 Step 7 Save the Program
154. og box 11 Click the OK button or press the ENTER key to confirm Notice that you return to the Transmit TXD dialog box 12 Enter M12 in the D1 Tag Name field of this dialog box 13 Enter M12 in the D1 Allocation Number field 14 Enter Emergency low Level in the D1 Tag Name Comment field 15 Enter D12 in the D2 Tag Name field 16 Enter D12 in D2 Allocation Number field 17 Enter Transmission Status D12 in the D2 Tag Name Comment field 18 Click the OK button or press the ENTER key to confirm The transmit instruction displays at the end of Rung 4 14 TRANSMIT RECEIVE INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 14 21 Step 12 Save the Program gt To name and save this program 1 Click File gt Save as from the Menu Commands toolbar The Save As dialog box displays 2 Enter DIALIT in the File Name field of the dialog box 3 Click the OK button or press the ENTER key to confirm Step 13 Print Transfer and Monitor the Program To print this program please refer to page 4 9 To transfer this program refer to page 4 12 To monitor this program refer to page 4 13 2001 IDEC CORPORATION 14 TRANSMIT RECEIVE INSTRUCTIONS 14 22 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Transmit and Receive Instructions for FA3S High Performance Series Serial Transmitting STXFT and STXEX The FA3S can transmit data to any device which is capable of receiving RS232
155. ometers analog poten tiometer 0 on the left and analog potentiometer 1 on the right 16 and 24 I O Micro C types have only one potentiometer analog potentiometer 0 on the left Example ANRO When input 10 is on the value from analog potentiometer 0 is read to data register D80 ANRO 10 D80 2001 IDEC CORPORATION 11 ANALOG READ INSTRUCTIONS 11 4 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Exercise 13 Creating an Analog Read Program In this exercise you will use the PLC s built in potentiometer 0 as an external set point device to determine the maximum volume of liquid allowed in a tank The ANRO instruction lets you read the PLC potentiometer value and store it in a data register to be used for comparison data manipulation The potentiometer value varies on a scale from 0 to 249 When 1210 is greater or equal to 100 output Q2 will come on Otherwise Q2 will remain off ANALOG CONTROL SYSTEMS APPLICATION Biin SENSOR INDUSTRIAL TANK RP RS SE _START1_ STOP 1 TO PRODUCTION Pump A Wired to QO 11 ANALOG READ INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 11 5 Follow the steps below to create an analog read program When completed your program screen should look like this W WindLDR 2 11 C WINDLDR POT File Edit View Configure Compile Online Window Help SIR Hae a
156. omparisons 6 6 E Stop contact entering 4 22 examine on off contacts defined 2 8 executing programmed logic 2 7 F FA Series binary arithmetic instructions 10 19 comparison instructions 10 24 Function Area and Communications Settings dialog boxes 3 10 17 2 timers 5 1 FA3S Series INDEX IV WINDLDR TUTORIAL transmit TXD instructions 14 22 FA3S CP11 CP11T timers 5 1 FA3S CP 12 13 timers 5 1 Function Area Settings dialog box 3 8 function settings 3 8 configuring 3 8 H hot keys 3 3 if statement defined 2 8 input condition for advanced instructions 9 2 designating as a source or destination operand 9 4 devices 2 4 instructions See also load LOD and load not LODN 4 1 interface See also PLC components 2 4 reading 2 7 input output program creating See also load out program creating 4 3 4 7 installing WindLDR 3 1 instructions accessing toolbars 3 3 INDEX 2001 IDEC CORPORATION WINDLDR TUTORIAL INDEX V instructions accessing memory See also PLC advanced instructions toolbar 3 3 components 2 3 basic instructions toolbar 3 3 menu commands toolbar 3 2 hot keys 3 3 menu instructions 1 2 right mouse button 3 4 Micro 1 counters L adding up counters 6 4 dual pulse reversible counter 6 4 6 5 up down selection reversible counter 6 5 ladder lines drawing 4 23 ladder logic defined 2 5 external field devices 4 19 programming 2 6 solving 2 7 ladder preferences dialog box
157. on C Normally Closed Number Tag w29 is Comment fif 1 M Mondays 3 Click the Normally Open option in the Type field 3 Enter M20 in the Tag Name and Allocation Number fields 4 Enter M20 is On if D93 1 Mondays in the Tag Name Comment field 5 Click OK The M0020 contact displays at the beginning of Rung 6 13 CALENDAR CLOCK INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 13 19 Step 13 Enter a Set instruction on Rung 6 S To enter a Set instruction 1 Click the Set icon 2 Click on Column 3 of Rung 6 The Set dialog box displays Set Type Tag Name C Output Output Not Set Tag Name Freezer Reset Comment off Sunday 7 AM and On Monday 7 AM Allocation 00000 3 Click the Set option in the Type field 3 Enter QO in the Tag Name and Allocation Number fields 4 Enter Freezer Off Sunday 7 AM and On Monday 7 AM in the Tag Name Comment field 5 Click OK The QO Set contact displays at the end of Rung 6 2001 IDEC CORPORATION 13 CALENDAR CLOCK INSTRUCTIONS 13 20 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Step 14 Save the Program S To name and save this program 1 Click File 3 Save as from the Menu Commands toolbar The Save As dialog box displays 2 Enter CLOCKCAL in File Name field of the dialog box 3 Click the OK button or press the ENTE
158. on Instructions FA Series PLCs Word Greater Than or Equal To WGE F147 F 47 F 47 47 110 HHHH HHHH WGE S1 S2 oir Iz Symbol WGE 51 52 5 lt 5 gt oir set on The WGE instruction identifies a greater than or equal to relationship Both data to be compared can be designated and the result can be an output or an internal relay When an input is on the data designated by 1 and S2 are compared If the con dition is met the output or internal relay designated by oir goes on If not it goes off 10 ARITHMETIC COMPARISON INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 10 25 NOTE Comparison instructions are executed in each scan while the input is on So use a level or pulse input as required To execute the instruction only at the leading edge of the input use an SOT instruction For data comparison instructions if the condition is met when the input is on the output designated by oir goes on If the conditions are not met the output goes off When the input is off the existing output status is maintained For example if the input goes off while the output is on the output remains on Word Less Than or Equal To WLE Symbol WLE 51 5 oir 51 S5 gt oir set The WLE instruction identifies a less than or equal to relationship Both data to be compared can be designated and the result can be an output or an internal relay
159. on instruction 1 Click the Comparison zt icon 2 Click on Column 2 of Rung 2 The Comparison dialog box displays The completed dialog box should look like this Compare Greater Than or Equal To ype C CMP 00002 CMP lt gt C CMP 00010 0100 00002 CMP Repeat Repeat Repeat 0 249 of 100 02 Comes On C CMP2 C CMP lt Set Val 010 100 G CMP 010 value e ue i Data Type 3 Click CMP gt in the Type field 4 Select Word in the Data Type field 5 In the S1 column enter D10 D10 and D10 value 0 249 6 In the S2 column enter 100 0100 and Set value of 100 7 Inthe D1 column enter Q2 Q2 and D10 100 Q2 Comes On 8 Click OK 2001 IDEC CORPORATION 11 ANALOG READ INSTRUCTIONS 11 8 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Step 4 Save the Program To name and save this program 1 Click File Save as from the menu commands toolbar The Save As dialog box displays 2 Enter POT in File Name field of the dialog box 3 Click the OK button or press the ENTER key to confirm Step 5 Print Transfer and Monitor the Program To print this program please refer to page 4 9 To transfer this program refer to page 4 12 To monitor this program refer to page 4 13 11 ANALOG READ INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 11 9 Analog Potentiometer Setting for M
160. ort Registered users of IDEC s WindLDR software are entitled to telephone support To qualify complete the registration card that came with your WindLDR software and return it to IDEC For assistance call 1 800 262 IDEC 4332 Press 2 and then 1 to contact the PLC Technical Engineering Group To contact us through E mail write support idec com via the Internet 2001 IDEC CORPORATION 1 INTRODUCTION 1 4 WINDLDR TUTORIAL 1 INTRODUCTION 2001 1 2 PLC OVERVIEW What is a PLC Before you start this tutorial you should have a basic understanding of how your PLC works If you are unfamiliar with PLCs this chapter provides a good start ing point for this tutorial If you already have a general knowledge of PLCs you can skip this chapter and go directly to Chapter 3 Getting Started Functionally a PLC examines the status of input interfaces and in response controls something through output interfaces Combinations of input and out put data are referred to as ogic Several logic combinations are usually needed to carry out a control plan or program as it is commonly called This program is stored in memory using a programming device All logic combinations stored in memory are periodically evaluated by the processor in a predetermined order Programmable Logic 2 4 2001 IDEC CORPORATION 2 PLC OVERVIEW Elements of a PLC System WINDLDR TUTORIAL
161. oth I1 latch and I2 unlatch to be on at the same time In this exercise you will add SOT instructions Micro 1 and FA series to Exercise 6 to ensure that the latch unlatch commands are executed for one scan only This minimizes conflicts in the execution of the instructions 8 SINGLE OUTPUT INSTRUCTIONS 2001 4 6 WINDLDR TUTORIAL BASIC INSTRUCTIONS 8 9 The Micro 1 and FA series PLCs have only one SOT type which executes for one scan when an normally open NO contact switches from off to on If an SOT instruction is preceded by a normally closed NC contact then SOT will exe cute for one scan when the NC contact switches from on to off The figure below illustrates a latch unlatch scenario in which an NO pushbutton is used to issue a single shot command SOT to latch SET a pump An NO pushbutton is used to issue an SOT command to unlatch RST the pump You will use the elements from this figure to create your program CONTROL SYSTEMS APPLICATION INDUSTRIAL TANK START 1 STOP 1 a PUMP A TO PRODUCTION Latch NO pushbutton wired to I1 Unlatch Wired to I2 Pump A Wired to QO 2001 IDEC CORPORATION 8 SINGLE OUTPUT INSTRUCTIONS 8 10 BASIC INSTRUCTIONS WINDLDR TUTORIAL Follow the steps below to create an SOT program When completed your program screen should look like this W WindLDR 2 11 C WINDLDR SOT LDR
162. ovides the means of using the processor s low voltage signals 12V DC to switch power to a field output device This is done either with an electromechanical relay see figure on the next page or phototransistor Output devices include such items as pilot lights relays alarms digital displays motor starters valves and solenoids NOTE The output voltage to the device is only switched by the processors power supply The output voltage is not supplied by the processor s power supply 2 PLC OVERVIEW 2001 IDEC CORPORATION WINDLDR TUTORIAL 2 5 z 2 25 E 5 CIRCUITS Relay Output Circuit Diagram How PLCs Work PLCs are generally programmed in what is known as adder logic This method of programming was established because it could be closely related to the hardwired relay logic see figure below that PLCs replaced Current Flow Typical Relay Logic Diagram 2001 IDEC CORPORATION 2 PLC OVERVIEW 2 6 WINDLDR TUTORIAL The hardwired systems operated just as the previous diagram shows The power was supplied to the circuit and if there was a path for current to travel through then the output would be energized The concept of ladder logic programming is identical to this The entire program is solved each scan starting from the first element on the top left of the diagram then solving left to right top to bottom just as current would flow In the following ladder log
163. pare Greater Than or Equal to ICMP2 ONC and MicroSmart Only 10 10 Valid Operands Standard Processing 10 11 Exercise 11 Creating a Binary Arithmetic Comparison Program 10 12 Binary Arithmetic Instructions FA Series PLCs 10 19 Add with Carry JADDC 10 19 Subtraction with Borrow JSUBB 10 20 Multiplication JMUL 10 21 Division JDIV 10 22 10 000 Addition 3 Operand TADD3 10 23 10 000 Subtraction 3 Operand TSUB3 10 23 10 000 Multiplication TMUL 10 23 10 000 Division TDIV 10 24 Comparison Instructions FA Series PLCs 10 24 Word Greater Than or Equal To WGE 10 24 Word Less Than or Equal To WLE 10 25 Word Equal To WEQ 10 26 Exercise 12 Creating an FA Series Advanced Instruction Program 10 27 2001 4 6 TABLE OF CONTENTS VI WINDLDR TUTORIAL Chapter 11 Introduction to Analog Read Instructions 11 1 Analog Read 0 ANRO 11 1 Analog Read 1 ANR1 11 2 Valid Operands Standard Processing 11 2 Analog Potentiometer Setting for Micro and Micro C 11 3 Example ANRO 11 3 Exercise 13 Creating an Analog Read Program 11 4 Analog Potentiometer Setting for MicroSmart 11 9 Example Changing Counter Present Value Using Analog Potentiometer 11 10 Chapter 12 Introduction to Analog Digital Instructions 12 1 Analog Digital A D Conversion 12 1 Valid Operands Standard Processing 12 2 Exercise 14 Creating an A D Conversion Program 12 3 Chap
164. perand of an advanced instruction the result of the advanced instruction is set to the preset value of the timer or counter Since timer and counter preset values can be 0 9 999 Micro and Micro C or 0 65535 ONC and MicroSmart word data make sure that the result of the advanced instruction does not exceed the corresponding value When a timer or counter preset value is designated using a data register the timer or counter cannot be designated as the destination of an advanced instruction When executing such an advanced instruction a user program execution error will result If a timer or counter is designated as the destination of an advanced instruction and if the timer or counter is not programmed then a user program execution error will also result NOTE When a user program execution error occurs the result is not set to the destination Using an Input or Output as the Source or Destination Operand When an input or output is designated as the source or destination operand of an advanced instruction 16 or 32 points starting with the designated number are used Depending on the micro PLC base unit used alone or in the expansion link system and depending upon the MicroSmart and ONC I O modules used the available input terminals are limited and special care is needed 9 ADVANCED INSTRUCTIONS INTRODUCTION 2001 4 6 WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 9 5
165. ps to create an arithmetic comparison program When completed your program screen should look like this M WindLDR 2 11 C NWINDLDRSARITHM File Edit View Configure Compile Online Window Help ole sie kielel 7 aaa This program will use Arithmatic and Comparison functions to turn an alarm indicating the completion of task1 Counter C4 counts parts on production Line through the Photoeye H 0 Contact C4 Countes Reset C4 Parts CHT C004 10000 1000 Photo Eye Pulses in C4 The Add instruction constantly adds the current value in C4 to 3000 Logic is true C4 Countes Constant D10 Stores Parts added to C4 C4 3000 D10 Stores 50 D10 Result of C4 0 each scan D10 50 The comparison instruction compares the result in D10 to 175000 when there is a match Q2 the alarm comes On Result of A critical Alarm On D10 50 set value Wired to 02 COMi 000 04 000 01 2001 IDEC CORPORATION 10 ARITHMETIC COMPARISON INST 10 14 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Step 1 Create the Basic Program Logic Open and Closed Contacts Tag Names and Comments as Illustrated in Exercises 1 8 1 Click the New icon to open a new file Step 2 Enter an Upward Counting Counter on Rung 1 To enter an upward counter 1 Click the Counter icon 2 Click on Column 2 of Rung 1 The Up Counter dialog box displays The completed dialog box should
166. rce Special month 101 1 S1 day data s A 1231 ER 13 CALENDAR CLOCK INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 13 23 Examples WKCMP ON OFF Without Special Days S3 O This example is the basic program for week programmer application without using the WKTBL week table instruction While the CPU is running the WKCMP ON and WKCMP OFF compare the S1 and 52 preset data with the current day and time When the current day and time reach the presets an output designated by oper and D1 is turned on and off WKCMP 51 52 53 D1 M8125 ON 62 815 0 QO WKCMP 51 52 53 D1 OFF 62 1715 0 Qo M8125 is the in operation output special internal relay S1 62 specifies Monday through Friday The WKCMP ON turns on output 0 at 8 15 on Monday through Friday The WKCMP OFF turns off output QO at 17 15 on Monday through Friday With Additional Days in the Week Table S3 1 When the current time reaches the hour minute preset time on the special days programmed in the WKTBL the designated output is turned on WKCMP ON or turned off WKCMP OFF In addition the designated output is turned on and off every week as designated by operand S1 of WKCMP In normal execution when the current day and time coincide with the preset day S1 and time S2 the designated output is turned on or off Execution on the special days has prec
167. rogrammed with or without an output after the timer These timers can be used in on delay or off delay applications FA3S CP12 13 Timers The FA3S CP12 and CP13 CPUs have 256 timers 100msec TO T255 and 10msec HO H79 Each timer must be programmed with an input to control the timer and may be programmed with or without an output after the timer NOTE For details on high speed timers refer to the FA3S CP12 User Manual 2001 IDEC CORPORATION 5 TIMER INSTRUCTIONS 5 2 BASIC INSTRUCTIONS WINDLDR TUTORIAL Micro 1 and Allocation FA Series Timer Numbers Range Increase Preset Value 1 Constant Micro 1 TIM 70 779 0 999 9 sec 100msec 050 FAL FA2 Constant 10 779 0 999 9 100msec FA3S CP11T FA3S TIM T0 T255 0 999 9 sec 100msec Constant CP12 0 9999 FA3S 0213 TIOMS 0 79 09999 10msec C oos 5 TIMER INSTRUCTIONS 2001 IDEC CORPORATION Micro and Micro C Timers WINDLDR TUTORIAL BASIC INSTRUCTIONS 5 3 Three types of timers are available for the Micro and Micro C PLCs a 100msec timedown timer TIM a 10msec timedown timer TMH and a 1 msec time down timer TMS A total of 32 timers and counters can be programmed in the standard processing mode Each timer must be allocated to a unique number 0 through 31 and the same number cannot be used for counters In the high speed processing
168. rt Format XYFS lo fo 3000 2000 0000 0000 4000 2000 ly value ly value x value ly value initial Pt initial Pt second Pt second point Data Type 3 Enter 1 1 First Point in the 51 field 4 Enter 0 0 x value initial Pt in the XO field 5 Enter 0 0 y value initial Pt in the YO field 6 Enter 4000 4000 x value second Pt in the X1 field 7 Enter 2000 2000 y value second point in the Y1 field 8 Click OK The XYFS instruction displays on Rung 1 15 XY CONVERSION 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 15 9 Step 4 Enter a Rung Comment for Rung 1 To enter a comment for Rung 1 1 Click anywhere on Rung 1 2 Click Edit gt Rung comment from the Menu Commands y toolbar or click the Rung comment a icon The Rung Comment Dialog screen displays 3 Click in the white area of the dialog screen and enter This is an X to Y conversion program If any two points on a line are determined this XY instructions determine all remainin points This program allows the X values to be converted to Y values and Visa Versa The points are 0 0 and 4000 2000 4 Click OK to save the comments The rung comment displays above Rung 1 2001 IDEC CORPORATION 15 XY CONVERSION 15 10 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Step 5 Enter an NO Contact on Rung 2 S To enter an NO contact 1 Click the Normally Open HH icon 2
169. s On contact displays at the beginning of Rung 9 14 TRANSMIT RECEIVE INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 14 9 Step 3 Enter an Analog to Digital Conversion Instruction To enter an analog to digital conversion instruction 1 Click the Analog to Digital is icon 2 Click on Column 2 of Rung 1 The Analog to Digital Conversion dialog box displays Analog to Digital Conversion Digital Data Range 1 C 8 bits Ve Ts 12 bits oppo iater Tank Comment Senso 3 Click 12 bits in the Digital Data Range field Enter DO in the Tag Name and Allocation Number fields 5 Enter Water Tank Level Sensor in the Name Comment field 6 Click OK The analog to digital conversion instruction displays on Rung 1 2001 IDEC CORPORATION 14 TRANSMIT RECEIVE INSTRUCTIONS 14 10 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Step 4 Enter a Rung Comment for Rung 1 To enter a comment for Rung 1 1 Click anywhere on Rung 1 2 Click Edit gt Rung comment from the Menu Commands wye j toolbar or click the Rung comment Rung Comment Dialog screen displays 3 Click in the white area of the dialog screen and enter This is a flow control program which shows the Micro3C control ling a tank and reporting any overflow or low level to maintenance engineer Pager If the pager is alphanumeric
170. screen and enter SOTU executes for one scan only when contact I1 goes from off to on 4 Click OK to save the comments The rung comment displays above Rung 1 Step 5 Enter a Comment for Rung 2 To enter a rung comment 1 Click anywhere on Rung 2 2 Click Edit Edit Rung comment from the Menu Com ur mands toolbar or click the Rung comment icon The Rung Comment Dialog screen displays 3 Click in the white area below the existing text in the dialog screen and enter SOTD executes for one scan only when contact I2 goes from on to off 4 Click OK to save the comments The rung comment displays above Rung 2 2001 IDEC CORPORATION 8 SINGLE OUTPUT INSTRUCTIONS 8 8 BASIC INSTRUCTIONS WINDLDR TUTORIAL Step 6 Save the Program gt To name and save this program 1 Click File gt Save as from the Menu Commands toolbar The Save As dialog box displays 2 Enter SOTU in File Name field of the dialog box 3 Click the OK button or press the ENTER key to confirm Step 7 Print Transfer and Monitor the Program To print this program please refer to page 4 9 To transfer this program refer to page 4 12 To monitor this program refer to page 4 13 Exercise 8 Creating an SOT Program Micro 1 and FA Series PLCs Because most PLC instructions are executed with every scan it is sometimes nec essary to use single shot commands As shown in Exercise 6 it is possible for b
171. sed to unlatch RST the pump You will use the elements from this figure to create your program CONTROL SYSTEMS APPLICATION INDUSTRIAL TANK _5 1_ STOP 1 z TO PRODUCTION PUMPA Latch N O alternate action pushbutton wired to I1 Unlatch N O alternate action pushbutton wired to I2 Pump A Wired to Q0 7 SET RESET INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTION 7 3 Follow the steps below to create a set reset program When completed your program screen should look like this IN WindLDR 2 11w C WINDLDR SETREST LDR File Edit View Configure Compile Online Window Help SIR Hele a sla 7 sol d ces 11 ss po pma eo e eo N DIAK Jma mr nea n This program shows a Normally Open contact I1 latching an output Q0 and a Normally Open contact I2 unlatching it When I1 comes on once or stays on Q0 is set or latched Pump A wired to Q0 When I2 comes on Q0 will reset or unlatch Pump Unlatch wired to 00 0200000 Conversion to mnemonics succeeded Code file created Step 1 Click the New a Icon to Open a New File A blank ladder logic program screen displays 2001 IDEC CORPORATION 7 SET RESET INSTRUCTIONS 7 4 BASIC INSTRUCTIONS WINDLDR TUTORIAL Step 2 Enter the Input Con
172. t from the Menu Commands x toolbar or click the Rung comment al icon The Rung Comment Dialog screen displays 3 Click in the white area of the dialog screen and enter When 10 is On X value in 1210 is converted to Y value and stored in D15 Click OK to save the comments The rung comment displays above Rung 2 15 XY CONVERSION 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 15 13 Step 8 Enter an NO Contact on Rung 3 lt gt To enter an NO contact 1 Click the Normally Open icon 2 Click on Column 1 of Rung 3 The Normally Open LOD dialog box displays Normally Open x Type Tag Name Nomel Open Allocation Togor C Normally Closed Number Tag Convert Comment fy to x 3 Enter I1 in the Tag Name and Allocation Number fields Enter Convert Y to X in the Name Comment field 5 Click OK The Convert Y to X contact displays at the beginning of Rung 3 2001 IDEC CORPORATION 15 XY CONVERSION 15 14 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL 3 Step 9 Enter an XY Conversion Instruction on Rung 3 To enter an XY conversion instruction 1 Click the XY Convert e icon 2 Click on Column 2 of Rung 3 The XY Convert Format XYFS dialog box displays Convert Y to X Type Convert X to Y CVXTY poo11 poozo Convert Y to X CVYTX poo11 poozo N i value Converted Y in D11 value in
173. t value Timer to to compare compare with Ladder Diagram TC Program List To gt T3 Prgm Adrs Instruction Data D15 0 gt T3 Q 1 D15 2 OUT Ql 5 TIMER INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTIONS 5 17 Follow the steps below to create a timer comparison program When completed your program screen should look like this W WindLDR 2 11 C WINDLDR TIMCOMP LDR u File Edi View Configure Compile Online Window Help REE GE ETB EEUU lh E pe MEERE Normally Closed contact 0 will constantly and internally energize timer 0 When the preset value of 10 is reached 0 will reset and time again 1 560 Timer from 10 0 comi 000 01 00001 Insert User Communication TXD RXD Instruction Step 1 Click the New Icon to Open a New File A blank ladder logic program screen displays 2001 IDEC CORPORATION 5 TIMER INSTRUCTIONS 5 18 BASIC INSTRUCTIONS WINDLDR TUTORIAL Step 2 Enter the TOOO Contact To enter the T000 contact 1 Click the Normally Closed aH icon 2 Click on Column 1 of Rung 1 The Normally Closed dialog box displays You can move from field to field within the dialog box by press ing the TAB key or by clicking in the desired field 3 Enter T000 in the Tag Name field of the dialog box 4 Enter allocation number T000 in the Allocation Number field 5 Enter 1 Sec Timer from 10 0 in
174. tact I1 S To enter the input contact I1 contact 1 Click the Normally Open d H icon Notice that as you move the pointer away from the icon the icon symbol remains next to the pointer 2 Click on Column 1 of Rung 1 The Normally Open LOD dialog box displays You can move from field to field within a dialog box by pressing the TAB key or by clicking in the desired field 3 Enter I1 in the Tag Name field of the dialog box 4 Enter in the Allocation Number field 5 Enter N O I1 Latch in the Tag Name Comment field 7 SET RESET INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTION 7 5 Your completed dialog box should look like this Normally Open Normally Open Allocation Normally Closed Number 17001 TagName n o 11 Comment 6 Click the OK button or press the ENTER key to confirm The 1 contact displays at the beginning of Rung 1 2001 IDEC CORPORATION 7 SET RESET INSTRUCTIONS 7 6 BASIC INSTRUCTIONS WINDLDR TUTORIAL Step 3 Enter the Pump A Set Output Coil S To enter the set output coil 1 Click the Set red icon 2 Click on Column 2 of Rung 1 The Set SET dialog box displays 3 Enter QO in the Tag Name field of the dialog box 4 Enter QO in the Allocation Number field 5 Enter Pump A is wired to QO in the Tag Name Comment field Your completed dialog box should look
175. ter 13 Calendar uM EE 13 1 Calendar Clock Instructions Micro and Micro C 13 1 Calendar Read CALR 13 2 Example CALR 13 2 Clock Read CLKR 13 3 Example CLKR 13 3 Valid Operands Standard Processing 13 4 Repeat Operation in the Move Instruction 13 4 TABLE OF CONTENTS 2001 4 6 WINDLDR TUTORIAL VII Exercise 15 Creating a Calendar Clock Program 13 6 Real Time Clock and Calendar ONC 13 20 The Week Comparison Instruction 13 20 Week Compare ON WKCMP ON 13 21 Week Compare OFF WKCMP OFF 13 21 Week Table WKTBL 13 22 Examples WKCMP ON OFF 13 23 Setting Calendar Clock Using WindLDR 13 25 Setting Calendar Clock Using a User Program 13 27 Real Time Clock and Calendar FA3S CP11T 13 30 Clock Set CLKST 13 31 Assignment Codes 13 32 Clock Read CLKRD 13 33 Clock Adjust CLKAJ 13 34 Clock Comparison Format CLKCF 13 35 Clock Function MicroSmart 13 35 Setting Calendar Clock 13 36 Setting Calendar Clock Using a User Program 13 37 Example Setting Calendar Clock Data 13 38 Adjusting Clock Using a User Program 13 39 Example Adjusting Calendar Clock Data to 0 Seconds 13 39 Chapter 14 Transmit and Receives SEAS EUER OOS aS 14 1 Transmit TXD 14 1 Valid Operands Standard Processing 14 2 Data Registers 14 5 Exercise 16 Creating a Transmit Program 14 6 Transmit and Receive Instructions for 2001 4 6 TABLE OF CONTENTS WINDLDR TUTORIAL
176. the icon symbol remains next to the pointer 2 Click on Column 1 of Rung 1 The Normally Open LOD dialog box displays You can move from field to field within the dialog box by press ing the TAB key or by clicking in the desired field 3 Enter Start 1 in the Tag Name field of the dialog box 4 Enter allocation number in the Allocation Number field 5 Enter N O P B is wired to I1 in the Tag Name Comment field 2001 IDEC CORPORATION 5 TIMER INSTRUCTIONS 5 10 BASIC INSTRUCTIONS WINDLDR TUTORIAL Your completed dialog box should look like this Normally Open Type Tag Name TEE 6 Normally Open Allocation Number C Normally Closed Tag Name 0 P B is Comment tired to 11 6 Click the OK button or press the ENTER key to confirm The Start 1 contact displays at the beginning of Rung 1 5 TIMER INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTIONS 5 11 Step 3 Enter the Timer gt To enter the timer 1 Click the Timer rH icon 2 Click on Column 2 of Rung 1 The 100 msec Timer TIM dialog box displays 3 Enter T000 in the Tag Name field of the dialog box 4 Enter TO in the Allocation Number field 5 Enter 100 in the Preset Value field for a 10 second delay 6 Enter 10 Sec Timer On Delay in the Tag Name Comment field Your completed dialog box should look like this 100 msec Timer x Type Tag Name C 1 sec Timer
177. the Tag Name Comment field Your completed dialog box should look like this Normally Closed x Type Tag Name C Nomally Open Allocation 55 Normally Closed Number TagName 1 5 Timer Comment ffrom 10 0 N 6 Click the OK button or press the ENTER key to confirm The 7000 contact displays at the beginning of Rung 1 5 TIMER INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTIONS 5 19 Step 3 Enter the Timer gt To enter the timer 1 Click the Timer n icon 2 Click on Column 3 of Rung 1 The 1 sec Timer TML dialog box displays 3 In the Type field click the 1 sec Timer option 4 Enter T000 in the Tag Name field of the dialog box 5 Enter T000 in the Allocation Number field 6 Enter 0010 in the Preset Value field for a 10 second delay 7 Enter 1 Sec Timer from 10 0 in the Tag Name Comment field Your completed dialog box should look like this Type 1 sec Timer C 100 msec Timer 7 Click the OK button or press the ENTER key to confirm The 7000 instruction displays next to 7000 on Rung 1 2001 IDEC CORPORATION 5 TIMER INSTRUCTIONS 5 20 BASIC INSTRUCTIONS WINDLDR TUTORIAL Step 4 Enter the Timer Comparison gt To enter the timer comparison 1 Click the Timer Comparison RH icon 2 Click on column 1 of rung 2 The Timer Comparison TC dialog box displays 3 In the Type field click the Timer Comparison TC
178. then the PLC can transmit text messages as well as numeric ones 4 Click OK to save the comments The rung comment displays above Rung 1 14 TRANSMIT RECEIVE INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 14 11 Step 5 Enter a Comparison Instruction on Rung 2 To enter a comparison instruction 1 Click the Comparison 2 Click on Column 2 of Rung 2 The Comparison dialog box displays Compare Greater Than or Equal To uu Ge we 5222 PIS 2000 lt gt C CMP lt ww po Repeat Repeat Repeat C CMP lt Water Tank 2000 Level r R Trigger gie de Level Sensor Dverflow Instruti CMP2 Data Type 3 Click CMP gt in the Type field 4 Enter DO DO and Water Tank Level Sensor in the S1 col ummn 4 Enter 2000 2000 and 2000 Level Overflow in the S2 col umn 4 Enter 0 MO and I R Trigger Instruction in the D1 column 5 Click OK 2001 IDEC CORPORATION 14 TRANSMIT RECEIVE INSTRUCTIONS 14 12 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Step 6 Enter a Comparison Instruction on Rung 2 To enter a comparison instruction 1 Click the Comparison 2 Click on below the previous comparison instruction on Column 2 of Rung 2 The Comparison dialog box displays Compare Less Than or Equal To Tee 1 5 2 D1
179. to QO Pump B Wired to Q1 6 COUNTER INSTRUCTIONS 2001 IDEC CORPORATION WINDLDR TUTORIAL BASIC INSTRUCTION 6 9 Follow the steps beginning on the next page to create a counter counter comparison program When completed your program screen should look like this WW WindLDR 2 11w C WINDLDR COUNTERS LDR File Edi View Configure Compile Online Window Help 5 ERE 7 0 ak it b nen n BLA es S a eee o This is a counter program using comparison instructions to turn on Pump A and pump B wired to outputs Q0 and Q1 Starting with counter 60 with preset value of 3 When counter 0 receives 3 counts it resets itself Counter 3 Reset CHT C000 0003 Pump is Wired to Q0 Pump B is Wired to Q1 000 01 000 00 Step 1 Click the New Icon to Open a New File A blank ladder logic program screen displays 2001 1 6 COUNTER INSTRUCTIONS 6 10 BASIC INSTRUCTIONS WINDLDR TUTORIAL Step 2 Enter a Reset Contact To enter a reset contact 1 Click the Normally Open H icon Notice that as you move the pointer away from the icon the icon symbol remains next to the pointer 2 Click on Column 1 of Rung 1 The Normally Open LOD dialog box displays You can move from field to field within a dialog box by pressing the TAB key or by clicking in the desired field 3 Enter C000 in the Tag Name field of the
180. u do not agree to all of the terms of this agreement you must erase all installed IDEC Corporation software files from your system User Comments IDEC Corporation is eager to receive comments about its products and docu mentation If you have any comments please phone fax or mail them IDEC Corporation 1175 Elko Drive Sunnyvale CA 94289 PH 800 262 4332 FAX 800 635 6246 www idec com 2001 IDEC CORPORATION TABLE OF CONTENTS Chapter 1 Document Conventions 1 1 On Line Help 1 3 Technical Support 1 3 Chapter 2 Whatisa ca ACER ere Okt REPRE TOP IS te SE 2 1 Elements of a PLC System 2 2 Programming Device 2 3 Power Supply 2 3 Central Processing Unit CPU 2 3 Memory 2 3 Input Interface 2 4 Output Interface 2 4 How PLCs Work 2 5 PLC Scan 2 6 Read Inputs 2 7 Execute Programmed Logic 2 7 Update Outputs 2 8 Communications and Housekeeping 2 8 Defining Ladder Logic Input Conditions 2 8 Examine On Contact 2 8 Examine Off Contact 2 8 2001 4 0 6 WINDLDR TUTORIAL Chapter 3 Getinge Started cp est arid SUR ate Mla ath oe BS le ibo od 3 1 Installing WindLDR 3 1 Starting WindLDR 3 2 Program Editing Features 3 3 Deleting an Entry 3 4 Selecting Your PLC Type 3 5 Configuring PLC Function and Communication Settings 3 8 Choosing Ladder Preferences 3 12 Chapter 4 Introduction to Basic Programming 4 1
181. ult is true an output or internal relay is turned on The repeat operation can also be used to compare more than one set of data Since the comparison instructions are executed with each scan while an input is on a pulse input from an SOTU or SOTD instruction should be used as required Compare Equal To CMP CMP SIR 52 8 DI R REP When an input 1s on the 16 bit Micro Micro C and MicroSmart or 16 or 32 bit ONC word data des ignated by source operands S1 and S2 are compared When S1 data is equal to S2 data the destination operand D1 is turned on When the condition is not met D1 is turned off 2001 IDEC CORPORATION 10 ARITHMETIC COMPARISON INSTRUCTIONS 10 8 ADVANCED INSTRUCTIONS WINDLDR TUTORIAL Compare Not Equal SIR SXR DIR RE DOR When an input Is on the 16 bit Micro Micro C and MicroSmart or 16 or 32 bit ONC word data designated by source operands 1 and S2 are compared When 51 data is not equal to S2 data the destination operand D1 is turned on When the condi tion is not met D1 is turned aff Compare Less Than CMP When an input is the 16 bit Micro Micro C and MicroSmart or 16 or 32 bit ONC word data designated by source operands 1 and S2 are compared When 51 data is less than S2 data the d
182. y source operands 1 and S2 are compared When 51 data is greater than or equal to 2 data the destination operand D1 is turned on When the condition is not met D1 is turned off Interval Compare Greater Than or Equal to gt ONC and MicroSmart Only ICMP SI 52 3 REPL 312522832 D T When an input is on the 16 or 32 bit ONC word data designated by source oper ands S1 S2 and S3 are com pared When the condition is met the destination operand D1 is turned on When the condition is not met D1 is turned off 1O ARITHMETIC COMPARISON INSTRUCTIONS 2001 1 WINDLDR TUTORIAL ADVANCED INSTRUCTIONS 10 1 1 Valid Operands Standard Processing Operand PLC Function CPU Type 0 M T C R D Constant Repeat Micro and 0 0 0 0 0 99 10 Micro C 35 9791 0 517 i31 163 l g 65535 1731 ONC z 0 597 0 2557 0 0 9 o 7999 0 4E9 1 99 597 255 255 255 S 10 0 5 0 3 0 317 0 31 0 31 0 63 0 399 0 6535 9 51 1610 0 1277 0 99 0 99 6 0 129 0 1 99 Source 1 5 12410 0 15 0 107 127 65535 o P D20K3 0 0 MicroSmart 3 D2053 187 187 7 01299 E D20RKI E LI D20RS1 307 507 9 1277 0 99 0 99 15 2000 65535 19 7 7999 UM 307 307 Micro and 0 0 0 0 0 99 0 Micro C 45 9791 0 317 31 5
Download Pdf Manuals
Related Search
Related Contents
EverFlo / EverFlo - OxyCare Sauerstoff & Beatmungstechnik Panafax UF-6010 Westinghouse 56-Inch Specification Sheet Guide de l`utilisateur WINDY BOY 2500 / 3000 - SMA Solar Technology AG Conceptronic Wireless 54Mbps Broadband Starter pack Whirlpool GH9177XL User's Manual Sony TRINITRON KV-TF21M61 User's Manual advertencia - Alliance Laundry Systems Mode d`emploi Copyright © All rights reserved.
Failed to retrieve file