-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path5exIF.script
More file actions
70 lines (70 loc) · 2.1 KB
/
5exIF.script
File metadata and controls
70 lines (70 loc) · 2.1 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
def P5exIF():
set_standard_analog_input_domain(0, 1)
set_standard_analog_input_domain(1, 1)
set_tool_analog_input_domain(0, 1)
set_tool_analog_input_domain(1, 1)
set_analog_outputdomain(0, 1)
set_analog_outputdomain(1, 1)
set_input_actions_to_default()
step_count_0fe8d543_63e8_4bb4_8149_439ec9a82360 = 0.0
thread Step_Counter_Thread_27697b7b_33cd_4354_b558_fd53d61c1bd4():
while (True):
step_count_0fe8d543_63e8_4bb4_8149_439ec9a82360 = step_count_0fe8d543_63e8_4bb4_8149_439ec9a82360 + 1.0
sync()
end
end
run Step_Counter_Thread_27697b7b_33cd_4354_b558_fd53d61c1bd4()
set_tcp(p[0.0,0.0,0.0,0.0,0.0,0.0])
set_tool_communication(False, 115200, 0, 1, 1.5, 3.5)
set_tool_output_mode(0)
set_tool_digital_output_mode(0, 1)
set_tool_digital_output_mode(1, 1)
set_tool_voltage(0)
set_gravity([0.0, 0.0, 9.82])
set_target_payload(0.000000, [0.000000, 0.000000, 0.000000], [0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000])
set_safety_mode_transition_hardness(1)
$ 1 "BeforeStart"
$ 2 "Script: 5_Ex_if.script"
def If_Check(INPUT, digiIN):
if (digiIN == False):
if (get_standard_digital_out(INPUT) == True):
movel(p[0.10,-0.35,0.2,0.0,3.14,0.0], a=1, v=1)
end
if (get_standard_digital_out(INPUT) == False):
movel(p[-0.10,-0.35,0.4,0.0,3.14,0.0], a=1, v=1)
end
elif (digiIN == True):
if (get_standard_digital_in(INPUT) == True):
movel(p[0.0,-0.35,0.2,0.0,3.14,0.0], a=1, v=1)
end
if (get_standard_digital_in(INPUT) == False):
movel(p[0.0,-0.35,0.4,0.0,3.14,0.0], a=1, v=1)
end
end
end
$ 3 "'Start position'"
# 'Start position'
$ 4 "x≔0.0"
global x=0.0
$ 5 "y≔-0.35"
global y=-0.35
$ 6 "z≔0.3"
global z=0.3
$ 7 "rx≔0"
global rx=0
$ 8 "ry≔3.14"
global ry=3.14
$ 9 "rz≔0"
global rz=0
$ 10 "'going to start position via movej'"
# 'going to start position via movej'
$ 11 "movej(p[x,y,z,rx,ry,rz],a=1,v=1)"
movej(p[x,y,z,rx,ry,rz],a=1,v=1)
while (True):
$ 12 "Robot Program"
$ 13 "Wait: 0.01"
sleep(0.01)
$ 14 "If_Check(0,False)"
If_Check(0,False)
end
end