Script Wapper URCap
Description of functionality:
This URCap wraps the contents of a selected script file into a program node in PolyScope.
The user can select which script file to wrap, and select a decent image to show instead.
User must place a script file (.script) and optionally image (.jpg, .jpeg, .png .bmp) in the /programs/
folder on a real robot, or /home/ur/ursim-current/programs/
in a URSim. The URCap checks the robots serial number, to decide what folder to look in.
The sample demonstrates how to wrap pre-written URScript into a URCap. How to read the serial number and find files on the file system. It also implements images and dropdowns.
Note:
It is suggested, that product that generate URScript code into a file, e.g. CAD/CAM software uses an approach like this, to wrap different modules of the script code into self-explanatory functional blocks for easier readability.
What topics are covered:
appendRaw, script file, image, select, dropdown, manage files, read script
Requirements:
URCaps SDK 1.1+