The maglock is connected via normally closed and common ! It's a relay for example power supply 12v + to mag lock + , 0v from power supply to act keypad relay common , 0v from maglock to act relay normally closed.... Enter code it breaks the connection ( power ) to the maglock.....