Method for producing a light source for a sensor unit of a position measuring device, comprising the following steps: - providing at least one semiconductor component (1.1) constituted in such a way that light is emittable by the latter, - securing the semiconductor component (1.1) on a first auxiliary carrier, such that a first side (1.11) of the at least one semiconductor component (1.1) is arranged facing the first auxiliary carrier, wherein before or after securing the semiconductor component (1.1) on the first auxiliary carrier, an electrically conductive carrier body (1.3) is secured to the at least one semiconductor component (1.1), thus giving rise to a first assembly comprising the at least one semiconductor component (1.1) and the carrier body (1.3), - securing an electrically conductive body (1.4) on the first auxiliary carrier, such that the latter is arranged next to the carrier body (1.3), - applying a first potting compound (1.5) to the first auxiliary carrier, such that the carrier body (1.3) and the electrically conductive body (1.4) are fixed relative to one another by the first potting compound (1.5), - removing the first auxiliary carrier, - producing a bridge conductor trace (1.6; 1.6') between the electrically conductive body (1.4) and the first assembly, - producing a first test pad (1.822; 1.822'), which is electrically contacted with the first assembly, - producing a second test pad (1.922; 1.992'), which is electrically contacted with the electrically conductive body (1.4), wherein a panel (P; P') arises comprising the first assembly, the first potting compound (1.5), the bridge conductor trace (1.6; 1.6') and also the first test pad (1.822; 1.822') and the second test pad (1.922; 1.922'), - conducting an electric current via the first test pad (1.822; 1.822') and the second test pad (1.922; 1.922') in order to carry out temporary operation in which the semiconductor component (1.1) emits light, - subsequently dividing the panel (P; P'), wherein the first and/or the second test pad (1.822, 1.922; 1.822', 1.922') are/is at least partly separated from the light source. - providing at least one semiconductor component (1.1) constituted in such a way that light is emittable by the latter, - securing the semiconductor component (1.1) on a first auxiliary carrier, such that a first side (1.11) of the at least one semiconductor component (1.1) is arranged facing the first auxiliary carrier, wherein before or after securing the semiconductor component (1.1) on the first auxiliary carrier, an electrically conductive carrier body (1.3) is secured to the at least one semiconductor component (1.1), thus giving rise to a first assembly comprising the at least one semiconductor component (1.1) and the carrier body (1.3), - securing an electrically conductive body (1.4) on the first auxiliary carrier, such that the latter is arranged next to the carrier body (1.3), - applying a first potting compound (1.5) to the first auxiliary carrier, such that the carrier body (1.3) and the electrically conductive body (1.4) are fixed relative to one another by the first potting compound (1.5), - removing the first auxiliary carrier, - producing a bridge conductor trace (1.6; 1.6') between the electrically conductive body (1.4) and the first assembly, - producing a first test pad (1.822; 1.822'), which is electrically contacted with the first assembly, - producing a second test pad (1.922; 1.992'), which is electrically contacted with the electrically conductive body (1.4), wherein a panel (P; P') arises comprising the first assembly, the first potting compound (1.5), the bridge conductor trace (1.6; 1.6') and also the first test pad (1.822; 1.822') and the second test pad (1.922; 1.922'), - conducting an electric current via the first test pad (1.822; 1.822') and the second test pad (1.922; 1.922') in order to carry out temporary operation in which the semiconductor component (1.1) emits light, - subsequently dividing the panel (P; P'), wherein the first and/or the second test pad (1.822, 1.922; 1.822', 1.922') are/is at least partly separated from the light source.