1XE100 Erase any previous sequence #100. 1XD100 Begin Sequence #100. 1CR Send Carriage Return (or Return/Enter) to computer. 1"SEQUENCE_#100 1" = quote - in this case, send "sequence #100" to computer. 1CR Send Carriage Return (or Return/Enter) to computer. 1"START-UP_SEQUENCE 1CR 1"MN-MODE_NORMAL 1CR 1"MPI-MODE_POSITIONING_INCREMENTAL 1CR MPI Set Positioning to Incremental mode. OSE1 Enable Jog. JVL.25 Set Jog Velocity Low to .25 revolutions per second. JVH5 Set Jog Velocity High to 5 revolutions per second. JA25 Set Jog Accretion to 25 revolutions per second 2. 1"SSJ1-SEQUENCE_SELECT_MODE 1CR SSJ1 Enable Sequence Select Mode. 1"PZ-SET_CURRENT_POSITION_TO_ZERO 1CR PZ Set current shaft position to D = 0 (for MPA mode). 1"LD3-DISABLE_CW/CCW_LIMITS 1CR LD3 Disables limits (which are not connected). 1"GOTO16-GOTO_SEQUECNE_#16 1CR GOTO16 Goto Sequence #16. XT End Sequence. 1XE16 1XD16 1CR MN Set Mode to Normal. INL0 Set In Level to Low. ( ---|/|---- = closed = 1 ) IN1B Set Input 1 to Sequence Select Mode. IN2B Set Input 2 to Sequence Select Mode. IN3B Set Input 3 to Sequence Select Mode. IN4B Set Input 4 to Sequence Select Mode. IN5A Set Input 5 to be a Trigger Input. IN6R Set Input 6 be a Reset Drive Input. IN7A Set Input 7 to be a Trigger Input. 1CR 1"SET 1"ALL 1"THUMBWHEELS 1"TO 1"ZERO 1CR 1"SET 1"SELECTOR 1"SWITCH_I1-I4 1"& GOSUB27 Goto Sequence #27 and then return to current sequence. 1"START 1"NEW 1"SEQUENCE 1CR TRX0 Wait for Trigger 2 (IN7) to be open. TRX1 Wait for Trigger 2 to be closed. TRX0 Wait for Trigger 2 to be open. XT End sequence. 1XE1 1XD1 1"SIMPLE_MOTION_#1 1CR 1"A25_V5_AD25_D25000 1CR 1"G 1CR A25 Set Acceleration to 25 revolutions per second^2. V5 Set Velocity to 5 revolutions per second. AD25 Set Deceleration to 25 revolutions per second^2. D25000 Set Distance to 25000 steps (5 revolutions). G Go 25000 steps. XG16 Goto Sequence #16 (same as GOTO16). XT 1XE2 1XD2 1"SIMPLE_MOTION_#2 1CR D0 G If in Absolute mode, Go to original shaft position. A1 V40 D50000 AD600 G A600 AD1 V40 D-50000 Go 50000 steps in opposite direction G XT 1XE3 1XD3 1"SIMPLE_MOTION_#3 1CR D0 G A600 AD600 MC Set Mode to Continuous Motion. MPP Set Positioning to Profiling Mode (allowing Acceleration or Velocity changes during motion. G VAR1=0 Set Variable 1 to equal 0. L10 Repeat the following part of this sequence 10 times. VAR1=VAR1+1 Let Variable 1 = Variable 1 + 1 VAR2=VAR1*5 V(VAR2) Set Velocity to Variable 2. VAR3=VAR1*5000 D(VAR3) Set Distance to Variable 1 revolutions. G T.1 Pause for .1 seconds. N End of loop section. XG16 XT 1XE4 1XD4 1"DELICATE_VERTICAL_LIFT_SIMULATION 1CR MPP A25 V4 D65000 Wait until motor has reached 325000 steps (6.5 revolutions), then: AD20 G DP50000 V1 DP10000 V.5 DP5000 T1 Delay. Wait 1 Second, then: D-65000 G DP5000 V1 DP10000 V5 DP50000 NG XG16 XT 1XE5 1XD5 1"INDEXER_SIMULATION 1CR XR26 (XR = GOSUB) 1"BEGIN 1"NEW 1"SEQUENCE 1CR IN6A VAR1=0 L A600 VAR1=VAR1+1 V20 D2500 G T.25 IF(INXXXXXXXX1) If Input 7 = 1 (closed), then: XG16 NIF IF(VAR1=10) If Variable 1 = 10, then: T.5 D-25000 VAR1=0 G NIF N XT 1XE6 1XD6 1"COUTER_SEQUENCE 1CR IN1N Set Input 1 to be Data Input. IN2N Set Input 1 to be Data Input. IN3N Set Input 1 to be Data Input. IN4N Set Input 1 to be Data Input. (for thumbwheels) OUTL1 Set Output Level High. OUT1J Set Output 1 to be a Strobe Output. OUT2J Set Output 2 to be a Strobe Output. OUT3J Set Output 3 to be a Strobe Output. (for thumbwheels) STR15 Set Strobe delay to 15 milliseconds. (for thumbwheels) A60 V30 AD600 L 1"SET 1"SWITICHES_I1-I4 1"TO 1"ZERO 1CR XR27 1"TO 1"BEGIN 1CR TRX0 TRX1 TRX0 1VARD1,035 Set Variable 1 to be Thumbwheel digits 0-3 (ten-millions - ten-thousands) 1VARD2,475 Set Variable 2 to be Thumbwheel digits 4-7 (thousands - ones digit) VAR3=VAR1/100 Let Variable 3 = Variable 1 / 100 (Variable 3 = forward Revolutions) VAR4=VAR2/100 Let Variable 4 = Variable 1 / 100 (Variable 4 = forward Revolutions) VAR5=VAR3*5000 Let Variable 5 = Variable 3 * 5000 (turns revolutions to steps) VAR6=VAR4*-5000 Let Variable 5 = Variable 3 * -5000 1VAR3 Display Variable 3 on computer screen. 1"TWISTS_FORWARD 1CR 1VAR4 1"TWISTS_REVERSE 1CR D(VAR5) Set Distance to Variable 5 Steps. G T.5 D(VAR6) G IF(INXXXXXXX1) If Input 5 = 1 then: XG16 NIF N XT 1XE7 1XD7 1"JOG_SEQUENCE 1CR IN1L Set Input 1 to be a Jog High/Low selector switch. IN5J Set Input 5 to be a CW Jog Button. IN6A Set Input 6 to be a Trigger Input. IN7K Set Input 7 to be a CCW Jog Button. 1"JOG 1"SPEED 1"HIGH/LOW 1"WITH 1"SWITCH_I1 1CR 1"JOG 1"RIGHT 1"WITH 1"BLACK 1"BUTTON 1CR 1"JOG 1"LEFT 1"WITH 1"GREEN 1"BUTTON 1CR TR1 TR0 XG16 XT 1XE8 1XD8 1"CONTINUOUS_MOTION_SEQUENCE 1CR MC Set Mode to Continuous Motion; no distance need be entered. A25 V10 AD25 XR27 1"BEGIN 1"CONTINUOUS 1"MOTION 1CR IN5A IN6R Set 16 to be a Reset ("Z") command. 1N7G Set I7 to be a !GO command. XR26 1"BEGIN 1"NEW 1"SEQUENCE TR1 (Pauses program so that start button can be pressed.) TR0 XT 1XE9 1XD9 1"COMPUTER_INPUT_SEQUENCE_(RSIN) 1CR MPP 1"ENTER 1"ACCELLERATION 1"!# All numbers entered must start with "!" eg. !25 1CR VAR1=RSIN (Drive waits for number to be entered through Computer Terminal.) A(VAR1) 1"ENTER 1"VELOCITY 1"!# 1CR VAR2=RSIN V(VAR2) 1"ENTER 1"DECELERATION 1"!# 1CR VAR3=RSIN AD(VAR3) 1"ENTER 1"DISTANCE 1"!# 1CR VAR4=RSIN D(VAR4) 1CR XR27 1"BEGIN 1CR IN7A TRX1 TRX0 G DP(VAR4) Wait for motor to reach Variable 4 number of steps before proceeding. XR26 1"BEGIN 1"NEW 1"SEQUENCE GOTO16 XT 1XE10 1XD10 IN1A 1"TO 1"ENTER 1"ABSOLUTE_MODE_(MPA) 1"SET 1"SWITCH_I1 1"TO 1"1 1CR 1"TO 1"ENTER 1"INCREMENTAL_MODE_(MPI) 1"SET 1"SWITCH_I1 1"TO 1"0 1CR XR27 1"TO 1"CHOOSE TRXX0 TRXX1 TRXX0 1CR 1CR IF(INXXX1) If I1 is set to 1 (closed), then: MPA Set Mode to Absolute Positioning. 1"YOU 1"ARE 1"IN 1"ABSOLUTE_MODE, 1"ALL 1"DISTANCES 1"ARE 1"FROM 1"SHAFT 1"START-UP 1"POSITION. 1CR XG16 ELSE If I1 is not set to 1 (switch is open), then: MPI Set Mode to Incremental Positioning. 1"YOU 1"ARE 1"IN 1"INCREMENTAL_MODE, 1"ALL 1"DISTANCES 1"ARE 1"FROM 1"LAST 1"MOVE 1CR XG16 NIF XT 1XE11 1XD11 1"CONNECT 1"RED 1"LEAD 1"FROM 1"VOLT-METER 1"TO 1"TERMINAL_#10 1CR 1"CONNECT 1"BLACK 1"LEAD 1"TO 1"TERMINAL_#11 1"OF 1"I/O(2) 1CR 1"TO 1"MONITOR 1"VELOCITY 1"SET 1"SWITCH_I1 1"TO 1"0 1CR 1"TO 1"MONITOR 1"TORQUE 1"SET 1"SWITCH_I1 1"TO 1"1 1CR GOSUB27 1"BEGIN TRX0 TRX1 TRX0 IN1A IF(INXXX1) SSR0 Set Analog Output +/-10v, proportional to Motor Torque. 1"YOU_ARE_NOW_MONITORING_TORQUE 1CR ELSE SSR1 Set Analog Output +/-10v, proportional to Motor Velocity. 1"YOU_ARE_NOW_MONITORING_VELOCITY 1CR NIF XG16 XT 1XE12 1XD12 XG15 XT 1XE13 1XD13 XG15 XT 1XE14 1XD14 XG15 XT 1XE15 1XD15 1"SEQUENCE_NOT_DEFINED 1CR 1"DEAL_WITH_IT. 1CR XG16 XT 1XE25 1XD25 1"PRESS 1"BLACK 1"BUTTON 1"TO XT 1XE26 1XD26 1"PRESS 1"RED 1"BUTTON 1"TO XT 1XE27 1XD27 1"PRESS 1"GREEN 1"BUTTON 1"TO XTThe Thumbwheels are wired to I1-I4 & O1-03. Four selector
--
eg