Difference between revisions of "Creating a Timestamp"

From ArcoWiki
Jump to: navigation, search
(Created page with "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. <code><span style="col...")
 
 
(3 intermediate revisions by one other user not shown)
Line 2: Line 2:
 
Typically can be used to identify each execution/report with a unique file name.
 
Typically can be used to identify each execution/report with a unique file name.
  
<code><span style="color: green; text-decoration: none;">$$Begin Example…</span><br/></code>
+
<code><span style="color: green; text-decoration: none;">$$Begin Example</span><br/></code>
 
::<code>DECL/CHAR,100, time_stamp</code>
 
::<code>DECL/CHAR,100, time_stamp</code>
 
::<code>DECL/CHAR,200, STR3</code>
 
::<code>DECL/CHAR,200, STR3</code>
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)