Method for determining a position of a sliding block , which is movably mounted along a sliding rail between a closed position and an open position, of a door drive, which has an arresting device , for automatically closing a door, wherein the arresting device comprises a blocking element for blocking a movement, which corresponds to a closing movement of the door, of the sliding block from the open position in the direction of the closed position and an energizable electromagnet ; wherein the blocking element can be moved between an arresting position, in which it is designed to hamper the movement of the sliding block , and a release position, in which it is designed to release the movement of the sliding block ; wherein the electromagnet , in a state in which it is energized with a specified current intensity, arrests the blocking element in the arresting position; and wherein the blocking element can be pushed from the arresting position to the release position by the sliding block when the sliding block passes across the blocking element ; wherein the method comprises at least the following steps: applying a current of the specified current intensity (I2) or a current intensity (I1) lower than this to a magnet coil of the electromagnet ; monitoring the coil current of the electromagnet ; detecting the situation of the sliding block passing across the blocking element on the basis of the time course of the monitored coil current; and determining the position of the sliding block with respect to the blocking element , in particular whether the sliding block is in the open position or in the closed position, using the detection of the situation of the sliding block passing across the blocking element . wherein the blocking element can be moved between an arresting position, in which it is designed to hamper the movement of the sliding block , and a release position, in which it is designed to release the movement of the sliding block ; wherein the electromagnet , in a state in which it is energized with a specified current intensity, arrests the blocking element in the arresting position; and wherein the blocking element can be pushed from the arresting position to the release position by the sliding block when the sliding block passes across the blocking element ; wherein the method comprises at least the following steps: applying a current of the specified current intensity (I2) or a current intensity (I1) lower than this to a magnet coil of the electromagnet ; monitoring the coil current of the electromagnet ; detecting the situation of the sliding block passing across the blocking element on the basis of the time course of the monitored coil current; and determining the position of the sliding block with respect to the blocking element , in particular whether the sliding block is in the open position or in the closed position, using the detection of the situation of the sliding block passing across the blocking element . applying a current of the specified current intensity (I2) or a current intensity (I1) lower than this to a magnet coil of the electromagnet ; monitoring the coil current of the electromagnet ; detecting the situation of the sliding block passing across the blocking element on the basis of the time course of the monitored coil current; and determining the position of the sliding block with respect to the blocking element , in particular whether the sliding block is in the open position or in the closed position, using the detection of the situation of the sliding block passing across the blocking element . <EOS>