Factory I/O: a conveyor driven by the Zeus PLC simulator
========================================================

Factory I/O (factoryio.com) is a 3D factory you control from a PLC. This
project drives a small scene over Modbus TCP on this PC - the simulator
really connects to it, and a Modbus device on this PC has no time limit.

1. In Factory I/O build a small scene (or open your own):
     Belt Conveyor (2 m or longer), an Emitter at the start, a Diffuse Sensor
     at the end, a Remover after the end, and from Operators a Start Button
     and a Stop Button (NC) and a Digital Display.
2. File > Drivers > choose "Modbus TCP/IP Server". Configuration:
     Host 127.0.0.1, Port 502, Slave ID 1 (the same as unit_id in the IDE's
     FactoryIO device). Digital inputs/outputs 16, register inputs/outputs 8.
3. Drag the scene's tags to the driver:
     INPUTS:  Input 0 = Diffuse Sensor, Input 1 = Start Button,
              Input 2 = Stop Button
     OUTPUTS: Output 0 = Belt Conveyor, Output 1 = Start Button light,
              Output 2 = Stop Button light, Register output 0 = Digital Display
   Start the scene (Play).
4. In the Zeus PLC IDE: open this example, Simulator > Start, Download all.
   The FactoryIO device shows OPERATIONAL; press Start in Factory I/O.

Different tags? Change the addresses in Global Variables - Factory I/O
"Input n" is %IX(n/8).(n mod 8), "Output n" is %QX(n/8).(n mod 8),
register input n is %IW(2+2n), register output n is %QW(2+2n).

Operation Manual, section 26.6a, has the details.
