December 19, 2018, 12:37:24 AM
Robotforum | Industrial Robots Community

 Creating a while loop using URscript


Author Topic:  Creating a while loop using URscript  (Read 979 times)

0 Members and 1 Guest are viewing this topic.

February 21, 2018, 01:51:05 PM
Read 979 times
Offline

DictatorAdm


Hey all,

I'm pretty new to UR and industrial robotics in general.
I'm working with a UR10 which gets its commands from a separate PC, using a python script to connect to the robot using the socket module.
When sending "basic" commands like move this works just fine, however I'm having trouble getting if statements and while loops to work.
Right now when I try to create a while loop it seems to run as if it's not there and just execute the code within the loop as well as after it, only going through it once.

This site, http://www.zacobria.com/universal-robots-knowledge-base-tech-support-forum-hints-tips/, provided some information on how to program the robots using UR script, but when they mention if and while statements all they do is redirect to the page for setting up a server-client installation and make no mention of how to create these statements even on that page.

I'm not using PolyScope GUI for programming at all right now and I'm trying to keep it that way.

So in summary: How do I create if and while statements using a python script to send commands to the robot?
Thanks in advance

Linkback: https://www.robot-forum.com/robotforum/index.php?topic=25919.0

Today at 12:37:24 AM
Reply #1

Advertisement

Guest


Share via facebook Share via linkedin Share via pinterest Share via reddit Share via twitter

xx
How to come out from While loop after two times of loop execution

Started by rAviteja_g on Yaskawa Motoman Robot Forum

6 Replies
1468 Views
Last post August 29, 2017, 08:25:02 PM
by bmccready
xx
creating a new positioner

Started by belnea1 on Fanuc Robot Forum

1 Replies
377 Views
Last post May 11, 2018, 02:03:16 PM
by Nation
xx
creating a new BASE on the fly

Started by BluesMatt on KUKA Robot Forum

6 Replies
3889 Views
Last post December 07, 2014, 11:46:22 PM
by fluke
xx
Creating a New Jog Frame

Started by LURCH on Fanuc Robot Forum

1 Replies
1731 Views
Last post February 27, 2014, 10:58:33 PM
by bidzej