WriteIOSdoObject
Writes a value of an SDO object into an I/O module.
Syntax
KsCommandStatus WriteIOSdoObject(
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: writes all subindexes. FALSE: writes a single subindex.
Value: pointer to the buffer containing the data to be written into the object.
Length: the length in byte of the value to write.
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 WriteIOSdoObject to set servo drive objects in this scenario.
BYTE byteValueWrite = 1;
Command = WaitForCommand(5, FALSE, WriteIOSdoObject(3, 0X6060, 0, FALSE, &byteValueWrite, 1));
Requirements
RT | Win32 | |
---|---|---|
Minimum supported version | 4.0 | 4.0 |
Header | ksapi.h | ksapi.h |
Library | KsApi_Rtss.lib | KsApi.lib |
See also