Setting up the testing enviroment
Connected the sensor positive to the positive track, sensor negative/ground to the negative/ground track, and sensor signal to a spare track with a voltage divider (in series 29.45K resistor + 8.5K resistor), the 8.5K resistor is also connected to the negative/ground track to form what is known as a voltage divider, in this case reducing 24V to 5V.
To measure the voltage output of the sensor signal I connected the multi-meter positive cable to the same track as the 29.45K resistor and the multi-meter negative/ground cable to the breadboard negative/ground track.
The reasons I need a voltage divider is because I need to connect the inductive sensor to the Flashforge Creator Pro power supplier which has an output of 24V and the Inductive sensor signal cable to the Flashforge Creator Pro Z-Axis Minimum connector which has a maximum 5V input. Hence the need to reduce 24V down to 5V - if you do not reduce the voltage down you will fry the Z-Axis Minimum connector and maybe something else on the Flashforge Creator Pro board.