Learn Factoryio-macros - 2 Code Examples & CST Typing Practice Test
Factory I/O Macros are small, script-like automation blocks used inside Factory I/O to create dynamic behaviors, event logic, interactions, and simulated control sequences within industrial 3D factory environments. They extend built-in components by enabling custom logic without requiring a full PLC.
View all 2 Factoryio-macros code examples →
Learn FACTORYIO-MACROS with Real Code Examples
Updated Nov 27, 2025
Explain
Factory I/O Macros provide lightweight scripting logic to drive simulation behaviors.
They enable conditions, timers, triggers, and dynamic responses without external PLCs.
Used to prototype automation logic before moving to real PLC code.
Macros can interact with sensors, actuators, conveyors, and animated objects.
Designed to bridge the gap between static scenes and fully dynamic automation.
Core Features
IF/ELSE conditional logic
Digital/analog read & write
Macros attached to scene objects
Clock/timer functions
Triggers for events and motion
Basic Concepts Overview
Tags - track sensor/actuator values
Events - condition triggers logic
Execution Loop - logic updates each frame
States - toggles, memory bits
Timers - delays, transitions, sequencing
Project Structure
Scene file (.factoryio)
Macro definitions embedded per object
Tag list defining available IO
Connections to external drivers (optional)
Physics objects and animations
Building Workflow
Add component to scene
Open its Macro Editor
Write logic for interactions
Link inputs/outputs to sensors or actuators
Run simulation and refine behavior
Difficulty Use Cases
Beginner: Turn a motor on when a sensor is triggered
Intermediate: Create conveyor sequencing with timers
Advanced: Implement a mini pick-and-place routine
Expert: Simulate multi-machine interactions with logic
Architect: Build fully automated lines without PLCs
Comparisons
Macros vs PLC: Macros are quick; PLCs are industrial-grade
Macros vs Python Scripting: Macros are simpler and built-in
Macros vs Behavior Blocks: Macros offer more control
Macros vs Control I/O: Macros simulate logic; Control I/O connects external drivers
Macros vs Automation ML: Macros drive logic, AML handles interoperability
Versioning Timeline
Early versions - basic logic triggers
2018 - Macro Editor improvements
2020 - Expanded timer and condition support
2023 - Simulation stability updates
2025 - More flexible macro control blocks
Glossary
Tag - input/output point
Macro - logic block attached to a component
Event - trigger condition
Timer - scheduled delay
Cycle - simulation update frame
Frequently Asked Questions about Factoryio-macros
What is Factoryio-macros?
Factory I/O Macros are small, script-like automation blocks used inside Factory I/O to create dynamic behaviors, event logic, interactions, and simulated control sequences within industrial 3D factory environments. They extend built-in components by enabling custom logic without requiring a full PLC.
What are the primary use cases for Factoryio-macros?
Simple automation logic without a PLC. Scene interactions and dynamic events. Custom conveyor and machine behaviors. Sequential operations and timing sequences. Rapid prototyping of logic before PLC deployment
What are the strengths of Factoryio-macros?
Very easy to learn-even non-programmers can use it. Perfect for quick prototyping. No external PLC hardware/software needed. Immediate visual feedback of logic. Ideal for training and classroom demos
What are the limitations of Factoryio-macros?
Not suitable for complex automation logic. Limited compared to IEC 61131-3 languages. Not portable to real PLCs-cannot be deployed on hardware. Performance tied to simulation loop. Hard to modularize for large scenes
How can I practice Factoryio-macros typing speed?
CodeSpeedTest offers 2+ real Factoryio-macros code examples for typing practice. You can measure your WPM, track accuracy, and improve your coding speed with guided exercises.