Overview

The DigitalTwin class is used to create digital twins during manufacturing. The twins may be made by simulation or by reading manufacturing results.

DrillAndFillStackup()

System::Int64 DrillAndFillTwin(
    System::Int64 ws_or_fea_id
);
System::Int64 DrillAndFillTwinStackUpAdd(
    System::Int64 twin_id,
    System::String^ measurement_state
);
System::Int64 DrillAndFillLayerAdd(
    System::Int64 stackup_id,
    System::Int64 product_id,
    double start_dist,
    double end_dist
)

The DrillandFillTwin() functions makes a Drill and Fill digital twin for a round hole feature. In this first release the twin can only contain data about the stackups in the twin.

The DrillandFillTwinStackUpAdd() functions starts a Stackup for a Drill and Fill digital twin. The measurement state must have one of the following values.

  • "designed" if the stackup will be computed using design data.
  • "prediction" if the stackup will be computed using planning data.
  • "measured" if the stackup will be computed using as-measured manufacturing data.

    The DrillandFillLayerAdd() functions adds a layer to a Stackup. The layer includes a reference to the material, the distance of the hole top from the start of the layer, and the distance of hole top from the bottom of the layer.

    Arguments

    ws_or_fea_id
    The identity of a workingstep or feature. If the identity of a workingstep is given then the process feature of that workingstep will be twinned.
    twin_id
    The identity of a Drill and Fill twin.
    measurement_state
    A string describing how the stackup is being measured..
    stackup_id
    The identity of the Drill and Fill stackup.
    product_id
    The identity of the product that defines the material of the layer.
    start_dist
    The distance from the top of the hole to the top of the layer.
    end_dist
    The distance from the top of the hole to the bottom of the layer.

    Related Functions

    Common Errors

    StackupCompute()/Drill()/FeatureFill()

    double StackupCompute()(
        System::Int64 stackup_id
    );
    double StackupDrill()(
        System::Int64 stackup_id
        double breakthru_increment,
        double tool_length_increment,
        double feed,
        double speed
    );
    double StackupFeatureFill(
        System::Int64 stackup_id,
    

    The StackupCompute() function computes the drill depths for the different layers in the stackup. The total depth of all the layers is returned. This total may not be the same as the sum of the layers because of gaps and overlaps.

    The StackupDrill() function makes a drilling operation for a stackup. The depth of the hole will be the same as the computed depth of the stackup. The drilling operation will continue for the breakthru_increment to ensure a clean finish. The operation will make a "virtual" drill for the operation which will have the diameter of the hole. The length of the tool will be the same as the computed depth of the stackup but with an increment added as defined by the tool_length_increment. The feed and speed of the drilling will be set to the given values.

    The StackupFeatureFill() function makes round hole features for the different layers in the stackup. The number of layers is returned. The depth of each feature is the computed depth. The diameter is the same as the twin prototype. The feature starts at the top of the layer, and ends at the bottom.

    Arguments

    stackup_id
    The identity of the Drill and Fill stackup.

    Related Functions

    Common Errors

    GetStackupComputedDepths()

    double GetStackupComputedDepth(
        System::Int64 stackup_id
    );
    System::String^ GetStackUpComputedDepthUnit(
        System::Int64 stackup_id
    );
    double SetStackupComputedDepth(
        System::Int64 stackup_id
    );
    

    The StackupDepths() functions return the depths computed for a stackup. There may be multiple depths for multiple measurement states.

    The ComputeStackupDepth() computes the depths of a stackup.

    The GetStackupComputedDepth() returns a previously computed depth for a stackup.

    The GetStackupComputedDepthUnit() returns the unit of the computed depth.

    The SetStackupComputedDepth() sets the computed depth for a stackup. This will override any previously compute depth and may create an inconsistency with the depths of the layers..

    Arguments

    stackup_id
    The identity of the Drill and Fill stackup.

    Related Functions

    Common Errors

    GetDrillAndFillTwin()

    System::Int64 GetDrillAndFillTwinCount(
    );
    System::Int64 GetDrillAndFillTwinNext (
       System::Int64 index
    );
    System::Collections::Generic::List^ GetDrillAndFillTwinAll(
    );
    

    The GetDrillandFillTwinXXX() functions return information about the Drill and Fill Twins in a project. In this first release this information consists of data about the stackups in the twin as discussed in the next section. There will be more when the DLL supports twinning of the fill operations.

    Arguments

    index
    An index to select each twin.

    Related Functions

    Common Errors

    GetDrillAndFillTwinStackup()

    System::Int64 GetDrillAndFillTwinStackUpCount(
        System::Int64 twin_id
    );
    System::Int64 GetDrillAndFillTwinStackupNext (
        System::Int64 twin_id,
        System::Int64 index
    );
    System::Collections::Generic::List^ GetDrillAndFillTwinStackUpAll(
        System::Int64 twin_id
    );
    System::String^ GetStackUpMeasurementState(
        System::Int64 stackup_id
    );
    System::Collections::Generic::List^ GetStackupProducts(
        System::Int64 stackup_id
    );
    System::Collections::Generic::List^ GetStackupStarts(
        System::Int64 stackup_id
    )'
    System::Collections::Generic::List^ GetStackupEnds(
        System::Int64 stackup_id
    );
    

    The GetDrillandFillTwinStackupXXX() functions return information about the Stackups in a Drill and Fill Twin. The stackups describe the depths of the holes drilled in an assembly. There is one layer in the stackup for each material being fastened.

    Many stackups can be measured for an assembly. The GetDrillAndTwinStackupCount/Next/All functions return the stackups. Each stackup has multiple layers which are returned by the GetDrillAndTwinLayerCount/Next/All functions.

    The GetDrillAndFillTwinStackupMeasurementState function returns the state of the stackup. The stackup state can be:

  • "designed" if the stackup was computed using design data.
  • "prediction" if the stackup was computed using planning data.
  • "measured" if the stackup was computed using as-measured manufacturing data.

    The GetStackupStarts function returns the distance to the start of each layer from the top of the hole.

    The GetStackupEnds function returns the distance to the end of each layer from the top of the hole.

    The GetStackupProducts function returns the product being fastened at each layer.

    Arguments

    twin_id
    The identity of a drill and fill twin.
    stackup_id
    The identity of a stackup in a drill and fill twin.
    index
    An index to select each stackup.

    Related Functions

    Common Errors

    GetDrillAndFillLayer()

    double GetDrillAndFillTwinLayerStart(
        System::Int64 stackup_id,
        System::Int64 index
    );
    System::String^ GetDrillAndFillTwinLayerStartUnit(
        System::Int64 stackup_id,
        System::Int64 index
    );
    double GetDrillAndFillTwinLayerEnd(
        System::Int64 stackup_id,
        System::Int64 index
    );
    System::String^ GetDrillAndFillTwinLayerEndUnit(
        System::Int64 stackup_id,
        System::Int64 index
    );
    System::Int64  GetDrillAndFillLayerUsage(
    	System::Int64 stackup_id,
    	System::Int64 index
    );
    System::Int64  GetDrillAndFillLayerFeature(
    	System::Int64 stackup_id,
    	System::Int64 index
    );
    void  GetDrillAndFillLayerFeatureSet(
    	System::Int64 stackup_id,
    	System::Int64 index
    );
    

    The GetDrillandFillTwinLayerXXX() functions return information about each layer in a stackup.

    The GetDrillAndFillTwinLayerStart function returns the distance to the start of each layer from the top of the hole.

    The GetDrillAndFillTwinLayerStartUnit function returns the unit of the start distance of each layer from the top of the hole.

    The GetDrillAndFillTwinLayerEnd function returns the distance to the end of each layer from the top of the hole.

    The GetDrillAndFillTwinLayerEndUnit function returns the unit of the end distance of each layer from the top of the hole.

    The GetDrillAnDFillTwinLayerUsage function returns the product being fastened at each layer.

    The GetDrillAnDFillTwinLayerFeature function returns the feature defined for the hole at this layer, if one has been set or computed.

    The DrillAnDFillTwinLayerFeatureSet function sets the feature for the hole at this layer.

    Arguments

    stackup_id
    The identity of a stackup in a drill and fill twin.
    index
    An index to select each layer.

    Related Functions

    Common Errors

    GetTwinOf()

    System::Int64 GetTwinOfWorkingstep(
        System::Int64 ws_id
    );
    System::Int64 GetTwinOfFeature(
        System::Int64 fea_id
    );
    System::Int64 GetTwinOfStackup(
        System::Int64 stackup_id
    );
    System::Int64 GetTwinOfPrototype (
       System::Int64 twin_id
    );
    System::Boolean HasTwin (
       System::Int64 ws_or_fea_id
    );
    System::Boolean HasDrillAndFillTwin (
       System::Int64 ws_or_fea_id
    );
    

    The GetTwinOfWorkingtep() function returns the twin of the process feature of a workingstep, if there is one.

    The GetTwinOfFeature() function returns the twin of a feature, if there is one.

    The GetTwinOfStackup() function returns the twin that owns a stackup.

    The GetTwinPrototype() function returns the feature that is the basis of a twin.

    The HasTwin() function returns true if the feature has a digital twin. The feature may be given as the process feature of a workingstep.

    The HasDrillAndFillTwin() function returns true if the feature has a drill and fill digital twin. The feature may be given as the process feature of a workingstep.

    Arguments

    ws_id
    identity of a workingstep.
    fea_id
    identity of a feature.
    stackup_id
    identity of a stackup.
    twin_id
    identity of a digital twin.
    ws_or_fea_id
    identity of a workingstep or feature.

    Related Functions

    Common Errors

    GetProcessTwinElapsedTime()/Seconds()

    System::String^ GetProcessTwinElapsedTime (
    	System::Int64 ex_id
    	);
    
    double GetProcessTwinElapsedTimeSeconds (
    	System::Int64 ex_id
    	);
    

    The GetProcessTwinElapsedTime() functions return the time required to complete the executable which can be a workingstep, workplan or other program structure.

    The GetProcessTwinElapsedTime() function return the time as a string in days, hours, minutes and seconds.

    The GetPrpcessTwinElapsedTimeSeconds() function return the time as seconds in a double value..

    GetTwinEnd()/Start()

    System::String^ GetProcessTwinStart (
    	System::Int64 ex_id
    	);
    
    System::String^ GetProcessTwinEnd (
    	System::Int64 ex_id
    	);
    

    The GetProcessTwinStart() function gets the start time of the given executable in ISO 8601 format.

    The GetProcessTwinEnd() 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

    Common Errors

    GetProcessTwinException()

    System::String^ GetProcessTwinException (
    	System::Int64 ex_id
    	);
    

    If set then the execution of the executable was judged to have terminated before completion for the given reason.

    GetProcessTwinSource()

    System::String^ GetProcessTwinSource (
    	System::Int64 ex_id
    	);
    

    The name of the machine that executed the executable. This is useful information if the program was run by mulitple machines (robots).

    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

    Common Errors

    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.

    TwinReset()

    System::String^ TwinReset (
    	System::Int64 ex_id,
    	);
    

    Set all the twin data in the process back to its initial state.

    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.