跳到主要內容

發表文章

目前顯示的是 2014的文章

[Matlab] Tutorial : Matlab Real-time windows target with Advantech PCI-1716 card

This is tutorial about how to use matalb real-time windows target with Advantech PCI-1716 card. I use simulink AI block to read data from Advantech PCI-1716, and AI channel read a sine wave signal from a signal generator.      1.Install Advantech PCI board: real-time windows target -> analog input -> click block -> install new board -> Advantech PCI-1716 2.PCI-1602 read a sine wave from signal generator : Click AI block -> install new board or choose already board -> set channel and range -> run -> read a sine wave from scope

[Matlab] Simulink Real-time (xpc) & Real-time windows target introduction

Matlab provides two real-time library, and this table show feature, support hardware, and description. More detail can look another tutorial : Tutorial : Matlab Real-time windows target with Advantech PCI-1716 card . Simulink real-time (XPC target) Real-time windows target Feature Real-time performance approaching 1 kHz in normal execution mode  Real-time performance approaching 20 kHz in external execution mode (with Simulink Coder) Real-Time Windows Target includes a real-time engine that runs in Windows kernel mode In normal mode, Real-Time Windows Target synchronizes data between the real-time engine and Simulink. Real-time performance approaching 500 Hz in normal mode. Support hardware http://www.mathworks.com/products/simulink-real-time/supported/hardware-drivers.html . http://www.mathworks.com/hardware-support/real-time-windows-target.html

[C#] 如何建立MDI子表單 (匯入其他現存表單)

C#時常有需要整合多個表單的問題,當我們想要整合多個已經製作完畢的表單時,常常卡在不知道如何整合,在此就由筆者的範例來為大家解答: 1.建立MDI的主表單(用來整合其他子表單) 建立 frmMain專案,並將form的name命名為frmMain 將isMdiContainer屬性改為true成為MDI表單,並將WindowsState改為Maximized 加入menuscriptm於待會撰寫用於切換表單的功能  2.建立MDI的子表單(欲匯入之表單) 建立 frmSub專案,並將form的name命名為frmSub、專案管理員中的form.cs名稱改為Form2.cs,以利後面與母表單作區別。 3.匯入子表單於MDI專案中 於母表單專案中,加入子表單進入母表單中: project -> add existing item  選擇子表單Form2.cs    將表單匯入後,點擊專案管理員中的Form2.cs,並修改namesapce從原先專案名稱FrmSub為FrmMain    還要將Form2.designer.cs的Namespace由FrmSub改為FrmMain(下圖誤植)  4.由Menuscript加入觸發切換按鈕 回到MDI母表單Form1,由Menuscript物件加入FrmSub的按鈕 點擊兩下後,撰寫觸發事件: FormSub newform = new FormSub(); //宣告newform為FormSub的型態  5.F5編譯+執行程式 點擊左上方按鈕 即可跳出FrmSub表單 這樣就完成了表單的匯入!! keyword:C#,MDI母表單,MDI子表單, 匯入表單,加入現存表單