I have not yet hooked up limit switches to my G540, so what I am going to describe is based on reading the documentation only.
You should be able to wire all of the NO proximity switch outputs to a single G540 input in parallel, using the wiring diagram identified as "NPN parallel connection". Or, you could wire some of them in parallel to a single input and some others to individual inputs.
The output resistor labeled "R" in that diagram is actually built in to the G540 as the input "pull-up" resistor. With the output wire(s) of one or more NO switches wired to an input, the voltage on that input would normally be close to 12 volts, and that voltage would drop to near zero when any switch has been activated.
You will need to connect a positive power supply voltage to the +V terminals of the switches, and connect the minus terminals of the switches to the power supply ground terminal of the G540.
The question of where to get the +V positive power supply voltage for the switches will take some planning. Your best bet would probably be to find out what other G540 users are using to supply power to their proximity switches.
If I have read the datasheet correctly, the maximum power supply voltage for the switches is 30 volts. Many G540 users have something like a 48-volt power supply connected to the G540 power input terminal, and so if that's what you have, that is too high a voltage to connect directly to the proximity switch +V terminals. So you will either need to find a separate power source for the proximity switches (for example, a 24-volt DC supply) or else you will have to use a circuit that will drop the motor supply voltage to a suitable value.
If you decide to tap off of the 48 volt supply to provide power to the proximity switches, you would probably want to use a decent voltage regulator rather than a simple resistor to drop the voltage, to avoid any possibility of coupling motor-induced power spikes into your proximity switches. I don't think that you can get by with a simple 3-terminal 24-volt regulator such as a 7824 type to do the job, because 48 volts is probably higher than the maximum rated input voltage for those regulators.