beautypg.com

Delta Electronics High-Speed PCI 12-Axis Motion Control Card PCI-DMC-A01 User Manual

Page 195

background image

Chapter 8 Using SDO Protocol API | PCI-DMC-A01 / PCI-DMC-B01

Revised March, 2012

8-9

8.5 _DMC_01_send_message

FORMAT

I16 PASCAL _DMC_01_send_message (U16 CardNo, U16 NodeID,U16 SlotID,
U16 Index,U16 SubIdx,U16 DataType,U16 Value0,U16 Value1,U16 Value2,U16 Value3)

Purpose

Sends SDO command message to the data buffer. (This API function will wait for the
command to be sent before exiting)

Parameters

Name

Data Type

Unit

Description

CardNo U16

Number

Unit

CardNo is between 0~15

NodeID

U16

Number

Unit

Node ID

SlotID U16

Number

Unit

Slot ID

Index

U16

Number

Index of object dictionary

SubIdx

U16

Number

Sub-index of object dictionary

DataType

U16

Number

Datatype of object dictionary

Value0 U16

Number

Message buffer (Data1) – index (Low byte),

CMD (High byte)

Value1

U16

Number

Message buffer (Data2) – Sub-Idx (High byte),

index high (Low byte)

Value2 U16

Number

Message

buffer (Data3) – Data (Low byte)

Value3

U16

Number

Message buffer (Data4) – Data (High byte)

Example

/*

CardNo: Card No; NodeID: NodeID; SlotID: SlotID; Index: SDO Index; SubIdx: SDO
Subindex; DataType: (Read Command) Read data, set as 0x40; (Write Command)
Write 8-bit, set as 0x2f; (Write Command) Write 16-bit, set as 0x2f; (Write Command) Write
32-bit, set as 0x23f;
Value0: SDO data low word (Low byte), Value1: SDO data low word (High byte);
Value2: GSDO data high word (Low byte), Value3: GSDO data high word (High byte)

*/

U16 CardNo=0, NodeID=1, SlotID=0;
U16 Index=0x6060, SubIdx=0, DataType=0x2f, value0=0x1, value1=0, value2=0, value3=0;
I16 status= _DMC_01_send_message (CardNo, NodeID, SlotID, Index, SubIdx, DataType,

value0, value1, value2, value3);

This manual is related to the following products: