将Feature/XP.Common和Feature/XP.Hardware分支合并至Develop/XP.forHardwareAndCommon,完善XPapp注册和相关硬件类库通用类库功能。
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<appSettings>
|
||||
<!-- 语言配置 可选值: ZhCN, ZhTW, EnUS | Language Configuration -->
|
||||
<add key="Language" value="ZhCN" />
|
||||
|
||||
<!-- Serilog 日志配置 | Serilog Logging Configuration -->
|
||||
<add key="Serilog:LogPath" value="D:\XplorePlane_PLCSentry\Logs" />
|
||||
<add key="Serilog:MinimumLevel" value="Debug" />
|
||||
<add key="Serilog:EnableConsole" value="true" />
|
||||
<add key="Serilog:RollingInterval" value="Day" />
|
||||
<add key="Serilog:FileSizeLimitMB" value="100" />
|
||||
<add key="Serilog:RetainedFileCountLimit" value="365" />
|
||||
|
||||
<!-- PLC 配置 | PLC Configuration -->
|
||||
<add key="Plc:IpAddress" value="192.168.0.1" />
|
||||
<add key="Plc:Port" value="102" />
|
||||
<add key="Plc:Rack" value="0" />
|
||||
<add key="Plc:Slot" value="1" />
|
||||
<!-- PlcType 可选值: S200Smart, S300, S400, S1200, S1500 | PlcType Available values -->
|
||||
<add key="Plc:PlcType" value="S1200" />
|
||||
<!-- 数据块配置 | Data Block Configuration -->
|
||||
<add key="Plc:ReadDbBlock" value="DB31" />
|
||||
<add key="Plc:WriteDbBlock" value="DB31" />
|
||||
<add key="Plc:ReadStartAddress" value="0" />
|
||||
<add key="Plc:ReadLength" value="200" />
|
||||
<!-- 批量读取周期(毫秒)| Bulk read interval (ms) -->
|
||||
<add key="Plc:BulkReadIntervalMs" value="250" />
|
||||
<!-- 超时配置 | Timeout Configuration -->
|
||||
<add key="Plc:ConnectTimeoutMs" value="3000" />
|
||||
<add key="Plc:ReadTimeoutMs" value="1000" />
|
||||
<add key="Plc:WriteTimeoutMs" value="1000" />
|
||||
<!-- 自动重连 | Auto Reconnection -->
|
||||
<add key="Plc:bReConnect" value="true" />
|
||||
|
||||
<!-- 信号定义文件路径(相对于应用程序目录)| Signal definition file path (relative to app directory) -->
|
||||
<add key="Sentry:PlcAddrDfnPath" value="PlcAddrDfn.xml" />
|
||||
</appSettings>
|
||||
</configuration>
|
||||
@@ -0,0 +1,9 @@
|
||||
<prism:PrismApplication x:Class="XP.Hardware.PLC.Sentry.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:prism="http://prismlibrary.com/"
|
||||
DispatcherUnhandledException="App_DispatcherUnhandledException">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
</prism:PrismApplication>
|
||||
@@ -0,0 +1,205 @@
|
||||
using Prism.Ioc;
|
||||
using Prism.Modularity;
|
||||
using Prism.Unity;
|
||||
using Serilog;
|
||||
using System;
|
||||
using System.Resources;
|
||||
using System.Windows;
|
||||
using XP.Common.Configs;
|
||||
using XP.Common.Localization;
|
||||
using XP.Common.Localization.Interfaces;
|
||||
using XP.Common.Logging;
|
||||
using XP.Common.Logging.Implementations;
|
||||
using XP.Common.Logging.Interfaces;
|
||||
using XP.Hardware.Plc.Abstractions;
|
||||
using XP.Hardware.Plc.Core;
|
||||
using XP.Hardware.Plc.Services;
|
||||
using XP.Hardware.PLC.Configs;
|
||||
using XP.Hardware.PLC.Helpers;
|
||||
using XP.Hardware.PLC.Services;
|
||||
using XP.Hardware.PLC.Sentry.Views;
|
||||
using XP.Hardware.PLC.Views;
|
||||
|
||||
namespace XP.Hardware.PLC.Sentry
|
||||
{
|
||||
/// <summary>
|
||||
/// PLC Sentry Monitor 应用程序入口 | PLC Sentry Monitor application entry point
|
||||
/// </summary>
|
||||
public partial class App : PrismApplication
|
||||
{
|
||||
/// <summary>
|
||||
/// 应用程序日志实例(带模块上下文)| Application logger instance (with module context)
|
||||
/// </summary>
|
||||
private ILogger _logger => Log.ForContext("SourceContext", "XP.Hardware.PLC.Sentry");
|
||||
|
||||
/// <summary>
|
||||
/// 创建主窗口 | Create main shell window
|
||||
/// </summary>
|
||||
protected override Window CreateShell()
|
||||
{
|
||||
return Container.Resolve<SentryMainWindow>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 注册类型到依赖注入容器 | Register types to DI container
|
||||
/// </summary>
|
||||
protected override void RegisterTypes(IContainerRegistry containerRegistry)
|
||||
{
|
||||
// === 注册 XP.Common 基础服务 | Register XP.Common base services ===
|
||||
containerRegistry.RegisterSingleton<ILoggerService, SerilogLoggerService>();
|
||||
|
||||
// === 注册 PLC 核心服务(复用 PLCModule 的注册模式)| Register PLC core services (reuse PLCModule registration pattern) ===
|
||||
// IPlcClient 瞬态注册,每次 Resolve 创建独立实例,避免并发竞争
|
||||
// IPlcClient registered as transient, each Resolve creates independent instance to avoid contention
|
||||
containerRegistry.Register<IPlcClient, S7PlcClient>();
|
||||
|
||||
// PlcService 单例(依赖:IPlcClient, ILoggerService, XmlSignalParser)
|
||||
// PlcService singleton (deps: IPlcClient, ILoggerService, XmlSignalParser)
|
||||
containerRegistry.RegisterSingleton<PlcService>();
|
||||
|
||||
// IPlcService 接口映射到同一个 PlcService 单例 | IPlcService interface maps to same PlcService singleton
|
||||
containerRegistry.Register<IPlcService>(c => c.Resolve<PlcService>());
|
||||
|
||||
// 配置加载器(瞬态)| Configuration loader (transient)
|
||||
containerRegistry.Register<PLC.Configs.ConfigLoader>();
|
||||
|
||||
// XML 信号解析器(瞬态)| XML signal parser (transient)
|
||||
containerRegistry.Register<XmlSignalParser>();
|
||||
|
||||
// PLC 写入队列单例(依赖:IPlcClient, ILoggerService)| PLC write queue singleton
|
||||
containerRegistry.RegisterSingleton<PlcWriteQueue>();
|
||||
|
||||
// 信号数据交互服务单例(依赖:PlcService, PlcWriteQueue, IPlcClient, ILoggerService)
|
||||
// Signal data service singleton
|
||||
containerRegistry.RegisterSingleton<ISignalDataService, SignalDataService>();
|
||||
|
||||
// === 注册 PLC 已有窗口 | Register existing PLC windows ===
|
||||
containerRegistry.Register<PlcAddrConfigEditorWindow>();
|
||||
containerRegistry.Register<PLC.ViewModels.PlcAddrConfigEditorViewModel>();
|
||||
|
||||
// === 注册 Sentry 视图和 ViewModel | Register Sentry views and ViewModels ===
|
||||
containerRegistry.Register<SentryMainWindow>();
|
||||
containerRegistry.Register<Sentry.ViewModels.SentryMainViewModel>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 配置模块目录 | Configure module catalog
|
||||
/// </summary>
|
||||
protected override void ConfigureModuleCatalog(IModuleCatalog moduleCatalog)
|
||||
{
|
||||
// 注册通用模块(提供本地化、Dump 等基础服务)| Register common module (provides localization, dump, etc.)
|
||||
moduleCatalog.AddModule<XP.Common.Module.CommonModule>();
|
||||
|
||||
base.ConfigureModuleCatalog(moduleCatalog);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 应用程序启动 | Application startup
|
||||
/// </summary>
|
||||
protected override void OnStartup(StartupEventArgs e)
|
||||
{
|
||||
// 尽早注册非托管异常捕获 | Register unmanaged exception handler early
|
||||
AppDomain.CurrentDomain.UnhandledException += (s, args) =>
|
||||
{
|
||||
var ex = args.ExceptionObject as Exception;
|
||||
try
|
||||
{
|
||||
_logger.Fatal(ex, "检测到未处理异常(IsTerminating={IsTerminating})| Unhandled exception detected (IsTerminating={IsTerminating})", args.IsTerminating);
|
||||
Log.CloseAndFlush();
|
||||
|
||||
// 向用户显示友好的错误提示 | Show friendly error message to user
|
||||
MessageBox.Show(
|
||||
$"应用发生严重错误,即将退出。请查看日志获取详细信息。\n\n{ex?.Message}\n\nA critical error occurred. The application will exit. Please check logs for details.",
|
||||
"致命错误 | Fatal Error",
|
||||
MessageBoxButton.OK,
|
||||
MessageBoxImage.Error);
|
||||
}
|
||||
catch { /* 最后的防线 | Last resort */ }
|
||||
};
|
||||
|
||||
// 加载并初始化 Serilog | Load and initialize Serilog
|
||||
SerilogConfig serilogConfig = XP.Common.Helpers.ConfigLoader.LoadSerilogConfig();
|
||||
SerilogInitializer.Initialize(serilogConfig);
|
||||
|
||||
_logger.Information("PLC Sentry Monitor 启动开始 | PLC Sentry Monitor startup started");
|
||||
|
||||
base.OnStartup(e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 应用程序初始化完成 | Application initialization completed
|
||||
/// </summary>
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
base.OnInitialized();
|
||||
|
||||
// 注册模块级多语言资源到 Fallback Chain | Register module-level localization resources to Fallback Chain
|
||||
try
|
||||
{
|
||||
var localizationService = Container.Resolve<ILocalizationService>();
|
||||
|
||||
// 注册 PLC 模块的多语言资源(PlcAddrConfigEditorWindow 等窗口依赖)
|
||||
// Register PLC module localization resources (required by PlcAddrConfigEditorWindow, etc.)
|
||||
var plcResourceManager = new ResourceManager(
|
||||
"XP.Hardware.PLC.Resources.Resources",
|
||||
typeof(XP.Hardware.PLC.PLCModule).Assembly);
|
||||
localizationService.RegisterResourceSource("XP.Hardware.PLC", plcResourceManager);
|
||||
|
||||
// 注册 Sentry 模块的多语言资源 | Register Sentry module localization resources
|
||||
var resourceManager = new ResourceManager(
|
||||
"XP.Hardware.PLC.Sentry.Resources.Resources",
|
||||
typeof(App).Assembly);
|
||||
localizationService.RegisterResourceSource("XP.Hardware.PLC.Sentry", resourceManager);
|
||||
|
||||
// 初始化 LocalizationHelper | Initialize LocalizationHelper
|
||||
LocalizationHelper.Initialize(localizationService);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Warning(ex, "Sentry 多语言资源注册失败 | Sentry localization resource registration failed");
|
||||
}
|
||||
|
||||
// 注册写入组件到 PlcService | Register write components to PlcService
|
||||
var plcService = Container.Resolve<PlcService>();
|
||||
var writeQueue = Container.Resolve<PlcWriteQueue>();
|
||||
var signalDataService = Container.Resolve<ISignalDataService>() as SignalDataService;
|
||||
plcService.RegisterWriteComponents(writeQueue, signalDataService?.DirectWriteChannel);
|
||||
|
||||
_logger.Information("PLC Sentry Monitor 初始化完成 | PLC Sentry Monitor initialization completed");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 应用程序退出 | Application exit
|
||||
/// </summary>
|
||||
protected override void OnExit(ExitEventArgs e)
|
||||
{
|
||||
_logger.Information("PLC Sentry Monitor 退出 | PLC Sentry Monitor exiting");
|
||||
Log.CloseAndFlush();
|
||||
base.OnExit(e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 捕获 UI 线程未处理异常 | Capture UI thread unhandled exceptions
|
||||
/// </summary>
|
||||
private void App_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
|
||||
{
|
||||
_logger.Fatal(e.Exception, "应用发生未处理异常 | Application encountered unhandled exception");
|
||||
|
||||
try
|
||||
{
|
||||
// 尝试刷新日志确保异常信息被持久化 | Flush logs to ensure exception info is persisted
|
||||
Log.CloseAndFlush();
|
||||
}
|
||||
catch { /* 日志刷新失败不影响异常处理 | Log flush failure should not affect exception handling */ }
|
||||
|
||||
MessageBox.Show(
|
||||
$"应用发生未处理异常,请查看日志获取详细信息。\n\n{e.Exception.Message}\n\nApplication encountered an unhandled exception. Please check logs for details.",
|
||||
"错误 | Error",
|
||||
MessageBoxButton.OK,
|
||||
MessageBoxImage.Error);
|
||||
|
||||
// 标记异常已处理,防止应用崩溃 | Mark exception as handled to prevent app crash
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace XP.Hardware.PLC.Sentry.Converters
|
||||
{
|
||||
/// <summary>
|
||||
/// 连接状态文本到指示灯颜色转换器 | Connection status text to indicator color converter
|
||||
/// 已连接→绿色,重连中→黄色,其他→灰色 | Connected→Green, Reconnecting→Yellow, Others→Gray
|
||||
/// </summary>
|
||||
public class ConnectionStatusToColorConverter : IMultiValueConverter
|
||||
{
|
||||
/// <summary>
|
||||
/// 已连接颜色(绿色)| Connected color (green)
|
||||
/// </summary>
|
||||
private static readonly SolidColorBrush ConnectedBrush = new(Color.FromRgb(0x4C, 0xAF, 0x50));
|
||||
|
||||
/// <summary>
|
||||
/// 重连中颜色(黄色)| Reconnecting color (yellow)
|
||||
/// </summary>
|
||||
private static readonly SolidColorBrush ReconnectingBrush = new(Color.FromRgb(0xFF, 0xC1, 0x07));
|
||||
|
||||
/// <summary>
|
||||
/// 未连接颜色(灰色)| Disconnected color (gray)
|
||||
/// </summary>
|
||||
private static readonly SolidColorBrush DisconnectedBrush = new(Color.FromRgb(0xBD, 0xBD, 0xBD));
|
||||
|
||||
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (values.Length >= 2 && values[0] is bool isConnected && values[1] is string statusText)
|
||||
{
|
||||
if (isConnected)
|
||||
return ConnectedBrush;
|
||||
|
||||
// 检查状态文本是否包含"重连"关键字 | Check if status text contains reconnecting keyword
|
||||
if (statusText != null &&
|
||||
(statusText.Contains("重连") || statusText.Contains("Reconnect", StringComparison.OrdinalIgnoreCase)))
|
||||
return ReconnectingBrush;
|
||||
}
|
||||
|
||||
return DisconnectedBrush;
|
||||
}
|
||||
|
||||
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Media;
|
||||
using XP.Hardware.PLC.Sentry.Models;
|
||||
|
||||
namespace XP.Hardware.PLC.Sentry.Converters
|
||||
{
|
||||
/// <summary>
|
||||
/// 日志级别到前景色转换器 | Log level to foreground color converter
|
||||
/// </summary>
|
||||
public class LogLevelToColorConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value is SentryLogLevel level)
|
||||
{
|
||||
return level switch
|
||||
{
|
||||
SentryLogLevel.Info => new SolidColorBrush(Color.FromRgb(0x33, 0x33, 0x33)),
|
||||
SentryLogLevel.Warning => new SolidColorBrush(Color.FromRgb(0xFF, 0x8F, 0x00)),
|
||||
SentryLogLevel.Error => new SolidColorBrush(Color.FromRgb(0xD3, 0x2F, 0x2F)),
|
||||
_ => new SolidColorBrush(Color.FromRgb(0x33, 0x33, 0x33))
|
||||
};
|
||||
}
|
||||
return new SolidColorBrush(Color.FromRgb(0x33, 0x33, 0x33));
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace XP.Hardware.PLC.Sentry.Converters
|
||||
{
|
||||
/// <summary>
|
||||
/// 将 null 或空字符串转换为 Collapsed,非空字符串转换为 Visible | Converts null/empty string to Collapsed, non-empty to Visible
|
||||
/// </summary>
|
||||
public class NullOrEmptyToVisibilityConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return string.IsNullOrEmpty(value as string) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
using System;
|
||||
|
||||
namespace XP.Hardware.PLC.Sentry.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Sentry 操作日志级别枚举 | Sentry operation log level enumeration
|
||||
/// </summary>
|
||||
public enum SentryLogLevel
|
||||
{
|
||||
/// <summary>
|
||||
/// 信息 | Information
|
||||
/// </summary>
|
||||
Info,
|
||||
|
||||
/// <summary>
|
||||
/// 警告 | Warning
|
||||
/// </summary>
|
||||
Warning,
|
||||
|
||||
/// <summary>
|
||||
/// 错误 | Error
|
||||
/// </summary>
|
||||
Error
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sentry 操作日志条目模型 | Sentry operation log entry model
|
||||
/// </summary>
|
||||
public class SentryLogEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// 时间戳 | Timestamp
|
||||
/// </summary>
|
||||
public DateTime Timestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 格式化的时间戳显示(HH:mm:ss.fff)| Formatted timestamp display
|
||||
/// </summary>
|
||||
public string TimestampDisplay => Timestamp.ToString("HH:mm:ss.fff");
|
||||
|
||||
/// <summary>
|
||||
/// 日志消息 | Log message
|
||||
/// </summary>
|
||||
public string Message { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 日志级别 | Log level
|
||||
/// </summary>
|
||||
public SentryLogLevel Level { get; set; } = SentryLogLevel.Info;
|
||||
|
||||
/// <summary>
|
||||
/// 用于显示的格式化文本 | Formatted text for display
|
||||
/// </summary>
|
||||
public string DisplayText => $"[{TimestampDisplay}] [{Level}] {Message}";
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<Config>
|
||||
<Group ID="WriteCommon" DBNumber="31">
|
||||
<Signal Name="SoftLive" Type="byte" StartAddr="0" IndexOrLength="" Remark="软件心跳,01周期变化表示PLC存活" />
|
||||
<Signal Name="EmergencyStop" Type="byte" StartAddr="5" IndexOrLength="" Remark="急停,0:缺省,1:触发急停" />
|
||||
<Signal Name="MC_SourceZ_Target" Type="single" StartAddr="10" IndexOrLength="" Remark="射线源Z目标位置" />
|
||||
<Signal Name="MC_SourceZ_Speed" Type="single" StartAddr="14" IndexOrLength="" Remark="射线源Z运动速度" />
|
||||
<Signal Name="MC_SourceZ_JogPos" Type="byte" StartAddr="18" IndexOrLength="" Remark="射线源Z正向Jog,0:缺省,1:正向点动" />
|
||||
<Signal Name="MC_SourceZ_JogNeg" Type="byte" StartAddr="19" IndexOrLength="" Remark="射线源Z反向Jog,0:缺省,1:反向点动" />
|
||||
<Signal Name="MC_SourceZ_Home" Type="byte" StartAddr="20" IndexOrLength="" Remark="射线源Z回零,0:缺省,1:触发回零" />
|
||||
<Signal Name="MC_SourceZ_Stop" Type="byte" StartAddr="21" IndexOrLength="" Remark="射线源Z停止,0:缺省,1:触发停止" />
|
||||
<Signal Name="MC_DetZ_Target" Type="single" StartAddr="22" IndexOrLength="" Remark="探测器Z目标位置" />
|
||||
<Signal Name="MC_DetZ_Speed" Type="single" StartAddr="26" IndexOrLength="" Remark="探测器Z运动速度" />
|
||||
<Signal Name="MC_DetZ_JogPos" Type="byte" StartAddr="30" IndexOrLength="" Remark="探测器Z正向Jog,0:缺省,1:正向点动" />
|
||||
<Signal Name="MC_DetZ_JogNeg" Type="byte" StartAddr="31" IndexOrLength="" Remark="探测器Z反向Jog,0:缺省,1:反向点动" />
|
||||
<Signal Name="MC_DetZ_Home" Type="byte" StartAddr="32" IndexOrLength="" Remark="探测器Z回零,0:缺省,1:触发回零" />
|
||||
<Signal Name="MC_DetZ_Stop" Type="byte" StartAddr="33" IndexOrLength="" Remark="探测器Z停止,0:缺省,1:触发停止" />
|
||||
<Signal Name="MC_StageX_Target" Type="single" StartAddr="34" IndexOrLength="" Remark="载物台X目标位置" />
|
||||
<Signal Name="MC_StageX_Speed" Type="single" StartAddr="38" IndexOrLength="" Remark="载物台X运动速度" />
|
||||
<Signal Name="MC_StageX_JogPos" Type="byte" StartAddr="42" IndexOrLength="" Remark="载物台X正向Jog,0:缺省,1:正向点动" />
|
||||
<Signal Name="MC_StageX_JogNeg" Type="byte" StartAddr="43" IndexOrLength="" Remark="载物台X反向Jog,0:缺省,1:反向点动" />
|
||||
<Signal Name="MC_StageX_Home" Type="byte" StartAddr="44" IndexOrLength="" Remark="载物台X回零,0:缺省,1:触发回零" />
|
||||
<Signal Name="MC_StageX_Stop" Type="byte" StartAddr="45" IndexOrLength="" Remark="载物台X停止,0:缺省,1:触发停止" />
|
||||
<Signal Name="MC_StageY_Target" Type="single" StartAddr="46" IndexOrLength="" Remark="载物台Y目标位置" />
|
||||
<Signal Name="MC_StageY_Speed" Type="single" StartAddr="50" IndexOrLength="" Remark="载物台Y运动速度" />
|
||||
<Signal Name="MC_StageY_JogPos" Type="byte" StartAddr="54" IndexOrLength="" Remark="载物台Y正向Jog,0:缺省,1:正向点动" />
|
||||
<Signal Name="MC_StageY_JogNeg" Type="byte" StartAddr="55" IndexOrLength="" Remark="载物台Y反向Jog,0:缺省,1:反向点动" />
|
||||
<Signal Name="MC_StageY_Home" Type="byte" StartAddr="56" IndexOrLength="" Remark="载物台Y回零,0:缺省,1:触发回零" />
|
||||
<Signal Name="MC_StageY_Stop" Type="byte" StartAddr="57" IndexOrLength="" Remark="载物台Y停止,0:缺省,1:触发停止" />
|
||||
<Signal Name="MC_DetSwing_Target" Type="single" StartAddr="58" IndexOrLength="" Remark="探测器摆动目标角度" />
|
||||
<Signal Name="MC_DetSwing_Speed" Type="single" StartAddr="62" IndexOrLength="" Remark="探测器摆动运动速度" />
|
||||
<Signal Name="MC_DetSwing_JogPos" Type="byte" StartAddr="66" IndexOrLength="" Remark="探测器摆动正向Jog,0:缺省,1:正向点动" />
|
||||
<Signal Name="MC_DetSwing_JogNeg" Type="byte" StartAddr="67" IndexOrLength="" Remark="探测器摆动反向Jog,0:缺省,1:反向点动" />
|
||||
<Signal Name="MC_DetSwing_Home" Type="byte" StartAddr="68" IndexOrLength="" Remark="探测器摆动回零,0:缺省,1:触发回零" />
|
||||
<Signal Name="MC_DetSwing_Stop" Type="byte" StartAddr="69" IndexOrLength="" Remark="探测器摆动停止,0:缺省,1:触发停止" />
|
||||
<Signal Name="MC_StageRot_Target" Type="single" StartAddr="70" IndexOrLength="" Remark="载物台旋转目标角度" />
|
||||
<Signal Name="MC_StageRot_Speed" Type="single" StartAddr="74" IndexOrLength="" Remark="载物台旋转运动速度" />
|
||||
<Signal Name="MC_StageRot_JogPos" Type="byte" StartAddr="78" IndexOrLength="" Remark="载物台旋转正向Jog,0:缺省,1:正向点动" />
|
||||
<Signal Name="MC_StageRot_JogNeg" Type="byte" StartAddr="79" IndexOrLength="" Remark="载物台旋转反向Jog,0:缺省,1:反向点动" />
|
||||
<Signal Name="MC_StageRot_Home" Type="byte" StartAddr="80" IndexOrLength="" Remark="载物台旋转回零,0:缺省,1:触发回零" />
|
||||
<Signal Name="MC_StageRot_Stop" Type="byte" StartAddr="81" IndexOrLength="" Remark="载物台旋转停止,0:缺省,1:触发停止" />
|
||||
<Signal Name="MC_FixRot_Target" Type="single" StartAddr="82" IndexOrLength="" Remark="夹具旋转目标角度" />
|
||||
<Signal Name="MC_FixRot_Speed" Type="single" StartAddr="86" IndexOrLength="" Remark="夹具旋转运动速度" />
|
||||
<Signal Name="MC_FixRot_JogPos" Type="byte" StartAddr="90" IndexOrLength="" Remark="夹具旋转正向Jog,0:缺省,1:正向点动" />
|
||||
<Signal Name="MC_FixRot_JogNeg" Type="byte" StartAddr="91" IndexOrLength="" Remark="夹具旋转反向Jog,0:缺省,1:反向点动" />
|
||||
<Signal Name="MC_FixRot_Home" Type="byte" StartAddr="92" IndexOrLength="" Remark="夹具旋转回零,0:缺省,1:触发回零" />
|
||||
<Signal Name="MC_FixRot_Stop" Type="byte" StartAddr="93" IndexOrLength="" Remark="夹具旋转停止,0:缺省,1:触发停止" />
|
||||
<Signal Name="MC_Door_Open" Type="byte" StartAddr="94" IndexOrLength="" Remark="安全门开门,0:缺省,1:触发开门" />
|
||||
<Signal Name="MC_Door_Close" Type="byte" StartAddr="95" IndexOrLength="" Remark="安全门关门,0:缺省,1:触发关门" />
|
||||
<Signal Name="MC_Door_Stop" Type="byte" StartAddr="96" IndexOrLength="" Remark="安全门停止,0:缺省,1:触发停止" />
|
||||
</Group>
|
||||
<Group ID="ReadCommon" DBNumber="31">
|
||||
<Signal Name="ProbeA" Type="single" StartAddr="120" IndexOrLength="" Remark="测座角度A" />
|
||||
<Signal Name="ProbeB" Type="string" StartAddr="122" IndexOrLength="20" Remark="测座角度B" />
|
||||
<Signal Name="test" Type="int" StartAddr="160" IndexOrLength="" Remark="" />
|
||||
<Signal Name="PlcLive" Type="byte" StartAddr="200" IndexOrLength="" Remark="PLC心跳,01周期变化表示PLC存活" />
|
||||
<Signal Name="PlcAlarm" Type="byte" StartAddr="201" IndexOrLength="" Remark="系统报警,0:缺省,10:有报警" />
|
||||
<Signal Name="MC_SourceZ_Pos" Type="single" StartAddr="100" IndexOrLength="" Remark="射线源Z实际位置" />
|
||||
<Signal Name="MC_DetZ_Pos" Type="single" StartAddr="104" IndexOrLength="" Remark="探测器Z实际位置" />
|
||||
<Signal Name="MC_StageX_Pos" Type="single" StartAddr="108" IndexOrLength="" Remark="载物台X实际位置" />
|
||||
<Signal Name="MC_StageY_Pos" Type="single" StartAddr="112" IndexOrLength="" Remark="载物台Y实际位置" />
|
||||
<Signal Name="MC_DetSwing_Angle" Type="single" StartAddr="116" IndexOrLength="" Remark="探测器摆动实际角度" />
|
||||
<Signal Name="MC_StageRot_Angle" Type="single" StartAddr="120" IndexOrLength="" Remark="载物台旋转实际角度" />
|
||||
<Signal Name="MC_FixRot_Angle" Type="single" StartAddr="124" IndexOrLength="" Remark="夹具旋转实际角度" />
|
||||
<Signal Name="MC_Door_Status" Type="byte" StartAddr="128" IndexOrLength="" Remark="安全门状态,0:未知,1:正在开门,2:已开,3:正在关门,4:已关,5:已锁定,6:故障" />
|
||||
<Signal Name="MC_Door_Interlock" Type="byte" StartAddr="130" IndexOrLength="" Remark="安全门联锁信号,0:缺省(无联锁),10:联锁有效(禁止开门)" />
|
||||
</Group>
|
||||
<Group ID="Status" DBNumber="4100">
|
||||
<Signal Name="ScanMode" Type="byte" StartAddr="201" IndexOrLength="" Remark="扫描模式,0:缺省(空闲),具体值由PLC定义" />
|
||||
</Group>
|
||||
</Config>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user