TIA Portal has an extensive number of "ready-to-use" instructions (mathematical functions, times, counters, etc.). In addition, there are other useful basic functions.
These functions are provided in the form of a library and they can be used freely. The finished functions are freely customizable and can therefore be used universally.
The library described here is versioned and it will be continuously extended. For information on versioning, see Chapter "Versioning".
In order to be able to use the functionality of the library described here, the following hardware and software requirements must be met.
All blocks (FB, FC, DB, ...) in the library can be used universally with the following controllers:
All blocks in the "LGF" library can be used freely in conjunction with SIMATIC S7-1200 and SIMATIC S7-1500 controllers.
Most of the blocks are stored as types in the library. This means that the blocks are versioned and can thus use all advantages.
For more information on libraries, visit the TIA Portal:
Libraries in the TIA Portal
https://support.industry.siemens.com/cs/ww/en/view/109738702
How do you open libraries in STEP 7 (TIA Portal)?
https://support.industry.siemens.com/cs/ww/en/view/37364723
Automate in less than 10 minutes TIA Portal: Time Savers – Global libraries
https://support.industry.siemens.com/cs/ww/en/view/78529894
Which elements from STEP 7 (TIA Portal) can be stored in a library as a type or as a copy template?
https://support.industry.siemens.com/cs/ww/en/view/109476862
How can you automatically open a global library when starting TIA Portal V13 or higher and use it e.g. as a corporate library?
https://support.industry.siemens.com/cs/ww/en/view/100451450
Library with PLC data types for IO module / technology modules and PROFIdrive drives (LPD)
https://support.industry.siemens.com/cs/ww/en/view/109482396
Simulation with SIMATIC S7-PLCSIM Advanced is already activated in the properties of the LGF blocks.
After translation with SIMATIC S7-PLCSIM Advanced, proceed as follows so that the blocks can be simulated.
In order to explain the principle of operation and use of the blocks to users of the LGF library, user-defined documentation has been created for each block.
The user-defined documentation per block is available in German and English as a PDF file. The PDF files are stored in the following directories of the LGF library.
"UserFiles\UserDocumentation\en-DE\Library Types"
"UserFiles\UserDocumentation\en-US\Library Types"
The user-defined documentation for a block can be called up in the Task Card "Library" and in the library view with the key combination <Shift+F1>
.
The respective PDF is always opened with the standard program defined in Microsoft Windows.
So that the user-defined documentation of the blocks can also be called up in the project navigation, you must copy the directories with the PDF files into the project directory UserFiles
.
Alternatively, you can store the user-defined documentation in a central directory for all projects. To define a central storage location for user help, proceed as follows:
The chapters below describe all blocks of the library, "Library of General Functions".
The chapters have the same structure as the library itself.
All blocks are divided into application areas or categories:
Do you have any questions or need assistance?
Siemens Industry Online Support offers round the clock access to our entire service and support know-how and portfolio.
The Industry Online Support is the central address for information about our products, solutions and services.
Product information, manuals, downloads, FAQs, application examples and videos, all information is accessible with just a few mouse clicks:
https://support.industry.siemens.com
The Technical Support of Siemens Industry provides you fast and competent support regarding all technical queries with numerous tailor-made offers - ranging from basic support to individual support contracts. Please send queries to Technical Support via Web form:
https://www.siemens.com/supportrequest
We support you with our globally available training courses for industry with practical experience, innovative learning methods and a concept that's tailored to the customer's specific needs.
For more information on our offered trainings and courses, as well as their locations and dates, refer to our web page:
https://www.siemens.com/sitrain
Our range of services includes the following:
You can find detailed information on our range of services in the service catalog web page:
https://support.industry.siemens.com/cs/sc
You will receive optimum support wherever you are with the "Siemens Industry Online Support" app. The app is available for iOS and Android:
https://support.industry.siemens.com/cs/ww/en/sc/2067
The Siemens Industry Mall is the platform on which the entire Siemens Industry product portfolio is accessible. From the selection of products to the order and the delivery tracking, the Industry Mall enables the complete purchasing processing – directly and independently of time and location:
https://mall.industry.siemens.com
No. | Topic |
---|---|
\1\ | Siemens Industry Online Support https://support.industry.siemens.com |
\2\ | Link to the entry page of the application exampl https://support.industry.siemens.com/cs/ww/en/view/109479728 |
\3\ | Programming Guidelines and Programming Style guide for SIMATIC S7-1200 and S7-1500 https://support.industry.siemens.com/cs/ww/en/view/81318674 |
\4\ | Library with PLC data types (LPD) for STEP 7 (TIA Portal) and SIMATIC S7-1200 / S7-1500 https://support.industry.siemens.com/cs/ww/en/view/109482396 |
\5\ | Guideline on Library Handling in Tia Portal https://support.industry.siemens.com/cs/ww/en/view/109747503 |
\6\ | Libraries in the TIA Portal https://support.industry.siemens.com/cs/ww/en/view/109738702 |
The library and library elements are maintained in accordance with the table below:
P |
|
|
|
---|---|---|---|
Non-compatible change | Compatible change | Error correction | |
|
|
|
Example for changing the version:
Library | FB1 | FB2 | FC1 | FC2 | Comment |
---|---|---|---|---|---|
1.0.0 | 1.0.0 | 1.0.0 | 1.0.0 | - | Released |
1.0.1 | 1.0.1 | 1.0.0 | 1.0.0 | - | Troubleshooting of FB1 |
1.0.2 | 1.0.1 | 1.0.1 | 1.0.0 | - | Optimization of FB2 |
1.1.0 | 1.1.0 | 1.0.1 | 1.0.0 | - | Extension to FB1 |
1.2.0 | 1.2.0 | 1.0.1 | 1.0.0 | - | Extension to FB1 |
2.0.0 | 2.0.0 | 1.0.1 | 2.0.0 | - | New functionality on FB1 and FC1 |
2.0.1 | 2.0.0 | 1.0.2 | 2.0.0 | - | Troubleshooting FB2 |
3.0.0 | 2.0.0 | 1.0.2 | 2.0.0 | 1.0.0 | New function FC2 |
3.0.1 | 2.0.1 | 1.0.3 | 2.0.1 | 1.0.1 | Upgrade to new TIA Portal version |
3.0.2 | 2.0.2 | 1.0.4 | 2.0.2 | 1.0.1 | New functions, bug fixes |
Version & Date | Change description |
---|---|
V5.1.0 09/2021 |
NEW: LGF_BinaryMaskCompare / V01.00.00LGF_CountBooleanEdges / V01.00.00 LGF_GetBitStates / V01.00.00 LGF_ShiftRegister / V03.00.00 UPDATED: LGF_BitReset / 03.00.01
|
V5.0.0 04/2020 |
NEW: LGF_BitReset / V03.00.00LGF_BitSet / V03.00.00 LGF_BitSetTo / V03.00.00 LGF_BitTest / V03.00.00 LGF_BitToggle / V03.00.00 LGF_PulseRelay / V03.00.00 LGF_AstroClock / V03.00.00 LGF_GetCalendarDay / V03.00.00 LGF_GetCalendarWeek_ISO / V03.00.00 LGF_GetCalendarWeek_US / V03.00.00 LGF_IsGermanHoliday / V03.00.00 LGF_SetTime / V03.00.00 LGF_TimerSwitch / V03.00.00 LGF_CountFalInDWord / V03.00.00 LGF_CountRisInDWord / V03.00.00 LGF_CompareLReal / V03.00.00 LGF_CompareLRealByPrecision / V03.00.00 LGF_CompareVariant / V03.00.00 LGF_CalcDistance_2D / V03.00.00 LGF_CalcDistance_3D / V03.00.00 LGF_GetFactorial / V03.00.00 LGF_Integration / V03.00.00 LGF_IsValueInLimits / V03.00.00 LGF_IsValueInRange / V03.00.00 LGF_IsValueInTolerance / V03.00.00 LGF_NthRoot / V03.00.00 LGF_Random_DInt / V03.00.00 LGF_Random_Real / V03.00.00 LGF_Random_UDInt / V03.00.00 LGF_RandomRange_Dint / V03.00.00 LGF_RandomRange_Real / V03.00.00 LGF_RandomRange_UDInt / V03.00.00 LGF_SearchMinMax / V03.00.00 LGF_SearchMinMax_DInt / V03.00.00 LGF_SearchMinMax_LReal / V03.00.00 LGF_SearchMinMax_UDInt / V03.00.00 LGF_StoreMinMax / V03.00.00 LGF_MatrixInverse / V03.00.00 LGF_MatrixTranspose / V03.00.00 LGF_MatrixAddition / V03.00.00 LGF_MatrixCompare / V03.00.00 LGF_MatrixMultiplication / V03.00.00 LGF_MatrixScalarMultiplication / V03.00.00 LGF_MatrixSubtraction / V03.00.00 LGF_CalcCRC16 / V03.00.00 LGF_CalcCRC16Advanced / V03.00.00 LGF_CalcCRC32 / V03.00.00 LGF_CalcCRC32Advanced / V03.00.00 LGF_CalcCRC8 / V03.00.00 LGF_CalcCRC8Advanced / V03.00.00 LGF_CalcCRC8For1Byte / V03.00.00 LGF_FIFO / V03.00.00 LGF_IsParityEven / V03.00.00 LGF_IsParityOdd / V03.00.00 LGF_LIFO / V03.00.00 LGF_ShellSort_DInt / V03.00.00 LGF_ShellSort_LReal / V03.00.00 LGF_ShellSort_UDInt / V03.00.00 LGF_BinaryToGray / V03.00.00 LGF_DTLtoString_DE / V03.00.00 LGF_DTLtoString_ISO / V03.00.00 LGF_DTLToUnixTime / V03.00.00 LGF_GpsDDToGps / V03.00.00 LGF_GpsToGpsDD / V03.00.00 LGF_GrayToBinary / V03.00.00 LGF_IntToString / V03.00.00 LGF_ScaleLinear / V03.00.00 LGF_StringToDTL_DE / V03.00.00 LGF_StringToDTL_ISO / V03.00.00 LGF_StringToInt / V03.00.00 LGF_StringToTaddr / V03.00.00 LGF_StringToTime / V03.00.00 LGF_TaddrToString / V03.00.00 LGF_TimeToString / V03.00.00 LGF_UnixTimeToDTL / V03.00.00 LGF_CelsiusToFahrenheit / V03.00.00 LGF_CelsiusToKelvin / V03.00.00 LGF_ConvertTemperature / V16.12.2018 LGF_FahrenheitToCelsius / V03.00.00 LGF_FahrenheitToKelvin / V03.00.00 LGF_KelvinToCelsius / V03.00.00 LGF_KelvinToFahrenheit / V03.00.00 LGF_KelvinToRankine / V03.00.00 LGF_RankineToKelvin / V03.00.00 LGF_CosinusCI / V03.00.00 LGF_Frequency / V03.00.00 LGF_Impulse / V03.00.00 LGF_RectangleCI / V03.00.00 LGF_SawToothCI / V03.00.00 LGF_SinusCI / V03.00.00 LGF_TriangleCI / V03.00.00 LGF_LimRateOfChangeAdvancedCI / V03.00.00 LGF_LimRateOfChangeCI / V03.00.00 LGF_NonLinearInterpolation / V03.00.00 LGF_RampCI / V03.00.00 LGF_AverageAndDeviation / V03.00.00 LGF_Boxplot_DInt / V03.00.00 LGF_Boxplot_LReal / V03.00.00 LGF_Boxplot_UDInt / V03.00.00 LGF_DifferenceQuotientFB / V03.00.00 LGF_DifferenceQuotientFC / V03.00.00 LGF_FloatingAverage / V03.00.01 LGF_Histogram_DInt / V03.00.00 LGF_Histogram_LReal / V03.00.00 LGF_Histogram_UDInt / V03.00.00 LGF_RegressionLine / V03.00.00 LGF_SimpleSmoothingFB / V03.00.00 LGF_SimpleSmoothingFC / V03.00.00 LGF_SmoothByPolynomFB / V03.00.00 LGF_SmoothByPolynomFC / V03.00.00 LGF_SawTooth / V01.00.10 LGF_BitCount / V03.00.00 LGF_MergeBitsToByte / V03.00.01 LGF_MergeBitsToDWord / V03.00.00 LGF_MergeBitsToWord / V03.00.00 LGF_MergeBytesToDWord / V03.00.00 LGF_MergeBytesToWord / V03.00.00 LGF_MergeWordsToDWord / V03.00.00 LGF_SplitByteToBits / V03.00.00 LGF_SplitDWordToBits / V03.00.00 LGF_SplitDWordToBytes / V03.00.00 LGF_SplitDWordToWords / V03.00.00 LGF_SplitWordToBits / V03.00.00 LGF_SplitWordToBytes / V03.00.00 |