SEG                Define a segment for contouring mode

Syntax                        

SEG D_time, D_ref

Define a contouring segment via immediate values

SEG VAR16, VAR32

Define a contouring segment via TML variables

 

Operands        D_time –16-bit unsigned integer value: segment time

D_ref: 32-bit fixed immediate value: segment reference increment per time unit

VAR16 – 16-bit integer variable: segment time

VAR32 – 32-bit fixed variable: segment reference increment per time unit

PlaceTML

Binary code

SEG

DescriptionDefines a contouring segment. The time and the reference increment per time unit may be provided either as immediate values or via the values of 2 TML variables. The time represents the segment duration expressed in time units i.e. in number of slow loop sampling periods. The reference increment represents the amount of reference variation per time unit i.e. per slow loop sampling period.

SEG VAR16, VAR32 uses a 9-bit short address for the operand. Bit 9, value X, specifies the destination address range:

AddressRange

 

Example        

// Position contouring with position feedback on motor: 500 lines

// incremental encoder (2000 counts/rev)

MODE PC;//Set Position Contouring

TUM1;//Start from actual value of position reference

SEG 100U, 20.00000; //1st segment. At its end, TPOS increases with

  // 20*100 = 2000 counts (i.e. 1 rev)

UPD; //Execute immediate

SEG 100U, 0.00000; // 2nd segment. At its end TPOS remains the same  SEG 0, 0.0; //End of contouring