Overview
The DigitalTwin class is used to create digital twins during manufacturing. The twins may be made by simulation or by reading manufacturing results.
GetTwinEleapsedTime()/Seconds()
System::String^ GetTwinElapsedTime ( System::Int64 ex_id ); double GetTwinElapsedTimeSeconds ( System::Int64 ex_id );
The GetTwinElapsedTime() functions return the time required to complete the executable which can be a workingstep, workplan or other program structure.
The GetTwinElapsedTime() function return the time as a string in days, hours, minutes and seconds.
The GetTwinElapsedTimeSeconds() function return the time as seconds in a double value..
GetTwinEnd()/Start()
System::String^ GetTwinStart ( System::Int64 ex_id ); System::String^ GetTwinEnd ( System::Int64 ex_id );
The GetTwinStart() function gets the start time of the given executable in ISO 8601 format.
The GetTwinStart() function gets the end time of the given executable in ISO 8601 format.
Arguments
- ex_id
- The identity of an execuable which may be a workingstep, workplan or other program structure.
Related Functions
- GetTwinElapsedTime The time between GetTwinStart() and GetTwinEnd().
Common Errors
- Not an executable.
GetTwinException()
System::String^ GetTwinException ( System::Int64 ex_id );
If set then the execution of the executable was judged to have terminated before completion for the given reason.
GetTwinSource()
System::String^ GetTwinSource ( System::Int64 ex_id );
The name of the machine that executed the executable. If the program was run by mulitple machines then this may be useful iformation.
TwinProcessEnd()Start()Clear()
void TwinProcessStart ( System::Int64 ex_id, System::String^ source ); void TwinProcessStart ( System::Int64 ex_id, System::String^ source, System::String^ time_stamp ); void TwinProcessEnd ( System::Int64 ex_id ); void TwinProcessEnd ( System::Int64 ex_id, System::String^ time_stamp ); void TwinProcessClear ( System::Int64 ex_id );
The TwinProcessStart() function is used to record the start time of an executable. If a time is given then it must be in a format compatible with ISO 8601, If no time is given then the system clock will be used to compute the start time. The time may be set using a value taken from an MTConnect stream. If there are many machines, then the source sets the machine used to perform the execution.
The TwinProcessEnd() function is used to record the end time of an executable. If a time is given then it must be in a format compatible with ISO 8601, If no time is given then the system clock will be used to compute the start time. The time may be set using a value taken from an MTConnect stream.
The TwinProcessClear() function is used to clear the twinning data in an executable so that a machining process, or machining simulaton process, can be restarted.
Arguments
- ex_id
- The identity of an execuable which may be a workingstep, workplan or other program structure.
- source
- Optional string describing the machine executing the executable.
- time_stamp
- Time of the start or end in ISO 8610 compatible format.
Related Functions
- GetTwinStart/end Functions to return the start and end time.
Common Errors
- Not an executable.
TwinProcessException()
System::String^ TwinProcessException ( System::Int64 ex_id, System::String^ explanation );
If an error has been detected then give an explanation. The twin is not ended. If the function is called multiple times then only the last exception will be saved. Multi-line explanation strings may be used for more comples cases.
ReduceDrillingProcess()
System::String^ ReduceDrillingProcess ( );
Analyze the program to determine what drilling operations are not necessery because they already exist on the workpiece.
A reduced size tool is generated for each operation. If the tool does not remove any material then the operation is determined to be redundant and its workingstep is disabled.
The reduced sized tools are garbage collected when the file is saved, but not before.
The function can be applied to other types of processes but is likely to produce incorrect results.
TwinReset()
System::String^ TwinProcessException ( System::Int64 ex_id, );
Set all the data in the twin back to its initial state.