GetAxisDigitalInput

Gets the value of a digital input indicated by the index. It provides the value of the input (BOOL).

Syntax

KsError GetAxisDigitalInput(
     int Index,
     int InputNumber,
     BOOL* Value
);

Parameters

Index [in]: the index of an input signal source (axis). Indexes are zero based. Aliases affect this parameter.

InputNumber [in]: selects an input. The range is 0-31.

Value [out]: the value of the selected input signal.

Return value

If the function succeeds, it returns errNoError, otherwise an error code. For more information about the error code, see the KsError list.

Remarks

It is not guaranteed that the digital signal will be detected by the function; a short pulse on the digital input could be over before the next function cycle occurs.

Example

Copy
BOOL axisDI = FALSE;
KsError nRet = GetAxisDigitalInput(0, 1, &axisDI);

Requirements

  RT Win32
Minimum supported version 4.0 4.0
Header ksmotion.h ksmotion.h
Library KsApi_Rtss.lib KsApi.lib

See also

GetAxisDigitalOutput

SetAxisDigitalOutput