Skip to content

hilch/systemdump.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License: GPL v3 made-with-python Made For B&R

systemdump.py

create and load a system dump for B&R PLC from the command line.

The system dump collects diagnostics data about the PLC as an XML file. This XML file contains information about the running PLC project, eg.

and much more.

Furthermore a system dump can contain [logger, profiler, network command trace and some application information.

A system dump file can be created by function block SdmSystemDump() or by the System Diagnostics Manager

The contents of a system dump file can be viewed by Automation Studio or by SystemDumpViewer.

Intention

I regularly had to create lots of system dumps from multiple machines and was tired of always using the SDM webpage to do it. So I wrote this Python script to automate this work with e.g. a batchfile.

Installation

install Python from web page https://www.python.org/. I used the 3.9.6.

py -m pip install systemdumpy

Examples

create a dump and store it

py -m systemdumpy 192.168.0.100 -cuv -p MyCPU_

create a systemdump on 192.168.0.100
upload systemdump from 192.168.0.100
saving MyCPU_BuR_SDM_Sysdump_2021-07-09_11-51-55.tar.gz (2820986) bytes

delete the last systemdump from PLC

py -m systemdumpy 192.168.0.100 -dv

create an inventory list (*xlsx) from file

py -m systemdumpy BuR_SDM_Sysdump_2021-07-09_17-43-05.tar.gz -iv

usage

usage: systemdumpy [-h] [-c] [-n] [-u] [-d] [-p PREFIX] [-i] [-v] [--version] target

positional arguments:
  target                remote PLC IP address or name or systemdump file (*.targ.gz)

optional arguments:
  -h, --help            show this help message and exit
  -c, --create          create a dump on (remote) target
  -n, --nofiles         don't include data files (logger, NCT etc.)
  -u, --upload          upload from (remote) target and store to file
  -d, --delete          delete dump from target
  -p PREFIX, --prefix PREFIX
                        prepend this PREFIX for system dump filename after upload
  -i, --inventory       create a hardware inventory list (*.xlsx)
  -v, --verbose         show messages
  --version             show program's version number and exit

About

create and load a system dump for B&R PLC from the command line

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages