Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 12 of 37

Sharp Programmable Controller New Satellite JW10 User's Manual: Chapter 9 Description of Instructions, pages 76 to 85

Pages 76 to 85 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 76

Chapter 9. Description of Instructions 9-1

Table of instructions

[1] Basic instruction Execution time (µs)

Instruction

Symbol

Words

STR

1

STR NOT

1

AND

1

AND NOT

Function Starts at normally open contact and intermediate result is stored. Starts at normally closed contact and intermediate result is stored.

JW-1324K/1342K JW-1424K/1442K JW-1624K/1642K Not Not Executing executing Executing executing

See page

1.83

1.02

9・9

1.83

1.02

10

AND

1.83

1.02

11

1

AND NOT

1.83

1.02

11

OR

1

OR

1.83

1.02

12

OR NOT

1

OR NOT

1.83

1.02

12

AND STR

1

AND with the intermediate result

1.63

0.81

13

OR STR

1

OR with the intermediate result

1.63

0.81

14

OUT

1

Output result

6.9

5.9

15

TMR ①

CNT

① ②

TMR

②③

CNT

③

③

2

④

2

Timer (decremental) ① Start input ② TMR number (000 to 377) 130 ③ Setting value(1 to 1999) 0.1 to 199.9 sec. (TMR000 to 277) 0.01 to 19.99 sec.(TMR300 to 377) Counter (decremental) ① Calculation input ② Reset input 136 ③ CNT number (000 to 377) ④ Setting value (1 to 1999)

9-1

9 94

127

91

16

102

133

99

18

Page 77

[2] Application instruction (numeric order) Execution time (µs)

Instruction

9

Words

Symbol

F-00

F-00 XFER

S

D

3

F-00w

F-00w XFER

S

D

3

F-01

F-01 BCD n

D

3

F-01w

F-01w BCD n

D

F-02

F-02 XCHG

D1

F-02w

F-02w XCHG

F-03

Function Transfer data register to data register (1 byte) Transfer data register to data register (1 word)

JW-1324K/1342K JW-1424K/1442K JW-1624K/1642K Not Not Executing executing Executing executing

See page

35

17

33

13

9・28

33

17

31

13

28

Transfer BCD constant (2 digits)

33

17

29

15

29

3

Transfer BCD constant (4 digits)

31

17

29

15

29

D2

3

Exchange registers (1 byte)

35

17

31

13

30

D1

D2

3

Exchange registers (1 word)

35

17

33

13

30

F-03 BIN

S

D

3

Convert 2 digits BCD to 8 bits binary

67

17

63

15

31

F-03w

F-03w BIN

S

D

3

Convert 4 digits BCD to 16 bits binary

117

17

115

15

32

F-04

F-04 BCD

S

D

3

Convert 8 bits binary to 2 digits BCD

133

17

129

15

33

F-04w

F-04w BCD

S

D

3

Convert 16 bits binary to 6 digits BCD

329

17

311

15

33

F-07

F-07 DCML n

D

3

Transfer 1 byte decimal constant

31

17

29

15

34

F-07w

F-07w DCML n

D

3

Transfer 1 word decimal constant

31

17

31

15

34

F-08

F-08 OCT n

D

3

Transfer 1 byte octal constant

33

19

31

17

35

F-08w

F-08w OCT n

D

3

Transfer 1 word octal constant

49

19

47

17

35

F-09

F-09 INV

S

D

3

Complement 8 bits data

35

19

33

17

36

F-09w

F-09w INV

S

D

3

Complement 16 bits data

35

19

31

17

36

F-10

F-10 ADD

S1

S2

D

4

105

21

101

19

37

F-10w

F-10w ADD

S1

S2

D

4

193

21

187

19

38

Fc10

Fc10 ADD

S1 n

D

4

109

21

89

19

39

Fc10w

Fc10w ADD

S1 n

D

4

147

21

141

19

40

F-11

F-11 SUB

S1

S2

D

4

103

21

99

17

41

F-11w

F-11w SUB

S1

S2

D

4

195

21

185

17

42

Fc11

Fc11 SUB

S1 n

D

4

93

21

87

17

43

Fc11w

Fc11w SUB

S1 n

D

4

146

21

139

17

44

F-12

F-12 CMP

S1

S2

3

47

13

45

11

45

F-12w

F-12w CMP

S1

S2

3

85

13

83

11

46

Fc12

Fc12 CMP

S1 n

3

47

13

45

11

47

Fc12w

Fc12w CMP

S1 n

3

63

13

61

11

48

F-13

F-13 AND

S

D

3

43

19

39

19

49

F-13w

F-13w AND

S

D

3

83

19

79

19

49

Fc13

Fc13 AND n

D

3

43

19

39

19

50

Fc13w

Fc13w AND n

D

3

63

19

59

19

50

Add register and register (BCD 2 digits) Add register and register (BCD 4 digits) Add register (BCD 2 digits) and constant (BCD 2 digits) Add register (BCD 4 digits) and constant (BCD 4 digits) Subtract register from register (BCD 2 digits) Subtract register from register (BCD 4 digits) Subtract constant (BCD 2 digits) from register (2 digits) Subtract constant (BCD 4 digits) from register (4 digits) Compare register with register (1 byte) Compare register with register (1 word) Compare register with octal constant (1 byte) Compare register with octal constant (1 word) AND register with register (1 byte) AND register with register (1 word) AND register with octal constant (1 byte) AND register with octal constant (1 word)

9-2

Page 78

Execution time (µs)

Instruction

Symbol

Words

F-14

F-14 OR

S

D

3

F-14w

F-14w OR

S

D

3

Fc14

Fc14 OR n

D

3

Fc14w

Fc14w OR n

D

3

F-15

F-15 MUL

S1

S2

D

4

Fc15

Fc15 MUL

S1 n

D

4

F-16

F-16 DIV

S1

S2

D

4

Fc16

Fc16 DIV

S1 n

D

4

F-18

F-18 XOR

S

D

3

F-18w

F-18w XOR

S

D

3

Fc18

Fc18 XOR n

D

3

Fc18w

Fc18w XOR n

D

F-30

Function OR register with register (1 byte) OR register with register (1 word)

JW-1424K/1442K JW-1624K/1642K Not Not Executing executing Executing executing JW-1324K/1342K

See page

43

19

41

17

9・51

83

19

79

17

51

41

19

39

17

52

63

19

61

17

52

465

19

459

17

53

419

19

413

17

54

383

19

377

17

55

369

19

363

17

56

39

17

35

15

57

41

17

37

15

57

39

17

35

15

58

3

Multiply register (BCD 4 digits) by constant (BCD 3 digits) Divide register (BCD 4 digits) by register (BCD 2 digits) Divide register (BCD 4 digits) by constant (BCD 2 digits) Exclusive OR register with register (1 byte) Exclusive OR register with register (1 word) Exclusive OR register with octal constant (1 byte) Exclusive OR register with octal constant (1 word)

41

17

37

15

58

F-30 MCS

1

Set master control

19

−

17

−

59

F-31

F-31 MCR

1

Reset master control

9

−

7

−

59

F-32

F-32 SET

R

2

Set coil

29

19

25

15

62

F-33

F-33 RST

R

2

Reset coil

29

19

25

15

62

−

−

33

25

64

−

−

35

29

65

OR register with octal constant (1 byte) OR register with octal constant (1 word) Multiply register by register (BCD 4 digits)

F-34

F-34 TSET n1 n2

BIT

4

F-35

F-35 TRST n1 n2

BIT

4

Comparison with current value of clock (specified relay set) Comparison with current value of clock (specified relay reset)

F-40

F-40 END

1

End instruction

30

−

30

−

66

F-41

F-41 JCS

1

Set jump control

19

−

17

−

67

F-42

F-42 JCR

1

Reset jump control

9

−

7

−

67

1

Complement bit (ACC contents)

6

−

4

−

69

1

Differentiate at ON

22

19

20

17

70

1

Differentiate at OFF

23

19

21

17

71

F-43

F-43 F-44

F-44 F-45

F-45 F-47

F-47 ONLS

1

ON level set

6

−

4

−

72

F-48

F-48 ONLR

1

ON level reset

6

−

4

−

72

F-50

F-50 4 16

S

D

3

Decode 4 to 16

33

15

29

13

73

F-51

F-51 16 4

S

D

3

Encode 16 to 4

97

15

95

13

73

F-52

F-52 7SEG

S

D

3

Decode to 7 segments data

33

15

31

13

74

F-53

F-53 BIN

S

D

3

Convert 4 digits BCD to 16 bits binary

117

17

115

15

75

F-54

F-54 BCD

S

D

3

Convert 16 bits binary to 6 digits BCD

329

17

311

15

76

F-55

F-55 SWAP

S

D

3

Swap upper 4 bits with lower 4 bits

31

15

29

13

77

9-3

9

Page 79

Execution time (µs)

Instruction F-58

9

Words

Symbol F-58 ΣBIT n

S

D

4

Function

Total of ON bits Shift register bidirectional (1 byte) ① Shift direction input ② Data input ③ Shift input ④ Reset input Shift register bidirectional (1 word) ① Shift direction input ② Data input ③ Shift input ④ Reset input

JW-1424K/1442K JW-1624K/1642K Not Not Executing executing Executing executing JW-1324K/1342K

See page

83

29

81

13

9・77

114

32

113

31

78

115

32

114

32

80

59

51

87

47

81

75

51

125

47

82

F-60

① ② ③ ④

F-60 SFR

D

2

F-60w

① ② ③ ④

F-60w SFR

D

2

F-62

① ② ③

F-62 U/DC

D

2

F-62w

① ② ③

F-62w U/DC

D

2

F-63

F-63 INC

D

2

Add binary counter (1 byte)

55

29

53

29

83

F-63w

F-63w INC

D

2

Add binary counter (1 word)

57

29

55

29

83

F-64

F-64 DEC

D

2

Subtract binary counter (1 byte)

57

31

55

29

84

F-64w

F-64w DEC

D

2

Subtract binary counter (1 word)

59

31

57

29

84

F-70

F-70 FILE n

S

D

4

Transfer n bytes block

(Note)

19 (Note)

13

85

F-70w

F-70w FILE n

S

D

4

Transfer n words block

(Note)

19 (Note)

13

86

F-71

F-71 CONS n

D1

D2

4

Transfer octal constant block (1 byte) (Note)

57 (Note)

53

87

F-71w

F-71w CONS n

D1

D2

4

Transfer octal constant block (1 word) (Note)

57 (Note)

53

88

F-74

F-74 nXFR n

S

D

4

Transfer n bytes

(Note)

19 (Note)

15

89

F-74w

F-74w nXFR n

S

D

4

Transfer n words

(Note)

19 (Note)

15

90

F-80

F-80 IORF

D

2

I/O refresh (1 byte)

140

16

138

14

91

F-81

F-81 IORF n

3

I/O refresh (1 bit)

140

16

138

14

91

F-90

F-90 REM n

2

Remark n = 0000 to 3777

3.25

−

1.65

−

92

F-140

F-140 LBn LABL

2

Set label

LB0000 to LB0177

0

−

0

−

93

F-141

F-141 LBn JMP

2

Jump to label

19

9

17

7

94

F-142

F-142 LBn CALL

2

Call labeled subroutine

33

20

31

18

96

F-143

F-143 RET

1

Call subroutine label

38

23

37

22

96

F-144

F-144 FOR

2

Set Loop count

36

20

34

18

97

F-145

F-145 NEXT

1

END of Loop

15

8

14

7

97

F-210

F-210 ADD

S1

S2

D

4

85

23

77

17

98

F-210w

F-210w ADD

S1

S2

D

4

89

23

81

17

99

Fc210

Fc210 ADD

S1 n

D

4

85

23

79

17

100

Fc210w

Fc210w S1 ADD n

D

4

Add register and register in binary (8 bits + 8 bits) Add register and register in binary (16 bits + 16 bits) Add register and constant in binary (8 bits + 8 bits) Add register and constant in binary (16 bits + 16 bits)

87

23

81

17

101

D n

2 digits BCD up/down counter ① Up/down counter direction input ② Counter input ③ Reset input 4 digits BCD up/down counter ① Up/down counter direction input ② Counter input ③ Reset input

9-4

Page 80

Execution time (µs)

Instruction

Words

Symbol

Function

F-211

F-211 SUB

S1

S2

D

4

F-211w

F-211w S1 SUB

S2

D

4

Fc211

Fc211 S1 SUB n

D

4

Fc211w

Fc211w SUB

S1 n

D

4

Subtract register from register in binary (8 bits − 8 bits) Subtract register from register in binary (16 bits − 16 bits) Subtract constant from register in binary (8 bits − 8 bits) Subtract constant from register in binary (16 bits − 16 bits)

F-212

F-212 WNDW

S1

S2

S3

4

F-212w

F-212w S1 WNDW

S2

S3

4

Fc212

Fc212 WNDW

S1 n1 n2

4

Fc212w

Fc212w WNDW

S1 n1 n2

4

F-215

F-215 MUL

S1

S2

D

4

F-215w

F-215w MUL

S1

S2

D

4

Fc215

Fc215 MUL

S1 n

D

4

Fc215w

Fc215w MUL

S1 n

D

4

F-216

F-216 DIV

S1

S2

D

4

F-216w

F-216w DIV

S1

S2

D

4

Fc216

Fc216 DIV

S1 n

D

4

Fc216w

Fc216w DIV

S1 n

D

4

Window comparator (between 1 byte octal constants) Window comparator (between 1 word octal constant) Multiply register by register in binary (8 bits × 8 bits) Multiply register by register in binary (16 bits × 16 bits) Multiply register by constant in binary (8 bits × 8 bits) Multiply register by constant in binary (16 bits × 16 bits) Divide register by register in binary (8 bits ÷ 8 bits) Divide register by register in binary (15 bits ÷ 15 bits) Divide register by constant in binary (8 bits ÷ 8 bits) Divide register by constant in binary (15 bits ÷ 15 bits)

1

Non-operation instruction

NOP

JW-1424K/1442K JW-1624K/1642K Not Not Executing executing Executing executing JW-1324K/1342K

See page

85

21

81

19

9・102

87

21

83

19

103

83

21

79

19

104

85

21

81

19

105

Window comparator (1 byte register)

83

19

73

15

106

Window comparator (1 word register)

85

19

75

15

107

81

19

67

15

108

83

19

69

15

108

59

19

57

17

109

61

19

59

17

110

57

19

55

17

111

59

19

57

17

112

59

19

57

17

113

63

19

77

17

114

59

19

53

17

115

75

19

59

17

116

1.63

−

0.81

−

−

Note: Processing time of instruction F-70, F-71, and F-74 are determined by number of transfer bytes. Processing times of instruction F-70w, F-71w, and F-74w are determined by number of transfer words. Instruction JW-1324K/1342K

JW-1424K/1442K

F-70

46 + 6.5B

JW-1624K/1642K 41 + 6.5B

F-70w

47 + 11.6W

42 + 17.8W

F-71

78 + 3.0B

62 + 3.5B

F-71w

86 + 2.9W

66 + 2.9W

F-74

40 + 4.9B

39 + 4.8B

F-74w

49 + 5.0W

46 + 4.8W

Remarks

B : No. of bytes (1 to 256) W : No. of words (1 to 256) Unit : µs

9-5

9

Page 81

[3] Application instructions (functional order)

F-00

9・28

1 word

F-00W

28 n bytes

F-70

85 n words

F-70W

86 n bytes

F-74

89

(Same data)

F-74W

90

BCD constant transfer

2 digits

F-01

29

4 digits

F-01W

29

Decimal constant transfer

1 byte

F-07

34

1 word

F-07W

34

1 byte

F-08

35

1 word n bytes

F-08W

35

F-71

87 n words

Octal constant transfer n words Register 2digits + 2digits and BCD register 4digits + 4digits addi- Constant 2digits + 2digits and tion register 4digits + 4digits Register 2digits - 2digits BCD and sub- register 4digits - 4digits trac- Constant 2digits - 2digits and tion register 4digits - 4digits

Arithmetic operation instructions

9

F-71W

88

F-10

37

F-10W

38

Fc10

39

Fc10W

40

F-11

41

F-11W

42

Fc11

43

Fc11W

44

BCD Register and 4digits×4digits register multiplica- Constant 4digits×3digits and register tion

F-15

53

Fc15

54

Register and BCD register 4digits÷2digits Constant division and register 4digits÷2digits

F-16

55

Fc16

56

Register 8 bits + 8 bits and Binary register 16 bits + 16 bits addition Constant 8 bits + 8 bits and register 16 bits + 16 bits Register 8 bits - 8 bits and Binary register 16 bits - 16 bits subtrac- Constant 8 bits - 8 bits and tion register 16 bits - 16 bits Register 8 bits×8 bits and Binary register 16 bits×16 bits MultipliConstant 8 bits×8 bits cation and register 16 bits×16 bits Register 8 bits÷8 bits and Binary register 15 bits÷15 bits division Constant 8 bits÷8 bits and register 15 bits÷15 bits

F-210

98

F-210W

99

Fc210

100

Fc210W

101

F-211

See page

8 bits

F-13

9・49

16 bits

F-13W

49

8 bits

Fc13

50

16 bits

Fc13W

50

8 bits

F-14

51

16 bits

F-14W

51

8 bits

Fc14

52

16 bits

Fc14W

52

8 bits

F-18

57

16 bits

F-18W

57

8 bits

Fc18

58

16 bits

Fc18W

58

8 bits

F-09

36

16 bits

F-09W

36

1 byte

F-12

45

1 word

F-12W

46

1 byte

Fc12

47

1 word 1 byte

Fc12W

48

F-212

106

1 word

F-212W

107

1 byte

Fc212

108

1 word

Fc212W 108

Complement Register and register ComRegister pare with octal constant Register Window and com- register parator Register with octal constant

2digits →8 bits

F-03

31

4digits →16 bits

F-03W

32

4digits →16 bits

F-53

75

8digits →2 bits

F-04

33

16digits →6 bits

F-04W

33

16digits →6 bits

F-54

76

Decode from 4 to 16

F-50

73

Encode from 16 to 4

F-51

73

102

Decode 7 SEG

F-52

74

F-211W

103

Total of ON bit

F-58

77

Fc211

104

1 byte

F-02

30

Fc211W

105

1 word

F-02W

30

1 byte

F-55

77

Convert BCD to BIN

Convert instructions

(Same data)

Convert BIN to BCD

Exchange instructions

Transfer instructions

Register to Register transfer

Exchange data

Swap high order 4 bits with low order 4bits

F-215

109

F-215W

110

Fc215

111

Complement bit

F-43

69

Fc215W

112

F-44

70

F-216

113

Differentiate at ON Differentiate at OFF

F-45

71

F-216W

114

Set coil

F-32

62

Fc216

115

Reset coil

F-33

62

Fc216W

116

Bit processing instructions

1 byte

Instruction

Type Register and register AND Register with octal constant Register and register OR Register with octal constant Register and Exclu- register sive Register OR with octal constant

Logical operation instructions

See page

Compare instructions

Instruction

Type

9-6

Page 82

See

Other instructions

Clock instructions

Branch instructions

Operational condition instructions

Shift instructions

Counter instructions

Type

Instruction page

BCD up/down counter

2 digits

F-62

9・81

4 digits

F-62W

82

Add binary counter

1 byte

F-63

83

1 word

F-63W

83

1 byte

F-64

84

1 word

F-64W

84

8 bits

F-60

78

16 bits

F-60W

80

Set master control

F-30

59

Reset master control

F-31

59

Set jump control

F-41

67

Subtract binary counter Reversible shift register

Reset jump control

F-42

67

Set level operating condition

F-47

72

Reset level operating condition

F-48

72

End

F-40

66

Label

F-140

93

Jump

F-141

94

Call subroutine

F-142

96

Return from subroutine

F-143

96

Set loop count

F-144

97

End of loop Comparison with current value of clock (specified relay set) Comparison with current value of clock (specified relay reset)

F-145

97

F-34 F-35

64 65

1 byte

F-80

91

1 bit

F-81

91

Remark (instruction for comment identification)

F-90

92

Refresh I/O

9

9-7

Page 83

9-2

Basic instruction

[1] Execution of basic instruction • The JW10 uses the data memory section, logical operation section, accumulator (ACC), and stack registers (S1 to S8) for operating basic instructions.

Logical operation section

AND STR、OR STR OFF

Data memory

ACC

S1

S2

S3

S4

S5

S6

S7

S8 Delete

STR、STR NOT AND、AND NOT OR、OR NOT OUT

9

1) Data memory • The data memory is assigned by relay numbers (input relay, output relay, auxiliary relay, and timer/counter contact points), and stores ON/OFF information. • The ON/OFF information of the data memory is read by six basic instructions: STR, STR NOT, AND, AND NOT, OR, and OR NOT, and written by OUT instruction and timer/counter instruction. (An example of writing instruction words) STR AND NOT OR OUT ↑ Instruction

(An example of ladder chart)

00001 00100 T100 00400 ↑ Relay number

00001

00100

00400

T100

2) Logical operation section • Logical processing takes place according to the contents of the instruction. 3) Accumulator (ACC) • This is a 1 bit register in which the result from the logical processing is stored. • It changes with eight instructions: STR, STR NOT, AND, AND NOT, OR, OR NOT, AND STR, and OR STR. 4) Stack register (S1, S2, S3, S4, S5, S6, S7, S8) • This is an 8 bits register in which the intermediate result is stored during processing of the serial/parallel circuit or counter instruction, application instruction (F-60, F-60w, F-62, F62w) that has a plural number of input conditions. • It changes with four instructions: STR, STR NOT, AND STR and OR STR.

9-8

Page 84

[2] Description of each basic instruction

STR R

[ Example for use 1 ]

Symbol Function

Operation

00000

Use when first contact point from bus line, or first contact point of circuit block is "a" contact. Stores data memory contents (ON/OFF data) of relay number R into the accumulator (ACC). ON/OFF data previously registered in the ACC is transferred to S1 of the stack register. S1 data is transferred to S2. Thereafter, S2 to S3, S3 to S4, S4 to S5, S5 to S6, S6 to S7, and S7 to S8, respectively. Data in S8 is deleted. R

ACC S1 S2 S3 S4 S5 S6 S7 S8

Instruction STR 00000 OUT 00400

00400

When input relay 00000 is ON, output relay 00400 turns ON.

00000 00400 [ Example for use 2 ]

Over flow

After operation

00000 to 15777 Range of R T000 to T377 C000 to C377 Contents Latch of R

00000

00002

00001

00003

ACC

Contents of R

Block A

S1

Contents of ACC before operation

Bus line

S2

Contents of S1 before operation

S3

Contents of S2 before operation

S4

Contents of S3 before operation

S5

Contents of S4 before operation

S6

Contents of S5 before operation

S7

Contents of S6 before operation

S8

Contents of S7 before operation

STR 00000 OR 00001 STR 00002 STR 00003 AND 00004 OR STR AND STR OUT 00401

9-9

00401 00004

Block C Block B

First contact point of bus line (block A) First contact point of block B First contact point of block C.

9

Page 85

STR NOT R

[ Example for use 1 ]

Symbol Function

Operation

00000

Use when first contact point from bus line, or first contact point of circuit block is "b" contact.

00400

Instruction STR NOT 00000 OUT 00402

When input relay 00000 is OFF, output relay 00402 turns ON.

Reverses data memory contents (ON/OFF data) of relay number R, and stores it in the accumulator (ACC). ON/OFF data previously registered in the ACC is transferred to S1 of the stack register. S1 data is transferred to S2. Thereafter, S2 to S3, S3 to S4, S4 to S5, S5 to S6, S6 to S7, and S7 to S8, respectively. Data in S8 is deleted.

00000 00400

[ Example for use 2 ] R

ACC

S1 S2 S3 S4 S5 S6 S7 S8

00000

00002

00001

00003

00403

Over flow

00000 to 15777 Range of R T000 to T377 C000 to C377

After operation

9

Contents of R

Latch

ACC

Value after reversed R contents.

S1

Contents of ACC before operation

S2

Contents of S1 before operation

S3

Contents of S2 before operation

S4

Contents of S3 before operation

S5

Contents of S4 before operation

S6

Contents of S5 before operation

S7

Contents of S6 before operation

S8

Contents of S7 before operation

Block A Bus line

STR NOT 00000 OR 00001 STR NOT 00002 STR NOT 00003 AND 00004 OR STR AND STR OUT 00403

9-10

00004

Block C Block B

First contact point of bus line (block A) First contact point of block B First contact point of block C.