SmartStudio User Manual
SmartStudio User Manual
Preface
Thank you very much for selecting Autonics products.
This user manual contains information about the product and its proper use, and should be kept
in a place where it will be easy to access.
Symbol Description
※1 Annotation mark.
Table of Contents
Preface .............................................................................................................................iii
SmartStudio Programming Manual Guide ...................................................................... iv
SmartStudio Programming Manual Symbols ................................................................... v
Table of Contents ............................................................................................................ vi
1 Overview .................................................................................................... 1
1.1 Feature of SmartStudio...................................................................................... 1
1.2 Program Structure and Operation ..................................................................... 2
1.2.1 Program Structure ...................................................................................... 2
1.2.2 Program Operation ..................................................................................... 2
2 Device......................................................................................................... 3
2.1 Device list........................................................................................................... 3
2.2 X device ............................................................................................................. 4
2.3 Y device ............................................................................................................. 4
2.4 M device............................................................................................................. 4
2.5 S device ............................................................................................................. 5
2.6 D device ............................................................................................................. 5
2.7 T device ............................................................................................................. 6
2.8 C device ............................................................................................................. 7
2.9 Z device ............................................................................................................. 8
2.10 F device ............................................................................................................. 8
2.11 V device ............................................................................................................. 8
2.12 L device .............................................................................................................. 8
2.13 R device ............................................................................................................. 8
3 Create Program ......................................................................................... 9
3.1 Operation Processing procedures ..................................................................... 9
3.1.1 Basic processing procedures ..................................................................... 9
3.1.2 Processing procedures when branching ................................................. 10
3.2 Display the numerical values .......................................................................... 12
3.3 Input and output processing ........................................................................... 13
3.4 Response delay ..............................................................................................14
3.5 Dual coil ..........................................................................................................14
3.5.1 Definition and diagnosis of dual coil ........................................................ 14
3.6 Pointer use ......................................................................................................16
3.7 Operation error ...............................................................................................16
3.8 Usages of user defined functions ................................................................... 17
3.9 Notice ..............................................................................................................20
4 Special device ....................................................................................... 21
4.1 Special device list ...........................................................................................21
5 Appendix.................................................................................................41
5.1 Error code and how to manage it ...................................................................41
5.2 Instruction execution time list .........................................................................43
5.2.1 Basic instruction ...................................................................................... 43
5.2.2 Timer/Counter instruction ........................................................................ 43
5.2.3 Input comparison instruction ................................................................... 44
5.2.4 Comparison instruction ........................................................................... 45
5.2.5 Transmission instruction.......................................................................... 45
5.2.6 Rotation instruction.................................................................................. 46
5.2.7 Movement instruction .............................................................................. 46
5.2.8 Arithmetic operation instruction ............................................................... 47
5.2.9 Exchange instruction ............................................................................... 48
5.2.10 Motion instruction .................................................................................... 48
5.3 Instruction .......................................................................................................49
5.3.1 Basic instruction list ................................................................................. 49
5.3.2 Application instruction list ........................................................................ 51
5.3.3 Structures of instruction name................................................................. 62
1 Overview
2 Device
2.2 X device
X input device is a device that transfers the signal inputted from an external switch or a button to
CPU.
It is able to use A(Normally Open) or B(Normally Closed)Contacts in the program, and also
available to with pulse inputs for the contact.
X input device, which is not connected with input terminal, is able to be used as the same
function as an inner auxiliary device(M Device).
Because input contact is only retained by external input, be sure that if you want to use it as an
external output.
2.3 Y device
Y output device is a device that transfers the inner processing result to externally connected
output devices. .
Y device, which is not connected with output terminal, is able to be used as the same function as
an inner auxiliary device(M Device).
In case the output device is allocated to an actual external contact and the same output contact
is used more than twice to the operand of out instruction in a program, the last used output is
output to outside. For further details, refer to ‘3.5 Dual coil’.
2.4 M device
It is an inner auxiliary device of LP.
It is only able to perform in the program, not able to directly output to outside of LP. It is available
to be used as a memory protection device by setting ‘Device Latch Range Settings’ in
[Parameter]-[COMMON].
2.5 S device
It is a step device.
It is a device to control step and used with OUT, SET and RESET instructions. When it is used
with SET or RESET instruction, the previous step must be performed first to execute the current
step. When it is used with OUT instruction, it executes the last step turned “On” regardless of the
order of step.
It is unavailable to be used as a word device, only can be used as a bit device. It is available to
be used as a memory protection device by setting ‘Device Latch Range Settings’ in [Parameter]-
[COMMON]. The clear condition, SET XXX.00, is able to execute anytime regardless of the
processing steps.
2.6 D device
It is a data device of LP.
It is only able to be used as a word bit, not able to be used as a bit device. When it is used as
the 32 bit instruction, D word is operated as lower 16 bit and D+1 word is operated as upper 16
bit as following picture.
It is available to be used as a memory protection device by setting ‘Device Latch Range Settings’
in [Parameter]-[COMMON].
2.7 T device
It is a device used with instructions related to Timer.
It consists of three parts; timer contact, timer setting value, timer present value.
Timer contact performs ON/OFF functions according to the result of timer instruction and also
available to be used as timer and input instructions.
Timer setting value is a place where a boundary value for the result of timer is saved, and is
available to be used with timer and application instructions.
Timer present value is a place where a present value is stored while timer is operating, and user
can not set it up directly.
When as following picture, if inputting 100 to “T0” setting value device, “T0” timer contact device
turns ON when “T0” present value device becomes 100.
Timer instructions, related to LP Series are TON, TOFF, TMON, TRTG and TMR, and even the
same timer device is operated differently depending on each instruction.
The basic cycle of timer device is 10ms, but it is available to be operated in 10ms or 100ms by
setting up the device range in parameters.
It is available to be used as a memory protection device by setting ‘Device Latch Range Settings’
in [Parameter]-[COMMON].
For furter details of timer device, refer to ‘5.3.2.2 Timer instruction’.
2.8 C device
It is a device used with the instructions related to Counter.
It consists of three parts; counter contact, counter setting value, and counter present value.
Counter contact performs ON/OFF functions according to the result of counter instructions, and
also available to be used as counter and input instructions.
Counter setting value is a place where a boundary value for the result of count is stored, and is
available to be used with counter and application instructions.
Counter present value is a place where a present value is stored while counter is operating, and
user can not set it up directly.
When as following picture, if inputting 100 to “C0” setting value device, “C0” contact device turns
ON when “C0” present value device becomes 100.
Counter instructions, related to LP Series are CTD, CTU, CTUD and CTR, and even the same
counter device is operated differently depending on each instruction.
2.9 Z device
It is a device that is able to designate indirectly a device with using other word device.
When as following picture, if “D0” device value is 10, the value 10 stored in “D0” is transferred to
D(0+Z0) device, namely D100 device.
2.10 F device
It is a device that sets up the status and operation of LP.
It designates a device that is able to be used separately in input and output instructions, and not
able to be used as a memory protection area.
For further details of F device, refer to ‘4.2 Bit special device’ and ‘4.3 Word special device’.
2.11 V device
It is the used area for matched automatically device area by system when using user defined
function. User can not use this device area.
2.12 L device
It is a link device. It is a device sharing link data each other when communicating with other
module.
It is available to be used as a memory protection device by setting ‘Device Latch Range Settings’
in [Parameter]-[COMMON].
2.13 R device
It is a device used when using the recipe function of graphic panel in LP series.
It is available to be used as a memory protection device by setting ‘Device Latch Range Settings’
in [Parameter]-[COMMON].
3 Create Program
LP program performs input refresh before starting its operation, and begins operation work from
the step 0 one by one. Then it executes output refresh after performing the END instruction.
Through all these procedures, finally one scan is completed.
Refresh input: Before executing the program operation, it reads the data from the input
contact or module and saves it in designated device area(X Device).
Refresh output: After completing the program operation, it outputs the data from designated
area(Y Device) to the output contact or output module.
Refresh input and output: Refresh input and output is executed by force at the time to
perform the instruction.
If the END instruction executes while the program is being processed, it exits the operation
without performing the below program.
(3) Interrupt, Subroutine, User defined functions
As above example for interrupt program, programs containing interrupt, subroutine and user
defined functions, firstly jump to the subroutine and perform it completely, and then go to the
main program again, finally keep continuing to execute the program from the next step of
the stopped step.
No. Description
① Input is OFF.
② It is not time to refresh input, input is OFF.
It is ON at the time to refresh input, input is ON. But the length of input signal is shorter
③
than scan cycle, it may not recognize as ON depending on the time to refresh input.
Because the input retains ON during a cycle of scan, it turns ON regardless of refreshing
input time.
④
※The minimum input retaining time of LP series is 1ms. Even though the input is entered
at the time of refreshing input, the input is invalid if it is not able to maintain for 1ms.
The program is processed as above, therefore in case of input/output the response delay may
be occurred due to operation time. If you need to perform input/output processing while program
is being operated, it is available with using REF instructions(Refresh input/output).
Dual coil
2) When the same device of counter or timer is used as timer/counter instruction more
than twice in a program.
Not dual coil
Dual coil
It is not regard as dual coil when the same device is used in other instructions.
2nd Select [Tool]-[Register User Defined Function] of menu, press Shift + F10, or click
of ladder tool bar. ‘Register User Defined Function’ dialog box appears.
No. Description
① Input a user defined function name.
② Set the number of operands to use.
Set the number of each operand’s device as much as the designated
③
number of operands.
④ Describe for the user defined functions you want to register.
3rd If click “OK” button after completing above process, the user defined function is
registered. The registered user defined function is stored with the function name.lib
file in ₩LIB folder.
No. Description
① Displays the selected user defined function name.
② Displays user defined functions stored in the designated folders.
③ Displays used device in the selected user defined function.
④ Displays registered description for the selected user defined function.
2nd User defined functions are applied when click ‘Select’. If user defined function or
operand is not entered correctly, and when you click ‘Select’, ‘Function List’ dialog
box is not closed and user defined function is not applied to ladder program.
Click ‘Cancel’ and the user defined functions list is closed automatically regardless of
whatever you input.
3rd In the place where call the function, call with FCALL instruction, and in the place
where the function is called, is called with FUNC instruction.
3.9 Notice
(1) Input/output processing and response delay
4 Special device
Time
One synchronous pulse during the
synchrono OFF R UB64015 F00015
RTC time.
us pulse
Initial GP LP
Name Function R/W
value device device
When the time data is not
properly written, it turns
Time setting ON.
OFF R UB64036 F00036
error flag When the time data is
properly written by using
RTC, it turns OFF.
When the communication
error occurs, it turns ON.
Communication
When the communication is OFF R UB64038 F00038
errors
properly completed, it turns
OFF.
Internal device range
includes actual unavailable
range, this bit turns ON
when checking ‘Using
I/O setting value Internal Device’ of ‘I/O
Contact Setting’ dialog box OFF R UB64039 F00039
errors
in ‘EXTENSION’ tab from
SmartStudio’s Parameter.
When user does not turn
OFF, this bit maintains.
Initial GP LP
Name Function R/W
value device device
turns ON
When SLOT4 parameter does
not use inner device, it turns
OFF
When SLOT5 parameter uses
more than one inner device, it
Using inner device turns ON
OFF R UB64045 F00045
of SLOT 5 When SLOT5 parameter does
not use inner device, it turns
OFF
When SLOT6 parameter uses
more than one inner device, it
Using inner device turns ON
OFF R UB64046 F00046
of SLOT 6 When SLOT6 parameter does
not use inner device, it turns
OFF
When SLOT7 parameter uses
more than one inner device, it
Using inner device turns ON
OFF R UB64047 F00047
of SLOT 7 When SLOT7 parameter does
not use inner device, it turns
OFF
When SLOT8 parameter uses
more than one inner device, it
Using inner device turns ON
OFF R UB64048 F00048
of SLOT 8 When SLOT8 parameter does
not use inner device, it turns
OFF
When SLOT9 parameter uses
more than one inner device, it
Using inner device turns ON
OFF R UB64049 F00049
of SLOT 9 When SLOT9 parameter does
not use inner device, it turns
OFF
When SLOT10 parameter uses
more than one inner device, it
Using inner device turns ON UB6404
OFF R F0004A
of SLOT 10 When SLOT10 parameter does A
not use inner device, it turns
OFF
When SLOT11 parameter uses
more than one inner device, it
Using inner device turns ON UB6404
OFF R F0004B
of SLOT 11 When SLOT11 parameter does B
not use inner device, it turns
OFF
When SLOT12 parameter uses
more than one inner device, it
Using inner device turns ON UB6404
OFF R F0004C
of SLOT 12 C
When SLOT12 parameter does
not use inner device, it turns
Initial GP LP
Name Function R/W
value device device
OFF
When SLOT13 parameter uses
more than one inner device, it
Using inner device turns ON UB6404
OFF R F0004D
of SLOT 13 When SLOT13 parameter does D
not use inner device, it turns
OFF
When SLOT14 parameter uses
more than one inner device, it
Using inner device turns ON UB6404
OFF R F0004E
of SLOT 14 When SLOT14 parameter does E
not use inner device, it turns
OFF
When SLOT15 parameter uses
more than one inner device, it
Using inner device turns ON
OFF R UB6404F F0004F
of SLOT 15 When SLOT15 parameter does
not use inner device, it turns
OFF
4.2.7 Operation
Initial GP LP
Name Function R/W
value device device
When operation result is 0, it turns
ON
Zero flag OFF R UB64060 F00060
When operation result is not 0, it
turns OFF
When carry occurs as operation
result, it turns ON
Carry flag OFF R UB64061 F00061
When carry does not occur as
operation result, it turns OFF
When borrow occurs as operation
result, it turns ON
When borrow does not occur as
Borrow flag
operation result, it turns OFF OFF R UB64062 F00062
When changing program or mode,
it turns OFF
When operation error occurs
during scan operation, it turns ON
When changing the other mode
Operation except stop mode, it turns OFF
error flag(At When there is no operation error OFF R UB64068 F00068
present) after one scan operation, it turns
OFF
When downloading program or re-
setting power, it turns OFF
When operation error occurs
Operation during scan operation, it retains
error ON OFF R UB64069 F00069
flag(Retaining) When resetting power, it turns
OFF
Initial GP LP
Name Function R/W
value device device
inner device of device value is written to
SLOT15 module module register
function
GP LP
Name Function R/W
device device
0: Not dwelling
1: Finishing drive
Finish driving of CH2 R UB64126 F126
0: Not finishing drive
Detecting S/W lower 1: Detecting S/W lower limit
R UB64127 F127
limit of Motion CH2 0: Not detecting S/W lower limit
Detecting S/W upper 1: Detecting S/W upper limit
R UB64128 F128
limit of Motion CH2 0: Not detecting S/W upper limit
Detecting H/W lower 1: Detecting H/W upper limit
R UB64129 F129
limit of Motion CH2 0: Not detecting H/W upper limit
Detecting H/W upper 1: Detecting H/W lower limit
R UB6412A F12A
limit of Motion CH2 0: Not detecting H/W lower limit
4.3.3 Operation
GP LP
Name Function R/W
device device
Step operation Present step which has operation error (It
generated error clears when changing PLC mode or R UW6520 F0120
(At present) program)
Step operation
generated error First operation error step, (It clears when
R UW6521 F0121
changing PLC mode or program)
(Retaining)
4.3.4 Step
GP LP
Name Function R/W
device device
Error step Stopped step by error at present R UW6530 F0130
Braked step during debug mode operation
Break step (It clears when changing PLC mode or R UW6531 F0131
program)
4.3.5 Diagnosis
GP LP
Name Function R/W
device device
Self-diagnosis
Displays self-diagnosis error code R UW6540 F0140
error code
4.3.6 Time
GP LP
Name Function R/W
device device
Time setting
Save the setting value of year as BCD Data W UW6550 F0150
(Year)
Time setting
Save the setting value of month as BCD Data W UW6551 F0151
(Month)
Time setting
Save the setting value of date as BCD Data W UW6552 F0152
(Date)
Time setting
Save the setting value of hour as BCD Data W UW6553 F0153
(Hour)
Time setting
Save the setting value of minute as BCD Data W UW6554 F0154
(Min)
Time setting
Save the setting value of second as BCD Data W UW6555 F0155
(Sec)
Time setting Save the setting value of the day of week as
W UW6556 F0156
(Day) BCD Data
GP LP
Name Function R/W
device device
0: Sunday, 1: Monday, 2: Tuesday,
3: Wednesday, 4: Thursday, 5: Friday,
6: Saturday
5 Appendix
5 When action list type is Stop Check and edit action list and S/W
position drive during executing limit value which have problem. Clear
UW6420, Run
Symptom Troubleshooting
UW6421 state
pattern action and destination the error by MTMEC(removing error)
position is out of S/W limit instruction
range
Clear the error by MTMEC(removing
10 Excess high low limit error Stop error) instruction and escape limit with
jog operation and execute the next
When speed parameter value
is higher than maximum speed
(100,000PPS) Clear the error by MTMEC(removing
20 Designated pattern number of Stop error) instruction and check the set
MTIDM(Indirect designated parameter values
drive) instruction is out of 1 to
99
※1. Be sure that errors related with motion are remained even if restarting LP.
5.3 Instruction
NOP 1
LOAD 1 ANDF 2
LOADN 1 ANDL 1
LOADP 2 OR 1
LOADF 2 ORN 1
AND 1 ORP 2
ANDN 1 ORF 2
ANDP 2 ORL 1
OUT 1 SET 1
OUTP 2 RST 1
OUTF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
DSUBLU 9 DSUBBL 9
MUL 7 MULB 7
DMUL 7 DMULB 7
MULU 7 MULBL 9
DMULU 7 DMULBL 9
MULL 9 DIVB 7
DMULL 9 DDIVB 7
MULLU 9 DIVBL 9
DMULLU 9 DDIVBL 9
DIV 7 INCB 3
DDIV 7 DINCB 3
DIVU 7 DECB 3
DDIVU 7 DDECB 3
WAND 7 XOR 7
DAND 7 DXOR 7
AAND 9 AXOR 9
WANDL 9 XORL 9
DANDL 9 DXORL 9
WOR 7 XNR 7
DOR 7 DXNR 7
AOR 9 AXNR 9
WORL 9 XNRL 9
DORL 9 DXNRL 9
BIN2BCD 5 BCD2BIN 5
DBIN2BCD 5 DBCD2BIN 5
BIN2HASC 5 DDASC2BIN 5
DBIN2HASC 5 STR2ASC 7
HASC2BIN 5 DASC2BCD 5
DHASC2BIN 5 DDASC2BCD 5
BCD2DASC 5 BIN2DASC 5
DBCD2DASC 5 DBIN2DASC 5
DASC2BIN 5
GRY2BIN 5 BIN2GRY 5
DGRY2BIN 5 DBIN2GRY 5
NEG 3 DNEG 3
DECO 7 ENCO 7
EXT 3
REF 5
SEG 7
TCMP 7 TWR 3
TADD 7 HOUR 7
TSUB 7 TZCP 9
TRD 3
MTVDM 9
MTPDM 9
MTIDM 5
MTMEC 5
MTEMS 5
MTCPP 5
MTFOS 5
MTSRS 5
MTOBC 5
MTOVV 5
MTOVP 5
MTIPT 7
MTUAI 5
If there is a data processing method part: MULLU, ADDLU, SUBLU ….. etc.
Operand
S: Represents source device
D: Represents destination device
N: Represents the number of devices
MWL-SSV2P1-V1.0-1302US