The text of a manual · part 8 of 10
Programmable Controller User's Manual, External character display unit type A6FD: 7. PROGRAMMING, pages 44 to 51
Pages 44 to 51 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 44
/MELSEC
7. PROGRAMMING
(4) A6FD control without using the PR and PRC instructions (Also for use in remote It0 station) The 16 characters for display on the A6FD are stored in eight consecutive data registers and then moved onto a series of internal relays (M). These are moved to the appropriate outputs in batches of 8 bits (one character) and a strobe signal given. Program Concept
I nnunc~atorcol
Codes for I6 characters ar stored In consecut~vedat
(1) The 16 character codes are output one by one using the'MOV instruction. Note that the strobe signal must be given after the character code has been moved t o the outputs. Care must be taken to co-ordinate this with the link scan time when the A6FD is being used at a remote station.
Page 45
7. PROGRAMMING | MELSEC-AA
Program Example | al X8p2 H178, IPif 4148 H Display output command M148 “1 Converts 8 characters “A to H” into See CASC ABCDEFGH 0@ } ASCIt code and stores it into DO to D3. r CASC IJKLMNOP D4 = Converts 8 characters “| to P” into ASCII code and stores it into D4 to *2 07. r, thov be Ke {| Transfers ASCII code in DO to 4 ; L cMov D1 is H D7 registers to M. K L, tmMov 62 hf, | Data values in registers K4 DO = 4241H -, Mou 03 8 + D1 = 4443H Ké D2 = 4645H F nov D4 49 D3 = 4847H D4 = 4A49H L, tnoy DS Kee 9 pemampapih . D6 = 4E4DH F CHOU 06 ibs 4 D7 = SD7FH 7, - (MN0) D7? Mi1z2 # L CSET 4128 3 Display execution flag / Sets head number M130 of bit shift 7 CSET M136 4 for 1 character code output. a Pte M1, CRST 4128 3H Resets display execution flag. r Executes reset of final bit after shift LL {RST Mi46 3 execution. K - pap Mee TY, 8 Aly : _ High-speed timer TO = 50 (ms), T1 = 50 (ms), ASCII code output timing| K flicker circuit 81} Poy =, c}} > Strobe signal output timing timer eat ¥@68 21 Strobe output (Y68) *4 Pp K +e chi act it CRSFL M138. 17. 3 Bit shift for 1 character code output * K aq MUP! S cua? Ke $860 Lower 8 bits in DO “41H” ree ape -cnov” #8, b&ea a Upper 8 bits in DO “42H” rach yee, cnou? hte $860 3! Lower 8 bits in D1 “43H” P KZ Z 11 pth, CIMO M24 ¥e6@ Upper 8 bits in D1 “44H” PK K2 ait, cnoy” 842 46a H Lower 8 bits in D2 “45H” é P K2 K2 rzah ttl BE, - cnov 448 986@ H Upper 8 bits in D2 “46H” 3 PK? kz ; pret ye cuov #48 9866 H Lower 8 bits in D3 “47H” =| S 3 PRY kz bint pe -cuou’ Hs '486@ 3H Upper 8 bits in 03 “48H” | 2 7 K2 a so tee, cnou’ Res 5666 H Lower 8 bits in D4 “49H” 8 A k kg rage, cnov? h32 $460 4 Upper 8 bits in D4 “AAH” 2 KZ et “ ” isan ~cuau” hge Vase 3, Lower 8 bits in D5 “4BH 2 PK K reap te cua” KBe $86 H Upper 8 bits in DS “ACH” - ieee cnou’ hSe VS0@ } Lower 8 bits in D6 “4DH” Pk K oe ” pr2pehe, - CM (tls Nias ¥86@ 3 Upper 8 bits in D6 “4EH PK Z or » ” prs thee CHOU Kei Face 3 Lower 8 bits in D7 “4FH PK? ke rag te nou” Ktze ‘vea 3 Upper 8 bits in D7 “50H” CIRCUIT ENE
*1: Data in registers is indicated tn hexadecimal (H).
7-18
1B (NA) 66139-A
Page 46
/MELSEC
7. PROGRAMMING
I Instruction Explanation I "1 :
I ASCIABCDEFGH I DO] ... The ASC instruction coverts alphanumeric characters into ASCll code and stores it into four consecutive devices beginning with the one specified. (Instruction executlon)
( ASC ( ABCDEFGH 1 DO 1
Character codes shown i n hexadeclmal.
"2:
1 MOVIDO~
1
4 ..... ~ Transfers 0 the ASCll code bit pattern onto MO t o M I 5 (K4MO).
lnstructlon executlon
"3: Timers TO, TI, T2 ...... TO and T I time movement of the ASCll bit patterns to the outputs. T2 provides the strobe signal.
T2 coil TO contact
I I
-1
I I
I
T1 contact (NIC contact)
I
T2 contact I
/
ASCII character moved when contact 1s closed
*4: BSFL'(MI~O~ K17
-4-b 10rnsec
-4-b 10msec slgnal provlded -Strobe when contact IS closed
1 ... Shifts 17 bits starting at M I 3 0 one bit t o the left each time TO switches on. Used as a 1-character code sending flag.
Page 47
I
1
"5: MOVP]K ~ M O / K ~ Y ....~ Outputs one character code of K2MO ("41H" in lower 8 bits of DO) t o K2Y60. (Hexadecimal) ' Moves one character code from K2MO t o outputs Y60 -- Y67.
Instructton execution
For example, the display output timing for M I 3 1 is shown below. 0N MI31
OFF-
MI32
OFF
MoVp K2Mo MOVp(W Y60 to
I TO and TI.
K2y60] n'
1s executed o n c e ) (Instruct~onis executed once.)
ASCll code output (Character code) H
Y67 . -.
Y68
1
Controlled by h ~ g hspeed tlrners
-
Y68 Strobe s~gnal1
-
T2 (strobe output t ~ m e r ) A6FD ASCll code read tlrnlng
+++* 41H 42H
1
Strobe s ~ g n a lIS output after code (character code) is
I ACrii p ~ ~ ~ ~ d e d .
Page 48
/MELSEC
7. PROGRAMMING
I Program operation I X9 MI48 ASC ABCDEFGH ASC
1
I DO I
IJKLMNOP
0
D4
I DO I K4MO to MOV I D7 1 K4M112 MOV
"Operation execution complete
MI28
I
MI~O n
TO COII i u
U
I u u u u ~ u y i -
TO contact (50msec)
n o
T I coil T I contact (NIC contact) (50msec) T2 cod n m
T2 contact (50msec) Y60 to Y67 . (ASCII code output) Y68 (strobe signal)
n- n n n_n 10msec
POINT t i 3 7 u
U
I u u~
I-I-~ u-71 u u u u q ~ nn n n u
LL~
1 n k n n n n n n n _ l l n n n n n
I
1. The PR and PRC instruction cannot be used t o output data from a remote I10 station (owing t o the link scan and refresh times). The data output and strobe signals must therefore be controlled from- the sequence. program. 2. The ASC instruction allows alphanumeric character t o be converted into character codes. When other characters are t o be displayed, use the MOV instruction t o transfer the hex. code t o the source device. 3. Transmit the code for blank space (H20) t o character areas which are t o remain blank. 16 character codes must therefore always be transmitted even if the message is only 8 characters long for example. 4. Only use character codes listed i n Appendix 2.
Page 49
-
/MELSEC
7. PROGRAMMING 7.3 Programming Application Example 2 (For AOJZCPU)
A6FD control programs are different for the AOJ2CPU. he following example displays failure numbers generated when inputs are switched on. . . Program Con'cept
Any other F colls on,
,
'
D~splayof nest annunciator toll comment
*,:Pressing the A6FD manual reset button loads the next F coil number into D9090.
Page 50
/MELSEC
7. PROGRAMMING Program Example
0lq
I
14\80 CPLS CSEl
CPLS
Mi80
CPLS CSET
36 jKJtoflrespresent slgnal Inputs
CPLS
451 7
14\@0 failure
CPLS n\g0
CPLS
'PLS
F7
Dl
9 1 b =
H
D90031
CPLS CRST
ISlkl?"
1 0 5 k e r n a lInput for fallure number detection 119069 M l l 1 6 5 bH
0 K
DO
3
C
CPLS
P
R
C
FO
CPRC
F1
3
3
'
J j
Stores the flrst fallure number Into 09009. Stores the number of F colls whlch have been switched on nlOO 3
Resets M9009 as soon as failure IS removed M9009 (When fallure occurs, 1 1 ) M9009 turns on.)
CRS1
=
K 2
=
K 3
=
K 4
D O 3
CPRC
F2 CRST t
I
I =
K
5
DO
DO
'I
CRST CPRC
F4 r,RST
CPRC
F5
CRST CPRC
F6 ERST
=
!
DO
CPRC
F7
CRST
F2
Slnce the PRC lnstructlon In the AOJ2 IS not Yr120 leadlng edge triggered, ~3 3 . lt IS necessary to convert external inputs Into 3 pulses DO stores the current fallure number F4 This failure IS detected by the comparison ~ n ~ 8 2 03 structlon and the reF5 3 levant fallure number comment IS dlsplayed If 't020 other fallures exlst, resettlng the dlsplayed falF6 3 lure number stores the j'020 3 lowest fallure number Into D9009 (DO)
'
F7
3
Page 51
/MELSEC
7. PROGRAMMING
..
7.4 Display of Numerical Variables'
,,
Numerical values may be output using the method described in Section 7.2 (i.e splitting the number into digits and a d d i n g a ~ 3t 0 o each digit to change it to .ASCII). Where this is impractical the SWOGHP-UTLP-FN1 micro computer software package may be used to change numerical data to the equivilant ASCII string.
.
.
7-24
IB (NA) 66139-A