Factorio – Monitoring Total Robots in System

factorio

I have automated logistic/construction robot building. I'm trying to control robot production based on the total number of robots in the system. Is there any way to monitor the total number of robots as it's displayed in the Roboport status window?

For example, if I want to ensure that I have 100 construction robots and if it falls below that number I'd like to activate my construction otherwise it stays idle.

Best Answer

Yes, although only within a given network.

By connecting a Roboport to the circuit network, you can obtain from it the total and available number of both robot types for that logistic network. You can then use this information to cut production of robots (e.g. by deactivating inserters).

If you want, as stated in your example, start production whenever you have less than 100 robots, use the available numbers, which count the robots that are currently idle, while the total numbers counts all robots in the network, idle or working.