Please enable JavaScript to view this site.

WARNING: This function cannot be used in a task if the co_robj()/co_wobj()/coe_robj()/coe_wobj() functions are also present in the task.

This function is used to send an SDO (Service Data Object) message to the specified workstation in order to write/read an object from the object dictionary.

In case of write -> co_send_sdo(nWs, nObj, nSub): the co_asw_sdo() function is then used to check if the write was successful

In case of read -> co_send_sdo(nWs, nObj, nSub, type, data): the co_asw_sdo() function is then used to check if the read request was successful and to download the data

Syntax

i32 co_send_sdo (i32 nWs, i32 nObj,  i32 nSub)

i32 co_send_sdo (i32 nWs, i32 nObj,  i32 nSub,  i32 type, real data)

nWs

Robox station ID (logical workstation 1-:-64)

nObj

Dictionary object code (see dictionary - eds file)

nSub

Sub index code (see dictionary - eds file).

In case of EtherCAT (SoE) see below

type

Allows you to select how to transform the data to be written contained in data into the type requested by the connected device.

Value

Type

1

Signed/unsigned 8 bit.

2

Signed/unsigned 16 bits.

3

Signed/unsigned 24 bits.

4

Signed/unsigned 32 bits.

5

Real 32 bit.

data

Value to transform (from real to FIX format of size specified in type)

Result

Returns:

Value

Description

>= 0

Message handle number.

(To be used later as an incoming parameter in the co_asw_sdo() function)

-1

Illegal parameters

-2

RTE message handler busy

Validity

Rule, Task

Note

Avoid, if the statement is used within a function, declaring local handles to the function itself.

From RTE 34.13.5, the functions co_robj() and co_wobj() are available

 

  

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