How can the CPU analog inputs of the SIMATIC S7-1200 also measure currents of 0-20mA?
The two analog inputs of the S7-1200 CPUs are factory-set for voltage measurement (0..10V).
In order to be able to use the inputs as current inputs as well you must incorporate a 500 Ohm resistor between terminals "0" and "2M" (or "1" and "2M").
Fig. 01: Connection of a sensor to a voltage source as a 2-conductor connection
Fig. 02: Connection of a sensor to a voltage source as a 3-conductor connection
Fig. 03: Connection of a sensor to a voltage source as a 4-conductor connection
Fig. 04: Connection of a measuring transducer with voltage output to a current source as a 4-conductor connection
To avoid damage you must ensure that the external current source has short-circuit protection in all conductor cases.
The external resistor is a source of error because of its dependency on temperature and its inaccuracy.
In order to obtain measuring results that are as precise as possible it is recommended to use resistors with tolerances that are as small as possible.
With a 500 Ohm resistor you must pay attention to the measurement of the power dissipation.
With a power supply of 24V the resistance should be configured for at least 1.16W.
Commercially available resistors have a power dissipation of 0.25W to 0.5W.
The SIMATIC S7-1200 provides analog signal modules for measuring currents.
These are available in the system manual Entry ID: 36932465:
How you connect a sensor to the analog signal modules of the SIMATIC S7-1200 is described in Entry ID 40913432.
Current measuring, Measuring transducer