Make ASCII Time Text String: _CPU021_MakeAsciiTime

advertisement
_CPU021_MakeAsciiTime (1/1)
CPU
021
Make ASCII Time Text String: _CPU021_MakeAsciiTime
Basic
function
Symbol
Converts the present time to ASCII.
File name
Applicable
models
Conditions
for usage
Function
description
Application
example
Any bit
_CPU021_MakeAsciiTime
(BOOL)
(BOOL)
EN
ENO
(LWORD)
AsciiTime
Time in ASCII
Lib\FBL\omronlib\PLC\Card\_CPU021_MakeAsciiTime10.cxf
CPU Unit
CS1*-CPU**H Unit version 3.0 or higher
CJ1*-CPU**H Unit version 3.0 or higher
CJ1M-CPU** Unit version 3.0 or higher
CP1H
CP1L
CX-Programmer
Version 5.0 or higher
CPU Unit Time Functions
Unreliable values will be output if the CPU Unit’s internal clock is not stable, such as when the CPU Unit
is operated without a backup battery.
When the execution condition goes ON, this function outputs the present time (hour, minutes, and seconds)
in ASCII.
For example, the output would be #3133313534300000 at 13:15:40.
1) When bit A goes ON, the present time is output in ASCII to 4 words starting at D0.
2) A file is created with the present time as the file name.
1) Start Trigger
Bit A
_CPU021_MakeAsciiTime
(BOOL)
(BOOL)
EN
ENO
(LWORD)
AsciiTime
↑
Time (hr, min, s) in ASCII
D0
Present time = 13:15:40
2) Start Trigger
Bit A
↑
FB Busy Flag
Bit B
Directory name
#4142434400000000
File name
D0
Data storage area
P_DM
Data storage start address
&1000
Number of words to store
&100
Write mode
&0
_CARD411_WriteCSV
(BOOL)
EN
(LWORD)
DirName
(LWORD)
FileName
(WORD)
AreaID
(INT)
AreaNo
(UINT)
Num
(UINT)
OverWrite
Variable Tables
Input Variables
Name
EN
Variable name
EN
Data type
BOOL
Default
Output Variables
Name
ENO
Variable name
ENO
Data type
BOOL
Range
AsciiTime
LWORD
Time (hr, min, s) in
ASCII
Range
(BOOL)
ENO
(BOOL)
BUSY
(BOOL)
OK
(BOOL)
NG
Busy Flag
Bit B
Normal end
Bit C
Error end
Bit D
D3
#3133
Hour
D2
#3135
Minutes
D1
#4230
Seconds
D0
#0000
Description
1 (ON): FB started
0 (OFF): FB not started.
Description
1 (ON): FB processed normally.
0 (OFF): FB not processed or ended in an error.
Outputs the time in ASCII (always 8 characters).
n+3
#3132
Hour
n+2
#3135
Minutes
n+1
#3330
Seconds
n
#0000
Always #0000
Present time = 12:15:30
_CPU021_MakeAsciiTime (2/2)
Version History
Version
1.00
Date
2005.2.
Contents
Original production
Note
This manual is a reference that explains the function block functions.
It does not explain the operational limitations of Units, components, or combinations of Units and components. Always read
and understand the Operation Manuals for the system’s Units and other components before using them.
Download