Skip to content

Commit f49e954

Browse files
committed
upgrade example
1 parent 4c19f77 commit f49e954

File tree

8 files changed

+485
-414
lines changed

8 files changed

+485
-414
lines changed

static/examples/bouncing-ball-dark.svg

Lines changed: 47 additions & 47 deletions
Loading

static/examples/bouncing-ball-light.svg

Lines changed: 47 additions & 47 deletions
Loading

static/examples/cascade-subsystem-dark.svg

Lines changed: 84 additions & 68 deletions
Loading

static/examples/cascade-subsystem-light.svg

Lines changed: 84 additions & 68 deletions
Loading

static/examples/cascade-subsystem.json

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"version": "1.0.0",
33
"metadata": {
4-
"created": "2026-01-19T16:01:11.207Z",
5-
"modified": "2026-01-19T16:01:11.207Z",
4+
"created": "2026-01-19T22:45:20.066Z",
5+
"modified": "2026-01-19T22:45:20.066Z",
66
"name": "cascade-subsystem"
77
},
88
"graph": {
@@ -12,8 +12,8 @@
1212
"type": "StepSource",
1313
"name": "Setpoint",
1414
"position": {
15-
"x": 720,
16-
"y": 440
15+
"x": 740,
16+
"y": 470
1717
},
1818
"inputs": [],
1919
"outputs": [
@@ -65,14 +65,18 @@
6565
"Ki": "0.015/0.716",
6666
"Kd": "0",
6767
"f_max": "10"
68-
}
68+
},
69+
"pinnedParams": [
70+
"Ki",
71+
"Kp"
72+
]
6973
},
7074
{
7175
"id": "b449fb93-54e1-4cfd-862b-cbb66d919d91",
7276
"type": "Adder",
7377
"name": "Error-1",
7478
"position": {
75-
"x": 910,
79+
"x": 900,
7680
"y": 330
7781
},
7882
"inputs": [
@@ -113,7 +117,7 @@
113117
"type": "Adder",
114118
"name": "Error-2",
115119
"position": {
116-
"x": 1240,
120+
"x": 1270,
117121
"y": 340
118122
},
119123
"inputs": [
@@ -154,7 +158,7 @@
154158
"type": "PID",
155159
"name": "PI-2",
156160
"position": {
157-
"x": 1410,
161+
"x": 1460,
158162
"y": 340
159163
},
160164
"inputs": [
@@ -182,15 +186,19 @@
182186
"Ki": "0.244/0.134",
183187
"Kd": "0",
184188
"f_max": "10"
185-
}
189+
},
190+
"pinnedParams": [
191+
"Kp",
192+
"Ki"
193+
]
186194
},
187195
{
188196
"id": "40ac8e75-a709-4434-9001-63bc1d73106c",
189197
"type": "Subsystem",
190198
"name": "Plant",
191199
"position": {
192200
"x": 1330,
193-
"y": 410
201+
"y": 450
194202
},
195203
"inputs": [
196204
{
@@ -545,8 +553,8 @@
545553
"type": "Scope",
546554
"name": "Plant vs Setpoint",
547555
"position": {
548-
"x": 1020,
549-
"y": 500
556+
"x": 1040,
557+
"y": 540
550558
},
551559
"inputs": [
552560
{
@@ -577,8 +585,8 @@
577585
"type": "Scope",
578586
"name": "Err-1 and PI-1",
579587
"position": {
580-
"x": 1010,
581-
"y": 240
588+
"x": 990,
589+
"y": 200
582590
},
583591
"inputs": [
584592
{
@@ -609,8 +617,8 @@
609617
"type": "Scope",
610618
"name": "Err-2 and PI-2",
611619
"position": {
612-
"x": 1340,
613-
"y": 240
620+
"x": 1360,
621+
"y": 200
614622
},
615623
"inputs": [
616624
{
@@ -734,12 +742,12 @@
734742
{
735743
"id": "416e7281-7496-4b94-8c9f-ab802029d5e9",
736744
"position": {
737-
"x": 690,
738-
"y": 220
745+
"x": 700,
746+
"y": 180
739747
},
740748
"content": "# Cascade PI Controler\n\nThis example is a cascade controler. The plant is modeled as a **Subsystem**. Double click to enter.",
741-
"width": 230,
742-
"height": 115
749+
"width": 220,
750+
"height": 120
743751
}
744752
]
745753
},

static/examples/pid-subsystem-dark.svg

Lines changed: 76 additions & 65 deletions
Loading

static/examples/pid-subsystem-light.svg

Lines changed: 76 additions & 65 deletions
Loading

static/examples/pid-subsystem.json

Lines changed: 43 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"version": "1.0.0",
33
"metadata": {
4-
"created": "2026-01-19T22:25:14.633Z",
5-
"modified": "2026-01-19T22:25:14.633Z",
4+
"created": "2026-01-19T22:41:42.323Z",
5+
"modified": "2026-01-19T22:41:42.323Z",
66
"name": "pid-subsystem"
77
},
88
"graph": {
@@ -12,8 +12,8 @@
1212
"type": "StepSource",
1313
"name": "Setpoint",
1414
"position": {
15-
"x": 700,
16-
"y": 240
15+
"x": 710,
16+
"y": 480
1717
},
1818
"inputs": [],
1919
"outputs": [
@@ -28,16 +28,16 @@
2828
"params": {
2929
"amplitude": "[1, 0.5]",
3030
"tau": "[20+tau_1, 40+tau_2]",
31-
"_rotation": 1
31+
"_rotation": 0
3232
}
3333
},
3434
{
3535
"id": "error",
3636
"type": "Adder",
3737
"name": "Error",
3838
"position": {
39-
"x": 790,
40-
"y": 300
39+
"x": 820,
40+
"y": 410
4141
},
4242
"inputs": [
4343
{
@@ -66,15 +66,15 @@
6666
],
6767
"params": {
6868
"operations": "\"+-\"",
69-
"_rotation": 0
69+
"_rotation": 3
7070
}
7171
},
7272
{
7373
"id": "pid",
7474
"type": "PID",
75-
"name": "PID",
75+
"name": "PID Controler",
7676
"position": {
77-
"x": 1010,
77+
"x": 960,
7878
"y": 300
7979
},
8080
"inputs": [
@@ -100,15 +100,20 @@
100100
"Ki": "0.5",
101101
"Kd": "0.1",
102102
"f_max": "10"
103-
}
103+
},
104+
"pinnedParams": [
105+
"Kp",
106+
"Ki",
107+
"Kd"
108+
]
104109
},
105110
{
106111
"id": "scope",
107112
"type": "Scope",
108113
"name": "Setpoint vs Plant",
109114
"position": {
110-
"x": 810,
111-
"y": 460
115+
"x": 1340,
116+
"y": 180
112117
},
113118
"inputs": [
114119
{
@@ -129,16 +134,17 @@
129134
],
130135
"outputs": [],
131136
"params": {
132-
"_rotation": 0
137+
"_rotation": 3,
138+
"labels": "[\"plant\", \"setpoint\"]"
133139
}
134140
},
135141
{
136142
"id": "98bd8eae-5636-43fa-bdd8-0eace540da0b",
137143
"type": "Scope",
138144
"name": "Error",
139145
"position": {
140-
"x": 890,
141-
"y": 240
146+
"x": 820,
147+
"y": 180
142148
},
143149
"inputs": [
144150
{
@@ -151,16 +157,17 @@
151157
],
152158
"outputs": [],
153159
"params": {
154-
"_rotation": 3
160+
"_rotation": 3,
161+
"labels": "[\"err\"]"
155162
}
156163
},
157164
{
158165
"id": "367985a4-df42-46b1-97af-94302aaf3234",
159166
"type": "Subsystem",
160167
"name": "Plant",
161168
"position": {
162-
"x": 900,
163-
"y": 370
169+
"x": 1170,
170+
"y": 300
164171
},
165172
"inputs": [
166173
{
@@ -183,7 +190,7 @@
183190
}
184191
],
185192
"params": {
186-
"_rotation": 2
193+
"_rotation": 0
187194
},
188195
"graph": {
189196
"nodes": [
@@ -288,7 +295,8 @@
288295
"outputs": [],
289296
"params": {
290297
"t_wait": "0.0",
291-
"_rotation": 0
298+
"_rotation": 0,
299+
"labels": "[\"plant qty\"]"
292300
}
293301
}
294302
],
@@ -329,8 +337,8 @@
329337
"type": "Scope",
330338
"name": "Control Signal",
331339
"position": {
332-
"x": 1130,
333-
"y": 240
340+
"x": 1080,
341+
"y": 180
334342
},
335343
"inputs": [
336344
{
@@ -343,7 +351,8 @@
343351
],
344352
"outputs": [],
345353
"params": {
346-
"_rotation": 3
354+
"_rotation": 3,
355+
"labels": "[\"ctrl\"]"
347356
}
348357
}
349358
],
@@ -391,30 +400,30 @@
391400
"targetPortIndex": 0
392401
},
393402
{
394-
"id": "1586a2ba-ad23-41ed-8f6b-fda1f4af5841",
395-
"sourceNodeId": "setpoint",
403+
"id": "09fb7ca4-d71c-46dd-b4bf-95d7275f74b2",
404+
"sourceNodeId": "367985a4-df42-46b1-97af-94302aaf3234",
396405
"sourcePortIndex": 0,
397406
"targetNodeId": "scope",
398-
"targetPortIndex": 1
407+
"targetPortIndex": 0
399408
},
400409
{
401-
"id": "e2dba788-4f14-4fcb-90d0-168061d01d22",
402-
"sourceNodeId": "367985a4-df42-46b1-97af-94302aaf3234",
410+
"id": "bd75dcef-06d4-422d-b97f-a9e6a9149f75",
411+
"sourceNodeId": "setpoint",
403412
"sourcePortIndex": 0,
404413
"targetNodeId": "scope",
405-
"targetPortIndex": 0
414+
"targetPortIndex": 1
406415
}
407416
],
408417
"annotations": [
409418
{
410419
"id": "2e8245a1-8247-4527-acbe-11ffa83669c4",
411420
"position": {
412-
"x": 1120,
413-
"y": 310
421+
"x": 890,
422+
"y": 370
414423
},
415424
"content": "# PID Loop\n\nThe classic PID control loop. The plant is modeled as a subsystem, double click to view the internals.",
416-
"width": 200,
417-
"height": 115
425+
"width": 290,
426+
"height": 80
418427
}
419428
]
420429
},

0 commit comments

Comments
 (0)