You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

265 lines
14 KiB

6 months ago
using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkDriver.ModbusTcpMaster;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HybirdFrameworkServices.Plc
{
/// <summary>
///
/// </summary>
public class PlcToHost
{
public ModbusProperty<ushort> ProtocolVersion1 { get; set; } = new(40201); // 协议版本
public ModbusProperty<ushort> ProtocolVersion2 { get; set; } = new(40202); // 协议版本
public ModbusProperty<ushort> ProtocolVersion3 { get; set; } = new(40203); // 协议版本
/// <summary>
/// 通讯诊断 站控PC心跳0、1 跳变)
/// </summary>
public ModbusProperty<ushort> CommunicationDiagnosis { get; set; } = new(40204);
/// <summary>
/// 模式状态
/// <para>0无效值</para>
/// <para>1000手动模式</para>
/// <para>1010自动模式</para>
/// </summary>
public ModbusProperty<ushort> ModeControl { get; set; } = new(40205);
/// <summary>
/// 设备系统状态
/// </summary>
public ModbusProperty<ushort> DeviceSystemStatus { get; set; } = new(40206);
6 months ago
//public ModbusProperty<bool> type00 { get; set; } = new(400206,length:1, type: ModbusDataType.Bit); //BIT0:复位
//public ModbusProperty<bool> type01 { get; set; } = new(400206,length:1, type: ModbusDataType.Bit); //BIT1:启动
//public ModbusProperty<bool> type02 { get; set; } = new(400206,length:1, type: ModbusDataType.Bit); //BIT2:暂停
//public ModbusProperty<bool> type03 { get; set; } = new(400206,length:1, type: ModbusDataType.Bit); //BIT3:急停
//public ModbusProperty<bool> type04 { get; set; } = new(400206,length:1, type: ModbusDataType.Bit); //BIT4:
//public ModbusProperty<bool> type05 { get; set; } = new(400206,length:1, type: ModbusDataType.Bit); //BIT5:整站断电
//public ModbusProperty<bool> type06 { get; set; } = new(400206,length:1, type: ModbusDataType.Bit); //BIT6:自动运行中
//public ModbusProperty<bool> type07 { get; set; } = new(400206,length:1, type: ModbusDataType.Bit); //BIT7:PLC停机报警
//public ModbusProperty<bool> type08 { get; set; } = new(400206,length:1, type: ModbusDataType.Bit); //BIT8:PLC提示预警
/// <summary>
/// 遥本控状态
/// <para>0无效值</para>
/// <para>1000本地控制</para>
/// <para>1010远程控制</para>
/// </summary>
public ModbusProperty<ushort> RemoteLocalControlState { get; set; } = new(40207);
/// <summary>
/// 灯光状态
/// <para>0无状态</para>
/// <para>1000已全部打开</para>
/// <para>1010已全部关闭</para>
/// </summary>
public ModbusProperty<ushort> LightStatus { get; set; } = new(40208);
/// <summary>
/// 排风扇状态
/// <para>0无状态</para>
/// <para>1000已全部打开</para>
/// <para>1010已全部关闭</para>
/// </summary>
public ModbusProperty<ushort> ExhaustFanStatus { get; set; } = new(40209);
/// <summary>
/// 站内积水状态
/// BIT0积水预警
/// BIT1积水报警
/// </summary>
public ModbusProperty<ushort> WaterStatusStation { get; set; } = new(40210);
/// <summary>
/// 备用
/// </summary>
public ModbusProperty<string> value09 { get; set; } = new(40211, length: 30);
#region 舱位状态 bit0:有料检测 Bit1有料检测开关故障
public ModbusProperty<bool> MaterialDetec01 { get; set; } = new(40241,0,0,ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetec02 { get; set; } = new(40242,0,0,ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetec03 { get; set; } = new(40243,0,0,ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetec04 { get; set; } = new(40244,0,0,ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetec05 { get; set; } = new(40245,0,0,ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetec06 { get; set; } = new(40246,0,0,ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetec07 { get; set; } = new(40247,0,0,ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetec08 { get; set; } = new(40248,0,0,ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetec09 { get; set; } = new(40249,0,0,ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetec10 { get; set; } = new(40250,0,0,ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetec11 { get; set; } = new(40251,0,0,ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetec12 { get; set; } = new(40252,0,0,ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetec13 { get; set; } = new(40253,0,0,ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetec14 { get; set; } = new(40254,0,0,ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetec15 { get; set; } = new(40255,0,0,ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetec16 { get; set; } = new(40256,0,0,ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetec17 { get; set; } = new(40257,0,0,ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetec18 { get; set; } = new(40258,0,0,ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetec19 { get; set; } = new(40259,0,0,ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetec20 { get; set; } = new(40260,0,0,ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetecSwitchFault01 { get; set; } = new(40241, 0, 0, ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetecSwitchFault02 { get; set; } = new(40242, 0, 0, ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetecSwitchFault03 { get; set; } = new(40243, 0, 0, ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetecSwitchFault04 { get; set; } = new(40244, 0, 0, ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetecSwitchFault05 { get; set; } = new(40245, 0, 0, ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetecSwitchFault06 { get; set; } = new(40246, 0, 0, ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetecSwitchFault07 { get; set; } = new(40247, 0, 0, ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetecSwitchFault08 { get; set; } = new(40248, 0, 0, ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetecSwitchFault09 { get; set; } = new(40249, 0, 0, ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetecSwitchFault10 { get; set; } = new(40250, 0, 0, ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetecSwitchFault11 { get; set; } = new(40251, 0, 0, ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetecSwitchFault12 { get; set; } = new(40252, 0, 0, ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetecSwitchFault13 { get; set; } = new(40253, 0, 0, ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetecSwitchFault14 { get; set; } = new(40254, 0, 0, ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetecSwitchFault15 { get; set; } = new(40255, 0, 0, ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetecSwitchFault16 { get; set; } = new(40256, 0, 0, ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetecSwitchFault17 { get; set; } = new(40257, 0, 0, ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetecSwitchFault18 { get; set; } = new(40258, 0, 0, ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetecSwitchFault19 { get; set; } = new(40259, 0, 0, ModbusDataType.Bit);
public ModbusProperty<bool> MaterialDetecSwitchFault20 { get; set; } = new(40260, 0, 0, ModbusDataType.Bit);
#endregion 舱位状态
/// <summary>
/// 备用
/// </summary>
public ModbusProperty<string> value11 { get; set; } = new(40281, length: 20);
/// <summary>
/// 载行车设备状态
/// <para>0无效值</para>
/// <para>1000:待机中</para>
/// <para>1001:定位识别中</para>
/// <para>1100:取电池中</para>
/// <para>1101:取电池完成</para>
/// <para>1102:取电池动作故障</para>
/// <para>1200:放电池中</para>
/// <para>1201:放电池完成</para>
/// <para>1202:放电池动作故障</para>
/// </summary>
public ModbusProperty<ushort> CarStatus { get; set; } = new(40301);
6 months ago
public ModbusProperty<ushort> value13 { get; set; } = new(40302); // 备用
public ModbusProperty<ushort> value14 { get; set; } = new(40303); // 备用
public ModbusProperty<ushort> value15 { get; set; } = new(40304); // 备用
public ModbusProperty<ushort> value16 { get; set; } = new(40305); // 备用
/// <summary>
/// x轴扭矩百分比
/// </summary>
public ModbusProperty<short> PercentageTorqueX { get; set; } = new(40306);
/// <summary>
/// y轴扭矩百分比
/// </summary>
public ModbusProperty<short> PercentageTorqueY { get; set; } = new(40307);
/// <summary>
/// z轴扭矩百分比
/// </summary>
public ModbusProperty<short> PercentageTorqueZ { get; set; } = new(40308);
6 months ago
public ModbusProperty<string> value20 { get; set; } = new(40309, length: 92); // 备用
/// <summary>
/// 入口雷达状态
/// 0未触发
/// 1000感应触发
/// </summary>
public ModbusProperty<ushort> RadarStatesIn { get; set; } = new(40401);
/// <summary>
/// 出口雷达状态
/// 0未触发
/// 1000感应触发
/// </summary>
public ModbusProperty<ushort> RadarStatesOut { get; set; } = new(40402);
/// <summary>
/// 到位光电信号
/// 1000到位
/// 其它值:未到位
/// </summary>
public ModbusProperty<ushort> SpotPhotoelectricSignal { get; set; } = new(40403);
/// <summary>
/// 实体按钮状态
/// 0:无状态
/// 1000:已拍按钮
/// </summary>
public ModbusProperty<ushort> PhysicalButtonState { get; set; } = new(40404);
/// <summary>
/// 三色灯控制通道状态(入口)
/// <para>0无颜色</para>
/// <para>1000绿灯</para>
/// <para>1010绿灯闪烁</para>
/// <para>1020红灯</para>
/// <para>1030红灯闪烁</para>
/// <para>1040黄灯</para>
/// <para>1050黄灯闪烁</para>
/// <para>1100所有灯亮</para>
/// </summary>
public ModbusProperty<ushort> LightIn { get; set; } = new(40405);
/// <summary>
/// 三色灯控制通道状态(出口)
/// <para>0无颜色</para>
/// <para>1000绿灯</para>
/// <para>1010绿灯闪烁</para>
/// <para>1020红灯</para>
/// <para>1030红灯闪烁</para>
/// <para>1040黄灯</para>
/// <para>1050黄灯闪烁</para>
/// <para>1100所有灯亮</para>
/// </summary>
public ModbusProperty<ushort> LightOut { get; set; } = new(40406);
/// <summary>
/// 任务类型状态(是否允许允许执行任务)
/// <para>0.无任务 (不允许换电)</para>
/// <para>1.换电任务</para>
/// <para>2.移舱任务</para>
/// <para>3.移出任务</para>
/// <para>4.移入任务</para>
/// <para>5.消防任务</para>
/// </summary>
public ModbusProperty<ushort> TaskType { get; set; } = new(40407);
/// <summary>
/// 任务状态
/// <para>0无效值</para>
/// <para>1000准备中Not Ready</para>
/// <para>1001待机中Ready</para>
/// <para>1002电池拆卸中</para>
/// <para>1003电池入库搬运中</para>
/// <para>1004电池出库搬运中</para>
/// <para>1005电池安装中</para>
/// <para>1006电池安装完成</para>
/// <para>1007航车回归至安全位置</para>
/// <para>1008: 缓存-放仓位, 移仓状态</para>
/// <para>1100消防任务 执行中</para>
/// <para>1101消防任务 出现异常</para>
/// <para>1200移仓任务 执行中</para>
/// <para>1201移仓任务 出现异常</para>
/// <para>9000任务完成</para>
/// </summary>
public ModbusProperty<ushort> TaskStates { get; set; } = new(40408);
/// <summary>
/// 执行任务行车号
/// </summary>
public ModbusProperty<ushort> OperationalTrainNumber { get; set; } = new(40409);
/// <summary>
/// 通道定位状态
/// <para>0无效值</para>
/// <para>1000;拍照OK</para>
/// <para>1010;拍照NG</para>
/// <para>1020;拍照超限,请移车</para>
/// </summary>
public ModbusProperty<ushort> ChannelLocationState { get; set; } = new(40410);
/// <summary>
/// x偏差
/// </summary>
public ModbusProperty<short> DeviationX { get; set; } = new(40411);
/// <summary>
/// y偏差
/// </summary>
public ModbusProperty<short> DeviationY { get; set; } = new(40412);
/// <summary>
/// z偏差
/// </summary>
public ModbusProperty<short> DeviationZ { get; set; } = new(40413);
6 months ago
public ModbusProperty<string> value44 { get; set; } = new(40414, length: 7); // 备用
}
}