How to Pass Transformation Matrix to and from BuildIT
How to Pass Transformation Matrix to/from BuildIT
Transformation information can get passed to BuildIT through different methods, using a text file or the Python interface.
The examples below can be adapted to pass transformation information from BuildIT to external systems or applications.
Before beginning, download the sample BuildIT files:
Relocate device using text file |
Relocate device using Python interface |
File: Read
- Call the "General: File: Read" command on a file containing transformation matrix or vectors
Example:
- Add a device to the model
- Run Relocate device using text file.process
- The process generates random values and writes them to a text file
- The random value generation should be replaced by an external program generating this text file
- The process assumes that the vales are expressed in the active CS.
Python interface
-
Use the Python interface to pass transformation info to the process and use it to relocate the device
Example:
- Add a device to the model
- Run Relocate device using Python interface.process
- The process generates random values and relocate the device based on those
- The random value generation could be replaced with exchanges of real values with a PLC, or read from a file
- The process assumes that the values from the robot are expressed in the World Axes. If this is not the case, the Vec3 objects need to be transformed accordingly prior to converting into process variables