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