Anhang – Baumer GK473 Benutzerhandbuch

Seite 23

Advertising
background image

Handbuch_GK473_CANopen_DE.doc

23/24

Baumer IVO GmbH & Co. KG

04.05.11

Villingen-Schwenningen,

Germany

7. Anhang

Beispiele zur Übertragung von SPA Befehlen über das Gateway

Gateway Node ID 0x01; CAN Identifier SDO Request =0x600+1=0x601

Erstellt für IXXAT CANanalyser Sequenzer Client (CAN Layer 2)



void R_read (void)

// "R" Istwert lesen

{
//1. Schritt: Adress/Kommandozeiger auf SUB-Bus Teilnehmer
td 1 10

0x601 0x23 0x00 0x30 0x00 0x23 0x52 0x00 0x00

;0x3000

//

| | |__ data

//

| |_______ Befehl 'R'

// |___________

SUB-BUS

Adresse

//

Adresse 03 - > 03 + 0x20 = 0x23

//
//2.Schritt: SUB-Bus transparent Transfer
// segmented SDO upload, nach Init warten bis SUB-Busteilnehmer antwortet
td 1 200

0x601 0x40 0x00 0x31 0x00 0x0E 0x00 0x00 0x00

;0x3100

td 1 10

0x601 0x60 0x00 0x00 0x00 0x00 0x00 0x00 0x00

;

td 1 10

0x601 0x70 0x00 0x00 0x00 0x00 0x00 0x00 0x00

;

}



void S_write (void)

// "S" Sollwert schreiben

{
//1. Schritt: Adress/Kommandozeiger auf SUB-Bus Teilnehmer
td 1 10

0x601 0x23 0x00 0x30 0x00 0x23 0x53 0x00 0x00

;0x3000

//

| | |__ data

//

| |_______ Befehl 'S'

// |___________

SUB-BUS

Adresse

//

Adresse 03 - > 03 + 0x20 = 0x23

//
//2.Schritt: SUB-Bus transparent Transfer
//Beispiel hier : Profilnummer =17; Sollwert -12,50
// Segmented Download
td 1 1

0x601 0x21 0x00 0x31 0x00 0x0E 0x00 0x00 0x00

;0x3100

td 1 1

0x601 0x00 0x31 0x37 0x2D 0x30 0x31 0x32 0x35 ;

td 1 1

0x601 0x11 0x30 0x00 0x00 0x00 0x00 0x00 0x00

;

}

Advertising