ReadOutputDWord
Reads a double word from an output of a real or simulated I/O module.
Syntax
KsError ReadOutputDWord(
int Index,
int ByteOffset,
DWORD* Value
);
Parameters
Index: the index of an I/O module. Indexes are zero based. Aliases affect this parameter.
ByteOffset: specifies a byte offset to the location to read a DWORD value. The max offset is determined by OutputLength in the SlaveStatus structure.
Value: pointer to the value that will receive the DWORD read.
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
ReadOutputDWord can only be called once a link is established and started.
Usable EtherCAT states
ecatOP
Example
Copy
DWORD dwWrite = 0;
nRet = ReadOutputDWord(0, 0, &dwWrite);
Requirements
| RT | Win32 | |
|---|---|---|
| Minimum supported version | 4.0 | 4.0 |
| Header | ksapi.h | ksapi.h |
| Library | KsApi_Rtss.lib | KsApi.lib |
See also