-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsample_pause_for_switch.sbp
More file actions
56 lines (41 loc) · 2.31 KB
/
sample_pause_for_switch.sbp
File metadata and controls
56 lines (41 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
'Example of triggering an action, a move (or PartFile start), with an Input Switch (a momentary contact)
' The following licensing information must accompany this file at all times.
' ********** Licensing Information **********
' Copyright 2001 ShopBot Tools
'
' We encourage ShopBot users to modify this part file to suit their own needs and have licensed it
' under the Creative Commons Atribution 3.0 license. This license allows you to copy, distribute,
' or modify the file with certain restrictions. Any other use requires permission from ShopBot Tools.
'
' A simplified explanantion of this license is available at
' http://creativecommons.org/licenses/by/3.0/us/
'
' and the full legal code can be found at
' http://creativecommons.org/licenses/by/3.0/us/legalcode
' We encourage you to read this legal code before modifying or distributing this file,
' ESPECIALLY sections 5 and 6 that cover warranties and liability.
'
' If you plan on distributing your new version, you must also state in the header of your file that it
' is a modification of a file supplied by Shopbot Tools, supply information on finding the original file,
' and rename the file to make it clear to the user that it is a modified version.
'
' ********** End Licensing Information **********
' User takes responsibility for the effects and outcomes of the use of this program, and ShopBot Tools assumes
' no liability it's use.
&ini_SW = %(24) 'Save the initial value of the delay time before motion starts; so it can be restore later is used
Action_Sequence:
J2,12,12 'This could also be an FP Command with a Part File Name
J2,6,6
SW, &ini_SW 'After Action, restore initial delay time (not needed is delay not modified)
IF %(51) = 1 THEN GOTO Switch_ERROR 'Test to make sure switch is not already closed ...
' 'Next line is the message you want to display while waiting for Input Switch
'PRESS GREEN BUTTON to RUN (or "OK")
PAUSE UNTIL 1,1 'This is Programming Instruction that Waits for Input Switch (#1 going ON)
SW,0 'This Command reduces the delay to action to 0 sec
GOTO Action_Sequence
END
Switch_ERROR:
'SWITCH MALFUNCTION -- CLEAR TO CONTINUE
PAUSE
IF %(51) = 0 THEN GOTO Action_Sequence
END