Integration Guide Techman BPS 1.12
Integration guide for Techman Robots with Bin Picking Studio version BPS 1.12.
1. Prerequisites
Prior to the setup, please ensure that your robot controller meets the following criteria:
HW version of control box v3.2 or v5
System version 2.24 or higher, older version are not supported
This version of robot interface was developed using Techman TM12S running on System Version 2.24
To check the system version on your robot go to top right corner of TMflow screen:
Techman System Version is listed on the first line:
You will also need TMFlow SW installed on your PC, preferably 2.24 or higher version.
Both Robot Firmware and TM Flow can be downloaded for free from
2. Robot Controller Setup
2.1 Initial Setup and Configuration
To initiate the commissioning process, it is essential to first establish a direct user interface with the robot controller. This is accomplished by connecting an HDMI monitor, a USB keyboard, and a mouse to the designated ports on the controller box. This local interface provides the necessary access to view the current system configuration and perform initial modifications, the most critical of which is the setup of the network interface. While this manual will leverage the TMFlow software for all subsequent commissioning procedures, the initial configuration of the controller’s IP address is a fundamental prerequisite that must be performed through this direct connection method.
When using an external monitor with a keyboard and mouse, you gain direct console access to the robot’s operating system. This access is essential for configuring the network parameters required to establish a remote connection with the TMFlow application running on your PC.
2.2 Network Configuration
There are multiple Ethernet ports to choose from on Techman Control Box, and it is up to the user which port is selected for communication, in this tutorial we will use Port 2 for communication with Photoneo Vision Controller.
In order to change IP config, click Menu -> Settings -> System -> Network.
Select Static IP Address as the network method and type IP address and Subnet Mask for Robot Controller. Configuration used in this manual is 192.168.1.2 and 255.255.255.0.
Click the Save button to confirm the changes.
Note
Subnet Mask 255.255.255.0 equals 24 bit subnet mask representation. See this table for more combinations: https://dnsmadeeasy.com/support/subnet
An example of matching Network configuration on Vision Controller side
Vision Controller IPv4 Address: 192.168.1.1 / 24
Robot Controller IPv4 Address: 192.168.1.2 / 24 (as configured in the previous step)
You can also use Test Connection button on Photoneo Vision Controller Network page to ping Techman Robot Controller from Photoneo Vision Controller
Based on the result of Test Connection (ping command) you will get a Robot Available or Robot Unavailable message pop up. If the robot is unavailable, double check cabling and network configuration.
2.3 Second Network interface for PC and TMFlow connection
It is recommended to configure a second Ethernet port for remote access using the TMFlow application on a PC. In this tutorial we will use Port 1 for this purpose. To prevent network conflicts, assign this interface a static IP address on a different subnet than the one used by the main Photoneo Vision Controller.
For example, a valid configuration for this Port 1 would be:
IP Address: 192.168.100.1
Subnet Mask: 255.255.255.0
Before connecting to a real robot using TMFlow from your PC, make sure you configure your Ethernet port IPV4 address to be on the same subnet as the dedicated Techman port but of course with different IP.
Example IPv4 configuration of PC running TMFlow: 192.168.100.2 / 255.255.255.0
2.4 Import and Enabling of State Server
The State Server is an essential component that provides real-time robot state data utilized in calibration routine and 3D visualization. On the Techman platform, this functionality is provided by a custom TMCraft service. The deployment procedure is detailed in the following steps.
Warning
Before uploading a State server zip file make sure TMCraft service and Modbus Slave are enabled on the robot side!
Copy TMserver_PHO_E693C1C9.zip from Photoneo Techman Module to USB Flash drive named TMROBOT.
Plug USB Flash drive to one of the USB ports available in the robot controller.
Go to Settings -> System -> Import/Export and select the Import option.
4.Select TMserver_PHO_E693C1C9.zip from list and import the file
Go to TMcraft service and enable TMserver_PHO_E693C1C9.zip
Restart robot controller to apply settings and service will start automatically after the boot
After reboot, the Photoneo state server on the Techman controller will be fully operational and listening for incoming client connections on TCP port 11004. Before proceeding to visualize the robot’s state, it is necessary to first configure the Tool point.
2.5 Tool TCP Setup
Bin Picking Studio is designed to operate with a Tool Center Point (TCP) that is zeroed relative to the robot’s end flange. On Techman robots, this corresponds to the default “0 Robot End Flange” tool configuration. The explicit definition of TCP offsets on the robot controller is not necessary, as Bin Picking Studio internally calculates and compensates for these values. However, a custom TCP can still be defined if it is required for other subroutines within the larger robot application. For the purposes of this manual we used one CustomTool with Z offset Z = 205mm.
Use of ChangeTCP TMScript command is recommended whenever it is necessary to force use of the proper tool frame. For example for scan and calibration requests, we always need “0 RobotEndFlange” but when picking based on the result of Get Object Pose, “1 Custom Tool” needs to be selected. When picking based on Trajectory request, tool setup doesn’t matter as we use joint based trajectories and TCP is compensated on the BPS side.
2.6 State Server + Visualization of Robot Pose
If TMCraft service on the Techman robot is enabled, Photoneo Bin Picking Studio will connect to 11004 port and read the current Joint Poses + Cartesian Tool Position from Techman robot. While joint poses are used for robot visualization purposes, Cartesian TCP data are essential for calibration as well as all Hand Eye scan requests. See real robot pose on environment page below:
If State client is connected to robot it means that current Joint and Tool data are being streamed from Robot to Bin Picking Studio at 10 Hz. Visualization of robot pose on Environment Page as well as Calibration should work now.
You can visually verify whether correct zeroed tool pose is being reported if you start calibration and switch from Texture to Verification Tab and enable visualization of Tool Pose (robot controller) in the Axis menu. The frame marker should be centered on the flange with the Z axis pointing down and it should be identical to the Tool0 (robot model) frame.
2.7 Connecting to robot from TMFlow
To proceed with the following configuration of the Photoneo-Techman interface, a remote connection from a PC to the robot controller using TMFlow SW is recommended. Leveraging the secondary Ethernet port configured in section 2.3, you can now initiate a session using the TMFlow software.
Launch the TMFlow application on your PC and enter the simulation environment by selecting one of the robot models (e.g., TM12S). From simulation, you can then transition to a live connection with the physical robot hardware. The connection procedure is illustrated in the figure below.
From the list of discovered devices, select the target robot by its IP address and click the “Connect” button. TMFlow will establish a live control session with the physical robot and you have full access to the system.
2.8 Switching from Auto to Manual Mode
Before implementing any program or configuration change, it is necessary to switch the robot from “Auto” to the “Manual” mode. This change is executed using a specific procedure on the Robot Stick controller. Follow the steps below:
Press and hold the M/A button until a beep sounds, and LED indicator starts flashing white
Press the sequence: + , - , + , + , -
Press M/A button again to switch to Manual mode, LED indicator should start flashing green
Press M/A button one more time to lock Manual - LED indicator should remain solid green
2.9 How to use Photoneo Main + Templates
Because the Techman robot controller is limited to single-script execution, the Photoneo interface was developed as a unified script that combines both the ‘user frontend’ and the ‘communication backend’. This file, named photoneo_main_bps.script, is the main script that must be copied to the robot as the first step of the installation.
Open photoneo_main_bps.script in your favourite editor on the PC side. To copy this code to Techman robot, use TMFlow, Go to Project, start a new Project and select New Script, not New Flow:
Now copy and paste the entire code from photoneo_main_bps.script to TMFlow script:
The photoneo_main_bps.script provides a basic example for a bin-picking sequence. It demonstrates the essential workflow: connecting to Bin Picking Studio, triggering a scan, requesting a trajectory, and executing the subsequent pick-and-place operation.
Photoneo_main_bps.script was designed to be easily modified by replacing a MAIN PROGRAM section of the code with sections from different scripts provided in the module.
Example: How to Test the “Reuse Scan” Feature - In order to try this function, open the photoneo_reuse_scan.script file. Copy its entire MAIN PROGRAM block and paste it directly over the old MAIN PROGRAM block in your project.
Important: These templates are designed to work instantly, but you must make sure the feature you want to use is already set up and active in Bin Picking Studio first. So for example if you want to test Change Bounding Box functionality, you need to have at least 2 bounding boxes configured in your solution.
3. Robot Module
Note
It is strongly recommended to read the Photoneo robotic API prior to this section. (user login: customer, password: Ready2LearnHow2Pick).
3.1 Connection to Photoneo Vision Controller
Note
Establishment of connection to the Action Request Server running on the Vision Controller side happens at the beginning of the Communication Backend thread automatically. Two global constants are important in this step:
PHOTONEO_VC_ROBOT_PORT_IP - IP address of port on vision controller side
PHOTONEO_PORT_NUM - Port number used by Action Server (by default 11003)
Change PHOTONEO_VC_ROBOT_PORT_IP to match the IP address of the Vision Controller you’re connecting to, in case of this tutorial it is 192.168.1.1.
Requests can be sent to the Vision Controller only after a connection has been established. Successful connection is visualized by green Connected indicators on Deployment page after program on Techman side is started, see image below
3.2 Request List
This section describes available API calls provided by the Robot module. These procedures are intended for high-level control of the bin picking application.
Note
These procedures are defined in the communication backend and must not be edited!
Request |
Script definition |
Input |
Populates |
|---|---|---|---|
Calibration Start |
int calib_start(int solution_id, int vision_system_id) |
solution_id, vision_system_id |
g_error_code |
Calibration Add Point |
int calib_add() |
None |
g_error_code |
Calibration Save |
int calib_save() |
None |
g_error_code, g_calib_err, cal_pose_cart |
Calibration Stop |
int calib_stop() |
None |
g_error_code |
Initialize |
int init_request(int vision_system_id) |
vision_system_id (also uses global start and end poses) |
g_error_code |
Scan Regular |
int scan_request(int vision_system_id) |
vision_system_id |
g_error_code |
Scan Meshing |
int capture_request(int vision_system_id) |
vision_system_id |
g_error_code |
Reuse Scan |
int reuse_scan_request(int vision_system_id) |
vision_system_id |
g_error_code |
Trajectory |
int trajectory_request(int vision_system_id) |
vision_system_id |
g_error_code, trajectory data, g_tool_point_inv, g_gripping_point_id, g_gripping_point_inv, g_dim_x, g_dim_y, g_rot_z, g_nn_label, g_max_z_height, g_tilt |
Get Object Cartesian Pose |
int get_object_pose(int vision_system_id, float approach_x_offset, float approach_y_offset, float approach_z_offset) |
vision_system_id, approach_x_offset, approach_y_offset, approach_z_offset |
g_error_code, obj_pose_cart, obj_pose_cart_approach, g_dim_x, g_dim_y, g_rot_z, g_nn_label, g_max_z_height, g_tilt |
Pick Failed |
int pick_failed_request(int vision_system_id) |
vision_system_id |
g_error_code |
Get Vision System Status |
int get_status(int vision_system_id) |
vision_system_id |
g_error_code, g_num_of_localized, g_num_of_planned, g_vs_status |
Change Environment Scene |
int environment_change(int environment_id) |
environment_id |
g_error_code |
Change Solution |
int solution_change(int solution_id) |
solution_id |
g_error_code |
Start Solution |
int solution_start(int solution_id) |
solution_id |
g_error_code |
Stop Solution |
int solution_stop() |
None |
g_error_code |
Get Running Solution |
int get_running_sol() |
None |
g_error_code, g_running_sol |
Change Bounding Box |
int bbox_change(int vision_system_id, int bbox_id) |
vision_system_id, bbox_id |
g_error_code |
3.3 Bin Picking procedures
The “Bin Pick” operation is triggered by a request with an ID 200. This request orchestrates the backend and frontend to execute a complete bin picking sequence, which involves both robot trajectory and gripper actions. The following table provides an overview of the bin picking procedures as defined in the customer definitions section of the script.
Request |
Description |
|---|---|
|
Description: Execution of the bin picking trajectory segment. The logic of this procedure must not be edited directly, but feel free to experiment with PTP movement settings.
Input Parameters:
By default there are 4 trajectory segments in basic bin picking trajectory so use first 4 items of those parametrization arrays to control speed and blending of each particular segment. Theoretically 10 trajectory segments can be configures, so additional items are reserved for such a situation |
|
Description: This is a user-defined procedure, typically utilized to attach a gripper to an object at the Grasp waypoint. Usage: The procedure is automatically executed when the Grasp waypoint is configured to perform the Attach procedure upon reaching it. |
|
Description: This user-defined procedure is generally used to detach a gripper from an object during the placement routine, as specified by the robot operator. Usage: The procedure is automatically executed when the waypoint of the grasping method is set to perform the Detach procedure upon reaching it. Note: Usually, this procedure is not configured to be executed automatically at a waypoint. Instead, it should be manually invoked during the placement process by the robot operator. |
|
Description: A user-defined procedure that can be customized for specific operations. Usage: This procedure is automatically executed when the waypoint is configured to trigger the User 1 procedure upon reaching it. |
|
Description: A user-defined procedure that can be customized for specific operations. Usage: This procedure is automatically executed when the waypoint is configured to trigger the User 2 procedure upon reaching it. |
|
Description: A user-defined procedure that can be customized for specific operations. Usage: This procedure is automatically executed when the waypoint is configured to trigger the User 3 procedure upon reaching it. |
3.4 Bin Picking speed and blending parametrization
Bin Picking Studio supports up to 10 trajectory segments per single bin picking trajectory. The default number of segments is 4, if needed, additional segments can be configured on the Grasping method page in the BPS solution.
To customize the robot’s speed and smoothness for a specific segment, use the arrays at the beginning of execute_trajectory_segment function:
ROBOT_END_MOVING_SPEED_ARR: Controls the velocity.
TIME_INTERVAL_ACCEL_ARR: Controls the acceleration time in milliseconds.
BLENDING_VALUE_ARR: Controls the blending between points (0–100%).
CONTINUOUS_ARR: Boolean (True/False) to enable or disable continuous point transfer.
In order to change individual segment speeds, change the appropriate value in the array. For example, to increase the “Start to Approach” segment speed, increase the first index in the ROBOT_END_MOVING_SPEED_ARR array and decrease the TIME_INTERVAL_ACCEL_ARR array.
On the other hand, to slow down the “Approach to Grasp” segment speed, decrease the second index of ROBOT_END_MOVING_SPEED_ARR and increase the second index of TIME_INTERVAL_ACCEL_ARR.
Note
If you experience jerky movement during trajectory execution, feel free to experiment with these settings.
3.5 Example Programs
There are several Techman Template Programs available in Photoneo Techman module that demonstrate how to properly use requests listed in section 3.2 for various use cases:
Program Example |
Description |
|---|---|
|
This basic example demonstrates the basic workflow: It shows how to initialize the system, send a scan request, request a trajectory, receive the trajectory as joint waypoints, and execute the resulting motion paths.
The example also error handling as each function returns an error value assigned to |
|
The basic calibration example. Requirements: Initial calibration of the Vision System must be started and confirmed manually by the user on the Bin Picking side. Calibration Steps
Important: The calibration object—either a ball or marker pattern—must remain in its original position to ensure successful automatic recalibration. |
|
Same as photoneo_basic, but with switching between two Vision Systems. The vision_system_id variable is essential in this setup—it determines which Vision System will be activated or queried for trajectory data. Vision System switching is handled at the bottom MAIN PROGRAM section. |
|
Same as photoneo_basic but with switching between two environment states.
It utilizes the |
|
Same as photoneo_basic but with all solution-switching related requests.
It highlights how to activate different solutions using |
|
Similar to photoneo_basic, but instead of requesting a trajectory, the robot retrieves the Cartesian pose of the object. This is useful in applications such as pick verification, slip sheet detection, and basic picking tasks.
Note: The system returns the raw Cartesian pose from localization. The origin is defined by the object’s STL file. No gripping points or invariance transformations are applied
The result is stored in |
|
Same as photoneo_basic, but with multiple get_status request calls.
The |
|
Static Meshing example. This process shows stitching of multiple scans before initiating localization, which is particularly useful for complex scenes or large objects. It employs a static approach, where the robot pauses at each scanning position to trigger and capture scans. Procedure
|
|
Dynamic Meshing example. This setup leverages the BPS integration of Photoneo Instant Meshing technology alongside the Parallel structured light technique provided by Motion Cam 3D. Note that Dynamic Meshing cannot be utilized with standard PhoXi 3D Scanners. Requirements
. Procedure
|
|
Same as the photoneo_multiple_vision_systems example but introduces the BPS feature
to reuse the scan data from VS1. This allows you to repeat the localization process with varied configurations without needing a new scan. |
4. Runtime
Once the solution is fully configured on the Vision Controller side, it is time to finalize the remaining steps on the robot side and proceed to executing the bin picking program.
4.1 Teach Positions
After opening photoneo_main_bps.script or another template, there are a couple of local poses that need to be touched up before running the program. See TPoint declarations below:
Besides 3 local poses scan, drop_up, drop_down it is also essential to define the Start and End positions for all vision systems used in the current solution. These positions define the initial and final trajectory waypoints and are required during the initialization request for each vision system. Usually start and end positions are touched up in a way that a robot tool is located above the center of the bin.
The easiest way to touch up poses in TMScript is probably to jog the robot to desired pose and hit Point/Target 🞋 button directly on robot flange. This will create a new TPoint variable at the end of the define section in your script and record the point - see image below. From there you can copy Joint or Cartesian values to main poses.
4.2 Gripper commands
Gripper procedures are located at the very end of the photoneo_main_bps.script and by default are empty. It is up to a user to configure proper IO commands for particular operations.
Grasping Methods Page in the Bin Picking Studio enables users to configure a gripper command to be executed at each bin picking trajectory major waypoint. For example, if the Attach Procedure is defined at the Grasp Waypoint, pho_bin_picking() procedure will call the gripper_attach() subprogram after reaching Grasp waypoint.
4.3 Runtime Prerequisites
Final pre deployment check before running bin picking interface from the robot side
Make sure that:
Bin Picking solution is properly configured on the Vision Controller side
Network Setup on Robot Side is completed and State Server works
All Vision Systems defined in solution are calibrated
Start and End Pose for all Vision Systems have been touched up
All local poses in main program have been touched up properly
Gripper procedures are prepared and working
4.4 Running photoneo_main_bps script
Deploy your solution. The Action Request Client (Robot) status on the Deployment page should be DISCONNECTED – from the Action Request Server, if the communication hasn’t been established yet.
Note
It is strongly recommended to decrease the override speed to 5% before running the program for the first time.
If connection has been established properly you will see Action Request Client and Robot State Server status turn to CONNECTED. At this point the sensor should capture the first scan and localization should start localizing objects.
If there is a pickable object in the scene and the trajectory for the first object has been received by the robot controller, the robot should start moving towards the first object.
If everything looks fine, keep moving the robot towards the first target and check if the path is correct. At this point if the robot is too far from the object or pushes the object too deep, then make modifications on the Bin Picking Studio Tool Point or Gripping Point pages.
If trajectories look fine, set up your own placing routine and slowly ramp up speed back to 100%
Congratulations, you have successfully deployed Photoneo Techman Interface. You can now focus on improving your application further. Use CheatSheet and Program Templates as your guidelines.