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
|
# -*- Gnuplot -*-
set datafile separator comma
set key outside
set grid
set term pngcairo size 1400,900 enhanced font "Arial,12"
csv = "motion.csv"
# ------------------------------------------------------------
# 1. Траектория XY
# ------------------------------------------------------------
set output "plot_xy.png"
set title "XY trajectory"
set xlabel "X, mm"
set ylabel "Y, mm"
set size ratio -1
plot csv using 3:4 with lines title "trajectory"
# ------------------------------------------------------------
# 2. Скорость вдоль траектории
# ------------------------------------------------------------
set output "plot_velocity.png"
set title "Path velocity"
set xlabel "t, s"
set ylabel "v, mm/s"
set autoscale
set size noratio
plot csv using 1:5 with lines title "v"
# ------------------------------------------------------------
# 3. Тангенциальное ускорение
# ------------------------------------------------------------
set output "plot_tangential_acceleration.png"
set title "Tangential acceleration"
set xlabel "t, s"
set ylabel "a_t, mm/s^2"
plot csv using 1:6 with lines title "a_t"
# ------------------------------------------------------------
# 4. Нормальное ускорение
# ------------------------------------------------------------
set output "plot_normal_acceleration.png"
set title "Normal acceleration"
set xlabel "t, s"
set ylabel "a_n, mm/s^2"
plot csv using 1:9 with lines title "a_n"
# ------------------------------------------------------------
# 5. Полное ускорение
# ------------------------------------------------------------
set output "plot_acceleration_abs.png"
set title "Acceleration magnitude"
set xlabel "t, s"
set ylabel "|a|, mm/s^2"
plot csv using 1:10 with lines title "|a|"
# ------------------------------------------------------------
# 6. Тангенциальный рывок
# ------------------------------------------------------------
set output "plot_tangential_jerk.png"
set title "Tangential jerk"
set xlabel "t, s"
set ylabel "j_t, mm/s^3"
plot csv using 1:7 with lines title "j_t"
# ------------------------------------------------------------
# 7. Полный векторный рывок
# ------------------------------------------------------------
set output "plot_jerk_abs.png"
set title "Jerk magnitude"
set xlabel "t, s"
set ylabel "|j|, mm/s^3"
plot csv using 1:11 with lines title "|j|"
# ------------------------------------------------------------
# 8. Осевые скорости
# ------------------------------------------------------------
set output "plot_axis_velocity.png"
set title "Axis velocities"
set xlabel "t, s"
set ylabel "velocity, mm/s"
plot csv using 1:12 with lines title "v_x", \
csv using 1:13 with lines title "v_y"
# ------------------------------------------------------------
# 9. Осевые ускорения
# ------------------------------------------------------------
set output "plot_axis_acceleration.png"
set title "Axis accelerations"
set xlabel "t, s"
set ylabel "acceleration, mm/s^2"
plot csv using 1:14 with lines title "a_x", \
csv using 1:15 with lines title "a_y"
# ------------------------------------------------------------
# 10. Осевые рывки
# ------------------------------------------------------------
set output "plot_axis_jerk.png"
set title "Axis jerks"
set xlabel "t, s"
set ylabel "jerk, mm/s^3"
plot csv using 1:16 with lines title "j_x", \
csv using 1:17 with lines title "j_y"
# ------------------------------------------------------------
# 11. Состояние лазера
# ------------------------------------------------------------
set output "plot_laser.png"
set title "Laser state"
set xlabel "t, s"
set ylabel "laser_on"
set yrange [-0.2:1.2]
plot csv using 1:22 with steps title "laser_on"
# ------------------------------------------------------------
# 12. Индекс блока
# ------------------------------------------------------------
set output "plot_block_index.png"
set title "Motion block index"
set xlabel "t, s"
set ylabel "block_index"
set autoscale y
plot csv using 1:23 with steps title "block_index"
|