I am assuming pressing the foot switch just connects pin 1 to pin 2 temporarily.
No, it should connect the pin1 the logic pin to pin 3 the ground pin. The 24 volts should just power whatever it is that drives the mechanism.
If it just requires a 5 volt signal to toggle the mechanism, then you should be able to connect the Arduino directly to the logic pin 1 with a common ground on pin 3. Might be wise to see how much current the input pulls when the logic goes high. If it is less than about 30 mv then you can connect directly. it should be way less than that for most solid state things. If it isn't then you need to use a transistor or some other device between the Arduino output and pin 1. The Arduino would be connected to the base of the transistor through a 1 k ohm resistor. If there is a inductive kick ( some sort of relay) down the line from the Arduino, you should also put in a bypass capacitor.