如何利用Serial埠寫入控制字元?
主要軟體:
主要軟體版本: 7.0
主要軟體修正版本:
次要軟體: N/A
硬體: Serial
問題: 我需要輸入字串到一個透過序列埠(Serial port)連結的裝置,字串元包含"Ctrl B"這類的控制字元,但是在LabVIEW底下,當我輸入Ctrl B時並無法秀出任何字串。
解答: 寫入這類的控制字元到序列埠(Serial port)時,必須將string轉成Hex方式呈現,將此字元輸入到Write buffer裡。舉例來說,假如你今天要輸入"Ctrl B"到序列埠,你需要將string格式改成Hex模式並輸入"02"到write buffer裡。將網頁下拉你將會看到一個表格,秀出所有控制字元相對應的Hex值。
相關連結:
附加檔案:
- Table.doc
報告日期: 10/04/2004
最後更新: 07/31/2005
文件偏號: 3E3ASSXR
Other Support Options
Ask the NI Community
Collaborate with other users in our discussion forums
Request Support from an Engineer
A valid service agreement may be required, and support options vary by country.