2008年9月30日 星期二

用Arduino 控制直流馬達

由於數周前手賤將CD-ROM分解之後,得到了一個直流馬達。於是就打算研究一下用Arduino 控制直流馬達。從NYU的Physical computing的網頁中有找到一些資訊。




跑到高雄的長明街去找 TIP120 transistor and L293. 結果兩個都缺貨,於是便買了TIP122 and L295。回家一查Datasheet才發現L293和L295差很多(我果然是豬頭...)
但是用可變電阻控制直流馬達的轉速還是成功了,還蠻有成就感的。不過老婆看到之後竟然說你馬達沒有裝風扇喔,這樣沒辦法吹啦...



Add DataFile for TableSpace

  1. List the DataFile information for reference:
    select TABLESPACE_NAME, File_Name,BYTES/1048576 as "SIZE (MB)" from sys.dba_data_files order by TABLESPACE_NAME,File_Name
  2. Add DataFile into the TableSpace of LogData
    alter tablespace LOG adddatafile ' /oradata/mcs/log02.dbf ' size 5000M;

How to diagnose web connection with Telnet on UNIX

Problem:
My application need to send XML Soap message to the third-party application. How can we make sure the connection is good?

Solution:
In general, we can use web browser to test web connection on PC, but when our product running on UNIX, we can use Telnet to test the web connection.

For example, the URL of XML Soap server is http://192.168.1.99/PMS_Webservice/XMLSoapEventServices.asmx
1. Verify the connection.
Please key in the command:
telnet 192.168.1.99 80
IF you see this message, the connection is fine.
Connected to 192.168.1.99.
Escape character is '^]'.
IF you see this message, the connection is not work. Please check the IP or Port
Trying 192.168.1.99...
telnet: Unable to connect to remote host: Connection refused

2. Verify the web page of XML Soap services.
Please key in the GET command:
GET /PMS_Webservice/XMLSoapEventServices.asmx
IF you see this message, the web page is ok.
HTTP/1.1 200 OK
IF you see this message, the web page is not found. (Service not online)
HTTP/1.1 404 Object Not Found

Example:


themcs001 /usr2/class> telnet 192.168.1.99 80
Trying 192.168.1.99...
Connected to 192.168.1.99.
Escape character is '^]'.
GET /PMS_Webservice/XMLSoapEventServices.asmx
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.1
Date: Wed, 17 Sep 2008 03:13:42 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private, max-age=0
Content-Type: text/html; charset=utf-8
Content-Length: 3340




Connection to 192.168.1.99 closed by foreign host.




themcs001 /usr2/class> telnet 192.168.1.99 80
Trying 192.168.1.99...
Connected to 192.168.1.99.
Escape character is '^]'.
GET /PMS_Webservice/XMLSoapEventServices.php
HTTP/1.1 404 Object Not Found
Server: Microsoft-IIS/5.1
Date: Wed, 17 Sep 2008 03:19:27 GMT
Content-Length: 3878
Content-Type: text/html


Connection to 192.168.1.99 closed by foreign host.