ForceInputBit

Writes a bit into an input of a simulated I/O module.

Syntax

KsError ForceInputBit(
     int Index,
     int BitOffset,
     BOOL Value
);

Parameters

Index: the index of a simulated I/O module. Indexes are zero based. Aliases affect this parameter.

BitOffset: specifies a bit offset to the location to write a bit value. The max offset is determined by InputLength in the SlaveStatus structure.

Value: a bit value to write. TRUE writes one (1) and FALSE writes zero (0).

Return value

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

Usable EtherCAT states

ecatOP

Example

N/A

Requirements

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

See also

ForceInputByte

ForceInputDWord

ForceInputWord