MicroLYNX – Register

This program feeds a web at a constant velocity, and executes a registration move of a user-defined distance after a registration sensor becomes active. After the completion of the move, an output is switched ON/OFF. Operation starts when the START button is pressed, and ends when the STOP button is pressed, the batch is complete, or when material runs out.

.
MicroLYNX Register diagram

Application flowchart:

MicroLYNX Register flow chart

'******** Parameter Setup ********


MUNIT  =  51200  'One inch per rev @ 1/256 microstepping
VI  =  0.500     'Base speed 1/2" per rev
ACCL = 50
DECL = 50

IOS 21 = 9,0,0	'IO 21 is Start Input
IOS 22 = 10,0,0	'IO 22 is Stop Input
IOS 23 = 0,0,0	'IO 23 is Material Sensor
IOS 16 = 0,0,1  'Differential IO point configured as registration
		'sensor input.
IOF 10 = 0	'Give IO Group 10 highest speed response - 100ns
IOS 31 = 0,1,0	'Cutter output:  GP, output, low true


VAR Speed
VAR Feedlth
VAR Matsens = 23
VAR Cutter = 31
VAR TargetCt	 'Number of parts to make
VAR Count = 0    'Running total

'******** Program ********

PGM     1
LBL  REGISTER
   IT1  =  16 , MARK   'Configure registration sensor 
		       'input trip routine


LBL Enterspd
   PRINT "Enter feed speed (in/sec) ";
   INPUT Speed


LBL Getdist
   PRINT "Enter feed distance (in) ";
   INPUT Feedlth
 

LBL Getcount
   PRINT "Enter Batch Count ";
   INPUT Targetct


LBL  CRUISE
   BR Webdone, !IO Matsens  'Go to end if out of material
   ITE1 = 1		    'Enable input trip routine
   SLEW Speed		    'Accelerate web up to speed.
LBL  IDLER
   BR IDLER, MVG	'Wait for trip routine to complete
						'execution 
 
   BR CRUISE, Count < Targetct	'Execute as long as this condition
				'is true
   PRINT "Batch Completed"
   PRINT "Parts Made ", Count

LBL Webdone
   END       

  LBL  MARK
   MOVR Feedlth  
   HOLD 2  
   IO Cutter = 1	'Turn on cutter output
   DELAY 250		'for 1/4 sec
   IO Cutter = 0	'Turn off cutter  
   INC Count		'Increment Count by 1.
   PRINT "Parts Made ", Count 
  RET

PGM

Download Register .lxt file
Right-click, select Save Target As...
(color-coded in IMS Terminal)

 

> Return to Sample Code Index