Difference between revisions of "EtherCAT:EC USER OP CONFIG"
m |
|||
Line 2: | Line 2: | ||
|DESCRIPTION= | |DESCRIPTION= | ||
− | EtherCAT slaves | + | Configuration of EtherCAT slaves must be performed carefully. Some configurations must be done while the slaves are still in PREOP mode, and some are done while the slaves are in SAFEOP mode. |
− | This function and its | + | |
+ | This function and its counterparts [[EtherCAT:EC USER PREOP CONFIG|EC_USER_PREOP_CONFIG]] and [[EtherCAT:EC USER SAFEOP CONFIG|EC_USER_SAFEOP_CONFIG]] are implemented in the library EC_USER.LIB. The purpose of these functions is to allow the user to '''add his own code''' in order to conduct specific configuration to EtherCAT slaves. | ||
+ | |||
EC USER OP CONFIG(slave address) is invoked after [[EtherCAT:EC_STARTMASTER|EC_STARTMASTER]] has already finished its work and all the slaves are already in OP mode. | EC USER OP CONFIG(slave address) is invoked after [[EtherCAT:EC_STARTMASTER|EC_STARTMASTER]] has already finished its work and all the slaves are already in OP mode. | ||
Revision as of 12:57, 13 January 2015
Configuration of EtherCAT slaves must be performed carefully. Some configurations must be done while the slaves are still in PREOP mode, and some are done while the slaves are in SAFEOP mode.
This function and its counterparts 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 to 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