From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.



可以從序列埠來輸出Constant Signal嗎?



主要軟體:
主要軟體版本: 3.5.1
主要軟體修正版本:
次要軟體: Driver Software>>NI-Serial
硬體: Serial

問題:

我需要從序列埠一直輸出5 volt的訊號,要如何完成呢?



解答:

雖然從序列埠輸出電壓不是一般的應用方式,但是依然可以達成這樣的功能。你可以將序列埠當成輸入/輸出埠,其中包含3條output lines (TxD, DTR, RTS)和4條input lines (CTS, DSR, DCD, RI)。

Output Lines:
TxD (pin 3): Serial data output
DTR (pin 4): Data Terminal Ready
RTS (pin 7): Request to send

Input Lines:
CTS (pin 8): Clear to send
DSR (pin 6): Data Set Ready
DCD (pin 1): Data Carrier Detect
RI (pin 9): Ring Indicator

另外還包含
RxD (pin 2): Serial data input


這些接腳可以經由VISA property node的設定用來當作電壓輸出。透過property node設定成Serial Settings >> Modem Line Settings,就可以輸出固定電壓。

在LabVIEW 8.2中,也有這樣的範例程式,其連結如下。



相關連結: KnowledgeBase 21P954LI: How Can I Control the DTR and RTS Serial Lines in LabVIEW?
KnowledgeBase 1M9E1L6Q: Serial Communication General Concepts


附加檔案:


Continuous break.vi - Continuous break.vi


報告日期: 08/25/2006
最後更新: 04/10/2008
文件偏號: 40OECPA0