Typically we would start with a functional breakdown of the system we wish to model.
In the crane example, we would most likely start with the major functions like:
Then we would break down each major function into sub-functions
Hoist would be broken down into:
Each of these items would then have the components that support them modeled below them.
So as and example lets look at the hoist brake circuit which is part of the crane (simplified version).
When the operator activates the joystick to hoist or lower the container, the signal is sent to a PLC (programmable logic controller) which contains the control software. The PLC gets two inputs from the joystick; one for hoisting (up) and one for lowering (down) the container. It also gets some safety interlocks to prevent accidents. The software then checks whether the correct combination of signals is present before sending the brake release signal to PLC output 22, which activates the two contactors (40 and 41) to send power to the two brakes to release the hoist drum so that it can rotate.
So it is clear from the above that we have actually modeled the software as well in a manner of speaking.
The way to do this is to see which inputs to the plc influence each output. In this case the software considers inputs 1, 2 and 3. I.e. is there a hoist or lower signal and are all safety interlocks ok. If so, then send a signal to output 22.