Difference between revisions of "EtherCAT:EC SLAVE GET STATE"

From SoftMC-Wiki
Jump to: navigation, search
(Created page with "{{Axystems:Template:EtherCAT-Function |DESCRIPTION= This function returns the slave's operational state |INPUT= Axis' address (example: Ax.dAdd), new state as string |OUTPU...")
 
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Axystems:Template:EtherCAT-Function
+
{{Languages|EtherCAT:EC_SLAVE_GET_STATE}}
 +
{{Template:EtherCAT-Function
  
 
|DESCRIPTION=
 
|DESCRIPTION=
This function returns the slave's operational state
+
This function returns the slave's operational state.
  
 
|INPUT=
 
|INPUT=
Axis' address (example: Ax.dAdd), new state as string
+
Axis address (example: Ax.dAdd)
  
 
|OUTPUT=
 
|OUTPUT=
Line 18: Line 19:
  
 
|DECLARATION=
 
|DECLARATION=
public function EC_SLAVE_SET_STATE(byval addr as long, byval stat as string) as long
+
public function EC_SLAVE_GET_STATE(byval addr as long) as long
  
 
|EXAMPLE=
 
|EXAMPLE=
Line 24: Line 25:
  
 
|SEE ALSO=
 
|SEE ALSO=
* [[Axystems:EtherCAT:EC_SLAVE_SET_STATE|EC_SLAVE_SET_STATE]]
+
* [[EtherCAT:EC SLAVE SET STATE|EC_SLAVE_SET_STATE]]
 +
* [[EtherCAT:EC SLAVE NMT STATESET|EC_SLAVE_NMT_STATESET]]
  
 
}}
 
}}

Latest revision as of 18:31, 6 May 2017

Language: English  • 中文(简体)‎

This function returns the slave's operational state.

Input

Axis address (example: Ax.dAdd)

Output

None

Return Value

EC_STATE_INIT - 0x01
EC_STATE_PREOP - 0x02
EC_STATE_SAFEOP - 0x04
EC_STATE_OP - 0x08
EC_STATE_INVALID- 0x00

Declaration

public function EC_SLAVE_GET_STATE(byval addr as long) as long

Examples

retVal = EC_SLAVE_GET_STATE(slave_addr[i])

See Also