Command Examples

Example 1: Transporting a single workpiece using a single robot with a single function hand

Function main  
	Tool 1  
	  
	Motor On  
	Hand_Off 1	'Set to release state  
	Go P0		'Move to initial position  
	  
	Do  
		Go P1	'Pick up position  
		Hand_On 1	'Vacuum  
		If Hand_TW = True Then  
			' Write operations when in an error  
		EndIf  
		  
		Go P2	'Place position  
		Hand_Off 1	'Release  
		If Hand_TW = True Then  
			' Write operations when in an error  
		EndIf  
	Loop  
Fend  

Example 2: Transporting two workpieces at once using a single robot with two single function hands

Function main  
	Tool 1  
	  
	Motor On  
	Hand_Off 1	'Set to release state  
	Hand_Off 2  
	Go P0		'Move to initial position  
	  
	Do  
		Tool 1	'Tool 1  
		Go P1	'Pick up position  
		Hand_On 1	'Hand 1 vacuum  
		If Hand_TW = True Then  
			' Write operations when in an error  
		EndIf  
		  
		Tool 2	'Tool 2  
		Go P2	'Pick up position  
		Hand_On 2	'Hand 2 vacuum  
		If Hand_TW = True Then  
			' Write operations when in an error  
		EndIf  
		  
		Tool 1	'Tool 1  
		Go P3	'Place position  
		Hand_Off 1	'Hand 1 release  
		If Hand_TW = True Then  
			' Write operations when in an error  
		EndIf  
		  
		Tool 2	'Tool 2  
		Go P4	'Place position  
		Hand_Off 2	'Hand 2 release  
		If Hand_TW = True Then  
			' Write operations when in an error  
		EndIf  
	Loop  
Fend  

Example 3: Transporting a single workpiece using two robots each with a single function hand

Function main  
	Xqt RB1	'Robot 1 transportation  
	Xqt RB2	'Robot 2 transportation  
Fend  
  
Function RB1  
	Robot 1  
	Tool 1  
	Motor On  
	MemOff RB1End  
	Hand_Off 1	'Set to release state  
	Go P0  
      
	Do  
		Wait MemSw(RB2End) = On	'Await robot 2 transportation 					'complete  
		MemOff RB1End  
		  
		Go P1	'Pick up position  
		Hand_On 1	'Vacuum  
		If Hand_TW = True Then  
			' Write operations when in an error  
		EndIf  
		  
		Go P2	'Place position  
		Hand_Off 1	'Release  
		If Hand_TW = True Then  
			' Write operations when in an error  
		EndIf  
		  
		Go P0  
		MemOn RB1End  
		Wait 0.2  
	Loop  
Fend  
  
Function RB2  
	Robot 2  
	Tool 1  
	Motor On  
	MemOff RB2End  
	Hand_Off 1	'Set to release state  
	Go P0  
	  
	MemOn RB2End	'Start from robot 1 transportation  
	  
	Do  
		Wait MemSw(RB1End) = On	'Await robot 1 transportation ' complete  
		MemOff RB2End  
		  
		Go P1	'Pick up position  
		Hand_On 1	'Vacuum  
		If Hand_TW = True Then  
			' Write operations when in an error  
		EndIf  
		  
		Go P2	'Place position  
		Hand_Off 1	'Release  
		If Hand_TW = True Then  
			' Write operations when in an error  
		EndIf  
		  
		Go P0  
		MemOn RB2End  
		Wait 0.2  
	Loop  
Fend  

Example 4: Transporting a single workpiece and tightening screws using a single robot, and a single function hand with an electric screwdriver using a tool changer

Function main  
	Tool 1  
	  
	Motor On  
	Hand_Off 1	'Set to release state  
	Go P0  
	  
	Do  
		Tool 1  
		Go P1  
		Hand_On 1  
		If Hand_TW = True Then  
			' Write operations when in an error  
		EndIf  
		  
		Go P2  
		Hand_Off 1  
		If Hand_TW = True Then  
			' Write operations when in an error  
		EndIf  
		  
		Go P3  
		Tool 0  
		Go P4  
		  
		Tool 2  
		Go P5  
		Hand_On 2  
		BMove XY(-10, 0, 0, 0, 0, 0) FC1 Till Hand_On(2) = True  
		Hand_Off 2  
		BMove XY(10, 0, 0, 0, 0, 0) FC1 Till Hand_Off(2) = True  
		Hand_On 2  
		BMove XY(-10, 0, 0, 0, 0, 0) FC1 Till Hand_On(2) = True  
		  
		Go P4  
		Tool 0  
		Go P3  
	Loop  
Fend