When an analog data value is input in a programmable logic controller (hereinafter, PLC), an analog input unit (an A/D converter) that converts an analog data value to a digital value is used, and when an analog data value is output from the PLC, an analog output unit (a D/A converter) that converts a digital value to an analog data value to be output is used.
Generally, when an analog data value is converted to a digital value or when a digital value is converted to an analog data value, offset/gain values are used. An offset value is a value corresponding to a minimum value of an analog data value to be converted, and a gain value is a value corresponding to a maximum value of an analog data value to be converted. In the A/D converter and the D/A converter (hereinafter, collectively “analog converter(s)”), analog conversion is realized by performing linear interpolation using a binary of an offset value and a gain value.
In an analog converter mounted on a PLC, offset/gain values thereof are written in a nonvolatile memory in a unit of the analog converter when it is manufactured. As these offset/gain values, calibrated values, such as 0 volt (V), 10 V, 0 milliampere (mA), 4 mA, and 20 mA, for correctly handling analog data are written in the nonvolatile memory. These offset/gain values can be different values according to variations of parts incorporated in respective units (analog converters).
Further, in the analog converter incorporated in a PLC, arbitrary offset/gain values can be additionally registered by a user in addition to offset/gain values registered in a nonvolatile memory when the analog converter is manufactured. With this configuration, the user can use not only a formulaic analog range prepared in a unit but also an arbitrary analog range corresponding to a device to be connected.
In connection to offset/gain values registered by a user, there has been proposed a technique in which a plurality of registration areas are provided and plural types of offset/gain values can be registered, so that one of these values can be selected and used (see, for example, Patent Literature 1). With this technique, it is possible to register a plurality of offset/gain values in advance in a nonvolatile memory, to select these values, and to use these values appropriately.