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:

Figure 1

Techman System Version is listed on the first line:

Figure 2

You will also need TMFlow SW installed on your PC, preferably 2.24 or higher version.

Figure 3

Both Robot Firmware and TM Flow can be downloaded for free from

2. Robot Controller Setup

2.1 Initial Setup and Configuration

Figure 4

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.

Figure 5

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.

Figure 6

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.

Figure 7

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)

Figure 8

You can also use Test Connection button on Photoneo Vision Controller Network page to ping Techman Robot Controller from Photoneo Vision Controller

Figure 9

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.

Figure 10

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

Figure 11

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.

Figure 12

4.Select TMserver_PHO_E693C1C9.zip from list and import the file

  1. Go to TMcraft service and enable TMserver_PHO_E693C1C9.zip

Figure 13
  1. 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.

Figure 14

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.

Figure 15

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:

Figure 16

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.

Figure 17

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.

Figure 18

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

Figure 19

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.

Figure 20

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:

Figure 21

Now copy and paste the entire code from photoneo_main_bps.script to TMFlow script:

Figure 22

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.

Figure 23

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

Figure 24

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

execute_trajectory_segment(bool is_fine)

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: is_fine this argument is used to control stopping at the trajectory segment endpoint. If true then robot stops, if false robot should continue to next segment without stopping. Global variable g_trajectory_size holds sizes of each segment and another global variable g_trajectory_counter stores the number of already executed trajectories. Speed Control To customize the robot’s speed and smoothness for a specific segment, use the arrays at the beginning of this 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.

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

gripper_attach()

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.

gripper_detach()

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.

gripper_user_1()

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.

gripper_user_2()

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.

gripper_user_3()

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.

Figure 25
Figure 26

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

photoneo_basic photoneo_hand_eye

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 g_error_code. Note: Ensure that the Start and End waypoints are configured as described in Chapter 4.1.

photoneo_automatic_realibration

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

  1. Teach All 9 Calibration Poses

    • Points can be added to the calibration table manually by clicking “Add Calibration Point” on the Bin Picking Studio (BPS) side.

    • Alternatively, use calib_add() requests directly from your program.

  2. Calibration Accuracy

    • The general rule is that the Calibration Error should remain below 3 mm.

    • Higher errors typically indicate a systematic issue in the calibration setup.

  3. Automatic Recalibration (Optional)

    • Once the first calibration is successful and automatic recalibration is enabled in the Vision System settings:

    • Call the following functions to manage the recalibration cycle: pho_calib_start(), pho_calib_stop(), pho_calib_save()

Important: The calibration object—either a ball or marker pattern—must remain in its original position to ensure successful automatic recalibration.

photoneo_multiple_vision_systems

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.

photoneo_change_environment

Same as photoneo_basic but with switching between two environment states. It utilizes the environment_change() request to activate the desired environment. The environment_id variable is key—it determines which environment state will be activated during the next switch. Environment switching logic is managed at the bottom of the MAIN PROGRAM section.

photoneo_change_solution

Same as photoneo_basic but with all solution-switching related requests. It highlights how to activate different solutions using start_solution() or change_solution(), with the solution_id variable playing a crucial role in determining which solution will be triggered. Solution switching logic is located at the bottom of the MAIN PROGRAM section

photoneo_get_object_pose

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 obj_pose_cart

photoneo_get_status

Same as photoneo_basic, but with multiple get_status request calls. The get_status() command can be called repeatedly in short intervals during the localization phase. Returned values include: g_num_localized: Number of objects localized g_num_planned: Number of objects ready for picking g_vs_status: Current state of the vision system These variables are commonly used for advanced decision-making, particularly to determine the optimal timing for initiating the pick procedure.

photoneo_multiview_static

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

  1. Scanning Setup:

    • The robot should stop at each designated scanning location to trigger and capture scans.

  2. Meshing Process:

    • Move through all scanning poses and ensure that a capture_request() is called in each of them

  3. Initiating Localization:

    • Upon completing the capturing sequence, initiate localization with a regular scan_request(). This request does not perform an actual scan but starts the localization process. This scan does not emit light; it solely triggers the localization.

  4. Scan Limit:

    • Keep the total number of scans below 10 to ensure optimal system performance.

photoneo_multiview_dynamic

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

  • g_mesh_dynamic: Must be set to True to enable Dynamic Meshing mode.

  • g_capture_gap: Recommended to be approximately 500 ms to regulate scanning frequency and prevent system oversaturation.

. Procedure

  1. Initiate Capturing:

    • Begin the capture procedure, allowing Motion Cam to initiate scans at intervals determined by the g_capture_gap (recommended 500ms) while the robot moves through predefined start, end waypoints.

  2. Initial Scan Position:

    • The robot’s position during the first scan is crucial for accurately orienting the final point cloud. Therefore, robot movement must be halted until the first scan is received.

  3. Scanning Sequence:

    • Upon completing the capturing sequence, initiate localization with a regular scan_request(). This request does not perform an actual scan but starts the localization process.

    • This scan does not emit light; it solely triggers the localization.

  4. Scanning Trajectory and View:

    • Ensure the scanning trajectory is smooth, avoiding abrupt rotations, and maintain the scanned area within the field of view to prevent tracking loss.

  5. Scan Limit:

    • The total number of scans should not exceed 60 to maintain optimal performance.

photoneo_reuse_scan

Same as the photoneo_multiple_vision_systems example but introduces the BPS feature reuse_scan(). This request is particularly useful in scenarios where the scene remains unchanged since the last scan, but the user needs to perform localization again with a different configuration, such as searching for different objects, using different bounding boxes, or applying different settings. Procedure

  1. Initial Scan:

    • Perform a regular scan for VS1 to capture the scene.

  2. Reusing Scans:

    • For VS2, utilize the reuse_scan()

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:

Figure 27

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.

Figure 28

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.

Figure 29

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.

Figure 30

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.

Figure 31

Note

It is strongly recommended to decrease the override speed to 5% before running the program for the first time.

Figure 32

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.

Figure 33

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%

Figure 34

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.