codesys placeholder and namespaces: easy development and … · 2015. 3. 9. · codesys® a...
TRANSCRIPT
-
CODESYS® a trademark of 3S-Smart Software Solutions GmbH
Public 02/2014
CODESYS placeholder and namespaces:
Easy development and application of libraries
CODESYS Users‘ Conference 2014, Lars Lodin / Roland Wagner
-
2 © 3S-Smart Software Solutions GmbH
CODESYS placeholders and namespaces
Agenda
1
2
3
Rules for library development
Demonstration
Facilitations as of CODESYS V3.5 SP4
-
3
CODESYS placeholders and namespaces
© 3S-Smart Software Solutions GmbH
Collection of re-usable elements
POUs, e. g. functions of function blocks
DUTs like structures, unions or enumerations
Global variables, constants and parameter lists
Methods and features of interfaces
Text lists, image collections, visualizations
External files (e. g. documentation)
Cam tables
Basics: Library
Rules for library development
-
4
CODESYS placeholders and namespaces
© 3S-Smart Software Solutions GmbH
Library repository:
Toolspecific management of libraries
Several repositories possible
Library manager:
Projectspecific library management
Re-use POUs of integrated libraries
Referencing other libraries
Basics: Library
Rules for library development
-
5
CODESYS placeholders and namespaces
© 3S-Smart Software Solutions GmbH
Rules for library development
1. Define a reasonable library name
2. Use templates in order to gain consistency
3. Use a familiar and as far as possible consistent project structure
4. Register a worldwide unique library namespace
5. Fill in the project information
6. Use the right way for referencing other libraries
7. Design usable external and internal interfaces
8. Implement a user-friendly error handling
9. Use the right method (protection) for deployment
10. Follow a naming convention to assure clean code
11. When working on an existing library, ensure interface compatibility
to previous versions.
-
6
CODESYS placeholders and namespaces
© 3S-Smart Software Solutions GmbH
A string of latin characters, worldwide unique and as short as possible
Example: "LAT" for a library dealing with "Lists and Trees"
Placeholder registration under: [email protected]
CODESYS setup: "LibraryRegistry.chm" with currently registered
namespaces
Positive identification of a library
Positive identification of POUs in different
libraries, e. g.
CL2.Send();
SIO.Send();
Different POU calls
What is a namespace?
Rules for library development
-
7
CODESYS placeholders and namespaces
© 3S-Smart Software Solutions GmbH
CODESYS has three places for placeholder definition
Device description
Placeholder
Rules for library development
…
3S CANopenDevice, 3.5.1.0
(3S - Smart Software Solutions GmbH)
…
-
8
CODESYS placeholders and namespaces
© 3S-Smart Software Solutions GmbH
CODESYS has three places for placeholder definition
Device description
Library profile
CODESYS project
Resolution of the placeholders: in the above order
Usage of the resolution found first
Placeholder
Rules for library development
-
9 © 3S-Smart Software Solutions GmbH
CODESYS placeholders and namespaces
Agenda
1
2
3
Rules for library development
Demonstration
Facilitations as of CODESYS V3.5 SP4
-
10
CODESYS placeholders and namespaces
© 3S-Smart Software Solutions GmbH
Rules for library development
Placeholder concept for implementation libraries
Reference placeholder instead of concrete version
Resolution of placeholder
by the device
through library profile (mostly dependent on compiler version)
Makes sure that only one version of a certain library is used.
"Star" concept for interface libraries
Data types and interfaces: always used in the most recent version
Suitable for all other libraries
Basic requirement: only compatible extensions (check in CODESYS)
Proven concepts
Facilitations as of CODESYS V3.5 SP4
-
11
CODESYS placeholders and namespaces
© 3S-Smart Software Solutions GmbH
Placeholders for end users not accessible so far
No access to the device description
No access to the library profile
Library systems with placeholders hard to realize in the CODESYS Store
Access to library profile possible, but only depending on compiler version
User interface can lead to usage errors
Room for improvement
Facilitations as of CODESYS V3.5 SP4
-
12
CODESYS placeholders and namespaces
© 3S-Smart Software Solutions GmbH
Introduction of "free" placeholders
No resolution via device description or library profile
Users can choose version in the library administrator
"Project Environment" dialog offers updates.
Self definition of libraries
Implementation libraries ( should be inserted via placeholders)
Interface libraries ( should be inserted via "star")
Container libraries ( should be inserted via concrete version)
Significant facilitation when adding library references
Improvements
Facilitations as of CODESYS V3.5 SP4
-
13 © 3S-Smart Software Solutions GmbH
Inspiring Automation Solutions
Thank you for your attention.