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

The text of a manual ยท part 7 of 10

Programmable Controller User's Manual, External character display unit type A6FD: 7. PROGRAMMING, pages 36 to 43

Pages 36 to 43 of 60, from Programmable Controller User's Manual, External character display unit type A6FD

The original document is the PDF (2.2 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 Mitsubishi A0J2-E28DT

Page 36

/MELSEC

7. PROGRAMMING

(2) Display of annunciator comment using PC ,timer The comment for any annunciator coil which has been switched on is output to the display. Successive F coil entries in the FIFO table are displayed by the internal clock pulse (M9033). The program flow chart is shown below: Program Concept

]

D~splayof next F c o ~ comment l from the queue ( c o ~ number l stored In one of D9125 t o D9132)

I

Page 37

/MELSEC

'7. PROGRAMMING .

I

Program ~ x a m ~ l e

..

.. k:

-

.'

I

.

:MCr

>

Adds 1 t o V M9033 IS on, D9124 B V

. nau

D9124

PRC

F@

K when when z

3

Transfers F c o ~ numbe; l number from D(9124+ V) to 2.

YFJB

3

PRC execut~on Dlsplays the relevant F coil comment.

i

=

Failure occurrence flag

.

,

Clears data in V ~fD9124

5 V or D9124 = 0 Resets V when D9124 V or D9124 = 0.

K ~ 9 1 2 4 6

I Instruction Explanation I

1

'"1:I > = I D 9 1 2 4 / ~ 1 ....... Continuity when the number of de. tected F coil "on" occurences is one or more. "2: M9033 ..................... Special function contacts. Close every 1 second. . "3: > = ~ 9 1 2 4v1 ........ Allows 1 to be added t o index register V if the value.in D9124 is greater than that in V. "4: ~ 9 1 2 4 ~.. 1...~Moves the contents of data register D9124, indexed by V, (i.e. D(9124 4- V)) to index register 2. '5: .......... Displ'ays the appropriate F coil comment on the A6FD wired to outputs Y80 -- Y8F. The F coil number is specified as FO indexed by Z. (i.e. F(O+Z)). "6: <= 1 ~ 9 1 2 4 1......... ~ Checks that all F coil "on" occurences have been processed. if they have, the index register V is reset t o 0 and the program will repeat its operation.

1

I

I.

1 MOWI

I

1-

.

1 f

I

Page 38

/MELSEC

7. PROGRAMMING

/ Program operation I The following explanation assumes that two F coils have been detected (i.e. the value in D9124 is 2).

lndexes FO by Z and

MOV appropriate COmmenf

I KO I V

. .

POINT

When D9124 SV lndexes FO by Z and outputs appropriate comment

---- v=o

1

1. Comments must be written and stored in the PC before the PRC instruction can be used. 2.:The CJ instruction may be used to jump to the message generating part of the program as described below:

Sequence program

Cond~tional jump not activated 1

-FEND Program for failure display

Page 39

/MELSEC

7. PROGRAMMING

(3) Alternate display of F coil number and comment. This program example outputs a numerical variable (i.e. the F coil number) and a comment alternately. .

*

Program Concept

I No display

Flrst F coil number 1s read and transferred to Z.

1

Appropriate F colt number IS converted from blnary to ASCII equ~vllant. II v F toll number is displayed.

v F toll comment is displayed

1 I

1 check for next F toll in the queue by pressing the AGFD reset button.

7-12 IB (NA) 66139-A

Page 40

Program Example

88-C>=

K DQ1?4 1

I

3

::

94.

CPLs

::sea?

VgP

98. ::

18~3FT= 3

,

~ c

I

3 n3 ::

no!!

[1!1124

*I c n s ~B g~4 i

-

CBC[*

*2

- c['lZ

7

-

: -

-

1 :"~ c , :;n~

-Jl'a~=

:

215-C=

I 1

=

2;l-c

+=

[,3124

T 1:;

!:kt

,

P

P

'3

CsFL

*4 c+

[I:?

~

P H ~ 1p 8 : p~ no"* *6

3

In3

>

[#re

3

Transfer F number to Z.

Transfers F) to D1O.2046H (character code (S),

Converts failure detection number in Z into BCD and transfers it to 020. Dividesfailure detection number into 3 digits and stores them into 020 to D22. 3 Shifts 16 bits in D21 to the left by 8 bits. 1 ~ 2 1 ) Executes addition of values in 022 and 021. [I: 1 3 Logical addition of 3030H and D21 and stores the result into D21.

[':"

["@

"@ i

'

2

P

*5

Pulse for first F number display.

JJ

-

248, nl

N

I

09124 V

2 4 t.

I>

Manual reset pulse. CPLF H2 3 X9=manual reset input. Y69=PR and PRC execution flag. c l l 3 Add 1 to v.

n1

128.

CRB

H8

[.:I

Y21 c,,lc,pP!li:c, q

Transfers 021 data to D l l . Logical addition of 2030H and D20 [ # ? @ 3 data, and stores the result into 020. 1111

,

Transfers D20 data to 012.

*7 Ci,qI:IF

!e2e

*8

:pR j

,,I:IIIP

Transfers 2020H in blocks to 013 to

!

[ole

Y@C.CI

INC

[*38

3

[':I

3

L

:Guts failure detection number to Y60 with PR instruction. Executes PR instruction once.

Outputs comment relevantto F(O+Z) to Y60 with PRC instruction. D31 P

18'

3

3 11

3

Executes PRC instruction once.

Executes PR and PRC instructions alternately depending on conditions of TI, M20, and M21. Clears V data if D9124dV or D9124 = 0.

[>'rl24@ re

;:

TI

::

*10 Alternating timers.

C l R C U l T EN[)

(SP) indicates character code for space.

Page 41

/MELSEC

'7. PROGRAMMING

I Instruction Explanation I

I

.

. .

I

*I : ~ 0 ~ ~ 1 ~ 2 DIO 0 4 6 ...... 1 Transfers the character codes for space (H20) and "F" H46 to data register D l 0.

I

1

., , ,

I

"3: ( SFLP1 ~ 2 (1 ~ ............ 8 Shifts the value in D21 8 bits to the left (Example: D21 contains the data

8

, +

"2: DIS'I ~ 2 0 D1 ~ o I ' K ~...... Takes the three BCD coded digits in D20 and places the least significant in D20 the middle digit in ~ 2 and 1 the most significant in D22. The annunciator coil number digits have therefore been placed in three consecutive registers. (Example: For coil F123 the digits will be stored as follows, 3 i n D20, 2 in D21 and 1 in D22.)

.

0002. This step of the program will change that to 0200.)

I

J

. *4:(+'JD221D21) ,

.

. ,

............. Adds D22 and D21 and stores the result in D21. (Example: Contents of D21 is 0200, contents of 022 is 0001.

, .

This step of the program stores 0201 in D21.)

. _ *,5:

I W O R ~ ~ H ~ O ~ OI ...... ~ D ~Logical I addition of H30 to each digit in D21 to convert from BCD t o ASCll i ~ x a m ~ l eContents : of D21 is now H3231; i.e. ASCll code for 2 and 1)

/

*6: wORpI~ 2 0 3 (0 ~ 2 ( 0..... Logical addition of H2030 t o digits in D20 (Example: Contents of D20 is now H2033, i.e. ASCll code for space and 3.)

1

1

*7: ~ ~ 0 ~ ' ( " 2 0 2 0 ( ~...1 Transfers 3(~5 space codes H20 into each byte of the five word registers D l 3 to D1.7.

Page 42

/MELSEC

7. PROGRAMMING

1-

*8:

............. Outputs the 16 character codes from D l 0 to D l 7 to outputs Y60 to Y67 in A6FD compatible format.

- Character codes sourse Upper 8 bits

Lower 8 b~ts

-

- --h

CV

6 .

n

-

7 o

0

.

-

0

IIIIII o o , - ~ ~ o r n c ~ ~ o u , CVrnrnrnNb C

Order of transrn~ss~on

I

I

*9: PRC ( FOz( ~ 6 0........... Outputs the comment assigned to the appropriate F coil to.outputs Y60 to Y67 in A6FD compatible format. "10: T0,Tl flickercircuit ..... . Calls the PR and PRC instructions alternately.

Page 43

/MELSEC

7. PROGRAMMING,

I Program Operation I

.

..

I

FMOVP "2020

I D l 3 I K5 I

T I (10-second clock)

Y69 PR and PRC execution flags

\ \

!"d w D~splayof D9125 data

-,- - D~splayof D9126 data

POINT ] 1. When the PR instruction is executed data is transmitted starting from the lower byte of the source data head address. Similarly, the lower byte of the subsequent string of registers is transmitted before the upper byte. 2. Interlocks must be provided t o prevent the PR and PRC instructions from' being called simultaneouslv. 3. Alternating output is provided by T I (5-second clock). Interlocks are provided using the INC(P) and MOV(P) instructions so that the PR instruction is executed once during the OFF period of T I and the PRC instruction executed once during the ON period.