PG_LSpeed Statement

Sets the pulse speed of the time when the PG axis starts accelerating and fishishes decelerating.

Syntax
PG_LSpeed accelSpeed As Integer [, decelSpeed As Integer ],

Parameters

accelSpeed As Integer
Specify the pulse rate (integer from 1 to 32767, unit: pulse/sec) as an expression or numeric value.
decelSpeed As Integer
Specify the pulse rate at the end of deceleration (integer from 1 to 32767, unit: pulse/sec) as an expression or numeric value.

Description
PG_LSpeed specifies the pulse speed when the PG axis starts accelerating and finishes decelerating. It is useful when setting the initial/ending speed of a stepping motor to higher within the range of max starting frequency to offer the best performance of motor, or setting the speed to lower to prevent the stepping motor from stepping out. The default is 300 pulse/second and do not change to use.

Symbol Description
a Speed
b Time
c Start of acceleration
d Finish of deceleration

If omitted the finishing speed of deceleration, the speed set value is used.

The speed value initializes to its default value when any one of the following is performed:

  • Controller Startup
  • Motor On
  • SFree, SLock, Brake
  • Reset or Reset Error is executed
  • Task end by STOP switch or Quit All

See Also
PG_LSpeed Function

PG_LSpeed Statement Example
You can use the PG_LSpeed in the command window or in the program. The following examples show the both cases.

Function pglspeedtst
        Motor On
        Power High
Speed 30;Accel 30,30
PG_LSpeed 1000
Go P0
Fend

To set the PG_LSpeed value from the command window.

> PG_LSpeed 1000,1100
>