The text of a manual · part 22 of 37
Sharp Programmable Controller New Satellite JW10 User's Manual: Chapter 9 Description of Instructions, pages 176 to 185
Pages 176 to 185 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 176
Fc210w ADD
Add register and constant in binary (16 bits + 16 bits) (ADD)
Symbol
Fc210w ADD
Function
S1 n
〔Example for use〕
D
Contents of the register S1 and S1+1 are added in binary with an octal constant "n" and its result are stored in the registers D and D+1.
Instruction STR Fc210w
04000 Fc210w
09000 123321 09020
ADD 09000 12332109020
Operation (S1, S1+1)+n→D, D+1
When the input condition 04000 changes from OFF to ON, the contents of the registers 09000 and 09001 are added in binary with the octal constant 123321 and its results are stored in the registers 09020 and 09021.
コ0000 to コ0006 b0000 to b0776 to 09776 Range of S1 09000 19000 to 19776 29000 to 29776 39000 to 39776
09001
コ0000 to コ0006 b0000 to b0776 to 09776 Range of D 09000 19000 to 19776 29000 to 29776 39000 to 39776
+ Octal constant 123321 1 0 1 0 0 1 1 0 1 1 0 1 0 0 0 1
1
Rising edge of input signal (OFF to ON)
Contents of S, S1, Contents of D Contents of D+1
After operation
Flag
09000
1 1 1 0 1 0 0 1 1 0 0 0 1 1 0 1
Range of "n" 000000 to 177777 (8)
Condition
04000
Unchanged
2 09021
Lower digits of result
3
3
2
1
09020
1 0 0 1 0 0 0 0 0 1 0 1 1 1 1 0
Upper digits of result Result (8)
Zefo Carry 07357 07356
Error Non-carry 07355 07354
0
1
0
0
1
000001 to 177777
0
0
0
1
200000
1
1
0
0
Above 200001
0
1
0
0
Note 1: Be sure to use even addresses for registers S1 and D. Similarity instrucitons: F210, F210w, Fc210
9・ 101
9
Page 177
F-211 SUB Symbol
F-211 SUB
S1
S2
〔Example for use〕
D
Instruction 01000
ST R F -2 1 1
19000 19001 19002
Contents of the register S1 are subtracted by the contents of the register S2 in binary and its result is stored in the register D.
01000
Function Operation
S1−S2→D
When the input condition 01000 changes from OFF to ON, the contents of the register 19000 are subtracted by the contents of the register 19001 and its result is stored in the register 19002.
Range of S1
Range of S2
Range of D
9
Subtract register from register in binary (8 bits − 8 bits) (SUBtract)
Condition
コ0000 to コ1577 b0000 to b0777 09000 to 09777 19000 to 19777 29000 to 29777 39000 to 39777 コ0000 to コ1577 b0000 to b0777 09000 to 09777 19000 to 19777 29000 to 29777 39000 to 39777 コ0000 to コ1577 b0000 to b0777 09000 to 09777 19000 to 19777 29000 to 29777 39000 to 39777
F-211 19000 19001 19002 SUB
Before operation 19000 1 0 1 1 0 1 0 1
−
−
10110101 1010111 1011110
19000 0 0 1 0 1 1 0 1
Rising edge of input signal (OFF to ON)
−
0 1 1 1 1 0 0 1 19002
19001 1 0 1 1 0 1 0 0
Contents Unchanged of S2 After Contents Result operation of D
−
Result
Zero 07357
Carry 07356
0 1 to 377 (8)
1 0 0
0 0 1
Negative value
0 1 0 1 1 1 1 0 19002
19001 0 1 0 1 0 1 1 1
Contents Unchanged of S1
Flag
After operation
Error Non-carry 07355 07354
0 0 0
1 1 0
Carry 1 (07356)
Similarity insturctions: F-211w, Fc211, Fc211w
9・ 102
101101 10110100 101111001
Page 178
Subtract register from register in binary (16 bits − 16 bits) (SUBtract)
F-211w SUB
F-211w SUB
Symbol
S1
S2
〔Example for use〕
D
Function
Contents of the registers S1 and S1+1 are subtracted by the contents of the registers S2 and S2+1 in binary and its results are stored in the registers D and D+1.
Operation
(S1, S1+1), (S2, S2+1) →D, D+1
Range of S1
Range of S2
Range of D
Condition
F-211 01000
F-211w 19000 19002 19004 SUB
19001
− 19003
19002
0111000010111001
19005
Contents of S2, S2+1
Unchanged
Contents
Lower digits of result
Result (8)
Zero 07357
19004
0011000010001001
Contents Upper digits of result of D+1 Carry 07356
Error Non-carry 07354 07355
1 0 0 1 0 0 0 1 Negative value 0 1 0 0 Note 1: Be sure to use even addresses for registers S1, S2, and D. Similarity insturctions: F-211, Fc211, Fc211w
Flag
19000
1010000101000010
Rising edge of input signal (OFF to ON)
Unchanged
19000 19002 19004
When the input condition 01000 changes from OFF to ON, the contents of the registers 19000 and 19001 are subtracted by the contents of the registers 19002 and 19003 and its results are stored in the registers 19004 and 19005.
コ0000 to コ1576 b0000 to b0776 09000 to 09776 19000 to 19776 29000 to 29776 39000 to 39776 コ0000 to コ1576 b0000 to b0776 09000 to 09776 19000 to 19776 29000 to 29776 39000 to 39776 コ0000 to コ1576 b0000 to b0776 09000 to 09776 19000 to 19776 29000 to 29776 39000 to 39776
Contents of S1, S1+1
After of D operation
Instruction 01000 STR
0 1 to 177777 (8)
9・ 103
9
Page 179
Fc211 SUB
Subtract constant from register in binary (8 bits − 8 bits) (SUBtract) Fc211 SUB
Symbol
S1 n
〔Example for use〕
D
Function
Contents of the register S1 are subtracted by an octal constant "n" in binary and its result is stored in the register D.
Operation
S1−n→D
Range of S1
コ0000 to コ1577 b0000 to b0777 09000 to 09777 19000 to 19777 29000 to 29777 39000 to 39777
04000
Condition
コ0000 to コ1577 b0000 to b0777 09000 to 09777 19000 to 19777 29000 to 29777 39000 to 39777
Flag
−
19000 123 09000
After operation
0 1 0 0 1 1 1 1 09000
Octal constant 0 1 0 1 0 0 1 1 123
1
Result Result (8)
Zero 07357
Carry 07356
0 1 to 377 (8)
1 0 0
0 0 1
Negative value
09000
19000 1 0 1 0 0 0 1 0
Rising edge of input signal (OFF to ON)
Contents After of D operation
123
Before operation
Contents Unchanged of S1
9
Fc211 19000 SUB
When the input condition 04000 changes from OFF to ON, the contents of the register 19000 are subtracted by the octal constant 123 in binary and its result is stored in the register 09000.
Range of "n" 000 to 377 (8)
Range of D
Instruction 04000
STR Fc211
Error Non-carry 07354 07355
0 0 0
1 1 0
Similarity insturctions: F-211, F-211w, Fc211w
9・ 104
2
3
Page 180
Fc211w SUB
Subtract constant from register in binary (16 bits − 16 bits) (SUBtract) Fc211w SUB
Symbol
S1 n
〔Example for use〕
D
Function
Contents of the registers S1 and S1+1 are subtracted by the octal constant "n" in binary and its results are stored in the registers D and D+1.
Operation
(S1, S1+1) − n→D, D+1
Range of S1
コ0000 to コ1576 b0000 to b0776 09000 to 09776 19000 to 19776 29000 to 29776 39000 to 39776
04000
Condition
When the input condition 04000 changes from OFF to ON, the contents of the registers 19000 and 19001 are subtracted by the octal constant 123456 and its results are stored in the registers 09000 and 09001. 19001
コ0000 to コ1576 b0000 to b0776 09000 to 09776 19000 to 19776 29000 to 29776 39000 to 39776
− Octal constant 123456 1010011100101110 of D+1
Flag
1
2
3
4
5
6
Unchanged
Contents Lower digits of result of D After Contents operation
19000
0010110011011100
Rising edge of input signal (OFF to ON)
Contents of S1, S1+1
19000 123456 09000
Fc211w 19000 123456 09000 SUB
Range of "n" 000000 to 177777 (8)
Range of D
Instruction STR 04000 Fc211w
09001
09000
1000010110101110
Upper digits of result Result (8)
Zero 07357
Carry 07356
0 1 to 177777 (8)
1 0 0
0 0 1
Negative value
Error Non-carry 07354 07355
0 0 0
1 1 0
Note 1: Be sure to use even addresses for registers S1, and D. Similarity insturctions: F-211, F-211w, Fc211
9・ 105
9
Page 181
F-212 WNDW Symbol
Window comparator (between 1 byte register) F-212 WNDW
S1
S2
〔Example for use〕
S3
Function
Contents of the registers S1, S2 and S3 are compared and its results are stored in the flags.
Operation
Compare result→flag
Range of S1
Range of S2
Range of S3
Condition
9
After operation
02000
When the input signal is ON (not limited to an OFF to ON change)
S3<S1 S3<S2
Input (02000) Register (コ0001)
100
250
350
350
(OCT)
(コ0002)
200
200
200
330
(OCT)
(コ0003)
300
300
300
300
(OCT)
Non-carry flag (07354) Error flag (07355) Carry flag (07356) Zero flag (07357)
Contents Unchanged of S1 Contents Unchanged of S2 Contents Unchanged of S3
Flag
コ0001 コ0002 コ0003
F-212 コ0001 コ0002 コ0003 WNDW
When the input condition 02000 changes from OFF to ON, the contents of the register コ0001 are checked if コ 0001<コ0002, コ0002≦コ0001≦コ0003, and コ0003<コ 0001, its results are stored in the carry flag (07356), zero flag (07357) and non-carry flag (07354). Operation takes place only when the condition is コ0002≦コ0003. Operation does not take place and the error flag (07355) is set active, if コ0002>コ0003.
コ0000 to コ1577 b0000 to b0777 09000 to 09777 19000 to 19777 29000 to 29777 39000 to 39777 コ0000 to コ1577 b0000 to b0777 09000 to 09777 19000 to 19777 29000 to 29777 39000 to 39777 コ0000 to コ1577 b0000 to b0777 09000 to 09777 19000 to 19777 29000 to 29777 39000 to 39777
Contents of register S1<S2 S2≦S1≦S3
Instruction 02000
STR F-212
1 scan time
Non-carry (07354) S3
Zero 07357
Carry 07356
0 1 0 0
1 0 0 0
Error Non-carry 07354 07355
0 0 0 1
0 0 1 0
Zero (07357) S2 Carry (07356) S1
Similarity insturctions: F-212w, Fc212, Fc212w
9・ 106
Page 182
Window comparator (between 1 word registers)
F-212w WNDW
F-212w WNDW
Symbol
S1
S2
〔Example for use〕
S3
Function
Contents of the registers S1, S1+1, S2, S2+1, S3, S3+1 are compared and its results are stored in the flags.
Operation
Result→flag
Range of S1
Range of S2
Range of S3
Condition
After operation
Flag
02000
F-212w 09000 09002 09004 WNDW
09000 09002 09004
When the input condition 02000 changes from OFF to ON, the word contents of the registers 09000 and 09001, are checked if 09000, 09001<09002, 09003 and 09002, 09003≦09000, 09001≦09000, 09001≦09004, 09005, and 09004, 09005<09000, 09001, and its results are stored in the carry flag (07356), zero flag (07357) and non-carry flag (07354). Operation takes place only when 09002, 09003≦ 09004, 09005 is established and operation stop with the error flag (07355) in activation if 09004, 09005<09002, 09003.
コ0000 to コ1576 b0000 to b0776 09000 to 09776 19000 to 19776 29000 to 29776 39000 to 39776 コ0000 to コ1576 b0000 to b0776 09000 to 09776 19000 to 19776 29000 to 29776 39000 to 39776 コ0000 to コ1576 b0000 to b0776 09000 to 09776 19000 to 19776 29000 to 29776 39000 to 39776
Input (02000) Register (09000)
Rising edge of input signal (OFF to ON)
Contents of S1, S1+1 Contents of S2, S2+1 Contents of S3, S3+1
Instruction 02000
STR F-212w
Unchanged Unchanged Unchanged Result
Zero 07357
Carry 07356
Error Non-carry 07355 07354
S1 , < S 2 , S1+1 S2+1 S2, S1 , S3, S2+1 ≦ S1+1 ≦ S3+1 S3, < S1, S3+1 S1+1 S3, < S2, S3+1 S2+1
0
1
0
0
1
0
0
0
0
0
0
1
100 200
100 300
100 200
(Octal) (Octal)
(09002) (09003)
000 200
000 200
000 200
100 200
(Octal) (Octal)
(09004) (09005)
000 300
000 300
000 300
000 200
(Octal) (Octal)
Non-carry flag (07354) Error flag (07355) Carry flag (07356) Zero flag (07357)
0 0 1 0 Note 1: Be sure to use even addresses for registers S1, S2 and S3. Similarity insturctions: F-212, Fc212, Fc212w
9・ 107
000 100
1 scan time
9
Page 183
Window comparator (between 1 byte octal constants)
Fc212 WNDW
Fc212 WNDW
Symbol
S n1
〔Example for use〕 n2
Function
Contents of the register S1 are compared with the octal constants n1 and n2 and its results are stored in the flags.
Operation
Result→flag
Range of S1
コ0000 to コ1577 b0000 to b0777 09000 to 09777 19000 to 19777 29000 to 29777 39000 to 39777
Range of n1
000 to 377 (8)
Range of n2
000 to 377 (8)
Condition
When the input signal is ON (not limited to an OFF to ON change)
04000
Fc212 19000 WNDW
Contents of register S1<n1 n1≦S1≦n2 n2<S1 n2<n1
Contents of 19000 150 250 350
9
Zero 07357
Carry 07356
Fc212w WNDW
0 0 0 1
Zero 07357 0 1 0
Carry 07356 1 0 0
Error 07355 0 0 0 n2
Zero (07357)
n1
Carry (07356)
0 0 1 0
Non-carry 07354 0 0 1
S1
Window comparator (between 1 word octal constants) Fc212w WNDW
Symbol
S1 n1
〔Example for use〕 n2
Contents of the registers S1 and S1+1 are compared with the octal constants n1 and n2 and its results are stored in the flags.
Operation
Result→flag
Range of S1
コ0000 to コ1576 b0000 to b0776 09000 to 09776 19000 to 19776 29000 to 29776 39000 to 39776
Range of n1
000000 to 177777 (8)
Range of n2
000000 to 177777 (8)
Condition
When the input signal is ON (not limited to an OFF to ON change)
Contents of S1, S1+1
04000
19000 020000 030000
Fc212w 19000 020000 030000 WNDW
When the input condition 04000 changes from OFF to ON, the word contents of the registers 19000 and 19001 are checked if 19000, 19001<020000, 020000≦19000, 19001≦030000, and 030000<19000, 19001 and its results are stored in the carry flag (07356), zero flag (07357) and non-carry flag (07354). Zero Contents of 19000,19001 07357 015000 025000 035000
Unchanged Contents of Zero register 07357 S1, S1+1<n1 0 n1≦S1, S1+1≦n2 1 n2<S1, S1+1 0 n2<n1 0
Instruction 04000
STR Fc212w
Function
After operation
19000 200 300
300
Non-carry (07354)
Error Non-carry 07355 07354
1 0 0 1 0 0 0 0 Similarity insturctions: F-212, F-212w, Fc212w
Flag
200
When the input condition 04000 changes from OFF to ON, the contents of the register 19000 are checked if 19000<200, 200≦19000≦300, and 300<19000, and its results are stored in the carry flag (07356), zero flag (07357) and non-carry flag (07354).
Contents Unchanged of S1 After operation
Instruction 04000
STR Fc212
Carry 07356
Error Non-carry 07355 07354
1 0 Flag 0 0 0 0 0 1 Note 1: Be sure to use even addresses for register S1. Similarity insturctions: F-212, F-212w, Fc212
0 0 1 0
9・ 108
0 1 0
Carry 07356 1 0 0
Error 07355 0 0 0
Non-carry 07354 0 0 1
Page 184
F-215 MUL
Multiply register by register in binary (8 bits × 8 bits) (MULtiply) F-215 MUL
Symbol
S2
S1
STR F-215
Function
The contents of the register S1 are multiplied by the contents of the register S2 in binary and its results are stored in the registers D and D+1.
Operation
S1×S2→D, D+1
Range of S1
Range of S2
Range of D
Condition
04000
F-215 09000 09100 09200 MUL
09000 00101100
× 09100 00011011
09201
09200
0000010010100100
Rising edge of input signal (OFF to ON)
Unchanged
Lower digits of result Upper digits of result Carry 07356
Error 07355
0 0 0 Similarity insturctions: F-215w, Fc215, Fc215w
9 101100 X 11011 101100 101100 101100 101100 10010100100
Unchanged
Zero 07357
09000 09100 09200
When the input condition 04000 changes from OFF to ON, the contents of 09000 are multiplied by the contents of the register 09100 in binary and its results are stored in the registers 09200 and 09201.
コ0000 to コ1577 b0000 to b0777 09000 to 09777 19000 to 19777 29000 to 29777 39000 to 39777 コ0000 to コ1577 b0000 to b0777 09000 to 09777 19000 to 19777 29000 to 29777 39000 to 39777 コ0000 to コ1576 b0000 to b0776 09000 to 09776 19000 to 19776 29000 to 29776 39000 to 39776
Contents of S1 Contents of S2 After Contents operation of D Contents of D+1
Flag
Instruction 04000
〔Example for use〕
D
Non-carry 07354
0
9・ 109
Page 185
F-215w MUL
Multiply register by register in binary (16 bits × 16 bits) (MULtiply) F-215w MUL
Symbol
〔Example for use〕
D
Function
The contents of the registers S1 and S1+1 are multiplied by the contents of the registers S2 and S2+1 in binary and its results are stored in the registers D, D+1, D+2 and D+3.
Operation
(S1, S1+1)×(S2, S2+1)→D, D+1, D+2, D+3
Range of S1
Range of S2
9
S2
S1
コ0000 to コ1576 b0000 to b0776 09000 to 09776 19000 to 19776 29000 to 29776 39000 to 39776 コ0000 to コ1576 b0000 to b0776 09000 to 09776 19000 to 19776 29000 to 29776 39000 to 39776
09000
× 09101
Condition
Rising edge of input signal (OFF to ON)
Flag
When the input condition 04000 changes from OFF to ON, the 16 bits contents of the registers 09000 and 09001 are multiplied by the contents of the registers 09100 and 09101 in binary and its results are stored in the registers 09200 to 09203. 09001
Range of D
Contents of D Contents After operation of D+1 Contents of D+2 Contents of D+1
F-215w 09000 09100 09200 MUL
0001011100110100
コ0000 to コ1574 b0000 to b0774 09000 to 09774 19000 to 19774 29000 to 29774 39000 to 39774
Contents of S1, S1+1 Contents of S2, S2+1
04000
Instruction 04000 STR F-215 09000 09100 09200
09100
0010001010000101
09203
09202
09201
09200
00000011001000001111011000000100
Unchanged Unchanged Lower digits of result Result Result Upper digits of result Zero 07357
Carry 07356
Error 07355
Non-carry 07354
0
0
0
0
Note 1: Be sure to use even addresses for registers S1, S2, and D. Similarity insturctions: F-215, Fc215, Fc215w
9・ 110