MachineLogic Python Programming Guide
… and debugging help. 3.9. main.py this file will be executed by default when launching your application. This is where most of the control code for your application should be written. This file is pre-populated with initialization code so you can start programming your application as soon as the application is created. Here is an example of the initialization code for a new application containing a robot, conveyor and a digital output: from machinelogic import Machine, ActuatorGroup
from machinelogic import MachineException, MachineMotionException, ActuatorGroupException, ActuatorException, RobotException, DigitalOutputException
### Configuration ###
# The following code has been automatically generated from the configuration.
# If the configuration changes, please update the code below, and ensure that the names match.
machine = Machine()
scene = machine.get_scene()
my_controller__1 = machine.get_machine_motion("Controller #1")
# Configured Actuators
my_conveyor = machine.get_actuator("Conveyor")
# Configured Robots
robot = machine.get_robot("New robot")
# Configured Outputs
my_gripper = machine …