EtherCAT:EC USER OP CONFIG

From SoftMC-Wiki
Revision as of 15:33, 4 January 2015 by Nigeller (talk | contribs) (Created page with "{{Template:EtherCAT-Function |DESCRIPTION= EtherCAT slaves configuration is done carefully because some configurations must be carried out while the slaves are still in PREOP...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

EtherCAT slaves configuration is done carefully because some configurations must be carried out while the slaves are still in PREOP mode and some configurations are done when the slaves are in SAFEOP mode.
This function and its counterpart EC_USER_PREOP_CONFIG and EC_USER_SAFEOP_CONFIG are implemented in the library EC_USER.LIB. The purpose of these functions is to allow the user add his own code in order to conduct specific configuration to EtherCAT slaves. EC USER OP CONFIG(slave address) is invoked after EC_STARTMASTER has already finished its work and all the slaves are already in OP mode.


Input

Slave address

Output

None

Return Value

0 on success, -1 if failed. The user can change that.

Declaration

public function EC_USER_OP_CONFIG(byval slave_addr as long) as long

Syntax

retVal = EC_USER_OP_CONFIG(<Slave address>)

Examples

for i = 1 to NUM_OF_SLAVES

   retVal = EC_USER_OP_CONFIG(i)

next

See Also