Home > Forum > LogicLab development environment information > Difference between library import and object import
- This topic has 5 replies, 3 participants and was last updated 8 years, 2 months ago da Sergio Bertana.
-
AuthorPost
-
July 20, 2012 at 10: 10 am #35249AuthorlessIdle
I am making my first program with LogicLab and I find myself having to use objects (Function blocks and functions) that are present in the various libraries that are supplied. I find it difficult to understand the difference between importing the entire library and importing individual objects.
Which technique is best to use?
July 20, 2012 at 10: 40 am #37332Sergio BertanaAdministrator ForumWith the installation of LogicLab, libraries are also installed that contain objects (Functions and function blocks) useful in program development. To use the objects present in the various libraries, it is possible to insert the entire library or only the objects used in the project (Manual extract).
Some libraries must be inserted in the project in order to use the objects present, this because the library, in addition to the objects used in the program and documented in the manual, also contains objects and / or data structures used internally, therefore it is not possible to import only the individual objects. At the current date the libraries of this type are:
eModemLib: Modem management library.
ePLC1WireLib: One-Wire device management library.
eNMEALib: NMea sequencing management library.July 20, 2012 at 12: 05 pm #37333AuthorlessIdleI created a simple ladder program to test the BLINK blinking function block, I imported the library into my project PLCUtyLib to be able to dispose of the FB. By completing the program I have the following message.
Code generation .. aborted.
IEC62056_21Rd(187) – error A4107: MemSet => Target function not found
…
IEC62056_21Rd(241) – error A4107: MemSet => Target function not found
0 warnings, 4 errors.I wanted to know how to interpret the errors, in the other cases the reference is made to the program block where the error is, do the numbers in brackets indicate something? If so, how can I find them in the program?
July 20, 2012 at 12: 14 pm #37334Sergio BertanaAdministrator ForumYou ran into one of the problems that can arise when importing an entire library instead of individual objects into the project. In this case the library PLCUtyLib it is a container of objects (Functions and Function Blocks) of various usefulness. This library must never be imported into the project, but only the objects that are used must be imported from the library.
Importing the entire library when the project is compiled, LogicLab also compiles the library and if there are errors in the library objects (Even if the object in error is not used in the project) an error is reported. In your case the error arises from the fact that the function block IEC62056_21Rd uses the function inside it memset found in the library ePLCAuxLib.
For each line of the source program where the MemSet function is called there is an error, 4 errors in total, on each line in error the line number is returned (in brackets). Since the IEC62056_21Rd function block is encrypted, by double clicking on the error it is not possible to jump to the source program, which would happen if it were a free function block.
February 5, 2016 at 2: 53 pm #39343LucaParticipantUnfortunately the library eLLabUtyLib I have to use it, since I need the “ModMaster” function. Anyway yes, the problem was the project format, I tried to save it in the new format (.plcprj) and the problem was solved.
February 6, 2016 at 7: 28 am #39344Sergio BertanaAdministrator ForumAs I told you the library items eLLabUtyLib they can be used individually without connecting the entire library. You must use the FB ModbusMasterfine then in your project you can import only that object and not connect the whole library.
From the menu Project choose Import Object from library, then select the folder where the LogicLab libraries are located and choose the desired library. Double-clicking opens the list of all the objects present and you can import the objects that interest you into your project (Screenshot).
-
AuthorPost
- You must be logged in to reply to this topic.