The program for the TM12 is made in the interface by the robot, using the TM-flow system. This is a simple graphical flow-chart based programming interface.
The program consists of:
- Sub-flows for dealing cards
- Sub-flows for collecting cards
- Vision tasks for recognizing if a card is facing up or down
- Motion for flipping a card using the card flipping ramp
These actions are performed in the appropriate order, based on the state of the game_state variable. This variable is shared with the PLC, and determines what state the game is in. This variable is used in a gateway node, which decides what action to take, based on the value of the game_state variable.
To determine what positions to include in the game, a boolean variable is used for each of the positions. This determines whether a position will receive a card when the robot is dealing, and whether a card is collected from the position when the robot is collecting the cards. The boolean variables is used in IF blocks in the dealing and collecting sub-flows.
Since the robot is out of order, and the program can no longer be accessed, it is not possible to retrieve any documentation of the current state of the program.