Download Ladder Programming Manual and more Exams Logic in PDF only on Docsity!
FT1A Series
FT9Y-B
Ladder Programming Manual
Preface-2 SMARTAXIS L ADDER P ROGRAMMING MANUAL FT9Y-B
A BOUT THIS MANUAL
This user’s manual describes basic and advanced instructions and the usage of software for SmartAXIS ladder programming.
Chapter 1: Operation Basics
General information about simple operating procedures from creating a user program using WindLDR on a computer to monitoring the SmartAXIS operation.
Chapter 2: Ladder Program Monitoring on the SmartAXIS
Monitoring the ladder program in the SmartAXIS.
Chapter 3: Device Addresses
Device addresses available for the SmartAXIS to program basic and advanced instructions. Special internal relays and special data registers are also described.
Chapter 4: Instructions Reference
List of all basic and advanced instructions and general rules of using advanced instructions, terms, data types, and formats used for advanced instructions.
Chapter 5: Basic Instructions
Programming of the basic instructions, available devices, and sample programs.
Chapter 6 through Chapter 26:
Detailed descriptions for advanced instructions.
Appendix
Additional information about execution times and byte sizes for instructions.
Index
Alphabetical listing of key words.
Publication history
March 2013 First Edition
Trademarks
SmartAXIS is a trademark of IDEC Corporation.
IMPORTANT INFORMATION
Under no circumstances shall IDEC Corporation be held liable or responsible for indirect or consequential damages resulting from the use of or the application of IDEC PLC components, individually or in combination with other equipment. 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 including 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.
SMARTAXIS L ADDER PROGRAMMING MANUAL FT9Y-B1382 Preface-
RELATED M ANUALS
The following manuals related to the SmartAXIS are available. Refer to them in conjunction with this manual.
Type No. Manual Name Description
FT9Y-B
SmartAXIS Pro/Lite User’s Manual
Describes product specifications, installation and wiring instructions, instructions for basic programming operations and special functions, device and instruction lists, communication functions, and troubleshooting procedures for the SmartAXIS Pro/ Lite series.
FT9Y-B
SmartAXIS Ladder Programming Manual (this manual)
Describes basic operations for ladder programming, instructions for editing and monitoring ladders on the SmartAXIS, available devices and instruction lists, and details of each instruction.
FT9Y-B1390 SmartAXIS Touch User’s Manual
Describes product specifications, installation and wiring instructions, instructions for setting basic programming actions and special functions, device and instruction lists, communication functions, and troubleshooting procedures for the Touch series.
WindLDR Help
Describes usage instructions for WindLDR, programming software for the SmartAXIS Pro/Lite series.
WindO/I-NV3 Help
Describes programming for the SmartAXIS Touch series, and usage instructions for the WindO/I-NV3 configuration software.
FT1A SMARTAXIS U SER’ S M ANUAL FT9Y-B1382 I
- Safety Precautions............................................................................................................................. Preface- TABLE OF CONTENTS
- About This Manual............................................................................................................................. Preface-
- Related Manuals................................................................................................................................ Preface-
- Names and Abbreviations Used in this Manual Preface-
- Start WindLDR 1- C HAPTER 1: Operation Basics
- PLC Selection 1-
- Create Ladder Program 1-
- Save Project................................................................................................................................................ 1-
- Simulate Operation...................................................................................................................................... 1-
- Download Program 1-
- Monitor Operation 1-
- Quit WindLDR 1-
- Basic Operations 2- C HAPTER 2: Ladder Program Monitoring on the SmartAXIS
- Ladder Program Monitor 2-
- Using the Ladder Program Monitor................................................................................................................ 2-
- Device Addresses 3- C HAPTER 3: Device Addresses
- Special Internal Relays................................................................................................................................. 3-
- Special Data Registers 3-
- Basic Instruction List.................................................................................................................................... 4- C HAPTER 4: Instructions Reference
- Advanced Instruction List............................................................................................................................. 4-
- Advanced Instruction Applicable SmartAXIS 4-
- Structure of an Advanced Instruction 4-
- Input Condition for Advanced Instructions..................................................................................................... 4-
- Source and Destination Devices.................................................................................................................... 4-
- Using Timer or Counter as Source Device...................................................................................................... 4-
- Using Timer or Counter as Destination Device 4-
- Data Types for Advanced Instructions 4-
- Discontinuity of Device Areas 4-
- NOP (No Operation) 4-
- LOD (Load) and LODN (Load Not) 5- C HAPTER 5: Basic Instructions
- OUT (Output) and OUTN (Output Not).......................................................................................................... 5-
- SET and RST (Reset) 5-
- AND and ANDN (And Not)............................................................................................................................ 5-
- OR and ORN (Or Not) 5-
- AND LOD (Load) 5-
- OR LOD (Load) 5-
- BPS (Bit Push), BRD (Bit Read), and BPP (Bit Pop)......................................................................................... 5-
- TML, TIM, TMH, and TMS (Timer) 5-
- TMLO, TIMO, TMHO, and TMSO (Off-Delay Timer) 5-
- CNT, CDP, and CUD (Counter).................................................................................................................... 5-
- CNTD, CDPD, and CUDD (Double-Word Counter)......................................................................................... 5-
- CC= and CC>= (Counter Comparison) 5-
- DC= and DC>= (Data Register Comparison) 5-
- SFR and SFRN (Forward and Reverse Shift Register).................................................................................... 5-
- SOTU and SOTD (Single Output Up and Down) 5-
- MCS and MCR (Master Control Set and Reset) 5-
- JMP (Jump) and JEND (Jump End) 5-
- END 5-
- II FT1A SMARTAXIS U SER’ S MANUAL FT9Y-B
- Restriction on Ladder Programming.............................................................................................................5-
- MOV (Move) 6- C HAPTER 6: Move Instructions
- MOVN (Move Not)....................................................................................................................................... 6-
- IMOV (Indirect Move).................................................................................................................................. 6-
- IMOVN (Indirect Move Not) 6-
- BMOV (Block Move) 6-
- IBMV (Indirect Bit Move) ............................................................................................................................6-
- IBMVN (Indirect Bit Move Not)....................................................................................................................6-
- NSET (N Data Set) .....................................................................................................................................6-
- NRS (N Data Repeat Set)............................................................................................................................6-
- XCHG (Exchange) ......................................................................................................................................6-
- TCCST (Timer/Counter Current Value Store) ................................................................................................6-
- CMP= (Compare Equal To) 7- C HAPTER 7: Data Comparison Instructions
- CMP<> (Compare Unequal To).................................................................................................................... 7-
- CMP< (Compare Less Than) 7-
- CMP> (Compare Greater Than).................................................................................................................... 7-
- CMP<= (Compare Less Than or Equal To) 7-
- CMP>= (Compare Greater Than or Equal To) 7-
- ICMP>= (Interval Compare Greater Than or Equal To).................................................................................. 7-
- LC= (Load Compare Equal To)..................................................................................................................... 7-
- LC<> (Load Compare Unequal To) 7-
- LC< (Load Compare Less Than)................................................................................................................... 7-
- LC> (Load Compare Greater Than) 7-
- LC<= (Load Compare Less Than or Equal To)............................................................................................... 7-
- LC>= (Load Compare Greater Than or Equal To) 7-
- ADD (Addition) 8- C HAPTER 8: Binary Arithmetic Instructions
- SUB (Subtraction) 8-
- MUL (Multiplication) 8-
- DIV (Division) 8-
- INC (Increment) ........................................................................................................................................8-
- DEC (Decrement).......................................................................................................................................8-
- ROOT (Root) .............................................................................................................................................8-
- SUM (Sum)................................................................................................................................................8-
- ANDW (AND Word) 9- C HAPTER 9: Boolean Computation Instructions
- ORW (OR Word) 9-
- XORW (Exclusive OR Word) 9-
- SFTL (Shift Left) ........................................................................................................................................10- C HAPTER 10: Shift / Rotate Instructions
- SFTR (Shift Right) ......................................................................................................................................10-
- BCDLS (BCD Left Shift)...............................................................................................................................10-
- WSFT (Word Shift).....................................................................................................................................10-
- ROTL (Rotate Left).....................................................................................................................................10-
- ROTR (Rotate Right) ................................................................................................................................10-
- HTOB (Hex to BCD) ...................................................................................................................................11- C HAPTER 11: Data Conversion Instructions
- BTOH (BCD to Hex) ...................................................................................................................................11-
- HTOA (Hex to ASCII) .................................................................................................................................11-
- ATOH (ASCII to Hex) .................................................................................................................................11-
- BTOA (BCD to ASCII) .................................................................................................................................11-
- ATOB (ASCII to BCD) ...............................................................................................................................11-
- ENCO (Encode) 11- FT1A SMARTAXIS U SER’ S M ANUAL FT9Y-B1382 III
- DECO (Decode) 11-
- BCNT (Bit Count)..................................................................................................................................... 11-
- ALT (Alternate Output) 11-
- CVDT (Convert Data Type)....................................................................................................................... 11-
- DTDV (Data Divide) 11-
- DTCB (Data Combine) 11-
- SWAP (Data Swap).................................................................................................................................. 11-
- WEEK (Weekly Timer)................................................................................................................................ 12- C HAPTER 12: Week Programmer Instructions
- YEAR (Yearly Timer) 12-
- MSG (Message) 13- C HAPTER 13: Display Instructions
- LABEL (Label) 14- C HAPTER 14: Program Branching Instructions
- LJMP (Label Jump) 14-
- LCAL (Label Call) 14-
- LRET (Label Return) 14-
- DJNZ (Decrement Jump Non-zero) 14-
- IOREF (I/O Refresh) 15- C HAPTER 15: Refresh Instructions
- HSCRF (High-speed Counter Refresh) 15-
- DI (Disable Interrupt) 16- C HAPTER 16: Interrupt Control Instructions
- EI (Enable Interrupt) 16-
- XYFS (XY Format Set) 17- C HAPTER 17: Coordinate Conversion Instructions
- CVXTY (Convert X to Y) 17-
- CVYTX (Convert Y to X) 17-
- AVRG (Average) 18- C HAPTER 18: Average Instructions
- PULS (Pulse Output) 19- C HAPTER 19: Pulse Output Instructions
- PWM (Variable Duty Cycle Pulse Output)..................................................................................................... 19-
- RAMP (Trapezoidal Control) 19-
- ZRN (Zero Return) 19-
- ARAMP (RAMP with Table) 19-
- DTML (1-sec Dual Timer) 20- C HAPTER 20: Dual / Teaching Timer Instructions
- DTIM (100-ms Dual Timer) 20-
- DTMH (10-ms Dual Timer) 20-
- DTMS (1-ms Dual Timer) 20-
- TTIM (Teaching Timer) 20-
- RAD (Degree to Radian) 21- C HAPTER 21: Trigonometric Function Instructions
- DEG (Radian to Degree) 21-
- SIN (Sine)................................................................................................................................................. 21-
- COS (Cosine) 21-
- TAN (Tangent) 21-
- ASIN (Arc Sine) 21-
- ACOS (Arc Cosine)..................................................................................................................................... 21-
- IV FT1A SMARTAXIS U SER’ S MANUAL FT9Y-B
- ATAN (Arc Tangent)...................................................................................................................................21-
- LOGE (Natural Logarithm) ..........................................................................................................................22- C HAPTER 22: Logarithm / Power Instructions
- LOG10 (Common Logarithm) ......................................................................................................................22-
- EXP (Exponent) .........................................................................................................................................22-
- POW (Power).............................................................................................................................................22-
- FIFOF (FIFO Format)..................................................................................................................................23- C HAPTER 23: File Data Processing Instructions
- FIEX (First-In Execute) ...............................................................................................................................23-
- FOEX (First-Out Execute)............................................................................................................................23-
- NDSRC (N Data Search) .............................................................................................................................23-
- TADD (Time Addition) ................................................................................................................................24- C HAPTER 24: Clock Instructions
- TSUB (Time Subtraction) ............................................................................................................................24-
- HTOS (HMS to Sec)....................................................................................................................................24-
- STOH (Sec to HMS)..................................................................................................................................24-
- HOUR (Hour Meter) .................................................................................................................................24-
- TXD (Transmit)..........................................................................................................................................25- C HAPTER 25: User Communication Instructions
- RXD (Receive) ...........................................................................................................................................25-
- ETXD (User Communication Transmit over Ethernet) ..................................................................................25-
- ERXD (User Communication Receive over Ethernet) ...................................................................................25-
- DLOG (Data Log) .......................................................................................................................................26- C HAPTER 26: Data Log Instructions
- TRACE (Data Trace) ...................................................................................................................................26-
- Execution Times for Instructions A- A PPENDIX
- Breakdown of END Processing Time A-
- Instruction Bytes......................................................................................................................................... A-
FT1A SMARTAXIS U SER’ S M ANUAL FT9Y-B1382 1-
1: OPERATION B ASICS
Introduction
This chapter describes basic procedures for operating WindLDR, software required for programming and maintenance of the SmartAXIS Pro/Lite series. Note: SmartAXIS Touch series use WindO/I-NV3 for programming. See the SmartAXIS Touch User’s Manual for instructions for programming and basic operation of WindO/I-NV3 with the Touch series.
Start WindLDR
From the Start menu of Windows, select Programs > Automation Organizer > WindLDR > WindLDR. WindLDR starts and a blank ladder editing screen appears with menus and tool bars shown on top of the screen.
FT1A SMARTAXIS U SER’ S M ANUAL FT9Y-B1382 1-
1: O PERATION B ASICS
Create Ladder Program
This section describes the procedure for creating a simple ladder program in WindLDR. Note: See "Instructions Reference" on page 4-1 for details on basic and advanced instructions.
Sample User Program
Note: One collection of a group of instructions that control output or advanced instructions is called a rung. WindLDR manages programs in rung units. Function descriptions can be configured as rung comments for individual rungs.
Start WindLDR
From the Start menu of Windows, select Programs > Automation Organizer > WindLDR > WindLDR. WindLDR starts and a blank ladder editing screen appears with menus and tool bars shown on top of the screen.
Create a sample program using WindLDR that performs the following operation: When only input I0 is turned on, output Q0 is turned on. When only input I1 is turned on, output Q1 is turned on. When both inputs I0 and I1 are turned on, output Q2 flashes in 1-sec increments.
Rung No. Input I0 Input I1 Output Operation 1 ON OFF Output Q0 is turned ON. 2 OFF ON Output Q1 is turned ON. 3 ON ON Output Q2 flashes in 1-sec increments.
1: OPERATION BASICS
1-4 FT1A SMARTAXIS U SER’ S MANUAL FT9Y-B
Edit User Program Rung by Rung
Start the user program with the LOD instruction by inserting a NO contact of input I0.
1. From the WindLDR menu bar, select Home > Basic > A (Normally Open). 2. Move the mouse pointer to the first column of the first line where you want to insert a NO contact, and click the left mouse button.
Note: Another method to insert a NO (or NC) contact is to move the mouse pointer where you want to insert the contact, and type A (or B). The Normally Open dialog box appears.
1: OPERATION BASICS
1-6 FT1A SMARTAXIS U SER’ S MANUAL FT9Y-B
When completed, the ladder program looks like below.
The ladder program can be checked to see if it it contains any user program syntax error.
10. From the menu bar, select Home > Convert (above Program) . When the instruction symbols are connected correctly, conversion is completed successfully. If any error is found, the errors are listed on the screen. Then, make corrections as necessary. Now, save the file with a new name.
Save Project
1. Select the WindLDR application button at the upper-left corner of the WindLDR screen, followed by Save , and type TEST01 in the File Name field. Change the Folder or Drive as necessary.
To insert a new ladder line without creating a new rung, press the down arrow key when the cursor is on the last line or press the right arrow key when the cursor is at the right-most column of the last line.
FT1A SMARTAXIS U SER’ S M ANUAL FT9Y-B1382 1-
1: O PERATION B ASICS
Simulate Operation
Before downloading the user program, you can simulate the operation on the WindLDR screen without connecting the SmartAXIS. From the WindLDR menu bar, select Online > Simulation. The Simulation screen appears.
To change an input status, place the mouse pointer on the input and right-click the mouse. In the pop-up menu, select Set or Reset to set or reset the input. To quit simulation, from the WindLDR menu bar, select Online > Simulation.
Download Program
You can download the user program from WindLDR running on a computer to the SmartAXIS. User programs can be downloaded to the SmartAXIS from WindLDR using USB or Ethernet. This section describes the procedure from configuring communication settings to downloading a user program to the SmartAXIS via USB. To use USB, the SmartAXIS USB port must be connected to a computer using a USB cable.
Note: In order for WindLDR to communicate with the SmartAXIS via USB, a dedicated USB driver must be installed on the computer. See the “Appendix” of the SmartAXIS Pro/Lite User's Manual for driver installation procedure.
1. From the WindLDR menu bar, select Online > Set Up. 2. The Communication Settings dialog box appears. Click the USB tab and then click OK. The communication method is now set to USB. Next, download a user program. 3. From the WindLDR menu bar, select Online > Download. The Download dialog box appears, then click OK. The user program is downloaded to the SmartAXIS.
Windows computer
USB port
USB cable HG9Z-XCM42 USB maintenance cable
SmartAXIS Pro
Type A plug Mini-B plug
USB port (USB 2.0 Mini-B connector)
SMARTAXIS LADDER PROGRAMMING MANUAL FT9Y-B1382 2-
2: LADDER PROGRAM MONITORING ON THE SMARTAXIS
Introduction
SmartAXIS Pro and Touch are equipped with an LCD and capable of monitoring the ladder program in the SmartAXIS. This chapter describes how to use the ladder program monitoring. Notes For other SmartAXIS Pro functions, refer to the "SmartAXIS Pro/Lite User’s Manual". For other SmartAXIS Touch functions, refer to the "SmartAXIS Touch User’s Manual".
Applicable SmartAXIS
Basic Operations
LCD and Operation Buttons
SmartAXIS Pro
For the SmartAXIS Touch
Note: The LCD resolution (number of pixels) differs between the SmartAXIS Pro and the SmartAXIS Touch, but the content of the ladder program display screen is the same, excluding the display area for the SmartAXIS Touch operation buttons. This chapter describes the operations using the LCD display on the SmartAXIS Pro. When using the SmartAXIS Touch, read this manual taking into consideration that the operation button display area is omitted.
Button Operations The button operations differ when the button is pressed and released and when the button is pressed and held.
Notes This chapter describes the button operations for the ladder program monitoring. For details on SmartAXIS Pro button operations, refer to the "SmartAXIS Pro/Lite User’s Manual". For details on SmartAXIS Touch button operations, refer to the "SmartAXIS Touch User’s Manual".
FT1A-12 FT1A-24 FT1A-40 FT1A-48 FT1A-Touch X X X X X
Five symbols horizontally and two symbols vertically are displayed in the ladder program display screen.
The operation buttons are laid out on SmartAXIS Pro as shown in the diagram on the right. A total of six buttons, (left), (up), (down), (right), (ESC), and (OK), are available to use.
Five symbols horizontally and two symbols vertically are displayed in the ladder program display screen.
The operation buttons are laid out on the LCD display screen. A total of six buttons, (left), (up), (down), (right), (ESC), and (OK), are available to use.
Press/Hold Operation Press The button is pressed for 0.1 seconds or more and less than 2 seconds and then released. Press and hold The button is pressed for 2 seconds or more and then released.
Ladder program display
Operation buttons
IMOVN M
I D0000-
1 2
IMOVN
M
I
D0000-
00001
00002
Ladder program display
Operation buttons ^ ^ ^ ^ ESC^ OK
IMOVN
M
I
D0000-
00001
00002
ESC OK
IMOVN M
I D0000-
00001 00002
2: L ADDER P ROGRAM MONITORING ON THE S MARTAXIS
2-2 SMARTAXIS LADDER PROGRAMMING MANUAL FT9Y-B
List of Button Operations on the Ladder Program Display Screen
List of Button Operations when an Item is Selected
Button Press/Hold Basic operation
Press
When the cursor is on a NO contact or a NC contact, this toggles the state of that contact. When the cursor is not on a NO contact or a NC contact, nothing happens. Press and hold Displays the details screen (a screen that displays the details of the instruction at the cursor position).
/
Press Ends the ladder program monitoring. Press and hold Nothing happens.
/
Press Moves the cursor up one line. When the cursor is on the top line of a rung, nothing happens. Press and hold Repeats the press operation.
/
Press Moves the cursor down one line. When the cursor is at the last line of the ladder program, nothing happens. Press and hold Repeats the press operation.
/
Press Moves the cursor to the right. When the cursor is at the right edge of a line, nothing happens. Press and hold Repeats the press operation.
/
Press Moves the cursor to the left. When the cursor is at the left edge of a line, nothing happens. Press and hold Repeats the press operation.
Button Press/Hold Basic operation
/
Press Nothing happens. Press and hold
/
Press Returns to the ladder program display screen. Press and hold Ends the ladder program monitor.
Press
With the repeat designation ('R' is displayed), this button displays the device with 1 added to the currently displayed device number. This operates until the repeat count displayed in REP matches the repeatable range. If there is no repeat designation ('-' is displayed), nothing happens. Press and hold Repeats the press operation.
Press
With the repeat designation ('R' is displayed), this button displays the device with 1 subtracted from the currently displayed device number. This operates until the repeat count displayed in REP is "01". If there is no repeat designation ('-' is displayed), nothing happens. Press and hold Repeats the press operation.
/
Press If there is a displayed item above the current screen, the screen moves up once. Press and hold Repeats the press operation.
/
Press If there is a displayed item below the current screen, the screen moves down once. Press and hold Repeats the press operation.
I0000 SOTU
00001
00002 M0000 M0001 M0002 M0003 M
1-
'5%
Details screen
OPCODE: MOV (W) S1 -: D0000 = 1234 D1 R: D0123 = 1234 REP : 03/
1-
'5%