Difference between revisions of "Creating a Timestamp"

From ArcoWiki
Jump to: navigation, search
 
(2 intermediate revisions by one other user not shown)
Line 28: Line 28:
 
::::<code>OUTPUT/FA(Q),TA(CORTOL_1),TA(CORTOL_2),TA(CORTOL_3)</code>
 
::::<code>OUTPUT/FA(Q),TA(CORTOL_1),TA(CORTOL_2),TA(CORTOL_3)</code>
 
::<code>CLOSE/DID(OUT_FILE)
 
::<code>CLOSE/DID(OUT_FILE)
 +
 +
 +
[[it:Creazione di un Timestamp]]
 +
[[zh-cn:创建时间戳]]
 +
[[pt:Criando um Timestamp]]
 +
[[de:Erstellen eines Zeitstempels]]
 +
[[es:Creando una marca de tiempo]]
 +
[[en:Creating a Timestamp]]
 +
 +
[[Category:Dmis_Tutorial]]

Latest revision as of 13:57, 4 June 2018

This is used to create a unique timestamp inside a part program. Typically can be used to identify each execution/report with a unique file name.

$$Begin Example

DECL/CHAR,100, time_stamp
DECL/CHAR,200, STR3
DECL/CHAR,200, STR2

$$Assign the time_stamp

time_stamp = ASSIGN/ STIMESTAMP()

$$ Read the report folder of ARCO

STR2=ASSIGN/GETENV('ARCOREPORTFOLDER')

$$Create a Unique file name with time stamp at the end of the name

STR3=ASSIGN/CONCAT(str2,'output_',time_stamp,'.mea')

$$Create Dummy Point and Tolerances

F(q)=FEAT/POINT,CART,00,0,0,0,0,1
FA(q)=FEAT/POINT,CART,00,0,0,0,0,1
T(CORTOL_1)=TOL/CORTOL,XAXIS,-0.1000,0.1000
T(CORTOL_2)=TOL/CORTOL,YAXIS,-0.1000,0.1000
T(CORTOL_3)=TOL/CORTOL,ZAXIS,-0.1000,0.1000

$$Build the output

DID(OUT_FILE)=DEVICE/STOR,STR3
OPEN/DID(OUT_FILE),FDATA,V(TEXT),OUTPUT,OVERWR
OUTPUT/FA(Q),TA(CORTOL_1),TA(CORTOL_2),TA(CORTOL_3)
CLOSE/DID(OUT_FILE)