Add config-based database conversion.
This commit is contained in:
66
extensions/factorytalk/macro/unit_macro.yaml
Normal file
66
extensions/factorytalk/macro/unit_macro.yaml
Normal file
@@ -0,0 +1,66 @@
|
||||
$schema: ../../../src/AuDage/extensions/assets/schema.yaml
|
||||
format:
|
||||
name: csv
|
||||
sep: " "
|
||||
header: false
|
||||
index: false
|
||||
extension: mcr
|
||||
quoting: 3 # No automatic quoting
|
||||
quotechar: null
|
||||
escapechar: null
|
||||
export:
|
||||
encoding: cp1252
|
||||
import:
|
||||
columns:
|
||||
command:
|
||||
type: str
|
||||
const: "&set"
|
||||
tagname:
|
||||
type: str
|
||||
translate:
|
||||
columns: tagname
|
||||
operations:
|
||||
- operation: radd
|
||||
arg: Units.$plc$.PLC.
|
||||
value:
|
||||
type: str
|
||||
translate:
|
||||
columns: tagname
|
||||
operations:
|
||||
- operation: replace
|
||||
pattern: '^WA3252_[A-Z]+_\d+_\d+[A-Z]?_?([A-Z]+)?\d?.*'
|
||||
repl: '"\1"'
|
||||
- operation: replace
|
||||
pattern: '"AI"'
|
||||
repl: '"PPM"'
|
||||
- operation: replace
|
||||
pattern: '"FI"'
|
||||
repl: '"GPM"'
|
||||
- operation: replace
|
||||
pattern: '"LI"'
|
||||
repl: '"FT"'
|
||||
- operation: replace
|
||||
pattern: '"PI"'
|
||||
repl: '"PSI"'
|
||||
- operation: replace
|
||||
pattern: '"SI"'
|
||||
repl: '"%"'
|
||||
- operation: replace
|
||||
pattern: '"TI"'
|
||||
repl: '"°F"'
|
||||
- operation: replace
|
||||
pattern: '"VI"'
|
||||
repl: '"IN/S"'
|
||||
- operation: replace
|
||||
pattern: '("ZI"|"")'
|
||||
repl: '"%"'
|
||||
export:
|
||||
tagname:
|
||||
translate:
|
||||
columns: tagname
|
||||
type:
|
||||
const: ""
|
||||
address:
|
||||
const: ""
|
||||
comment:
|
||||
const: ""
|
||||
Reference in New Issue
Block a user