Let’s suppose that you have a Modbus station B.StationA, under which are I/O tags (measured points) with names like M.StatA* (e.g. M.StatA_speed, M.StatA_power, etc).
The procedure would be like this:
-
download rxfind tool (e.g. from RxFind - Regex Search and Replace Tool Download - SoftSea) which we will use for find/replace in XML files
-
XML export station + all the points (select them, right-click, choose XML Export) to some directory (e.g. D:\temp\StationA), copy also rxfind.exe here
-
remove UIDs from all XML files: run rxfind.exe in the directory StationA (from a command prompt)
rxfind.exe *.xml /B:2 “/P:<uid>.*</uid>” “/R:”
rxfind.exe *.xml /B:2 “/P:<uuid>.*</uuid>” “/R:”
-
copy this directory to StationB
-
rename the station and the files - run rxfind with appropriate arguments in StationB directory:
rxfind.exe *.xml /B:2 “/P:B.StationA” “/R:B.StationB”
rxfind.exe *.xml /B:2 “/P:M.StatA” “/R:M.StatB”
(note: the file names will not be changed, only the contents of files)
-
import the XML files from StationB directory via the Cnf tool (via menu Objects → XML Import)
repeat points 4-6 for StationC, D, etc.
Should you want to copy the station (e.g. StationD + points to a new line, e.g. L.NewLine, just edit XML file of StationD and change the <ParentId> item to a new line before import:
<ParentId>L.NewLine</ParentId>