Detailed operation record of applications for Custom Devices

Usually, the operation details of applications for custom devices cannot be recorded by the FactoryTalk AssetCentre event log. The only available information is that whether the request has been sent to the application and whether its operation is completed. To have the event log capture more operation details, such as the operation and completion status, you need to adhere to the following while developing an application:
  • If the application is not developed with AutoIt, in its script you must define a PID return code that is C++ supported for FactoryTalk AssetCentre to recognize. If the application is developed with AutoIt, you don't need to define the PID return code.
  • The application must be 32-bit (x86) based.
  • The application script must include the specific definitions as shown with the following template:
Global Const Enum $ERROR, $WARNING, $INFORMATION
Func LogMessage($source, $severity, $message)
Local Const $strDll = "AssetCentre\CDPLogUtility.dll"
Local Const $strFunc = "LogMessage"
DllCall($strDll, "NONE", $strFunc, "Int", @AutoItPID, "wstr", $source, "Int", $severity, "wstr", $message)
EndFunc
  • Do the following for the backup application:
    • After
      Device Argument <ARD>
      is set up in the
      Command Editor - Backup
      dialog box of
      Options dialog box: Custom Devices
      , specify the full path of a project that will be used to go online and upload from the device in the
      Argument (<ARD>)
      field of the asset properties dialog box.
    • Specify the
      Backup Location
      in
      Options dialog box: Custom Devices
      , and then in the
      Backup Location
      field of the asset properties dialog box, specify a folder name, a new folder path, or leave it blank.
    • Make sure to use the exact path below to define where to save projects in the application script:
      C:\ProgramData\Rockwell\AssetCentre\TempDRFiles\Dr3rdPartyAgent\deviceDownload\tmpDevdownload
  • Do the following for the compare application:
    • After
      Device Argument <ARD>
      is set up in the
      Command Editor - Compare
      dialog box of
      Options dialog box: Custom Devices
      , specify the project name that will be compared with in the
      Argument (<ARD>)
      field of the asset properties dialog box.
    • Specify the
      Report Location
      in
      Options dialog box: Custom Devices
      , and then in the
      Report Location
      field of the asset properties dialog box, enter a file name as the report file that will saved in the report location designated in
      Options dialog box: Custom Devices
      .
    • Make sure to use the exact path below to define where to save the left compare partner in the application script:
      C:\ProgramData\Rockwell\AssetCentre\TempDRFiles\Dr3rdPartyAgent\CCU_backup
    • Make sure to use the exact path below to define where to save the right compare partner in the application script:
      C:\ProgramData\Rockwell\AssetCentre\TempDRFiles\Dr3rdPartyAgent\CCU_DeviceDownload
  • The success exit code indicating that the application is successfully closed after its operation must be defined in the script so that the schedule completion status can be recorded. After that, specify those codes in the
    Success Return Code
    field of
    Options dialog box: Custom Devices
    .
For additional information, refer to the Rockwell Automation Knowledgebase Document ID: QA43409 - Building Custom Devices for FactoryTalk AssetCentre Disaster Recovery using AutoIt Scripting Language .
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal