GetAxisDigitalOutput

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

Syntax

KsError GetAxisDigitalOutput(
     int Index,
     int OutputNumber,
     BOOL* Value
);

Parameters

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

OutputNumber [in]: selects an output. The range is 0-31.

Value [out]: the value of the selected output 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 output could be over before the next function cycle occurs.

Example

Copy
BOOL axisDO = FALSE;
KsError nRet = GetAxisDigitalOutput(0, 1, &axisDO);

Requirements

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

See also

GetAxisDigitalInput

SetAxisDigitalOutput