Analog input/output universal conversion formula you can use the following conversion:
Ov = [(Osh – Osl)*(Iv – Isl)/(Ish – Isl)] + Osl
Ov: conversion results
Iv: conversion objects
Osh: conversion result limit
Osl: conversion results lower limit
Ish: conversion limit
Isl: conversion of lower limit
STEP 7-Micro/WIN Programming Tips (Micro/WIN programming skills) Tip38 about how to achieve the conversion routines.
For convenience of users, are now exporting it as “custom orders“ in the Micro/WIN programming software that users can add to their application.
Note: this instruction library/the author and owner of the software‘s functionality and compatibility does not take any responsibility. Risk of using the software by the user themselves. Because it is free, so it does not provide any warranty, error correction and hotline support, users do not have to contact Siemens technical support and services.
In this library, analog input to the subroutine Scale_I_to_R can be used to S7-200 internal data conversion subroutine Scale_R_I can be used for internal data conversion to analog output.
Add instruction library
Note: adding custom commands library, you need to close the Edit Library instruction project, established a new project. If you are adding a library instruction, don’t need no different from other sources.
The first step: in the Micro/WIN File (file) menu, select Add/Remove Libraries … (Adding/removing instructions) commands or Libraries in the command tree (repertoire) branch, click the right mouse button, select the Add/Remove Libraries
Appears in the Add/Remove dialog box has been integrated in the native Micro/WIN of user–defined instructions.
Second step: Add (add) button, select the newly defined library file path. User–defined library is automatically added to the Micro/WIN command Libraries under the branches of a tree.
By default, Micro/WIN to find directive file under the path in Figure 8. Users can also specify a different path. But note that libraries should be maintained in a non-removable media, if you specified a removable hard disk, the hard disk is not library not found error occurs when. Users are advised to use the default settings.