-
Notifications
You must be signed in to change notification settings - Fork 26
/
config-example.yml
155 lines (155 loc) · 7.19 KB
/
config-example.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
---
#
# system configuration section
#
system:
machine-disabled: &machine-disabled
enabled: !!bool false
machine-base: &machine-base
enabled: !!bool true
type: l99.driver.fanuc.FanucMachine, fanuc
strategy: l99.driver.fanuc.strategies.FanucMultiStrategy, fanuc
handler: l99.driver.fanuc.handlers.FanucOne, fanuc
json-transfer: &json-transfer
l99.driver.fanuc.handlers.FanucOne, fanuc:
transfer: JSON
JSON:
topic: "fanuc/{{machine.Id}}/{{veneer.Name}}{{if veneer.SliceKey}}/{{veneer.SliceKey}}{{end}}"
object-transfer: &object-transfer
l99.driver.fanuc.handlers.FanucOne, fanuc:
transfer: .
JSON:
topic: ""
default-influx-transformers: &default-influx-transformers
transformers:
SWEEP_END: "{{observation.name}},machine={{observation.machine}} online={{data.online}},healthy={{data.healthy}}"
l99.driver.fanuc.veneers.FocasPerf, fanuc: "{{observation.name}},machine={{observation.machine}} sweep_ms={{data.sweep_ms}}"
l99.driver.fanuc.veneers.SysInfo, fanuc: "{{observation.name}},machine={{observation.machine}},path={{observation.marker.number}} model=\"{{data.model}}\",cnc_type=\"{{data.cnc_type}}\",mt_type=\"{{data.mt_type}}\",series=\"{{data.series}}\",version=\"{{data.version}}\",axes={{data.axes}}"
l99.driver.fanuc.veneers.StateData, fanuc: "{{observation.name}},machine={{observation.machine}},path={{observation.marker.number}} poweron_min={{data.timers.poweron_min}},operating_min={{data.timers.operating_min}},cutting_min={{data.timers.cutting_min}},fovr={{data.override.feed}},rovr={{data.override.rapid}},sovr={{data.override.spindle}},tool={{data.modal.t}}"
l99.driver.fanuc.veneers.ProductionData, fanuc: "{{observation.name}},machine={{observation.machine}},path={{observation.marker.number}} program_name=\"{{data.program.name}}\",program_comment=\"{{data.program.comment}}\",program_modified={{data.program.modified}},pieces_produced={{data.pieces.produced}},pieces_produced_life={{data.pieces.produced_life}},pieces_remaining={{data.pieces.remaining}},cycle_time={{data.timers.cycle_time_ms}}"
l99.driver.fanuc.veneers.AlarmsSeries, fanuc: "{{for alarm in data.alarms}}{{observation.name}},machine={{observation.machine}},path={{observation.marker.number}} axis=\"{{alarm.axis}}\",type=\"{{alarm.type}}\",number={{alarm.number}},message=\"{{alarm.message}}\"\n{{end}}"
l99.driver.fanuc.veneers.OpMsgs, fanuc: "{{for msg in data.messages}}{{observation.name}},machine={{observation.machine}},path={{observation.marker.number}} position={{msg.position}},number={{msg.number}},message=\"{{msg.message}}\"\n{{end}}"
l99.driver.fanuc.veneers.AxisData, fanuc: "{{observation.name}},machine={{observation.machine}},path={{observation.marker[0].number}},axis={{observation.marker[1].name}} position_machine={{data.position.machine}},position_absolute={{data.position.absolute}},feed={{data.feed}},motion={{data.motion}},servo_temp={{data.servo_temp}},coder_temp={{data.coder_temp}},load={{data.load}},power={{data.power}},alarm_overtravel={{data.alarms.overtravel}},alarm_overheat={{data.alarms.overheat}},alarm_servo={{data.alarms.servo}}"
l99.driver.fanuc.veneers.SpindleData, fanuc: "{{observation.name}},machine={{observation.machine}},path={{observation.marker[0].number}},spindle={{observation.marker[1].name}} speed={{data.speed}},load={{data.load}},temperature={{data.temperature}},power={{data.power}}"
transport-base-mqtt: &transport-base-mqtt
transport: l99.driver.fanuc.transports.MQTT, fanuc
<< : *json-transfer
transport-base-influx: &transport-base-influx
transport: l99.driver.fanuc.transports.InfluxLP, fanuc
<< : *object-transfer
transport-base-shdr: &transport-base-shdr
transport: l99.driver.fanuc.transports.SHDR, fanuc
<< : *object-transfer
#
# user configuration section
#
user:
# focas sources
source-1: &source-1
# example fanuc source
l99.driver.fanuc.FanucMachine, fanuc:
sweep_ms: !!int 1000
net:
ip: 10.1.10.211
port: !!int 8193
timeout_s: !!int 3
source-2: &source-2
# example fanuc source
l99.driver.fanuc.FanucMachine, fanuc:
sweep_ms: !!int 1000
net:
ip: 172.16.13.100
port: !!int 8193
timeout_s: !!int 3
# collectors
collector-0: &collector-0
# example collector
l99.driver.fanuc.strategies.FanucMultiStrategy, fanuc:
- l99.driver.fanuc.collectors.ParameterDump, fanuc
- l99.driver.fanuc.collectors.DiagnosisDump, fanuc
- l99.driver.fanuc.collectors.PmcDump, fanuc
collector-1: &collector-1
# example collector
l99.driver.fanuc.strategies.FanucMultiStrategy, fanuc:
- l99.driver.fanuc.collectors.MachineInfo, fanuc
- l99.driver.fanuc.collectors.Alarms, fanuc
- l99.driver.fanuc.collectors.Messages, fanuc
- l99.driver.fanuc.collectors.StateData, fanuc
- l99.driver.fanuc.collectors.ProductionData, fanuc
#- l99.driver.fanuc.collectors.GCodeData, fanuc
- l99.driver.fanuc.collectors.AxisData, fanuc
- l99.driver.fanuc.collectors.SpindleData, fanuc
# targets
target-mqtt-1: &target-mqtt-1
# send to tcp mqtt broker
<< : *transport-base-mqtt
l99.driver.fanuc.transports.MQTT, fanuc:
enabled: !!bool true
net:
type: tcp
ip: 10.1.10.210
port: !!int 1883
anonymous: !!bool true
user:
password:
target-mqtt-2: &target-mqtt-2
# send to websocket mqtt broker
<< : *transport-base-mqtt
l99.driver.fanuc.transports.MQTT, fanuc:
enabled: !!bool true
net:
type: ws
ip: test.mosquitto.org
port: !!int 8080
anonymous: !!bool true
user:
password:
target-influx-1: &target-influx-1
# send to cloud influx instance
<< : *transport-base-influx
l99.driver.fanuc.transports.InfluxLP, fanuc:
<< : *default-influx-transformers
host: "https://region-x.influxdata.com"
token: "my-token"
org: "my-org"
bucket: "my-bucket"
target-shdr-1: &target-shdr-1
# open tcp socket for mtconnect agent
<< : *transport-base-shdr
l99.driver.fanuc.transports.SHDR, fanuc:
net:
port: !!int 7878
#
# runtime configuration section
#
machines:
# each machine must have a unique 'id' value
# each machine must consist of the following references:
# base: driver configuration
# *machine-base
# disabled override: (optional) set machine inactive
# *machine-disabled
# source: where to get data
# -- user defined reference
# collector: what data to collect
# -- user defined reference
# target: where to send data
# -- user defined reference
- id: example-mqtt
<< : *machine-base # base Fanuc configuration
<< : *machine-disabled # omit this machine setup from runtime; remove to make active
<< : *source-1 # where to get data
<< : *collector-1 # what data to get and how to transform data
<< : *target-mqtt-1 # where to send data
- id: example-influx
<< : *machine-base
<< : *machine-disabled
<< : *source-1
<< : *collector-1
<< : *target-influx-1
- id: example-shdr
<< : *machine-base
<< : *machine-disabled
<< : *source-1
<< : *collector-1
<< : *target-shdr-1