“Bearbeitungszentrum BAZ” - Single File¶
This example shows an entire BAZ setup expressed within a single commissioning file.
Download: bazSingleFile.yml
Note
The example below uses an additional Docker image provided by Cybus that requires a suitable license. You can check the current capabilities and permissions of your Connectware license in the Cybus Portal (https://portal.cybus.io). If your license is not eligible to use the example Docker image, please contact Cybus Sales (sales@cybus.io).
1description: >
2 Entire simulated machining demo setup
3
4metadata:
5
6 name: Simulated Machining Center
7 icon: https://www.cybus.io/wp-content/themes/cybus/img/product-slide-img.png
8 provider: cybus
9 homepage: https://www.cybus.io
10 version: 2.0.0
11
12parameters:
13
14 modbusPort:
15 type: integer
16 default: 10502
17 dockerBridgeNetworkIp:
18 type: string
19 default: 172.17.0.1
20 description: The IP address of the docker bridge network gateway, see "docker network inspect bridge"
21
22definitions:
23
24 CYBUS_MQTT_ROOT: cybus/baz-simulator
25
26 defaultModbusAddress:
27 fc: 3
28 length: 2
29 interval: 1000
30 dataType: uint16BE
31
32resources:
33
34 machineSimulator:
35 type: Cybus::Container
36 properties:
37 image: registry.cybus.io/cybus-services/baz-machine-simulator:0.0.1
38 ports:
39 - !sub '${modbusPort}:10502/tcp'
40
41 modbusConnection:
42 type: Cybus::Connection
43 properties:
44 protocol: Modbus
45 targetState: connected
46 connection:
47 host: !ref dockerBridgeNetworkIp
48 port: !ref modbusPort
49
50 currentState:
51 type: Cybus::Endpoint
52 properties:
53 protocol: Modbus
54 connection: !ref modbusConnection
55 subscribe:
56 !merge
57 defaultModbusAddress:
58 address: 0
59
60 currentTool:
61 type: Cybus::Endpoint
62 properties:
63 protocol: Modbus
64 connection: !ref modbusConnection
65 subscribe:
66 !merge
67 defaultModbusAddress:
68 address: 2
69
70 coolantLevel:
71 type: Cybus::Endpoint
72 properties:
73 protocol: Modbus
74 connection: !ref modbusConnection
75 subscribe:
76 !merge
77 defaultModbusAddress:
78 address: 4
79
80 spindleSpeed:
81 type: Cybus::Endpoint
82 properties:
83 protocol: Modbus
84 connection: !ref modbusConnection
85 subscribe:
86 !merge
87 defaultModbusAddress:
88 address: 6
89
90 spindleSpeedPoll:
91 type: Cybus::Endpoint
92 properties:
93 protocol: Modbus
94 connection: !ref modbusConnection
95 read:
96 !merge
97 defaultModbusAddress:
98 address: 6
99 dataType: floatBE
100
101 dashboard:
102 type: Cybus::Container
103 properties:
104 image: registry.cybus.io/cybus-services/baz-dashboard:0.2.3
105 volumes:
106 - !sub '${dashboardData}:/root/.node-red'
107 environment:
108 MQTT_HOST: !ref Cybus::MqttHost
109 MQTT_USER: !ref Cybus::MqttUser
110 MQTT_PASS: !ref Cybus::MqttPassword
111 MQTT_PORT: !ref Cybus::MqttPort
112 HTTP_ROOT: /
113
114 dashboardData:
115 type: Cybus::Volume
116
117 dashboardRoute:
118 type: Cybus::IngressRoute
119 properties:
120 container: !ref dashboard
121 type: http
122 slug: dashboard
123 target:
124 path: /
125 port: 1880
126
127 dashboardLink:
128 type: Cybus::Link
129 properties:
130 ingressRoute: !ref dashboardRoute
131 href: ui/
132 name: Dashboard
133
134 cybusLearnLink:
135 type: Cybus::Link
136 properties:
137 href: https://learn.cybus.io
138 name: Learn More
139
140 mapping:
141 type: Cybus::Mapping
142 properties:
143 mappings:
144 - subscribe:
145 endpoint: !ref currentState
146 publish:
147 topic: !sub '${CYBUS_MQTT_ROOT}/current-state'
148 - subscribe:
149 endpoint: !ref currentTool
150 publish:
151 topic: !sub '${CYBUS_MQTT_ROOT}/current-tool'
152 - subscribe:
153 endpoint: !ref coolantLevel
154 publish:
155 topic: !sub '${CYBUS_MQTT_ROOT}/coolant-level'
156 - subscribe:
157 endpoint: !ref spindleSpeed
158 publish:
159 topic: !sub '${CYBUS_MQTT_ROOT}/spindle-speed'
160 - subscribe:
161 topic: test/spindle/req
162 publish:
163 endpoint: !ref spindleSpeedPoll
164 - subscribe:
165 endpoint: !ref spindleSpeedPoll
166 publish:
167 topic: test/spindle/res