Console

You can use the console to edit several FACTORY I/O settings. Note that most of these settings are not available through the user interface and can only be changed through the console. To open the Console, press the Backslash (\) key or Click on VIEW > Open Console.

You can execute commands at startup by writing them on an auto.cfg file and placing this file in the installation folder of FACTORY I/O and/or in ..\Documents\Factory IO. Note that, when this file is placed on the installation folder of FACTORY I/O it will be always executed, independently of any Windows account. This file will be the first to be executed followed by the one placed in ..\Documents\Factory IO.

developer console

App

Command Value Default Description
app.is_user_admin bool Depends on current Windows user Checks if the current user is a system administrator.
app.log_to_console bool False Logs all errors and warnings to the console.
app.print_args() void - Prints args passed during the launch.
app.print_system_info() void - Prints information about the graphics card, processor, and OS.
app.run_in_background bool True Sets the application to run in the background when the window loses focus.
app.online bool True Allows the application to access the internet.
app.local_feed bool False Loads Welcome Window contents from local resources.

Audio

Command Value Default Description
audio.enabled bool True Turns the audio on or off.
audio.volume float 1.0 Sets the audio volume.

Camera

Command Value Default Description
camera.fp_detected bool False Sets a flag that indicates if the first person camera is detected by sensors.
camera.fov float 50 Sets the camera field of view.
camera.look_invert_x bool False Inverts the camera look on the X axis.
camera.look_invert_y bool False Inverts the camera look on the Y axis.
camera.look_sensitivity float 1.0 Sets the camera look sensitivity.
camera.move_sensitivity float 1.0 Sets the camera move sensitivity.
camera.auto_focus bool False Enables orbit camera auto focus.
camera.lock_mouse_on_rotation bool True Locks the mouse to the center of the window when rotating the camera.
camera.restrict_to_environment bool False Keeps orbit camera inside the warehouse.
camera.vertical_obliqueness float 0.0 Sets the vertical obliqueness of the camera frustum.
camera.position_index int -1 Moves the camera to one of the saved positions.
camera.position_cycle_interval float 0.0 Cycle between saved camera positions when in RUN mode. Minimum: 1 second. Use 0 to stop.

Console

Command Value Default Description
console.clear() void - Clears the console.
console.opacity float 1.0 Sets the console opacity.
console.set_window(int left, int top, int width, int height) void - Sets the location and size of the console window.

Input

Command Value Default Description
input.bind_key(string action, string primary_key) void - Binds an action to the desired key.
input.print_inputs() void - Prints the list of actions and bound keys.
input.force_alternative_mouse_data bool False Alternative method for calculating mouse movement. Fixes mouse behavior in virtual machines or remote desktop.

Instructor

Command Value Default Description
instructor.is_locked bool False Indicates if the current scene has any locked features.
instructor.lock_scene(string password, bool lock_current_parts, bool run_mode_only, bool hide_failures) void - Locks a scene with a password.
instructor.unlock_scene(string password) bool - Unlocks a scene with a password.

License

Command Value Default Description
license.print_host_ids() void - Prints a list of host IDs.
license.host string - Gets the computer name.
license.clear_trial() void - Deletes the trial license.
license.set_proxy(string host, string port, string user, string pass) void - Sets the proxy information required for license activation/deactivation.
license.clear_proxy() void - Clears the proxy information.
license.broadcast bool True Enables broadcast to automatically find a floating license server on the network. On large networks this operation can block or take to long - on these cases disable broadcasting by setting it to False.
license.log_enabled bool True Enables logging.

Physics

Command Value Default Description
physics.timestep float 1/120 The amount of time to step the simulation by (in seconds). Decrease this value (e.g. 1.0/240.0) to increase the quality of the physics simulation; Increase it in order to save CPU cycles when simulating larger scenes.
physics.max_substeps int 8 Maximum number of steps the physics simulation is allowed to take during each frame. Set to 1 to run the simulation with minimal physics impact on performance. However, the simulation may run slower if there isn't enough time during a frame for physics computation.

Scene

Command Value Default Description
scene.capture_screenshot(string filename, bool hide_console) void - Captures a png screenshot. The filename is the name of the .png without the file extension (saved in My Documents/FactoryIO/Screenshots). Set hide_console to True to hide the console before taking the screenshot.
scene.capture_screenshot(string filename, int size, bool hide_console) void - Captures a screenshot using a size multiplier (integer between 1 and 10). Set hide_console to True to hide the console before taking the screenshot.
scene.debug_sensor_range bool False Shows the sensors range using a dashed line.
scene.export_tags() void - Exports all tags names to a text file named Tags_xxx.txt. This file can be found in the Documents\Factory IO\ folder.
scene.export_tags_csv() void - Exports all tags names to a csv file named Tags_xxx.csv. This file can be found in the Documents\Factory IO\ folder.
scene.force_quit() void - Forces the application to quit without prompting the user about possibly lost changes.
scene.load_from_path(string scene_path) void - Loads a scene from a path. The following command loads the scene assembler from the Desktop. Note that you must either use two backslashes when specifying the scene's path, or prefix with r scene.load_from.path(r"C:\Users\XXXX\Desktop\assembler.factoryio")
scene.my_scenes_path string - Sets the "My Scenes" path, i.e the directory where your scenes will be saved and loaded from. You can set a path relative to the application executable by starting it with .\. For example, .\MyScenes will be relative to Factory IO.exe. Not saved between sessions, must be placed on an auto.cfg file for persistence.
scene.print_saves() void - Prints the scenes list.
scene.quit() void - Quits the application.
scene.start_in_run_mode bool False Starts the scene in Run mode.
scene.time_scale float 0.1 Sets the time scale used for slow motion (use with care, may create instability in the physics simulation).

Stats

Command Value Default Description
stats.reset() void - Resets the performance statistics.
stats.visible bool False Shows the performance statistics.

Video

Command Value Default Description
video.apply() void - Applies the current settings.
video.keep() void - Saves the current settings. This method must be called after video.apply().
video.fullscreen bool False Sets the application to run in fullscreen. Call video.apply() to apply it.
video.print_current_res() void - Prints the current screen resolution.
video.print_supported_res() void - Prints the supported screen resolutions.
video.quality string Medium Gets the current video quality.
video.set_quality(int quality) void - Sets the video quality (0 = low, 1 = medium; 2 = high; 3 = very high).
video.set_res(int width, int height) void - Sets the screen resolution. Call video.apply() to apply it.
video.bloom bool Depends on quality Turns the bloom effect on or off.
video.aa int Depends on quality Sets the antialiasing value (0, 2, 4 or 8).
video.pe_aa bool Depends on quality Turns the antialiasing effect on or off. This effect is applied by default on very high quality.
video.ssao bool Depends on quality Turns the screen space ambient occlusion on or off.
video.target_fps int 60 How many times the video is rendered per second. Setting to 0 makes the video render as fast as possible.
video.vsync void False Sets the number of VSyncs that should pass between each frame (0 to not wait for VSync).

UI

Command Value Default Description
ui.show_camera_navigation bool True Shows the camera navigation gizmo.
ui.show_sensors bool False Shows the sensors tags.
ui.show_actuators bool False Shows the actuators tags.
ui.show_addresses bool False Shows the addresses of the sensors and actuators tags.
ui.show_welcome_window bool True Shows the welcome screen at startup.
ui.enabled bool True Shows the user interface.

Drivers

Command Value Default Description
drivers.apply_current_mapping_to_all() - Copies the tag to I/O point mapping of the current driver to all others.

Allen-Bradley Logix5000

Command Value Default Description
drivers.allen_bradley_logix5000.ip_address string - Sets the hostname or IP address of the PLC.
drivers.allen_bradley_logix5000.auto_connect bool False Indicates whether this driver should automatically connect to the server.

Allen-Bradley Micro800

Command Value Default Description
drivers.allen_bradley_micro800.ip_address string - Sets the hostname or IP address of the PLC.
drivers.allen_bradley_micro800.auto_connect bool False Indicates whether this driver should automatically connect to the server.

Allen-Bradley MicroLogix

Command Value Default Description
drivers.allen_bradley_micrologix.ip_address string - Sets the hostname or IP address of the PLC.
drivers.allen_bradley_micrologix.auto_connect bool False Indicates whether this driver should automatically connect to the server.

Allen-Bradley SLC5

Command Value Default Description
drivers.allen_bradley_slc5.ip_address string - Sets the hostname or IP address of the PLC.
drivers.allen_bradley_slc5.auto_connect bool False Indicates whether this driver should automatically connect to the server.

Advantech USB 4704 & USB 4750

Command Value Default Description
drivers.advantech_4750.auto_connect bool False Indicates whether this driver should automatically connect to any available boards.
drivers.advantech_4704.auto_connect bool False Indicates whether this driver should automatically connect to any available boards.

Automgen Server

Command Value Default Description
drivers.automgen.auto_connect void False Indicates whether this driver should start the server automatically.
drivers.automgen.port int 4000 Sets the server listening port.

Modbus TCP/IP Client

Command Value Default Description
drivers.modbustcp_client.auto_connect void False Indicates whether this driver should automatically connect to the server.
drivers.modbustcp_client.port int 502 Sets the server port number.
drivers.modbustcp_client.ip_address string 127.0.0.1 Sets the hostname or IP address of the server.
drivers.modbustcp_client.slave_id int 1 Sets the slave ID.

Modbus TCP/IP Server

Command Value Default Description
drivers.modbustcp_server.auto_connect void False Indicates whether this driver should automatically start the server.
drivers.modbustcp_server.port int 502 Sets the server port number.
drivers.modbustcp_server.slave_id int 1 Sets the slave ID.

OPC Client DA/UA

Command Value Default Description
drivers.opc_client.browse_servers_timeout float 30 (s) Sets the browse servers timeout in seconds.
drivers.opc_client.connect_timeout float 30 (s) Sets the connect to server timeout in seconds.
drivers.opc_client.browse_items_timeout float 30 (s) Sets the browse items timeout in seconds.
Command Value Default Description
drivers.siemens_logo_0ba7_tcp.auto_connect bool False Indicates whether this driver should automatically connect to the PLC.
drivers.siemens_logo_0ba7_tcp.ip_address string - Sets the hostname or IP address of the PLC.
drivers.siemens_logo_0ba7_tcp.network_adapter string - Sets the network adapter to use.
drivers.siemens_logo_0ba8_tcp.auto_connect bool False Indicates whether this driver should automatically connect to the PLC.
drivers.siemens_logo_0ba8_tcp.ip_address string - Sets the hostname or IP address of the PLC.
drivers.siemens_logo_0ba8_tcp.network_adapter string - Sets the network adapter to use.

Siemens S7-200/300/400

Command Value Default Description
drivers.siemens_s7300_s7400.auto_connect bool False Indicates whether this driver should automatically connect to the PLC.
drivers.siemens_s7300_s7400.ip_address string - Sets the hostname or IP address of the PLC.
drivers.siemens_s7300_s7400.network_adapter string - Sets the network adapter to use.
drivers.siemens_s7300_s7400.slot int 2 Sets the PLC slot (2...18).
drivers.siemens_s7300_s7400.rack int 0 Sets the PLC rack (0...4).
drivers.siemens_s7300_s7400.plc_type int 1 Sets the PLC type (S7-200 = 0, S7-300 = 1, S7-400 = 2).

Siemens S7-1200/1500

Command Value Default Description
drivers.siemens_s71200_s71500.auto_connect bool False Indicates whether this driver should automatically connect to the PLC.
drivers.siemens_s71200_s71500.ip_address string - Sets the hostname or IP address of the PLC.
drivers.siemens_s71200_s71500.network_adapter string - Sets the network adapter to use.
drivers.siemens_s71200_s71500.plc_type int 0 Sets the PLC type (S7-1200 = 0, S7-1500 = 1)

Siemens S7-PLCSIM

Command Value Default Description
drivers.siemens_s7plcsim.auto_connect bool False Indicates whether this driver should automatically connect to S7-PLCSIM.
drivers.siemens_s7plcsim.connection_timeout int 45 Connection timeout in seconds.