background image

FT1A S

MART

A

XIS

 U

SER

S

 M

ANUAL

 FT9Y-B1382

16-1

16: I

NTERRUPT

 C

ONTROL

 I

NSTRUCTIONS

Introduction

The DI or EI instruction disables or enables interrupt inputs and timer interrupt individually.

DI (Disable Interrupt)

EI (Enable Interrupt)

Applicable CPU Modules

Valid Devices

Interrupt inputs I0 through I7 and timer interrupt selected in the Function Area Settings are normally enabled when the CPU starts. When the DI 
instruction is executed, interrupt inputs and timer interrupt designated as source device S1 are disabled even if the interrupt condition is met in the 
user program area subsequent to the DI instruction. When the EI instruction is executed, disabled interrupt inputs and timer interrupt designated as 
source device S1 are enabled again in the user program area subsequent to the EI instruction. Different interrupts can be selected for the DI and EI 
instructions to disable and enable interrupt inputs selectively. For Interrupt Input and Timer Interrupt, see pages 5-34 and 5-36 (Basic Vol.).

Make sure that interrupt inputs and timer interrupt designated as source device S1 are selected in the Function Area Settings. Otherwise, when the 
DI or EI instruction is executed, a user program execution error will result, turning on special internal relay M8004 and the ERR LED on the CPU 
module.

The DI and EI instructions cannot be used in an interrupt program. If used, a user program execution error will result, turning on special internal 
relay M8004 and the ERR LED on the CPU module. For details about the user program execution errors, see Chapter 4 “User Program Execution 
Errors” on page 4-21.

Special Internal Relays M8070-M8075 and M8144: Interrupt Status

Special internal relays M8070 through M8075 and M8144 are provided to indicate whether interrupt inputs and timer interrupt are 
enabled or disabled.

When input is on, interrupt inputs and timer interrupt designated by source device S1 are disabled.

DI

S1
**

When input is on, interrupt inputs and timer interrupt designated by source device S1 are enabled.

EI

S1
**

FT1A-12

FT1A-24

FT1A-40

FT1A-48

FT1A-Touch

X

X

X

X

X

Device

Function

I

Q

M

R

T

C

D

Constant

Repeat

S1 (Source 1)

Interrupt inputs and timer interrupt

1-127

Interrupt

Interrupt Enabled

Interrupt Disabled

Interrupt Input I0

M8070 ON

M8070 OFF

Interrupt Input I2

M8071 ON

M8071 OFF

Interrupt Input I3

M8072 ON

M8072 OFF

Interrupt Input I5

M8073 ON

M8073 OFF

Interrupt Input I6

M8074 ON

M8074 OFF

Interrupt Input I7

M8075 ON

M8075 OFF

Timer Interrupt 

M8144 ON

M8144 OFF

Summary of Contents for microsmart pentra

Page 1: ...FT1A SERIES FC9Y B1382 Ladder Programming Manual ...

Page 2: ...allation in a cabinet Do not install the SmartAxis outside a cabinet Install the SmartAxis in environments described in FT1A series Pro Lite user s manual If the SmartAxis is used in places where the SmartAxis is subjected to high temperature high humidity condensation corrosive gases excessive vibrations and excessive shocks then electrical shocks fire hazard or malfunction will result The enviro...

Page 3: ...ed descriptions on advanced instructions Appendix Additional information about execution times and size for instructions Index Alphabetical listing of key words Publication history October 2012 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 ...

Page 4: ...ming 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 FT1A Series Touch User s Manual Describes product specifications installation and wiring instructions instructions for setting basic programming actions and special functions dev...

Page 5: ...e for SmartAxis Pro and Lite models with 12 I O points FT1A B12RA FT1A B12RC FT1A H12RA FT1A H12RC 24 I O type General name for SmartAxis Pro and Lite models with 24 I O points FT1A B24RA FT1A B24RC FT1A H24RA FT1A H24RC 40 I O type General name for SmartAxis Pro and Lite models with 40 I O points FT1A B40RKA FT1A B40RSA FT1A B40RC FT1A H40RKA FT1A H40RSA FT1A H40RC 48 I O type General name for Sm...

Page 6: ...Preface 5 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...

Page 7: ... Using Timer or Counter as Source Device 4 9 Using Timer or Counter as Destination Device 4 9 Data Types for Advanced Instructions 4 10 Discontinuity of Device Areas 4 14 NOP No Operation 4 14 CHAPTER 5 Basic Instructions Basic Instruction List 5 1 LOD Load and LODN Load Not 5 3 OUT Output and OUTN Output Not 5 3 SET and RST Reset 5 4 AND and ANDN And Not 5 5 OR and ORN Or Not 5 5 AND LOD Load 5 6...

Page 8: ...re Less Than 7 8 LC Load Compare Greater Than 7 8 LC Load Compare Less Than or Equal To 7 8 LC Load Compare Greater Than or Equal To 7 8 CHAPTER 8 Binary Arithmetic Instructions ADD Addition 8 1 SUB Subtraction 8 1 MUL Multiplication 8 1 DIV Division 8 1 INC Increment 8 13 DEC Decrement 8 13 ROOT Root 8 14 SUM Sum 8 15 CHAPTER 9 Boolean Computation Instructions ANDW AND Word 9 1 ORW OR Word 9 1 XO...

Page 9: ... XYFS XY Format Set 17 1 CVXTY Convert X to Y 17 2 CVYTX Convert Y to X 17 3 CHAPTER 18 Average Instructions AVRG Average 18 1 CHAPTER 19 Pulse Output Instructions PULS Pulse Output 19 1 PWM Variable Duty Cycle Pulse Output 19 8 RAMP Trapezoidal Control 19 15 ZRN Zero Return 19 26 ARAMP RAMP with Table 19 32 CHAPTER 20 Dual Teaching Timer Instructions DTML 1 sec Dual Timer 20 1 DTIM 100 ms Dual Ti...

Page 10: ...ime Subtraction 24 5 HTOS HMS to Sec 24 9 STOH Sec to HMS 24 10 HOUR Hour Meter 24 11 CHAPTER 25 User Communication Instructions TXD Transmit 25 1 RXD Receive 25 7 ETXD User Communication Transmit over Ethernet 25 21 ERXD User Communication Receive over Ethernet 25 21 CHAPTER 26 Data Log Instructions DLOG Data Log 26 1 TRACE Data Trace 26 8 APPENDIX Execution Times for Instructions A 1 Breakdown o...

Page 11: ... Lite series Note SmartAxis Touch series use WindO I NV3 for programming See the FT1A Series 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 t...

Page 12: ... type in the selection box 3 Click OK Press this button then the same PLC will be selected as default when WindLDR is started next time PLC Selection Option SmartAxis CPU Module Type No FT1A 12 FT1A 24 FT1A 40 FT1A 48 FT1A H12RA FT1A B12RA FT1A H12RC FT1A B12RC FT1A H24RA FT1A B24RA FT1A H24RC FT1A B24RC FT1A H40RKA FT1A H40RSA FT1A B40RKA FT1A B40RSA FT1A H40RC FT1A B40RC FT1A H48KA FT1A H48SA FT...

Page 13: ...urned on When both inputs I0 and I1 are turned on output Q2 flashes in 1 sec increments 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 Wind...

Page 14: ... 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 ...

Page 15: ... ladder line program the OUT instruction by inserting a NO coil of output Q0 7 From the WindLDR menu bar select Home Basic OUT Output 8 Move the mouse pointer to the third column of the first ladder line where you want to insert an output coil and click the left mouse button Note Another method to insert an instruction either basic or advanced is to type the instruction symbol OUT where you want t...

Page 16: ...ssfully 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 dow...

Page 17: ...ction 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 PC 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 PC See the Appendix of the FT1A Series Pro Lite User s Manual for driver installa...

Page 18: ...r from the editing screen In both cases from the WindLDR application button click Exit WindLDR Note The Download dialog box can also be opened by selecting Home Download Note When downloading a user program all values and selections in the Function Area Settings are also downloaded to the SmartAxis For details on function settings see Chapter 5 Special Functions in the FT1A Series Pro Lite User s ...

Page 19: ...unctions Device Addresses Available I O numbers depend on the type of the SmartAxis CPU module Notes The least significant digit of input output internal relay and special internal relay device address is an octal number 0 through 7 Upper digits are decimal numbers Out of data registers D0 through D1999 D1000 through D1999 cannot be designated as keep types Retained in STOP RUN but zeroed out when...

Page 20: ...dar Clock Data Write Flag Operating Cleared Write M8021 Clock Data Adjust Flag Operating Cleared Write M8022 User Communication Receive Instruction Cancel Flag Port 2 Cleared Cleared Write M8023 User Communication Receive Instruction Cancel Flag Port 3 Cleared Cleared Write M8024 BMOV WSFT Executing Flag Maintained Maintained Read M8025 Maintain Outputs While CPU Stopped Maintained Cleared Write M...

Page 21: ...ared Read M8086 M8087 Reserved M8090 Catch Input ON OFF Status Group 1 I0 Maintained Cleared Read M8091 Group 2 I2 Maintained Cleared Read M8092 Group 3 I3 Maintained Cleared Read M8093 Group 4 I5 Maintained Cleared Read M8094 Group 5 I6 Maintained Cleared Read M8095 Group 6 I7 Maintained Cleared Read M8096 M8097 Reserved M8100 User Communication Receive Instruction Cancel Flag Connection 1 Cleare...

Page 22: ...eared Cleared Read M8163 ESC Key Right Key Cleared Cleared Read M8164 M8165 Reserved M8166 High speed Counter Group5 I6 Comparison Output Reset Cleared Cleared Read Write M8167 Gate Input Maintained Cleared Read Write M8170 Reset Input Maintained Cleared Read Write M8171 Comparison ON Status Maintained Cleared Read M8172 Overflow Maintained Cleared Read M8173 High speed Counter Group 6 I7 Comparis...

Page 23: ...gram Execution Errors in the FT1A Series Pro Lite User s Manual For a list of Touch user program execution errors see Chapter Troubleshooting Troubleshooting User Program Execution Errors in the FT1A Series Touch User s Manual M8005 Remote I O Slave 1 Communication Error When an error occurs during communication with remote I O slave 1 M8005 turns on When the error is cleared M8005 turns off M8006...

Page 24: ...nual For details on the Touch high speed counter see Chapter Project Settings Functions High speed Counter in the FT1A Series Touch User s Manual M8070 M8075 Interrupt Input Status Turns on when the corresponding user interrupt is allowed When interrupt inputs are disabled these internal relays are turned off M8070 Interrupt input I0 status M8071 Interrupt input I2 status M8072 Interrupt input I3 ...

Page 25: ...S2 S3 S2 See page 4 6 Advanced Vol M8152 Comparison Result Less Than When the CMP instruction is used M8152 is turned on when the value of device designated by S1 is less than that of device designated by S2 S1 S2 See page 4 2 Advanced Vol When the ICMP instruction is used M8152 is turned on when the value of device designated by S2 is less than that of device designated by S1 and greater than tha...

Page 26: ...20 Minute Advanced Vol 9 6 D8021 Second Advanced Vol 9 6 D8022 Scan Time Data Constant Scan Time Preset Value 1 to 1 000 ms 5 50 D8023 Scan Time Current Value ms Every scan 5 50 D8024 Scan Time Maximum Value ms At occurrence 5 50 D8025 Scan Time Minimum Value ms At occurrence 5 50 D8026 Communication Mode Information Port 2 and Port 3 Every scan 3 11 D8027 Port 2 Slave Number Every scan Advanced V...

Page 27: ... 4 I5 High Word Current Value Frequency Measurement Value I5 Every scan D8069 Low Word D8070 High Word Preset Value D8071 Low Word D8072 High Word Reset Value D8073 Low Word D8074 D8076 Reserved D8077 Out of Analog Input Range Status D8078 MAC Address Read only Every 1 sec D8079 D8080 D8081 D8082 D8083 D8084 IP Address Current Data Read only Every 1 sec D8085 D8086 D8087 D8088 Subnet Mask Current ...

Page 28: ...Status When error occurred D8149 Analog Input AI10 Every scan D8150 Analog Input AI11 Every scan D8151 Analog Input AI12 Every scan D8152 Analog Input AI13 Every scan D8153 Analog Input AI14 Every scan D8154 Analog Input AI15 Every scan D8155 Analog Input AI16 Every scan D8156 Analog Input AI17 Every scan D8157 Remote I O Slave 2 Communication Error Status When error occurred D8158 Analog Input AI...

Page 29: ...stored to D8006 For details on Pro Lite user program execution error codes see Chapter 13 Troubleshooting in the FT1A Series Pro Lite User s Manual For details on Touch user program execution error codes see Chapter Troubleshooting Troubleshooting in the FT1A Series Touch User s Manual D8008 D8021 Calendar Clock Data D8008 through D8021 are used for reading calendar clock data from the internal cl...

Page 30: ...led on the CPU module is stored to D8031 D8032 D8035 D8037 D8038 Interrupt Input Jump Destination Label No Jump destination label numbers for interrupt inputs are stored in these special data registers To use interrupt inputs store the label number that corresponds to the special data register allocated to the interrupt input D8032 I0 D8033 I2 D8034 I3 D8035 I5 D8037 I6 D8038 I7 For details on Sma...

Page 31: ...AC address of the SmartAxis is stored to the special data registers in hexadecimal as shown below Example MAC address AA BB CC DD EE FF D8078 AAh D8079 BBh D8080 CCh D8081 DDh D8082 EEh D8083 FFh D8084 D8087 IP Address Current Data Read only IP address of the SmartAxis is stored to the special data registers as shown below Example IP address aaa bbb ccc ddd D8084 aaa D8085 bbb D8086 ccc D8087 ddd ...

Page 32: ... a communication error occurs between the remote I O communication slave and master the details of the communication error are stored in these special data registers D8148 Remote I O Slave 1 Communication Error Status D8157 Remote I O Slave 2 Communication Error Status D8166 Remote I O Slave 3 Communication Error Status D8149 D8156 D8158 D8165 D8167 D8174 Remote I O Analog Input Values The analog ...

Page 33: ...sic Vol 7 19 CDP Dual Pulse Reversible Counter Dual pulse reversible counter 0 to 65 535 Basic Vol 7 12 CDPD Double word Dual Pulse Reversible Counter Double word dual pulse reversible counter 0 to 4 294 967 295 Basic Vol 7 16 CNT Adding Counter Adding counter 0 to 65 535 Basic Vol 7 12 CNTD Double word Adding Counter Double word adding counter 0 to 4 294 967 295 Basic Vol 7 15 CUD Up Down Selecti...

Page 34: ...ft Register Not Reverse shift register Basic Vol 7 23 SOTD Single Output Down Falling edge differentiation output Basic Vol 7 27 SOTU Single Output Up Rising edge differentiation output Basic Vol 7 27 TIM 100 ms Timer Subtracting 100 ms timer 0 to 6553 5 sec Basic Vol 7 8 TIMO 100 ms Off delay Timer Subtracting 100 ms off delay timer 0 to 6553 5 sec Basic Vol 7 11 TMH 10 ms Timer Subtracting 10 ms...

Page 35: ... Equal To X X X X X 4 1 CMP Compare Greater Than or Equal To X X X X X 4 2 ICMP Interval Compare Greater Than or Equal To X X X X X 4 6 LC Load Compare Equal To X X X X X 4 8 LC Load Compare Unequal To X X X X X 4 8 LC Load Compare Less Than X X X X X 4 8 LC Load Compare Greater Than X X X X X 4 8 LC Load Compare Less Than or Equal To X X X X X 4 8 LC Load Compare Greater Than or Equal To X X X X ...

Page 36: ...1 3 LRET Label Return 11 3 DJNZ Decrement Jump Non zero 11 5 DI Disable Interrupt 11 7 EI Enable Interrupt 11 7 IOREF I O Refresh 11 9 HSCRF High speed Counter Refresh 11 11 Coordinate Conversion XYFS XY Format Set X X 12 1 CVXTY Convert X to Y X X 12 2 CVYTX Convert Y to X X X 12 3 AVRG Average X X X X X 12 7 Pulse PULS1 Pulse Output 1 13 2 PULS2 Pulse Output 2 13 2 PULS3 Pulse Output 3 13 2 PULS...

Page 37: ... Common Logarithm X 18 2 EXP Exponent X 18 3 POW Power X 18 4 File Data Processing FIFOF FIFO Format X 19 1 FIEX First In Execute X 19 3 FOEX First Out Execute X 19 3 NDSRC N Data Search X X X X X 19 5 Clock TADD Time Addition 20 1 TSUB Time Subtraction 20 5 HTOS HMS to Sec 20 9 STOH Sec to HMS 20 10 HOUR Hour Meter 20 11 Ethernet Instructions ETXD Transmit over Ethernet ERXD Receive over Ethernet...

Page 38: ...T X X X X X X X X X Data Comparison CMP X X X X X X X X X CMP X X X X X X X X X CMP X X X X X X X X X CMP X X X X X X X X X CMP X X X X X X X X X CMP X X X X X X X X X ICMP X X X X X X X X X LC X X X X X X X X X LC X X X X X X X X X LC X X X X X X X X X LC X X X X X X X X X LC X X X X X X X X X LC X X X X X X X X X Binary Arithmetic ADD X X X X X X X X X SUB X X X X X X X X X MUL X X X X X X X X X...

Page 39: ...X X X X CVDT X X X X X X X X X DTDV X X X X X X X X X DTCB X X X X X X X X X SWAP X X X X X X X X X Week Programmer WEEK X X X X X X X X X YEAR X X X X X X X X X Interface MSG X Note X Note X Note X Note X Note X Note X Note X Note User Communication TXD2 X X X X X X TXD3 X X X X RXD2 X X X X X X RXD3 X X X X Program Branching LABEL X X X X X X X X X LJMP X X X X X X X X X LCAL X X X X X X X X X L...

Page 40: ...TML X X X X X X X X X DTIM X X X X X X X X X DTMH X X X X X X X X X DTMS X X X X X X X X X TTIM X X X X X X X X X Trigonometric Function RAD X X X X X X X X X DEG X X X X X X X X X SIN X X X X X X X X X COS X X X X X X X X X TAN X X X X X X X X X ASIN X X X X X X X X X ACOS X X X X X X X X X ATAN X X X X X X X X X Logarithm Power LOGE X X X X X X X X X LOG10 X X X X X X X X X EXP X X X X X X X X X...

Page 41: ...s CNT start counting at 0 and the current value is incremented up to the preset value Reversible counters CDP and CUD start counting at the preset value and the current value is incremented or decremented from the preset value When any counter is designated as a source device of an advanced instruction the current value is read as source data Using Timer or Counter as Destination Device As describ...

Page 42: ... to 4 294 967 295 Long Signed 31 bits L 32 bits 2 2 147 483 648 to 2 147 483 647 Float Floating point F 32 bits 2 3 402823 1038 to 3 402823 1038 Data Type Result of Addition Hexadecimal Storage Result of Subtraction Hexadecimal Storage Word 0 65535 131071 0000 FFFF CY FFFF 65535 0 1 65535 65536 FFFF 0000 BW FFFF BW 0001 BW 0000 Integer 65534 32768 32767 0 1 32767 32768 32769 65535 CY 7FFE CY 0000 ...

Page 43: ... the values of the three constituent fields s e and f and the value represented by the single storage format bit pattern When any value out of the bit pattern is entered to the advanced instruction or when execution of advanced instructions such as division by zero has produced any value out of the bit pattern a user program execution error will result turning on special internal relay M8004 and t...

Page 44: ...on device the lower word is stored in D0 and the upper word is stored in D1 Double word data constant Bit devices The data storage when From Upper Word is selected under Device Settings When R0 is specified as the source or destination device the upper word is stored in R0 to R15 and the lower word is stored in R16 to R31 Double word data constant The data storage when From Lower Word is selected ...

Page 45: ...eled and the next repeat operation is executed M8004 is retained even when no further user program execution errors occur during subsequent repeat operations Example User program execution error during the repeat operation When a source data does not comply with the normal floating point format When the second repeat operation is executed special internal relay M8004 turns on because the source da...

Page 46: ...on reads 16 internal relays the last internal relay exceeds the valid range resulting in a user program syntax error M8125 REP S1 M1270 D1 D0 MOV W This program results in a user program syntax error The destination of the DIV division instruction requires two data registers D999 and D1000 Since D1000 exceeds the valid range a user program syntax error occurs I0 REP S1 D100 S2 D200 DIV W D1 D999 T...

Page 47: ...le word Up Down Selection Reversible Counter Double word up down selection reversible counter 0 to 4 294 967 295 5 17 DC Data Register Comparison Equal to comparison of data register value 5 21 DC Data Register Comparison Greater than or equal to comparison of data register value 5 21 END End Ends a program 5 31 JEND Jump End Ends a jump instruction 5 30 JMP Jump Jumps a designated program area 5 ...

Page 48: ...0 to 655 35 sec 5 11 TML 1 sec Timer Subtracting 1 sec timer 0 to 65535 sec 5 8 TMLO 1 sec Off delay Timer Subtracting 1 sec off delay timer 0 to 65535 sec 5 11 TMS 1 ms Timer Subtracting 1 ms timer 0 to 65 535 sec 5 8 TMSO 1 ms Off delay Timer Subtracting 1 ms off delay timer 0 to 65 535 sec 5 11 Symbol Name Function See Page ...

Page 49: ... position separated by a period Ladder Diagram Valid Devices Instruction I Q M T C R D OUT OUTN 0 21 40 61 80 101 120 141 0 1277 8000 8177 0 0 1999 15 8000 0 8199 15 The valid device range depends on the CPU module type For details see pages 6 1 and 6 2 Data registers can be used as bit devices with the data register number and the bit position separated by a period Ladder Diagram For restrictions...

Page 50: ...ON OFF Q0 ON OFF Q1 ON OFF Timing Chart Q0 Q1 I1 LOD OUT LOD OUTN I0 Q0 I1 Q1 Program List Instruction Data Ladder Diagram M2 Ladder Diagram Q0 Ladder Diagram T0 Ladder Diagram C1 Q0 Q10 Q1 Q2 Program List Program List LOD OUT M2 Q0 Instruction Data LODN OUT Q0 Q1 Instruction Data Program List LOD OUTN T0 Q2 Instruction Data Program List LODN OUT C1 Q10 Instruction Data Ladder Diagram I0 I1 I0 ON ...

Page 51: ...struction is entered after the first set of contacts When either input I0 or I1 is on output Q0 is on When both inputs I0 and I1 are off output Q0 is off When either input I0 is on or input I1 is off output Q1 is on When input I0 is off and input I1 is on output Q1 is off Valid Devices The valid device range depends on the CPU module type For details see pages 6 1 and 6 2 Data registers can be use...

Page 52: ... on a ladder diagram When using WindLDR the user needs not program the OR LOD instruction The circuit in the ladder diagram shown below is converted into OR LOD when the ladder diagram is compiled Ladder Diagram I0 I2 I0 ON OFF I2 ON OFF I3 ON OFF Q0 ON OFF Timing Chart When input I0 is on and either input I2 or I3 is on output Q0 is on When input I0 is off or both inputs I2 and I3 are off output ...

Page 53: ...aved temporarily When using WindLDR the user needs not program the BPS BRD and BPP instructions The circuit in the ladder diagram shown below is converted into BPS BRD and BPP when the ladder diagram is compiled I0 I1 I2 Ladder Diagram I0 ON OFF I1 ON OFF I2 ON OFF I3 ON OFF Timing Chart Q1 ON OFF I3 Q2 ON OFF Q3 ON OFF When both inputs I0 and I1 are on output Q1 is turned on When both inputs I0 a...

Page 54: ...o T199 0 to 65535 sec 1 sec Constant 0 to 65535 TIM 100 ms timer T0 to T199 0 to 6553 5 sec 100 ms Data registers D0 to D1999 TMH 10 ms timer T0 to T199 0 to 655 35 sec 10 ms TMS 1 ms timer T0 to T199 0 to 65 535 sec 1 ms I1 I0 T0 Ladder Diagram TML TML 4 T0 I0 ON OFF T0 ON OFF I1 ON OFF Q0 ON OFF Timing Chart 4 sec Q0 LOD TML LOD AND OUT I0 T0 4 I1 T0 Q0 Program List Instruction Data I1 I0 T1 Lad...

Page 55: ...he LCD and push buttons See pages 5 63 and 5 65 WindLDR ladder diagrams show TP timer preset value and TC timer current value in advanced instruction devices Timer Accuracy Timer accuracy due to software configuration depends on three factors timer input error timer counting error and timeout output error These errors are not constant but vary with the user program and other causes Timer Input Err...

Page 56: ...response time behind error and output response time behind error caused by hardware Power Failure Memory Protection Timers TML TIM TMH and TMS do not have power failure protection A timer with this protection can be devised using a counter instruction and special internal relay M8121 1 sec clock M8122 100 ms clock or M8123 10 ms clock Error TML 1 sec timer TIM 100 ms timer TMH 10 ms timer TMS 1 ms...

Page 57: ...alue TMLO 1 sec off delay timer T0 to T199 0 to 65535 sec 1 sec Constant 0 to 65535 TIMO 100 ms off delay timer T0 to T199 0 to 6553 5 sec 100 ms Data registers D0 to D1999 TMHO 10 ms off delay timer T0 to T199 0 to 655 35 sec 10 ms TMSO 1 ms off delay timer T0 to T199 0 to 65 535 sec 1 ms I1 I0 T0 Ladder Diagram TMLO TMLO 4 T0 I0 ON OFF T0 ON OFF I1 ON OFF Q0 ON OFF Timing Chart 4 sec Q0 LOD TMLO...

Page 58: ...on until the reset input is turned on When the reset input changes from off to on the current value is reset When the reset input is on all pulse inputs are ignored The reset input must be turned off before counting may begin When power is off the counter s current value is held and can also be designated as clear type counters using Function Area Settings see page 5 5 Counter preset and current v...

Page 59: ...t value is held and can also be designated as clear type counters using the Function Area Settings see page 5 5 Counter preset and current values can be changed using WindLDR without downloading the entire program to the CPU again From the WindLDR menu bar select Online Monitor Monitor then Online Custom New Custom Monitor Change the current value while the counter preset input is off When the pre...

Page 60: ...nction Area Settings see page 5 5 Counter preset and current values can be changed using WindLDR without downloading the entire program to the CPU again From the WindLDR menu bar select Online Monitor Monitor then Online Custom New Custom Monitor Change the current value while the counter preset input is off When the preset or current value is changed during counter operation the change becomes ef...

Page 61: ...tive counters and counters cannot be used more than once in a user program While the reset input is off the counter counts the leading edges of pulse inputs and compares them with the preset value When the current value reaches the preset value the counter turns output on The output stays on until the reset input is turned on When the reset input changes from off to on the current value is reset W...

Page 62: ...t value reaches 0 counting down it changes to 4 294 967 295 on the next count down After the current value reaches 4 294 967 295 counting up it changes to 0 on the next count up When power is off the counter s current value is held and can also be designated as clear type counters using the Function Area Settings see page 5 5 Counter preset and current values can be changed using WindLDR without d...

Page 63: ...s 4 294 967 295 counting up it changes to 0 on the next count up When power is off the counter s current value is held and can also be designated as clear type counters using the Function Area Settings see page 5 5 Counter preset and current values can be changed using WindLDR without downloading the entire program to the CPU again From the WindLDR menu bar select Online Monitor Monitor then Onlin...

Page 64: ...t value is written to the SmartAxis CPU module RAM The user program and preset values in the ROM are not changed Note The LCD and push buttons can also be used to change preset values and confirm changed preset values See pages 5 63 and 5 65 Data movement when confirming changed preset values When the Confirm button is pressed before pressing the Clear button the changed timer counter preset value...

Page 65: ...to 65535 The preset value can be designated using a decimal constant or a data register D0 through D1999 When a data register is used the data of the data register becomes the preset value The CC and CC instructions can be used repeatedly for different preset values The comparison instructions only compare the current value The status of the counter does not affect this function The comparison ins...

Page 66: ... is on when counter C30 current value is 500 CC 500 C30 CNT C30 1000 I2 Reset Pulse I1 Q0 LOD LOD CNT CC OUT Program List Instruction Data I1 I2 C30 1000 C30 500 Q0 Ladder Diagram 3 Pulse Input I4 ON OFF Output Q1 ON OFF Timing Chart 1 350 351 352 2 Output Q1 is turned on when counter C31 current value reaches 350 and remains on until counter C31 is reset CC 350 C31 CNT C31 500 I4 Reset Pulse I3 Q...

Page 67: ...99 followed by a preset value to compare from 0 to 65535 The preset value can be designated using a decimal constant or a data register D0 through D1999 When a data register is used the data of the data register becomes the preset value For LC Load Compare instructions see page 4 8 Advanced Vol The DC and DC instructions can be used repeatedly for different preset values The comparison instruction...

Page 68: ...D10 D2 D2 5 Q0 D2 3 Q1 Instruction Data Program List Ladder Diagram 2 Output Q0 is on when data register D30 value is 500 DC 500 D30 Timing Chart Output Q0 ON OFF 400 210 210 0 500 D30 Value I1 REP S1 D50 D1 D30 MOV W 500 500 700 Q0 Ladder Diagram 3 DC 350 D15 I1 REP S1 D0 D1 D15 MOV W Output Q1 is on when data register D15 value is 350 or more Timing Chart Output Q1 ON OFF 200 249 200 350 390 D15...

Page 69: ...e the value of each bit of the shift register to return to zero Initialize pulse special internal relay M8120 may be used to initialize the shift register at start up Pulse Input The pulse input triggers the data to shift The shift is in the forward direction for a forward shift register and in reverse for a reverse shift register A data shift will occur upon the leading edge of a pulse that is wh...

Page 70: ...0 R1 Q1 R2 Q2 R3 Q3 Instruction Data Program List The last bit status output can be programmed directly after the SFR instruction In this example the status of bit R3 is read to output Q3 Each bit can be loaded using the LOD R instruction Ladder Diagram I1 I2 SFR R0 4 I3 Reset Pulse Data R0 R1 Q0 Q1 Q3 LOD LOD LOD SFR OUT LOD OUT LOD OUT I1 I2 I3 R0 4 Q3 R0 Q0 R1 Q1 Instruction Data Program List A...

Page 71: ...I1 Pulse R21 R22 R23 Shift Direction Last Bit R20 of Bits 7 R24 R25 R26 Note Output is initiated only for those bits highlighted in bold print Note When power is turned off the statuses of all shift register bits are normally cleared It is also possible to maintain the statuses of shift register bits by using the Function Area Settings as required See page 5 5 The last bit status output can be pro...

Page 72: ...gister section on page 5 25 Structural Diagram I3 I1 R22 Reset Data I2 Pulse R23 R24 R25 Forward Shifting Last Bit R22 of Bits 6 R26 R27 Note Output is initiated only for those bits highlighted in bold print I4 I6 I5 Reset Data Pulse First Bit R22 of Bits 6 Reverse Shifting Ladder Diagram I1 I2 SFR R22 6 I3 Reset Pulse Data I4 I5 SFRN R22 6 I6 Reset Pulse Data R23 R24 R26 Q0 Q2 Q1 LOD LOD LOD SFR ...

Page 73: ...ents There is a special case when the SOTU and SOTD instructions are used between the MCS and MCR instructions which are detailed on page 5 28 If input I2 to the SOTU instruction turns on while input I1 to the MCS instruction is on then the SOTU output turns on If input I2 to the SOTD instruction turns off while input I1 is on then the SOTD output turns on If input I1 turns on while input I2 is on...

Page 74: ...than one MCS instruction can be used with one MCR instruction Corresponding MCS MCR instructions cannot be nested within another pair of corresponding MCS MCR instructions Instruction Status SOTU Rising edges ON pulses are not detected SOTD Falling edges OFF pulses are not detected OUT All are turned off OUTN All are turned on SET and RST All are held in current status TML TIM TMH and TMS Current ...

Page 75: ...d according to the actual input statuses of I4 through I6 Counter and Shift Register in Master Control Circuit Ladder Diagram I1 I2 I3 I4 I5 I6 MCS MCR MCS MCS Q2 Q0 Q1 LOD MCS LOD OUT LOD MCS LOD OUT LOD MCS LOD OUT MCR I1 I2 Q0 I3 I4 Q1 I5 I6 Q2 Instruction Data Program List Ladder Diagram I1 MCS MCR Input I1 ON OFF Counter Pulse Input ON OFF Shift Register Pulse Input ON OFF Timing Chart Input ...

Page 76: ...P and JEND are executed as follows Input conditions cannot be set for the JEND instruction More than one JMP instruction can be used with one JEND instruction Corresponding JMP JEND instructions cannot be nested within another pair of corresponding JMP JEND instructions Instruction Status SOTU Rising edges ON pulses are not detected SOTD Falling edges OFF pulses are not detected OUT and OUTN All a...

Page 77: ... first part of the END instruction execution The second part of the END instruction execution is to monitor all inputs also done simultaneously Then program instructions are ready to be processed sequentially once again Ladder Diagram I1 I2 I3 I4 I5 I6 JMP JEND JMP JMP This jump circuit will give priority to I1 I3 and I5 in that order When input I1 is on the first JMP is executed so that subsequen...

Page 78: ...les below Prohibited Instruction Relay 1 Program Relay 2 Closed Circuit Block Vertical Line A Vertical Line B Program Left Power Rail Right Power Rail Prohibited Instructions OUT OUTN SET RST TML TIM TMH TMS TMLO TIMO TMHO TMSO CNT CDP CUD CNTD CDPD CUDD SFR SFRN SOTU SOTD Error Detection When converting the ladder program an error message is shown such as TIM follows an invalid device Conversion ...

Page 79: ...hrough M1277 and special internal relays M8000 through M8177 can be designated as source devices When T timer or C counter is used as S1 the timer counter current value TC or CC is read out When T timer or C counter is used as D1 the data is written in as a preset value TP or CP which can be 0 through 65535 When F float data type is selected only data register and constant can be designated as S1 ...

Page 80: ...nt bit M17 is the MSB most significant bit I2 REP S1 D10 D1 M0 MOV W 12345 D10 M0 through M7 M10 through M17 0 1 0 0 1 0 0 0 0 1 0 0 1 0 1 1 MSB M0 LSB M17 M7 M10 810 D2 When input I0 is on constant 810 designated by source device S1 is moved to data register D2 designated by destination device D1 I0 REP S1 810 D1 D2 MOV W D1 D0 810 D2 810 810 D2 D3 When input I0 is on constant 810 designated by s...

Page 81: ... as many as the repeat cycles starting with the device designated by S1 are moved to the same quantity of devices starting with the device designated by D1 Note The BMOV block move instruction has the same effect as the MOV instruction with both the source and destination designated to repeat Data Type Word 111 D11 110 D10 112 D12 D21 112 D20 D22 Source Repeat 3 Destination Repeat 0 I1 REP 3 S1 R ...

Page 82: ...he source and destination areas overlap each other then the source data in the overlapped area is also changed 111 D11 110 D10 112 D12 111 D21 110 D20 112 D22 Source Repeat 3 Destination Repeat 3 I6 REP 3 S1 R D10 D1 R D20 MOV D 113 D13 113 D23 114 D14 115 D15 114 D24 115 D25 Invalid D12 D13 1 5 D10 D11 3 44 D14 D15 11 1 D22 D23 1 5 D20 D21 3 44 D24 D25 Source Repeat 3 Destination Repeat 3 I1 REP ...

Page 83: ...ination 1 point word or integer data type or 2 points double word or long data type are used When repeat is designated for a word device the quantity of device words increases in 1 or 2 point increments I integer X D double word X L long X F float M10 NOT M50 When input I0 is on the 16 internal relays starting with M10 designated by source device S1 are inverted bit by bit and moved to 16 internal...

Page 84: ... error will result turning on special internal relay M8004 and the ERR LED on the CPU module For user program execution errors see Chapter 4 User Program Execution Errors on page 4 21 Valid Data Types S1 S2 D1 D2 When input is on the values contained in devices designated by S1 and S2 are added to determine the source of data The 16 or 32 bit data so determined is moved to destination which is det...

Page 85: ...offset to data register D10 designated by destination device D1 D 10 20 D30 As a result when input I0 is on the data in data register D24 is moved to data register D30 I0 REP S1 D20 D1 D10 IMOV W S2 C10 D2 D25 D23 D22 6450 D24 6450 D30 D21 D20 20 D25 4 C10 D20 D50 D10 D51 If data register D50 contains a value of 2 the source data is determined by adding the offset to data register D20 designated b...

Page 86: ...A 48 FT1A Touch X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Base address to move from X X X X X X X 1 99 S2 Source 2 Offset for S1 X X X X X X X D1 Destination 1 Base address to move to X X X X X 1 99 D2 Destination 2 Offset for D1 X X X X X X X W word X When a bit device such as I input Q output M internal relay or R shift register is designated as the source or destinatio...

Page 87: ...1 D1 D1 1 D1 2 D1 N 1 When input is on N blocks of 16 bit word data starting with device designated by S1 are moved to N blocks of destinations starting with device designated by D1 N W specifies the quantity of blocks to move BMOV W S1 D1 N W First 16 bit data S1 Second 16 bit data S1 1 Third 16 bit data S1 2 Nth 16 bit data S1 N 1 N blocks of 16 bit data First 16 bit data D1 Second 16 bit data D...

Page 88: ...vice Source device S2 and destination device D2 are the offset values to determine the source and destination devices As a result when input I0 is on the ON OFF status of internal relay M15 is moved to output Q14 S1 S2 D1 D2 When input is on the values contained in devices designated by S1 and S2 are added to determine the source of data The 1 bit data so determined is moved to destination which i...

Page 89: ...14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 D10 Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 D20 M10 5 Q0 9 Repeat 3 Since source device S1 is internal relay M10 and the value of source device S2 is 5 the source data is 3 internal relays starting with M15 Since destination device D1 is output Q0 and the value of destination device D2 is 9 the destination is 3 outputs starting with Q11 As a result when input I...

Page 90: ...ice S2 and destination device D2 are the offset values to determine the source and destination devices As a result when input I0 is on the ON OFF status of internal relay M30 is inverted and moved to output Q12 S1 S2 NOT D1 D2 When input is on the values contained in devices designated by S1 and S2 are added to determine the source of data The 1 bit data so determined is inverted and moved to dest...

Page 91: ...6 or 32 bit data in devices designated by S1 S2 S3 Sn are moved to N blocks of destinations starting with device designated by D1 NSET S1 S2 Sn D1 First 16 32 bit data S1 Second 16 32 bit data S2 Third 16 32 bit data S3 Nth 16 32 bit data Sn N blocks of 16 32 bit data First 16 32 bit data D1 Second 16 32 bit data D1 1 or D1 2 Third 16 32 bit data D1 2 or D1 4 Nth 16 32 bit data D1 N 1 or D1 2N 2 N...

Page 92: ...rrors on page 4 21 Valid Data Types Example NRS F S1 D1 D2 D3 Dn 1 When input is on 16 or 32 bit data designated by S1 is set to N blocks of destinations starting with device designated by D1 NRS N W S1 D1 16 32 bit data S1 Source data for repeat set First 16 32 bit data D1 Second 16 32 bit data D1 1 or D1 2 Third 16 32 bit data D1 2 or D1 4 Nth 16 32 bit data D1 N 1 or D1 2N 2 N blocks of 16 32 b...

Page 93: ... to exchange X X X W word X When a bit device such as Q output M internal relay or R shift register is designated as the destination 16 points word data type or 32 points double word data type are used When a word device such as D data register is designated as the destination 1 point word data type or 2 points double word data type are used I integer D double word X L long F float D21 D24 When in...

Page 94: ... Touch X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 First device address to move X X X X X X X X 1 99 D1 Destination 1 First device address to move to X X 1 99 W word X When a bit device such as I input Q output M internal relay or R shift register is designated as the source 16 points word data type or 32 points double word data type are used When repeat is designated for a...

Page 95: ...ND OR S2 R Data type W or I S1 S2 D1 on Data type D L or F S1 S1 1 S2 S2 1 D1 on When input is on 16 or 32 bit data designated by source devices S1 and S2 are compared When S1 data is not equal to S2 data destination device D1 is turned on When the condition is not met D1 is turned off REP S1 R D1 R CMP AND OR S2 R Data type W or I S1 S2 D1 on Data type D L or F S1 S1 1 S2 S2 1 D1 on When input is...

Page 96: ...Data Type Word FT1A 12 FT1A 24 FT1A 40 FT1A 48 FT1A Touch X X X X X Device Function I Q M R T C D Constant Repeat Repeat Result Logical AND or OR operation S1 Source 1 Data to compare X X X X X X X X 1 99 S2 Source 2 Data to compare X X X X X X X X 1 99 D1 Destination 1 Comparison output X 1 99 W word X When a bit device such as I input Q output M internal relay or R shift register is designated a...

Page 97: ...n S2 D1 4 D30 12 D30 S1 I2 REP S1 D50 D1 Q2 CMP D S2 D60 S2 D1 S1 23456789 D50 D51 12345678 D60 D61 Q2 turned on 23456789 D50 D51 34567890 D60 D61 Q2 turned off I3 REP S1 D70 D1 Q3 CMP L S2 D80 S2 D1 S1 12345678 D70 D71 12345678 D80 D81 Q3 turned on 12345678 D70 D71 34567890 D80 D81 Q3 turned off I4 REP S1 D90 D1 Q4 CMP F S2 D95 S2 D1 S1 12 4 D90 D91 12 345 D95 D96 Q4 turned on 1 D90 D91 0 99 D95 ...

Page 98: ...Source Devices When S1 source and S2 source are designated to repeat source devices as many as the repeat cycles starting with the devices designated by S1 and S2 are compared with each other The comparison results are ANDed or ORed and set to the destination device designated by D1 Data Type Word Repeat Logical Operation AND Data Type Word Repeat Logical Operation OR Data Type Double Word Repeat ...

Page 99: ...he input to the data comparison instruction is off If the comparison output is on the on status is maintained when the input is turned off as demonstrated by this program This program turns the output off when the input is off I0 REP 3 S1 R D10 D1 R M10 CMP W S2 R D20 20 D21 0 D20 100 D22 M11 turned on M10 turned on M12 turned off S2 Repeat 3 D1 Repeat 3 20 D11 10 D10 30 D12 S1 Repeat 3 D22 D23 D2...

Page 100: ...When more than one ICMP or CMP instruction is used M8150 M8151 or M8152 indicates the result of the instruction that was executed last Data type W or I S1 S2 S3 D1 on Data type D L F S1 S1 1 S2 S2 1 S3 S3 1 D1 on When input is on the 16 or 32 bit data designated by S1 S2 and S3 are compared When the condition is met destination device D1 is turned on When the condition is not met D1 is turned off ...

Page 101: ...rce devices S1 S2 and S3 are compared When the condition is met internal relay Q1 designated by destination device D1 is turned on When the condition is not met Q1 is turned off D10 D11 D12 Q1 goes on D1 Q1 S1 D10 I0 ICMP W S2 D11 S3 D12 SOTU 15 D11 S2 17 D10 S1 15 D12 S3 Q1 goes on D1 M8151 M8152 M8004 M8150 OFF OFF OFF OFF 18 D11 15 D10 19 D12 Q1 goes off ON ON OFF ON ...

Page 102: ... S1 and S2 When S1 data is not equal to S2 data the output to the following instructions is turned on When the condition is not met the output is turned off LC Data type W or I S1 S2 Data type D L or F S1 S1 1 S2 S2 1 This instruction constantly compares 16 or 32 bit data designated by S1 and S2 When S1 data is less than S2 data the output to the following instructions is turned on When the condit...

Page 103: ...OFF C2 ON OFF Output Q1 ON OFF Output Q0 99996 99997 99998 ON OFF 99999 100000 Program List Output Q0 is on when counter C2 current value is 99997 Output Q1 is turned on when counter C2 current value reaches 99996 and remains on until counter C2 is reset Q0 Q1 99995 Instruction LOD LOD CNTD LC D OUT LC D OUT Data I0 I1 C2 100000 C2 99997 Q0 C2 99996 Q1 Ladder Diagram 2 LC I D10 2 I2 Program List O...

Page 104: ...7 DATA COMPARISON INSTRUCTIONS 7 10 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...

Page 105: ...vice D1 and borrow M8003 REP S1 R D1 R SUB S2 R Data type W or I S1 S2 D1 D1 1 Data type D L or F S1 S1 1 S2 S2 1 D1 D1 1 When input is on 16 or 32 bit data designated by source device S1 is multiplied by 16 or 32 bit data designated by source device S2 The result is set to destination device D1 When the result exceeds the valid range for data types D or L the ERR LED and special internal relay M8...

Page 106: ...ata is out of the valid data range as a result of any binary arithmetic operation a carry or borrow occurs and special internal relay M8003 is turned on FT1A 12 FT1A 24 FT1A 40 FT1A 48 FT1A Touch X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Data for calculation X X X X X X X X 1 99 S2 Source 2 Data for calculation X X X X X X X X 1 99 D1 Destination 1 Destination to store re...

Page 107: ...or When the acknowledge pushbutton input I1 is pressed the warning indicator is reset I0 REP S2 500 D1 D2 SOTU M8003 I1 Acknowledge Pushbutton S1 D2 ADD W Q0 S Q0 R I0 REP S2 D20 D1 D30 S1 D10 ADD I 4 D10 15 D30 11 D20 I0 REP S2 D20 D1 D30 S1 D10 ADD D 1957400 D10 D11 4112600 D20 D21 6070000 D30 D31 I0 REP S2 D20 D1 D30 S1 D10 ADD L 216283 D10 D11 964355 D20 D21 748072 D30 D31 I0 REP S2 D20 D1 D30...

Page 108: ...ice D1 When using a bit device such as internal relay for destination 32 internal relays are required so internal relay M1241 or a larger number cannot be used as destination device D1 I1 REP S2 D20 D1 D30 S1 D10 MUL W D10 300000 000493E0h 500 01F4h 600 0258h D20 D30 D31 When input I1 is on data of D10 is multiplied by data of D20 and the result is set to D30 and D31 D31 37856 93E0h D30 4 0004h I1...

Page 109: ...elay for destination 64 internal relays are required so M1201 or a larger number cannot be used as destination device D1 Data Type Long Note Since the destination uses four word devices in the division operation of long data type data registers D997 through D999 or D1997 through D1999 cannot be used as destination device D1 When using a bit device such as internal relay for destination 64 internal...

Page 110: ... and Float When only D1 destination is designated to repeat the same result is set to 3 devices starting with D1 D1 1 Repeat Two Source Devices Data Type Word and Integer When S1 and S2 source are designated to repeat the final result is set to destination device D1 Data Type Double Word Long and Float When S1 and S2 source are designated to repeat the final result is set to destination device D1 ...

Page 111: ...cial internal relay M8003 carry borrow is turned on when a carry or borrow occurs in the last repeat operation When a user program execution error occurs in any repeat operation special internal relay M8004 user program execution error and the ERR LED are turned on and maintained while operation for other instructions is continued I1 REP 3 S1 R D10 D1 R D30 15 D11 10 D10 20 D12 S1 Repeat 3 D1 Repe...

Page 112: ...n is designated to repeat the same result is set to 3 devices starting with D1 D1 1 Data Type Word and Integer Data Type Double Word Long and Float Repeat Two Source Devices When S1 and S2 source are designated to repeat the final result is set to destination device D1 D1 1 Data Type Word and Integer Data Type Double Word Long and Float I1 REP 3 S1 R D10 D1 D30 D10 S1 Repeat 3 D1 Repeat 0 S2 D20 S...

Page 113: ...1 D1 1 Data Type Word and Integer Data Type Double Word Long and Float I1 REP 3 S1 R D10 D1 R D30 D10 S1 Repeat 3 D1 Repeat 3 S2 D20 S2 Repeat 0 D20 D11 D12 D20 D20 SOTU MUL W D32 D33 D30 D31 D34 D35 I1 REP 3 S1 R D10 D1 R D30 D12 D13 D10 D11 D14 D15 S1 Repeat 3 D1 Repeat 3 S2 D20 S2 Repeat 0 D32 D33 D30 D31 D34 D35 D20 D21 D20 D21 D20 D21 SOTU MUL D I1 REP 3 S1 R D10 D1 R D30 D10 S1 Repeat 3 D1 R...

Page 114: ...ult is set to destination devices D1 D1 1 Repeat Destination Device Only Data Type Word and Integer When only D1 destination is designated to repeat the same result is set to 6 devices starting with D1 Data Type Double Word and Long When only D1 destination is designated to repeat the same result is set to 6 devices starting with D1 D1 1 Data Type Float When only D1 destination is designated to re...

Page 115: ...signated to repeat different results are set to 3 devices starting with D1 D1 1 I1 REP 3 S1 R D10 D1 D30 D10 S1 Repeat 3 D1 Repeat 0 S2 R D20 S2 Repeat 3 D30 D20 D31 D11 D12 D21 D22 D30 D30 D31 D31 Quotient Remainder SOTU DIV W I1 REP 3 S1 R D10 D1 D30 D10 D11 S1 Repeat 3 D1 Repeat 0 S2 R D20 S2 Repeat 3 D30 D31 D20 D21 D32 D33 D12 D13 D14 D15 D22 D23 D24 D25 D30 D31 D30 D31 D32 D33 D32 D33 Quotie...

Page 116: ...ogram execution error occurs in any repeat operation special internal relay M8004 user program execution error and the ERR LED are turned on and maintained while operation for other instructions is continued I1 REP 3 S1 R D10 D1 R D30 D10 S1 Repeat 3 D1 Repeat 3 S2 R D20 S2 Repeat 3 D30 D20 D33 D11 D12 D21 D22 D31 D32 D34 D35 Quotient Remainder SOTU DIV W I1 REP 3 S1 R D10 D1 R D30 D10 D11 S1 Repe...

Page 117: ...s added to the 16 or 32 bit data designated by device S D and the result is stored to the same device INC S D Data type W or I S D 1 S D Data type D or L S D S D 1 1 S D S D 1 When input is on one is subtracted from the 16 or 32 bit data designated by device S D and the result is stored to the same device DEC S D FT1A 12 FT1A 24 FT1A 40 FT1A 48 FT1A Touch X X X X X Device Function I Q M R T C D Co...

Page 118: ...nated by S1 is extracted and is stored to the destination designated by D1 The square root is calculated to two decimals omitting the figures below the second place of decimals and multiplied by 100 Data type D When input is on the square root of device designated by S1 S1 1 is extracted and is stored to the destination designated by D1 D1 1 The square root is calculated to two decimals omitting t...

Page 119: ...erent quantity of devices Calculate the total of designated data depending on the calculation option ADD When input is on N blocks of 16 or 32 bit data starting at device designated by S1 are added and the result is stored to device designated by D1 S2 specifies the quantity of data blocks XOR When input is on N blocks of 16 bit data starting at device designated by S1 are XORed and the result is ...

Page 120: ... 4 294 967 295 L long 1 Out of the range between 2 147 483 648 to 2 147 483 647 F float 1 See the figure below M8003 Execution Result Value 1 0 Overflow out of the range between 3 402823 1038 and 3 402823 1038 1 0 Not zero within the range between 1 175495 10 38 and 1 175495 10 38 0 0 Zero 0 1 175495 10 38 M8003 1 1 1 175495 10 38 0 3 402823 1038 0 Execution Result 1 Overflow 0 1 3 402823 1038 Ove...

Page 121: ...4566 FFFFEE2Ah D100 D101 D1 D100 S1 D0 I0 SUM D ADD S2 4 SOTU 1000000 000F4240h D100 D101 100000 000186A0h D0 D1 200000 00030D40h D2 D3 300000 000493E0h D4 D5 400000 00061A80h D6 D7 D1 D100 S1 D0 I0 SUM L ADD S2 4 SOTU 10253086 FF638CE2h D100 D101 500000 FFF85EE0h D0 D1 123456 0001E240h D2 D3 9876543 FF694BC1h D4 D5 1 00000001h D6 D7 D1 D100 S1 D0 I0 SUM F ADD S2 4 SOTU D100 D101 12 345 D0 D1 D2 D...

Page 122: ...8 BINARY ARITHMETIC INSTRUCTIONS 8 18 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...

Page 123: ...device D1 S1 1 1 1 0 0 1 S2 1 0 1 1 0 0 D1 1 0 1 0 0 0 REP S1 R D1 R ANDW S2 R 0 0 1 1 0 1 0 1 0 0 0 1 S1 S2 D1 S1 S2 D1 When input is on 16 or 32 bit data designated by source devices S1 and S2 are ORed bit by bit The result is set to destination device D1 S1 1 1 1 0 0 1 S2 1 0 1 1 0 0 D1 1 1 1 1 0 1 REP S1 R D1 R ORW S2 R 0 0 1 1 0 1 0 1 0 1 1 1 S1 S2 D1 FT1A 12 FT1A 24 FT1A 40 FT1A 48 FT1A Touc...

Page 124: ...e results X X X X X 1 99 W word X When a bit device such as I input Q output M internal relay or R shift register is designated as the source or destination 16 points word data type or 32 points double word data type are used When repeat is designated for a bit device the quantity of device bits increases in 16 or 32 point increments When a word device such as T timer C counter or D data register ...

Page 125: ...3 devices starting with D1 Data Type Double Word When only D1 destination is designated to repeat the same result is set to 3 devices starting with D1 D1 1 Repeat Two Source Devices Data Type Word When S1 and S2 source are designated to repeat the final result is set to destination device D1 Data Type Double Word When S1 and S2 source are designated to repeat the final result is set to destination...

Page 126: ...error occurs in any repeat operation special internal relay M8004 user program execution error and the ERROR LED are turned on and maintained while operation for other instructions is continued For the advanced instruction which has caused a user program execution error due to an error in the source devices results are not set to any destination I1 REP 3 S1 R D10 D1 R D30 S2 D20 SOTU ANDW W D10 S1...

Page 127: ...CPU Modules Valid Devices For the valid device address range see pages 6 1 and 6 2 Basic Vol Internal relays M0 through M1277 can be designated as S1 Special internal relays cannot be designated as S1 Since the SFTL instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required CY S1 When input is on N_B bit data string starting with...

Page 128: ...0 Bits to shift 1 0 0 0 0 1 1 1 0 1 0 0 0 1 1 1 0 0 0 After second shift D10 43688 CY M8003 MSB LSB D10 Shift to the left S2 M8120 is the initialize pulse special internal relay When the CPU starts operation the MOV move instructions set 0 and 65535 to data registers D10 and D11 respectively Each time input I0 is turned on 32 bit data of data registers D10 and D11 is shifted to the left by 2 bits ...

Page 129: ...d by device Bits The result is set to source device S1 and the last bit status shifted out is set to a carry special internal relay M8003 Zero or 1 designated by source device S2 is set to the MSB S1 Bits SFTR S2 N_B 0 Before shift 1 0 1 0 1 0 1 0 1 1 1 1 0 1 0 0 CY M8003 MSB LSB S1 0 After shift 1 1 1 1 0 0 0 0 1 1 0 0 1 0 1 1 CY M8003 MSB LSB S1 Shift to the right S2 0 N_B 16 Bits 1 S2 FT1A 12 F...

Page 130: ...Bits to shift 2 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 After second shift D10 1 CY M8003 MSB LSB D10 1 0 0 Shift to the right M8120 is the initialize pulse special internal relay When the CPU starts operation the MOV move instructions set 65535 and 0 to data registers D10 and D11 respectively Each time input I0 is turned on 32 bit data of data registers D10 and D11 is shifted to the right by 1 bit as d...

Page 131: ...n Errors on page 4 21 Valid Data Types When input is on the 32 bit binary data designated by S1 is converted into 8 BCD digits shifted to the left by the quantity of digits designated by S2 and converted back to 32 bit binary data Valid values for each of S1 and S1 1 are 0 through 9999 The quantity of digits to shift can be 1 through 7 Zeros are set to the lowest digits as many as the digits shift...

Page 132: ... binary data of data registers D10 and D11 designated by S1 is converted into 8 BCD digits shifted to the left by 1 digit as designated by device S2 and converted back to 32 bit binary data Zeros are set to the lowest digits as many as the digits shifted REP SOTU I0 S1 4567 D1 D11 S1 D10 S2 1 BCDLS MOV W M8120 REP S1 123 D1 D10 MOV W Before shift After first shift 0 2 3 1 D10 D11 Shift to the left...

Page 133: ...1 3 S1 data D1 0 First 16 bit data D1 1 Second 16 bit data D1 2 Fifth 16 bit data D1 4 Third 16 bit data D1 3 3 blocks S2 16 bit data S1 16 bit data S1 FT1A 12 FT1A 24 FT1A 40 FT1A 48 FT1A Touch X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Source data for word shift X X X X X X X X S2 Source 2 Quantity of blocks to shift X X X X X X X X D1 Destination 1 First device address ...

Page 134: ...pecial internal relay M8003 S1 bits ROTL Before rotation 1 0 1 0 1 0 1 0 1 1 1 1 0 1 0 0 CY M8003 MSB LSB S1 1 After rotation 0 1 0 1 0 1 0 1 1 1 1 0 1 0 0 CY M8003 MSB LSB S1 1 Rotate to the left Before rotation 1 0 1 0 1 0 1 0 1 1 1 1 0 1 0 0 CY M8003 MSB LSB S1 1 After rotation 1 0 1 0 1 0 1 0 1 1 1 1 0 1 0 0 CY M8003 MSB LSB S1 Rotate to the left 1 0 1 0 1 0 1 0 1 1 1 1 0 1 0 0 1 0 1 0 1 0 1 0...

Page 135: ... 0 0 0 0 0 1 1 0 0 0 0 CY M8003 MSB LSB D10 After first rotation D10 16397 Bits to rotate 1 After second rotation D10 32794 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 1 CY M8003 MSB LSB D10 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 CY M8003 MSB LSB D10 Each time input I1 is turned on 32 bit data of data registers D10 and D11 is rotated to the left by 1 bit as designated by device bits The status of the MSB is set to...

Page 136: ...special internal relay M8003 S1 bits ROTR Before rotation 1 0 1 0 1 0 1 0 1 1 1 1 0 1 0 0 CY M8003 MSB LSB S1 0 After rotation 1 1 1 0 0 0 0 1 1 0 0 1 0 1 1 CY M8003 MSB LSB S1 1 Rotate to the right Data Type Word bits to rotate 1 Before rotation 1 0 1 0 1 0 1 0 1 1 1 1 0 1 0 0 CY M8003 MSB LSB S1 0 After rotation CY M8003 MSB LSB S1 Rotate to the right 1 0 1 0 1 0 1 0 1 1 1 1 0 1 0 0 Data Type Do...

Page 137: ...0 0 0 0 0 0 1 0 0 1 1 CY M8003 MSB LSB D20 After first rotation D20 16387 Bits to rotate 2 After second rotation D20 53248 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 CY M8003 MSB LSB D20 1 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 CY M8003 MSB LSB D20 Each time input I1 is turned on 32 bit data of data registers D20 and D21 is rotated to the right by 1 bit as designated by device bits The last bit status rotated out...

Page 138: ...10 SHIFT ROTATE INSTRUCTIONS 10 12 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...

Page 139: ... within the valid value range If the source data is out of the valid range a user program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module When a user program execution error occurs the execution of the instruction is canceled The value of D1 is left unchanged and the next instruction is executed For user program execution errors see Chapter 4 U...

Page 140: ...D20 S1 D10 I1 HTOB W Binary SOTU 0 D10 0000h BCD 0 D20 0000h 1234 D10 04D2h 4660 D20 1234h 9999 D10 270Fh 39321 D20 9999h D1 D20 S1 D10 I2 HTOB D SOTU 0 D10 0000h 0 D11 0000h 0 D20 0000h 0 D21 0000h Binary BCD 188 D10 00BCh 24910 D11 614Eh 4660 D20 1234h 22136 D21 5678h 1525 D10 05F5h 57599 D11 E0FFh 39321 D20 9999h 39321 D21 9999h ...

Page 141: ...eft unchanged and the next instruction is executed For user program execution errors see Chapter 4 User Program Execution Errors on page 4 21 Since the BTOH instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required Valid Data Types S1 D1 When input is on the BCD data designated by S1 is converted into 16 or 32 bit binary data an...

Page 142: ...D20 S1 D10 I1 BTOH W BCD SOTU 0 D10 0000h Binary 0 D20 0000h 4660 D10 1234h 1234 D20 04D2h 39321 D10 9999h 9999 D20 270Fh D1 D20 S1 D10 I2 BTOH D SOTU 0 D10 0000h 0 D11 0000h 0 D20 0000h 0 D21 0000h BCD Binary 188 D10 00BCh 24910 D11 614Eh 4660 D20 1234h 22136 D21 5678h 1525 D10 05F5h 57599 D11 E0FFh 39321 D20 9999h 39321 D21 9999h ...

Page 143: ...uction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required Valid Data Types S1 D1 D1 1 D1 2 D1 3 When input is on the 16 bit binary data designated by S1 is read from the lowest digit as many as the quantity of digits designated by S2 converted into ASCII data and stored to the destination starting with the device designated by D1 The...

Page 144: ...D1 D20 S1 D10 I0 HTOA W S2 4 SOTU Binary 4660 D10 1234h ASCII 49 D20 0031h 50 D21 0032h 51 D22 0033h 52 D23 0034h D1 D20 S1 D10 I1 HTOA W S2 3 SOTU Binary 4660 D10 1234h ASCII 50 D20 0032h 51 D21 0033h 52 D22 0034h D1 D20 S1 D10 I2 HTOA W S2 2 SOTU Binary 4660 D10 1234h ASCII 51 D20 0033h 52 D21 0034h D1 D20 S1 D10 I3 HTOA W S2 1 SOTU Binary 4660 D10 1234h ASCII 52 D20 0034h ...

Page 145: ...ruction is executed For user program execution errors see Chapter 4 User Program Execution Errors on page 4 21 Since the ATOH instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required Valid Data Types S1 S1 1 S1 2 S1 3 D1 When input is on the ASCII data designated by S1 as many as the quantity of digits designated by S2 is conve...

Page 146: ... 1 D1 D20 S1 D10 I0 ATOH W S2 4 SOTU Binary 4660 D20 1234h ASCII 49 D10 0031h 50 D11 0032h 51 D12 0033h 52 D13 0034h D1 D20 S1 D10 I1 ATOH W S2 3 SOTU Binary 291 D20 0123h ASCII 49 D10 0031h 50 D11 0032h 51 D12 0033h D1 D20 S1 D10 I2 ATOH W S2 2 SOTU Binary 18 D20 0012h ASCII 49 D10 0031h 50 D11 0032h D1 D20 S1 D10 I3 ATOH W S2 1 SOTU Binary 1 D20 0001h ASCII 49 D10 0031h ...

Page 147: ...n Errors on page 4 21 Since the BTOA instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required Valid Data Types Word data type S1 D1 D1 1 D1 2 D1 3 D1 4 Double word data type S1 S1 1 D1 D1 1 D1 2 D1 9 When input is on the 16 or 32 bit binary data designated by S1 is converted into BCD and converted into ASCII data The data is re...

Page 148: ...20 0031h 50 D21 0032h 51 D22 0033h 52 D23 0034h Binary 53 D24 0035h D1 D20 S1 D10 I1 BTOA W S2 4 SOTU 12345 D10 3039h ASCII 50 D20 0032h 51 D21 0033h 52 D22 0034h 53 D23 0035h BCD Binary D1 D20 S1 D10 I2 BTOA W S2 3 SOTU 12345 D10 3039h ASCII 51 D20 0033h 52 D21 0034h 53 D22 0035h BCD Binary D1 D20 S1 D10 I3 BTOA W S2 2 SOTU 12345 D10 3039h ASCII 52 D20 0034h 53 D21 0035h BCD Binary D1 D20 S1 D10 ...

Page 149: ...I 49 D20 0031h 50 D21 0032h 51 D22 0033h 52 D23 0034h Binary 53 D24 0035h 54 D25 0036h 55 D26 0037h 56 D27 0038h 57 D28 0039h 48 D29 0030h D10 D11 D1 D20 S1 D10 I1 BTOA D S2 6 SOTU ASCII 53 D20 0035h 54 D21 0036h 55 D22 0037h 56 D23 0038h 57 D24 0039h 48 D25 0030h BCD Binary D10 D11 1234567890 499602D2h D1 D20 S1 D10 I2 BTOA D S2 3 SOTU ASCII 56 D20 0038h 57 D21 0039h 48 D22 0030h D10 D11 12345678...

Page 150: ...ft unchanged and the next instruction is executed For user program execution errors see Chapter 4 User Program Execution Errors on page 4 21 Since the ATOB instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required Valid Data Types Word data type S1 S1 1 S1 2 S1 3 S1 4 D1 Double word data type S1 S1 1 S1 2 S1 9 D1 D1 1 When input...

Page 151: ... 49 D10 0031h 50 D11 0032h 51 D12 0033h 52 D13 0034h Binary 53 D14 0035h D1 D20 S1 D10 I1 ATOB W S2 4 SOTU BCD 1234 D20 04D2h ASCII 49 D10 0031h 50 D11 0032h 51 D12 0033h 52 D13 0034h Binary D1 D20 S1 D10 I2 ATOB W S2 3 SOTU BCD 123 D20 007Bh ASCII 49 D10 0031h 50 D11 0032h 51 D12 0033h Binary D1 D20 S1 D10 I3 ATOB W S2 2 SOTU BCD 12 D20 0018h ASCII 49 D10 0031h 50 D11 0032h Binary D1 D20 S1 D10 I...

Page 152: ...11 0032h 51 D12 0033h 52 D13 0034h 53 D14 0035h 54 D15 0036h 55 D16 0037h 56 D17 0038h 57 D18 0039h 48 D19 0030h BCD 1234567890 499602D2h Binary D20 D21 D1 D20 S1 D10 I1 ATOB D S2 6 SOTU 123456 0001E240h ASCII 49 D10 0031h 50 D11 0032h 51 D12 0033h 52 D13 0034h 53 D14 0035h 54 D15 0036h D20 D21 BCD Binary D1 D20 S1 D10 I2 ATOB D S2 3 SOTU 123 0000007Bh ASCII 49 D10 0031h 50 D11 0032h 51 D12 0033h ...

Page 153: ...The search begins at S1 until the first point which is set on is located The quantity of points from S1 to the first set point offset is stored to the destination designated by device D1 If no point is on in the searched area 65535 is stored to D1 ENCO Bits S1 D1 FT1A 12 FT1A 24 FT1A 40 FT1A 48 FT1A Touch X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 First bit to start search...

Page 154: ...t is on a pulse input from a SOTU or SOTD instruction should be used as required Examples DECO When input is on the values contained in devices designated by S1 and D1 are added to determine the destination and the bit so determined is turned on DECO S1 D1 FT1A 12 FT1A 24 FT1A 40 FT1A 48 FT1A Touch X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Offset X X X X X 0 255 D1 Destin...

Page 155: ...le input is on a pulse input from a SOTU or SOTD instruction should be used as required Examples BCNT When input is on bits which are on are sought in an array of consecutive bits starting at the point designated by source device S1 Source device S2 designates the quantity of bits searched The quantity of bits which are on is stored to the destination designated by device D1 BCNT S1 D1 S2 FT1A 12 ...

Page 156: ...esignated by D1 is turned on and remains on after the input is turned off When input is turned on again the designated output internal relay or shift register bit is turned off The ALT instruction must be used with a SOTU or SOTD instruction otherwise the designated output internal relay or shift register bit repeats to turn on and off in each scan ALT D1 SOTU FT1A 12 FT1A 24 FT1A 40 FT1A 48 FT1A ...

Page 157: ...s can be designated for the source and destination separately Data Type W I D L F Source S1 S1 S1 1 Destination D1 D1 D1 1 When the same data type is designated for both source and destination the CVDT instruction has the same function as the MOV instruction Unless F float data type is selected for both source and destination only the integral number is moved omitting the fraction When the source ...

Page 158: ...source data exceeds the range of destination data type the destination stores a value closest to the source data within the destination data type Device Data Type Value Source F 3 141593 Destination W 3 When input I0 is turned on 3 is stored to data register D2 I0 REP D1 D2 SOTU S1 D0 CVDT FTOW 3 D2 D1 S1 3 141593 D0 D1 Device Data Type Value Source D 4294967295 Destination W 65535 When input I0 i...

Page 159: ... divided into upper and lower bytes The upper byte data is stored to the destination designated by device D1 The lower byte data is stored to the device next to D1 DTDV W S1 D1 FT1A 12 FT1A 24 FT1A 40 FT1A 48 FT1A Touch X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Binary data to divide X X X X X X X X D1 Destination 1 Destination to store results X W word X When a bit device...

Page 160: ...e designated by S1 and combined to make 16 bit data The lower byte data from the first source device is moved to the upper byte of the destination designated by device D1 and the lower byte data from the next source device is moved to the lower byte of the destination DTCB W S1 D1 FT1A 12 FT1A 24 FT1A 40 FT1A 48 FT1A Touch X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Binary ...

Page 161: ... S1 are exchanged and the result is stored to data registers D20 and D21 designated by destination device D1 S1 D1 When input is on upper and lower byte or word data of a word or double word data designated by S1 are exchanged and the result is stored to destination designated by D1 REP S1 R D1 R SWAP FT1A 12 FT1A 24 FT1A 40 FT1A 48 FT1A Touch X X X X X Device Function I Q M R T C D Constant Repea...

Page 162: ...11 DATA CONVERSION INSTRUCTIONS 11 24 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...

Page 163: ...cution error will occur For details about the user program execution errors see Instructions Reference on page 4 1 User Program Execution Errors on page 4 13 Applicable CPU Modules Valid Devices Special data registers cannot be designated as S1 Internal relays M0 through M1277 can be designated as D1 Special internal relays cannot be designated as D1 The WEEK instruction compares the specified day...

Page 164: ...mined The day of the week and the time for the ON OFF settings cannot be changed while the SmartAxis is running Device tab 1 Data register settings This setting selects whether to configure the day of the week and the time as fixed settings or to indirectly specify them with data registers To configure the day of the week and the time as fixed settings clear this check box Cleared check box The da...

Page 165: ...me configured in the ON settings matches the current day of the week and the time the output is turned on for only one scan Cleared check box The output is turned on and off according to the ON settings and the OFF settings Parameter tab This tab configures the ON OFF settings for the output A maximum of 20 parameter tabs can be configured for one WEEK instruction 1 ON settings This section config...

Page 166: ...00 and OFF time is 10 00 on the P 1 tab and ON time is 8 00 and OFF time is 9 00 on the P 2 tab the 9 00 setting is duplicated on the two tabs and ON time for the P 1 tab is disabled In this situation the output is on from 8 00 to 9 00 Preview The preview shows the ON OFF state for the output based on the settings configured on the parameter tabs as a time chart The preview can be shown as a week ...

Page 167: ...eek and the times configured on the parameter tabs by turning on the initialization input For initialization see 3 S2 source 2 Initialization input on page 12 6 Note When this check box is cleared the day of the week and the time are fixed settings The day of the week and the time are configured on the parameter tabs The day of the week and the time cannot be changed while the SmartAxis is running...

Page 168: ...s This setting is shared in common with To configure the day of the week and the time as fixed settings See 6 Pulse Output on page 12 3 7 Data Register Allocation Click this button to display the Data Register Allocation dialog box As shown below a table of the data registers and their corresponding WEEK instruction settings is displayed on the dialog box 8 Click Allocate Comments 9 and you can co...

Page 169: ...iday is enabled in the OFF settings Day of the week setting ON 0000010 Day of the week setting OFF 0100000 The value of the data register is 1000100000 binary 544 decimal Monday and Thursday are enabled in the ON settings Tuesday and Saturday are enabled in the OFF settings Day of the week setting ON 0010010 Day of the week setting OFF 1000100 The value of the data register is 1001001000100 binary...

Page 170: ...ach week from 8 30 to 17 15 Parameter tab Configure the tab as shown above and set D1 to Q0 Ladder program To turn on output Q0 Tuesday Wednesday and Saturday each week from 20 30 to 1 15 the next day Parameter tab Configure the tab as shown above and set D1 to Q0 Ladder program D1 Q0 S2 WEEK S1 S3 1 M8125 D1 Q0 S2 WEEK S1 S3 1 M8125 ...

Page 171: ...next day Parameter tab Configure the settings using three tabs On P 1 tab configure the output to turn on Monday Wednesday and Friday from 6 00 to 9 00 On P 2 tab configure the output to turn on Monday Wednesday and Friday from 15 00 to 18 00 On P 3 tab configure the output to turn on Monday Wednesday and Friday from 22 00 to 0 00 the next day Configure the tabs as shown above and set D1 to Q0 ...

Page 172: ...ng on initialization input S2 Ladder program Data register Setting Initial setting D0 P 1 tab Day of the week setting 15934 Monday to Friday both ON settings and OFF settings D1 ON time 830 D2 OFF time 1715 D1 Q0 S2 WEEK S1 S3 3 M8125 SOTU M0 SOTU REP S1 900 MOV W D1 D1 M8120 REP S2 1700 D1 D2 M1 D1 M100 S2 M0 WEEK S1 D0 S3 1 M8125 M10 MOV W The initialization input M1 turns on with the first scan...

Page 173: ...he week data is outside the range of 0 to 6 a user program execution error will occur For details about the user program execution errors see Instructions Reference User Program Execution Errors on page 4 13 Applicable CPU Modules Valid Devices Special data registers cannot be designated as S1 Internal relays M0 through M1277 can be designated as D1 Special internal relays cannot be designated as ...

Page 174: ...y determined The dates for the ON OFF settings cannot be changed while the SmartAxis is running Device tab 1 Data register settings This setting selects whether to configure YEAR instruction dates as fixed settings or to indirectly specify them with data registers To configure the dates as fixed settings clear this check box Cleared check box The dates are fixed settings The dates are configured o...

Page 175: ... the current date changes to the date in the ON settings the output is turned on for only one scan Cleared check box The output is turned on and off according to the ON settings and the OFF settings Parameter tab This tab configures the settings for the output A maximum of 20 parameter tabs can be configured for 1 YEAR instruction 1 Yearly When Yearly is selected the Month and Day settings are val...

Page 176: ... P 1 tab are disabled In this situation the output is on from the 8th to the 16th of every month Setting Description Range Year Specifies the year to turn on the output 2000 to 2099 Month and Day setting Month Specifies the month to turn on the output 1 to 12 Day Specifies the day to turn on the output 1 to 31 Day of the week Specifies the day as the day of the week to turn on the output Specify t...

Page 177: ...te for the output based on the settings configured on the parameter tabs in a calendar The dates that are set to ON are highlighted in orange Three months are shown at one time Setting Description Year Specifies the year to show in the preview Scrollbar You can change the month shown in the preview by moving the scrollbar ...

Page 178: ... fixed settings The dates are configured on the parameter tabs The dates cannot be changed while the SmartAxis is running For fixed settings see To configure the dates as a fixed setting on page 12 12 2 S1 source 1 Starting data register This setting specifies the start of the data register region to store the dates for the YEAR instruction This setting is only used when indirectly specifying the ...

Page 179: ...x As shown below a table of the data registers and their corresponding YEAR instruction settings is displayed on the dialog box 8 Click Allocate Comments 9 and you can configure the comments for the data registers that correspond to the names of the settings This button is only used when indirectly specifying the settings for the YEAR instruction with data registers Data Register Allocation dialog...

Page 180: ...f the week Start address 6 1 R W OFF setting Year Start address 7 1 R W Month Day or Day of the week number of days when specified to remain on Start address 76 1 R W P 20 tab ON setting Year Start address 77 1 R W Month Day or Day of the week Start address 78 1 R W OFF setting Year Start address 79 1 R W Month Day or Day of the week number of days when specified to remain on Bit 15 14 13 12 11 10...

Page 181: ...ing 001 1 1st Day of the week setting 001 1 Monday The value of the data register is 100001001 binary 265 decimal 4th Thursday of June Month setting 0110 6 June Week setting 100 4 4th Day of the week setting 100 4 Thursday The value of the data register is 11000100100 binary 1572 decimal Bit 15 14 13 12 11 10 9 6 5 4 3 2 1 Reserved Bit 8 Bit 7 Bit 0 Month setting Reserved Day setting 1 0 0 0 0 0 0...

Page 182: ...nd OFF settings February 15 to February 17 2012 Therefore the output remains off When the input is turned on or off during the interval between the ON and OFF settings On February 15 2012 when the input is turned on the result of the current date compared with the ON and OFF settings is within the ON and OFF settings February 15 to February 17 2012 Therefore the output turns on The output turns of...

Page 183: ...input being judged at 0 00 on July 4 2012 is to turn on the output for one scan When the input turns on on the day specified by the ON settings When the input turns on at 0 00 on July 2 2012 the output turns on for one scan When the input turns on after 0 01 on July 4 2012 the output remains off Settings Ladder program P 1 tab ON settings July 2 2012 P 2 tab ON settings July 4 2012 Output port Q0 ...

Page 184: ...gure the dates as fixed settings To turn on Q0 from 0 00 on September 1 2011 to 0 00 on June 25 2013 Parameter tab Configure the tab as shown above and set D1 to Q0 Ladder program ON OFF 2011 2012 2013 2014 9 1 6 25 ON date 2011 09 01 OFF date 2013 06 25 Yearly OFF Monthly OFF D1 Q0 S2 YEAR S1 S3 1 M8125 ...

Page 185: ...tput Q0 from 0 00 on August 12 to 0 00 on August 15 every year Parameter tab Configure the tab as shown above and set D1 to Q0 Ladder program ON OFF 2009 2010 2011 2012 8 12 8 15 8 12 8 15 8 12 8 15 8 12 8 15 ON date 2000 08 12 OFF date 2099 08 15 Yearly ON Monthly OFF D1 Q0 S2 YEAR S1 S3 1 M8125 ...

Page 186: ... 2000 to 2099 Parameter tab Configure the tab as shown above and set D1 to Q0 Ladder program ON OFF January February March April 2nd Monday 2nd Monday 1 day 2nd Monday 2nd Monday 1 day 2nd Monday 2nd Monday 1 day 2nd Monday 2nd Monday 1 day ON date 2000 2nd Monday OFF date 2099 2nd Monday 1 day Yearly OFF Monthly ON D1 Q0 S2 YEAR S1 S3 1 M8125 ...

Page 187: ...Year 2011 D1 Month Day 2305 September 1st D2 OFF settings Year 2013 D3 Month Day 1561 June 25th ON OFF 2011 2012 2013 2014 9 1 6 25 ON date 2011 09 01 OFF date 2013 06 25 Yearly OFF Monthly OFF Device tab Parameter tab SOTU M0 SOTU REP S1 2013 MOV W D1 D0 M8120 REP S2 2020 D1 D2 M1 D1 M100 S2 M0 YEAR S1 D0 S3 1 M8125 M10 MOV W The initial settings configured on the P 1 tab are stored in D0 to D3 a...

Page 188: ...12 CALENDAR COMPARISON INSTRUCTIONS 12 26 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...

Page 189: ...are included in the user program If a matching label does not exist a user program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module For details about the user program execution errors see Chapter 4 User Program Execution Errors on page 4 21 This is the label number from 0 to 255 used at the program address where the execution of program instruct...

Page 190: ...the jump for the rising or falling edge transition to be recognized When input I0 is on program execution jumps to label 0 When input I1 is on program execution jumps to label 1 When input I2 is on program execution jumps to label 2 M8121 is the 1 sec clock special internal relay When jump occurs to label 0 output Q0 oscillates in 1 sec increments M8122 is the 100 ms clock special internal relay W...

Page 191: ...ain program after the branch is executed A LRET instruction see below must be placed at the end of a program branch which is called so that normal program execution resumes by returning to the instruction following the LCAL instruction Note The END instruction must be used to separate the main program from any subroutines called by the LCAL instruction A maximum of four LCAL instructions can be ne...

Page 192: ...on returns to the instruction following the LCAL instruction I0 LCAL S1 0 REP S1 D0 D1 D1 MOV W REP S1 D20 D1 D21 MOV W Correct I0 LCAL S1 0 REP S1 D0 D1 D1 MOV W REP S1 D20 D1 D21 MOV W Incorrect Separate the ladder line for each LCAL instruction I0 status may be changed by the subroutine upon return M0 S M0 S I0 When input I0 is on program execution jumps to label 0 When input I1 is on program e...

Page 193: ... When using a variable for a label make sure that all probable LABEL numbers are included in the user program If a matching label does not exist a user program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module When input is on the value stored in the data register designated by S1 is decremented by one and is checked If the resultant value is not...

Page 194: ...cles IMOV moves D0 data 1049 to D1049 in the first cycle DEC decrements D0 data to 1048 DJNZ jumps to label 255 until D1 value reduces to 0 LABEL 255 M8120 END M8120 REP S1 D0 D1 D99 IMOV W S2 D2 D1 REP S1 1049 D1 D0 MOV W REP S1 50 D1 D1 MOV W S D D0 DEC W S2 255 S1 D1 DJNZ 1049 D0 Destination D99 50 D149 1049 D149 50 D1 1st cycle 1048 D0 Destination D99 49 D148 1048 D148 49 D1 2nd cycle 1047 D0 ...

Page 195: ...ual input status of the same input number is read to the internal input memory when the END instruction is executed as in the normal scanning then the filter value has effect as designated in the Function Area Settings See page 5 42 Basic Vol When input is on 1 bit I O data designated by source device S1 is refreshed immediately regardless of the scan time When I input is used as S1 the actual inp...

Page 196: ...al relay D8033 stores 0 to designate jump destination label 0 for interrupt input I2 When input I2 is on program execution jumps to label 0 M8125 is the in operation output special internal relay IOREF immediately reads input I0 status to internal relay M300 M300 turns on or off the output Q0 internal memory Another IOREF immediately writes the output Q0 internal memory status to actual output Q0 ...

Page 197: ... Vol HSCRF FT1A 12 FT1A 24 FT1A 40 FT1A 48 FT1A Touch X X X X X M8120 is the initialize pulse special internal relay D8036 stores 0 to designate jump destination label 0 for timer interrupt The interrupt program is separated from the main program by the END instruction While the CPU is running program execution jumps to label 0 repeatedly at intervals selected in the Function Area Settings M8125 i...

Page 198: ...15 REFRESH INSTRUCTIONS 15 4 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...

Page 199: ...the DI or EI instruction is executed a user program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module The DI and EI instructions cannot be used in an interrupt program If used a user program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module For details about the user program execution errors see...

Page 200: ...r Interrupt to select source device S1 The example below selects interrupt inputs I2 I3 and timer interrupt for the DI instruction and a 22 will be shown as source device S1 The total of selected interrupt inputs and timer interrupt is shown as source device S1 Interrupt S1 Value Interrupt Input I0 0 Interrupt Input I2 2 Interrupt Input I3 4 Interrupt Input I5 8 Interrupt Input I6 32 Interrupt Inp...

Page 201: ...on End of the main program When input I2 is on program execution jumps to label 0 M8125 is the in operation output special internal relay ALT turns on or off the output Q2 internal memory IOREF immediately writes the output Q2 internal memory status to actual output Q2 Program execution returns to the main program When input I3 is on program execution jumps to label 1 M8125 is the in operation out...

Page 202: ...16 INTERRUPT CONTROL INSTRUCTIONS 16 4 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...

Page 203: ...t data ranges are available depending on the data type The coordinate conversion instructions convert one data point to another value using a linear relationship between values of X and Y X0 Y0 X1 Y1 X2 Y2 X Y When input is on the format for XY conversion is set The XY coordinates define the linear relationship between X and Y No of XY Coordinates n 2 to 32 0 n 31 XYFS S1 Y0 Xn X0 Yn FT1A 12 FT1A ...

Page 204: ... LED on the CPU module For details about the user program execution errors see Chapter 4 User Program Execution Errors on page 4 21 S2 X value Enter a value for the X coordinate to convert within the range specified in the XYFS instruction Valid Coordinates Y 0 65535 65535 X Y 0 32767 32768 X 65535 W word X When a bit device such as I input Q output M internal relay or R shift register is designat...

Page 205: ... CPU module For details about the user program execution errors see Chapter 4 User Program Execution Errors on page 4 21 S2 Y value Enter a value for the Y coordinate to convert within the range specified in the XYFS instruction Two different data ranges are available depending on the data type Data Type Word Integer S2 X value 0 to 65535 0 to 65535 D1 Y value 0 to 65535 32768 to 32767 Valid Coord...

Page 206: ...5 Data Type Word Integer S2 Y value 0 to 65535 32768 to 32767 D1 X value 0 to 65535 0 to 65535 Valid Coordinates Y 0 65535 65535 X Y 0 32767 32768 X 65535 W word X When a bit device such as I input Q output M internal relay or R shift register is designated as S2 or D1 16 points are used When a word device such as T timer C counter or D data register is designated as S2 or D1 1 point integer data ...

Page 207: ...es two points When input I0 is on CVXTY converts the value in D10 and stores the result in D20 When input I1 is on CVYTX converts the value in D11 and stores the result in D21 The graph shows the linear relationship that is defined by the two points If the value in data register D10 is 2000 the value assigned to D20 is 1000 For Y to X conversion the following equation is used If the value in data ...

Page 208: ...ed by the first two points has priority in these cases The line between points X0 Y0 and X1 Y1 that is the line between 0 100 and 100 0 has priority in defining the relationship for Y to X conversion X Y 100 Therefore if the value in data register D95 is 40 the value assigned to D30 is 60 not 180 Exactly the same two line segments might also be defined by the XYFS instruction except that the point...

Page 209: ...designated by D1 When the sampling exceeds 65535 cycles the average maximum and minimum values at this point are set to 3 devices starting with device designated by D1 and sampling continues When the sampling end input is turned on before the sampling cycles designated by device S3 have been completed sampling is stopped and the results at this point are set to 3 devices starting with device desig...

Page 210: ...utput M internal relay or R shift register is designated as the source 16 points word or integer data type or 32 points double word or long data type are used When a word device such as T timer C counter or D data register is designated as the source 1 point word or integer data type or 2 points double word long or float data type are used I integer X D double word X L long X F float X M8125 is th...

Page 211: ...nternal relays M0 through M1277 can be designated as D1 Special internal relays cannot be designated as D1 The first digit of the internal relay number must be 0 not 1 to 7 The PULS instructions output pulses of the specified frequency from the specified pulse output ports When the input is on pulses are output according to the control register settings specified by S1 The pulse control informatio...

Page 212: ... s Manual 1 2 3 4 Instruction Pulse output Configurable operation mode Enable disable pulse counting PULS1 Q14 Operation mode 0 1 Hz to 10 kHz Operation mode 1 200 Hz to 100 kHz Pulse counting can be enabled or disabled Pulse counting range 1 to 100 000 000 PULS2 Q15 PULS3 Q16 Operation mode 0 1 Hz to 5 kHz Disable pulse counting PULS4 Q17 Storage destination Function Setting Reference Starting nu...

Page 213: ...o output from two operation modes PULS3 and PULS4 only support operation mode 0 Note The output frequency error is within 5 6 Output pulse frequency Storage destination Function Setting Starting number 0 Pulse output ON 0 Pulse output OFF 1 Pulse output ON This relay turns on during pulse output This relay turns off when pulse output stops This relay turns off when the specified number of pulses a...

Page 214: ...m execution error is turned on and this register is set to the error code Pulse counting Supported instruction PULS1 PULS2 PULS3 PULS4 0 Disable pulse counting Pulses are continuously output while the input is on X X X X 1 Enable pulse counting The number of pulses specified by the preset value are output X X Error code Status Description 0 Normal 2 Pulse frequency designation error PULS1 PULS2 Th...

Page 215: ...t value Set the interval period for changing the pulse frequency to be sufficiently long as compared to the output pulse frequency When the PULS1 instruction input changes from on to off M50 turns off and M51 turns on at the same time The changes from the initialization input are not reflected while the PULS1 instruction input is on If you wish to initialize the data registers with the initializat...

Page 216: ...val period for changing the pulse frequency to be sufficiently long as compared to the output pulse frequency When the PULS2 instruction input changes from on to off M200 turns off and M201 turns on at the same time The changes from the initialization input are not reflected while the PULS2 instruction input is on If you wish to initialize the data registers with the initialization input turn the ...

Page 217: ...z Output pulse frequency D0 20 200 Hz Pulse counting Enable pulse counting Preset value D2 D3 5000 Preset value 5 000 M0 SOTU M1 S M101 R SOTU M8120 M101 I0 M101 REP D1 D0 MOV W S1 50 REP D1 D2 MOV D S1 60000 D1 M100 S2 M0 PULS 1 S1 D0 M1 When PULS1 instruction input I0 turns on start output of pulses with a frequency of 200 Hz Pulse output complete M101 turns off pulse output not complete Turn on...

Page 218: ...esignated as D1 Special internal relays cannot be designated as D1 The first digit of the internal relay number must be set to 0 The PWM instructions output pulses at the specified frequency and duty cycle from the output port When the input is on pulses are output according to the control register settings specified by S1 The pulse control information output on output complete error is stored in ...

Page 219: ...relay M0 to M1277 can be specified When the initialization input is on the initial values are written to the data registers with each scan To only initialize the values one time use the initialization input in combination with the SOTU single output up instruction or the SOTD single output down instruction Note For the 40 I O type external inputs I0 to I27 can be used 1 2 3 4 Instruction Pulse out...

Page 220: ...d up so the increment is 2 When 1 000 Hz is specified for the pulse frequency 1000 50 20 so the increment is 20 For increments of 2 a value from 1 to 2 entered in Pulse width ratio is increased and handled as 2 3 to 4 is increased and handled as 4 For increments of 20 1 to 20 is handled as 20 21 to 40 is handled as 40 7 Pulse counting This setting enables or disables pulse counting Storage destina...

Page 221: ...ted at each scan 10 Error status If a configuration error occurs when the PWM instruction input changes from off to on M8004 user program execution error is turned on and this register is set to the error code Error code Status Description 0 Normal 1 Pulse frequency designation error The pulse frequency was not set between 1 and 1 000 2 Pulse width ratio designation error The pulse width ratio was...

Page 222: ... that value Set the interval period for changing the width ratio to be sufficiently long as compared to the output pulse frequency When the PWM1 instruction input changes from on to off M50 turns off and M51 turns on at the same time The changes from the initialization input are not reflected while the PWM1 instruction input is on If you wish to initialize the data registers with the initializatio...

Page 223: ...e interval period for changing the width ratio to be sufficiently long as compared to the output pulse frequency When the PWM2 instruction input changes from on to off M200 turns off and M201 turns on at the same time The changes from the initialization input are not reflected while the PWM2 instruction input is on If you wish to initialize the data registers with the initialization input turn the...

Page 224: ...ings Function Device address Setting value Details Output pulse frequency D0 50 50 Hz Pulse width ratio D1 30 30 Pulse counting Disable pulse counting Preset value D2 D3 M0 M8120 I0 I1 REP D1 D1 MOV W S1 30 REP D1 D1 MOV W S1 60 D1 M100 S2 M0 PWM 1 S1 D0 I0 Turn on initialization input M0 Set pulse width ratio D1 to 60 60 ON When PWM1 instruction input I1 turns on start output of a pulse with the ...

Page 225: ... of the internal relay number must be set to 0 The RAMP instruction outputs pulses with a frequency change function When the input is on pulses of the initial pulse frequency specified by S1 are output and then the pulse frequency is increased by a fixed ratio until it reaches the steady pulse frequency After steady pulse output at the steady pulse frequency the pulse frequency is decreased before...

Page 226: ...Functions 32 bit Data Storage Setting in the FT1A Series Pro Lite User s Manual 1 2 3 4 Storage destination Function Setting Reference Starting number 0 Steady pulse frequency Operation mode 0 1 to 10 000 increments of 1 Hz Operation mode 1 20 to 10 000 increments of 10 Hz 6 Steady pulse frequency on page 19 18 Starting number 1 Initial pulse frequency Operation mode 0 1 to 10 000 increments of 1 ...

Page 227: ...tput from following operation modes Select the operation mode according to the steady pulse frequency and the initial pulse frequency used Note The output frequency error is within 5 Storage destination Function Setting Starting number 0 Pulse output ON 0 Pulse output OFF 1 Pulse output ON This relay turns on during pulse output This relay turns off when the RAMP instruction output stops This rela...

Page 228: ... of the pulse output mode and reversible control and the model used Note When using single pulse mode on the 40 I O type Q16 or Q17 are used Therefore PULS3 PWM3 or PULS4 PWM4 cannot be used 10 Control direction When reversible control is enabled store 0 in this data register for forward operation and store 1 in this data register for reverse operation 11 Preset value This setting configures the t...

Page 229: ...er than the steady pulse frequency Error code Description 0 Normal 2 Initial pulse frequency designation error The initial pulse frequency was not set between 1 and 10 000 in operation mode 0 The initial pulse frequency was not set between 20 and 10 000 in operation mode 1 3 Preset value designation error The preset value was not set between 1 to 100 000 000 4 Steady pulse frequency designation er...

Page 230: ...red by the preset value are output At this time M50 turns off and M51 turns on If the RAMP instruction input turns off during pulse output pulse output is canceled If the RAMP instruction input turns on again the pulse count is reset and pulse counting starts Even if the contents of the control registers are changed during pulse output the change is not reflected in the operation of pulse output T...

Page 231: ...ses stop In this situation M50 turns off and M51 turns on If the RAMP instruction input turns off during pulse output pulse output is canceled If this input turns on again the operation starts from the beginning Even if the contents of the data registers are changed during pulse output the change is not reflected in the pulse output operation The changed content is reflected the next time the RAMP...

Page 232: ...he pulses stop In this situation M50 turns off and M51 turns on If the RAMP instruction input turns off during pulse output pulse output is canceled If this input turns on again the operation starts from the beginning Even if the contents of the data registers are changed during pulse output the change is not reflected in the pulse output operation The changed content is reflected the next time th...

Page 233: ...value Details Operation mode Mode 1 200 Hz to 100 kHz Steady pulse frequency D0 600 6000 Hz Initial pulse frequency D1 30 300 Hz Frequency change time D2 2000 2 000 ms Reversible control enable Disable Control direction D3 Forward Forward 0 Preset value D4 D5 48000 Preset value 48 000 M0 M8120 I0 D1 M100 S2 M0 RAMP 1 S1 D0 When the RAMP instruction input I0 turns on pulse output starts Turn on ini...

Page 234: ...ce address Setting value Details Operation mode Mode 1 200 Hz to 100 kHz Steady pulse frequency D0 1000 10 kHz Initial pulse frequency D1 50 500 Hz Frequency change time D2 2000 2 000 ms Reversible control enable Single pulse output Control direction D3 Forward Forward 0 Preset value D4 D5 100000 Preset value 100 000 M0 M8120 I1 I0 REP D1 D3 MOV W S1 0 REP D1 D3 MOV W S1 1 D1 M100 S2 M0 RAMP 1 S1 ...

Page 235: ...ting value Details Operation mode Mode 1 200 Hz to 100 kHz Steady pulse frequency D0 3000 30 Hz Initial pulse frequency D1 1000 10 kHz Frequency change time D2 2000 2 000 ms Reversible control enable Dual pulse output Control direction D3 Forward Forward 0 Preset value D4 D5 1000000 Preset value 1 000 000 M0 M8120 I1 I0 REP D1 D3 MOV W S1 0 REP D1 D3 MOV W S1 1 D1 M100 S2 M0 RAMP 1 S1 D0 I1 When t...

Page 236: ...e correctly The ZRN instruction outputs pulses while the proximity signal is off When the input is on pulses of the initial pulse frequency specified by S1 and S1 1 are output until the proximity signal specified by S3 turns on When the proximity signal turns on pulses of the creep pulse frequency specified by S1 2 and S1 3 are output until the proximity signal turns off When the proximity signal ...

Page 237: ...are stored in the control registers An external input I0 to I35 Note or an internal relay M0 to M1277 can be specified When the initialization input is on the initial values are written to the data registers with each scan To only initialize the values one time use the initialization input in combination with the SOTU single output up instruction or the SOTD single output down instruction Note For...

Page 238: ...ay number must be 0 not 1 to 7 Otherwise the ZRN instruction will not operate correctly Setting tab 6 Initial operation mode This setting selects the range of frequencies to output from the two modes 7 Initial pulse frequency This setting specifies the initial pulse frequency to output Initial operation mode 0 Set between 1 Hz and 10 kHz in increments of 1 Hz Initial operation mode 1 Set between 2...

Page 239: ...crements of 10 Hz 10 Error status If a configuration error occurs when the ZRN instruction is being executed M8004 user program execution error is turned on and this relay is set to the error code Creep operation mode 0 1 Hz to 10 kHz increments of 1 Hz 1 200 Hz to 100 kHz increments of 10 Hz Error code Status Description 0 Normal 2 Pulse frequency designation error The pulse frequency was not set...

Page 240: ... on If the ZRN1 instruction input turns off during pulse output pulse output stops If the input turns on again the operation starts from the beginning Even if the contents of the data registers are changed during pulse output the change is not reflected in the pulse output operation The changed content is reflected the next time the ZRN1 instruction is started The changes from the initialization i...

Page 241: ...unction Device address Setting value Details Initial operation mode Mode 0 1 Hz to 10 kHz Initial pulse frequency D0 3000 3 kHz Creep operation mode Mode 0 1 Hz to 10 kHz Creep pulse frequency D1 800 800 Hz M0 M100 R M101 R M8120 I1 D1 M100 S3 I3 ZRN 1 S1 D0 S1 M0 Pulse output ON relay off Pulse output complete relay off When the ZRN1 instruction input turns on pulse output starts Turn on initiali...

Page 242: ...RAMP with table instructions Applicable CPU Modules Note These instructions cannot be used with FT1A H40RC and FT1A B40RC The ARAMP instructions output pulses with the frequency change function according to the information in the frequency table When the input is on pulses are output according to the frequency change settings stored in the control register settings specified by S1 The pulse freque...

Page 243: ...hrough M1277 can be designated as D1 Special internal relays cannot be designated as D1 The first digit of the internal relay number must be set to 0 Device Function I Q M R T C D Constant Repeat S1 Source 1 Control register S2 Source 2 Initialization input X X S3 Source 3 Interrupt input X X D1 Destination 1 Monitor register D2 Destination 2 Operation status ...

Page 244: ... a step are changed after it starts running those changes are not reflected while the step is running Note The upper and lower data registers change according to the 32 bit data storage method specified For details see Chapter 5 Special Functions 32 bit Data Storage Setting in the FT1A Series SmartAxis Pro Lite User s Manual Storage destination Function Setting Reference Starting number 0 Interrup...

Page 245: ... or internal relay as the interrupt input signal for the ARAMP1 and ARAMP2 instructions To use the high speed interrupt input signal set the relevant input to Normal Input under Special Input on Function Area Settings Do not use the input as interrupt input catch input high speed counter or frequency measurement When using the high speed interrupt input ensure that no chatter noise occurs in the i...

Page 246: ...pulses that have been output for the step that is currently being executed The current value is updated when the ARAMP instruction is executed at each scan Error status If a configuration error occurs when a step starts executing M8004 user program execution error is turned on and this register is set to the error code Address Description Value range unit Starting number 0 Next step number 0 to 18...

Page 247: ...e 1 Pulse output complete This relay turns on when pulse output completes This relay turns on when the step number currently being executed is 0 This relay turns off when the ARAMP instruction output starts Starting number 2 Pulse output status 0 Steady pulse output 1 Changing output pulse frequency This relay turns off when the pulse output status is steady This relay turns on when the pulse outp...

Page 248: ...ges from off to on the pulse output process for the running step is aborted and pulse output restarts with the settings for the step configured by the interrupt number Reversible control enable 0 Reversible control disabled 1 Reversible control single pulse output 2 Reversible control dual pulse output Reversible control disabled Select this option when using pulse output in a single direction Pul...

Page 249: ...0 000 000 0 indicates no pulse restriction 16 Step options This setting configures the step direction and the execution timing of the change in the pulses The frequency changes as shown in the following diagram according to the setting for the execution timing of the change For Before the frequency is first changed and then it becomes the steady frequency When the number of pulses in the preset va...

Page 250: ... Max This setting configures the maximum value for the graph The range of values that can be entered depends on the selected mode 19 Min This setting configures the minimum value for the graph The range of values that can be entered depends on the selected mode 20 Slide bar Move the slide bar to preview the operation when the interrupt input is executed 18 19 20 ...

Page 251: ...When the configured number of pulses are output the pulses stop In this situation M50 turns off and M51 turns on If the ARAMP instruction input turns off during pulse output pulse output ends If the ARAMP instruction input turns on again the operation starts from the beginning Even if the contents of the data registers are changed during pulse output the change is not reflected in the pulse output...

Page 252: ... and M51 turns on If the ARAMP instruction input turns off during pulse output pulse output ends If this input turns on again the operation starts from the beginning Even if the contents of the data registers are changed during pulse output the change is not reflected in the pulse output operation The changed content is reflected the next time the ARAMP instruction is started Forward and reverse c...

Page 253: ... output the pulses stop In this situation M50 turns off and M51 turns on If the ARAMP instruction input turns off during pulse output pulse output ends If the ARAMP instruction input turns on again the operation starts from the beginning Even if the contents of the data registers are changed during pulse output the change is not reflected in the pulse output operation The changed content is reflec...

Page 254: ...ing value Details Operation mode Mode 0 1 Hz to 10 kHz Reversible control enable Disable The number of steps 3 Start number 1 Step 1 Interrupt number D0 0 0 No interrupt step Step 1 Step 2 Step 3 10 kHz 1 kHz 100 Hz 1 Hz Frequency change time 2 000 ms Frequency change time 2 000 ms Frequency change time 4 000 ms Preset value 4 000 Preset value 4 000 Preset value 4 000 M0 M8120 I0 D2 M50 D1 D20 ARA...

Page 255: ...tep number D7 2 Step 2 Function Device address Setting value Details Steady pulse frequency D8 1000 1 000 Hz Frequency change time D9 2000 2 000 ms Preset value D10 D11 4000 Preset value 4 000 Control direction D12 Forward Forward Timing of change D12 After After Next step number D13 3 Step 3 Function Device address Setting value Details Steady pulse frequency D14 1 1 Hz Frequency change time D15 ...

Page 256: ...00 1 kHz Step 2 Preset value 5 000 Frequency change time 3 000 ms Frequency change time 3 000 ms Step 3 Step 4 Frequency change time 3 000 ms Frequency change time 3 000 ms M0 I2 I0 D2 M50 D1 D20 ARAMP 1 S3 S2 M0 S1 D0 I1 REP D1 D2 MOV W S1 5000 REP D1 D14 MOV W S1 5000 When the ARAMP instruction input I0 turns on pulse output starts When the MOV instruction input I1 turns on the steady pulse freq...

Page 257: ...versible control enable Single pulse output The number of steps 4 Start number 1 Step 1 Interrupt number D0 0 0 No interrupt step Function Device address Setting value Details Steady pulse frequency D2 100 1 kHz Frequency change time D3 3000 3 000 ms Preset value D4 D5 5000 Preset value 5 000 Control direction D6 Forward Forward 0 Timing of change D6 After After 2 Next step number D7 2 Step 2 ...

Page 258: ... number D13 3 Step 3 Function Device address Setting value Details Steady pulse frequency D14 100 1 kHz Frequency change time D15 3000 3 000 ms Preset value D16 D17 5000 Preset value 5 000 Control direction D18 Reverse Reverse 1 Timing of change D18 Before Before 0 Next step number D19 4 Step 4 Function Device address Setting value Details Steady pulse frequency D20 20 200 Hz Frequency change time...

Page 259: ...me 8 000 ms Frequency change time 8 000 ms Frequency change time 8 000 ms Preset value 1 000 000 Preset value 100 000 Interrupt Step Preset value 3 000 Preset value 3 000 Preset value 3 000 Frequency Frequency change time change time 5 000 ms 5 000 ms Frequency change time 5 000 ms Preset value 1 000 000 Preset value 1 000 000 Preset value 1 000 000 M0 M100 I2 I0 D2 M50 D1 D20 ARAMP 1 S3 M100 S2 M...

Page 260: ... 6 Function Device address Setting value Details Steady pulse frequency D2 500 5 kHz Frequency change time D3 5000 5 000 ms Preset value D4 D5 100000 Preset value 100 000 Control direction D6 Forward Timing of change D6 After Next step number D7 2 Step 2 Function Device address Setting value Details Steady pulse frequency D8 1000 10 kHz Frequency change time D9 5000 5 000 ms Preset value D10 D11 1...

Page 261: ... Next step number D19 4 Step 4 Function Device address Setting value Details Steady pulse frequency D20 500 5 kHz Frequency change time D21 8000 8 000 ms Preset value D22 D23 1000000 Preset value 1 000 000 Control direction D24 Forward Timing of change D24 After Next step number D25 5 Step 5 Function Device address Setting value Details Steady pulse frequency D26 20 200 Hz Frequency change time D2...

Page 262: ...ettings Function Device address Setting value Details Steady pulse frequency D31 20 200 Hz Frequency change time D32 5000 5000 ms Preset value D33 D34 2000 Preset value 2 000 Control direction D35 Forward Forward 0 Timing of change D35 Before Before 0 Next step number D36 0 Step 0 end ...

Page 263: ...evice D1 repeats to turn on and off for a duration designated by devices S1 and S2 respectively When the input is off D1 turns off The time range is 0 through 65535 sec S1 D1 DTML S2 D2 While input is on destination device D1 repeats to turn on and off for a duration designated by devices S1 and S2 respectively When the input is off D1 turns off The time range is 0 through 6553 5 sec S1 D1 DTIM S2...

Page 264: ...ror occurs the execution of the instruction is canceled and the next instruction is executed The data in D1 destination 1 is unchanged For details about the user program execution errors see Chapter 4 User Program Execution Errors on page 4 21 Examples DTML DTIM DTMH DTMS For the timer accuracy of timer instructions see page 7 9 Basic Vol Device Function I Q M R T C D Constant S1 Source 1 ON durat...

Page 265: ...ee Chapter 4 User Program Execution Errors on page 4 21 Examples TTIM The following example demonstrates a program to measure the ON duration of input I0 and to use the ON duration as a preset value for 100 ms timer instruction TIM While input is on the ON duration is measured in units of 100 ms and the measured value is stored to a data register designated by destination device D1 When the input ...

Page 266: ...20 DUAL TEACHING TIMER INSTRUCTIONS 20 4 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...

Page 267: ...xecution errors see Chapter 4 User Program Execution Errors on page 4 21 Since the RAD instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required Valid Data Types Example RAD S1 S1 1 180 D1 D1 1 rad When input is on the degree value designated by source device S1 is converted into a radian value and stored to the destination desi...

Page 268: ...struction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required Valid Data Types Example DEG S1 S1 1 rad 180 D1 D1 1 When input is on the radian value designated by source device S1 is converted into a degree value and stored to the destination designated by device D1 DEG F S1 D1 FT1A 12 FT1A 24 FT1A 40 FT1A 48 FT1A Touch X X X X X Devi...

Page 269: ...a Types Example SIN sin S1 S1 1 D1 D1 1 When input is on the sine of the radian value designated by source device S1 is stored to the destination designated by device D1 SIN F S1 D1 FT1A 12 FT1A 24 FT1A 40 FT1A 48 FT1A Touch X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Radian value to convert into sine value X X D1 Destination 1 Destination to store conversion results X W wo...

Page 270: ...Types Example COS cos S1 S1 1 D1 D1 1 When input is on the cosine of the radian value designated by source device S1 is stored to the destination designated by device D1 COS F S1 D1 FT1A 12 FT1A 24 FT1A 40 FT1A 48 FT1A Touch X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Radian value to convert into cosine value X X D1 Destination 1 Destination to store conversion results X W ...

Page 271: ...N instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required Valid Data Types Example TAN tan S1 S1 1 D1 D1 1 When input is on the tangent of the radian value designated by source device S1 is stored to the destination designated by device D1 TAN F S1 D1 FT1A 12 FT1A 24 FT1A 40 FT1A 48 FT1A Touch X X X X X Device Function I Q M R...

Page 272: ...hen input is on the arc sine of the value designated by source device S1 is stored in radians to the destination designated by device D1 The S1 S1 1 value must be within the following range 1 0 S1 S1 1 1 0 If the S1 S1 1 value is not within this range 0 is stored to D1 D1 1 ASIN F S1 D1 FT1A 12 FT1A 24 FT1A 40 FT1A 48 FT1A Touch X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 A...

Page 273: ...en input is on the arc cosine of the value designated by source device S1 is stored in radians to the destination designated by device D1 The S1 S1 1 value must be within the following range 1 0 S1 S1 1 1 0 If the S1 S1 1 value is not within this range 0 is stored to D1 D1 1 ACOS F S1 D1 FT1A 12 FT1A 24 FT1A 40 FT1A 48 FT1A Touch X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 ...

Page 274: ...pes Example ATAN atan S1 S1 1 D1 D1 1 rad When input is on the arc tangent of the value designated by source device S1 is stored in radians to the destination designated by device D1 ATAN F S1 D1 FT1A 12 FT1A 24 FT1A 40 FT1A 48 FT1A Touch X X X X X Device Function I Q M R T C D Constant Repeat S1 Source 1 Arc tangent value to convert into radian X X D1 Destination 1 Destination to store conversion...

Page 275: ...s left unchanged and the next instruction is executed When a user program execution error occurs special internal relay M8004 and ERR LED on the CPU module are turned on For details about the user program execution errors see Chapter 4 User Program Execution Errors on page 4 21 Since the LOGE instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction shoul...

Page 276: ...ution error occurs special internal relay M8004 and ERR LED on the CPU module are turned on For details about the user program execution errors see Chapter 4 User Program Execution Errors on page 4 21 Since the LOG10 instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required Valid Data Types Example LOG10 log10 S1 S1 1 D1 D1 1 Wh...

Page 277: ... is executed When a user program execution error occurs special internal relay M8004 and ERR LED on the CPU module are turned on For details about the user program execution errors see Chapter 4 User Program Execution Errors on page 4 21 Since the EXP instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required Valid Data Types Exa...

Page 278: ...and the execution of the instruction is canceled The value of D1 is left unchanged and the next instruction is executed When a user program execution error occurs special internal relay M8004 and ERR LED on the CPU module are turned on For details about the user program execution errors see Chapter 4 User Program Execution Errors on page 4 21 Since the POW instruction is executed in each scan whil...

Page 279: ... cannot be designated as D2 Since the FIFOF instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required Valid Data Types When input is on FIFOF instruction initializes an FIFO data file Each data file has unique number 0 through 9 A maximum of 10 data files can be used in a user program FIFOF W S1 S2 D1 D2 FT1A 12 FT1A 24 FT1A 40 ...

Page 280: ...EX instruction is executed the data at the position indicated by the FIFO pointer is retrieved and stored to the data registers starting with the device designated by D1 of the FOEX instruction and the FO pointer is incremented by 1 to indicate the position to retrieve the next data When the FO pointer indicates the last record of the FIFO data file and an FOEX instruction is executed the FO point...

Page 281: ...ng the corresponding FIFOF instruction a user program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module When a user program execution error occurs the execution of the instruction is canceled and the next instruction is executed For details about the user program execution errors see Chapter 4 User Program Execution Errors on page 4 21 Since the ...

Page 282: ...FIFO Data file D100 through D113 3 4 2 data registers FIFO status outputs M100 through M102 M8120 is the initialize pulse special internal relay When the CPU starts MOV sets 0 to FI and FO pointers and FIFOF initializes FIFO data file 2 When input I0 is turned on the data in D10 through D12 are stored to the FIFO data file 2 When input I1 is turned on the data in D20 through D22 are stored to the ...

Page 283: ...f the instruction is canceled and the next instruction is executed For details about the user program execution errors see Chapter 4 User Program Execution Errors on page 4 21 Since the NDSRC instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required Valid Data Types Quantity of Source and Destination Devices Depending on the dat...

Page 284: ...1 D200 Result 2 D201 Offset of first match Quantity of matches I0 D1 D200 S1 D10 S3 5 NDSRC D S2 D100 Offset 0 2 match 4 6 match 8 match Search 2 D200 Result 3 D201 12345678 D98 D99 Offset of first match Quantity of matches 12345678 D10 D11 1459997 D100 D101 12345678 D102 D103 4584557 D104 D105 12345678 D106 D107 12345678 D108 D109 1234457 D110 D111 I0 D1 D200 S1 D10 S3 5 NDSRC F S2 D100 Offset 0 ...

Page 285: ...device Data registers D0 D997 and D1000 D1997 can be designated as these devices When Mode 1 is selected source device S1 and destination device D1 occupy 7 consecutive data registers starting with the designated device Data registers D0 D993 and D1000 D1993 can be designated as these devices Source device S2 occupies 3 consecutive data registers starting with the designated device Data registers ...

Page 286: ... source 1 Year data can be 0 through 99 Month data 1 through 12 Day data 1 through 31 Hour data 0 through 23 Minute and second data 0 through 59 Year data 0 through 99 is processed as year 2000 through 2099 For source 2 Hour data can be 0 through 65535 Minute and second data can be 0 through 59 Destination 1 The day of week is calculated automatically from the resultant year month and day and stor...

Page 287: ...ay M8003 carry Source 1 15 D0 Hour 50 D1 Minute 40 D2 Second Source 2 10 D10 Hour 20 D11 Minute 30 D12 Second Destination 1 2 D20 Hour 11 D21 Minute 10 D22 Second SOTU I0 D1 D200 S1 D8008 S2 D100 TADD 1 Source 2 10 D100 Hour 15 D101 Minute 25 D102 Second Source 1 7 D8008 Year 8 D8009 Month 23 D8010 Day Destination 1 10 D8012 Hour 20 D8013 Minute 30 D8014 Second D8011 Note 7 D200 Year 8 D201 Month ...

Page 288: ...is incremented Source 1 7 D8008 Year 8 D8009 Month 23 D8010 Day Destination 1 20 D8012 Hour 30 D8013 Minute 40 D8014 Second 4 D8011 D of W 7 D200 Year 8 D201 Month 25 D202 Day 3 D204 Hour 5 D205 Minute 55 D206 Second 6 D203 D of W Note Note D8011 in source 1 is not used for execution and need not be designated The day of week is calculated automatically from the resultant year month and day and st...

Page 289: ...s Source device S2 occupies 3 consecutive data registers starting with the designated device Data registers D0 D997 and D1000 D1997 can be designated as source device S2 Since the TSUB instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required S1 S2 D1 CY When input is on time data designated by source device S2 are subtracted fr...

Page 290: ...ars For source 1 Year data can be 0 through 99 Month data 1 through 12 Day data 1 through 31 Hour data 0 through 23 Minute and second data 0 through 59 Year data 0 through 99 is processed as year 2000 through 2099 For source 2 Hour data can be 0 through 65535 Minute and second data can be 0 through 59 Destination 1 The day of week is calculated automatically from the resultant year month and day a...

Page 291: ...nal relay M8003 borrow Source 1 8 D0 Hour 10 D1 Minute 5 D2 Second Source 2 10 D10 Hour 30 D11 Minute 30 D12 Second Destination 1 21 D20 Hour 39 D21 Minute 35 D22 Second SOTU I0 D1 D200 S1 D8008 S2 D100 TSUB 1 Source 2 5 D100 Hour 15 D101 Minute 25 D102 Second Source 1 7 D8008 Year 8 D8009 Month 23 D8010 Day Destination 1 10 D8012 Hour 20 D8013 Minute 30 D8014 Second 4 D8011 D of W 7 D200 Year 8 D...

Page 292: ...is decremented Source 1 7 D8008 Year 8 D8009 Month 23 D8010 Day Destination 1 20 D8012 Hour 30 D8013 Minute 40 D8014 Second 4 D8011 D of W 7 D200 Year 8 D201 Month 22 D202 Day 13 D204 Hour 49 D205 Minute 50 D206 Second 3 D203 D of W Note Note D8011 in source 1 is not used for execution and need not be designated The day of week is calculated automatically from the resultant year month and day and ...

Page 293: ...ion is executed When the execution of the instruction is canceled the data in D1 and D1 1 is left unchanged For details about the user program execution errors see Chapter 4 User Program Execution Errors on page 4 21 Since the HTOS instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required Examples HTOS The following examples dem...

Page 294: ...cond destination 1 stores 1 hour 0 minute 0 second turning on special internal relay M8003 carry Since the STOH instruction is executed in each scan while input is on a pulse input from a SOTU or SOTD instruction should be used as required Examples STOH The following examples demonstrate the STOH instruction to convert time data in seconds into hours minutes and seconds and store the results to th...

Page 295: ...ds to repeat another measuring cycle with the comparison output remaining on When any of the hour minute or second data of source device S1 is out of the valid range a user program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module but the input ON duration is measured When any of the hour minute or second data of source device S1 is changed to an...

Page 296: ... in data registers D0 D1 D2 designated by source device S1 When the measured value reaches the preset value output Q2 designated by destination device D2 is turned on Data registers D1900 and D1901 designated by destination device D3 are reserved for system work area 35 D1 Minute 55 D2 Second I0 D3 D1900 S1 50 HOUR Destination 1 3 D100 Hour 25 D101 Minute 45 D102 Second D1 D100 D2 Q2 Source 1 50 C...

Page 297: ...e same data registers cannot be used as transmit status registers for TXD2 through TXD3 instructions and receive status registers for RXD2 through RXD3 instructions The TXD instructions cannot be used in an interrupt program If used a user program execution error will result turning on special internal relay M8004 and the ERR LED on the CPU module Precautions for Programming TXD Instruction The Sm...

Page 298: ...its are selected 00h through FFh is transmitted Constant values are entered in character or hexadecimal notation into the source data Constant Character Any character available on the computer keyboard can be entered One character is counted as one byte Constant Hexadecimal Use this option to enter the hexadecimal code of any ASCII character ASCII control codes NUL 00h through US 1Fh can also be e...

Page 299: ...ble in Binary to ASCII BCD to ASCII and no conversion When repeat is designated data of data registers as many as the repeat cycles are transmitted starting with the designated data register Repeat cycles can be up to 99 Conversion Type The transmit data is converted according to the designated conversion type as described below Example D10 stores 000Ch 12 1 Binary to ASCII conversion 2 BCD to ASC...

Page 300: ... to ASCII and is transmitted according to the designated repeat cycles 010Ch D10 0 30h 1 31h 0 30h C 43h 0 30h C 43h ASCII data Binary to ASCII conversion Transmitted data Lowest 2 digits 010Ch D10 Decimal 0 30h 0 30h 2 32h 6 36h 8 38h Lowest 3 digits 2 32h 6 36h 8 38h BCD to ASCII 00268 value conversion Transmitted data ASCII data 010Ch D10 No conversion SOH 01h FF 0Ch FF 0Ch Lowest 1 digit ASCII...

Page 301: ...dbus ASCII or Modbus RTU Example Conversion results of transmit data consist of 41h 42h 43h and 44h 1 BCC calculation formula XOR Calculation result 41h 42h 43h 44h 04h 2 BCC calculation formula ADD Calculation result 41h 42h 43h 44h 10Ah 0Ah Only the last 1 or 2 digits are used as BCC 3 BCC calculation formula ADD 2comp Calculation result FEh F6h 2 digits without conversion 4 BCC calculation form...

Page 302: ...a user communication error code Transmit Status Code If the transmit status code is other than shown above an error of transmit instruction is suspected See User Communication Error Code on page 26 32 Note On WindLDR Modbus ASCII is defaulted to binary to ASCII conversion Note On WindLDR Modbus RTU is defaulted to no conversion Note On WindLDR Modbus ASCII and Modbus RTU are defaulted to 2 digits ...

Page 303: ... for Programming the RXD Instruction The SmartAxis can execute a maximum of five instructions each of RXD2 through RXD3 that have a start delimiter at the same time If a start delimiter is not programmed in RXD2 through RXD3 instructions the SmartAxis can execute only one instruction each of RXD2 through RXD3 at a time If the start input for a RXD2 through RXD3 instruction is turned on while anoth...

Page 304: ...XD instruction on the ladder diagram of WindLDR Type TXD Transmit instruction RXD Receive instruction Port Port 2 Port 3 Receive user communication to port 2 RXD2 through port 3 RXD3 S1 Source 1 Enter the receive format in this area The receive format can include a start delimiter data register to store incoming data constants end delimiter BCC and skip D1 Destination 1 Receive completion output c...

Page 305: ...be included in the data register designation to end receiving communication Receive Digits The received data is divided into blocks of specified receive digits before conversion as described below Example Received data of 6 bytes are divided in different receive digits Repeat is also designated Conversion Type The data block of the specified receive digits is then converted according to the design...

Page 306: ...S1 the one byte data serves as a start delimiter to start the processing of the received data A maximum of five instructions each of RXD2 through RXD3 with different start delimiters can be executed at the same time When the first byte of the incoming data matches the start delimiter of a RXD instruction the received data is processed and stored according to the receive format specified in the RXD...

Page 307: ...ion error code 5 is stored in the data register designated as the receive status of the second RXD instruction When the error occurs the second RXD instruction is canceled and the first RXD instruction keeps executed If a multi byte start delimiter is designated and the incoming data does not match the entire multi byte start delimiter the SmartAxis discards the incoming data and waits for the nex...

Page 308: ...d RXD instruction is not executed and the user communication error code 5 is stored in the receive status D300 Note If the lengths of multi byte start delimiters of two RXD instructions executed at the same time are different these are considered the same multi byte start delimiter if the start delimiter constants as many as the length of the start delimiter of the RXD instruction whose start deli...

Page 309: ...er CR Single byte start delimiter Only the first byte can be the start delimiter The second byte of the incoming data which is the slave station number has to be stored to data register D0 and extra ladder programming is needed to see whether the slave station number of the incoming communication is 1 or not Only when the slave station number is 1 received data stored in D1 is valid for the local ...

Page 310: ...e or after the BCC code If a data register or skip is designated between the BCC and end delimiter correct receiving is not ensured When a RXD instruction without an end delimiter is executed data receiving ends when the specified bytes of data in the receive format such as data registers and skips have been received In addition data receiving also ends when the interval between incoming data char...

Page 311: ...ving the incoming data the receive status contains 74 meaning the RXD instruction has completed but user communication error code 5 occurred No extra ladder programming is needed to see whether the constant value in the received data is correct or not Note When configuring constants which are either characters or hexadecimal values in the receive format and the incoming data do not match the const...

Page 312: ... 0Dh Const 05h DR Const FFh DR Const 0Dh Receive status Receive completion output 74 1 Constant for verification of incoming data does not match the receive format Receive status stores 74 64 10 RXD instruction completes data receiving To repeat receiving incoming communication turn on the input for the RXD instruction Incoming Data Receive Format Constant for Verification 6th byte and after Const...

Page 313: ...culation results BCC Calculation Start Position The start position for the BCC calculation can be specified from the first byte through the 15th byte The BCC is calculated for the range starting at the designated position up to the byte immediately before the BCC of the receive data Example Received data consists of 17 bytes plus 2 BCC digits 1 Calculation start position 1 2 Calculation start posi...

Page 314: ...atus in the RXD instruction For user communication error code see page 26 32 Example 1 BCC is calculated for the first byte through the sixth byte using the XOR format converted in binary to ASCII and compared with the BCC code appended to the seventh and eighth bytes of the incoming data Note On WindLDR Modbus ASCII is defaulted to binary to ASCII conversion Note On WindLDR Modbus RTU is defaulte...

Page 315: ...er communication receive instruction cancel flag See page 25 20 Example A RXD instruction does not have an end delimiter and has a delimiter programmed in the receive format for data registers 1 31h 2 32h BCC Calculation Range 3 33h 4 34h Incoming Data 5 35h 6 36h 0 30h 7 37h BCC 31h 32h 33h 34h 35h 36h 135h 3 33h 5 35h BCC Calculation Result Binary to ASCII Conversion Comparison result is false E...

Page 316: ...ive instruction cancel flag cancels all RXD instructions for each port This function is useful to cancel receive instructions only without stopping the SmartAxis To make the cancelled RXD instructions active turn off the flag and turn on the input to the RXD instruction again Receive Status Code Status Description 16 Preparing data receive From turning on the start input for a RXD instruction to r...

Page 317: ...is complete the device designated by D1 is turned on Receive status the receive status and error code is stored to the device designated by D2 The byte count of received data is stored to D2 1 When user communication receive instruction cancel flag M8100 M8101 M8102 is turned on while receiving incoming data the execution of all active receive instructions for the corresponding connection is cance...

Page 318: ...25 USER COMMUNICATION INSTRUCTIONS 25 22 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...

Page 319: ...y card specification see Chapter 5 Special Functions SD Memory Card in the FT1A Series SmartAxis Pro Lite User s Manual The DLOG instruction saves the values of the specified devices in the specified data format as a CSV file on the SD memory card When the input is on the date and time and the values of the specified devices are output to the CSV file in the folder designated by S1 When the execut...

Page 320: ...il writing the log data is complete regardless of any change in the instruction input While the log data is being written to the SD memory card the instruction is not executed even when the inputs to DLOG instructions are turned on To execute the DLOG instruction again confirm that the previous data writing process has finished and then execute the instruction Applicable CPU Modules Valid Devices ...

Page 321: ...he display type of D10 is DEC W and the repeat is set to 5 the data is output to SD memory card as follows Status code Status Description 0 Normal 1 SD memory card insertion error The SD memory card is not inserted 2 SD memory card capacity error The SD memory card is full 3 SD memory card writing error Writing log data to the SD memory card fails 4 CSV file capacity error The CSV file exceeds 5 M...

Page 322: ...s is shown The amount of memory used increases when a device to log the data is added You can register up to a maximum of 64 devices the total amount of memory must be less than or equal to 1 024 bytes One byte of memory area is required for each character 10 Remaining size The amount of free memory the difference between the logging data size and 1 024 bytes is shown ...

Page 323: ...e Similarly if the DLOG instruction is executed again on the same date log data 3 is appended to the CSV file When the date changes and the DLOG instruction is executed a new CSV file with a new file name is created and the header and the log data is output File format configuration procedure 1 From the WindLDR menu bar select Configuration Cartridges 2 Under Data Log and Trace CSV File Output con...

Page 324: ...DLOG instruction status code is stored in D100 The status code saved in D100 is checked and Q0 is turned on if an error occurs Configuration Procedure 1 Insert the instructions in the Ladder editor 2 Configure the DLOG instruction Configure the Devices tab Designate M100 as D1 Completion Output 1 Designate D100 as D2 Execution Status 2 Time D0000 D0001 D0002 D0003 D0004 D0005 D0010 2012 02 06 10 2...

Page 325: ...mory card as decimal values along with the current date and time The saved location of CSV files is DATA0001 DATALOG RESULT The oldest data is saved at the top of the log data and the latest data is saved at the bottom of the log data When the execution of the DLOG instruction completes the completion output M100 is turned on and the CMP instruction is executed once The CMP instruction compares th...

Page 326: ... MCS master control set instruction is on The TRACE instruction saves the values for the previous number of scans for the specified device in the specified data format as a CSV file on the SD memory card When the input is turned on the date and time and the values of the previous scans for the specified device are output to the CSV file in the folder designated by S1 When the execution of the inst...

Page 327: ...on see Basic Instructions SOTU and SOTD Single Output Up and Down on page 5 27 The data writing process to the SD memory card for the TRACE instruction takes several scans Once a TRACE instruction is executed the process continues until writing the trace data is complete regardless of any change in the instruction input While the trace data is being written to the SD memory card the instruction is...

Page 328: ...ice for when the device values are output to the CSV file Status code Status Description 0 Normal 1 SD memory card insertion error The SD memory card is not inserted 2 SD memory card capacity error The SD memory card is full 3 SD memory card writing error Writing trace data to the SD memory card fails 4 CSV file capacity error The CSV file exceeds 5 MB 5 SD memory card protection error The SD memo...

Page 329: ...File Output Format and File Format Configuration The CSV file output format is as follows You can change the separating character for each data and the decimal symbol for floating point numbers that are output to the CSV files on the Function Area Settings dialog box Output format When the TRACE instruction is executed and the CSV file for the same date does not exist in the folder designated by S...

Page 330: ...ccumulated data of D0 through D5 data type W word and D10 data type F floating point are saved as decimal values in a CSV file on the RESULT folder on the SD memory card Output sample The sample user program described below operates as follows M100 is turned on when the writing trace data to the SD memory card completes The TRACE instruction status code is stored to D100 The execution status saved...

Page 331: ...D2 Execution Status 2 Configure the Settings tab Enter RESULT in S1 Folder Name 3 Configure D0 to output the decimal value of D0 to the CSV files with the data type W word 4 Set the repeat to 6 to output the values of D0 through D5 to the CSV files 5 Configure D10 to output the value of D10 to the CSV files with the data type F float 6 The configuration is now completed D1 M100 S1 RESULT TRACE D2 ...

Page 332: ...d turns Q0 on or off Q0 is turned on when an error occurs in the TRACE instruction Output results Triggered at 2012 02 06 10 20 30 Scan D0000 D0001 D0002 D0003 D0004 D0005 D0010 Old 12345 2 12345 56789 1 56789 3 402823E 38 12345 2 12347 56789 1 56788 3 402823E 38 12345 2 12349 56789 1 56787 3 402823E 38 12345 2 12351 56789 1 56786 3 402823E 38 12345 2 12353 56789 1 56785 3 402823E 38 12345 2 12355...

Page 333: ...OD LODN Using data register OUT OUTN Using data register SET RST Using data register AND ANDN OR ORN Using data register AND LOD OR LOD BPS BRD BPP SOTU SOTD TML TIM TMH TMS TMLO TIMO TMHO TMSO CNT CDP CUD CNTD CDPD CUDD SFR SFRN N bits CC CC DC DC MCS MCR JMP JEND END NOP MOV MOVN W I M M D D MOV MOVN D L M M D D MOV F IMOV IMOVN W M D M D D D D D IMOV IMOVN D D D D D IMOV F IBMV IBMVN M D M D D ...

Page 334: ...M D D D D SUB F D D D MUL W I M M D D D D MUL D L M M D D D D MUL F D D D DIV W I M M D D D D DIV D L M M D D D D DIV F D D D INC W I INC D L DEC W I DEC D L ROOT W ROOT D ROOT F SUM W I D D D SUM D L D D D SUM F D D D ANDW ORW XORW W M M D D D D ANDW ORW XORW D D D D SFTL SFTR N_B 100 BCDLS D D S1 1 WSFT D D ROTL ROTR D bits 1 HTOB D D BTOH D D Instruction Device and Condition Execution Time μs S...

Page 335: ...DTDV W D D DTCB W D D SWAP W SWAP D WEEK YEAR MSG LABEL LJMP LCAL LRET DJNZ IOREF HSCRF DI EL XYFS CVXTY CVYTX AVRG W I S3 10 AVRG D L S3 10 AVRG F S3 10 PULS PWM RAMP ZRN ARAMP DTML DTIM DTMH DTMS TTIM RAD F F DEG F F SIN COS F F TAN F F ASIN ACOS F F ATAN F F LOGE LOG10 F F Instruction Device and Condition Execution Time μs SmartAXIS Pro Lite SmartAXIS Touch ...

Page 336: ...nstructions are processed sequentially starting with the first line of the ladder program except for interrupt program execution The one scan time of a ladder program is approximately equal to the total of execution time of each instruction shown on preceding pages Watchdog Timer The watchdog timer monitors the time required for one program cycle scan time to prevent hardware malfunction When the ...

Page 337: ...m Condition Execution Time Housekeeping built in I O service FT1A x24x xx x µs TMLO 8 TIMO 8 TMHO 8 TMSO 8 CNT 8 CDP 8 CUD 8 CNTD 8 CDPD 8 CUDD 8 SFR 8 SFRN 8 CC 8 CC 8 DC 8 DC 8 MCS 4 MCR 4 JMP 4 JEND 4 END 4 Basic Instruction Qty of Bytes When not using data registers Using data registers Basic Instruction Qty of Bytes When not using data registers Using data registers LOD 4 8 LODN 4 8 OUT 4 8 O...

Page 338: ... to 16 TXD 16 to 820 RXD 16 to 820 ETXD 16 to 820 ERXD 16 to 820 DLOG 24 to 276 TRACE 24 to 276 SCRIPT Advanced Instruction Qty of Bytes Advanced Instruction Qty of Bytes NOP 4 MOV MOVN 12 to 16 IMOV IMOVN 16 IBMV IBMVN 16 to 24 BMOV 12 to 16 NSET 12 to 1540 NRS 12 to 20 XCHG 12 to 16 TCCST 12 to 16 CMP 16 to 24 ICMP 16 to 28 LC 12 to 20 ADD SUB MUL DIV 16 to 24 INC DEC 8 ROOT 12 to 20 SUM 16 to 2...

Page 339: ...VDT 11 19 CVXTY 17 2 CVYTX 17 3 data types 4 10 DEC 8 13 DECO 11 16 DEG 21 2 DI 16 1 DIV 8 1 DJNZ 14 5 DLOG 26 1 DTCB 11 22 DTDV 11 21 DTIM 20 1 DTMH 20 1 DTML 20 1 DTMS 20 1 EI 16 1 ENCO 11 15 ERXD 25 21 ETXD 25 21 EXP 22 3 FIEX 23 3 FIFOF 23 1 FOEX 23 3 HOUR 24 11 HSCRF 15 3 HTOA 11 5 HTOB 11 1 HTOS 24 9 IBMV 6 10 IBMVN 6 12 ICMP 7 6 IMOV 6 6 IMOVN 6 8 INC 8 13 input condition 4 9 IOREF 15 1 LAB...

Page 340: ...ag M8016 3 5 calendar clock data read error flag M8014 3 5 write flag M8020 3 5 write adjust error flag M8013 3 5 carry 4 13 Cy and borrow Bw M8003 3 5 and borrow 8 16 or borrow signals 8 2 catch input ON OFF status M8154 M8157 3 6 CC and CC instructions 5 19 change counter preset and current values 5 12 timer preset and current values 5 9 changing preset values for timers and counters 5 18 clear ...

Page 341: ...degree 21 2 delimiter 25 10 destination device 4 9 device addresses 3 1 areas discontinuity 4 14 DI 16 1 disable interrupt 16 1 discontinuity of device areas 4 14 DIV 8 1 division 8 1 DJNZ 14 5 double word adding counter CNTD 5 15 counter 5 15 data move in data registers 6 2 dual pulse reversible counter CDPD 5 16 up down selection reversible counter CUDD 5 17 download program 1 7 DSR input contro...

Page 342: ...M8143 3 6 interval compare greater than or equal to 7 6 IOREF 15 1 IP address D8304 D8307 D8330 D8333 3 13 J JMP and JEND instructions 5 30 jump instructions 5 30 L LABEL 14 1 label 14 1 call 14 3 jump 14 1 return 14 3 LC 7 8 LC 7 8 LC 7 8 LC 7 8 LC 7 8 LC 7 8 LCAL 14 3 linear conversion 17 5 list advanced instruction 4 3 basic instruction 4 1 5 1 LJMP 14 1 load compare equal to 7 8 greater than 7...

Page 343: ...tion 8 10 indirect bit move instruction 6 11 move instructions 6 3 MUL instruction 8 8 reset input 5 23 restore timer counter preset values 5 18 restriction on ladder programming 5 32 reverse shift register 5 25 reversible control 19 18 19 38 ROOT 8 14 rotate left 10 8 right 10 10 ROTL 10 8 ROTR 10 10 RS232C control signal status 3 13 DSR input control signal option 3 14 DTR output control signal ...

Page 344: ...ue store 6 16 TML TIM TMH and TMS instructions 5 8 TMLO TIMO TMHO and TMSO instructions 5 11 transmit 25 1 bytes 25 4 completion output 25 6 data 25 2 byte count 25 7 digits 25 4 status 25 6 code 25 6 trigonometric function instructions 21 1 TSUB 24 5 TTIM 20 3 TXD 25 1 U up counter CNT 5 12 up down selection reversible counter CUD 5 14 USB 1 7 user communication constant 25 15 instructions 12 1 2...

Reviews: