Does anyone have a better way to write/edit programs & scripts for the UR?
The pendant interface is really clunky for anything but simple programs, since so little of the program is visible at one time. Going back & forth between the main program and scripts/subprograms can be very frustrating.
I typically do most of my programming remotely using TightVNC to access the pendant, WinSCP to move files around, and either Notepad or Notepad++ for script editing.
This allows me, using 2 monitors, to have the main program on the virtual pendant, and several scripts (or copies) to reference or edit.
This works, but there aren’t many editing tools available as there are in some other systems (such as ABB), which will do things like highlight variables and show where they are used, autofill many of the structures, etc.
Last week I had to work on a UR system out on the factory floor with only my laptop attached – I could have some reference files open on the laptop while scrolling through the program on the pendant, but there was a lot of back & forth troubleshooting the code.
I’ve never tried the simulator - does that give any additional editing features?
What about other editors designed for programming - do they work well with the UR way of programming and take some of the confusion and stupid syntax errors out of the process?
I don’t really do any other programming other than a bit of Omron Sysmac PLC programming, so I don’t really know what’s available.
I think Visual Studio / Visual Studio code has a URScript plugin, but I haven’t used them myself. I’ve seen that @Robpod guy post a lot of stuff from the editor his company / he designed which looked nice. Never used it myself so I can’t speak to whether it meets your needs either.
I can say for certain though that no, the simulator does not help in this endeavor. It’s a shot-for-shot copy of the teachpendent.
I forgot that I had downloaded VS and the URScript plugin quite a while back but hadn’t played with it - I’ll give it a try on some program mods I need to get to.
The Robpod system looks interesting - they have a 15 day trial option, so I probably won’t try that until I have a full project come up - just completed the last UR related project on my plate and installed it at our sister company across the country last week.
I also us VS but also I use ROS to send the script over. This saves moving the USB key here is some sample code if you are interested. You can easily modify to read your file and send it.
script = (
‘def move_xy():\n’
f’ current_pose = get_actual_tcp_pose()\n’
f’ target_pose = p[{robot_pose[“x”]}, {robot_pose[“y”]}, ’
f’current_pose[2], current_pose[3], current_pose[4], current_pose[5]]\n’
f’ movel(target_pose, a={acc}, v={vel})\n’
f’ sleep(2)\n’
‘end\n’
‘move_xy()\n’
)
msg = String()
msg.data = script
self.script_pub.publish(msg)