Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ XR Connected Worker Template

Digital procedure execution

  • Last UpdatedJan 20, 2025
  • 3 minute read

The digital procedure functionality helps to execute digital procedures on the asset. The procedure can be implemented using animation clips. The sample template project have reference implementations of procedures using Animation Clips. You can find them in the project –GameData/Logic/User folder. Various approaches of implementing a procedure can be found in samples.

  • An AnimationClip for each step in the procedure. In this method, in each step the animation clip corresponding to the step will be invoked. The previous and next callbacks will invoke the correct animation clip based on the step count. A reference implementation can be found in Gamedata/Logic/user/apm_animStepClipsProc.xml.

  • Single AnimationClip for the entire procedure with different timeframe ranges for each steps. Here, all the steps will have same number of frames (for example, 30 frames for each step or 60 frames for each step). This frame range can be configured by user. Based on the step count, the previous and next callbacks will adjust and correctly map it to the start and end keyframes of the AnimationClip. A reference implementation is found in Gamedata/Logic/user/apm_animStepClipsProc.xml.

  • Fully scripted model. This method is not preferred. A reference implementation can be found here: Gamedata/Logic/user/apm_fullCustomProc.xml.

Code example

The following snippet in apm_data_sampleAsset.xml configures the parameters for the procedures.

<define name="sampleAsset.procedures" type="config" >

<item name="numberOfDropdowns" value="3" />

<struct name="dropdownList_0">

<item name="displayName" value="@lang:sampleAsset_proc_dropdownLabel_0@" />

<item name="entries" value="ExampleProc"/>

</struct>

<struct name="procedureMapping" >

<item name="numberOfMappings" value="1" />

<item name="rule_0" value="ExampleProc"/>

<item name="procedure_0" value="ExampleProcedure" />

</struct>

<struct name=" ExampleProcedure">

<item name="title" value="@lang:testProcedure1@"/>

<item name="numberOfSteps" value="3" />

<item name="setUpCallback" value="launch_ExampleProcedure" />

<item name="nextStepCallback" value="apm_crt_simpleAnimationClipEnginePlayStep" />

<item name="prevStepCallback" value="apm_crt_simpleAnimationClipEnginePlayStep" />

<item name="exitCallback" value="exit_ExampleProcedure" />

<item name="useAutomaticStepText" value="true" />

</struct>

</define>

Parameters

This table contains a list and descriptions of parameters.

Parameter

Description

numberOfDropdowns

Number of dropdown entries that should appear in the Procedure selection menu.

dropdownList_0::displayName

Display name of the dropdown UI element.

dropdownList_0::entries

Entries in this dropdown list.

procedureMapping

The procedureMapping define describes the mapping of dropdown entry to a particular procedure.

procedureMapping::numberOfMappings

Number of mappings. Typically, each dropdown entry maps to its procedure.

procedureMapping::rule_0

Description of rule_0 that corresponds to the dropdown list entry. Each rule will have a procedure mapping.

procedureMapping::procedure_0

The procedure that needs to be executed for rule_0.

testProcedure1

This contains the description of a single procedure. Procedure execution is based on the parameters configured in this define.

testProcedure1::title

The title of the procedure. This will appear on screen at the time of procedure execution.

testProcedure1::numberOfSteps

Number of steps involved in this procedure.

testProcedure1::setupCallback

The callback that will be called before executing the procedure. Basically, all the setup needed for the procedure goes here.

testProcedure1::exitCallback

The callback that will be called after executing the procedure. If you want to reset the items that was changed during the procedure, it can be done in this callback.

testProcedure1::nextStepCallback

The callback that will be called on pressing next in the procedure execution. The module has a basic implementation for next and previous steps.

testProcedure1::prevStepCallback

The callback that will be called on pressing back in the procedure execution. The module has a basic implementation for next and previous steps.

testProcedure1:: useAutomaticStepText

Set this to true if the description of each steps needs to be fetched from the lang entry. Lang entry should be in the following format for the procedure title and description.

<procedure_name>.step<step_no>.title, <procedure_name>.step<step_no>.description

Example:

Lang:testProcedure1.step0_title

Lang:testProcedure1.step0_description

If it is false, you need to manually set the title and description for each step. This can be done by setting the variable using <setfield> command.

<setfield name="apm_procStep_txt_title.text" value="title"/>

<setfield name="apm_procStep_txt_desc.text" value="description"/>

In This Topic
TitleResults for “How to create a CRG?”Also Available in