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, $INFORMATIONFunc 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:
- AfterDevice Argument <ARD>is set up in theCommand Editor - Backupdialog box ofOptions dialog box: Custom Devices, specify the full path of a project that will be used to go online and upload from the device in theArgument (<ARD>)field of the asset properties dialog box.
- Specify theBackup LocationinOptions dialog box: Custom Devices, and then in theBackup Locationfield 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:
- AfterDevice Argument <ARD>is set up in theCommand Editor - Comparedialog box ofOptions dialog box: Custom Devices, specify the project name that will be compared with in theArgument (<ARD>)field of the asset properties dialog box.
- Specify theReport LocationinOptions dialog box: Custom Devices, and then in theReport Locationfield of the asset properties dialog box, enter a file name as the report file that will saved in the report location designated inOptions 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 theSuccess Return Codefield ofOptions 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