Материал: SercosDriveLib_E

Внимание! Если размещение файла нарушает Ваши авторские права, то обязательно сообщите нам

SoftMotion: DriveInterface: SercosDrive.lib

Document Version 2.17

Library Version 1.9.3.0

tech_doc_e.doc / V1.1

© 3S - Smart Software Solutions GmbH

Page 1 of 16

SercosDriveLib_E.doc

 

SoftMotion: DriveInterface: SercosDrive.lib

CONTENT

 

VERSION AND APPLICABILITY INFORMATION

3

1

PARAMETERS IN PLC CONFIG

4

 

1.1

BusInterface

4

 

1.2

AxisGroup

4

 

1.3

supported Drive.wControlType

4

 

1.4

Additional Structure SERCOS_AXIS_REF

4

 

1.5

Maximum Number of Axis

5

 

1.6

Global variables

5

2

FEATURES

6

3

START-UP/CONFIGURATION

7

 

3.1

AxisGroup.wState

7

 

3.2

Error sources

7

 

3.3

Parameter Setting during Startup

8

 

3.4

Position Scaling (IDN76)

10

 

3.5

PackProfile conformity check

10

4

SERCOS SPECIFIC FBS FOR ACCESSING DRIVE PARAMETERS

12

 

4.1

Parameter Identifier (S/P)

12

 

4.2

Reading/Writing Normal Parameters with a Standard Length

12

 

4.3

Reading/Writing List Parameters

13

 

4.4

Reading String Parameters

13

5

SERCOS I/OS

14

6

WAYS OF SYNCHRONIZING PLC AND SERCOS HARDWARE

15

CHANGE HISTORY

16

tech_doc_e.doc / V1.1

© 3S - Smart Software Solutions GmbH

Page 2 of 16

SercosDriveLib_E.doc

 

SoftMotion: DriveInterface: SercosDrive.lib

Version and Applicability Information

Hardware interface

SercosBase.lib (interface version 4)

 

 

Supported drives

all drives and I/Os supporting Sercos standard

 

 

Runtimes

x86 (RTE for Windows NT/2000/XP; CE; Linux)

 

 

Components

Sercosdrive.lib

 

SercosBase.lib (interface version 4) or driver with identical

 

interface;

 

SysLibFile.lib; (for drive specific config text file)

 

SysLibCallback.lib

 

 

Document Version

2.16 (05.09.2006)

 

 

tech_doc_e.doc / V1.1

© 3S - Smart Software Solutions GmbH

Page 3 of 16

SercosDriveLib_E.doc

 

SoftMotion: DriveInterface: SercosDrive.lib

1 Parameters in PLC config

1.1BusInterface

wParam1

Not used

 

 

wParam2

Not used

 

 

dwParam1

Not used

 

 

dwParam2

reserved

 

 

1.2AxisGroup

wParam1

Baudrate in MBaud

 

 

wParam2

brightness of LED (1-63)

 

 

wParam3

Not used

 

 

wParam4

Not used

 

 

dwParam1

Not used

 

 

dwParam2

Not used

 

 

dwParam3

internal use

 

 

dwParam4

internal use

 

 

dwParam4

internal use

 

 

1.3supported Drive.wControlType

T / - yes

V/V yes

V/P yes

P/P yes

PV/PV yes

V/- yes

CONF yes

 

 

 

 

 

 

 

The cyclically sent/received data can consist of: fSet/ActPosition, fSet/ActVelocity, fSet/ActTorque.

Two additional IDNs can be both sent and received cyclically using awAddRealtimeSend/ReceiveIDN (see below).

1.4Additional Structure SERCOS_AXIS_REF

 

 

name

Type

 

 

 

 

 

 

 

 

 

 

bReceivedRealtimeBit1,

BOOL

realtime bits of status word

 

 

 

bReceivedRealtimeBit2

 

from drive

 

 

 

 

 

 

 

 

 

bSendRealtimeBit1,

BOOL

realtime bits for control word

 

 

 

bSendRealtimeBit2

 

to drive

 

 

 

 

 

 

 

 

 

wReceivedRealtimeBit1ID,

WORD

internal use

 

V1.1

 

wReceivedRealtimeBit2ID,

 

(IDN mapped onto realtime

 

 

wSendRealtimeBit1ID,

 

 

/

 

wSendRealtimeBit2ID

 

bits (IDN301, 303, 305, 307);

 

tech doc e.doc

 

 

checked at startup)

 

 

 

 

 

 

 

 

 

 

 

awOperationMode

ARRAY [0..3] OF WORD

content of IDN32, 33, 34, 35

 

 

 

 

 

 

 

awAddRealtimeSendIDN,

ARRAY [0..

IDN of additional cyclic data

 

 

 

awAddRealtimeReceiveIDN

SERC_ADD_CYCLIC] OF

must be set during first IEC

 

 

 

 

 

 

 

 

 

 

 

 

 

 

© 3S - Smart Software Solutions GmbH

Page 4 of 16

 

 

 

SercosDriveLib_E.doc

 

 

 

SoftMotion: DriveInterface: SercosDrive.lib

 

WORD

cycle

abyAddRealtimeSendLength,

ARRAY [0..

length of additional cyclic data

abyAddRealtimeReceiveLength

SERC_ADD_CYCLIC] OF BYTE

in bytes

 

 

must be set during first IEC

 

 

cycle

 

 

 

adwAddRealtimeSendData,

ARRAY [0..

additional cyclic data

adwAddRealtimeReceiveData

SERC_ADD_CYCLIC] OF

 

 

DWORD

 

 

 

 

abyActiveTriggers

ARRAY[0..1] OF BYTE

internal use

 

 

 

strConfigFromFile

STRING

full path and name of config

 

 

text file (see below)

 

 

must be set during first IEC

 

 

cycle

 

 

 

ascrl, ascsl

ARRAY[0..4] OF

internal use (cyclic data)

 

Sercos_Cyclic_Entry

 

asrl,assl

ARRAY[0..SERC_MAX_ENTRIE

internal use (config lists at

 

S] OF Sercos_Entry

startup)

sc, scr, srds, sw, sr, srl, swl

SercosBase-FBs

internal use

 

 

 

byOperatingMode

BYTE

operation Mode

 

 

 

bIsIO

BOOL

FALSE (default) for drives;

 

 

TRUE for I/Os

1.5Maximum Number of Axis

The maximum number of axis (SERC_MAX_DRIVES) is defined in SercosBase.lib and not limited by this library.

The minimum cycletime for n axis is depending on the amount of cyclic data and the baudrate.

1.6 Global variables

In this lib the following global variables are defined, which shouldn’t been touched by the user, but give the driver of the next lower level (e.g. SercosBase.lib) the possibility to configure the functionality programmed in Sercosdrive.lib:

 

 

g_iInterruptStartingState

State from which the interface starts producing

 

 

 

 

interrupts

 

 

 

 

 

 

 

 

g_bInterfaceDoesTiming

if set, no SlotCalculation and reading/writing of

 

 

 

 

timing parameters is done by Sercosdrive.lib

 

 

 

 

 

 

 

 

g_bInterfaceDoesCommandsForPhaseSwitchin

If set, commands 127 and 128 are not executed by

 

 

 

g

Sercosdrive.lib

 

 

 

 

 

 

 

 

g_bTurnDWORDS

If set, lower and upper word of (read/to be written)

 

 

 

 

DWORDs are turned

 

 

 

 

 

 

 

 

g_bAlwaysUseConfigCyclicTeleType

If set, no preferred cyclic telegram type (IDN 15) is

 

/ V1.1

 

 

used, but always the configurable one (7)

 

 

 

 

 

 

g_byWaitDuringStartupInPhase

If set <>255, the start-up procedure is stopped in

 

e.docdoctech

 

 

 

 

the specified phase and not continued until this

 

 

 

 

value is changed.

 

 

 

 

 

 

 

 

g_byCurrentPhase

monitors the current Sercos phase (255: unknown)

 

 

 

 

 

 

 

 

 

 

 

 

 

© 3S - Smart Software Solutions GmbH

Page 5 of 16

 

 

 

SercosDriveLib_E.doc