alielie
2025-03-23 40014e6e41f1ec017a07b7a620b3c700807d0519
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
<hb:PluginControl x:Class="Plugin.ServoManage.ServoManage"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:Plugin.ServoManage"
             mc:Ignorable="d" 
             xmlns:hb="clr-namespace:HMI.Base;assembly=HMI.Base"
             xmlns:uic="clr-namespace:HMI.UI.Converter;assembly=HMI.UI"
             xmlns:pw="https://opensource.panuon.com/wpf"
             xmlns:pu="https://opensource.panuon.com/wpf-ui"
             xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI"
             xmlns:cc="clr-namespace:HMI.Core;assembly=HMI.Core"
             Loaded="UserControl_Loaded"
             d:DesignHeight="450" d:DesignWidth="800">
    <UserControl.Resources>
        <Style x:Key="PrimaryButton" TargetType="Button" BasedOn="{StaticResource PrimaryButton}">
            <Setter Property="Padding" Value="15"/>
        </Style>
 
        <Style x:Key="LightBall" TargetType="Ellipse">
            <Setter Property="Height" Value="35"/>
            <Setter Property="Width" Value="35"/>
            <Setter Property="Fill" Value="{StaticResource Normal}"/>
            <Setter Property="Margin" Value="0,10,0,0"/>
            <Style.Triggers>
                <DataTrigger Binding="{Binding }" Value="1">
                    <Setter Property="Fill" Value="{StaticResource Ok}"/>
                </DataTrigger>
            </Style.Triggers>
        </Style>
 
        <Style x:Key="Desc" TargetType="Label">
            <Setter Property="Padding" Value="10,15"/>
            <Setter Property="MinWidth" Value="90"/>
            <Setter Property="FontSize" Value="14"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="BorderBrush" Value="#3a3a3a"/>
            <Setter Property="HorizontalContentAlignment" Value="Center"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
        </Style>
 
        <Style x:Key="ReadLabel" TargetType="Label" BasedOn="{StaticResource Desc}">
            <Setter Property="BorderThickness" Value="1,0,1,1"/>
            <Setter Property="Background" Value="LightGray"/>
        </Style>
 
        <Style x:Key="LabelText" TargetType="Label" BasedOn="{StaticResource Desc}">
            <Setter Property="BorderThickness" Value="1,0,1,1"/>
            <Setter Property="Cursor" Value="Hand"/>
        </Style>
 
        <Style x:Key="BDesc" TargetType="Label" BasedOn="{StaticResource Desc}">
            <Setter Property="Background" Value="#afeeee"/>
        </Style>
 
        <Style x:Key="YDesc" TargetType="Label" BasedOn="{StaticResource Desc}">
            <Setter Property="Background" Value="#ffff00"/>
        </Style>
 
        <Style TargetType="GroupBox">
            <Setter Property="Padding" Value="5"/>
        </Style>
    </UserControl.Resources>
 
    <Border Style="{StaticResource CardBoarder}">
        <Grid dp:GridHelper.Space="10">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
            </Grid.RowDefinitions>
 
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="7*"/>
                <ColumnDefinition Width="3*"/>
            </Grid.ColumnDefinitions>
 
            <DockPanel Grid.ColumnSpan="2">
                <StackPanel DockPanel.Dock="Right" Style="{StaticResource ButtonGroup}">
                    <Button Style="{StaticResource AddBtn}" x:Name="addServoBtn" Click="Button_Click"/>
                    <Button Style="{StaticResource RfhBtn}" x:Name="rfhServoBtn" Click="Button_Click"/>
                </StackPanel>
                <TextBlock Style="{StaticResource TitleBox}" Text="{DynamicResource svo.title}"/>
            </DockPanel>
 
            <DockPanel Grid.Row="2" Grid.ColumnSpan="2" Margin="0,10,0,0">
                <pu:Drawer DockPanel.Dock="Left" x:Name="DrwMenu" MinWidth="35" MaxWidth="400"
                           Padding="0"
                           ShadowColor="{x:Null}"
                           AnimationDuration="0" BorderThickness="2,0,0,2" BorderBrush="{StaticResource CommonBoarder}">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
 
                        <Border Grid.ColumnSpan="2" BorderThickness="2" BorderBrush="{StaticResource CommonBoarder}" Background="{StaticResource VerBar}">
                            <DockPanel Height="35">
                                <ToggleButton x:Name="drawerBtn" BorderThickness="0"
                  DockPanel.Dock="Right"
                  Background="Transparent"
                  Width="35" Height="35" HorizontalAlignment="Right"
                  RenderTransformOrigin="0.5,0.5"
                                              Foreground="{StaticResource PrimaryColorContract}"
                  FontFamily="{StaticResource iconfont}"
                  Content="&#xe60e;" IsChecked="{Binding IsOpen, ElementName=DrwMenu, Mode=TwoWay}">
                                    <ToggleButton.Style>
                                        <Style TargetType="ToggleButton" BasedOn="{StaticResource CommonToggle}">
                                            <Style.Triggers>
                                                <DataTrigger Binding="{Binding IsOpen, ElementName=DrwMenu}" Value="False">
                                                    <Setter Property="RenderTransform">
                                                        <Setter.Value>
                                                            <RotateTransform Angle="-90"/>
                                                        </Setter.Value>
                                                    </Setter>
                                                </DataTrigger>
                                                <DataTrigger Binding="{Binding IsOpen, ElementName=DrwMenu}" Value="True">
                                                    <Setter Property="Background" Value="Red"/>
                                                    <Setter Property="RenderTransform">
                                                        <Setter.Value>
                                                            <RotateTransform Angle="90"/>
                                                        </Setter.Value>
                                                    </Setter>
                                                </DataTrigger>
                                            </Style.Triggers>
                                        </Style>
                                    </ToggleButton.Style>
                                </ToggleButton>
 
                                <TextBlock Text="{DynamicResource svo.list}" FontSize="16" 
                                           Foreground="{StaticResource PrimaryColorContract}"
                                           VerticalAlignment="Center" HorizontalAlignment="Center"/>
                            </DockPanel>
                        </Border>
 
 
                        <Grid Grid.Row="1">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
 
                            <DataGrid Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource DefaultDataGrid}"
                                      IsReadOnly="False"
                                      SelectionMode="Single"
                                      BorderThickness="0"
                                      SelectedItem="{Binding SelectedServo}"
                                      ItemsSource="{Binding Servos}">
                                <DataGrid.Columns>
                                    <DataGridTemplateColumn Header="#" IsReadOnly="True" CanUserResize="False">
                                        <DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate>
                                                <TextBlock Text="{Binding Converter={StaticResource rowNumber},
RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGridRow},AncestorLevel=1}}"/>
                                            </DataTemplate>
                                        </DataGridTemplateColumn.CellTemplate>
                                    </DataGridTemplateColumn>
 
                                    <DataGridTextColumn IsReadOnly="True" Width="*" Binding="{Binding Name}">
                                        <DataGridTextColumn.Header>
                                            <TextBlock Text="{DynamicResource svo.name}"/>
                                        </DataGridTextColumn.Header>
                                    </DataGridTextColumn>
 
                                    <DataGridTemplateColumn Width="100" IsReadOnly="True" CanUserResize="False">
                                        <DataGridTemplateColumn.Header>
                                            <TextBlock Text="{DynamicResource App.Opt}"/>
                                        </DataGridTemplateColumn.Header>
 
                                        <DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate>
                                                <StackPanel Orientation="Horizontal" dp:StackPanelHelper.ChildSpace="10">
                                                    <Button x:Name="editServoBtn" Style="{StaticResource EditLink}"  DataContext="{Binding }"
Click="Button_Click"/>
                                                    <Button x:Name="delServoBtn" Style="{StaticResource DeleteLink}"
DataContext="{Binding }"
Click="Button_Click"/>
                                                </StackPanel>
                                            </DataTemplate>
                                        </DataGridTemplateColumn.CellTemplate>
                                    </DataGridTemplateColumn>
                                </DataGrid.Columns>
                            </DataGrid>
                        </Grid>
 
                        <Label Grid.Row="1" Grid.Column="1"  Width="100" Height="34"
                               VerticalContentAlignment="Center"
                               HorizontalContentAlignment="Center"
                                   Content="{DynamicResource svo.list}"
                                   FontSize="16">
                            <Label.LayoutTransform>
                                <RotateTransform CenterX="25" CenterY="25" Angle="270"/>
                            </Label.LayoutTransform>
 
                            <Label.Style>
                                <Style TargetType="Label">
                                    <Style.Triggers>
                                        <DataTrigger Binding="{Binding IsOpen, ElementName=DrwMenu,Mode=OneWay}" Value="True">
                                            <Setter Property="Visibility" Value="Collapsed"/>
                                        </DataTrigger>
                                        <DataTrigger Binding="{Binding IsOpen, ElementName=DrwMenu}" Value="False">
                                            <Setter Property="Visibility" Value="Visible"/>
                                        </DataTrigger>
                                    </Style.Triggers>
                                </Style>
                            </Label.Style>
                        </Label>
                    </Grid>
                </pu:Drawer>
 
                <Border BorderThickness="2" BorderBrush="{StaticResource CommonBoarder}">
                    <Grid dp:GridHelper.Space="10">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition/>
                        </Grid.RowDefinitions>
 
                        <DockPanel>
                            <StackPanel Style="{StaticResource ButtonGroup}" HorizontalAlignment="Left">
                                <!--<TextBlock Style="{StaticResource TitleBox}" 
                                           FontSize="{StaticResource ContentFontSize2}" 
                                           Text="{DynamicResource svo.product.model}"/>
                                <ComboBox x:Name="productInput" 
                                          IsEnabled="{Binding HasSelectedServo}"
                                          SelectedItem="{Binding SelectedProduct}"
                                          ItemsSource="{Binding ServoProducts}"
                                          DisplayMemberPath="Model"
                                          Style="{StaticResource FormComboxStyle}" MinWidth="180" />
 
                                <Button Style="{StaticResource AddBtn}" x:Name="addProductBtn" Click="Button_Click"/>
                                <Button Style="{StaticResource EditBtn}" x:Name="editProductBtn" Click="Button_Click"/>
                                <Button Style="{StaticResource RfhBtn}" x:Name="rfhProductBtn" Click="Button_Click"/>
                                <Button Style="{StaticResource DelBtn}" x:Name="delProductBtn" Click="Button_Click"/>-->
                            </StackPanel>
                        </DockPanel>
 
                        <Grid Grid.Row="1" dp:GridHelper.Space="10">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition/>
                            </Grid.RowDefinitions>
 
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
 
                            <GroupBox Header="{DynamicResource App.Opt}" Padding="10">
                                <Grid dp:GridHelper.Space="10">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                    </Grid.RowDefinitions>
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <Label 
                                            Style="{StaticResource BDesc}" MinWidth="80" Padding="0"
                                            Content="{DynamicResource svo.product.model}"/>
                                        <ComboBox Grid.Column="1"  x:Name="productInput" 
IsEnabled="{Binding HasSelectedServo}"
SelectedValue="{Binding SelectedProduct}"
ItemsSource="{Binding ServoProducts}"
SelectedValuePath="ProgramCode"
DisplayMemberPath="Model"
                                                  BorderThickness="0,1,1,1"
                                    FontSize="14"
                                    BorderBrush="Black"
Style="{StaticResource FormComboxStyle}" MinWidth="180" />
                                    </Grid>
 
                                    <Button Grid.Row="1" Style="{StaticResource PrimaryButton}"
                                            Content="{DynamicResource svo.debugMode}"/>
                                    <UniformGrid Grid.Row="2" Columns="2">
                                        <Button Margin="0,0,5,0" Tag="Enable" Click="Servo_Click">
                                            <Button.Style>
                                                <Style TargetType="Button" BasedOn="{StaticResource PrimaryButton}">
                                                    <Setter Property="Content" Value="{DynamicResource svo.enable}"/>
                                                    <Style.Triggers>
                                                        <DataTrigger Binding="{Binding Enable}" Value="1">
                                                            <Setter Property="Content" Value="{DynamicResource svo.disable}"/>
                                                        </DataTrigger>
                                                    </Style.Triggers>
                                                </Style>
                                            </Button.Style>
                                        </Button>
                                        <Button Style="{StaticResource PrimaryButton}"
 Margin="5,0,0,0" Content="{DynamicResource svo.reset}" Tag="Reset" Click="Servo_Click"/>
                                    </UniformGrid>
                                    <Button Grid.Row="3" Style="{StaticResource PrimaryButton}"
                                            Content="{DynamicResource svo.init}"
                                            Tag="Initialization" Click="Servo_Click"/>
                                    <Button Grid.Row="4" Style="{StaticResource PrimaryButton}"
                                            Content="{DynamicResource svo.stop}"
                                            Tag="Stop" Click="Servo_Click"/>
                                    <UniformGrid Grid.Row="5" Columns="3">
                                        <Button Style="{StaticResource PrimaryButton}"
                                                Content="{DynamicResource svo.JOG+}"
                                                Tag="JoGadd" Click="Servo_Click"/>
                                        <Label Style="{StaticResource LabelText}" MinWidth="90"
Margin="10,0,10,0"
BorderThickness="1" MouseLeftButtonUp="Label_MouseLeftButtonUp" Tag="JogVelocity" Content="{Binding JogVelocity}"/>
                                        <Button Style="{StaticResource PrimaryButton}"
                                                Content="{DynamicResource svo.JOG-}"
                                                Tag="JOGsub" Click="Servo_Click"/>
                                    </UniformGrid>
                                </Grid>
                            </GroupBox>
                            <StackPanel Grid.Column="1">
                                <GroupBox Header="{DynamicResource svo.position}">
                                    <Grid dp:GridHelper.Space="10">
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto"/>
                                            <RowDefinition Height="Auto"/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition/>
                                            <ColumnDefinition/>
                                            <ColumnDefinition/>
                                            <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
 
                                        <StackPanel>
                                            <Label Style="{StaticResource BDesc}" 
                                               Content="{DynamicResource svo.currentPosition}"/>
                                            <Label Style="{StaticResource ReadLabel}" Content="{Binding CurrentPosition}"/>
                                        </StackPanel>
 
                                        <StackPanel Grid.Column="1">
                                            <Label Style="{StaticResource BDesc}" 
                                               Content="{DynamicResource svo.currentSpeed}"/>
                                            <Label Style="{StaticResource ReadLabel}" Content="{Binding CurrentSpeed}"/>
                                        </StackPanel>
                                        <StackPanel Grid.Column="2">
                                            <Label Style="{StaticResource BDesc}" 
                                               Content="{DynamicResource svo.OverAcc}"/>
                                            <Label Style="{StaticResource LabelText}"
                                                   MouseLeftButtonUp="Label_MouseLeftButtonUp"
                                                   Tag="OverAcc"
                                                   Content="{Binding OverAcc}"/>
                                        </StackPanel>
                                        <StackPanel Grid.Column="3">
                                            <Label Style="{StaticResource BDesc}" 
                                                   Content="{DynamicResource svo.OverDec}"/>
                                            <Label Style="{StaticResource LabelText}"
                                                   MouseLeftButtonUp="Label_MouseLeftButtonUp" 
                                                   Tag="OverDec"
                                                   Content="{Binding OverDec}"/>
                                        </StackPanel>
 
                                        <StackPanel Grid.Row="1">
                                            <Label Style="{StaticResource BDesc}"
                                               Content="{DynamicResource svo.HMIPosition}"/>
                                            <Label Style="{StaticResource LabelText}" 
                                                   MouseLeftButtonUp="Label_MouseLeftButtonUp" 
                                                   Tag="HMIPosition" Content="{Binding HMIPosition}"/>
                                        </StackPanel>
 
                                        <StackPanel Grid.Row="1" Grid.Column="1">
                                            <Label Style="{StaticResource BDesc}"
                                               Content="{DynamicResource svo.HMISpeed}"/>
                                            <Label Style="{StaticResource LabelText}" 
                                                   MouseLeftButtonUp="Label_MouseLeftButtonUp" 
                                                   Tag="HMISpeed" 
                                                   Content="{Binding HMISpeed}"/>
                                        </StackPanel>
                                        <Button Grid.Row="1" Grid.Column="2" 
                                            Grid.ColumnSpan="2" 
                                            Style="{StaticResource PrimaryButton}"
                                            Tag="AbsExecute"
                                            Click="Servo_Click"
                                            Content="{DynamicResource svo.absExecute}"/>
                                    </Grid>
                                </GroupBox>
 
                                <GroupBox Header="{DynamicResource svo.inching}">
                                    <DockPanel>
                                        <Button DockPanel.Dock="Left" 
                                                Margin="0,0,10,0"
                                                Style="{StaticResource PrimaryButton}"
                                                Tag="Inch" Click="Servo_Click"
                                                Content="{DynamicResource svo.inching}"/>
                                        <Button DockPanel.Dock="Right"
                                                Tag="Dir" Click="Servo_Click">
                                            <Button.Style>
                                                <Style TargetType="Button" BasedOn="{StaticResource PrimaryButton}">
                                                    <Setter Property="Content" Value="{DynamicResource svo.forward}"/>
                                                    <Style.Triggers>
                                                        <DataTrigger Binding="{Binding Dir}" Value="1">
                                                            <Setter Property="Content" Value="{DynamicResource svo.backward}"/>
                                                        </DataTrigger>
                                                    </Style.Triggers>
                                                </Style>
                                            </Button.Style>
                                        </Button>
                                        <Label 
                                             Margin="0,0,10,0"
                                            Style="{StaticResource LabelText}" 
                                            MouseLeftButtonUp="Label_MouseLeftButtonUp"
                                            Tag="InchDistance"
                                            BorderThickness="1" Content="{Binding InchDistance}"/>
                                    </DockPanel>
                                </GroupBox>
                            </StackPanel>
 
                            <StackPanel Grid.Column="2" HorizontalAlignment="Center">
                                <GroupBox Header="{DynamicResource svo.alarm}">
                                    <StackPanel Style="{StaticResource ButtonGroup}">
                                        <StackPanel>
                                            <Label Style="{StaticResource YDesc}" 
                   Content="{DynamicResource svo.controlAlarm}"/>
                                            <Label Style="{StaticResource ReadLabel}" Content="{Binding AlarmCode}"/>
                                        </StackPanel>
                                        <StackPanel>
                                            <Label Style="{StaticResource YDesc}"
                   Content="{DynamicResource svo.driverAlarm}"/>
                                            <Label Style="{StaticResource ReadLabel}" Content="{Binding WarnCode}"/>
                                        </StackPanel>
                                        <StackPanel>
                                            <Label Style="{StaticResource YDesc}" 
                   Content="{DynamicResource svo.faultDriven}"/>
                                            <Label Style="{StaticResource ReadLabel}" Content="{Binding FaultCode}"/>
                                        </StackPanel>
                                    </StackPanel>
                                </GroupBox>
 
                                <GroupBox Header="{DynamicResource svo.limitSensor}">
                                    <StackPanel Style="{StaticResource ButtonGroup}">
                                        <StackPanel>
                                            <Label Style="{StaticResource YDesc}" 
                                                   Content="{DynamicResource svo.limit+}"/>
                                            <Ellipse Style="{StaticResource LightBall}" DataContext="{Binding PositiveLimit}" />
                                        </StackPanel>
 
                                        <StackPanel>
                                            <Label Style="{StaticResource YDesc}" 
                                                   Content="{DynamicResource svo.limit0}"/>
                                            <Ellipse Style="{StaticResource LightBall}" DataContext="{Binding HomeSwitch}" />
                                        </StackPanel>
                                        <StackPanel>
                                            <Label Style="{StaticResource YDesc}"
                                                   Content="{DynamicResource svo.limit-}"/>
                                            <Ellipse Style="{StaticResource LightBall}" DataContext="{Binding NegativeLimit}" />
                                        </StackPanel>
                                    </StackPanel>
                                </GroupBox>
                            </StackPanel>
 
                            <StackPanel Grid.Row="1" Grid.ColumnSpan="2">
                                <GroupBox Header="{DynamicResource svo.status}">
                                    <StackPanel Style="{StaticResource ButtonGroup}" HorizontalAlignment="Center">
                                        <StackPanel>
                                            <Label Style="{StaticResource YDesc}"
                                                   Content="{DynamicResource svo.enable}"/>
                                            <Ellipse Style="{StaticResource LightBall}" DataContext="{Binding AxisEnabled}"/>
                                        </StackPanel>
 
                                        <StackPanel>
                                            <Label Style="{StaticResource YDesc}"
                                                   Content="{DynamicResource svo.isReady}"/>
                                            <Ellipse Style="{StaticResource LightBall}" DataContext="{Binding ReadyOK}" />
                                        </StackPanel>
                                        <StackPanel>
                                            <Label Style="{StaticResource YDesc}"
                                                   Content="{DynamicResource svo.isRunning}"/>
                                            <Ellipse Style="{StaticResource LightBall}" DataContext="{Binding Running}" />
                                        </StackPanel>
                                        <StackPanel>
                                            <Label Style="{StaticResource YDesc}"
           Content="{DynamicResource svo.reOriginOk}"/>
                                            <Ellipse Style="{StaticResource LightBall}" DataContext="{Binding Homed}" />
                                        </StackPanel>
                                        <StackPanel>
                                            <Label Style="{StaticResource YDesc}"
                                                   Content="{DynamicResource svo.fault}"/>
                                            <Ellipse Style="{StaticResource LightBall}" DataContext="{Binding AxisError}" />
                                        </StackPanel>
                                        <StackPanel>
                                            <Label Style="{StaticResource YDesc}"
                                                   Content="{DynamicResource svo.axisAlarm}"/>
                                            <Ellipse Style="{StaticResource LightBall}" DataContext="{Binding AxisWarn}" />
                                        </StackPanel>
                                        <StackPanel>
                                            <Label Style="{StaticResource YDesc}"
                                                   Content="{DynamicResource svo.code}"/>
                                            <Label Style="{StaticResource ReadLabel}" Content="{Binding PosCode}"/>
                                        </StackPanel>
                                    </StackPanel>
                                </GroupBox>
                            </StackPanel>
                        </Grid>
                    </Grid>
                </Border>
            </DockPanel>
        </Grid>
    </Border>
</hb:PluginControl>