ReadIOSdoObject

Reads a value of an SDO object from an I/O module.

Syntax

KsCommandStatus ReadIOSdoObject(
     int Index,
     int ObIndex,
     int ObSubIndex,
     BOOL CompleteAccess,
     BYTE* Value,
     int Length
);

Parameters

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

ObIndex: the index of the object. See your device manual to get the value.

ObSubIndex: the subindex of the object. See your device manual to get the value.

CompleteAccess: TRUE: reads all subindexes. FALSE: reads a single subindex.

Value: pointer to the value to be read.

Length: the length in byte of the value to read.

Return value

Returns the KsCommandStatus structure.

Usable EtherCAT states

ecatOP

Example

Copy
// CANopen drives connected to Beckhoff EL6751 CANopen master/slave terminal
// would be recognized as IOs in the KINGSTAR subsystem. In this case,
// you can use ReadIOSdoObject to get servo drive objects.
BYTE byteValueRead = 0;
Command = WaitForCommand(5, FALSE, ReadIOSdoObject(3, 0X6061, 0, FALSE, &byteValueRead, 1));

Requirements

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

See also

ReadAxisSdoObject

WriteAxisSdoObject

WriteIOSdoObject