Difference between revisions of "EtherCAT:EC USE SLAVE"

From SoftMC-Wiki
Jump to: navigation, search
m (Miborich moved page Axystems:EtherCAT:EC USE SLAVE to EtherCAT:EC USE SLAVE: Global renaming of Axystems: namespace into (Main):)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Axystems:Template:EtherCAT-Function
+
{{Languages|EtherCAT:EC_USE_SLAVE}}
 +
{{Template:EtherCAT-Function
  
 
|DESCRIPTION=
 
|DESCRIPTION=
This subroutine notifies the master with which slaves to use (out of the entire topology) according to their address.<br/>
+
This subroutine notifies the master which slaves to use (out of the entire topology) according to their address.<br/>
I receives a string that indicates the slave's type. There are two possible types:<br/>
+
It receives a string that indicates the slave's type. There are two possible types:<br/>
 
"ECAT_AXIS_SLAVE" - This string indicates that the slave is a motion drive<br/>
 
"ECAT_AXIS_SLAVE" - This string indicates that the slave is a motion drive<br/>
"ECAT_IO_SLAVE" - This string indicates that the slave is a IO module<br/>
+
"ECAT_IO_SLAVE" - This string indicates that the slave is an IO module<br/>
  
 
|INPUT=
 
|INPUT=
Slave address, vendor ID, product ID, slave type.
+
Slave address, vendor ID, product ID.<br/>
 +
slave type - A string that distinguishes between motion drives and IO modules: "ECAT_AXIS_SLAVE" or "ECAT_IOMODULE_SLAVE"<br/>
 +
dc_sync - Instructs the EtherCAT master whether or not to synchronize the clock of the slave. (True or False)
  
 
|OUTPUT=
 
|OUTPUT=
Line 17: Line 20:
  
 
|DECLARATION=
 
|DECLARATION=
public sub EC_USE_SLAVE(byval slaveaddress as long, byval vendor as long, byval product as long, byval slave_type as string)
+
public sub EC_USE_SLAVE(byval slaveaddress as long, byval vendor as long, byval product as long, byval slave_type as string, byval dc_sync as long)
  
 
|SYNTAX=
 
|SYNTAX=
call EC_USE_SLAVE(<slave address>, <slave vendor>, <slave product>, <slave type>)
+
call EC_USE_SLAVE(<slave address>, <slave vendor>, <slave product>, <slave type>, <dc sync>)
  
 
|EXAMPLE=
 
|EXAMPLE=
call EC_USE_SLAVE(slaveAddr, slave0_vendor, slave0_product, "ECAT_AXIS_SLAVE")
+
call EC_USE_SLAVE(slaveAddr, slave0_vendor, slave0_product, "ECAT_AXIS_SLAVE", TRUE)
  
 
|SEE ALSO=
 
|SEE ALSO=

Latest revision as of 08:11, 7 May 2017

Language: English  • 中文(简体)‎

This subroutine notifies the master which slaves to use (out of the entire topology) according to their address.
It receives a string that indicates the slave's type. There are two possible types:
"ECAT_AXIS_SLAVE" - This string indicates that the slave is a motion drive
"ECAT_IO_SLAVE" - This string indicates that the slave is an IO module

Input

Slave address, vendor ID, product ID.
slave type - A string that distinguishes between motion drives and IO modules: "ECAT_AXIS_SLAVE" or "ECAT_IOMODULE_SLAVE"
dc_sync - Instructs the EtherCAT master whether or not to synchronize the clock of the slave. (True or False)

Output

None

Return Value

Void

Declaration

public sub EC_USE_SLAVE(byval slaveaddress as long, byval vendor as long, byval product as long, byval slave_type as string, byval dc_sync as long)

Syntax

call EC_USE_SLAVE(<slave address>, <slave vendor>, <slave product>, <slave type>, <dc sync>)

Examples

call EC_USE_SLAVE(slaveAddr, slave0_vendor, slave0_product, "ECAT_AXIS_SLAVE", TRUE)

See Also