Please enable JavaScript to view this site.

Function that imposes the NMT operating mode of the indicated EtherCAT line.

Syntax

i32 ecat_set_state (i32 nEth, i32 desState [, bool doBopex=FALSE])

nEth

EtherCAT line number.

If 0 means all EtherCAT lines present.

desState

State of the network you wish to impose:

Value

Description

1

INIT

2

PREOPERATIONAL

4

SAFEOPERATIONAL

8

OPERATIONAL

doBopex

Se uguale a TRUE, attende di essere in SAFEOPERATIONAL prima di eseguire il file comandi bopex.stp. Altrimenti non verrà eseguito il file. (opzionale, default FALSE)

Result

Returns:

Value

Description

2

OK:

SAFEOPERATIONAL reached, bopex.stp executed

1

OK:

SAFEOPERATIONAL achieved, bopex.stp not present

0

OK:

desired state imposed

-1

EtherCAT line index illegal

-2

Ethernet port not configured EtherCAT

-3

Illegal status code

-4

Network not started due to configuration error. (use mreport -a)

-5

Function used not in a timesharing task with doBopex TRUE flag.

-6

Timeout for waiting for SAFEOPERATIONAL status to then execute bopex.stp: operation not executed

Validity

Rule, Task

Note


 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC