GetAxisDigitalInput
獲取由索引標示的數位輸入值,其提供了輸入的值 (BOOL)。
語法
KsError GetAxisDigitalInput(
int Index,
int InputNumber,
BOOL* Value
);
參數
Index [in]:輸入信號源(軸)的索引。 索引以零為起點;別名將影響此參數。
InputNumber [in]:選擇輸入,範圍為 0-31。
Value [out]:選定的輸入信號值。
回傳值
如果此函式執行成功,會回傳 errNoError
,否則會傳回錯誤碼。如需更多有關錯誤碼的資訊,請參閱 KsError 清單。
備註
不保證該函式會檢測到數位信號; 數位輸入上的短脈衝可能會在下一個函式週期發生之前結束。
範例
複製
BOOL axisDI = FALSE;
KsError nRet = GetAxisDigitalInput(0, 1, &axisDI);
使用需求
RT | Win32 | |
---|---|---|
最低支援版本 | 4.0 | 4.0 |
標頭檔 | ksmotion.h | ksmotion.h |
程式庫 | KsApi_Rtss.lib | KsApi.lib |
參見