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

From SoftMC-Wiki
Jump to: navigation, search
(Created page with "{{Axystems:Template:EtherCAT-Function |DESCRIPTION= This function set the slave's operational state |INPUT= Axis' address (example: Ax.dAdd), new state as string |OUTPUT= N...")
 
Line 5: Line 5:
  
 
|INPUT=
 
|INPUT=
Axis' address (example: Ax.dAdd), new state as string
+
Axis' address (example: Ax.dAdd), new state as long where:<br/>
 +
EC_STATE_INIT  - 0x01<br/>
 +
EC_STATE_PREOP  - 0x02<br/>
 +
EC_STATE_SAFEOP - 0x04<br/>
 +
EC_STATE_OP    - 0x08<br/>
  
 
|OUTPUT=
 
|OUTPUT=
Line 16: Line 20:
 
public function EC_SLAVE_SET_STATE(byval addr as long, byval stat as string) as long
 
public function EC_SLAVE_SET_STATE(byval addr as long, byval stat as string) as long
  
|LIMITATIONS=
 
Valid state strings are as follows:<br/>
 
"INIT"<br/>
 
"PREOP"<br/>
 
"SAFEOP"<br/>
 
"OP"<br/>
 
  
 
|EXAMPLE=
 
|EXAMPLE=
 
retVal = EC_SLAVE_SET_STATE(slave_addr[i], "SAFEOP")
 
retVal = EC_SLAVE_SET_STATE(slave_addr[i], "SAFEOP")
  
 +
|SEE ALSO=
 +
* [[Axystems:EtherCAT:EC_SLAVE_GET_STATE|EC_SLAVE_GET_STATE]]
 
}}
 
}}

Revision as of 08:04, 10 December 2013