Table of Contents - TG Drives

Table of Contents - TG Drives Table of Contents - TG Drives

28.11.2012 Views

70 Pg, Profile generator Wait Pg.RDY Stop ; And wait until we are there. EXTENDED REGISTER GROUPS MOVE TO A TARGET POSITION ’BEHIND’ OUR CURRENT POSITION. Let Pg.Acc, 18784200 Let Pg.Decel, Pg.Acc Let Pg.PosSpeed, 3276800 Let Pg.Speed, 100000 Wait Pg.ASpeed = Pg.Speed Wait In.DI1 = 1 RefPos 0 Pos Abs 0 Wait Pg.RDY Stop ; Setup the profile generator. ; Start movement. ; Wait until speed has been reached. ; Wait for external input active. ; Set new logical position. ; Move to the logical zero position. ; And wait until we are there. VERY SHORT MOTION PROFILES AND/OR VERY HIGH DECELERATION RATES. Let Pg.Acc, 18784200 Let Pg.Decel, Pg.Acc Let Pg.PosSpeed, 3276800 loop: Clr Tmr.T0 Pos Rel 1000 Wait Pg.RDY Disp Tmr.T0 Clr Tmr.T0 Wait Tmr.T0 > 1000 Goto loop GROUP MEMBERS (GROUP 4) ; Setup the profile generator. ; Clear timer for time measurement. ; Do a small step (modify this even smaller) ; and wait until we are there. ; Display the time required to do the step. ; Do this once every second. Group member Member No Range Ability Default Pg.Mode 0 0..7 RW Specifies the working mode for the profile generator. This is normally manipulated by the POS statement and is not usually user-modified. Bit0 (1) =1 Standard positioning active. Bit1 (2) =1 Positioning is now ”locked on target”, i.e. the deceleration phase has begun. Bit2 (4) =1 Acceleration profile is active. Bit3..6 NYI Bit7 (128) = 1 The outputs are disconnected from the regulator. Intended for external use of the Pg, i.e. virtual master. Pg.Acc 1 0..2 31 -1 RW The allowed acceleration in increments-per-second 2 . Pg.APos 2 -2 31 ..2 31 -1 RW The actual set-position in increments. User's Manual 5.1 Inmotion Technologies AB Doc. No.9032 0027 01 (B), Rev. 11.07.2001

EXTENDED REGISTER GROUPS Pg.ASpeed 3 -32767000.. 32767000 RW Pg, Profile generator The actual set-speed (velocity) in increments-per-second. Pg.Speed 4 -32767000.. 327670000 RW The destination speed (velocity) in increments-per-second. Pg.PosSpeed 5 0..32767000 RW The maximum speed to use during positioning. If set to zero, the Pg.Speed value is used. Pg.Decel 6 0..2 31 -1 RW The same variable as Pg.Ret. The deceleration rate used for braking when completing a move in increments-per-second 2 . Pg.Ret 7 0..2 31 -1 RW The same variable as Pg.Decel. The deceleration rate used for braking when completing a move. Pg.ADecel 8 0..2 31 -1 R The actual deceleration used. Differs from Pg.Decel especially if Pg.RSlope is not zero. Pg.Dpos 9 -2 31 ..2 31 -1 RW The destination position for a positioning. This variable is manipulated by the POS xxx program statements, but can also be manipulated manually. Pg.RSlope 10 0..127 RW Creates a RC-like slope on the stop ramp at the end of a move. Used to allow a softer stop of the move. PG.RSlope = 0 gives a straight line and Pg.RSlope = 127 gives a maximum soft stop. NOTE: Using large values of Pg.RSlope so the stop is very soft makes the move’s completion time uncertain. Thus, in some cases, it may be more advantageous to wait for Pg.ASpeed to get below a predetermined low value than to wait for Pg.RDY to return TRUE. When Pg.RSlope is used then the initial deceleration will be larger that the setting of Pg.Decel. For Pg.RSlope = 127 the initial deceleration will be 2 * Pg.Decel. Pg.RDY 11 0 1 R Used to see if a move Pos xxx or Profile has completed. Returns to 1 when complete and 0 when incomplete. The Pg.Mode can also be used for this, but gives more details. Pg.ProScale 12 -2 31 .. 2 31 -1 RW The scale factor for profiles. Pg.ProScale multiplies the data obtained from the profile and the result is then divided by 1024. If the value in the PDATA * Pg.ProScale is greater than 2 47 , the profile generator gets an overflow and the profile is aborted. User's Manual 5.1 Inmotion Technologies AB Doc. No.9032 0027 01 (B), Rev. 11.07.2001 71

EXTENDED REGISTER GROUPS<br />

Pg.ASpeed<br />

3 -32767000.. 32767000 RW<br />

Pg, Pr<strong>of</strong>ile generator<br />

The actual set-speed (velocity) in increments-per-second.<br />

Pg.Speed 4 -32767000.. 327670000 RW<br />

The destination speed (velocity) in increments-per-second.<br />

Pg.PosSpeed 5 0..32767000 RW<br />

The maximum speed to use during positioning. If set to zero, the<br />

Pg.Speed value is used.<br />

Pg.Decel 6 0..2 31 -1 RW<br />

The same variable as Pg.Ret. The deceleration<br />

rate used for<br />

braking when completing a move in increments-per-second 2 .<br />

Pg.Ret 7 0..2 31 -1 RW<br />

The same variable as Pg.Decel. The deceleration<br />

rate used for<br />

braking when completing a move.<br />

Pg.ADecel 8 0..2 31 -1 R<br />

The actual deceleration used. Differs from Pg.Decel especially<br />

if Pg.RSlope is not zero.<br />

Pg.Dpos 9 -2 31 ..2 31 -1 RW<br />

The destination position for a positioning. This variable is<br />

manipulated by the POS xxx program statements, but can also<br />

be manipulated manually.<br />

Pg.RSlope 10 0..127 RW<br />

Creates a RC-like slope on the stop ramp at the end <strong>of</strong> a move.<br />

Used to allow a s<strong>of</strong>ter stop <strong>of</strong> the move. PG.RSlope = 0 gives a<br />

straight line and Pg.RSlope = 127 gives<br />

a maximum s<strong>of</strong>t stop.<br />

NOTE: Using large values <strong>of</strong> Pg.RSlope so<br />

the stop is very s<strong>of</strong>t<br />

makes the move’s completion time uncertain. Thus, in some<br />

cases, it may be more advantageous to wait for Pg.ASpeed to<br />

get below a predetermined low value than to wait for Pg.RDY to<br />

return TRUE. When Pg.RSlope is used<br />

then the initial<br />

deceleration will be larger that the setting <strong>of</strong> Pg.Decel.<br />

For Pg.RSlope = 127 the initial deceleration will be<br />

2 * Pg.Decel.<br />

Pg.RDY 11 0 1 R<br />

Used to see if a move Pos xxx or Pr<strong>of</strong>ile has completed. Returns<br />

to 1 when complete and 0 when incomplete. The Pg.Mode can<br />

also be used for this, but gives more details.<br />

Pg.ProScale 12 -2 31 .. 2 31 -1 RW<br />

The scale factor for pr<strong>of</strong>iles. Pg.ProScale multiplies the data<br />

obtained from the pr<strong>of</strong>ile and the result is then divided by 1024.<br />

If the value in the PDATA * Pg.ProScale is greater<br />

than 2 47 ,<br />

the pr<strong>of</strong>ile generator gets an overflow and the pr<strong>of</strong>ile is aborted.<br />

User's Manual 5.1 Inmotion Technologies AB<br />

Doc. No.9032 0027 01 (B), Rev. 11.07.2001<br />

71

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!