Commit 0690b6b8 LN

增加打印标签的引用

1 个父辈 14e71c2b
正在显示 29 个修改的文件 包含 634 行增加1303 行删除
<?xml version="1.0"?>
<doc>
<assembly>
<name>Asa.IOModule.AIOBOX</name>
</assembly>
<members>
<member name="T:Asa.IOModule.AIOBOX">
<summary>
AIOBOX操作类
</summary>
</member>
<member name="F:Asa.IOModule.AIOBOX.SEND_SLEEP">
<summary>
每条命令发送的间隔
不能小于15,会出现IO接收不到的情况
小于30时,会出现接收数据连包的情况
</summary>
</member>
<member name="F:Asa.IOModule.AIOBOX.PORT">
<summary>
ModBus端口
</summary>
</member>
<member name="T:Asa.IOModule.AIOBOX.DIO_Changed">
<summary>
自动读取DI委托
</summary>
<param name="box">AIOBOX</param>
<param name="sta">所有DI状态</param>
</member>
<member name="E:Asa.IOModule.AIOBOX.DI_Changed_Event">
<summary>
自动读取DI事件触发
</summary>
</member>
<member name="E:Asa.IOModule.AIOBOX.DO_Changed_Event">
<summary>
自动读取DO事件触发
</summary>
</member>
<member name="T:Asa.IOModule.AIOBOX.AIO_Changed">
<summary>
自动读取AI委托
</summary>
<param name="box">AIOBOX</param>
<param name="val">所有AI的值</param>
</member>
<member name="E:Asa.IOModule.AIOBOX.AI_Changed_Event">
<summary>
自动读取AI事件触发
</summary>
</member>
<member name="E:Asa.IOModule.AIOBOX.AO_Changed_Event">
<summary>
自动读取AO事件触发
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.#ctor">
<summary>
AIOBOX
</summary>
</member>
<member name="P:Asa.IOModule.AIOBOX.IP">
<summary>
IP地址
</summary>
</member>
<member name="P:Asa.IOModule.AIOBOX.IsConn">
<summary>
是否连接
</summary>
</member>
<member name="P:Asa.IOModule.AIOBOX.ErrInfo">
<summary>
错误信息
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.LogPath(System.String,Asa.IOModule.LogType)">
<summary>
日志路径,连接前设置路径会自动保存日志
</summary>
<param name="path">文件夹路径</param>
<param name="type">输出类型</param>
</member>
<member name="M:Asa.IOModule.AIOBOX.SetInput(Asa.IOModule.Box_Type,System.Int32)">
<summary>
设置输入端
</summary>
<param name="type">类型</param>
<param name="count">数量</param>
</member>
<member name="M:Asa.IOModule.AIOBOX.SetOutput(Asa.IOModule.Box_Type,System.Int32)">
<summary>
设置输出端
</summary>
<param name="type">类型</param>
<param name="count">数量</param>
</member>
<member name="M:Asa.IOModule.AIOBOX.AutoIP(System.String)">
<summary>
自动获取IP地址,未连接前使用,必须在同一网段
</summary>
<param name="localIP">本地IP地址</param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.CheckIP(System.String)">
<summary>
检查IP地址
</summary>
<param name="ip"></param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.Connect">
<summary>
连接
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.Close">
<summary>
关闭连接
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.AutoReadInput(System.Boolean,System.Int32)">
<summary>
自动读取输入端并触发事件(主动上传数据 = 禁止)
</summary>
<param name="read">是否自动读取</param>
<param name="sleep">间隔,必须大于等于15ms</param>
</member>
<member name="M:Asa.IOModule.AIOBOX.AutoReadInput(System.Boolean)">
<summary>
自动读取输入端并触发事件(主动上传数据 = 使能)
</summary>
<param name="read">是否自动读取</param>
</member>
<member name="M:Asa.IOModule.AIOBOX.AutoReadOutput(System.Boolean,System.Int32)">
<summary>
自动读取输出端,触发事件
</summary>
<param name="read">是否自动读取</param>
<param name="sleep">间隔,必须大于等于15ms</param>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReverseStatus(Asa.IOModule.Box_Sta)">
<summary>
相反状态(ON/OFF)
</summary>
<param name="sta"></param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReverseStatus(Asa.IOModule.Box_Sta@)">
<summary>
相反状态(ON/OFF)
</summary>
<param name="sta"></param>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReadDI(System.Int32)">
<summary>
读取单个DI输入状态(ON/OFF)
</summary>
<param name="add">输入地址,从0开始</param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReadDI(System.Int32,System.Int32)">
<summary>
读取多个DI输入状态(ON/OFF)
</summary>
<param name="add">起始地址,从0开始</param>
<param name="count">数量</param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReadAI(System.Int32)">
<summary>
读取单个AI模拟量的值
</summary>
<param name="add">模拟量地址,从0开始</param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReadAI(System.Int32,System.Int32)">
<summary>
读取多个AI模拟量的值
</summary>
<param name="add">起始地址,从0开始</param>
<param name="count">数量</param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReadDO(System.Int32)">
<summary>
读取单个DO输出状态(ON/OFF)
</summary>
<param name="add">输出地址,从0开始</param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReadDO(System.Int32,System.Int32)">
<summary>
读取多个DO输出状态(ON/OFF)
</summary>
<param name="add">起始地址,从0开始</param>
<param name="count">数量</param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReadAO(System.Int32)">
<summary>
读取单个AO模拟量的值
</summary>
<param name="add">输出地址,从0开始</param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReadAO(System.Int32,System.Int32)">
<summary>
读取多个AO模拟量的值
</summary>
<param name="add">起始地址,从0开始</param>
<param name="count">数量</param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.WriteDO(System.Int32,Asa.IOModule.Box_Sta)">
<summary>
写入单个DO输出状态(ON/OFF)
</summary>
<param name="add">输出地址,从0开始</param>
<param name="sta"></param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.GetLocalIP">
<summary>
获取本地IPv4地址
</summary>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.Send">
<summary>
发送命令
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.Receive">
<summary>
接收命令
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReadSingle(System.Byte[])">
<summary>
读取写入单个DO,功能码5
</summary>
<param name="buff"></param>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReadDO(System.Byte[])">
<summary>
读取所有DO状态,功能码1
</summary>
<param name="buff"></param>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReadDI(System.Byte[])">
<summary>
读取所有DI状态,功能码2
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReadAI(System.Byte[])">
<summary>
读取所有AI的值,功能码4
</summary>
<param name="buff"></param>
</member>
<member name="M:Asa.IOModule.AIOBOX.Command">
<summary>
命令,前7个字节
</summary>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.TriggerDIO">
<summary>
触发DIO改变事件
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.AutoReadInput">
<summary>
自动读取输入端线程
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.AutoReadOutput">
<summary>
自动读取输出端线程
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.Listen">
<summary>
监听结果线程
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.TestMethod">
<summary>
测试方法锁
</summary>
</member>
<member name="T:Asa.IOModule.Box_Type">
<summary>
IO模块类型
</summary>
</member>
<member name="F:Asa.IOModule.Box_Type.DI">
<summary>
数字信号输入
</summary>
</member>
<member name="F:Asa.IOModule.Box_Type.DO">
<summary>
数字信号输出
</summary>
</member>
<member name="F:Asa.IOModule.Box_Type.AI">
<summary>
模拟量输入
</summary>
</member>
<member name="F:Asa.IOModule.Box_Type.AO">
<summary>
模拟量输出
</summary>
</member>
<member name="T:Asa.IOModule.Box_Sta">
<summary>
IO模块寄存器状态
</summary>
</member>
<member name="F:Asa.IOModule.Box_Sta.Off">
<summary>
断开,关闭,低电平
</summary>
</member>
<member name="F:Asa.IOModule.Box_Sta.On">
<summary>
闭合,打开,高电平
</summary>
</member>
<member name="T:Asa.IOModule.LogType">
<summary>
日志类型
</summary>
</member>
<member name="F:Asa.IOModule.LogType.OnlyError">
<summary>
仅错误信息
</summary>
</member>
<member name="F:Asa.IOModule.LogType.All">
<summary>
所有
</summary>
</member>
<member name="T:Asa.IOModule.LogFile">
<summary>
日志操作类
</summary>
</member>
<member name="M:Asa.IOModule.LogFile.#ctor(System.String,System.String)">
<summary>
日志
</summary>
<param name="path">文件夹路径</param>
<param name="ip"></param>
</member>
<member name="M:Asa.IOModule.LogFile.Close">
<summary>
关闭文件
</summary>
</member>
<member name="M:Asa.IOModule.LogFile.OutError(System.String)">
<summary>
输出错误
</summary>
<param name="s"></param>
</member>
<member name="M:Asa.IOModule.LogFile.OutInfo(System.String)">
<summary>
输出信息
</summary>
<param name="s"></param>
</member>
<member name="M:Asa.IOModule.LogFile.OutData(System.String,System.Byte[])">
<summary>
输出数据
</summary>
<param name="tr"></param>
<param name="buff"></param>
</member>
<member name="M:Asa.IOModule.LogFile.OutData(System.String)">
<summary>
输出数据
</summary>
<param name="s"></param>
</member>
</members>
</doc>
<?xml version="1.0"?>
<doc>
<assembly>
<name>Asa.IOModule.AIOBOX</name>
</assembly>
<members>
<member name="T:Asa.IOModule.AIOBOX">
<summary>
零点IO模块操作类
</summary>
</member>
<member name="T:Asa.IOModule.AIOBOX.DIO_Changed">
<summary>
自动读取DI委托
</summary>
<param name="box">AIOBOX</param>
<param name="sta">所有DI状态</param>
</member>
<member name="E:Asa.IOModule.AIOBOX.DI_Changed_Event">
<summary>
自动读取DI事件触发
</summary>
</member>
<member name="E:Asa.IOModule.AIOBOX.DO_Changed_Event">
<summary>
自动读取DO事件触发
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.#ctor(Asa.IOModule.Box_Type,System.Int32,Asa.IOModule.Box_Type,System.Int32)">
<summary>
零点IO模块操作类
</summary>
<param name="input">输入类型</param>
<param name="inputCount">输入数量</param>
<param name="output">输出类型</param>
<param name="outputCount">输出数量</param>
</member>
<member name="P:Asa.IOModule.AIOBOX.IP">
<summary>
IP地址
</summary>
</member>
<member name="P:Asa.IOModule.AIOBOX.Upload">
<summary>
输入主动上传
</summary>
</member>
<member name="P:Asa.IOModule.AIOBOX.IsConn">
<summary>
是否连接
</summary>
</member>
<member name="P:Asa.IOModule.AIOBOX.ErrInfo">
<summary>
错误信息
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.Connect">
<summary>
连接
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.Close">
<summary>
关闭连接
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReverseStatus(Asa.IOModule.Box_Sta)">
<summary>
相反状态(ON/OFF)
</summary>
<param name="sta"></param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReverseStatus(Asa.IOModule.Box_Sta@)">
<summary>
相反状态(ON/OFF)
</summary>
<param name="sta"></param>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReadDI(System.Int32)">
<summary>
读取单个DI输入状态(ON/OFF)
</summary>
<param name="add">输入地址,从0开始</param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReadDI(System.Int32,System.Int32)">
<summary>
读取多个DI输入状态(ON/OFF)
</summary>
<param name="add">起始地址,从0开始</param>
<param name="count">数量</param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReadAI(System.Int32)">
<summary>
读取单个AI模拟量的值
</summary>
<param name="add">模拟量地址,从0开始</param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReadAI(System.Int32,System.Int32)">
<summary>
读取多个AI模拟量的值
</summary>
<param name="add">起始地址,从0开始</param>
<param name="count">数量</param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReadDO(System.Int32)">
<summary>
读取单个DO输出状态(ON/OFF)
</summary>
<param name="add">输出地址,从0开始</param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReadDO(System.Int32,System.Int32)">
<summary>
读取多个DO输出状态(ON/OFF)
</summary>
<param name="add">起始地址,从0开始</param>
<param name="count">数量</param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReadAO(System.Int32)">
<summary>
读取单个AO模拟量的值
</summary>
<param name="add">输出地址,从0开始</param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.ReadAO(System.Int32,System.Int32)">
<summary>
读取多个AO模拟量的值
</summary>
<param name="add">起始地址,从0开始</param>
<param name="count">数量</param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.WriteDO(System.Int32,Asa.IOModule.Box_Sta)">
<summary>
写入单个DO输出状态(ON/OFF)
</summary>
<param name="add">输出地址,从0开始</param>
<param name="sta"></param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.Send">
<summary>
发送命令线程
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.GetReadDI_Command">
<summary>
获取ReadDI的命令
</summary>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.GetReadDO_Command">
<summary>
获取ReadDO的命令
</summary>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.Listen">
<summary>
监听网络线程
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.CommandProcess(System.Byte[])">
<summary>
接收到的命令处理方法,(task多线程)
</summary>
<param name="cmd"></param>
</member>
<member name="M:Asa.IOModule.AIOBOX.Reconn">
<summary>
重连线程
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.Open">
<summary>
打开socket建立连接
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.CheckIP(System.String)">
<summary>
检查IP地址
</summary>
<param name="ip"></param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.AutoIP(System.String)">
<summary>
自动获取IP地址,未连接前使用,必须在同一网段
</summary>
<param name="localIP">本地IP地址</param>
<returns></returns>
</member>
<member name="M:Asa.IOModule.AIOBOX.GetIP">
<summary>
获取IO模块IP地址
</summary>
</member>
<member name="M:Asa.IOModule.AIOBOX.Command">
<summary>
命令,前7个字节
</summary>
<returns></returns>
</member>
<member name="T:Asa.IOModule.Box_Type">
<summary>
IO模块类型
</summary>
</member>
<member name="F:Asa.IOModule.Box_Type.DI">
<summary>
数字信号输入
</summary>
</member>
<member name="F:Asa.IOModule.Box_Type.DO">
<summary>
数字信号输出
</summary>
</member>
<member name="F:Asa.IOModule.Box_Type.AI">
<summary>
模拟量输入
</summary>
</member>
<member name="F:Asa.IOModule.Box_Type.AO">
<summary>
模拟量输出
</summary>
</member>
<member name="T:Asa.IOModule.Box_Sta">
<summary>
IO模块寄存器状态
</summary>
</member>
<member name="F:Asa.IOModule.Box_Sta.Off">
<summary>
断开,关闭,低电平
</summary>
</member>
<member name="F:Asa.IOModule.Box_Sta.On">
<summary>
闭合,打开,高电平
</summary>
</member>
</members>
</doc>
<?xml version="1.0"?>
<doc>
<assembly>
<name>zxing.presentation</name>
</assembly>
<members>
<member name="T:ZXing.Presentation.BarcodeReader">
<summary>
A smart class to decode the barcode inside a bitmap object which is derived from BitmapSource
</summary>
</member>
<member name="M:ZXing.Presentation.BarcodeReader.#ctor">
<summary>
Initializes a new instance of the <see cref="T:ZXing.Presentation.BarcodeReader"/> class.
</summary>
</member>
<member name="M:ZXing.Presentation.BarcodeReader.#ctor(ZXing.Reader,System.Func{System.Windows.Media.Imaging.BitmapSource,ZXing.LuminanceSource},System.Func{ZXing.LuminanceSource,ZXing.Binarizer})">
<summary>
Initializes a new instance of the <see cref="T:ZXing.Presentation.BarcodeReader"/> class.
</summary>
<param name="reader">Sets the reader which should be used to find and decode the barcode.
If null then MultiFormatReader is used</param>
<param name="createLuminanceSource">Sets the function to create a luminance source object for a bitmap.
If null, default is used</param>
<param name="createBinarizer">Sets the function to create a binarizer object for a luminance source.
If null then HybridBinarizer is used</param>
</member>
<member name="M:ZXing.Presentation.BarcodeReader.#ctor(ZXing.Reader,System.Func{System.Windows.Media.Imaging.BitmapSource,ZXing.LuminanceSource},System.Func{ZXing.LuminanceSource,ZXing.Binarizer},System.Func{System.Byte[],System.Int32,System.Int32,ZXing.RGBLuminanceSource.BitmapFormat,ZXing.LuminanceSource})">
<summary>
Initializes a new instance of the <see cref="T:ZXing.Presentation.BarcodeReader"/> class.
</summary>
<param name="reader">Sets the reader which should be used to find and decode the barcode.
If null then MultiFormatReader is used</param>
<param name="createLuminanceSource">Sets the function to create a luminance source object for a bitmap.
If null, default is used</param>
<param name="createBinarizer">Sets the function to create a binarizer object for a luminance source.
If null then HybridBinarizer is used</param>
<param name="createRGBLuminanceSource">The create RGB luminance source.</param>
</member>
<member name="T:ZXing.Presentation.BarcodeWriter">
<summary>
A smart class to encode some content to a barcode image
</summary>
</member>
<member name="M:ZXing.Presentation.BarcodeWriter.#ctor">
<summary>
Initializes a new instance of the <see cref="T:ZXing.Presentation.BarcodeWriter"/> class.
</summary>
</member>
<member name="T:ZXing.Presentation.BarcodeWriterGeometry">
<summary>
A smart class to encode some content to a barcode image into a geometry
Autor: Rob Fonseca-Ensor
</summary>
</member>
<member name="M:ZXing.Presentation.BarcodeWriterGeometry.#ctor">
<summary>
Initializes a new instance of the <see cref="T:ZXing.Presentation.BarcodeWriterGeometry"/> class.
</summary>
</member>
<member name="M:ZXing.BitmapSourceLuminanceSource.#ctor(System.Int32,System.Int32)">
<summary>
Initializes a new instance of the <see cref="T:ZXing.BitmapSourceLuminanceSource"/> class.
</summary>
<param name="width">The width.</param>
<param name="height">The height.</param>
</member>
<member name="M:ZXing.BitmapSourceLuminanceSource.#ctor(System.Windows.Media.Imaging.BitmapSource)">
<summary>
Initializes a new instance of the <see cref="T:ZXing.BitmapSourceLuminanceSource"/> class.
</summary>
<param name="bitmap">The bitmap.</param>
</member>
<member name="M:ZXing.BitmapSourceLuminanceSource.CreateLuminanceSource(System.Byte[],System.Int32,System.Int32)">
<summary>
Should create a new luminance source with the right class type.
The method is used in methods crop and rotate.
</summary>
<param name="newLuminances">The new luminances.</param>
<param name="width">The width.</param>
<param name="height">The height.</param>
<returns></returns>
</member>
<member name="T:ZXing.Rendering.GeometryRenderer">
<summary>
Renders a barcode into a geometry
Autor: Rob Fonseca-Ensor
</summary>
</member>
<member name="M:ZXing.Rendering.GeometryRenderer.Render(ZXing.Common.BitMatrix,ZXing.BarcodeFormat,System.String)">
<summary>
Renders the specified matrix.
</summary>
<param name="matrix">The matrix.</param>
<param name="format">The format.</param>
<param name="content">The content.</param>
<returns></returns>
</member>
<member name="M:ZXing.Rendering.GeometryRenderer.Render(ZXing.Common.BitMatrix,ZXing.BarcodeFormat,System.String,ZXing.Common.EncodingOptions)">
<summary>
Renders the specified matrix.
</summary>
<param name="matrix">The matrix.</param>
<param name="format">The format.</param>
<param name="content">The content.</param>
<param name="options">The options.</param>
<returns></returns>
</member>
<member name="T:ZXing.Rendering.WriteableBitmapRenderer">
<summary>
Renders a <see cref="T:ZXing.Common.BitMatrix" /> to a <see cref="T:System.Windows.Media.Imaging.WriteableBitmap" />
</summary>
</member>
<member name="P:ZXing.Rendering.WriteableBitmapRenderer.Foreground">
<summary>
Gets or sets the foreground color.
</summary>
<value>
The foreground color.
</value>
</member>
<member name="P:ZXing.Rendering.WriteableBitmapRenderer.Background">
<summary>
Gets or sets the background color.
</summary>
<value>
The background color.
</value>
</member>
<member name="P:ZXing.Rendering.WriteableBitmapRenderer.FontFamily">
<summary>
Gets or sets the font family.
</summary>
<value>
The font family.
</value>
</member>
<member name="P:ZXing.Rendering.WriteableBitmapRenderer.FontSize">
<summary>
Gets or sets the size of the font.
</summary>
<value>
The size of the font.
</value>
</member>
<member name="P:ZXing.Rendering.WriteableBitmapRenderer.FontStretch">
<summary>
Gets or sets the font stretch.
</summary>
<value>
The font stretch.
</value>
</member>
<member name="P:ZXing.Rendering.WriteableBitmapRenderer.FontStyle">
<summary>
Gets or sets the font style.
</summary>
<value>
The font style.
</value>
</member>
<member name="P:ZXing.Rendering.WriteableBitmapRenderer.FontWeight">
<summary>
Gets or sets the font weight.
</summary>
<value>
The font weight.
</value>
</member>
<member name="M:ZXing.Rendering.WriteableBitmapRenderer.#ctor">
<summary>
Initializes a new instance of the <see cref="T:ZXing.Rendering.WriteableBitmapRenderer"/> class.
</summary>
</member>
<member name="M:ZXing.Rendering.WriteableBitmapRenderer.Render(ZXing.Common.BitMatrix,ZXing.BarcodeFormat,System.String)">
<summary>
Renders the specified matrix.
</summary>
<param name="matrix">The matrix.</param>
<param name="format">The format.</param>
<param name="content">The content.</param>
<returns></returns>
</member>
<member name="M:ZXing.Rendering.WriteableBitmapRenderer.Render(ZXing.Common.BitMatrix,ZXing.BarcodeFormat,System.String,ZXing.Common.EncodingOptions)">
<summary>
Renders the specified matrix.
</summary>
<param name="matrix">The matrix.</param>
<param name="format">The format.</param>
<param name="content">The content.</param>
<param name="options">The options.</param>
<returns></returns>
</member>
</members>
</doc>
此文件的差异太大,无法显示。
......@@ -7,8 +7,8 @@
<!--是否开机自动启动料仓-->
<add key="App_AutoRun" value="1" />
<add key="App_Title" value="自动点料机" />
<!--Server address-->
<!--<add key="http.server" value="http://localhost/myproject/service/store/emptyPosForPutin"/>-->
<!--<add key="ServerAddr" value="http://localhost/myproject/service/store/emptyPosForPutin"/>-->
<add key="ConfigPath_Robot" value="\RobotConfig\Config_Robot.csv" />
......@@ -42,6 +42,10 @@
<!--检测到料串自动取料-->
<add key="AutoInput" value="1" />
<add key ="InoutDefaultPosition" value ="1000"/>
<!--标签文件名称-->
<add key ="LabelName" value ="test2"/>
<!--打印机名称-->
<add key ="PrinterName" value ="ZDesigner GT800 (EPL)"/>
</appSettings>
<log4net>
......
......@@ -55,6 +55,9 @@
</PropertyGroup>
<PropertyGroup />
<ItemGroup>
<Reference Include="Asa.PrintLabel">
<HintPath>..\..\dll\label\Asa.PrintLabel.dll</HintPath>
</Reference>
<Reference Include="Client">
<HintPath>..\..\dll\Client.dll</HintPath>
</Reference>
......
......@@ -41,7 +41,6 @@
this.txtShelfID = new System.Windows.Forms.TextBox();
this.lblMoveInfo = new System.Windows.Forms.Label();
this.lblAgvInfo = new System.Windows.Forms.Label();
this.lblInstoreList = new System.Windows.Forms.Label();
this.lblThisSta = new System.Windows.Forms.Label();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.groupBox1 = new System.Windows.Forms.GroupBox();
......@@ -297,7 +296,6 @@
this.groupBox6.Controls.Add(this.txtShelfID);
this.groupBox6.Controls.Add(this.lblMoveInfo);
this.groupBox6.Controls.Add(this.lblAgvInfo);
this.groupBox6.Controls.Add(this.lblInstoreList);
this.groupBox6.Controls.Add(this.lblThisSta);
this.groupBox6.Location = new System.Drawing.Point(3, 3);
this.groupBox6.Name = "groupBox6";
......@@ -462,18 +460,6 @@
this.lblAgvInfo.TabIndex = 276;
this.lblAgvInfo.Text = "AGV 状态";
//
// lblInstoreList
//
this.lblInstoreList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblInstoreList.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblInstoreList.ForeColor = System.Drawing.Color.Green;
this.lblInstoreList.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblInstoreList.Location = new System.Drawing.Point(406, 287);
this.lblInstoreList.Name = "lblInstoreList";
this.lblInstoreList.Size = new System.Drawing.Size(881, 109);
this.lblInstoreList.TabIndex = 277;
//
// lblThisSta
//
this.lblThisSta.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
......@@ -1806,7 +1792,6 @@
internal System.Windows.Forms.Button btnUP1;
private System.Windows.Forms.Label lblAgvInfo;
private System.Windows.Forms.GroupBox groupBox6;
private System.Windows.Forms.Label lblInstoreList;
private System.Windows.Forms.GroupBox groupBox7;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
private System.Windows.Forms.GroupBox groupBox8;
......
......@@ -134,21 +134,13 @@ namespace OnlineStore.AutoCountClient
}
btnPutTray.Enabled = false;
}
//if (!equipBean.OutEndSendShelfOut.Equals(chbBoxSendShelf.Checked)&&(!IsInCheck))
//{
// chbBoxSendShelf.Checked = equipBean.OutEndSendShelfOut;
//}
lblAgvInfo.Text = "AGV-" + equipBean.Config.LeftAgvName + " 状态:" + AgvClient.GetAction(equipBean.Config.LeftAgvName).ToString() +
"\t AGV-" + equipBean.Config.RightAgvName + " 状态:" + AgvClient.GetAction(equipBean.Config.RightAgvName).ToString() + "";
lblStoreStatus.Text = RobotBase.GetRunStr(equipBean.runStatus);
lblThisSta.Text = equipBean.WarnMsg;
string text = "";
if (!lblInstoreList.Text.Equals(text))
{
lblInstoreList.Text = text;
}
lblMoveInfo.Text = equipBean.GetMoveStr();
}
catch (Exception ex)
......
......@@ -64,13 +64,17 @@
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.groupBox6 = new System.Windows.Forms.GroupBox();
this.btnPrint = new System.Windows.Forms.Button();
this.label6 = new System.Windows.Forms.Label();
this.txtPringNum = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.txtPrintCode = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.comTP = new System.Windows.Forms.ComboBox();
this.comInP = new System.Windows.Forms.ComboBox();
this.chbAutoSend = new System.Windows.Forms.CheckBox();
this.lblMoveInfo = new System.Windows.Forms.Label();
this.lblTrayNum = new System.Windows.Forms.Label();
this.lblInstoreList = new System.Windows.Forms.Label();
this.btnOutStore = new System.Windows.Forms.Button();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.groupBox8 = new System.Windows.Forms.GroupBox();
......@@ -739,9 +743,9 @@
this.lblThisSta.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblThisSta.ForeColor = System.Drawing.Color.Red;
this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblThisSta.Location = new System.Drawing.Point(255, 136);
this.lblThisSta.Location = new System.Drawing.Point(255, 60);
this.lblThisSta.Name = "lblThisSta";
this.lblThisSta.Size = new System.Drawing.Size(1032, 166);
this.lblThisSta.Size = new System.Drawing.Size(1032, 121);
this.lblThisSta.TabIndex = 246;
this.lblThisSta.Text = "等待启动";
this.lblThisSta.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......@@ -775,13 +779,17 @@
this.groupBox6.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox6.Controls.Add(this.btnPrint);
this.groupBox6.Controls.Add(this.label6);
this.groupBox6.Controls.Add(this.txtPringNum);
this.groupBox6.Controls.Add(this.label3);
this.groupBox6.Controls.Add(this.txtPrintCode);
this.groupBox6.Controls.Add(this.label2);
this.groupBox6.Controls.Add(this.comTP);
this.groupBox6.Controls.Add(this.comInP);
this.groupBox6.Controls.Add(this.chbAutoSend);
this.groupBox6.Controls.Add(this.lblMoveInfo);
this.groupBox6.Controls.Add(this.lblTrayNum);
this.groupBox6.Controls.Add(this.lblInstoreList);
this.groupBox6.Controls.Add(this.lblThisSta);
this.groupBox6.Controls.Add(this.btnOutStore);
this.groupBox6.Location = new System.Drawing.Point(3, 3);
......@@ -791,6 +799,60 @@
this.groupBox6.TabStop = false;
this.groupBox6.Text = "消息";
//
// btnPrint
//
this.btnPrint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnPrint.BackColor = System.Drawing.Color.White;
this.btnPrint.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnPrint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnPrint.Location = new System.Drawing.Point(183, 440);
this.btnPrint.Name = "btnPrint";
this.btnPrint.Size = new System.Drawing.Size(110, 40);
this.btnPrint.TabIndex = 298;
this.btnPrint.Text = "标签打印测试";
this.btnPrint.UseVisualStyleBackColor = false;
this.btnPrint.Click += new System.EventHandler(this.btnPrint_Click);
//
// label6
//
this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(18, 463);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(44, 17);
this.label6.TabIndex = 297;
this.label6.Text = "数量:";
//
// txtPringNum
//
this.txtPringNum.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtPringNum.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtPringNum.Location = new System.Drawing.Point(69, 458);
this.txtPringNum.MaxLength = 6;
this.txtPringNum.Name = "txtPringNum";
this.txtPringNum.Size = new System.Drawing.Size(100, 26);
this.txtPringNum.TabIndex = 296;
//
// label3
//
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(18, 430);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(44, 17);
this.label3.TabIndex = 295;
this.label3.Text = "条码:";
//
// txtPrintCode
//
this.txtPrintCode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtPrintCode.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtPrintCode.Location = new System.Drawing.Point(69, 425);
this.txtPrintCode.MaxLength = 6;
this.txtPrintCode.Name = "txtPrintCode";
this.txtPrintCode.Size = new System.Drawing.Size(100, 26);
this.txtPrintCode.TabIndex = 294;
//
// label2
//
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
......@@ -864,18 +926,6 @@
this.lblTrayNum.TabIndex = 276;
this.lblTrayNum.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lblInstoreList
//
this.lblInstoreList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblInstoreList.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblInstoreList.ForeColor = System.Drawing.Color.Green;
this.lblInstoreList.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblInstoreList.Location = new System.Drawing.Point(255, 302);
this.lblInstoreList.Name = "lblInstoreList";
this.lblInstoreList.Size = new System.Drawing.Size(1032, 184);
this.lblInstoreList.TabIndex = 277;
//
// btnOutStore
//
this.btnOutStore.BackColor = System.Drawing.Color.White;
......@@ -1929,7 +1979,6 @@
private System.Windows.Forms.Button btnCloseAll;
private System.Windows.Forms.Label lblTrayNum;
private System.Windows.Forms.GroupBox groupBox6;
private System.Windows.Forms.Label lblInstoreList;
private System.Windows.Forms.TextBox txtDOIndex;
private System.Windows.Forms.TextBox txtDoName;
private System.Windows.Forms.Label label17;
......@@ -2035,6 +2084,11 @@
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox comTP;
private System.Windows.Forms.ComboBox comInP;
private System.Windows.Forms.Button btnPrint;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox txtPringNum;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtPrintCode;
}
}
......@@ -294,7 +294,7 @@ namespace OnlineStore.AutoCountClient
}
internal override void FormStatus(bool isStart)
{
{
btnStart.Enabled = true;
btnStop.Enabled = true;
if (isStart)
......@@ -730,6 +730,27 @@ namespace OnlineStore.AutoCountClient
LogUtil.info(equipBean.Name + "用户切换 放料完成送出料架 =" + isCheck);
}
}
private void btnPrint_Click(object sender, EventArgs e)
{
try
{
if (RobotManager.LastPrintStatus.Equals(Asa.PrintLabel.PrinterStatus.Print) || RobotManager.LastPrintStatus.Equals(Asa.PrintLabel.PrinterStatus.Printing))
{
MessageBox.Show("正在打印中,请稍后。。。");
return;
}
LogUtil.error("点击:打印标签");
string code = txtPrintCode.Text;
string num = txtPringNum.Text;
equipBean.StartPrintLabel(code, num);
}
catch (Exception ex)
{
LogUtil.error("打印标签错误:" + ex.ToString());
}
}
}
}
......
......@@ -63,6 +63,7 @@
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
this.标签编辑ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.帮助ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.清空日志ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
......@@ -357,7 +358,8 @@
this.二维码学习ToolStripMenuItem,
this.toolStripSeparator7,
this.toolStripMenuItem2,
this.toolStripSeparator6});
this.toolStripSeparator6,
this.标签编辑ToolStripMenuItem});
this.设置TToolStripMenuItem.Name = "设置TToolStripMenuItem";
this.设置TToolStripMenuItem.Size = new System.Drawing.Size(91, 25);
this.设置TToolStripMenuItem.Text = "设备调试 ";
......@@ -365,27 +367,33 @@
// 二维码学习ToolStripMenuItem
//
this.二维码学习ToolStripMenuItem.Name = "二维码学习ToolStripMenuItem";
this.二维码学习ToolStripMenuItem.Size = new System.Drawing.Size(160, 26);
this.二维码学习ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.二维码学习ToolStripMenuItem.Text = "二维码学习";
this.二维码学习ToolStripMenuItem.Click += new System.EventHandler(this.二维码学习ToolStripMenuItem_Click);
//
// toolStripSeparator7
//
this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(157, 6);
this.toolStripSeparator7.Size = new System.Drawing.Size(177, 6);
//
// toolStripMenuItem2
//
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(160, 26);
this.toolStripMenuItem2.Size = new System.Drawing.Size(180, 26);
this.toolStripMenuItem2.Text = "AGV调试";
this.toolStripMenuItem2.Click += new System.EventHandler(this.toolStripMenuItem2_Click);
//
// toolStripSeparator6
//
this.toolStripSeparator6.Name = "toolStripSeparator6";
this.toolStripSeparator6.Size = new System.Drawing.Size(157, 6);
this.toolStripSeparator6.Visible = false;
this.toolStripSeparator6.Size = new System.Drawing.Size(177, 6);
//
// 标签编辑ToolStripMenuItem
//
this.标签编辑ToolStripMenuItem.Name = "标签编辑ToolStripMenuItem";
this.标签编辑ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.标签编辑ToolStripMenuItem.Text = "标签编辑";
this.标签编辑ToolStripMenuItem.Click += new System.EventHandler(this.标签编辑ToolStripMenuItem_Click);
//
// 帮助ToolStripMenuItem
//
......@@ -517,6 +525,7 @@
private System.Windows.Forms.ToolStripMenuItem 版本号ToolStripMenuItem;
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.ToolStripMenuItem 标签编辑ToolStripMenuItem;
}
}
......@@ -22,7 +22,7 @@ namespace OnlineStore.AutoCountClient
internal partial class FrmRobotMain : Form
{
// internal static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
// internal static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private RobotBean robot = null;
private List<TabPage> tabPageList = new List<TabPage>();
private bool LoadOk = false;
......@@ -38,23 +38,23 @@ namespace OnlineStore.AutoCountClient
}
private void LoadStoreData()
{
{
robot = RobotManager.robot;
if (robot == null)
{
Application.Exit();
}
}
FrmInputEquip frm1 = new FrmInputEquip(robot.inputEquip);
AddForm(" " + robot.inputEquip.Name + " ", frm1);
FrmXRay test = new FrmXRay(robot.XrayBean);
AddForm(" " + robot.XrayBean.Name + " ", test);
FrmOutputEquip frm2 = new FrmOutputEquip(robot.outputEquip);
AddForm(" " + robot.outputEquip.Name + " ", frm2);
}
}
private void AddForm(string text, Form form)
{
text = text.PadLeft(10, ' ');
......@@ -89,14 +89,14 @@ namespace OnlineStore.AutoCountClient
this.Text = title;
this.notifyIcon1.Text = title;
int autoValue = ConfigAppSettings.GetIntValue(Setting_Init.App_AutoRun);
chbAutoRun.Checked = autoValue.Equals(1);
chbAutoRun.Checked = autoValue.Equals(1);
LoadStoreData();
LoadListView();
LogUtil.logBox = this.logBox;
LoadOk = true;
// HideForm();
// HideForm();
timer1.Start();
}
......@@ -106,13 +106,13 @@ namespace OnlineStore.AutoCountClient
AddHealder("设备名称", 90);
AddHealder("启用", 50);
AddHealder("报警", 110);
AddHealder("状态", 110);
AddHealder("状态", 110);
AddHealder("料盘信息", listView1.Size.Width - 110 - 110 - 50 - 90 - 10);
//AddHealder("BOX状态", listView1.Size.Width - 100 - 80 - 80 - 100 - 100 - 100 -40- 8);
AddRow(robot.inputEquip,robot.inputEquip.IsDebug);
AddRow(robot.inputEquip, robot.inputEquip.IsDebug);
AddRow(robot.XrayBean, robot.XrayBean.IsDebug);
AddRow(robot.outputEquip, robot.outputEquip.IsDebug);
AddRow(robot.outputEquip, robot.outputEquip.IsDebug);
}
private void AddHealder(string name, int widht)
{
......@@ -122,7 +122,7 @@ namespace OnlineStore.AutoCountClient
preSendwire.TextAlign = HorizontalAlignment.Left; //设置列的对齐方式
this.listView1.Columns.Add(preSendwire); //将列头添加到ListView控件。
}
private void AddRow(EquipBase equip,bool isDebug)
private void AddRow(EquipBase equip, bool isDebug)
{
ListViewItem lvi = new ListViewItem();
lvi.Text = equip.Name;
......@@ -174,23 +174,23 @@ namespace OnlineStore.AutoCountClient
//如果料仓还在运行状态,先关闭料仓
if (!robot.runStatus.Equals(RobotRunStatus.Wait))
{
LogUtil.info( "即将退出程序,停止" + robot.Name + "运行 ");
LogUtil.info("即将退出程序,停止" + robot.Name + "运行 ");
robot.StopRun();
}
foreach (EquipBase equip in robot.equipsMap.Values)
{
if (equip.runStatus > RobotRunStatus.Wait)
{
LogUtil.info( "即将退出程序,停止" + equip.Name + "运行 ");
LogUtil.info("即将退出程序,停止" + equip.Name + "运行 ");
equip.StopRun();
}
}
IOManager.instance.CloseAllConnection();
}
IOManager.instance.CloseAllConnection();
ACServerManager.CloseAllPort();
if (Camera._cam != null)
{
Camera._cam.CloseAll();
}
}
System.Environment.Exit(System.Environment.ExitCode);
}
catch (Exception ex)
......@@ -231,7 +231,7 @@ namespace OnlineStore.AutoCountClient
MessageBox.Show(robot.Name + "当前状态:" + robot.runStatus + ",不能启动!");
return;
}
LogUtil.info( "点击 开始启动");
LogUtil.info("点击 开始启动");
startTimer.Interval = 300;
startTimer.Elapsed += timer_Elapsed;
startTimer.AutoReset = false;
......@@ -374,7 +374,7 @@ namespace OnlineStore.AutoCountClient
LogUtil.error("LogM Error: ", ex);
}
}
private string AddMsg(string msg,string warmsg,AlarmType alarmType,DateTime lastTime)
private string AddMsg(string msg, string warmsg, AlarmType alarmType, DateTime lastTime)
{
if (warmsg.Equals("").Equals(false))
{
......@@ -396,14 +396,14 @@ namespace OnlineStore.AutoCountClient
{
return;
}
string canScanCode = "";
lblStatus.Text = robot.GetRunStr() + canScanCode;
string warnMsg =robot.WarnMsg;
string canScanCode = "";
lblStatus.Text = robot.GetRunStr() + canScanCode;
string warnMsg = robot.WarnMsg;
foreach (EquipBase move in robot.equipsMap.Values)
{
warnMsg= AddMsg(warnMsg, move.WarnMsg, move.alarmType, move.LastAlarmTime);
warnMsg = AddMsg(warnMsg, move.WarnMsg, move.alarmType, move.LastAlarmTime);
if(move is InputEquip)
if (move is InputEquip)
{
BatchMoveBean bean = robot.inputEquip.LeftBatchMove;
warnMsg = AddMsg(warnMsg, robot.inputEquip.LeftBatchMove.WarnMsg, robot.inputEquip.LeftBatchMove.alarmType, robot.inputEquip.LeftBatchMove.LastAlarmTime);
......@@ -411,7 +411,7 @@ namespace OnlineStore.AutoCountClient
}
}
lblWarnMsg.Text = warnMsg;
lblWarnMsg.Text = warnMsg;
if (robot.runStatus > RobotRunStatus.Wait)
{
if (启动AToolStripMenuItem.Enabled.Equals(true))
......@@ -447,7 +447,7 @@ namespace OnlineStore.AutoCountClient
int item_debug_index = 1;
int item_alarm_index = 2;
int item_runStr_index = 3;
int item_move_info_index = 4;
int item_move_info_index = 4;
int i = 0;
foreach (EquipBase equip in robot.equipsMap.Values)
{
......@@ -457,7 +457,7 @@ namespace OnlineStore.AutoCountClient
SetItemColor(i, equip.runStatus, equip.alarmType);
i++;
}
}
private void SetItemColor(int i, RobotRunStatus runStatus, AlarmType alarmType)
{
......@@ -561,7 +561,7 @@ namespace OnlineStore.AutoCountClient
about.ShowDialog();
}
private void 二维码学习ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Camera._cam != null)
......@@ -573,7 +573,7 @@ namespace OnlineStore.AutoCountClient
frm.Dispose();
}
private void 退出ToolStripMenuItem_Click_1(object sender, EventArgs e)
{
......@@ -585,8 +585,8 @@ namespace OnlineStore.AutoCountClient
{
ExitApp();
}
private void logBox_VisibleChanged(object sender, EventArgs e)
{
if (!LoadOk)
......@@ -600,7 +600,7 @@ namespace OnlineStore.AutoCountClient
}
private void 清空日志ToolStripMenuItem_Click(object sender, EventArgs e)
{
{
LogUtil.ClearLog();
}
......@@ -611,7 +611,7 @@ namespace OnlineStore.AutoCountClient
MessageBox.Show("已复制日志到粘贴板!");
}
private void toolStripMenuItem2_Click(object sender, EventArgs e)
{
FrmAgvTest frm = new FrmAgvTest();
......@@ -647,6 +647,17 @@ namespace OnlineStore.AutoCountClient
LogUtil.info("勾选:UseBuzzer =" + RobotManager.UseBuzzer);
ConfigAppSettings.SaveValue(Setting_Init.UseBuzzer, (RobotManager.UseBuzzer ? 1 : 0));
}
private void 标签编辑ToolStripMenuItem_Click(object sender, EventArgs e)
{
try
{
RobotManager.PrintBean.EditLabel();
}
catch (Exception ex)
{
LogUtil.error("标签编辑错误:" + ex.ToString());
}
}
}
}
......@@ -65,7 +65,7 @@ namespace OnlineStore.Common
public static string UseBuzzer = "UseBuzzer";
public static string http_server = "http_server";
public static string ServerAddr = "ServerAddr";
/// <summary>
/// 检测到料架自动入料
......@@ -75,5 +75,8 @@ namespace OnlineStore.Common
/// 进出轴待机点位,进出轴在此位置时,升降和旋转才可以走
/// </summary>
public static string InoutDefaultPosition = "InoutDefaultPosition";
public static string LabelName = "LabelName";
public static string PrinterName = "PrinterName";
}
}
......@@ -41,6 +41,9 @@
<Reference Include="Asa.IOModule.AIOBOX">
<HintPath>..\..\dll\Asa.IOModule.AIOBOX.dll</HintPath>
</Reference>
<Reference Include="Asa.PrintLabel">
<HintPath>..\..\dll\label\Asa.PrintLabel.dll</HintPath>
</Reference>
<Reference Include="Asa.RFID">
<HintPath>..\..\dll\Asa.RFID.dll</HintPath>
</Reference>
......@@ -113,6 +116,18 @@
<Content Include="halcon.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Label\20190618151304.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Label\20190918140941.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Label\20190928122649.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Label\20200520172352.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Common\Common.csproj">
......
<?xml version="1.0" encoding="utf-8"?>
<Label Name="test1" Size="50.000,70.000" Offset="0,0">
<Field Type="4" Key="QRCode{ORDERNO};{ORDERNUM};{MATERIALNO};{MATERIALDEC};{LOT};{STORAGE};{QTY};{BATCHNO};{SN}" Rect="1.52,1.522,20,20" Font="宋体,9,," />
<Field Type="5" Key="订单号:{ORDERNO}" Rect="23.368,2.032,25.24,6.698" Font="宋体,9,," />
<Field Type="5" Key="订单行号:{ORDERNUM}" Rect="23.622,10.668,24.986,8.476" Font="宋体,9,," />
<Field Type="5" Key="物料编码:{MATERIALNO}" Rect="1.524,22.606,46.83,4.666" Font="宋体,9,," />
<Field Type="5" Key="物料描述:{MATERIALDEC}" Rect="1.524,29.972,47.084,8.222" Font="宋体,9,," />
<Field Type="5" Key="厂家批次:{LOT}" Rect="1.524,39.37,46.83,4.412" Font="宋体,9,," />
<Field Type="5" Key="库位:{STORAGE}" Rect="1.778,45.212,46.576,5.174" Font="宋体,9,," />
<Field Type="5" Key="数量:{QTY}" Rect="1.778,51.054,46.83,5.174" Font="宋体,9,," />
<Field Type="5" Key="批次号:{BATCHNO}" Rect="1.778,57.658,46.322,10" Font="微软雅黑,12,," />
</Label>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Label Name="test2" Size="78.000,25.000" Offset="0,0">
<Field Type="4" Key="{vender}_{material}_{batch}_{qty}{sn}" Rect="3.048,0.508,22.112,22.272" Font="宋体,9,," />
<Field Type="5" Key="{aa}_{bb}" Rect="24.638,1.778,51.83,20.75" Font="黑体,12,," />
</Label>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Label Name="123" Size="50,70" Offset="0,0">
<Field Type="4" Key="{PURCHASEORDERNO};{PURCHASEORDERNUMBER};{MATERIALNO};{MATERIALDEC};{FACTORYLOT};{STORAGE};{SN};{QTY};{BATCHNO}" Rect="1.778,1.778,19.572,18.716" Font="宋体,9,," />
<Field Type="5" Key="采购订单号: {PURCHASEORDERNO}" Rect="22.606,1.778,24.906,17.7" Font="宋体,9,," />
<Field Type="5" Key="数量: {QTY}" Rect="2.286,55.88,45.226,5" Font="宋体,9,," />
<Field Type="5" Key="批次号: {BATCHNO}" Rect="1.778,62.992,45.48,5" Font="宋体,9,," />
<Field Type="5" Key="库位: {STORAGE}" Rect="1.778,49.53,45.48,5" Font="宋体,9,," />
<Field Type="5" Key="厂家批次: {FACTORYLOT}" Rect="2.032,43.18,45.48,5" Font="宋体,9,," />
<Field Type="5" Key="物料描述: {MATERIALDEC}" Rect="2.286,36.322,44.972,5" Font="宋体,9,," />
<Field Type="5" Key="物料编码: {MATERIALNO}" Rect="2.54,29.972,44.464,5" Font="宋体,9,," />
<Field Type="5" Key="订单行号: {PURCHASEORDERNUMBER}" Rect="2.794,22.86,43.956,5" Font="宋体,9,," />
</Label>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Label Name="x-ray" Size="60.000,25.000" Offset="0,0">
<Field Type="5" Key="测试:{text}" Rect="7.874,7.874,41.496,7.286" Font="宋体,15.75,," />
</Label>
\ No newline at end of file
类型,说明,名称,属性值,设备名称,描述,电器定义,代码定义,目标速度,加速时间,减速时间,原点低速度,原点高速,原点加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
,,,,,,,,,,,,,,,,,
AXIS,(轴一)取料旋转轴,Middle_Axis,1,COM1,,,,250,80,80,80,60,50,10,1000,0,0
AXIS,(轴二)取料上下轴,UpDown_Axis,2,COM1,,,,100,300,200,20,50,200,10,1000,0,0
AXIS,(轴三)取料进出轴,InOut_Axis,3,COM1,,,,100,300,200,20,50,200,10,1000,0,0
AXIS,(轴四)回温区旋转轴,Warming_Axis,4,COM1,,,,100,300,200,20,50,200,10,1000,0,0
AXIS,(轴五)冷藏区旋转轴,Colding_Axis,5,COM1,,,,100,300,200,20,50,200,10,1000,0,0
AXIS,(轴六)搅拌旋转轴,Stir_Axis,6,COM1,,,,100,300,200,20,50,200,10,1000,0,0
PRO,IO模块对应的DI数量,IO_DILength,192.168.200.21#16;192.168.200.22#8,,,,,,,,,,,,,,
PRO,模块对应的DO数量,IO_DOLength,192.168.200.21#16;192.168.200.22#8,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
DI,急停,SuddenStop_BTN,0,192.168.200.21,急停,X01,X01,,,,,,,,,,
DI,复位,Reset_BTN,1,192.168.200.21,复位,X02,X02,,,,,,,,,,
DI,自动启动,AutoRun_Signal,2,192.168.200.21,自动启动,X03,X03,,,,,,,,,,
DI,气压检测,Airpressure_Check,3,192.168.200.21,气压检测,X04,X04,,,,,,,,,,
DI,安全光栅,SafetyLightCurtains,4,192.168.200.21,安全光栅,X05,X05,,,,,,,,,,
DI,左侧门禁信号,Door_LeftLimit,5,192.168.200.21,左侧门禁信号,X06,X06,,,,,,,,,,
DI,右侧门禁信号,Door_RightLimit,6,192.168.200.21,右侧门禁信号,X07,X07,,,,,,,,,,
DI,左侧锡膏检测,TinCheck_DoorLeft,7,192.168.200.21,左侧锡膏检测,X08,X08,,,,,,,,,,
DI,右侧锡膏检测,TinCheck_DoorRight,8,192.168.200.21,右侧锡膏检测,X09,X09,,,,,,,,,,
DI,夹具检测,TinCheck_Fixture,9,192.168.200.21,夹具检测,X10,X10,,,,,,,,,,
DI,搅拌区锡膏检测,TinCheck_Stir,10,192.168.200.21,搅拌区锡膏检测,X11,X11,,,,,,,,,,
DI,进料口门上升端,Door_Up,11,192.168.200.21,进料口门上升端,X12,X12,,,,,,,,,,
DI,进料口门下降端,Door_Down,12,192.168.200.21,进料口门下降端,X13,X13,,,,,,,,,,
DI,夹爪气缸夹紧端,Clamping_Tighten,13,192.168.200.21,夹爪气缸夹紧端,X14,X14,,,,,,,,,,
DI,夹爪气缸放松端,Clamping_Relax,14,192.168.200.21,夹爪气缸放松端,X15,X15,,,,,,,,,,
DI,夹爪锡膏检测,TinCheck_Clamping,15,192.168.200.21,夹爪锡膏检测,X16,X16,,,,,,,,,,
,,,,,,,,,,,,,,,,,
DO,自动指示灯,AutoRun_HddLed,0,192.168.200.21,自动指示灯,Y01,Y01,,,,,,,,,,
DO,故障指示灯,Alarm_HddLed,1,192.168.200.21,故障指示灯,Y02,Y02,,,,,,,,,,
DO,待机指示灯,RunSign_HddLed,2,192.168.200.21,待机指示灯,Y03,Y03,,,,,,,,,,
DO,报警蜂鸣器,Alarm_Buzzer,3,192.168.200.21,报警蜂鸣器,Y04,Y04,,,,,,,,,,
DO,料仓运转ON,Run_Signal,4,192.168.200.21,料仓运转ON,Y05,Y05,,,,,,,,,,
DO,取料机构刹车电源ON,Axis_Brake,5,192.168.200.21,取料机构刹车电源ON,Y06,Y06,,,,,,,,,,
DO,相机照明开,Camera_Led,6,192.168.200.21,相机照明开,Y07,Y07,,,,,,,,,,
DO,门禁功能屏蔽,Door_Limit,7,192.168.200.21,门禁功能屏蔽,Y08,Y08,,,,,,,,,,
DO,冷气机启动,Colding_Start,8,192.168.200.21,冷气机启动,Y09,Y09,,,,,,,,,,
DO,回温区风机启动,Warming_Start,9,192.168.200.21,回温区风机启动,Y10,Y10,,,,,,,,,,
DO,进料口门上升SOL,Door_Up,10,192.168.200.21,进料口门上升SOL,Y11,Y11,,,,,,,,,,
DO,进料口门下降SOL,Door_Down,11,192.168.200.21,进料口门下降SOL,Y12,Y12,,,,,,,,,,
DO,夹爪气缸夹紧SOL,Clamping_Tighten,12,192.168.200.21,夹爪气缸夹紧SOL,Y13,Y13,,,,,,,,,,
DO,夹爪气缸放松SOL,Clamping_Relax,13,192.168.200.21,夹爪气缸放松SOL,Y14,Y14,,,,,,,,,,
DO,搅拌定位气缸上升SOL,StirLocation_Up,14,192.168.200.21,搅拌定位气缸上升SOL,Y15,Y15,,,,,,,,,,
DO,搅拌定位气缸下降SOL,StirLocation_Down,15,192.168.200.21,搅拌定位气缸下降SOL,Y16,Y16,,,,,,,,,,
,,,,,,,,,,,,,,,,,
DI,搅拌定位气缸上升端,StirLocation_Up,0,192.168.200.22,搅拌定位气缸上升端,X21,X21,,,,,,,,,,
DI,搅拌定位气缸下降端,StirLocation_Down,1,192.168.200.22,搅拌定位气缸下降端,X22,X22,,,,,,,,,,
DI,冷藏区门关闭端,ColdDoor_Close,2,192.168.200.22,冷藏区门关闭端,X23,X23,,,,,,,,,,
DI,冷藏区门打开端,ColdDoor_Open,3,192.168.200.22,冷藏区门打开端,X24,X24,,,,,,,,,,
,,,4,192.168.200.22,,X25,X25,,,,,,,,,,
,,,5,192.168.200.22,,X26,X26,,,,,,,,,,
,,,6,192.168.200.22,,X27,X27,,,,,,,,,,
,,,7,192.168.200.22,,X28,X28,,,,,,,,,,
DO,冷藏区门关闭SOL,ColdDoor_Close,0,192.168.200.22,冷藏区门关闭SOL,Y21,Y21,,,,,,,,,,
DO,冷藏区门打开SOL,ColdDoor_Open,1,192.168.200.22,冷藏区门打开SOL,Y22,Y22,,,,,,,,,,
,,,2,192.168.200.22,,Y23,Y23,,,,,,,,,,
,,,3,192.168.200.22,,Y24,Y24,,,,,,,,,,
,,,4,192.168.200.22,,Y25,Y25,,,,,,,,,,
,,,5,192.168.200.22,,Y26,Y26,,,,,,,,,,
,,,6,192.168.200.22,,Y27,Y27,,,,,,,,,,
,,,7,192.168.200.22,,Y28,Y28,,,,,,,,,,
,,,,,,,, ,,,,,,,,,
,,,,,,,,,,,,,,,,,
PRO,升降轴 进料口取料点 P1(夹具),UpDownAxis_OL_P1,403000,,,,,,,,,,,,,,
PRO,升降轴 进料口出料前点 P2(夹具),UpDownAxis_IH_P2,415000,,,,,,,,,,,,,,
PRO,升降轴 进料口取料缓冲点 P7(夹具),UpDownAxis_OH_P7,415000,,,,,,,,,,,,,,
PRO,升降轴 进料口出料缓冲点 P8(夹具),UpDownAxis_IL_P8,403000,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
PRO,升降轴 进料口取料点 P11(锡膏),UpDownAxis_OL_P11,403099,,,,,,,,,,,,,,
PRO,升降轴 进料口出料前点 P21(锡膏),UpDownAxis_IH_P21,415099,,,,,,,,,,,,,,
PRO,升降轴 进料口取料缓冲点 P71(锡膏),UpDownAxis_OH_P71,415099,,,,,,,,,,,,,,
PRO,升降轴 进料口出料缓冲点 P81(锡膏),UpDownAxis_IL_P81,403099,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
PRO,升降轴 搅拌位置高点P101(搅拌区),UpDownAxis_StirH_P101,415099,,,,,,,,,,,,,,
PRO,升降轴 搅拌位置低点P102(搅拌区),UpDownAxis_StirL_P102,403099,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
PRO,旋转轴 P1待机原位点(夹具取料点),MiddleAxis_P1,268000,,,,,,,,,,,,,,
PRO,旋转轴 P11左侧取放料点(左侧锡膏),MiddleAxis_P11,260000,,,,,,,,,,,,,,
PRO,旋转轴 P12右侧取放料点(右侧锡膏),MiddleAxis_P12,280000,,,,,,,,,,,,,,
PRO,旋转轴 P101搅拌取放料点(搅拌区),MiddleAxis_Stir_P101,280000,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
PRO,进出轴 P1待机原位点,InOutAxis_P1,1000,,,,,,,,,,,,,,
PRO,进出轴 P20(夹具取料点),InOutAxis_P20,2000,,,,,,,,,,,,,,
PRO,进出轴 P21(左侧锡膏取料点),InOutAxis_P21,2800,,,,,,,,,,,,,,
PRO,进出轴 P22(右侧锡膏取料点),InOutAxis_P22,2900,,,,,,,,,,,,,,
PRO,进出轴 P101(搅拌区取放料点),InOutAxis_Stir_P101,2900,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
PRO,(轴四)回温区旋转轴 P1待机原位点,Warming_Axis_P1,2000,,,,,,,,,,,,,,
PRO,(轴五)冷藏区旋转轴 P1待机原位点,Colding_Axis_P1,2000,,,,,,,,,,,,,,
PRO,(轴六)搅拌旋转轴 P1搅拌点1,Stir_Axis_P1,2000,,,,,,,,,,,,,,
PRO,(轴六)搅拌旋转轴 P2搅拌点2,Stir_Axis_P2,8000,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
PRO,是否有左右侧门,IsHasDoorLimit,1,,,,,,,,,,,,,,
PRO,设备是否处于调试状态(1=调试,0=正常),IsInDebug,0,,,,,,,,,,,,,,
PRO,气压检测IO关闭需要持续的时间,AirCheckSeconds,3,,,,,,,,,,,,,,
PRO,出入库多少次,会自动重置所有轴操作,Box_ResetACount,100,,,,, ,,,,,,,,,
PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,,,,,,,,,
PRO,是否使用料盘检测信号,IsUse_Tray_Check,0,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
PRO,(轴一)旋转轴目标速度,MiddleAxis_TargetSpeed,250,,,,,,,,,,,,,,
PRO,(轴一)旋转轴加速度,MiddleAxis_AddSpeed,80,,,,,,,,,,,,,,
PRO,(轴一)旋转轴减速度,MiddleAxis_DelSpeed,80,,,,,,,,,,,,,,
PRO,(轴一)旋转轴原点低速度,MiddleAxis_HomeLowSpeed,80,,,,,,,,,,,,,,
PRO,(轴一)旋转轴原点高速,MiddleAxis_HomeHighSpeed,60,,,,,,,,,,,,,,
PRO,(轴一)旋转轴原点加速度,MiddleAxis_HomeAddSpeed,50,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
PRO,(轴二)升降轴轴目标速度,UpdownAxis_TargetSpeed,150,,,,,,,,,,,,,,
PRO,(轴二)升降轴轴加速度,UpdownAxis_AddSpeed,400,,,,,,,,,,,,,,
PRO,(轴二)升降轴轴减速度,UpdownAxis_DelSpeed,400,,,,,,,,,,,,,,
PRO,(轴二)升降轴轴原点低速度,UpdownAxis_HomeLowSpeed,100,,,,,,,,,,,,,,
PRO,(轴二)升降轴轴原点高速,UpdownAxis_HomeHighSpeed,200,,,,,,,,,,,,,,
PRO,(轴二)升降轴轴原点加速度,UpdownAxis_HomeAddSpeed,200,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
PRO,(轴三)进出轴目标速度,InoutAxis_TargetSpeed,100,,,,,,,,,,,,,,
PRO,(轴三)进出轴加速度,InoutAxis_AddSpeed,300,,,,,,,,,,,,,,
PRO,(轴三)进出轴减速度,InoutAxis_DelSpeed,300,,,,,,,,,,,,,,
PRO,(轴三)进出轴原点低速,InoutAxis_HomeLowSpeed,20,,,,,,,,,,,,,,
PRO,(轴三)进出轴原点高速,InoutAxis_HomeHighSpeed,60,,,,,,,,,,,,,,
PRO,(轴三)进出轴原点加速度,InoutAxis_HomeAddSpeed,200,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
PRO,(轴四)回温区旋转轴目标速度,WarmingAxis_TargetSpeed,100,,,,,,,,,,,,,,
PRO,(轴四)回温区旋转轴加速度,WarmingAxis_AddSpeed,300,,,,,,,,,,,,,,
PRO,(轴四)回温区旋转轴减速度,WarmingAxis_DelSpeed,300,,,,,,,,,,,,,,
PRO,(轴四)回温区旋转轴原点低速,WarmingAxis_HomeLowSpeed,20,,,,,,,,,,,,,,
PRO,(轴四)回温区旋转轴原点高速,WarmingAxis_HomeHighSpeed,60,,,,,,,,,,,,,,
PRO,(轴四)回温区旋转轴原点加速度,WarmingAxis_HomeAddSpeed,200,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
PRO,(轴五)冷藏区旋转轴目标速度,ColdingAxis_TargetSpeed,100,,,,,,,,,,,,,,
PRO,(轴五)冷藏区旋转轴加速度,ColdingAxis_AddSpeed,300,,,,,,,,,,,,,,
PRO,(轴五)冷藏区旋转轴减速度,ColdingAxis_DelSpeed,300,,,,,,,,,,,,,,
PRO,(轴五)冷藏区旋转轴原点低速,ColdingAxis_HomeLowSpeed,20,,,,,,,,,,,,,,
PRO,(轴五)冷藏区旋转轴原点高速,ColdingAxis_HomeHighSpeed,60,,,,,,,,,,,,,,
PRO,(轴五)冷藏区旋转轴原点加速度,ColdingAxis_HomeAddSpeed,200,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
PRO,(轴六)搅拌区旋转轴目标速度,StirAxis_TargetSpeed,100,,,,,,,,,,,,,,
PRO,(轴六)搅拌区旋转轴加速度,StirAxis_AddSpeed,300,,,,,,,,,,,,,,
PRO,(轴六)搅拌区旋转轴减速度,StirAxis_DelSpeed,300,,,,,,,,,,,,,,
PRO,(轴六)搅拌区旋转轴原点低速,StirAxis_HomeLowSpeed,20,,,,,,,,,,,,,,
PRO,(轴六)搅拌区旋转轴原点高速,StirAxis_HomeHighSpeed,60,,,,,,,,,,,,,,
PRO,(轴六)搅拌区旋转轴原点加速度,StirAxis_HomeAddSpeed,200,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
PRO,升降轴(轴2)P1速度,UpDownAxis_P1_Speed,250,,,,,,,,,,,,,,
PRO,升降轴(轴2)P2速度,UpDownAxis_P2_Speed,250,,,,,,,,,,,,,,
PRO,升降轴(轴2)P3速度,UpDownAxis_P3_Speed,250,,,,,,,,,,,,,,
PRO,升降轴(轴2)P4速度,UpDownAxis_P4_Speed,150,,,,,,,,,,,,,,
PRO,升降轴(轴2)P5速度,UpDownAxis_P5_Speed,250,,,,,,,,,,,,,,
PRO,升降轴(轴2)P6速度,UpDownAxis_P6_Speed,100,,,,,,,,,,,,,,
PRO,升降轴(轴2)P7速度,UpDownAxis_P7_Speed,100,,,,,,,,,,,,,,
PRO,升降轴(轴2)P8速度,UpDownAxis_P8_Speed,100,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
PRO,旋转轴(轴1)P1速度,MiddleAxis_P1_Speed,120,,,,,,,,,,,,,,
PRO,旋转轴(轴1)P2速度,MiddleAxis_P2_Speed,120,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
PRO,进出轴(轴3)P1速度,InOutAxis_P1_Speed,100,,,,,,,,,,,,,,
PRO,进出轴(轴3)P2速度,InOutAxis_P2_Speed,100,,,,,,,,,,,,,,
PRO,进出轴(轴3)P3速度,InOutAxis_P3_Speed,1000,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
PRO,回温区旋转轴(轴4)P1速度,WarmingAxis_P1_Speed,120,,,,,,,,,,,,,,
PRO,回温区旋转轴(轴4)P2速度,WarmingAxis_P2_Speed,120,,,,,,,,,,,,,,
PRO,冷藏区旋转轴(轴5)P1速度(匀速运动速度),ColdingAxis_P1_Speed,20,,,,,,,,,,,,,,
PRO,冷藏区旋转轴(轴5)P2速度,ColdingAxis_P2_Speed,120,,,,,,,,,,,,,,
PRO,搅拌区旋转轴(轴6)P1速度(匀速运动速度),StirAxis_P1_Speed,20,,,,,,,,,,,,,,
PRO,搅拌区旋转轴(轴6)P2速度,StirAxis_P2_Speed,120,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
PRO,伺服停止时可误差的脉冲数的最小值,Axis_ErrorCountMin,10,,,,,,,,,,,,,,
PRO,伺服停止时可误差的脉冲数的最大值,Axis_ErrorCountMax,1000,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
PRO,(轴一)旋转轴最小限位,MiddleAxis_PositionMin,0,,,,,,,,,,,,,,
PRO,(轴二)升降轴最小限位,UpdownAxis_PositionMin,0,,,,,,,,,,,,,,
PRO,(轴三)进出轴最小限位,InoutAxis_PositionMin,0,,,,,,,,,,,,,,
PRO,(轴一)旋转轴最大限位,MiddleAxis_PositionMax,0,,,,,,,,,,,,,,
PRO,(轴二)升降轴最大限位,UpdownAxis_PositionMax,0,,,,,,,,,,,,,,
PRO,(轴三)进出轴最大限位,InoutAxis_PositionMax,0,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,,,,,,,,,
PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,, ,,,,,,,,,
,,,,,,,,,,,,,,,,,
PRO,冷藏区温湿度端口号,Humiture_Colding_Port,COM3,,,,,,,,,,,,,,
PRO,回温区温湿度端口号,Humiture_Warming_Port,COM4,,,,,,,,,,,,,,
PRO,左侧测重控制器,Weight_Left_Port,COM5,,,,,,,,,,,,,,
PRO,右侧测重控制器,Weight_Right_Port,COM6,,,,,,,,,,,,,,
,,,,,,,, ,,,,,,,,,
PRO,默认盘宽度,Default_TrayWidth,13,,,,,,,,,,,,,,
PRO,默认盘高度,Default_TrayHeight,50,,,,,,,,,,,,,,
......@@ -479,6 +479,7 @@ namespace OnlineStore.DeviceLibrary
// msg += "标签信息:" + Out_ReelInfo.ToStr() + " \r\n";
msg += "当前料架:" + WorkShelfId + ",累积出料 "+OutReelCount+" 盘共 "+OutReelHeight+" mm \r\n";
msg += "打印机["+RobotManager.PrintName+"]:" + RobotManager.LastPrintStatus + "\n";
return msg;
}
......
......@@ -356,8 +356,9 @@ namespace OnlineStore.DeviceLibrary
else if (SecMoveInfo.IsStep(StepEnum.OL02_TakeForward))
{
SecMoveInfo.NextMoveStep(StepEnum.OL03_PrintLabel);
SecWorkLog("贴标: 打印标签 ,等待2000ms");
SecWorkLog("贴标: 开始打印标签 ,等待2000ms");
SecMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
StartPrintLabel(SecMoveInfo.MoveParam.WareCode, SecMoveInfo.MoveParam.WareCount.ToString());
}
else if (SecMoveInfo.IsStep(StepEnum.OL03_PrintLabel))
{
......@@ -502,7 +503,22 @@ namespace OnlineStore.DeviceLibrary
SecMoveInfo.EndMove();
}
}
#endregion
}
public void StartPrintLabel(string wareCode, string wareCount)
{
try
{
Dictionary<string, string> text = new Dictionary<string, string>();
text.Add("aa", wareCode);
text.Add("bb", wareCount );
RobotManager.PrintBean.Print(text);
}
catch (Exception ex)
{
LogUtil.error("打印标签 StartPrintLabel 错误:" + ex.ToString());
}
}
#endregion
}
}
......@@ -96,18 +96,23 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo.NextMoveStep(StepEnum.XR03_LineRun);
WorkLog(" XRay复位: 皮带转动3秒");
if (IOValue(IO_Type.X_InLine_Check).Equals(IO_VALUE.LOW))
if (IOValue(IO_Type.X_ReelCheck).Equals(IO_VALUE.LOW))
{
IOMove(IO_Type.X_InLine_Run, IO_VALUE.HIGH);
if (IOValue(IO_Type.X_InLine_Check).Equals(IO_VALUE.LOW))
{
IOMove(IO_Type.X_InLine_Run, IO_VALUE.HIGH);
}
IOMove(IO_Type.X_MLine_Run, IO_VALUE.HIGH);
}
IOMove(IO_Type.X_MLine_Run, IO_VALUE.HIGH);
IOMove(IO_Type.X_OLine_Run, IO_VALUE.HIGH);
IOMove(IO_Type.X_OLine_Run, IO_VALUE.HIGH);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
}
else if (MoveInfo.IsStep(StepEnum.XR03_LineRun))
{
MoveInfo.NextMoveStep(StepEnum.XR04_LineStop);
WorkLog(" XRay复位: 皮带停止转动");
IOMove(IO_Type.X_InLine_Run, IO_VALUE.LOW);
IOMove(IO_Type.X_MLine_Run, IO_VALUE.LOW);
IOMove(IO_Type.X_OLine_Run, IO_VALUE.LOW);
......
......@@ -16,11 +16,10 @@ namespace OnlineStore.DeviceLibrary
public class RobotManager
{
public static bool UseBuzzer = ConfigAppSettings.GetIntValue(Setting_Init.UseBuzzer).Equals(1);
private static bool isInit = false;
//public static bool IsConnectServer = !ConfigAppSettings.GetValue(Setting_Init.http_server).Equals("");
private static bool isInit = false;
public static RobotBean robot = null;
public static Robot_Config Config = null;
public static Robot_Config Config = null;
public static Dictionary<int, DeviceConfig> allConfigMap = null;
public RobotManager()
{
......@@ -28,14 +27,14 @@ namespace OnlineStore.DeviceLibrary
public static void CheckEnum(Type type)
{
if (type.IsEnum)
{
{
List<int> valueList = new List<int>();
Array array = Enum.GetValues(type);
foreach (int item in array)
{
if (valueList.Contains(item))
{
LogUtil.error( type.Name + "枚举值:" + item + "重复存在,请检查代码!程序退出。");
LogUtil.error(type.Name + "枚举值:" + item + "重复存在,请检查代码!程序退出。");
Application.Exit();
break;
}
......@@ -48,28 +47,27 @@ namespace OnlineStore.DeviceLibrary
try
{
if (!isInit)
{
{
DeviceConfig.SubDIList = new Dictionary<int, Dictionary<string, ConfigIO>>();
DeviceConfig.SubDOList = new Dictionary<int, Dictionary<string, ConfigIO>>();
DeviceConfig.ProIOIpMap = new Dictionary<string, string>();
DeviceConfig.ProIOIpMap = new Dictionary<string, string>();
allConfigMap = new Dictionary<int, DeviceConfig>();
string server = ConfigAppSettings.GetValue(Setting_Init.http_server);
CheckEnum(typeof(RobotMoveInfo));
// CheckEnum(typeof(LineStatus));
CheckEnum(typeof(RobotMoveInfo));
CheckEnum(typeof(RobotRunStatus));
isInit = true;
string appPath = Application.StartupPath;
string appPath = Application.StartupPath;
string linefilePath = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_Robot);
Config = CSVConfigReader.LoadRobotConfig(0, DeviceType.Line, linefilePath);
Config = CSVConfigReader.LoadRobotConfig(0, DeviceType.Line, linefilePath);
Config.SetAxisParam();
allConfigMap.Add(0, Config);
int subType = 1;
string inconfig = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_InputEquip);
InputEquip_Config inputConfig = CSVConfigReader.LoadInputConfig(subType, DeviceType.InputDevice, inconfig);
......@@ -88,7 +86,8 @@ namespace OnlineStore.DeviceLibrary
outconfig.SetIO(subType);
allConfigMap.Add(subType, outconfig);
ACServerManager.LogEvent += ACServerManager_LogEvent;
robot = new RobotBean(Config, inputConfig, XrayConfig, outconfig);
robot = new RobotBean(Config, inputConfig, XrayConfig, outconfig);
InitPrint();
LogUtil.info("加载 完成!");
return true;
......@@ -126,10 +125,10 @@ namespace OnlineStore.DeviceLibrary
public static void SaveXRayConfig(XRay_Config config)
{
try
{
{
string configpath = Application.StartupPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_XRay);
allConfigMap[config.Id] = config;
bool result = CSVConfigReader.SaveConfig(configpath, config,typeof(XRay_Config));
bool result = CSVConfigReader.SaveConfig(configpath, config, typeof(XRay_Config));
if (!result)
{
LogUtil.error("保存配置文件失败:" + configpath);
......@@ -137,17 +136,17 @@ namespace OnlineStore.DeviceLibrary
}
catch (Exception ex)
{
LogUtil.error("出错:",ex);
LogUtil.error("出错:", ex);
}
}
public static void SaveInputConfig(InputEquip_Config config)
{
try
{
string configpath = Application.StartupPath+ConfigAppSettings.GetValue(Setting_Init.ConfigPath_InputEquip);
{
string configpath = Application.StartupPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_InputEquip);
allConfigMap[config.Id] = config;
bool result = CSVConfigReader.SaveConfig(configpath, config,typeof(InputEquip_Config));
bool result = CSVConfigReader.SaveConfig(configpath, config, typeof(InputEquip_Config));
if (!result)
{
LogUtil.error("保存配置文件失败:" + configpath);
......@@ -155,16 +154,16 @@ namespace OnlineStore.DeviceLibrary
}
catch (Exception ex)
{
LogUtil.error("出错:",ex);
LogUtil.error("出错:", ex);
}
}
public static void SaveOutputConfig(OutputEquip_Config config)
{
try
{
{
string configpath = Application.StartupPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_OutputEquip);
allConfigMap[config.Id] = config;
bool result = CSVConfigReader.SaveConfig(configpath, config,typeof(OutputEquip_Config));
bool result = CSVConfigReader.SaveConfig(configpath, config, typeof(OutputEquip_Config));
if (!result)
{
LogUtil.error("保存配置文件失败:" + configpath);
......@@ -172,16 +171,41 @@ namespace OnlineStore.DeviceLibrary
}
catch (Exception ex)
{
LogUtil.error("出错:",ex);
LogUtil.error("出错:", ex);
}
}
private static List<int> trayHeightList = new List<int>() { 8, 12, 16, 24, 32, 44, 56 };
public static List<int> GetTrayList()
{
return trayHeightList;
}
public static string PrintName = ConfigAppSettings.GetValue(Setting_Init.PrinterName);
public static Asa.PrintLabel PrintBean = null;
public static void InitPrint()
{
PrintBean = new Asa.PrintLabel(Application.StartupPath + "\\Label");
PrintBean.PrintStatusChanged += Print_PrintStatusChanged;
string labelName = ConfigAppSettings.GetValue(Setting_Init.LabelName);
PrintBean.LoadLabel(labelName);
PrintBean.Printer(PrintName, false);
LogUtil.info("打印机初始化完成【" + labelName + "】【" + PrintName + "】");
}
public static Asa.PrintLabel.PrinterStatus LastPrintStatus = Asa.PrintLabel.PrinterStatus.Unknown;
private static void Print_PrintStatusChanged(Asa.PrintLabel.PrinterStatus sta)
{
if (sta.Equals(LastPrintStatus).Equals(false))
{
LogUtil.info("收到打印机状态:" + sta + ",之前状态【" + LastPrintStatus + "】更新并保存状态");
}
LastPrintStatus = sta;
// MessageBox.Show(sta.ToString());
}
}
}
......@@ -10,67 +10,19 @@ namespace OnlineStore.DeviceLibrary
{
public class SServerManager
{
//http://localhost/myproject/service/store/emptyPosForPutin
private static string Addr_PosForPutin = "/service/store/emptyPosForPutin";
/// <summary>
/// 1 皮带线扫码后调用,用于获取尺寸后升起气缸
/// 地址: /rest/api/qisda/device/getSize
/// </summary>
private static string Addr_getSize = "/rest/api/qisda/device/getSize";
/// <summary>
/// 2 料盘流转位置信息更新
/// 地址: /rest/api/qisda/device/updateLocInfo
/// </summary>
private static string Addr_updateLocInfo = "/rest/api/qisda/device/updateLocInfo";
/// <summary>
/// 3 放入料架(A,B,C,D)后调用,根据返回值决定当前料架是否放满,以及后续是否还有任务
// 地址: /rest/api/qisda/device/putShelfFinished
/// </summary>
private static string Addr_putShelfFinished = "/rest/api/qisda/device/putShelfFinished";
//是否测值:
//http://10.85.17.233/ESMTCommonInterface/CommonService.asmx?op=VMICheckRLC
//结果上传:
//http://10.85.17.233/ReturnOne/WebServiceF.asmx?op=Return_Material
private static string GetAddr(string addr, Dictionary<string, string> paramsMap)
{
string server = ConfigAppSettings.GetValue(Setting_Init.http_server);
if (server.EndsWith("/"))
{
server = server.Substring(0, server.Length - 1);
}
string path = server + addr.Trim() + "?";
foreach (string paramName in paramsMap.Keys)
{
string par = System.Web.HttpUtility.UrlEncode(paramsMap[paramName], System.Text.Encoding.UTF8);
path += paramName + "=" + par + "&";
}
path = path.Substring(0, path.Length - 1);
return path;
}
//##
private static string spiltStr = "##";
public static string CodeReceived(string deviceName, int trayNum, List<string> codeList, int height, int width, string rfid, int feedEquipId)
{
string msg = "";
return "";
}
public static string ProcessCodeList(List<string> codeList)
{
string codeStr = "";
List<string> list = new List<string>();
foreach (string str in codeList)
{
if (list.Contains(str.Trim()) || String.IsNullOrEmpty(str.Trim()))
{
continue;
}
codeStr = codeStr + str.Trim() + spiltStr;
}
return codeStr;
}
public static string GetTraySize(string deviceName, int robotIndex, string codeStr, out int outSize)
private static string Addr_VMICheckRLC = "/service/store/emptyPosForPutin";
private static string Addr_Return_Material = "/rest/api/qisda/device/getSize";
public static string Get_VMICheckRLC(string deviceName, string codeStr, out bool need)
{
outSize = 0;
need = false;
string msg = "";
try
{
......@@ -79,33 +31,17 @@ namespace OnlineStore.DeviceLibrary
return msg = deviceName + "未扫到条码";
}
Dictionary<string, string> paramMap = new Dictionary<string, string>();
paramMap.Add("robotIndex", robotIndex.ToString());// 参数: robotIndex = 机器人编号,IP为51的机器人为1, 52的机器人为2, 53的机器人为3
paramMap.Add("barcode", codeStr);// barcode = 扫到的条码
string server = GetAddr(Addr_getSize, paramMap);
string server = GetAddr(Addr_VMICheckRLC, paramMap);
DateTime startTime = DateTime.Now;
string resultStr = HttpHelper.Post(server, "");
LogUtil.info("GetTraySize " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
LogUtil.info("Get_VMICheckRLC " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
//返回: { "code": 0, "msg":"ok", data: 7}
ServerData serverResult = JsonHelper.DeserializeJsonToObject<ServerData>(resultStr);
if (serverResult == null)
{
return msg = deviceName + " 【" + robotIndex + "】 条码【 " + codeStr + "】没有收到服务器反馈";
}
else if (serverResult.code.Equals(0).Equals(false))
{
// code: 0为正常,其他为异常,
// msg:消息,
return msg = deviceName + " 【" + robotIndex + "】 条码【 " + codeStr + "】返回:" + "[" + serverResult.code + "]" + serverResult.msg;
}
if (!serverResult.data.Equals(""))
{
// data:料盘直径,= 7时升起气缸
outSize = Convert.ToInt32(serverResult.data);
LogUtil.info(deviceName + "【" + robotIndex + "】 条码【 " + codeStr + "】,获得尺寸:" + outSize);
}
}
catch (Exception ex)
{
......@@ -115,7 +51,7 @@ namespace OnlineStore.DeviceLibrary
}
public static string UpdateTrayLoc(string deviceName, string barcode, string status, string locInfo)
public static string Return_Material(string deviceName, string barcode, int count)
{
string msg = "";
try
......@@ -126,24 +62,15 @@ namespace OnlineStore.DeviceLibrary
}
Dictionary<string, string> paramMap = new Dictionary<string, string>();
paramMap.Add("barcode", barcode);//barcode = 料盘的条码
paramMap.Add("status", status); // status = 状态信息, 移栽 = MOVING, 流水线 = INLINE, 皮带线 = INBELT
paramMap.Add("locInfo", locInfo); // locInfo = 位置信息,移栽时为移栽编号,流水线时为托盘号,皮带线时为皮带线编号,机器人时为机器人编号
string server = GetAddr(Addr_updateLocInfo, paramMap);
paramMap.Add("barcode", barcode);
paramMap.Add("count", count.ToString());
string server = GetAddr(Addr_Return_Material, paramMap);
DateTime startTime = DateTime.Now;
string resultStr = HttpHelper.Post(server, "");
LogUtil.info("UpdateTrayLoc " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
LogUtil.info("Return_Material " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
// 返回: { "code": 0, "msg":"ok", "data":""}
ServerData serverResult = JsonHelper.DeserializeJsonToObject<ServerData>(resultStr);
if (serverResult == null)
{
msg = deviceName + "UpdateTrayLoc【 " + barcode + "】【" + status + "】【" + locInfo + "】没有收到服务器反馈";
}
else if (serverResult.code.Equals(0).Equals(false))
{
// code: 0为正常,其他为异常, msg: 消息, data: 为空
msg = deviceName + " UpdateTrayLoc【 " + barcode + "】【" + status + "】【" + locInfo + "】 :" + "[" + serverResult.code + "]" + serverResult.msg;
}
if (!msg.Equals(""))
{
LogUtil.error(msg);
......@@ -156,236 +83,101 @@ namespace OnlineStore.DeviceLibrary
return msg;
}
private static string Addr_clearPutInRfid = "/service/store/qisda/clearPutInRfid";
public static string clearPutInRfid(string deviceName, string rfid)
{
string msg = "";
try
{
if (String.IsNullOrEmpty(rfid))
{
return msg;
}
Dictionary<string, string> paramMap = new Dictionary<string, string>();
paramMap.Add("rfid", rfid);//rfid
string server = GetAddr(Addr_clearPutInRfid, paramMap);
DateTime startTime = DateTime.Now;
string resultStr = HttpHelper.Post(server, "");
LogUtil.info(deviceName + "clearPutInRfid " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
}
catch (Exception ex)
{
LogUtil.error(deviceName + " " + ex.ToString());
}
return msg;
}
//皮带线获取尺寸后,料盘到达机器人取料位置进调用,如果未扫到码,或者没等到取料位置信号亮,可以不用调用
//> 地址:
//>>/rest/api/qisda/device/arriveRobotLocation
//>
//> 参数:
//>> - robotIndex=机器人编号,IP为51的机器人为1, 52的机器人为2, 53的机器人为3
//>
//> 返回:
//>>``
private static string Addr_arriveRobotLocation = "/rest/api/qisda/device/arriveRobotLocation";
public static string arriveRobotLocation(string deviceName, int robotIndex, string barcode)
{
string msg = "";
try
{
if (robotIndex <= 0)
{
return msg;
}
DateTime startTime = DateTime.Now;
Dictionary<string, string> paramMap = new Dictionary<string, string>();
paramMap.Add("robotIndex", robotIndex.ToString());//rfid
paramMap.Add("barcode", barcode);
string server = GetAddr(Addr_arriveRobotLocation, paramMap);
string resultStr = HttpHelper.Post(server, "");
LogUtil.info(deviceName + "arriveRobotLocation " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
}
catch (Exception ex)
{
LogUtil.error(deviceName + " " + ex.ToString());
}
return msg;
}
// 分盘料/紧急料放上料串或料架时调用 /rest/api/qisda/device/afterPutCut
private static string Addr_afterPutCut = "/rest/api/qisda/device/afterPutCut";
public static string afterPutCut(string deviceName, string rfid, string barcode, string cid, int rfidLoc, out TaskData afterData)
private static string GetAddr(string addr, Dictionary<string, string> paramsMap)
{
afterData = null;
string msg = "";
try
string server = ConfigAppSettings.GetValue(Setting_Init.ServerAddr);
if (server.EndsWith("/"))
{
//参数:
//cid: 料仓cid,流水线可传入空
//barcode : 条码
//rfid : RFID
//rfidLoc: 料架位置,流水线可传-1
Dictionary<string, string> paramMap = new Dictionary<string, string>();
paramMap.Add("barcode", barcode); // 参数: barcode=料盘的条码
paramMap.Add("rfid", rfid); // rfid = 料架的RFID信息
paramMap.Add("rfidLoc", rfidLoc.ToString()); // rfidLoc=料架的架位信息
paramMap.Add("cid", cid); // 料仓cid,流水线可传入空
string server = GetAddr(Addr_afterPutCut, paramMap);
DateTime startTime = DateTime.Now;
string resultStr = HttpHelper.Post(server, "");
if (barcode != "")
{
LogUtil.info(deviceName + "afterPutCut " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
}
else
{
LogUtil.debug(deviceName + "afterPutCut " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
}
//> 返回:
//>>` {"code": 0, "msg":"ok", "data":{"cutPackageTask":"0","urgentPackageTask":"20","cutTask":"21","urgentTask":"22"}} `
//>>
//>> - code: 0为正常,其他为异常,
//>> - msg:消息,
//>> - data:为包装料仓的空闲仓位数(key为与客户端一致的料仓标识, value为空闲仓位)
//>> - cutPackageTask: 表示当前包装仓的分盘任务数
//>> - urgentPackageTask: 表示当前包装仓的紧急料任务数
//>> - cutTask: 表示流水线分盘任务数
//>> - urgentTask: 表示流水线紧急料任务数
AfterPutData serverResult = JsonHelper.DeserializeJsonToObject<AfterPutData>(resultStr);
if (serverResult == null)
{
return msg = deviceName + "afterPutCut【 " + barcode + "】【" + rfid + "】【" + rfidLoc + "】没有收到服务器反馈";
}
else if (serverResult.code.Equals(0).Equals(false))
{
return msg = deviceName + " afterPutCut【 " + barcode + "】【" + rfid + "】【" + rfidLoc + "】 :" + serverResult.msg;
}
afterData = serverResult.data;
return "";
server = server.Substring(0, server.Length - 1);
}
catch (Exception ex)
string path = server + addr.Trim() + "?";
foreach (string paramName in paramsMap.Keys)
{
LogUtil.error(deviceName + " " + ex.ToString());
string par = System.Web.HttpUtility.UrlEncode(paramsMap[paramName], System.Text.Encoding.UTF8);
path += paramName + "=" + par + "&";
}
return msg;
path = path.Substring(0, path.Length - 1);
return path;
}
// 分盘料/紧急料启动时获取料架的虚拟RFID调用 地址: /rest/api/qisda/device/findTempRfid
private static string Addr_findTempRfid = "/rest/api/qisda/device/findTempRfid";
public static string findTempRfid(string deviceName, string rfid, out string tempRfid)
private static string spiltStr = "##";
public static string ProcessCodeList(List<string> codeList)
{
tempRfid = "";
string msg = "";
try
string codeStr = "";
List<string> list = new List<string>();
foreach (string str in codeList)
{
// 参数: rfid: RFID
// 返回: "code": 0, "msg":"ok", "data":{ "tempRfid":""}
// code: 0为正常,其他为异常,
//msg: 消息,
//data: tempRfid: 表示当前料架(料串)对应的虚拟RFID
Dictionary<string, string> paramMap = new Dictionary<string, string>();
paramMap.Add("rfid", rfid); // rfid: RFID
string server = GetAddr(Addr_findTempRfid, paramMap);
DateTime startTime = DateTime.Now;
string resultStr = HttpHelper.Post(server, "");
LogUtil.info(deviceName + "findTempRfid " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
RfidData data = JsonHelper.DeserializeJsonToObject<RfidData>(resultStr);
if (data == null)
{
return msg = deviceName + "findTempRfid【 " + rfid + "】 没有收到服务器反馈";
}
else if (data.code.Equals(0).Equals(false))
{
return msg = deviceName + " findTempRfid【 " + rfid + "】 :" + data.msg;
}
if (data.data != null && data.data.ContainsKey("tempRfid"))
if (list.Contains(str.Trim()) || String.IsNullOrEmpty(str.Trim()))
{
tempRfid = data.data["tempRfid"];
continue;
}
return "";
}
catch (Exception ex)
{
LogUtil.error(deviceName + " " + ex.ToString());
codeStr = codeStr + str.Trim() + spiltStr;
}
return msg;
return codeStr;
}
//// 分盘料/紧急料放上料串或料架时调用 /rest/api/qisda/device/afterPutCut
//private static string Addr_afterPutCut = "/rest/api/qisda/device/afterPutCut";
//public static string afterPutCut(string deviceName, string rfid, string barcode, string cid, int rfidLoc, out TaskData afterData)
//{
// afterData = null;
// string msg = "";
// try
// {
// //参数:
// //cid: 料仓cid,流水线可传入空
// //barcode : 条码
// //rfid : RFID
// //rfidLoc: 料架位置,流水线可传-1
// Dictionary<string, string> paramMap = new Dictionary<string, string>();
// paramMap.Add("barcode", barcode); // 参数: barcode=料盘的条码
// paramMap.Add("rfid", rfid); // rfid = 料架的RFID信息
// paramMap.Add("rfidLoc", rfidLoc.ToString()); // rfidLoc=料架的架位信息
// paramMap.Add("cid", cid); // 料仓cid,流水线可传入空
// string server = GetAddr(Addr_afterPutCut, paramMap);
// DateTime startTime = DateTime.Now;
// string resultStr = HttpHelper.Post(server, "");
// if (barcode != "")
// {
// LogUtil.info(deviceName + "afterPutCut " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
// }
// else
// {
// LogUtil.debug(deviceName + "afterPutCut " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
// }
// //> 返回:
// //>>` {"code": 0, "msg":"ok", "data":{"cutPackageTask":"0","urgentPackageTask":"20","cutTask":"21","urgentTask":"22"}} `
// //>>
// //>> - code: 0为正常,其他为异常,
// //>> - msg:消息,
// //>> - data:为包装料仓的空闲仓位数(key为与客户端一致的料仓标识, value为空闲仓位)
// //>> - cutPackageTask: 表示当前包装仓的分盘任务数
// //>> - urgentPackageTask: 表示当前包装仓的紧急料任务数
// //>> - cutTask: 表示流水线分盘任务数
// //>> - urgentTask: 表示流水线紧急料任务数
// AfterPutData serverResult = JsonHelper.DeserializeJsonToObject<AfterPutData>(resultStr);
// if (serverResult == null)
// {
// return msg = deviceName + "afterPutCut【 " + barcode + "】【" + rfid + "】【" + rfidLoc + "】没有收到服务器反馈";
// }
// else if (serverResult.code.Equals(0).Equals(false))
// {
// return msg = deviceName + " afterPutCut【 " + barcode + "】【" + rfid + "】【" + rfidLoc + "】 :" + serverResult.msg;
// }
// afterData = serverResult.data;
// return "";
// }
// catch (Exception ex)
// {
// LogUtil.error(deviceName + " " + ex.ToString());
// }
// return msg;
//}
// 取消任务地址: /cancelPutInTask //参数: barcode
private static string Addr_cancelPutInTask = "/cancelPutInTask";
public static string cancelPutInTask(string deviceName, string barcode)
{
string msg = "";
try
{
Dictionary<string, string> paramMap = new Dictionary<string, string>();
paramMap.Add("barcode", barcode);
string server = GetAddr(Addr_cancelPutInTask, paramMap);
DateTime startTime = DateTime.Now;
string resultStr = HttpHelper.Post(server, "");
LogUtil.info(deviceName + "cancelPutInTask " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
RfidData data = JsonHelper.DeserializeJsonToObject<RfidData>(resultStr);
if (data == null)
{
return msg = deviceName + "cancelPutInTask【 " + barcode + "】 没有收到服务器反馈";
}
else if (data.code.Equals(0).Equals(false))
{
return msg = deviceName + " cancelPutInTask【 " + barcode + "】 :" + data.msg;
}
return "";
}
catch (Exception ex)
{
LogUtil.error(deviceName + " " + ex.ToString());
}
return msg;
}
}
public class RfidData
{
//{"code":0,"msg":"ok","data":"7"}
public int code { get; set; }
public string msg { get; set; }
public Dictionary<string,string> data { get; set; }
}
public class LocStatus
{
/// <summary>
/// 料盘位置:移栽 = MOVING
/// </summary>
public static string MOVING = "MOVING";
/// <summary>
/// 料盘位置:流水线 = INLINE
/// </summary>
public static string INLINE = "INLINE";
/// <summary>
/// 料盘位置:皮带线 = INBELT
/// </summary>
public static string INBELT = "INBELT";
}
public class ServerData
{
//{"code":0,"msg":"ok","data":"7"}
......@@ -393,50 +185,50 @@ namespace OnlineStore.DeviceLibrary
public string msg { get; set; }
public string data { get; set; }
}
public class AfterPutData
{
//>>` {"code": 0, "msg":"ok", "data":{"cutPackageTask":"0","urgentPackageTask":"20","cutTask":"21","urgentTask":"22"}} `
//>>
//>> - code: 0为正常,其他为异常,
//>> - msg:消息,
//>> - data:为包装料仓的空闲仓位数(key为与客户端一致的料仓标识, value为空闲仓位)
//>> - cutPackageTask: 表示当前包装仓的分盘任务数
//>> - urgentPackageTask: 表示当前包装仓的紧急料任务数
//>> - cutTask: 表示流水线分盘任务数
//>> - urgentTask: 表示流水线紧急料任务数
public int code { get; set; }
public string msg { get; set; }
public TaskData data { get; set; }
}
public class TaskData
{
/// <summary>
/// urgentPackageTask: 表示当前包装仓的紧急料任务数
/// </summary>
public int urgentPackageTask { get; set; }
/// <summary>
/// cutPackageTask: 表示当前包装仓的分盘任务数
/// </summary>
public int cutPackageTask { get; set; }
/// <summary>
/// cutTask: 表示流水线分盘任务数
/// </summary>
public int cutTask { get; set; }
/// <summary>
/// urgentTask: 表示流水线紧急料任务数
/// </summary>
public int urgentTask { get; set; }
public string ToStr()
{
return "[分盘料=" + cutTask + "][紧急料=" + urgentTask+"]";
}
public string data { get; set; }
}
//public class AfterPutData
//{
// //>>` {"code": 0, "msg":"ok", "data":{"cutPackageTask":"0","urgentPackageTask":"20","cutTask":"21","urgentTask":"22"}} `
// //>>
// //>> - code: 0为正常,其他为异常,
// //>> - msg:消息,
// //>> - data:为包装料仓的空闲仓位数(key为与客户端一致的料仓标识, value为空闲仓位)
// //>> - cutPackageTask: 表示当前包装仓的分盘任务数
// //>> - urgentPackageTask: 表示当前包装仓的紧急料任务数
// //>> - cutTask: 表示流水线分盘任务数
// //>> - urgentTask: 表示流水线紧急料任务数
// public int code { get; set; }
// public string msg { get; set; }
// public TaskData data { get; set; }
//}
//public class TaskData
//{
// /// <summary>
// /// urgentPackageTask: 表示当前包装仓的紧急料任务数
// /// </summary>
// public int urgentPackageTask { get; set; }
// /// <summary>
// /// cutPackageTask: 表示当前包装仓的分盘任务数
// /// </summary>
// public int cutPackageTask { get; set; }
// /// <summary>
// /// cutTask: 表示流水线分盘任务数
// /// </summary>
// public int cutTask { get; set; }
// /// <summary>
// /// urgentTask: 表示流水线紧急料任务数
// /// </summary>
// public int urgentTask { get; set; }
// public string ToStr()
// {
// return "[分盘料=" + cutTask + "][紧急料=" + urgentTask+"]";
// }
//}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!