Omron SYSMAC CS Series Instruction & Reference Manual page 960

Hide thumbs Also See for SYSMAC CS Series:
Table of Contents

Advertisement

3. Instructions
Example Programming
This example records the daily production total (number of units produced) in D100 and D101 in 8-digit
hexadecimal. Every day at 23:00, the program converts the daily production total to BCD format and
appends the file LOG.TXT in the Memory Card's root directory.
Always ON Flag
#0023
W1.1
A343.15 A343.13
W1.0
926
ANDW
A352
#00FF
=
UP
KEEP
W0
W1.0
STR4
A353
D300
STR4
A352
D302
MOV
#2020
D303
BCDL
D100
W100
STR8
W100
D304
MOV
#5C4C
D200
MOV
#4F47
D201
MOV
#0000
D202
TWRIT
#1
&16
D200
D300
#0D0A
W0
Current date converted
to ASCII
Puts 2 spaces between
the date and data.
Converts the
D100, D101
day's production
total to BCD.
Converts the day's
W100, W101
BCD production
total to ASCII.
Directory: Root
Filename: LOG
Stores the ASCII data as a text file.
Output file: LOG.TXT
060329 00200000
060330 00010000
060331 00012345
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Daily production total
&12345 dec
#000012345 BCD
D304
#3030 hex
D305
#3031 hex
D306
#3233 hex
D307
#3435 hex

Advertisement

Table of Contents
loading

Table of Contents