Exporting and importing NOVRAM Data

NOVRAM data from a device can be exported and reimported via the Automation Interface. Useful for production lines where device-specific data, such as calibration values, must be transferred to new devices.

The NOVRAM device appears as a NOV-DP-RAM node in the I/O configuration and is automatically detected and created during a regular device scan. The path in <ExportFile> and <ImportFile> refers to the file system of the computer on which the Automation Interface code is running. The exported file is then saved locally on the development computer. It must also be present there during import.

C# sample

ITcSmTreeItem device = sysManager.LookupTreeItem(@"TIID^Device 2 (NOV-DP-RAM)");

// Export NOVRAM content to file
device.ConsumeXml(@"
<TreeItem>
  <DeviceDef>
    <Dpram>
      <ExportFile>C:\novram_backup.xml</ExportFile>
    </Dpram>
  </DeviceDef>
</TreeItem>");

// Import NOVRAM content from file
device.ConsumeXml(@"
<TreeItem>
  <DeviceDef>
    <Dpram>
      <ImportFile>C:\novram_backup.xml</ImportFile>
    </Dpram>
  </DeviceDef>
</TreeItem>");

PowerShell sample

$device = $sysManager.LookupTreeItem("TIID^Device 2 (NOV-DP-RAM)")

# Export NOVRAM content to file
$device.ConsumeXml(@"
<TreeItem>
  <DeviceDef>
    <Dpram>
      <ExportFile>C:\novram_backup.xml</ExportFile>
    </Dpram>
  </DeviceDef>
</TreeItem>
"@)

# Import NOVRAM content from file
$device.ConsumeXml(@"
<TreeItem>
  <DeviceDef>
    <Dpram>
      <ImportFile>C:\novram_backup.xml</ImportFile>
    </Dpram>
  </DeviceDef>
</TreeItem>
"@)
Exporting and importing NOVRAM Data 1:

Available starting with TwinCAT Build 4018.10. The device must be accessible while it is running. The path in <ExportFile>/<ImportFile> is a file system path on the computer where TwinCAT Engineering is running and the Automation Interface code is being executed.