550 807 01

 

Stepper Motor Channel

 

This section provides full details about the structure and contents of a Stepper Motor Channel.

RegNo.

Identifier

MEMORY TYPE

Read Out

Type

SI unit

0

ActualPosition

RAM Read Write

Integer

LongInteger

step

1

SetPoint

RAM Read Write

Integer

LongInteger

step

2

ActualSpeed

RAM Read only

Decimal

Real

step/sec

3

Acceleration

RAM Init EEPROM

Decimal

Real

note

4

PositiveSpeedLimit

RAM Init EEPROM

Decimal

Real

step/sec

5

NegativeSpeedLimit

RAM Init EEPROM

Decimal

Real

step/sec

6

Enable

RAM Read Write

Binary

Byte

---

7

Input5Function

RAM Init EEPROM

Binary

Byte

---

8

Input6Function

RAM Init EEPROM

Binary

Byte

---

9

Input5Capture

RAM Read Write

------

Record

---

10

Input6Capture

RAM Read Write

-----

Record

---

11

ChConfig

RAM Init EEPROM

------

Record

---

12

InFlags

RAM Read only

Binary

Byte

---

13

 

 

 

 

 

14

ChType

PROM Read Only

-----

Record

---

15

ChError

RAM Read only

Binary

Record

---

 

Channel Register Structure and Function

 

 

RegNo. 0: ActualPosition

 

 

ActualPosition:

LongInteger;

 

 

Read:

Shows the current absolute position.

 

 

Write:         

Set actual position.

ActualPosition should only be changed when the motor is idle, otherwise the position will be corrupted.

Note: changing the actual position may result in an unintended move of the motor if the run flag is set.

 

 

 

 

RegNo. 1: SetPoint                      

 

 

SetPoint:

LongInteger;

 

 

SetPoint can be changed during operation. PD 626 will use the Acceleration value to reach the new SetPoint.

 

The function of SetPoint depends upon control mode settings:

 

Position mode:

SetPoint is the target position.

 

 

Speed mode:

Setpoint is the target speed.

If setpoint = 0 the motor will be stopped.

 

Minimum SetPoint value:

Depending on the acceleration value, the lowest possible speed is:

 

Acceleration band:

Lowest possible speed:

0.932

3.72

29,831

283,65

to  3.72

to  29.831

to  283.65

to  898.44   

0.660  step/sec.

2.637 step/sec.

21.10 step/sec

168.8 step/sec

If the setpoint is set to a value lower than the lowest possible speed, the motor will run on the possible lowest speed and the corresponding speed unreachable alarm bit will be set.

Optimum torque is achieved for speed settings higher than 0.708 x acceleration value.

 

Maximum SetPoint value: 13000.

The maximum speed depends on the acceleration value.  The highest guaranteed speed for any acceleration values is 240 x acceleration.

 

Motor speed is changed in discrete steps. The resolution depends of the acceleration value. The motor will use the highest possible speed lower or equal to the set point.

See System Notes for information about speed deviation.

 

 

 

RegNo. 2: ActualSpeed                        

 

 

ActualSpeed:

Real;

 

 

Shows the actual speed.

If ActualSpeed = 0 the motor has stopped.

 

 

 

RegNo. 3: Acceleration                

 

 

Acceleration:

Real;

 

 

NOTE: TheAcceleration value must never be changed while the motor is running!

 

Acceleration register contains the square root of the requested acceleration. 

 

Example: The maximum acceleration required is 120 step/sec². The Acceleration register should therefore be set to: , which results in 10.95 being entered into the Acceleration register.

 

Unit:  

 

Minimum acceleration setting: 0.932         ( = 0.87 step/sec² )

Maximum acceleration setting: 898.44      ( = 807194.4 step/sec² )

 

 

 

RegNo. 4: PositiveSpeedLimit                     

 

 

PositiveSpeedLimit:

Real;

 

 

Depending on the actual mode, the PositiveSpeedLimit has two different functions:

 

Position mode:

PositiveSpeedLimit is the positive (forward) speed limit. The motor is accelerated to this speed.

If PositiveSpeedLimit is changed during operation, the motor will accelerate / decelerate to the new speed limit.

 

Speed mode:

PositiveSpeedLimit is the speed limit. If the requested speed in Setpoint is higher than PositiveSpeedLimit, the speed will be held at the PositiveSpeedLimit.

If PositiveSpeedLimit is changed during operation, the motor will accelerate / decelerate to the new speed limit or the SetPoint whichever is the lower.

 

If the speed limit is set to a value lower than the possible lowest speed, the motor will run at the lowest possible speed and the alarm flag for ‘positive speed unreachable’ will be set.

 

 

 

RegNo. 5: NegativeSpeedLimit                    

 

 

NegativeSpeedLimit:

Real;

 

 

Depending on the actual mode the NegativeSpeedLimit has two different functions:

 

Position mode:

NegativeSpeedLimit is the negative (reverse) speed limit. The motor is accelerated to this speed.

If NegativeSpeedLimit is changed during operation, the motor will accelerate / decelerate to the new speed limit.

 

Speed mode:

NegativeSpeedLimit is the speed limit. If the requested speed in Setpoint is lower than NegativeSpeedLimit, the speed will be held at the NegativeSpeedLimit.

If NegativeSpeedLimit is changed during operation, the motor will accelerate / decelerate to the new speed limit or the SetPoint whichever is the lowest speed

 

If the speed limit is set to a value lower than the possible lowest speed, the motor will run at the lowest possible speed and the alarm flag for ‘negative speed unreachable’ will be set.

 

 

 

RegNo. 6: Enable                 

 

 

Enable:

Bit8;

 

 

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6: MotorMagnetized.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7: Run

 

 

 

 

 

 

 

 

 

 

Bit 6:

Motor Magnetized.

MotorMagnetized can be reset from the DPI in order to release the motor and save power. 

MotorMagnetized can only be reset when the run bit is not set.

Setting the Run bit automatically sets the Motor Magnetized bit.

 

Bit 7:

When the bit is set (Run) the motor will start operating according to the settings and motor magnetization is switched on.

If the bit is reset (Stop) the motor decreases the speed using the value specified in Acceleration until zero speed is reached.

The Run bit can be set / reset via P-NET or by a defined condition on input 5 or input 6.

 

When the motor is stopped the magnetization stays active.

 

If a current overload is detected, both Run and MotorMagnetized flags are reset.

 

 

 

RegNo. 7: Input5Function                    

 

 

Input5Function:

Bit8;

 

 

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0: StopOnFallEdge.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1: StopOnRiseEdge

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2: StartOnFallEdge

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3: StartOnRiseEdge

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6: 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7:

 

 

 

 

 

 

 

 

 

 

 

Bit 0

StopOnFallEdge.

Reset the Run flag on falling edge.

 

Bit 1

StopOnRiseEdge.

Reset the Run flag on rising edge.

 

Bit 2

StartOnFallEdge.

Set the Run flag on falling edge.

 

Bit 3

StartOnRiseEdge.

Set the Run flag on rising edge.

 

 

 

RegNo. 8: Input6Function                    

 

 

Input6Function:

Bit8;

 

 

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0: StopOnFallEdge.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1: StopOnRiseEdge

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2: StartOnFallEdge

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3: StartOnRiseEdge

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6: 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7:

 

 

 

 

 

 

 

 

 

 

 

Bit 0

StopOnFallEdge.

Reset the Run flag on falling edge.

 

Bit 1

StopOnRiseEdge.

Reset the Run flag on rising edge.

 

Bit 2

StartOnFallEdge.

Set the Run flag on falling edge.

 

Bit 3

StartOnRiseEdge.

Set the Run flag on rising edge.

 

 

                  

RegNo. 9: Input5Capture                             

 Input5Capture is a record of the following structure:

Record

 

LastFallPosition:

LongInteger;

 

 

LastRisePosition:

LongInteger;

 

 

FallCount:

LongInteger;

 

 

RiseCount:

LongInteger;

 

End;

 

 

LastFallPosition

Holds the actual position at the last falling edge of Input 5.

 

LastRisePosition

Holds the actual position at the last rising edge of Input 5.

 

FallCount

Holds the counts of falling transitions on Input 5.

 

RiseCount

Holds the count of rising transitions on Input 5.

 

 

 

RegNo. 10: Input6Capture                           

Input6Capture is a record of the following structure:

Record

 

LastFallPosition:

LongInteger;

 

 

LastRisePosition:

LongInteger;

 

 

FallCount:

LongInteger;

 

 

RiseCount:

LongInteger;

 

End;

 

 

LastFallPosition

Holds the actual position at the last falling edge of Input 6.

 

LastRisingPosition

Holds the actual position at the last rising edge of  Input 6.

 

FallCount

Holds the count of falling transitions on Input 6.

 

RiseCount

Holds the counts of rising transitions on Input 6.

 

 

 

RegNo. 11: ChConfig                           

Config is a record of the following structure:

Record

 

WaveForm:

Byte;

 

 

DirectionInvert:

Boolean;

 

 

Mode:

Byte;

 

 

Notification:

Byte;

 

End;

 

NOTE: Values in this register must never be changed while the motor is running!

 

WaveForm 

Selection of motor control phase sequence:

0: half step mode

1: single whole step mode  

2: dual whole step mode      /      2 bit gray-code signal

3: external 3 bit gray-code motor drive mode

 

DirectionInvert

Selection of reverse motor control.

 

Mode

Selection of control mode:

0: Position mode.

Run with the requested speed, continue operation until SetPoint position is reached or Run flag is reset.

The Run flag may be reset by a DPI or by conditions on Input 5 or Input 6.

 

1: Speed mode.

Accelerate to the requested speed. continue operation until Run flag is reset.

The Run flag may be reset by a DPI or by conditions on Input 5 or Input 6.

 

Notification:

 

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0: ErrorChange

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1: RunFlag_Changed_By_Input

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2: CurrentOverload

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3: MotorIdle

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4: CaptureCounterChanged_IN5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5: CaptureCounterChanged_IN6

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6: 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7: 

 

 

 

 

 

 

 

 

 

 

Each bit in the notification byte, enables an event to create a notification signal, provided that notification for the channel is enabled in the Service channel.

 

Changing the value of the Waveform or DirectionInvert registers may result in a loss of true positional information and the system will need to be re-initialized.

 

 

 

RegNo. 12: InFlags               

 

 

InFlags:

Bit8;

 

 

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0: Input5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1: Input6

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7: MotorIdle

 

 

 

 

 

 

 

 

 

 

Input flags are "1" when the input terminal is connected to ground.

Input flags are "0" when the input terminal is floating or connected to a high signal level.

When the input is "1" (True) the LED is ON.

A Rising edge (RiseEdge) is when the flag change from "0" to "1" (from False to True).

 

MotorIdle is set when the motor has finished the operation and the speed is 0 step/sec.

 

 

 

RegNo. 14: ChType

For the stepper channel, ChType is a record having the following structure:

 

RECORD

 

ChannelType:

WORD;

 

 

Exist:

Bit16;

 

 

Functions:

Bit16;

 

End;

 

ChType has the following value:

 

ChannelType = 32802  

 

Exist =

15

 

 

 

 

 

 

 

7

 

 

 

 

 

 

0

1

1

0

1

1

1

1

1

1

1

1

1

1

1

1

1

 

Functions =

15

 

 

 

 

 

 

 

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0: Speed mode

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1: Positioning mode

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2: Unipolar single

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3: Unipolar dual

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4: Unipolar halfstep

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RegNo. 15: CHError

 

Record

 

His:

Bit8;

 

 

Act:

Bit8;

 

End;

 

The 8 bits in Error.His and CHError.Act have the following meaning:

When an error occurs, the corresponding bit is set in both Error.His and Error.Act. When the error disappears, the bit is cleared in ChError.Act.

 

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0: AccParamOutOfRange

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1: PositiveSpeedUnreachable

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2: NegativeSpeedUnreachable

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3: MotorCurrentOverload

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7: ModuleError

 

 

 

 

 

 

 

 

 

 

 

Bit 7

ModuleError. If this bit is set, the rest of the bits have no meaning because a module error can cause random error codes on the individual channels (see also "Service channel").

Bit 6

 

Bit 5

 

Bit 4

 

Bit 3

MotorCurrentOverload, flag is set if the output current is too high. When detected the motor is disabled, and the bit in Act will be reset.

Bit 2

NegativeSpeedUnreachable, the requested negative speed is unreachable.

Bit 1

PositiveSpeedUnreachable, the requested positive speed is unreachable.

Bit 0

AccParamOutOfRange, the acceleration parameter is out of range

 

Speed unreachable alarm function:

Position mode: If the Positive or Negative speed limit setting is outside the possible reachable speeds with the given acceleration value, the corresponding bit is set.

Speed mode:  If the setpoint is set outside of the possible reachable speeds with the given acceleration value, the corresponding bit is set.