目錄 目錄 關於手冊 NModbus Master API CreateRtu CreateAscii CreateIp(TcpClient) CreateIp(UdpClient)...

Size: px
Start display at page:

Download "目錄 目錄 關於手冊 NModbus Master API CreateRtu CreateAscii CreateIp(TcpClient) CreateIp(UdpClient)..."

Transcription

1 NModbus API 手冊 版本 1.2, Written by Renee Lin

2 目錄 目錄 關於手冊 NModbus Master API CreateRtu CreateAscii CreateIp(TcpClient) CreateIp(UdpClient) Retries [ 屬性 ] ReadTimeout[ 屬性 ] ReadCoils ReadInputs ReadHoldingRegisters ReadInputRegisters WriteSingleCoil WriteSingleRegister NModbus Slave API CreateRtu CreateAscii CreateTcp CreateUdp CreateDefaultDataStore ModbusSlaveRequestReceived[ 事件 ] DataStoreWrittenTo[ 事件 ] Listen CoilDiscretes [DO 資料陣列 ] InputDiscretes [DI 資料陣列 ] HoldingRegisters [AO 資料陣列 ] InputRegisters [AI 資料陣列 ] NModbus API 手冊, v1.2 最後編輯 Page:2

3 4. 通用 API Dispose 附錄 A: 錯誤訊息 附錄 B:AI, AO 型別轉換 NModbus API 手冊, v1.2 最後編輯 Page:3

4 1. 關於手冊 此手冊對於 NModbus 中所使用的 API 說明 什麼是 NModbus? 利用 NModbus 可實現 Modbus 的通訊協定, 它是由一群自願者所開發以及維護, 並且免費開放使用 ICP DAS 基於官方發佈的 NModbus 原始碼進行功能確認與改善, 程式開發員可以利用 ICP DAS 發佈的 DLL 進行 Windows 版 PC 或是 WinCE 版的 Modbus 程式開發 這個 DLL 具備以下功能 a. Modbus/RTU Master/Slave b. Modbus/ASCII Master/Slave c. Modbus/TCP Master/Slave d. Modbus/UDP Master/Slave 下載 DLL 與程式 a. WinForm 版本 DLL 和文件 :nmodbuspc.dll, log4net.dll 程式 (For, VB.Net) b. WinCE 版本 DLL 和文件 :nmodbusce.dll, CABC.dll, FC19.dll 程式 (For, VB.Net) 了解更多有關 Modbus 適用 NModbus 開發的 PAC WinForm XPAC(WES 2009) Win8,Win7,Vista,Xp( 需有.NET framework 2( 含 ) 以上 ) WinCE ViewPAC(CE5) WinPAC(CE5) XPAC(CE6) NModbus API 手冊, v1.2 最後編輯 Page:4

5 2. NModbus Master API 建立 Master 連線 設定 Retries 設定 ReadTimeout Master.Read 更新資料至 UI Master.ReadCoils Master.ReadInputs Master.ReadHoldingRegisters Master.ReadInputRegisters Master.Dispose 2.1. CreateRtu 建立 modbus master RTU 的連線 ModbusSerialMaster CreateRtu( SerialPort serialport ) NModbus API 手冊, v1.2 最後編輯 Page:5

6 變數 serialport serialport 是由 new SerialPort() 建立, 而序列埠必需先被 serialport.open() 開啟 若 serialport 沒有指定值, 則會由系統帶入預設的值 例如 : 連接埠名稱為 COM1, 同位檢查為 None, 資料位元為 8, 停止位元為 1 回傳值 回傳 ModbusSerialMaster SerialPort serialport = new SerialPort(); //Create a new SerialPort object. serialport.portname = COM1 ; serialport.baudrate = ; serialport.databits = 8; serialport.parity = Parity.None; serialport.stopbits = StopBits.One; serialport.open(); ModbusSerialMaster master = ModbusSerialMaster.CreateRtu(serialPort); 2.2. CreateAscii 建立 modbus master Ascii 的連線 ModbusSerialMaster CreateAscii( SerialPort serialport ) 變數 serialport NModbus API 手冊, v1.2 最後編輯 Page:6

7 回傳值 serialport 是由 new SerialPort() 建立, 而序列埠必需先被 serialport.open() 開啟 回傳 ModbusSerialMaster SerialPort serialport = new SerialPort(); //Create a new SerialPort object. serialport.portname = COM1 ; serialport.baudrate = ; serialport.databits = 8; serialport.parity = Parity.None; serialport.stopbits = StopBits.One; serialport.open(); ModbusSerialMaster master = ModbusSerialMaster.CreateAscii(serialPort); 2.3. CreateIp(TcpClient) 建立 modbus master IP 的連線 ModbusIpMaster CreateIp( TcpClient tcpclient ) 變數 tcpclient tcpclient 是由 new TcpClient() 建立, 而 tcpclient 必需由 tcpclient.beginconnect() 產生連接 回傳值 回傳 ModbusIpMaster NModbus API 手冊, v1.2 最後編輯 Page:7

8 string ipaddress = ; int tcpport = 502; TcpClient tcpclient = new TcpClient(); //Create a new TcpClient object. tcpclient.beginconnect(ipaddress, tcpport, null, null); ModbusIpMaster master = ModbusIpMaster.CreateIp(tcpClient); 若是斷線時要重新連線, 請參考下列程式碼 [DllImport("WININET", CharSet = CharSet.Auto)] static extern bool InternetGetConnectedState(ref InternetConnectionState lpdwflags, int dwreserved); enum InternetConnectionState : int INTERNET_CONNECTION_MODEM = 0x1, INTERNET_CONNECTION_LAN = 0x2, INTERNET_CONNECTION_PROXY = 0x4, INTERNET_RAS_INSTALLED = 0x10, INTERNET_CONNECTION_OFFLINE = 0x20, INTERNET_CONNECTION_CONFIGURED = 0x40 TcpClient tcpclient; ModbusIpMaster master; string ipaddress = ; int tcpport = 502; DateTime dtdisconnect = new DateTime(); DateTime dtnow = new DateTime(); bool NetworkIsOk = false; private void btstart_click(object sender, EventArgs e) // when button clicked, connect to Modbus TCP Server NetworkIsOk = Connect(); timer1.enabled = true; private bool Connect() NModbus API 手冊, v1.2 最後編輯 Page:8

9 if (master!= null) master.dispose(); if (tcpclient!= null) tcpclient.close(); if (CheckInternet()) try tcpclient = new TcpClient(); IAsyncResult asyncresult = tcpclient.beginconnect(ipaddress, tcpport, null, null); asyncresult.asyncwaithandle.waitone(3000, true); //wait for 3 sec if (!asyncresult.iscompleted) tcpclient.close(); Console.WriteLine(DateTime.Now.ToString() + ":Cannot connect to server."); return false; // create Modbus TCP Master by the tcpclient master = ModbusIpMaster.CreateIp(tcpClient); master.transport.retries = 0; //don't have to do retries master.transport.readtimeout = 1500; Console.WriteLine(DateTime.Now.ToString() + ":Connect to server."); return true; catch (Exception ex) Console.WriteLine(DateTime.Now.ToString() + ":Connect process " + ex.stacktrace + "==>" + ex.message); return false; return false; private bool CheckInternet() // NModbus API 手冊, v1.2 最後編輯 Page:9

10 InternetConnectionState flag = InternetConnectionState.INTERNET_CONNECTION_LAN; return InternetGetConnectedState(ref flag, 0); private void timer1_tick(object sender, EventArgs e) //start timer1, timer1.interval = 1000 ms try if (NetworkIsOk) #region Master to Slave //read AI, AO, DI, DO #endregion else //retry connecting dtnow = DateTime.Now; if ((dtnow - dtdisconnect) > TimeSpan.FromSeconds(10)) Console.WriteLine(DateTime.Now.ToString() + ":Start connecting"); NetworkIsOk = Connect(); if (!NetworkIsOk) Console.WriteLine(DateTime.Now.ToString() + ":Connecting fail. Wait for retry"); dtdisconnect = DateTime.Now; else Console.WriteLine(DateTime.Now.ToString() + ":Wait for retry connecting"); catch(exception ex) if (ex.source.equals("system")) NModbus API 手冊, v1.2 最後編輯 Page:10

11 //set NetworkIsOk to false and retry connecting NetworkIsOk = false; Console.WriteLine(ex.Message); dtdisconnect = DateTime.Now; 2.4. CreateIp(UdpClient) 建立 modbus master IP 的連線 ModbusIpMaster CreateIp( UdpClient udpclient ) 變數 udpclient udpclient 是由 new UdpClient() 建立, 而 udpclient 必需由 udpclient.connect() 產生連接 回傳值 回傳 ModbusIpMaster IPAddress ipaddress = ; int udpport = 502; UdpClient udpclient = new UdpClient(); //Create a new UdpClient object. udpclient.connect(ipaddress, udpport); ModbusIpMaster master = ModbusIpMaster.CreateIp(udpClient); NModbus API 手冊, v1.2 最後編輯 Page:11

12 2.5. Retries [ 屬性 ] [ 屬性 ] 在遇到 IO 錯誤 逾時或損壞訊息等等的失敗情況後, 重試發送訊息的次數 int Retries get; set; string ipaddress = ; //use TCP for example int tcpport = 502; TcpClient tcpclient = new TcpClient(); tcpclient.beginconnect(ipaddress, tcpport, null, null); ModbusIpMaster master = ModbusIpMaster.CreateIp(tcpClient); master.transport.retries = 0; 注意 預設值為 Retries = 3 在 NModbus 中不需要重發訊息, 請設定 Retries = ReadTimeout[ 屬性 ] [ 屬性 ] 取得或設定讀取作業未完成時, 發生逾時之前的毫秒數 int ReadTimeout get; set; SerialPort serialport = new SerialPort();//use RTU for example NModbus API 手冊, v1.2 最後編輯 Page:12

13 serialport.open(); ModbusSerialMaster master = ModbusSerialMaster.CreateRtu(serialPort); master.transport.readtimeout = 300; //milliseconds 注意 ReadTimeout 建議設定值 a. RTU: ReadTimeout = 300 b. TCP: ReadTimeout = ReadCoils 讀取 DO 的狀態 bool[] ReadCoils( byte slaveid, ushort startaddress, ushort numofpoints ) 變數 slaveid 欲讀取裝置的 ID startaddress 開始讀取的位址 numofpoints 讀取的長度 回傳值 回傳 bool[] NModbus API 手冊, v1.2 最後編輯 Page:13

14 byte slaveid = 1; ushort startaddress = 0; ushort numofpoints = 10; bool[] coilstatus = master.readcoils(slaveid, startaddress, numofpoints); 2.8. ReadInputs 讀取 DI 的狀態 bool[] ReadInputs( byte slaveid, ushort startaddress, ushort numofpoints ) 變數 slaveid 欲讀取裝置的 ID startaddress 開始讀取的位址 numofpoints 讀取的長度 回傳值 回傳 bool[] byte slaveid = 1; ushort startaddress =0; ushort numofpoints = 10; NModbus API 手冊, v1.2 最後編輯 Page:14

15 bool[] status = master.readinputs(slaveid, startaddress, numofpoints); 2.9. ReadHoldingRegisters 讀取 AO 的值 ushort[] ReadHoldingRegisters( byte slaveid, ushort startaddress, ushort numofpoints ) 變數 slaveid 欲讀取裝置的 ID startaddress 開始讀取的位址 numofpoints 讀取暫存區的長度 回傳值 回傳 ushort[] Exampls byte slaveid = 1; ushort startaddress =0; ushort numofpoints = 10; ushort[] holding_register = master.readholdingregisters(slaveid, startaddress, numofpoints); NModbus API 手冊, v1.2 最後編輯 Page:15

16 2.10. ReadInputRegisters 讀取 AI 的值 ushort[] ReadInputRegisters( byte slaveid, ushort startaddress, ushort numofpoints ) 變數 slaveid 欲讀取裝置的 ID startaddress 開始讀取的位址 numofpoints 讀取暫存區的長度 回傳值 回傳 ushort[] byte slaveid = 1; ushort startaddress =0; ushort numofpoints = 10; ushort[] register = master.readinputregisters(slaveid, startaddress, numofpoints); NModbus API 手冊, v1.2 最後編輯 Page:16

17 2.11. WriteSingleCoil 寫入值到 DO 位址 void WriteSingleCoil( byte slaveid, ushort coiladdress, bool value ) 變數 slaveid 欲寫入裝置的 ID coiladdress 欲寫入的位址 value 若該位址要被寫入, 則寫入值為是 (TRUE); 若該位址沒有被寫入, 則值為否 (FALSE) 回傳值 無回傳值 byte slaveid = 1; ushort coiladdress =1; bool value = true; master.writesinglecoil(slaveid, coiladdress,value); NModbus API 手冊, v1.2 最後編輯 Page:17

18 2.12. WriteSingleRegister 寫入值到 AO 位址 void WriteSingleRegister( byte slaveid, ushort registeraddress, ushort value ) 變數 slaveid 欲寫入裝置的 ID registeraddress 欲寫入的位址 value 欲寫入的值 回傳值 無回傳值 byte slaveid = 1; ushort registeraddress = 1; ushort value = 1000; master.writesingleregister(slaveid, registeraddress, value); NModbus API 手冊, v1.2 最後編輯 Page:18

19 3. NModbus Slave API 建立 slave 連線 CreateDefaultDataStore Slave.Listen 觸發事件 ModbusSlaveRequestReceived 否 取得裝置上的值 是否有 Modbus request? 是 Read AI, AO, DI, DO Write AO, DO 更新至 DataStore Slave.dispose 觸發事件 DataStoreWrittenTo 設定 DO,AO Modbus 回覆來自 DataStore 的資料 slave.datastore.inputdiscretes[i] slave.datastore.inputregisters[i] slave.datastore.holdingregisters[i] slave.datastore.coildiscretes[i] NModbus API 手冊, v1.2 最後編輯 Page:19

20 3.1. CreateRtu 建立 Modbus slave Rtu 的連線 ModbusSerialSlave CreateRtu( byte slaveid, SerialPort serialport ) 變數 slaveid 欲建立連線裝置的 ID serialport 序列埠必需被 serialport.open() 開啟, 而 serialport 是由 new SerialPort() 建立 回傳值 回傳 ModbusSerialSlave byte slaveid = 1; SerialPort serialport = new SerialPort(); serialport.portname = COM1 ; serialport.baudrate = ; serialport.databits = 8; serialport.parity = Parity.None; serialport.stopbits = StopBits.One; serialport.open(); ModbusSlave slave = ModbusSerialSlave.CreateRtu(slaveID, serialport); NModbus API 手冊, v1.2 最後編輯 Page:20

21 3.2. CreateAscii 建立 Modbus slave Ascii 的連線 ModbusSerialSlave CreateAscii( byte slaveid, SerialPort serialport ) 變數 slaveid 欲建立連線裝置的 ID serialport 序列埠必需被 serialport.open() 開啟, 而 serialport 是由 new SerialPort() 建立 回傳值 回傳 ModbusSerialSlave byte slaveid = 1; SerialPort serialport = new SerialPort(); serialport.portname = COM1 ; serialport.baudrate = ; serialport.databits = 8; serialport.parity = Parity.None; serialport.stopbits = StopBits.One; serialport.open(); ModbusSlave slave = ModbusSerialSlave.CreateAscii(slaveID, serialport); NModbus API 手冊, v1.2 最後編輯 Page:21

22 3.3. CreateTcp 建立 Modbus slave TCP 的連線 TCP Slave 可接收連線最大數量為 50 ModbusTcpSlave CreateTcp( byte slaveid, TcpListener tcplistener ) 變數 slaveid 欲建立連線裝置的 ID tcplistener tcplistener 是由 new TcpListener () 建立, 而 tcplistener 必需由 tcplistener.start() 開始接聽 回傳值 回傳 ModbusTcpSlave int port = 502; IPHostEntry ipentry = Dns.GetHostEntry(Dns.GetHostName()); IPAddress[] addr = ipentry.addresslist; TcpListener tcplistener = new TcpListener(addr[0], port); tcplistener.start(); ModbusSlave slave = ModbusTcpSlave.CreateTcp(slaveID, slavetcplistener); slave.datastore = Modbus.Data.DataStoreFactory.CreateDefaultDataStore(); slave.datastore.datastorewrittento += new EventHandler<DataStoreEventArgs>(Modbus_DataStoreWriteTo); NModbus API 手冊, v1.2 最後編輯 Page:22

23 slave.listen(); 3.4. CreateUdp 建立 Modbus slave UDP 的連線 ModbusUdpSlave CreateUdp( byte slaveid, UdpClient client ) 變數 slaveid 欲建立連線裝置的 ID client client 由 new UdpClient() 初始化且與指定的 port 連結. 回傳值 回傳 ModbusUdpSlave int port = 502; UdpClient client = new UdpClient(port); ModbusSlave slave = Modbus.Device.ModbusUdpSlave.CreateUdp(slaveID, client); slave.modbusslaverequestreceived += new EventHandler<ModbusSlaveRequestEventArgs>(Modbus_Request_Event); slave.datastore = Modbus.Data.DataStoreFactory.CreateDefaultDataStore(); slave.datastore.datastorewrittento += new EventHandler<DataStoreEventArgs>(Modbus_DataStoreWriteTo); slave.listen(); NModbus API 手冊, v1.2 最後編輯 Page:23

24 3.5. CreateDefaultDataStore 建立暫存器的記憶體空間,AO,AI 暫存器預設為 0,DO,DI 暫存器預設為 false 記憶體大 小預設為 65535, 可設定範圍為 DataStore CreateDefaultDataStore() 若要自訂記憶體大小, 可以使用下列 DataStore CreateDefaultDataStore( ushort coilscount, ushort inputscount, ushort holdingregisterscount, ushort inputregisterscount ) slave.datastore = Modbus.Data.DataStoreFactory.CreateDefaultDataStore(); 回傳值 回傳 DataStore 注意 slave 需由 ModbusSlave 定義並且建立 slave 的連線, 例如 : 建立 TCP slave 連線為 slave = ModbusTcpSlave.CreateTcp(slaveID, slavetcplistener) 3.6. ModbusSlaveRequestReceived[ 事件 ] 當 slave 收到 master 命令時觸發事件, 取得 Modbus 命令封包後, 可拆解封包做特殊應 用 NModbus API 手冊, v1.2 最後編輯 Page:24

25 EventHandler<ModbusSlaveRequestEventArgs> ModbusSlaveRequestReceived slave.modbusslaverequestreceived += new EventHandler<ModbusSlaveRequestEventArgs>(Modbus_Request_Event); //trigger Modbus_Request_Event private void Modbus_Request_Event(object sender, Modbus.Device.ModbusSlaveRequestEventArgs e) //disassemble packet from master byte fc = e.message.functioncode; byte[] data = e.message.messageframe; byte[] bytestartaddress = new byte[] data[3], data[2] ; byte[] bytenum = new byte[] data[5], data[4] ; Int16 StartAddress = BitConverter.ToInt16(byteStartAddress, 0); Int16 NumOfPoint = BitConverter.ToInt16(byteNum, 0); Console.WriteLine(fc.ToString() + "," + StartAddress.ToString() + "," + NumOfPoint.ToString()); 注意 slave 需由 ModbusSlave 定義並且建立 slave 的連線, 例如 : 建立 TCP slave 連線為 slave = ModbusTcpSlave.CreateTcp(slaveID, slavetcplistener) 3.7. DataStoreWrittenTo[ 事件 ] 當 slave 收到 master 的命令寫入 DO 值或 AO 值到 DataStore 時觸發事件 位址為 NModbus API 手冊, v1.2 最後編輯 Page:25

26 Slave 收到 Modbus request 寫入 DO, AO 觸發 DataStoreWrittenTo 寫入 AO e.startaddress=3 i= e.data.b[i] slave.datastore.holdingregisters 寫入 DO slave.datastore.coildiscretes e.startaddress=0 i= e.data.a[i] EventHandler<DataStoreEventArgs> DataStoreWrittenTo NModbus API 手冊, v1.2 最後編輯 Page:26

27 slave.datastore = Modbus.Data.DataStoreFactory.CreateDefaultDataStore(); slave.datastore.datastorewrittento += new EventHandler<DataStoreEventArgs>(Modbus_DataStoreWriteTo); //when receive write AO or DO command from master, it will trigger following function private void Modbus_DataStoreWriteTo(object sender, Modbus.Data.DataStoreEventArgs e) switch (e.modbusdatatype) case ModbusDataType.HoldingRegister: for (int i = 0; i < e.data.b.count; i++) //Set AO //e.data.b[i] already write to slave.datastore.holdingregisters[e.startaddress + i + 1] //e.startaddress starts from 0 //You can set AO value to hardware here break; case ModbusDataType.Coil: for (int i = 0; i < e.data.a.count; i++) //set DO //e.data.a[i] already write to slave.datastore.coildiscretes[e.startaddress + i + 1] //e.startaddress starts from 0 //You can set DO value to hardware here break; 注意 slave 需由 ModbusSlave 定義並且建立 slave 的連線, 例如 : 建立 TCP slave 連線為 slave = ModbusTcpSlave.CreateTcp(slaveID, slavetcplistener) NModbus API 手冊, v1.2 最後編輯 Page:27

28 3.8. Listen Slave 開始監聽要求 void Listen() int port = 502; //use Tcp for example IPHostEntry ipentry = Dns.GetHostEntry(Dns.GetHostName()); IPAddress[] addr = ipentry.addresslist; TcpListener tcplistener = new TcpListener(addr[0], port); tcplistener.start(); ModbusSlave slave =ModbusTcpSlave.CreateTcp(slaveID, tcplistener); slave.modbusslaverequestreceived += new EventHandler<ModbusSlaveRequestEventArgs>(Modbus_Request_Event); slave.datastore = Modbus.Data.DataStoreFactory.CreateDefaultDataStore(); lave.datastore.datastorewrittento += new EventHandler<DataStoreEventArgs>(Modbus_DataStoreWriteTo); slave.listen(); 回傳值 無回傳值 3.9. CoilDiscretes [DO 資料陣列 ] DO 的資料陣列 位址為 ModbusDataCollection<bool> CoilDiscretes get; private set; NModbus API 手冊, v1.2 最後編輯 Page:28

29 slave.datastore.coildiscretes[1] = true; slave.datastore.coildiscretes[65535] = false; InputDiscretes [DI 資料陣列 ] DI 的資料陣列, 可將裝置的 DI 數值儲存至此 位址為 ModbusDataCollection<bool> InputDiscretes get; private set; slave.datastore.inputdiscretes[1] = true; slave.datastore.inputdiscretes[65535] = false; HoldingRegisters [AO 資料陣列 ] AO 的資料陣列 位址為 ModbusDataCollection<ushort> HoldingRegisters get; private set; slave.datastore.holdingregisters[1] = 222; slave.datastore.holdingregisters[65535] = 333; NModbus API 手冊, v1.2 最後編輯 Page:29

30 3.12. InputRegisters [AI 資料陣列 ] AI 的資料陣列, 可將裝置的 AI 值儲存至此 位址為 ModbusDataCollection<ushort> InputRegisters get; private set; slave.datastore.inputregisters[1] = 222; slave.datastore.inputregisters[65535] = 333; NModbus API 手冊, v1.2 最後編輯 Page:30

31 4. 通用 API 4.1. Dispose 對已定義的應用程序執行釋放或重設相關聯沒有應用的資源 void Dispose() 變數 無 回傳值 無回傳值 string ipaddress = ; //use TCP master for example int tcpport = 502; TcpClient tcpclient = new TcpClient(); tcpclient.beginconnect(ipaddress, tcpport, null, null); //Create a new TcpClient object. ModbusIpMaster master = ModbusIpMaster.CreateIp(tcpClient); master.dispose(); NModbus API 手冊, v1.2 最後編輯 Page:31

32 附錄 A: 錯誤訊息 對應表 以下為 NModbus 錯誤代碼對應表 代碼 名稱 說明 01 不支援的功能 收到不被允許的指令碼 02 不合法的位址 收到不正當的位址 03 不合法的數值 收到不正確的數值 04 Slave 裝置失效 要回復要求給 master 時, 發生無法復原的錯誤 05 確認 ( 命令執行中 ) 當 master/slave 需要一段時間處理收到的要求時, 會發出此代碼以避免發生逾時錯誤 06 Slave 裝置忙碌 當 master/slave 正在處理長時間的要求時, 對方必須等到處理完畢後再傳送訊息 08 記憶體同位錯誤 當 master/slave 要讀取記錄檔時, 偵測到記憶體同位錯誤 0A 無效的 Gateway Gateway 配置錯誤或過載 0B 目標裝置 Gateway 沒有回應 目標裝置沒有回應 通常表示裝置目前不在線上 //use TCP master for example try #region Master to Slave //read AI, AO, DI, DO #endregion catch (Exception exception) //Connection exception //No response from server. //The server maybe close the connection, or response timeout. NModbus API 手冊, v1.2 最後編輯 Page:32

33 if (exception.source.equals("system")) NetworkIsOk = false; Console.WriteLine(exception.Message); this.text = "Off line " + DateTime.Now.ToString(); dtdisconnect = DateTime.Now; //The server return error code.you can get the function code and exception code. if (exception.source.equals("nmodbuspc")) string str = exception.message; int FunctionCode; string ExceptionCode; str = str.remove(0, str.indexof("\r\n") + 17); FunctionCode = Convert.ToInt16(str.Remove(str.IndexOf("\r\n"))); Console.WriteLine("Function Code: " + FunctionCode.ToString("X")); str = str.remove(0, str.indexof("\r\n") + 17); ExceptionCode = str.remove(str.indexof("-")); switch (ExceptionCode.Trim()) case "1": Console.WriteLine("Exception Code: " + ExceptionCode.Trim() + "----> Illegal function!"); break; case "2": Console.WriteLine("Exception Code: " + ExceptionCode.Trim() + "----> Illegal data address!"); break; case "3": Console.WriteLine("Exception Code: " + ExceptionCode.Trim() + "----> Illegal data value!"); break; case "4": Console.WriteLine("Exception Code: " + ExceptionCode.Trim() + "----> Slave device failure!"); NModbus API 手冊, v1.2 最後編輯 Page:33

34 break; NModbus API 手冊, v1.2 最後編輯 Page:34

35 附錄 B:AI, AO 型別轉換 AI,AO 的輸出及輸入值皆為 ushort 型別 下列為 ushort 及 float 之間轉換的 若您需要更多型別轉換的, 請至以下連結下載參考 tatype_c%23/ Ushort(Int16) to float(int32) //Convert ushort array to Float ushort[] data = new ushort[2] 59769, 17142; float[] floatdata = new float[data.length / 2 ]; Buffer.BlockCopy(data, 0, floatdata, 0, data.length * 2); for (int index = 0; index < floatdata.length; index ++) //print out the value Console.WriteLine(floatData[index / 2].ToString("0.0000")); // Console.ReadLine(); Float(Int32) to ushort(int16) //Convert Float to short ushort[] uintdata = new ushort[2]; floatdata = new float[1] f ; Buffer.BlockCopy(floatData, 0, uintdata, 0, 4); for (int index = 0; index < uintdata.length; index++) //uintdata[0] = 29884; uintdata[1] = Console.WriteLine(string.Format("uintData[0] = 1", index, uintdata[index])); Console.ReadLine(); NModbus API 手冊, v1.2 最後編輯 Page:35

目錄 目錄 關於手冊 NModbus API 函數 Master API CreateRtu CreateIp CreateAscii WriteSin

目錄 目錄 關於手冊 NModbus API 函數 Master API CreateRtu CreateIp CreateAscii WriteSin NModbus API 手冊 版本 1.1, 2013.8 Written by Renee Lin 目錄 目錄... 2 1. 關於手冊... 4 2. NModbus API 函數... 5 2.1. Master API... 5 2.1.1. CreateRtu... 5 2.1.2. CreateIp... 6 2.1.3. CreateAscii... 7 2.1.4. WriteSingleCoil...

More information

投影片 1

投影片 1 資料庫管理程式 ( 補充教材 -Part2) 使用 ADO.NET 連結資料庫 ( 自行撰寫程式碼 以實現新增 刪除 修改等功能 ) Private Sub InsertButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles InsertButton.Click ' 宣告相關的 Connection

More information

(Methods) Client Server Microsoft Winsock Control VB 1 VB Microsoft Winsock Control 6.0 Microsoft Winsock Control 6.0 1(a). 2

(Methods) Client Server Microsoft Winsock Control VB 1 VB Microsoft Winsock Control 6.0 Microsoft Winsock Control 6.0 1(a). 2 (2005-01-26) (2005-01-26) (2005-02-27) PIC_SERVER (9) VB TCP/UDP Visual Basic Microsoft Winsock Control (MSWINSCK.OCX) UDP TCP Client Server Visual Basic UDP/TCP PIC_SERVER UDP/TCP 1. Microsoft Winsock

More information

untitled

untitled 1 Outline 數 料 數 數 列 亂數 練 數 數 數 來 數 數 來 數 料 利 料 來 數 A-Z a-z _ () 不 數 0-9 數 不 數 SCHOOL School school 數 讀 school_name schoolname 易 不 C# my name 7_eleven B&Q new C# (1) public protected private params override

More information

概述

概述 OPC Version 1.6 build 0910 KOSRDK Knight OPC Server Rapid Development Toolkits Knight Workgroup, eehoo Technology 2002-9 OPC 1...4 2 API...5 2.1...5 2.2...5 2.2.1 KOS_Init...5 2.2.2 KOS_InitB...5 2.2.3

More information

/ / (FC 3)...

/ / (FC 3)... Modbus/TCP 1.0 1999 3 29 Andy Swales Schneider aswales@modicon.com ... 2 1.... 3 2.... 3 2.1.. 3 2.2..4 2.3..4 2.4... 5 3.... 5 3.1 0... 5 3.2 1... 5 3.3 2... 6 3.4 / /... 7 4.... 7 5.... 8 5.1 0... 9

More information

untitled

untitled 1 行 行 行 行.NET 行 行 類 來 行 行 Thread 類 行 System.Threading 來 類 Thread 類 (1) public Thread(ThreadStart start ); Name 行 IsAlive 行 行狀 Start 行 行 Suspend 行 Resume 行 行 Thread 類 (2) Sleep 行 CurrentThread 行 ThreadStart

More information

untitled

untitled 1....2...2...6 2....10 3. UDP...15 4. TCP...16...16...16 1 1. PC COM1 COM2 COM1 COM2 DTU 2 3 4 COM1 COM1 COM2 COM ID 13900000000 DTU COM1 5 COM2 DTU DTU DTU DTU DTU DTU DTU ID ID 3031 3032 2 ID 13900000001

More information

untitled

untitled XP248 1 XP248 XP248 DCS PLC SCnet SCnet DCS SCnet DCS 1.1 XP248 Modbus HostLink Modbus XP248 4 DB25 XP248 MODBUS XP248 SCControl XP248 4 RS232 RS485 4 32 XP248 COM0-COM1 COM2-COM3 1200 19200bit/s 5 8 1

More information

2 WF 1 T I P WF WF WF WF WF WF WF WF 2.1 WF WF WF WF WF WF

2 WF 1 T I P WF WF WF WF WF WF WF WF 2.1 WF WF WF WF WF WF Chapter 2 WF 2.1 WF 2.2 2. XAML 2. 2 WF 1 T I P WF WF WF WF WF WF WF WF 2.1 WF WF WF WF WF WF WF WF WF WF EDI API WF Visual Studio Designer 1 2.1 WF Windows Workflow Foundation 2 WF 1 WF Domain-Specific

More information

<B0B8C0FDCAD6B2E15FD3A1CBA2B0E6>

<B0B8C0FDCAD6B2E15FD3A1CBA2B0E6> WWW.ICPDAS.COM.CN 1 关 于 泓 格 泓 格 科 技 成 立 于 1993 年, 以 基 于 PC 的 数 据 采 集 卡 为 最 初 的 研 发 产 品 线,1998 年 我 们 认 为 嵌 入 式 控 制 器 极 具 未 来 性, 所 以 整 个 研 发 的 重 心 移 到 了 各 种 嵌 入 式 控 制 器 远 程 I/O 模 块 等 产 品 线 经 过 十 多 年 的 努

More information

T

T 通 訊 指 令 說 明 Pt : 1, 透 過 Port 1 以 Modbus RTU 通 訊 定 作 料 傳 輸 2, 透 過 Port 2 以 Modbus RTU 通 訊 定 作 料 傳 輸 SR : 通 訊 程 式 起 始 暫 存 器 ( 見 範 例 說 明 ) WR : 指 令 運 作 起 始 暫 存 器 ( 見 範 例 說 明 ), 共 佔 用 8 個 暫 存 器, 其 它 程 式 不

More information

Microsoft Word - 01.DOC

Microsoft Word - 01.DOC 第 1 章 JavaScript 简 介 JavaScript 是 NetScape 公 司 为 Navigator 浏 览 器 开 发 的, 是 写 在 HTML 文 件 中 的 一 种 脚 本 语 言, 能 实 现 网 页 内 容 的 交 互 显 示 当 用 户 在 客 户 端 显 示 该 网 页 时, 浏 览 器 就 会 执 行 JavaScript 程 序, 用 户 通 过 交 互 式 的

More information

《大话设计模式》第一章

《大话设计模式》第一章 第 1 章 代 码 无 错 就 是 优? 简 单 工 厂 模 式 1.1 面 试 受 挫 小 菜 今 年 计 算 机 专 业 大 四 了, 学 了 不 少 软 件 开 发 方 面 的 东 西, 也 学 着 编 了 些 小 程 序, 踌 躇 满 志, 一 心 要 找 一 个 好 单 位 当 投 递 了 无 数 份 简 历 后, 终 于 收 到 了 一 个 单 位 的 面 试 通 知, 小 菜 欣 喜

More information

CC213

CC213 : (Ken-Yi Lee), E-mail: feis.tw@gmail.com 49 [P.51] C/C++ [P.52] [P.53] [P.55] (int) [P.57] (float/double) [P.58] printf scanf [P.59] [P.61] ( / ) [P.62] (char) [P.65] : +-*/% [P.67] : = [P.68] : ,

More information

用手機直接傳值不透過網頁連接, 來當作搖控器控制家電 ( 電視遙控器 ) 按下按鍵發送同時會回傳值來確定是否有送出 問題 :1. 應該是使用了太多 thread 導致在傳值上有問題 2. 一次按很多次按鈕沒辦法即時反應

用手機直接傳值不透過網頁連接, 來當作搖控器控制家電 ( 電視遙控器 ) 按下按鍵發送同時會回傳值來確定是否有送出 問題 :1. 應該是使用了太多 thread 導致在傳值上有問題 2. 一次按很多次按鈕沒辦法即時反應 專題進度 老師 : 趙啟時老師 學生 : 陳建廷 2013/10/13 用手機直接傳值不透過網頁連接, 來當作搖控器控制家電 ( 電視遙控器 ) 按下按鍵發送同時會回傳值來確定是否有送出 問題 :1. 應該是使用了太多 thread 導致在傳值上有問題 2. 一次按很多次按鈕沒辦法即時反應 程式碼 : package com.example.phone; import java.util.arraylist;

More information

3.1 num = 3 ch = 'C' 2

3.1 num = 3 ch = 'C' 2 Java 1 3.1 num = 3 ch = 'C' 2 final 3.1 final : final final double PI=3.1415926; 3 3.2 4 int 3.2 (long int) (int) (short int) (byte) short sum; // sum 5 3.2 Java int long num=32967359818l; C:\java\app3_2.java:6:

More information

Microsoft Word - ch04三校.doc

Microsoft Word - ch04三校.doc 4-1 4-1-1 (Object) (State) (Behavior) ( ) ( ) ( method) ( properties) ( functions) 4-2 4-1-2 (Message) ( ) ( ) ( ) A B A ( ) ( ) ( YourCar) ( changegear) ( lowergear) 4-1-3 (Class) (Blueprint) 4-3 changegear

More information

Bus Hound 5

Bus Hound 5 Bus Hound 5.0 ( 1.0) 21IC 2007 7 BusHound perisoft PC hound Bus Hound 6.0 5.0 5.0 Bus Hound, IDE SCSI USB 1394 DVD Windows9X,WindowsMe,NT4.0,2000,2003,XP XP IRP Html ZIP SCSI sense USB Bus Hound 1 Bus

More information

untitled

untitled 1 Access 料 (1) 立 料 [] [] [ 料 ] 立 料 Access 料 (2) 料 [ 立 料 ] Access 料 (3) 料 料 料 料 料 料 欄 ADO.NET ADO.NET.NET Framework 類 來 料 料 料 料 料 Ex MSSQL Access Excel XML ADO.NET 連 .NET 料.NET 料 料來 類.NET Data Provider

More information

untitled

untitled 1 .NET sln csproj dll cs aspx 說 料 料 利 來 料 ( 來 ) 利 [] [] 來 說 切 切 理 [] [ ] 來 說 拉 類 類 [] [ ] 列 連 Web 行流 來 了 不 不 不 流 立 行 Page 類 Load 理 Click 滑 料 Response 列 料 Response HttpResponse 類 Write 料 Redirect URL Response.Write("!!

More information

untitled

untitled 1 Access 料 (1) 立 料 [] [] [ 料 ] 立 料 Access 料 (2) 料 [ 立 料 ] Access 料 (3) 料 料 料 料 料 料 欄 ADO.NET ADO.NET.NET Framework 類 來 料 料 料 料 料 Ex MSSQL Access Excel XML ADO.NET 連 .NET 料.NET 料 料來 類.NET Data Provider

More information

1 Framework.NET Framework Microsoft Windows.NET Framework.NET Framework NOTE.NET NET Framework.NET Framework 2.0 ( 3 ).NET Framework 2.0.NET F

1 Framework.NET Framework Microsoft Windows.NET Framework.NET Framework NOTE.NET NET Framework.NET Framework 2.0 ( 3 ).NET Framework 2.0.NET F 1 Framework.NET Framework Microsoft Windows.NET Framework.NET Framework NOTE.NET 2.0 2.0.NET Framework.NET Framework 2.0 ( 3).NET Framework 2.0.NET Framework ( System ) o o o o o o Boxing UnBoxing() o

More information

IP505SM_manual_cn.doc

IP505SM_manual_cn.doc IP505SM 1 Introduction 1...4...4...4...5 LAN...5...5...6...6...7 LED...7...7 2...9...9...9 3...11...11...12...12...12...14...18 LAN...19 DHCP...20...21 4 PC...22...22 Windows...22 TCP/IP -...22 TCP/IP

More information

The golden pins of the PCI card can be oxidized after months or years

The golden pins of the PCI card can be oxidized after months or years Q. 如何在 LabWindows/CVI 編譯 DAQ Card 程式? A: 請參考至下列步驟 : 步驟 1: 安裝驅動程式 1. 安裝 UniDAQ 驅動程式 UniDAQ 驅動程式下載位置 : CD:\NAPDOS\PCI\UniDAQ\DLL\Driver\ ftp://ftp.icpdas.com/pub/cd/iocard/pci/napdos/pci/unidaq/dll/driver/

More information

Measurement Studio Expands Your Test and Measurement Programming Power

Measurement Studio Expands Your Test and Measurement Programming Power NI-DAQmx NI-DAQ NI-DAQmx NI-DAQ NI-DAQmx NI-DAQmx NI-DAQ NI-DAQmx NI-DAQmx LabVIEW LabWindows/CVI ANSI C Measurement Studio Visual Studio I/O 1. I/O API I/O NI NI NI NI ADE 1.NI-DAQmx NI & MAX DAQ Assistant

More information

新版 明解C++入門編

新版 明解C++入門編 511!... 43, 85!=... 42 "... 118 " "... 337 " "... 8, 290 #... 71 #... 413 #define... 128, 236, 413 #endif... 412 #ifndef... 412 #if... 412 #include... 6, 337 #undef... 413 %... 23, 27 %=... 97 &... 243,

More information

概述

概述 OPC Version 1.8 build 0925 KOCRDK Knight OPC Client Rapid Development Toolkits Knight Workgroup, eehoo Technology 2002-9 OPC 1...4 2 API...5 2.1...5 2.2...5 2.2.1 KOC_Init...5 2.2.2 KOC_Uninit...5 2.3...5

More information

穨control.PDF

穨control.PDF TCP congestion control yhmiu Outline Congestion control algorithms Purpose of RFC2581 Purpose of RFC2582 TCP SS-DR 1998 TCP Extensions RFC1072 1988 SACK RFC2018 1996 FACK 1996 Rate-Halving 1997 OldTahoe

More information

ebook140-8

ebook140-8 8 Microsoft VPN Windows NT 4 V P N Windows 98 Client 7 Vintage Air V P N 7 Wi n d o w s NT V P N 7 VPN ( ) 7 Novell NetWare VPN 8.1 PPTP NT4 VPN Q 154091 M i c r o s o f t Windows NT RAS [ ] Windows NT4

More information

PowerPoint 簡報

PowerPoint 簡報 教學觀摩 - 程式設計 C# Serial Port 南榮科技大學資訊科技系林俊言 串列埠 RS-232-C 稱標準串列埠, 是目前最常用的一種串行通訊介面 全名是 資料終端裝置 (DTE) 和資料通訊裝置 (DCE) 之間串行二進位資料交換介面技術標準 數據 : TXD(pin 3): 序列埠資料輸出 RXD(pin 2): 序列埠資料登錄 交握 : RTS(pin 7): 發送資料請求 CTS(pin

More information

untitled

untitled ArcGIS Server Web services Web services Application Web services Web Catalog ArcGIS Server Web services 6-2 Web services? Internet (SOAP) :, : Credit card authentication, shopping carts GIS:, locator services,

More information

Chapter 9: Objects and Classes

Chapter 9: Objects and Classes Java application Java main applet Web applet Runnable Thread CPU Thread 1 Thread 2 Thread 3 CUP Thread 1 Thread 2 Thread 3 ,,. (new) Thread (runnable) start( ) CPU (running) run ( ) blocked CPU sleep(

More information

FY.DOC

FY.DOC 高 职 高 专 21 世 纪 规 划 教 材 C++ 程 序 设 计 邓 振 杰 主 编 贾 振 华 孟 庆 敏 副 主 编 人 民 邮 电 出 版 社 内 容 提 要 本 书 系 统 地 介 绍 C++ 语 言 的 基 本 概 念 基 本 语 法 和 编 程 方 法, 深 入 浅 出 地 讲 述 C++ 语 言 面 向 对 象 的 重 要 特 征 : 类 和 对 象 抽 象 封 装 继 承 等 主

More information

EJB-Programming-4-cn.doc

EJB-Programming-4-cn.doc EJB (4) : (Entity Bean Value Object ) JBuilder EJB 2.x CMP EJB Relationships JBuilder EJB Test Client EJB EJB Seminar CMP Entity Beans Session Bean J2EE Session Façade Design Pattern Session Bean Session

More information

untitled

untitled MODBUS 1 MODBUS...1 1...4 1.1...4 1.2...4 1.3...4 1.4... 2...5 2.1...5 2.2...5 3...6 3.1 OPENSERIAL...6 3.2 CLOSESERIAL...8 3.3 RDMULTIBIT...8 3.4 RDMULTIWORD...9 3.5 WRTONEBIT...11 3.6 WRTONEWORD...12

More information

, 7, Windows,,,, : ,,,, ;,, ( CIP) /,,. : ;, ( 21 ) ISBN : -. TP CIP ( 2005) 1

, 7, Windows,,,, : ,,,, ;,, ( CIP) /,,. : ;, ( 21 ) ISBN : -. TP CIP ( 2005) 1 21 , 7, Windows,,,, : 010-62782989 13501256678 13801310933,,,, ;,, ( CIP) /,,. : ;, 2005. 11 ( 21 ) ISBN 7-81082 - 634-4... - : -. TP316-44 CIP ( 2005) 123583 : : : : 100084 : 010-62776969 : 100044 : 010-51686414

More information

Simulator By SunLingxi 2003

Simulator By SunLingxi 2003 Simulator By SunLingxi sunlingxi@sina.com 2003 windows 2000 Tornado ping ping 1. Tornado Full Simulator...3 2....3 3. ping...6 4. Tornado Simulator BSP...6 5. VxWorks simpc...7 6. simulator...7 7. simulator

More information

untitled

untitled 1 Outline 料 類 說 Tang, Shih-Hsuan 2006/07/26 ~ 2006/09/02 六 PM 7:00 ~ 9:30 聯 ives.net@gmail.com www.csie.ntu.edu.tw/~r93057/aspnet134 度 C# 力 度 C# Web SQL 料 DataGrid DataList 參 ASP.NET 1.0 C# 例 ASP.NET 立

More information

f2.eps

f2.eps 前 言, 目 录 产 品 概 况 1 SICAM PAS SICAM 电 力 自 动 化 系 统 配 置 和 使 用 说 明 配 置 2 操 作 3 实 时 数 据 4 人 机 界 面 5 SINAUT LSA 转 换 器 6 状 态 与 控 制 信 息 A 版 本 号 : 08.03.05 附 录, 索 引 安 全 标 识 由 于 对 设 备 的 特 殊 操 作 往 往 需 要 一 些 特 殊 的

More information

第一章 章标题-F2 上空24,下空24

第一章 章标题-F2 上空24,下空24 Web 9 XML.NET Web Web Service Web Service Web Service Web Service Web Service ASP.NET Session Application SOAP Web Service 9.1 Web Web.NET Web Service Web SOAP Simple Object Access Protocol 9.1.1 Web Web

More information

untitled

untitled 1 Outline ArrayList 類 列類 串類 類 類 例 理 MSDN Library MSDN Library 量 例 參 列 [ 說 ] [] [ 索 ] [] 來 MSDN Library 了 類 類 利 F1 http://msdn.microsoft.com/library/ http://msdn.microsoft.com/library/cht/ Object object

More information

untitled

untitled 1 .NET 利 [] [] 來 說 切 切 理 [] [ ] 來 說 拉 類 類 [] [ ] 列 連 Web 行流 來 了 不 不 不 流 立 行 Page 類 Load 理 Response 類 Write 料 Redirect URL Response.Write("!! ives!!"); Response.Redirect("WebForm2.aspx"); (1) (2) Web Form

More information

(HMI) IO A

(HMI) IO A 6.5 6.5 (HMI) IO 6.52 6.52 6.5 2007 113 A 602 100086 010 82616619 010 62638166 www.kingview.com 4 7 25 38 43 52 63 68 86 SQL 95 99 WEB 105 Web Web Web I/O Microsoft Windows XP/NT/2000 I/O PLC PLC PLC PLC

More information

untitled

untitled 1 MSDN Library MSDN Library 量 例 參 列 [ 說 ] [] [ 索 ] [] 來 MSDN Library 了 類 類 利 F1 http://msdn.microsoft.com/library/ http://msdn.microsoft.com/library/cht/ Object object 參 類 都 object 參 object Boxing 參 boxing

More information

untitled

untitled 12-1 -2 VC# Web Blog 12-1 -1-1 12-1.1-1 C:\ ChartModuleSample_CSharp\Application\2001\ Files\ 4096 KB 120 Web.Config httpruntime maxrequestlength executiontimeout 12-2

More information

1: public class MyOutputStream implements AutoCloseable { 3: public void close() throws IOException { 4: throw new IOException(); 5: } 6:

1: public class MyOutputStream implements AutoCloseable { 3: public void close() throws IOException { 4: throw new IOException(); 5: } 6: Chapter 15. Suppressed Exception CH14 Finally Block Java SE 7 try-with-resources JVM cleanup try-with-resources JVM cleanup cleanup Java SE 7 Throwable getsuppressed Throwable[] getsuppressed() Suppressed

More information

EJB-Programming-3.PDF

EJB-Programming-3.PDF :, JBuilder EJB 2.x CMP EJB Relationships JBuilder EJB Test Client EJB EJB Seminar CMP Entity Beans Value Object Design Pattern J2EE Design Patterns Value Object Value Object Factory J2EE EJB Test Client

More information

JavaIO.PDF

JavaIO.PDF O u t p u t S t ream j a v a. i o. O u t p u t S t r e a m w r i t e () f l u s h () c l o s e () public abstract void write(int b) throws IOException public void write(byte[] data) throws IOException

More information

1 4 1.1 4 1.2..4 2..4 2.1..4 3.4 3.1 Java.5 3.1.1..5 3.1.2 5 3.1.3 6 4.6 4.1 6 4.2.6 5 7 5.1..8 5.1.1 8 5.1.2..8 5.1.3..8 5.1.4..9 5.2..9 6.10 6.1.10

1 4 1.1 4 1.2..4 2..4 2.1..4 3.4 3.1 Java.5 3.1.1..5 3.1.2 5 3.1.3 6 4.6 4.1 6 4.2.6 5 7 5.1..8 5.1.1 8 5.1.2..8 5.1.3..8 5.1.4..9 5.2..9 6.10 6.1.10 Java V1.0.1 2007 4 10 1 4 1.1 4 1.2..4 2..4 2.1..4 3.4 3.1 Java.5 3.1.1..5 3.1.2 5 3.1.3 6 4.6 4.1 6 4.2.6 5 7 5.1..8 5.1.1 8 5.1.2..8 5.1.3..8 5.1.4..9 5.2..9 6.10 6.1.10 6.2.10 6.3..10 6.4 11 7.12 7.1

More information

untitled

untitled 1 .NET 料.NET 料 料來 類.NET Data Provider SQL.NET Data Provider System.Data.SqlClient 料 MS-SQL OLE DB.NET Data Provider System.Data.OleDb 料 Dbase FoxPro Excel Access Oracle Access ODBC.NET Data Provider 料

More information

ebook140-11

ebook140-11 11 VPN Windows NT4 B o r d e r M a n a g e r VPN VPN V P N V P N V P V P N V P N TCP/IP 11.1 V P N V P N / ( ) 11.1.1 11 V P N 285 2 3 1. L A N LAN V P N 10MB 100MB L A N VPN V P N V P N Microsoft PPTP

More information

ebook140-9

ebook140-9 9 VPN VPN Novell BorderManager Windows NT PPTP V P N L A V P N V N P I n t e r n e t V P N 9.1 V P N Windows 98 Windows PPTP VPN Novell BorderManager T M I P s e c Wi n d o w s I n t e r n e t I S P I

More information

AL-M200 Series

AL-M200 Series NPD4754-00 TC ( ) Windows 7 1. [Start ( )] [Control Panel ()] [Network and Internet ( )] 2. [Network and Sharing Center ( )] 3. [Change adapter settings ( )] 4. 3 Windows XP 1. [Start ( )] [Control Panel

More information

CANVIO_AEROCAST_CS_EN.indd

CANVIO_AEROCAST_CS_EN.indd 简 体 中 文...2 English...4 SC5151-A0 简 体 中 文 步 骤 2: 了 解 您 的 CANVIO AeroCast CANVIO AeroCast 无 线 移 动 硬 盘 快 速 入 门 指 南 欢 迎 并 感 谢 您 选 择 TOSHIBA 产 品 有 关 您 的 TOSHIBA 产 品 的 详 情, 请 参 阅 包 含 更 多 信 息 的 用 户 手 册 () 安

More information

Important Notice SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provided by SUNPLUS TECHNOLO

Important Notice SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provided by SUNPLUS TECHNOLO Car DVD New GUI IR Flow User Manual V0.1 Jan 25, 2008 19, Innovation First Road Science Park Hsin-Chu Taiwan 300 R.O.C. Tel: 886-3-578-6005 Fax: 886-3-578-4418 Web: www.sunplus.com Important Notice SUNPLUS

More information

06 01 action JavaScript action jquery jquery AJAX CSS jquery CSS jquery HTML CSS jquery.css() getter setter.css('backgroundcolor') jquery CSS b

06 01 action JavaScript action jquery jquery AJAX CSS jquery CSS jquery HTML CSS jquery.css() getter setter.css('backgroundcolor') jquery CSS b 06 01 action JavaScript action jquery jquery AJAX 04 4-1 CSS jquery CSS jquery HTML CSS jquery.css() getter setter.css('backgroundcolor') jquery CSS background-color camel-cased DOM backgroundcolor.css()

More information

数据采集编程指南 下篇 ni.com/china/daq

数据采集编程指南 下篇                                                                                    ni.com/china/daq 数 据 采 集 编 程 指 南 下 篇 目 录 数 据 存 储 与 文 件 I/O 1-8 同 步 ( 上 ) 9-13 同 步 ( 下 ) 14-21 特 别 篇 : 模 块 化 仪 器 22-26 数 据 存 储 与 文 件 I/O 简 介 本 期 内 容 将 介 绍 如 何 使 用 NI 数 据 采 集 板 卡 来 实 现 数 据 的 存 储 和 文 件 I/O 操 作 在 一 个 典 型 的

More information

導讀 ASP.NET HTML ASP 第一篇 基礎篇第 1 章 認識 ASP.NET ASP.NET ASP.NET ASP.NET ASP.NET 第 2 章 認識 Visual Studio 20 開發環境 Visual Studio 20 Visual Studio 20 第二篇 C# 程式

導讀 ASP.NET HTML ASP 第一篇 基礎篇第 1 章 認識 ASP.NET ASP.NET ASP.NET ASP.NET ASP.NET 第 2 章 認識 Visual Studio 20 開發環境 Visual Studio 20 Visual Studio 20 第二篇 C# 程式 導讀 ASP.NET HTML ASP 第一篇 基礎篇第 1 章 認識 ASP.NET ASP.NET ASP.NET ASP.NET ASP.NET 第 2 章 認識 Visual Studio 20 開發環境 Visual Studio 20 Visual Studio 20 第二篇 C# 程式語言篇第 3 章 C# 程式語言基礎 C# C# 3.0 var 第 4 章 基本資料處理 C# x

More information

untitled

untitled Inside ASP.NET 2.0- ASP.NET 1.1 2. 理念 讀 了 了 度 讀 了 理 類 來 來說 流 了 來 來 來 來 理 來 不 讀 不 不 力 來參 流 讀 了 異 行 來了 錄 行 不 了 來 了 來 行 論說 了 更 不 例 來了 力 行 樂 不 說 兩 例 利 來 了 來 樂 了 了 令 讀 來 不 不 來 了 不 旅行 令 錄 錄 來 了 例 來 利 來 ManagerProvide

More information

mv t ï Catch ex As Exception MessageBox.Show(" «t ï ") Finally ' myconnection.close() End Try SqlConnection(ByVal connectionstring As String) pâ nç á

mv t ï Catch ex As Exception MessageBox.Show( «t ï ) Finally ' myconnection.close() End Try SqlConnection(ByVal connectionstring As String) pâ nç á ! kƒà ï ï ugv º h t ï s p w Connection g o Ç hâe Connection g à t ï u k ï o Ãh Ý ƒà mv tj ï s mv t SQL Server Access ïë mv t Exce ÌÞ 3-1 mv t SQL Server t SQL Server SQL Server.NET Framework ï ± SqlConnection

More information

AN INTRODUCTION TO PHYSICAL COMPUTING USING ARDUINO, GRASSHOPPER, AND FIREFLY (CHINESE EDITION ) INTERACTIVE PROTOTYPING

AN INTRODUCTION TO PHYSICAL COMPUTING USING ARDUINO, GRASSHOPPER, AND FIREFLY (CHINESE EDITION ) INTERACTIVE PROTOTYPING AN INTRODUCTION TO PHYSICAL COMPUTING USING ARDUINO, GRASSHOPPER, AND FIREFLY (CHINESE EDITION ) INTERACTIVE PROTOTYPING 前言 - Andrew Payne 目录 1 2 Firefly Basics 3 COMPONENT TOOLBOX 目录 4 RESOURCES 致谢

More information

Microsoft Word - 11.doc

Microsoft Word - 11.doc 除 錯 技 巧 您 將 於 本 章 學 到 以 下 各 項 : 如 何 在 Visual C++ 2010 的 除 錯 工 具 控 制 下 執 行 程 式? 如 何 逐 步 地 執 行 程 式 的 敘 述? 如 何 監 看 或 改 變 程 式 中 的 變 數 值? 如 何 監 看 程 式 中 計 算 式 的 值? 何 謂 Call Stack? 何 謂 診 斷 器 (assertion)? 如 何

More information

(TestFailure) JUnit Framework AssertionFailedError JUnit Composite TestSuite Test TestSuite run() run() JUnit

(TestFailure) JUnit Framework AssertionFailedError JUnit Composite TestSuite Test TestSuite run() run() JUnit Tomcat Web JUnit Cactus JUnit Java Cactus JUnit 26.1 JUnit Java JUnit JUnit Java JSP Servlet JUnit Java Erich Gamma Kent Beck xunit JUnit boolean JUnit Java JUnit Java JUnit Java 26.1.1 JUnit JUnit How

More information

提问袁小兵:

提问袁小兵: C++ 面 试 试 题 汇 总 柯 贤 富 管 理 软 件 需 求 分 析 篇 1. STL 类 模 板 标 准 库 中 容 器 和 算 法 这 部 分 一 般 称 为 标 准 模 板 库 2. 为 什 么 定 义 虚 的 析 构 函 数? 避 免 内 存 问 题, 当 你 可 能 通 过 基 类 指 针 删 除 派 生 类 对 象 时 必 须 保 证 基 类 析 构 函 数 为 虚 函 数 3.

More information

1.JasperReport ireport JasperReport ireport JDK JDK JDK JDK ant ant...6

1.JasperReport ireport JasperReport ireport JDK JDK JDK JDK ant ant...6 www.brainysoft.net 1.JasperReport ireport...4 1.1 JasperReport...4 1.2 ireport...4 2....4 2.1 JDK...4 2.1.1 JDK...4 2.1.2 JDK...5 2.1.3 JDK...5 2.2 ant...6 2.2.1 ant...6 2.2.2 ant...6 2.3 JasperReport...7

More information

51 C 51 isp 10 C PCB C C C C KEIL

51 C 51 isp 10   C   PCB C C C C KEIL http://wwwispdowncom 51 C " + + " 51 AT89S51 In-System-Programming ISP 10 io 244 CPLD ATMEL PIC CPLD/FPGA ARM9 ISP http://wwwispdowncom/showoneproductasp?productid=15 51 C C C C C ispdown http://wwwispdowncom

More information

C H A P T E R 7 Windows Vista Windows Vista Windows Vista FAT16 FAT32 NTFS NTFS New Technology File System NTFS

C H A P T E R 7 Windows Vista Windows Vista Windows Vista FAT16 FAT32 NTFS NTFS New Technology File System NTFS C H P T E R 7 Windows Vista Windows Vista Windows VistaFT16 FT32NTFS NTFSNew Technology File System NTFS 247 6 7-1 Windows VistaTransactional NTFS TxFTxF Windows Vista MicrosoftTxF CIDatomicity - Consistency

More information

chp6.ppt

chp6.ppt Java 软 件 设 计 基 础 6. 异 常 处 理 编 程 时 会 遇 到 如 下 三 种 错 误 : 语 法 错 误 (syntax error) 没 有 遵 循 语 言 的 规 则, 出 现 语 法 格 式 上 的 错 误, 可 被 编 译 器 发 现 并 易 于 纠 正 ; 逻 辑 错 误 (logic error) 即 我 们 常 说 的 bug, 意 指 编 写 的 代 码 在 执 行

More information

untitled

untitled Lwip Swedish Institute of Computer Science February 20, 2001 Adam Dunkels adam@sics.se (QQ: 10205001) (QQ: 329147) (QQ:3232253) (QQ:3232253) QQ ARM TCPIP LCD10988210 LWIP TCP/IP LWIP LWIP lwip API lwip

More information

Fun Time (1) What happens in memory? 1 i n t i ; 2 s h o r t j ; 3 double k ; 4 char c = a ; 5 i = 3; j = 2; 6 k = i j ; H.-T. Lin (NTU CSIE) Referenc

Fun Time (1) What happens in memory? 1 i n t i ; 2 s h o r t j ; 3 double k ; 4 char c = a ; 5 i = 3; j = 2; 6 k = i j ; H.-T. Lin (NTU CSIE) Referenc References (Section 5.2) Hsuan-Tien Lin Deptartment of CSIE, NTU OOP Class, March 15-16, 2010 H.-T. Lin (NTU CSIE) References OOP 03/15-16/2010 0 / 22 Fun Time (1) What happens in memory? 1 i n t i ; 2

More information

任務二 : 產生 20 個有炸彈的磚塊, 放在隨機的位置編輯 Block 類別的程式碼 import greenfoot.; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) Write a description of class

任務二 : 產生 20 個有炸彈的磚塊, 放在隨機的位置編輯 Block 類別的程式碼 import greenfoot.; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) Write a description of class 踩地雷遊戲 高慧君南港高中 開啟專案 MineSweep 任務一 : 產生 30X20 個磚塊編輯 Table 類別的程式碼 import greenfoot.; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) import java.util.arraylist; Write a description of class MyWorld

More information

untitled

untitled ADF Web ArcGIS Server ADF GeocodeConnection control 4-2 Web ArcGIS Server Application Developer Framework (ADF).NET interop semblies.net Web ADF GIS Server 4-3 .NET ADF Web Represent the views in ArcMap

More information

bingdian001.com

bingdian001.com TSM12M TSM12 STM8L152C6, STM8L152R8 MSP430F5325 whym1987@126.com! /******************************************************************************* * : TSM12.c * : * : 2013/10/21 * : TSM12, STM8L f(sysclk)

More information

84

84 83 84 EKI-1526 EKI-1528 EKI-1524 EKI-1522 EKI-1521 2 2 2 2 2 16 8 4 2 1 10/100 Mbps 10/100 Mbps 10/100 Mbps 10/100 Mbps 10/100 Mbps RS-232/422/485 RS-232/422/485 RS-232/422/485 RS-232/422/485 RS-232/422/485

More information

基于ECO的UML模型驱动的数据库应用开发1.doc

基于ECO的UML模型驱动的数据库应用开发1.doc ECO UML () Object RDBMS Mapping.Net Framework Java C# RAD DataSetOleDbConnection DataGrod RAD Client/Server RAD RAD DataReader["Spell"].ToString() AObj.XXX bug sql UML OR Mapping RAD Lazy load round trip

More information

Java Access 5-1 Server Client Client Server Server Client 5-2 DataInputStream Class java.io.datainptstream (extends) FilterInputStream InputStream Obj

Java Access 5-1 Server Client Client Server Server Client 5-2 DataInputStream Class java.io.datainptstream (extends) FilterInputStream InputStream Obj Message Transition 5-1 5-2 DataInputStream Class 5-3 DataOutputStream Class 5-4 PrintStream Class 5-5 (Message Transition) (Exercises) Java Access 5-1 Server Client Client Server Server Client 5-2 DataInputStream

More information

BOOL EnumWindows(WNDENUMPROC lparam); lpenumfunc, LPARAM (Native Interface) PowerBuilder PowerBuilder PBNI 2

BOOL EnumWindows(WNDENUMPROC lparam); lpenumfunc, LPARAM (Native Interface) PowerBuilder PowerBuilder PBNI 2 PowerBuilder 9 PowerBuilder Native Interface(PBNI) PowerBuilder 9 PowerBuilder C++ Java PowerBuilder 9 PBNI PowerBuilder Java C++ PowerBuilder NVO / PowerBuilder C/C++ PowerBuilder 9.0 PowerBuilder Native

More information

IP Access Lists IP Access Lists IP Access Lists

IP Access Lists IP Access Lists IP Access Lists Chapter 10 Access Lists IP Access Lists IP Access Lists IP Access Lists Security) IP Access Lists Access Lists (Network router For example, RouterA can use an access list to deny access from Network 4

More information

Microsoft PowerPoint - os_4.ppt

Microsoft PowerPoint - os_4.ppt 行 程 資 科 系 林 偉 川 行 程 概 念 行 程 與 程 式 主 要 的 不 同 點 : 程 式 是 被 放 在 外 部 的 儲 存 裝 置 如 磁 碟 上, 而 行 程 則 被 放 在 記 憶 體 中 程 式 在 儲 存 裝 置 中 是 靜 態 的, 而 行 程 在 記 憶 體 中 是 動 態 的, 它 會 隨 著 一 些 事 件 的 發 生 而 產 生 相 對 的 改 變 行 程, 就 是

More information

C6_ppt.PDF

C6_ppt.PDF C01-202 1 2 - (Masquerade) (Replay) (Message Modification) (Denial of Service) - ( ) (Eavesdropping) (Traffic Analysis) 8 1 2 7 3 6 5 4 3 - TCP SYN (SYN flood) Smurf Ping of Death LAND Attack Teardrop

More information

Microsoft PowerPoint - ds-1.ppt [兼容模式]

Microsoft PowerPoint - ds-1.ppt [兼容模式] http://jwc..edu.cn/jxgl/ HomePage/Default.asp 2 说 明 总 学 时 : 72( 学 时 )= 56( 课 时 )+ 16( 实 验 ) 行 课 时 间 : 第 1 ~14 周 周 学 时 : 平 均 每 周 4 学 时 上 机 安 排 待 定 考 试 时 间 : 课 程 束 第 8 11 12 章 的 内 容 为 自 学 内 容 ; 目 录 中 标 有

More information

PowerPoint Presentation

PowerPoint Presentation TOEFL Practice Online User Guide Revised September 2009 In This Guide General Tips for Using TOEFL Practice Online Directions for New Users Directions for Returning Users 2 General Tips To use TOEFL Practice

More information

C/C++ 语言 - 循环

C/C++ 语言 - 循环 C/C++ Table of contents 7. 1. 2. while 3. 4. 5. for 6. 8. (do while) 9. 10. (nested loop) 11. 12. 13. 1 // summing.c: # include int main ( void ) { long num ; long sum = 0L; int status ; printf

More information

Outline USB Application Requirements Variable Definition Communications Code for VB Code for Keil C Practice

Outline USB Application Requirements Variable Definition Communications Code for VB Code for Keil C Practice 路 ESW 聯 USB Chapter 9 Applications For Windows Outline USB Application Requirements Variable Definition Communications Code for VB Code for Keil C Practice USB I/O USB / USB 3 料 2 1 3 路 USB / 列 料 料 料 LED

More information

專業式報告

專業式報告 IP POWER 9258 IP POWER 9258 說 : V1.38 : 2006. 08-1 - VER. X.X, FCC CE 1. IP POWER 9258. 2. 9258 3. 9258-2 - 1....4... 9258... 2....5...... 3....6 4....7...... 5....8... PC / SERVER.. 6. IE... 11 9258...

More information

IC-900W Wireless Pan & Tilt Wireless Pan & Tilt Remote Control / Night Vision FCC ID:RUJ-LR802UWG

IC-900W Wireless Pan & Tilt Wireless Pan & Tilt Remote Control / Night Vision FCC ID:RUJ-LR802UWG IC-900W Wireless Pan & Tilt Wireless Pan & Tilt Remote Control / Night Vision FCC ID:RUJ-LR802UWG --------------------------------------------TABLE OF CONTENTS------------------------------------------

More information

Microsoft Word - PHP7Ch01.docx

Microsoft Word - PHP7Ch01.docx PHP 01 1-6 PHP PHP HTML HTML PHP CSSJavaScript PHP PHP 1-6-1 PHP HTML PHP HTML 1. Notepad++ \ch01\hello.php 01: 02: 03: 04: 05: PHP 06:

More information

1 Project New Project 1 2 Windows 1 3 N C test Windows uv2 KEIL uvision2 1 2 New Project Ateml AT89C AT89C51 3 KEIL Demo C C File

1 Project New Project 1 2 Windows 1 3 N C test Windows uv2 KEIL uvision2 1 2 New Project Ateml AT89C AT89C51 3 KEIL Demo C C File 51 C 51 51 C C C C C C * 2003-3-30 pnzwzw@163.com C C C C KEIL uvision2 MCS51 PLM C VC++ 51 KEIL51 KEIL51 KEIL51 KEIL 2K DEMO C KEIL KEIL51 P 1 1 1 1-1 - 1 Project New Project 1 2 Windows 1 3 N C test

More information

milog3使用说明书.docx

milog3使用说明书.docx Milog3 压 力 记 录 仪 使 用 说 明 书 北 京 盟 舟 威 控 科 技 有 限 公 司 北 京 盟 舟 威 控 科 技 有 限 公 司 北 京 市 朝 阳 区 胜 古 中 路 2 号 院 5 号 楼 金 基 业 大 厦 209 室 电 话 :086-010-64911314 传 真 :086-010-64911314 Milog3 压 力 记 录 仪 使 用 说 明 书 北 京 盟 舟

More information

PowerPoint Presentation

PowerPoint Presentation - - RS-485 ADAM-4000/5000 - ADAM-6000/5000TCP - ADAM-6000W - ADAM-4000/5000 - ADAM Utility - init* - - ADAM ----ASCII - ADAM ----Modbus - OPC Server - RS-485 - AI - Modbus - ADAM ASCII -DO - 1. 现场进行数

More information

TCP/IP TCP/IP OSI IP TCP IP IP TCP/IP TCP/IP

TCP/IP TCP/IP OSI IP TCP IP IP TCP/IP TCP/IP TCP/IP : TCP/IP TCP/IP OSI IP TCP IP IP TCP/IP TCP/IP 1. ASCII EBCDIC Extended Binary-Coded Decimal Interchange Code 2. / (1) (2) Single System Image SSI) (3) I/O (4) 3.OSI OSI Open System Interconnection

More information

标题

标题 文学蓝皮书 9 网络文学 趋向主流化 酝酿新格局 摘 要 2015 年的网络文学 在中央重视 政府主导 民间先 行 资本发力等诸多因素联手推动下 呈现出借势发 展和强势进取的良好势头 网络小说创作 在虚构类 的玄幻与仙侠 写实类的历史与都市 都有好的和比 较好的力作佳构联袂而来 主流体制组建网络文学机 构 IP 热 愈演愈烈 都从不同的侧面和层面推动网 络文学进而做大做强 使之成为当代文学中最具成长

More information

Microsoft Word - InoTouch Editor编程软件手册2012.2.10.doc

Microsoft Word - InoTouch Editor编程软件手册2012.2.10.doc 目 录 第 一 章 关 于 InoTouch Editor 编 程 软 件 的 安 装... - 6-1.1 InoTouch 系 列 HMI 和 InoTouch Editor 软 件 的 简 介... - 6-1.2 安 装 InoTouch Editor 编 程 软 件... - 10-1.3 系 统 连 接 图... - 12-1.4 InoTouch 系 列 人 机 界 面 的 系 统 设

More information

27 :OPC 45 [4] (Automation Interface Standard), (Costom Interface Standard), OPC 2,,, VB Delphi OPC, OPC C++, OPC OPC OPC, [1] 1 OPC 1.1 OPC OPC(OLE f

27 :OPC 45 [4] (Automation Interface Standard), (Costom Interface Standard), OPC 2,,, VB Delphi OPC, OPC C++, OPC OPC OPC, [1] 1 OPC 1.1 OPC OPC(OLE f 27 1 Vol.27 No.1 CEMENTED CARBIDE 2010 2 Feb.2010!"!!!!"!!!!"!" doi:10.3969/j.issn.1003-7292.2010.01.011 OPC 1 1 2 1 (1., 412008; 2., 518052), OPC, WinCC VB,,, OPC ; ;VB ;WinCC Application of OPC Technology

More information

6. 4 5 6 7 8 9 10 11 ...1... 1...1...1...2... 3...3...5...9... 11...11...11...12...12... 13...13...14... 16...16...19...20 I 1 ---------------------------------------------------3 2 ------------------------------------------------6

More information

投影片 1

投影片 1 ICP DAS DeviceNet 解決方案 1501 應用架構 泓格 DeviceNet 系列產品 DeviceNet Master 產品 DeviceNet 主端解決方案 PC Board + DeviceNet 主端函式庫 PC Board PAC USB PISO-CAN 200U PISO-CAN 400U PEX-CAN 200i PCM-CAN 100 PCM-CAN 200 PCM-CAN

More information

RUN_PC連載_8_.doc

RUN_PC連載_8_.doc PowerBuilder 8 (8) Web DataWindow ( ) DataWindow Web DataWindow Web DataWindow Web DataWindow PowerDynamo Web DataWindow / Web DataWindow Web DataWindow Wizard Web DataWindow Web DataWindow DataWindow

More information