The text of a manual · part 18 of 37
Sharp Programmable Controller New Satellite JW10 User's Manual: Chapter 9 Description of Instructions, pages 136 to 145
Pages 136 to 145 of 307, from Sharp Programmable Controller New Satellite JW10 User's Manual
The original document is the PDF (5.0 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
Filed in the catalog under the Sharp jW-10CM
Page 136
When the MCS condition (enclosed with dotted line) is OFF, the instructions existing between MCS and MCR will be handled in the following manner. 00000
00002
F-30 MCS
00001
00400
00003
MCS condition
00003 00400 is OFF because it is OFF.
MCS condition
00004 TMR 000
MCS condition
00005 CNT 001
00006
00007
00004
0020
00005 00006
0100
MCS condition Shift direction
TMR is reset because it is OFF. TMR contact turns OFF and the current value to the setting value. ON reset Retained
OFF
Current value
Retained
Setting value
ON reset
OFF reset
09010
Retained
Cleared
Flag
Cleared
Cleared
ON reset
OFF reset
09100
Retained
Cleared
Flag
Cleared
Cleared
00007 00010
00010
00011
00012
Data input Shift input
00011
F-60 SFR 09010
Because it is OFF.
00012
Reset input MCS condition
00013
F-62 09100 U/DC
9
00013 00014
00014
OFF reset
Because CNT contact it is OFF.
00015
Because it is OFF.
00015
MCS condition 00016
00017
00016
F-00 09110 09120 XFER
F-32 04000 SET
No operation is executed because it is OFF. Flag
MCS condition
00017 00020
Flag unaffecting instruction
No change
Flag affecting instruction
Cleared
No operation is executed because it is OFF.
00020
F-33 04000 RST
F-31 MCR
Note 4: With a CNT, F-60, or F-62 instruction, it is possible to ON reset or OFF reset the reset condition using the system memory #202. In case of the OFF reset, reset is done by MCS.
9-61
Page 137
F-32 SET Symbol
Set coil F-32 SET
〔Example for use〕
R
04000
Function
Activate a coil specified by relay number R when the set input is turned ON.
Operation
Activate the R specified by F-32.
After operation
9
Symbol
Set input is at ON (not limited to OFF to ON change) Set input ON 04000 OFF
Contents ON of R
Flag
00400
Unchanged
ON OFF
Note 3: It is recommended that the F-32 (SET) instruction be used in conjunction with the F-33 instruction described on the next item. Note 4: The F-32 (SET) and F-33 (RST) instructions placed between the F-30 (MCS) and F-31 (MCR) instructions are not operative if the operational condition of the F-30 (MCS) is OFF.
Reset coil F-33 RST
〔Example for use〕
R
04002
Function
Deactivate a coil specified by relay number R when the reset input is turned ON.
Operation
Deactivate the R specified by F-33.
Range of R
00400 to 15777
Condition
Reset input is at ON (not limited to OFF to ON change)
After operation
00400
When the set input of 04000 is ON, this instruction sets ON 00400. Once sets ON, 00400 remains ON after the set input is set to OFF. When the set input of 04000 is OFF, this instruction does not affect the state of 00400.
Note 1: If the relay specified by the F-32 (SET) instruction is within the latched relay area, it maintains the last state when the power is recovered from power failure. If the specified relay is outside the latched relay area, it is reset upon power recovery. Note 2: The relay assigned by F-32 (SET) instruction is set to latch output when the JW10 stops operation (system memory #206 = 55(H)), it maintains status before stop operation. If the assigned relay is set to reset output when the JW10 stops operation system memory #206 = 00(H)), it resets at stoppage.
F-33 RST
00400
Set input
Range of OUT 00400 to 15777
Condition
F-32 SET
Instruction 04000
STR F-32
00410
00410
When the reset input of 04002 is ON, this instruction sets OFF 00410. Once sets OFF, 00410 remains OFF after the reset input is set to OFF. When the reset input of 04002 is OFF, this instruction does not affect the state of 00410. Reset input ON 04002 OFF ON 00410 OFF
Contents OFF of R
Flag
Reset input
F-33 RST
Instruction 04002 STR F-33
Unchanged
Note 1: If the relay specified by the F-33 (RST) instruction is within the latched relay area, the last state is retained when the power is recovered from power failure. If the specified relay is outside the latched relay area, it is reset upon power recovery.
Note 2: The relay assigned by F-33 (RST) instruction is set to latch output when the JW10 stops operation (system memory #206 = 55(H)), it maintains status before stop operation. If the assigned relay is set to reset output when the JW10 stops operation system memory #206 = 00(H)).
9-62
Page 138
• The F-32 (SET) and F-33 (RST) instructions allow to output relay to be controlled under more than 1 condition.
04130
F-32 SET
Set input 04131
F-32 SET
Set input 04132
F-32 SET
Set input
• If the set and reset inputs are turned ON or OFF more than 1 time in 1 scan cycle, the data memory used as the relay R is set and reset repeatedly in 1 scan cycle. The result of the relay R (ON or OFF) appearing immediately before I/O processing should be sent to the output terminal, however.
00400
I/O Processing
I/O Processing
I/O Processing
User program execution
00400 Set input
ON OFF
Reset input
ON OFF
00400
ON OUT (Data memory) OFF ① ② ③
04133 Reset input 04134 Reset input
F-33 RST
00400
F-33 RST
00400
OUT (Output)
ON OFF OFF Not monitorable at ①, ②, ③.
During execution of user program, even the data memory turns ON/OFF more than one time, only the result just before I/O processing can be monitored.
9 • It is recommended that the F-32 (SET) and F-33 (RST) instruction be used in pair. It will simplify the self holding circult.
Reset priority self holding circuit
Set priority self holding circuit 04005
04005 04100
00400
00400 Set 00400 04100
Set Reset 00400
Reset
04100 04005 Set input
F-32 SET
00400
Reset input 04005
04100 Reset input
F-33 RST
00400
Set input
F-33 RST
00400
F-32 SET
00400
Set input 04005
ON OFF
Set input 04005
ON OFF
Reset input 04100
ON OFF
Reset input 04100
ON OFF
OUT 00400
ON OFF
OUT 00400
ON OFF
9-63
Page 139
F-34 TSET Symbol
Comparison with current value of clock This instruction is able to program by JW-1424K/1442K/ (specified relay set) 1624K/1642K and is not able to program by JW-1324K/1342K. F-34 TSET n1 n2
〔Example for use〕
BIT
Function
Compares the constants n1 (hours) and n2 (minutes) with the current value of the clock and sets (turns ON) the specified BIT (relay) if they match.
Operation
Compares the current value of the clock with n1 and n2, and turns ON the relay if the comparison result shows a match.
04002
F-34 TSET
15
30
00400
Instruction 04002 STR F-34 15 30 00400
When input condition 04002 is ON and at 15 hour 30 minutes, relay 00400 turns ON. The relay 00400 which was turned ON remains ON even if input condition 04002 turns OFF. If the current value of the clock is except at 15 hour 30 minutes, the state of relay 00400 does not change.
Range of n1 00 to 23 (decimal) Range of n2 00 to 59 (decimal) Range of BIT 00400 to 15777 Condition
9
After operation
When the input signal is ON (not limited to OFF to ON change) Contents Unchanged of n1 Contents Unchanged of n2 When the assigned time does not match with the clock's current Contents value, the bit condition does not change. of BIT When the assigned time matches with the clock's current value, this bit turns ON. Flag
Unchanged
Note 1: If the relay specified by the F-34 (TSET) instruction is within the latch specified area, it retains its state that existed before the power failure even after power is restored. If the specified relay is outside the latch specified area, it is reset when power is restored.
Note 2: A relay assigned by F-34 (TSET) instruction is set to latch output when the JW10 stops operation (system memory #206 = 55(H)), it maintains status before stop operation. If the assigned relay is set to reset output when the JW10 stops operation system memory #206 = 00(H)), it resets at stoppage. Note 3: Use the F-34 (TSET) instruction as a pair with the F-35 (TRST) instruction on the next page. Note 4: Any F-34 (TSET) and F-35 (TRST) instructions between the F-30 (MCS) and F-31 (MCR) instructions do not function when the operational condition for the F-30 (MCS) instruction is OFF.
9-64
Page 140
F-35 TRST Symbol
Comparison with current value of clock instruction is able to program by JW-1424K/1442K/ (specified relay reset) This 1624K/1642K and is not able to program by JW-1324K/1342K. F-35 TRST n1 n2
〔Example for use〕
BIT
Function
Compares the constants n1 (hours) and n2 (minutes) with the current value of the clock and resets (turns OFF) the specified BIT (relay) if they match.
Operation
Compares the current value of the clock with n1 and n2, and turns OFF the relay if the comparison result shows a match.
Range of n1 00 to 23 (decimal) Range of n2 00 to 59 (decimal)
04003
F-35 TRST
09
15
00410
Instruction 04003 STR F-35 09 15 00410
When input condition 04003 is ON and at 9 hours 15 minutes, relay 00410 turns OFF. The relay which was turned OFF remains OFF even if input condition 04003 turns OFF. If the current value of the clock is except at 9 hour 15 minutes, the state of relay 00410 does not change.
Range of BIT 00400 to 15777 Condition
After operation
When the input signal is ON (not limited to OFF to ON change) Contents Unchanged of n1 Contents Unchanged of n2 When the assigned time does not match with the clock's current Contents value, the bit condition does not change. of BIT When the assigned time matches with the clock's current value, this bit turns OFF. Flag
9
Unchanged
Note 1: If the relay specified by the F-35 (TRST) instruction is within the latch specified area, it retains its state that existed before the power failure even after power is restored. If the specified relay is outside the latch specified area, it is reset when power is restored.
9-65
Note 2: A relay assigned by F-35 (TRST) instruction is set to latch output when the JW10 stops operation (system memory #206 = 55(H)), it maintains status before stop operation. If the assigned relay is set to reset output when the JW10 stops operation system memory #206 = 00(H)), it resets at stoppage.
Page 141
F-40 END
End instruction (END)
The F-40 instruction indicates the end of the program. There is no need of writing the END instruction, except for the following cases, because it will be automatically set in the last address of the program memory when the memory is cleared. (1) Saving scan time • The scan time is the I/O processing time
9
00000
STR
00100
00000
STR
00100 added with the user program execution time. 00001 OR 00011 00011 00001 OR The user program execution time is the total 00002 AND 00021 00002 AND 00021 00003 OUT 00400 time required to execute all instructions from 00003 OUT 00400 00004 STR 00111 00004 STR 00111 the program address 00000 to the END instruction. 01776 AND 00131 01776 AND 00131 • The location of the END instruction 01777 OUT 00470 01777 OUT 00470 NOP 02000 02000 F-40 automatically written after program is 02001 NOP 02001 NOP memory clear, for instance, 02777 (1535th 02002 NOP 02002 NOP word) in the case of basic module is 02776 NOP JW-1324K/1342K and 07777(4096th word) 02776 NOP 02777 F-40 02777 F-40 in case of it is JW1424K/1442K/1624K/1642K. (a) END (02777) only by memory clear (b) F-40 (END)is written in 02000 • Assume now if the last address is 01777 (1024th word) when the ladder chart has written by the support tool such as JW-13PG, 02000 to 12776 are padded with NOP instruction with the END instruction in 02777, so that it requires an unwanted time in order to execute NOP instructions (JW-1324K/1342K is 1.63 µs, JW-1424K/1442K/1624K/1642K is 0.81 µs per word). • If F-40 was written in 02000, it saves the processing time without executing those unwanted NOP instructions, and the control can proceed to a next scan cycle after termination of the user program. (2) To perform a partial program execution during trial run By inserting the F-40 instruction at the end of a sequence block, you will be able to execute only the required portion of the program. If the result was successful, the F-40 may then be deleted.
Note 1: A multiple number of F-40 may exist when the END instruction is written in (1) and (2). In this case, the userprogram terminates at the first F-40. So, it would be necessary to check the location of the END instruction before going into the actual operation. Note 2: The F-40 (END) instruction is unconditional, and it prohibits the following kind of programming.
00010
F-40 END F-40 END
Note 3: Although the F-40 instruction has the highest priority, it will be ignored if an END instruction exists between F-141 (JMP) and F-140 (LABL) or between F-142 (CALL) and F-140 (LABL) and that F-141 or F-142 was executed. 9-66
Page 142
F-41 JCS F-42 JCR
Set jump control (Jump Control Set) Reset jump Control (Jump Control Reset)
When the F-41 (JCS) condition is OFF, all instructions will not be executed, except the F-40 (END) instruction that exists before the F-42 (JCR) instruction. Therefore, it does affect the contents of the data memory, even if there was an instruction that writes the result in the data memory, such as OUT, TMR, CNT, and application instruction. And, it retains the state when JCS condition is ON.
00010
Instruction 00010 STR F-41 STR 00011 00401 OUT 00012 STR 000 TMR 0030 T000 STR 00402 OUT 00013 STR 00014 STR 001 CNT 0010 C001 STR 00403 OUT 00015 STR F-63 09000 F-42
F-41 JCS 00401
00011
00012
TMR 000
0030 00402
T000
00013 CNT 001
00014
0010
00403
C001 00015
F-63 INC
09000
F-42 JCR
00010 (F-41 condition) 00011 00401 (Output) 00012 (Start input)
1.0 second
00402 (Output)
2.0 second
00013 (Counter input) 00014 (Reset input) CNT 001 (Current value)
OFF
0001 0001
0001 0001
0001 0001
0001 0000
00403 (Output) 00015 09000
021 022
022 023
9-67
9
Page 143
Note 1: Attention must be paid to the TMR internal clock (0.1 second clock), CNT counter input and application instruction input condition (which the operation takes place at an OFF to ON transition in the input condition), and F-41 (JCS) condition ON/OFF timing.
JCS condition Input condition
A A
Note 6: F-41 (JCS) and F-42 can be nested between F-30 (MCS) and F-31 (MCR). However, between JCS instruction and JCR instruction are not executed regardless whether the JCS condition be ON or OFF when the MCS condition is OFF.
B B
①
②
ON
ON (Not executed)
C C
③
④
00020
OFF
00021
- Operation takes place at a rising of ① because
9
F-30 MCS
ON (Executed)
the JCS condition is ON. - Operation does not take place at a rising of ② because the JCS condition is OFF. - Operation does not take place at a rising of ③ because the JCS condition is OFF. - The JCS condition turns to ON while ③ is ON, but operation does not take place as it does not recognize that the input condition has changed from OFF to ON, because the input condition is ON with which theJCS condition of A changes from ON to OFF and the input condition is ON with which the JCS condition of B changes from OFF to ON. - Operation does not take place at a rising of ④ because the JCS condition is OFF. - The JCS condition becomes ON while ④ is ON. Operation takes place immediately after the JCS condition of C changes from OFF to ON because there was no change in that the input condition is OFF with which the JCS condition of B changes from ON to OFF and the input condition is ON with which the JCS condition of C changes from OFF to ON.
00022
00410
F-41 JCS
00023
00411
00024
TMR 0025 010 F-42 JCR F-31 MCR
00026
00412
Instruction 00020 STR F-30 00021 STR 00410 OUT 00022 STR F-41 STR OUT STR TMR F-42 F-31 STR OUT
MCS condition (00020) Input (00021) Output (00410) JCS condition (00022)
Note 2: The END instruction will be executed regardless whether the JCS condition be ON or OFF when there was an F-40(END) instruction between F-41(JCS) and F-42(JCR). And the user program execution is terminated and the control proceeds to the next scan cycle. Note 3: It is not possible to insert another F-41 and F-42 between F-41 (JCS) and F-42 (JCR). It will evoke "JCS ERROR" on the hand-held programmer during program check, if such a program was written.
Input (00023) Output (00411) Start input (00024) 2.5 seconds
TMR not reset
Note 4: F-42(JCR) is an unconditional instruction. 00010 F-42 JCR It prohibits the program like shown above. Note 5: To use an application instruction that operates at a rising edge of F-41 (JCS) and F-42 (JCR), the input condition must be different from F-41 (JCS). No operation will take place if the condition is same.
9-68
TMR reset
00023 00411 00024 010 0025
00026 00412
Page 144
F-43 CPL
Complement bit (ComPLement)
The F-43 instruction complements the bit in the accumulator.
00100
04001
F-43 instruction STR 00100 AND 04001 F-43 OUT 00407
00407
00100
04001
00407
Results from the STR instruction to the F-43 instruction are complemented and sent to the output relay 00407. Use of F-43 permits to obtain the complemented output without the use of auxiliary contact. 00000 00001 00003 04100
00000 00001 00003 F-43 00400
00002
00002
04100
00400
Note 1: The F-43 instruction may be used for a single or a multiple number of contacts. Note 2: Pay attention that the following programs (a) and (b) will not produce the same result because the F-43 instruction is the instruction that complement the contents of the accumulator.
00000 00001
F-43
00002
00400
00000 00001
F-43
00000 00002
(a)
(b)
9-69
00400
9
Page 145
Differentiate at ON
F-44 ↑
The F-44 instruction sends 1 scan time pulse when the immediate state of the accumulator changes from OFF to ON.
00000 00001 F-44
Instruction 00000 STR 00001 AND F-44 04000 OUT
04000
00000
00001 Output 04000 1scan time
1scan time
Note 1:Note that a different result is produced when the sequence of the F-44 program is changed in the above ladder chart. (Identical in case of F-45.)
Note 3: 00010 00011
F-44
00400
00012 00000
F-44
00001
04000
9
Accumulator ACC 00000
STR 00010
Output from F-44
STR 00011 1 scan time
STR STR F-44 OR AND OUT
00010 00011 00012 STR 00400
Stack register S1
00010
00011
00010
1 scan time
F-44 00001
OR
Output 04000 1 scan time
00011
F-44
00011
F-44
00012
00010
00010
00012 00010 00011 F-44
AND STR
00012 00010 00011 F-44
Note 2: The F-44 instruction scans only once even if inserted between an F-47 instruction (level operation condition set) and an F-48 instruction (level operation condition reset). (See F-47 and F48.)
OUT 00400
00012
The accumulator turns ON for only a scan cycle that 00011 changed from OFF to ON. 00010
00011
00012 △t 00100 △t 1 scan time
Differential signal is not issued.
In the above example, a differential signal is not issued even if 00010 has changed from OFF to ON when 00011 is ON, because 00010 is ANDed by the AND/STR instruction.
9・ 70