91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 1.32MB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2023-08-29
  • 語言: C#
  • 標簽: 校準??

資源簡介

C#開發,用于采集一些設備的電流,電壓信息,圖形化界面,用devexpress開發,可以校準

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Threading.Tasks;
using?System.Windows.Forms;

using?System.IO.Ports;
using?ZedGraph;
using?System.Threading;
using?System.Collections;

namespace?DC_POWER
{
????public?partial?class?Mainform?:?Form
????{
????????private?const?float?VOLTAGE_MAX?=?30.00f?CURRENT_MAX?=?4.000f;
public?enum?MODE
{
MODE_VOLTAGE?=?0x00
MODE_CURRENT?=?0x01
}
private?MODE?currentMode?=?MODE.MODE_VOLTAGE;
????????//與下位機通訊相關
????????public?enum?COM_CMD
????????{
????????????//M2S:?master?to?slave?cmd?S2M:?slave?to?master
????????????USART_M2S_Output??=?0x01??//輸出控制(默認關)
????????????USART_M2S_Mode????=?0x02??//輸出模式切換(默認電壓模式)
????????????USART_M2S_SetVal??=?0x03??//Master2Slave設置期望值:[1-4]:電壓;?[5-8]:電流
????????????USART_M2S_Cal?????=?0x04??//進入校準模式(只在下位機開機前幾秒內能夠進入校準模式)
????????????USART_M2S_StepAdd?=?0x05??//步進加
????????????USART_M2S_StepSub?=?0x06??//步進減
????????????USART_M2S_FAN?????=?0x07??//風扇控制:[1]0關;1開;2自動(默認)
????????????USART_M2S_STATE???=?0x08??//實時數據發送狀態:[1]1發送數據?0停止發送
????????????USART_M2S_GetVal??=?0x09??//獲取前一次的設定值
????????????USART_S2M_PreVal??=?0x0A??//Slave2Master返回前一次的設定值:[1-4]:電壓值;?[5-8]:電流值
????????????USART_S2M_RealVal?=?0x0B??//Slave2Master返回的實際值:[1-4]:電壓值;?[5-8]:電流值
????????????USART_S2M_RealTemp=?0x0C??//Slave2Master返回溫度值:[1-4]:當前溫度值
????????}
????????private?const?byte?USART_frameHEAD?=?0xAA?USART_frametaIL?=?0x55?USART_frameCTRL?=?0xA5;

????????private?long?m_TotalRxLostPackages?=?0;?//記錄總的丟包數
????????private?long?m_RxPackageDataCount?=?0;??//記錄接收到的一幀的字節數
????????private?const?int?m_MaxPackageSize?=?4096;???//一幀最大的字節數
????????private?byte[]?m_pRxBuf?=?new?byte[m_MaxPackageSize];?//接收緩存

????????float?voltageSet?=?0.0f?currentSet?=?0.0f?voltageGet?=?0.0f?currentGet?=?0.0f;

????????//繪圖相關
????????public?struct?CurveStruct
????????{
????????????public?PointPairList?pointList;//曲線數據
????????????public?Color?????????lineColor;//曲線顏色
????????????public?SymbolType????linestyle;//線型
????????????public?string????????curveName;//名稱
????????????public?LineItem??????curve;????//曲線
????????????public?float?????????scaleFactor;//比例系數
????????????public?byte??????????lineWidth;?//線寬
????????}
????????private?Hashtable?curveHashTable?=?new?Hashtable();//用來保存所有的曲線????????
????????private?GraphPane?mGraphPane;
????????private?long?tickStart?=?0;
????????double?currentTime;
????????//double?previousTime?=?0;
????????CurveStruct?mCurveStructVolSet?=?new?CurveStruct();
????????CurveStruct?mCurveStructVolGet?=?new?CurveStruct();
????????CurveStruct?mCurveStructCurSet?=?new?CurveStruct();
????????CurveStruct?mCurveStructCurGet?=?new?CurveStruct();

????????//線程相關
????????private?Queue?receiveByteQueue?=?new?Queue();//串口緩存隊列
????????private?Thread?_dataParseThread?=?null;???//解析串口接收數據線程

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件????????187??2014-07-15?10:30??DC_POWER\DC_POWER\App.config

?????文件?????151552??2014-07-15?14:36??DC_POWER\DC_POWER\bin\Debug\DC_POWER.exe

?????文件????????187??2014-07-15?10:30??DC_POWER\DC_POWER\bin\Debug\DC_POWER.exe.config

?????文件??????26112??2014-07-15?14:36??DC_POWER\DC_POWER\bin\Debug\DC_POWER.pdb

?????文件??????22984??2014-07-15?14:36??DC_POWER\DC_POWER\bin\Debug\DC_POWER.vshost.exe

?????文件????????187??2014-07-15?10:30??DC_POWER\DC_POWER\bin\Debug\DC_POWER.vshost.exe.config

?????文件??????36864??2007-03-13?14:40??DC_POWER\DC_POWER\bin\Debug\EnhancedGlassButton.dll

?????文件??????67646??2014-07-15?10:42??DC_POWER\DC_POWER\bin\Debug\ICON\POWER_128.ico

?????文件???????1150??2014-07-15?10:42??DC_POWER\DC_POWER\bin\Debug\ICON\POWER_16.ico

?????文件???????2462??2014-07-15?10:42??DC_POWER\DC_POWER\bin\Debug\ICON\POWER_24.ico

?????文件???????4286??2014-07-15?10:42??DC_POWER\DC_POWER\bin\Debug\ICON\POWER_32.ico

?????文件???????9662??2014-07-15?10:42??DC_POWER\DC_POWER\bin\Debug\ICON\POWER_48.ico

?????文件??????16958??2014-07-15?10:42??DC_POWER\DC_POWER\bin\Debug\ICON\POWER_64.ico

?????文件???????9662??2010-11-14?11:45??DC_POWER\DC_POWER\bin\Debug\ICON\shutdown.ico

?????文件???????9662??2010-11-14?11:45??DC_POWER\DC_POWER\bin\Debug\ICON\standby.ico

?????文件??????13824??2013-08-27?02:04??DC_POWER\DC_POWER\bin\Debug\Knob.dll

?????文件??????57344??2014-07-15?11:59??DC_POWER\DC_POWER\bin\Debug\LBIndustrialCtrls.dll

?????文件??????36864??2007-07-08?07:56??DC_POWER\DC_POWER\bin\Debug\Manometers.dll

?????文件?????329728??2013-10-07?23:09??DC_POWER\DC_POWER\bin\Debug\System.Windows.Forms.Ribbon35.dll

?????文件?????307200??2008-12-12?16:01??DC_POWER\DC_POWER\bin\Debug\ZedGraph.dll

?????文件?????224768??2014-07-16?16:45??DC_POWER\DC_POWER\bin\Release\DC_POWER.exe

?????文件????????187??2014-07-15?10:30??DC_POWER\DC_POWER\bin\Release\DC_POWER.exe.config

?????文件??????56832??2014-07-16?16:45??DC_POWER\DC_POWER\bin\Release\DC_POWER.pdb

?????文件??????22984??2014-07-16?16:46??DC_POWER\DC_POWER\bin\Release\DC_POWER.vshost.exe

?????文件????????187??2014-07-15?10:30??DC_POWER\DC_POWER\bin\Release\DC_POWER.vshost.exe.config

?????文件????????490??2012-06-06?02:06??DC_POWER\DC_POWER\bin\Release\DC_POWER.vshost.exe.manifest

?????文件??????36864??2007-03-13?14:40??DC_POWER\DC_POWER\bin\Release\EnhancedGlassButton.dll

?????文件??????67646??2014-07-15?10:42??DC_POWER\DC_POWER\bin\Release\ICON\POWER_128.ico

?????文件???????1150??2014-07-15?10:42??DC_POWER\DC_POWER\bin\Release\ICON\POWER_16.ico

?????文件???????2462??2014-07-15?10:42??DC_POWER\DC_POWER\bin\Release\ICON\POWER_24.ico

............此處省略139個文件信息

評論

共有 條評論