u-create studio System manual Translation of the original instructions
Document No.: 2696790000/02/04.2020 Filename: u_create_shen.pdf Pages: 128 Specifications are subject to change due to further technical developments. Details presented may be subject to correction. All rights reserved. Weidmüller Interface GmbH & Co.
Record of Revision Record of Revision Version Date Change in chapter Description Changed by 00 06-2019 - Newly created hli, hasl 01 08-2019 Access to flash storage medium Updated hasl 2696790000/02/04.
System manual 2696790000/02/04.
Table of contents Table of contents 1 Introduction ................................................................................................................ 1.1 Purpose of the document................................................................................. 1.2 Requirements................................................................................................... 1.3 Intended use .................................................................................................... 1.
Table of contents 5 Software installation .................................................................................................. 5.1 Install firmware of the control ........................................................................... 27 27 6 Configuration .............................................................................................................. 6.1 Data exchange between control and visualization...........................................
Table of contents 11.3 11.4 11.5 11.6 Server configuration......................................................................................... Generic variable tree........................................................................................ Creating an information model......................................................................... Logging of server operation ............................................................................. 59 62 62 70 12 Node-RED..................
Table of contents 19.2 19.3 19.4 19.5 19.6 19.7 Creating a simple program............................................................................... Saving u-create studio project ........................................................................ Load firmware onto device............................................................................... Configuration of the control..............................................................................
Introduction 1 1.1 Introduction Purpose of the document This document describes the structure of u-control. In addition, it describes the assembly and installation, the wiring aswell as the operation and displays of the modules. The installation and configuration is described enough to obtain an operationally ready system. "Ready for operation" means that the system and/or the respective CPU modules are ready for loading the customer application.
Introduction Target group Requisite knowledge and abilities Technical training in electrical engineering (based on industry-standard training guidelines). Knowledge of: Electrician ● ● ● ● ● Current valid safety information, Wiring guidelines Circuit diagrams System analysis and troubleshooting Professional manufacture of electrical connections in conformity with national and international regulations.
Introduction ● ● ● ● Only in the industrial sector in accordance with regulations In a faultless technical condition In its original state without unauthorized modifications. Only alterations and modifications described in the accompanying documentation are authorized. 1.4 Notes on this document Information If necessary, also adhere to the documentation accompanying the modules. 1.4.1 Contents of the document ● ● ● ● ● ● ● ● 1.4.2 Not contained in this document ● ● ● 1.
Safety instructions 2 2.1 Safety instructions Representation At various points in this manual, you will see notes and precautionary warnings regarding possible hazards. The symbols used have the following meaning: DANGER! indicates an imminently hazardous situation, which will result in death or serious bodily injury if the corresponding precautions are not taken.
Safety instructions 2.2 General safety information The documentation contains the information required to plan the use of ucreate studio with UC20-SL2000-EC or UC20-SL2000-EC-CAN. Familiarity with and correct application of the information contained in these manuals is a prerequisite for successful planning and safe installation, commissioning and maintenance of automation systems.
System overview 3 System overview The field of application of u-control is general machine and plant automation. The system features a modular design and can be set up according to the respective functional requirements. It comprises the following components: ● ● Construction kit with I/O modules (u-remote) for various applications that can be added on. Toolsuite for automation tasks, consisting of tools for configuration, programming, visualization as well as for commissioning and diagnostics.
System overview Information The system components shown in this manual are example graphics. The devices used by you may differ in their appearance. Please observe the supplied operation manuals of the devices. 3.1 Hardware architecture Devices are connected according to their signal type, e.g. via analog or digital input or output modules, interface modules, etc. CPU modules and I/O modules must be integrated into a control cabinet.
System overview Fig. 3-2: Software overview The control application runs on the control. There are also libraries and interfaces available via which the control can be accessed via the program. The tool suite is installed on a PC. The programs are used for parameterization, programming, and diagnostics. The control software is based on a Debian (Linux) operating system with customized scope.
System overview ● 3.3 C programming Network design The IP address of the network is typically specified by a network administrator. At initial startup of the control with u-create studio the IP addresses of the devices are not attuned with each other. The network settings of the PC or the controls therefore must be adjusted.
System overview Information To change the IP address of a panel the device must be connected to a network. The IP addresses of the I/O modules are set in u-create studio EoE settings (see online help). Information A maximum of 3 handheld terminals can be used simultaneously. Connection service PC - system components For a service PC to be able to communicate with additional components, it must also be located in the machine network.
System overview 3.5 Buses The sections below list the buses supported by the u-create system and describe them in more detail. The following master fieldbus interfaces are available depending on the control version: ● ● ● EtherCAT CAN Modbus TCP/IP The following slave fieldbus interfaces are available depending on the control version: ● 3.5.1 Modbus TCP/IP EtherCAT EtherCAT interfaces can be used for the connection of slave devices (e.g. drives, I/O modules).
System overview 3.6 u-create studio Toolsuite The tools are all connected to the control via Ethernet. They are used for configuration, parameterization, programming, debugging and diagnostics on the control. The following tools are made available in the process: ● Configuration and programming with u-create studio: The programming environment u-create studio is used to configure, parameterize, program and debug control applications.
System overview Programming language Structured text Type Textual programming language (ST) Description "Structured text" comes closest to the programming languages Pascal and C used for the PC. It consists of a series of instructions that can be executed in high-level language ("IF..THEN..ELSE") or in loops (WHILE..DO). Allow programming with logical symbols. It is very suitable for logic controls.
System overview Allows the integration of C functions. Thereby it is possible to integrate a function each at start-up, shut-down or when starting or stopping the system. For cyclical processing one or more tasks can be configured (with priorities, watchdogs, ...). For the access to the services of the control and the I/O system libraries which are already embedded into the u-create studio C++ are available. In u-create studio C++ the project type "Extended C Runtime Project" serves as example.
System overview ● ● ● ● ● Variables can be activated or deactivated from scope. Only activated variables are recorded. Events can be used to notify a specific status in the target program. Related events can be grouped into classes. Every event is part of a class. The actual recording start can be determined via a trigger. The trigger can refer to a variables’ value and/or a specific event. Pre- as well as posttriggering is possible.
System overview 3.7.3 OPC UA interface The u-create system offers the opportunity to access to IEC variables of the control via an OPC UA interface. Therefore an OPC UA client which must be installed on a PC is needed. OPC UA clients are offered for download in the internet. To establish a connection with the OPC UA client to the OPC UA server on the control the IP address or the hostname of the control with the port number 4842 first have to be input into the client.
System overview By appending the respective file name to the Url, the functions and a description can be read out (e.g. 192.68.1.1/api/v3/configuration.yaml) 2696790000/02/04.
Operating behavior 4 4.1 Operating behavior Start-up The start-up of the PLC is divided into the following main stages: ● ● ● Start-up boot system Start-up control firmware Start-up application The booting of the control starts automatically as soon as the CPU module is supplied with power. Conditions for the booting are: ● ● 26 Voltage supply was connected correctly. Correctly formatted storage medium with the system software on it is in the slot of the control. System manual 2696790000/02/04.
Software installation 5 Software installation Information If a component has already been installed, the automatic installation does not support the new installation of this component. In this case, the respective component must be uninstalled with the help of the individual product Setup or via the operating system. To install the required u-create components on your PC, proceed as follows: 1) Open the provided installation directory. 2) Open the "Setup" subdirectory. 3) Run the application "setup.exe".
Configuration 6 Configuration The combined switching of the assemblies and modules in u-create studio that took place during the hardware installation is re-created with the configuration.. The control configuration is based on the device descriptions. These describe the basic configuration specifying which parameterization options are available. The control configuration allows the connection of I/O modules as well as fieldbus modules.
Program development 7 Program development The control operates based on the following principle: "Read inputs, processing, right outputs". u-control carries out the following tasks during the processing of each task defined with u-create studio: ● ● ● Read inputs: At the beginning of the cycle, the current statuses of the inputs are read and written into the process map of the inputs. Processing: The application program is executed. The set status of the outputs is copied into the process map.
Program development Priority linux Priority IEC 57 8 54 9 51 10 48 11 46 Reserved for UOS task 45 12 42 13 39 14 36 15 Tasks outside real time This tasks run in the linux scheduler "SCHED_OTHER". Priority linux 7.2 Priority IEC 10 ("nice level") 16 - 31 0 ("nice level") Default linux processes Fast control Fast control is used to reduce the system reaction time. This means reading the inputs, processing the data and writing the outputs need less cycles. Fig.
Program development 7.3 Device Service The DeviceService is a software service t manages, controls and monitors individual programs on the control. The DeviceService can collect and forward information (e.g. error messages) of the programs. The DeviceService runs as an independent process and starts automatically once the operating system has been fully loaded. Each program to be managed by the DeviceService must be defined on the control as DeviceServiceItem. 7.3.
Program development 7.3.2 Command Command type Stop Controller State transition The status changes from "OsReady". Start Applications State transition The status changes from "Stop" to "Run". Stop Applications State transition The status changes from "Run" to "Stop". Init Controller State transition The status changes from "OsReady" to "Stop". Shutdown Controller Special state transition Closes all running software applications on the device and stops it.
Program development State transitions of the Device Service state model are forwarded to all Device Service Items. So they can perform all actions required to execute their corresponding programs into the requested state.
Program development Global variable Default value Description starepPathTmp /tmp/ Directory where the files of the status report are stored maxStarepCount 5 Number of stored status reports autostart true Defines whether or not the programs are to be run immediately after the control is started autostartTimeout 5 Time in which the autostart can be canceled [s] Each DeviceServiceItem can export configuration variables or use configuration variables exported by other DeviceServiceItem.
Program development elseif step == 9 then elseif step == 10 then end --Exit DeviceService-elseif transition == "Exit DeviceService" then if step == 1 then elseif step == 2 then elseif step == 3 then elseif step == 4 then elseif step == 5 then elseif step == 6 then elseif step == 7 then elseif step == 8 then elseif step == 9 then elseif step == 10 then end --Init Controller-elseif transition == "Init Controller" then if step == 1 then elseif step == 2 then elseif step == 3 then elseif step == 4 then elseif
Program development , --- DOSTATEREPORT ----------------------------dostatereport = function(stareppath) end , --- DOCLEARRETAIN ----------------------------doclearretain = function() end , --- DODELETEAPPLICATIONS ---------------------dodeleteapplications = function() end } 7.3.
Program development 7.3.4 Status report The status report is a collection of information software sub-systems running on a device at a specific point in time. If a status report is triggered, all DeviceServiceItem are informed so that this information can be added to the status report. 7.3.5 Co-routine model DeviceServiceItem callbacks are run as Lua co-routines. This makes it possible to delay the running of a DeviceServiceItem by calling coroutine.yield().
Licensing 8 Licensing In some cases, Weidmüller products must be licensed in order enable use of the full scope of functions. By default, products are delivered with a "trial license". This means that a product's complete scope of functions can be used in full for a defined, limited period. During this period, a valid license must be requested from Weidmüller in order to be able to use the purchased functions for an unlimited period. To do so, please contact Weidmüller.
Licensing 8.1.2 Activation of a trial license (runtime license) When using a device, the trial license must be activated manually. Otherwise, the product cannot be used or can only be used incompletely. Activation is only possible via the access "DevAdmin". Information Before activation, the date and time must be set correctly on the device! Otherwise, the license may become invalid immediately when the date is updated.
Licensing 3) Click on Activate Licenses. 4) If necessary, select the license for the desired product. 5) Click on Activate Selected Licenses now, and the licensing process is executed. 6) Confirm the dialog with OK. The license has been successfully activated. 8.
Licensing 1) Establish a connection between the PC and the device using DevAdmin. 2) Click on Licensing ► Online Activation. 3) Enter the ticket code. 4) Click on Start online activation. The license was successfully activated on the device. 8.4 License status and license overview Single-user licences The status of a software license can be queried by clicking the icon in the task bar. Furthermore, a licensing overview can be called up using the link to the WebAdmin.
Licensing ● Reactivation the license (restore): The existing PC is no longer functional and can no longer return the license. In any case, the PCs must have an Internet connection. Moving the license (Rehost) Using this option, a license is transferred from an old, functional PC to a new PC. Both PCs have Internet access.
Licensing 4) Accept the restore conditions. 5) Click on Restore Selected Licenses Now. The reactivated license was successfully activated on the PC. Information Depending on the system, the button Re-Host Licenses is always displayed in the Web Depot. Clicking on this button triggers an error message, i.e. Re-Host Licenses cannot be used to reactivate the license. 8.5.
Licensing 2) Click on Licensing ► Reset. 3) Click on Remove license data 4) Confirm the dialog with OK. The license information of the device has been reset. To re-license the device, a new license must be purchased. Please contact the Weidmüller service. 44 System manual 2696790000/02/04.
Device Administration (DevAdmin) 9 Device Administration (DevAdmin) If a PC is within the network of the control, the login dialog for the DevAdmin can be opened on it via opening a internet browser and inserting the address http://. The user is logged in with the following login data: Username: Administrator Password: tobechanged The DevAdmin has the following tabs: ● ● ● ● ● ● 9.1 Diag.: Read informationen of the control, trigger state report or crash report Config.
Device Administration (DevAdmin) Fig. 9-7: DevAdmin - Diagnostics Area "Device Information" In this area the following information of the used control are displayed: Information Description Device Name Designation of the control Ser.No. Serial number of the control Part No. Material number of the control Rev.
Device Administration (DevAdmin) Information Device State Description Status of the control Area "Statereport" In this area a state report can be triggered via Create statereport on device. The report is saved under /masterdisk/protocol/statusreport. The report also contains the diagrams from the long-term recording ("Monitor" tab). Via the dropdown menu a state report can be selected and downloaded to the PC.
Device Administration (DevAdmin) Fig.
Device Administration (DevAdmin) Area "Time, Date and Timezone" In the area "Time, Date and Timezone" the following settings can be done: Setting Description Time Set clock Date Set date Area Select region City/Zone Select city Area "Long-term Diagnostic Monitor" In the area "Long-term Diagnostic Monitor" you can activate or deactivate the long-term recording of device data. 9.
Device Administration (DevAdmin) Setting Description Drop down list with avaiable and compatible device images, which are located in the connected removable disk Image ● Network settings ● From image: Network settings are taken from image that should be restored From device: Current network settings are kept With Start backup a backup is generated and with Start restore the restore process is started. After clicking a safety request is shown.
Device Administration (DevAdmin) Entry Type / Value Description iFrame.type file or link Type of integration (file: HTML files, link: server) iFrame.path STRING For file: Relative path specification of index.html from base directory iFrame.url For link: URL of server STRING iFrame.port 0 - 65535 For link: Port of server fullScreen Not available yet BOOL displayName STRING Display name in the dropdown list under "Plugins" Content as HTML files The start file must have the name index.
Device Administration (DevAdmin) If this is clicked, the window opens in which the password for the DevAdmin can be changed. Fig. 9-10: DevAdmin - Change Password The following data are inserted into the fields: New password: New password Confirm password: Confirm the new password Via OK the new password is applied. Via Cancel the procedure gets aborted. 52 System manual 2696790000/02/04.
Software units 10 Software units Within the system it is possible to assemble user-specific software or additional independent extensions ("features") as a software unit and mount them in the u-create studio as an optional package when creating a new target ("Create target"). The software unit must be created for the desired target system and stored as its own directory in the path of the Software Service service.
Software units The name under the tag is specified as package name in the "Optional Packages" dialog. The description under the tag is displayed as additional text below. The installable repository is specified under the tag . Repository A repository must contain installable packages (e.g. *.deb files) and make the sources main, contrib and non-free available. Each software unit may only contain exactly one repository for exactly one target system (e.g.
Software units Sample for custom software unit Example for customer-specific Software unit Sample for custom software unit softwareunitdemo 1.0 Debian x86 PAGE 56OPC UA Server 11 OPC UA Server The OPC UA Server can be installed as an optional software package (see "Software Units"). This chapter describes the use of the OPC UA Server on Weidmüller controls with the Linux operating system. OPC Unified Architecture (OPC UA) is a standard for manufacturer-independent networking of devices in the automation sector. This provides standardized access options to the control. This standard allows any program (e.g.
OPC UA Server OPC UA Server Pro OPC UA Server Functionality Generic variable tree: x x Creating an information model: 1 several*) Support of customer-specific events and methods: 1*) several*) *) x OPC UA Server Adv These functionalities are not currently supported yet. The following table provides an overview of the service sets supported by the OPC UA server. Service Sets as per OPC UA Specification Part 4 11.
OPC UA Server Free and licensed OPC UA clients are available on the Internet for testing the functionality of the OPC UA Server. The endpoint URLs of the OPC UA Server returned by the Discovery service always contain the host name of the controller. The OPC UA Client must be able to resolve the host name when connecting to the Server IP (e.g. via host file or DNS). Information The host name must never begin with a digit, otherwise problems may occur during server boot-up or connection setup.
OPC UA Server The OPC UA Server automatically creates the following directories on the controller in the directory /opt/kecontrolapplication/OpcUa/PKI/CA: Directory Description /own Contains the secret server key and the server certificate. /trusted/ certs Contains all trusted client certificates. /trusted/ crl Contains all revoked certificates (Certificate Revocation List). These clients can no longer connect. /issuers/ certs Contains all trusted certificates used for verification.
OPC UA Server Designation ShowVariableTree Description Display of generic variable tree (1 = activated, 0 = deactivated) Example [OpcUa] [OpcUa.Application] Port=4840 ApplicationName="SampleApplicationName" ApplicationURI="SampleApplicationURI" ProductURI="http://www.company.
OPC UA Server Possible configuration entries: Name Description MinPublishingInterval Minimum time interval in milliseconds, data type Double MaxPublishingInterval Maximum time interval in milliseconds, data type Double Information The minimum time interval chosen should not be too small, since the OPC UA server can reach a high load by answering these requests if there are several clients. When sending a request (CreateSubscription), the client submits a desired time interval.
OPC UA Server The client requests a sampling interval of 70 ms. The server answers that the monitored item (MonitoredItem) recorded at intervals of 100 ms. 11.4 Generic variable tree The generic variable tree is used to display the system variables of the IEC application and can be activated / deactivated via the expert entry ShowVariableTree (in u-create studio). By default, the generic variable tree is deactivated. [OpcUa] [OpcUa.
OPC UA Server All OPC UA information (variables, data types, methods, etc.) is displayed as nodes. Each node is assigned to a namespace. Namespaces and node IDs allow a unique identification. You can define your own namespaces, object and variable instances in the XML file. Methods, types (reference, object, variable, data types) or views are not supported. The information must be defined in exactly one XML file and this file must be stored on the control in the directory /appldisk/application/OpcUa/.
OPC UA Server Information Currently not all data types defined in the OPC UA standard are supported. The following table describes the supported OPC UA data types with the corresponding IEC data types. The unique node address that must be used when creating in the XML file is specified for each data type. The node address consists of multiple so-called "BrowseNames". BrowseName is an OPC UA concept that can be used to specify node addresses. A BrowseName consists of a namespace index and a name.
OPC UA Server Information The instantiation of structure variables or more complex (basic) data types is not supported. The OPC UA data types BaseObjectType (0:Types.0:ObjectTypes.0:BaseObjectType) and FolderType (0:Types.0:ObjectTypes.0:BaseObjectType.0:FolderType) can be used to build a hierarchical model. All instances are collected under a Instances entry. This entry needs an attribute, Parent, which defines the root node of the following instances as a node address.
OPC UA Server Attribute Description NodeId Defines the node ID of the current instance, and this must be unique. This server version only supports numeric node IDs. BrowseName Internally used name for node addresses. DisplayName Displayed name for the OPC UA client. AccessLevel (only variables) Defines the access rights for the Value attribute of a variable. By default, no access is allowed.
OPC UA Server Optionally, a subrange of an array can be specified for variable mapping. The following attributes are required for this: Attribute Description ArrayOffset Specifies the start value of the array subrange (left index). ArrayLength Desired length of the array subrange. In the following example, a subrange of the IEC array is instantiated in the server as an OPC UA array. In the IEC an array from 1 to 100 is defined.
OPC UA Server PAGE 69OPC UA Server Role-based authorization model The OPC UA Server supports the assignment of access rights for users based on user roles. These access rights only apply to the nodes defined in the XML file and when the client logs on with a user name and password. An anonymous client has full access to all nodes. In the user administration, users and roles must be created and one or more roles assigned to the users.
OPC UA Server Node-based XML rights The globally declared authorizations of a role can be extended or restricted for each node. The following example overwrites the authorization of the "Operator" role for the "Var1" variable node. In the global authorization definition "Browse", the role "Operator". can perform read and write accesses. For the "Var1" variable node the access to browse and read is now restricted. PAGE 71OPC UA Server [OpcUa] [OpcUa.Trace] TraceMask = 15 TraceFileSizeKbMax = 4096 2696790000/02/04.
Node-RED 12 Node-RED Node-RED can be installed as an optional software package (see Software Units). It is a graphical development tool developed by IBM. This allows function modules, so-called "nodes", to be lined up in a certain sequence by drawing connections. Each function module has a defined task. Data can be processed and transferred between the function modules. The graphical editor of Node-RED can be started via "DevAdmin" in the tab "Plugins".
LongtermDiagnosticMonitor 13 LongtermDiagnosticMonitor The LongtermDiagnosticMonitor can be installed as an optional software package (see Software Units) and offers the possibility of long-term recording of data on the control. Via "Monitor" in the DevAdmin (tab Plugins) the data can be displayed. 13.1 Monitor The monitor plugin is divided into the following areas: ● ● ● Problems Groups Categories Fig.
LongtermDiagnosticMonitor Category disk Diagram Average latency for /dev/ sda Average waiting time (latency) for access to the directory /dev/sda. The waiting time shows how utilized the system ist. 1 second waiting time corresponds to an utilization of 100 %.
LongtermDiagnosticMonitor Category Diagram Description CPU utilization Overall utilization of the CPU per core [in percent] Disk lifetime Remaining lifetime of the flash storage media [in percent] Disk space Used and free memory on the flash storage media [in MB] PLC baselib heap memory Used and free memory on the "BaseLib Heap" statistics storage media [in MB] overview RAM usage RAM utilization devided in occupied, free and available [in MB] System task performance on core n Distribution of c
Data recorder 14 Data recorder Using the data recorder, variable values can be recorded on the control during runtime. Access to the data recorder is possible via the following interfaces: ● ● Library "KREC" for IEC applications (real-time access) in u-create studio "DataRecApi" interface for C applications For additional information, refer to the online help for u-create studio. A data recorder has to be created and configured by the application first.
Data recorder Buffer capacity The buffer capacity defines the maximum number of stored variable values with a time stamp that a profile can store. The recording process reads out the values of all registered variables and writes these into the buffer of the profile along with a time stamp. This data record (variable value with time stamp) is called "Sample". The buffer capacity multiplied by the maximum number of variables determines the storage requirement of a profile.
Data recorder ● ● ● 14.2 When the profile state is being stored, large amounts of data can accrue, depending on the size of the profile. If the application stores the state cyclically at frequent intervals, this can significantly reduce the service life of non-volatile storage. After the application controls the storage of the states themselves, a sensible compromise should be sought here.
Data recorder State Description recording A recording is carried out. stopped The recording is stopped or ended. waiting The start trigger or start delay is waited upon before the recording is carried out.
Data recorder Start and stop trigger Triggers are conditions, which can cause a recording of a profile to be started or stopped in an event-driven manner. A trigger condition always refers to a certain variable. This does not have to be registered in the profile, but rather is specified via its complete path in the variable tree. The same limits apply for the data type as for registered variables.
Data recorder Information For the assessment of the stop time capacity as a percentage, it shall be observed that in the case of the “continuous” buffer type, the buffer capacity is rounded up system-internally to the next power of two (e.g. 4000 is rounded up to 4096). The percentage has an effect on the value that is rounded up to. In order to record data before the occurrence of the start trigger, a start time must be configured in the application (pre-start trigger recording).
Data recorder Exceptions include the login and logoff of variables. These functions also have an effect while a recording is ongoing, thereby enabling a dynamic configuration of variables without interrupting value processes. 14.3 Reading out the buffer You can read out the samples stored in the buffer of a profile at any time, even during an ongoing recording. Each profile carries a write position on which the next individual recording will be stored. This position can be prompted. Example 1 ...
Data recorder 1 ... Buffer start 2 ... Number 3 ... Write position Example Start position: Newest sample 1 ... Buffer start 2 ... Number 3 ... Write position The validity of a reading position is limited in the context of the buffer type "Continuous". Upon reaching the end of the buffer, the write index breaks down, by which existing samples are overwritten. The read functions detect when a start position refers to samples which meanwhile have been overwritten.
Data recorder ● List of the stored samples of variables, consisting of variable ID and variable value All information is available as read only. They are stored in the profile buffer before the application function call. For one thing, data fidelity is thus ensured, and for another thing, the intermittency of the recording is independent of fluctuations that develop as a result of irregular run times of the application function.
Data recorder Max. buffer capacity 2,048 Max. number of variables 256 Example Profiles with between 32,769 and 65,536 samples can register a max. of 8 variables for recording. Profile with SingleShot buffer type Max. buffer capacity Max. number of variables 1,048,576 254 1,042,453 256 Profiles with a maximum capacity of 1,048,576 can register a max. of 254 variables for recording. Conversely, the maximum of 256 variables can only be registered to profiles with a maximum capacity of 1,042,453.
Data recorder ***************************************************************************** * interface functions */ ModuleInitFunc moduleInit = &ModuleInit; ModuleStartFunc moduleStart = &ModuleStart; ModuleStopFunc moduleStop = &ModuleStop; ModuleExitFunc moduleExit = &ModuleExit; HookClientFunc moduleCallback = &ModuleCallback; / ***************************************************************************** * macros */ #define ReturnIfNot(cond) \ if (!(cond)) { LogApiTrace(traceid, "### ReturnIfNot@line
Data recorder Information If manual recording is selected for a profile, note that calls from DataRecApiSampleValues are not only necessary for data recording, but also for state transformations in the profile. For automatic recording, the calls and the state transformations associated with them are made by the configured task. This must be implemented in the application for recording manually.
Data recorder Special case in the change-based recording mode with a monitored variable: The mere number of calls from by DataRecApiSampleValues is not a part of the number of recordings to be stored, since not every call needs to be stored. Instead, only the actual recording calls of the function are those which count. In the remaining modes, by contrast, the pure calls to DataRecApiSampleValues do count.
Data recorder ****************************************************************************/ void ModuleExit() { MemApiRemoveVar(scVarNamePres); MemApiRemoveVar(scVarNameTemp); MemApiExit(); LogApiTrace(traceid, "TestDataRecApp unloaded"); LogApiRemoveId(traceid); } / ****************************************************************************/ void ModuleStart() { DataRecApiResult rc; LogApiTrace(traceid, "Starting TestDataRecApp"); rc = DataRecApiStartRecording(sP1Id); ReturnIfNot(rc == DataRecApiResultOk
Data recorder ReturnIfNot(rc == DataRecApiResultOk); rc = DataRecApiSetSampleHook(sP1Id, UpdateMinMaxTemp, 0); ReturnIfNot(rc == DataRecApiResultOk); } Callback function: static int32_t sMinTemp = INT32_MAX, sMaxTemp = INT32_MIN; / ***************************************************************************** */ static void UpdateMinMaxTemp( uint64_t timeStampUs, /**< [in] time stamp (μs since the epoch) */ DataRecApiPos pos, /**< [in] sample position */ DataRecApiVarSample *pSamples, /**< [in] variable sa
Data recorder static static static static const const const const char char char char scProfileName[] = "TestDataRecAppP1"; scVarNameTemp[] = "temperature"; scVarNamePres[] = "pressure"; scVarNameAct[] = "active"; / ***************************************************************************** * static variables */ static int32_t sTemp; static float sPres; static int8_t sActive; static DataRecApiProfileId sP1Id; static DataRecApiVarId sTempId; static DataRecApiVarId sPresId; / **************************
Data recorder MemApiRemoveVar(scVarNameTemp); MemApiExit(); LogApiTrace(traceid, "TestDataRecApp unloaded"); LogApiRemoveId(traceid); } / ****************************************************************************/ void ModuleStart() { DataRecApiResult rc; LogApiTrace(traceid, "Starting TestDataRecApp"); rc = DataRecApiStartRecording(sP1Id); ReturnIfNot(rc == DataRecApiResultOk); } / ****************************************************************************/ void ModuleStop() { DataRecApiResult rc; LogA
Data recorder if (sP1Id == DataRecApiNoId) { /* create profile */ strcpy(info.name, scProfileName); info.size = 1000; info.maxVarCnt = 5; info.bufType = DataRecApiBufTypeContinuous; info.level = DataRecApiLevelApplRt; info.autoStart = 0; rc = DataRecApiCreateProfile(&info, &sP1Id); ReturnIfNot(rc == DataRecApiResultOk && sP1Id != DataRecApiNoId); snprintf(varPath, sizeof varPath, "APPL.MEM.
Data recorder void ModuleInit() { /* * create variables to be recorded */ MemApiInit(); MemApiAddVar(scVarNameTemp, MemApiSInt32, &sTemp, sizeof sTemp); MemApiAddVar(scVarNamePres, MemApiReal, &sPres, sizeof sPres); } / ****************************************************************************/ void ModuleExit() { ExitRecording(); MemApiRemoveVar(scVarNamePres); MemApiRemoveVar(scVarNameTemp); MemApiExit(); } / ****************************************************************************/ void ModuleStart
Data recorder Information Upon the creation of free-running tasks by means of CreateTask, the application takes over co-responsibility for the stability of the system. After the recurrence of the exit function (end of the application), make sure that all created tasks have been terminated or these no longer execute calls of the offered APIs (among others, DataRecApi)! 14.7.
Data recorder Auxiliary functions for the formatting of time stamps and simple determination of variable names: static const char *TimeStamp2DateStr(uint64_t timeStamp) { static char sDateStr[80]; time_t secs, usecs; struct tm *p; /* seconds and μs since 1970-01-01 */ secs = (int)(timeStamp / 1000000); usecs = (int)(timeStamp % 1000000); p = localtime(&secs); if (p != 0) { snprintf(sDateStr, sizeof sDateStr, "%04u-%02u-%02u %02u:%02u:%02u.
Diagnostics 15 Diagnostics This chapter describes the diagnostic options of u-create. Depending on the delivery, not all diagnostics options may be available. 15.1 Control diagnosis Errors during operation or operating states are indicated via the LEDs on the CPU module. PWR (Power) Indication Meaning Dark No voltage supply Green Device running SF (System Fault) Indication Meaning Dark No voltage supply or no error Red Severe system error (e.g.
Diagnostics 15.2 Diagnosis data for Weidmüller If you encounter a problem with the u-create system and require support from Weidmüller, please collect the following information from your system and send it to Weidmüller. 15.2.1 Status report In order to retrieve the status data of the control, please use the status report function. It can be triggered as follows: ● Via Service-App (DevAdmin) Triggering the status report via Service-App See "Device Administration (DevAdmin)". 15.2.
Diagnostics For safety resasons it is necessary to change the SSH key pair (private key and public key). Changing the SSH key pair To generate a new SSH key pair a special program is needed. This program can be downloaded in the internet whereat the program "PuTTYgen" is recommended. To change the SSH key with the use of "PuTTYgen" proceed as follows: 1) Start "PuTTYgen" on PC. Fig. 15-14: PuTTYgen 2) Select the type Typs "RSA" (selected by default) in the lower area of the dialog.
Diagnostics 7) Copy the text into the file authorized_keys. 8) Save and close the file. The SSH key pair was generated. The public key must be downloaded to the control. This is done differently for the existing users. User "service" To download the public key for the user "service" proceed as follows: 1) Start the FTP program and connect to the control. 2) Switch to the direction ssh-key and dwonload the file authorized_keys from the PC to the control (existing file is overwritten).
Diagnostics Verzeichnis 15.3 Beschreibung var In this directory sub-derectories for state report and crashreport are located workspace Root directory for files which are created during operation USB via Ethernet adapter In order to be able to use the "USB via Ethernet adapter", it is necessary to install your own driver. Otherwise, the adapter will be detected and used as a USB-only device. The necessary driver "USB Ethernet/RNDIS Gadget" can be downloaded from the Microsoft© Homepage (https://www.
Diagnostics 6) Click on "Browse my computer for driver software" in the following dialog. 7) Click on "Let me pick from a list of device drivers on my computer" in the following dialog. 8) Click on "Have Disk..." and select the *.inf file previously saved on the PC. 9) Select the driver. 10) Click on "Next". Information The USB interface is automatically assigned the IP address 192.168.227.1. 11) Close the dialog.
Maintenance 16 Maintenance The following items fall under the maintenance of the system: ● ● ● Executing a system backup or restore Executing a firmware update Information about potential errors and their rectification The backup of the system data includes the following information: ● ● ● ● Firmware that is saved on the storage medium Application programs and files including configuration files, message texts Operating data that was saved by the application programs Data on SRAM and EEPROM (e.g.
Maintenance 16.1.1 Firmware-Update for devices This chapter describes the creation of a storage medium to execute a firmware update of the control. To create a firmware update on a storage medium proceed as follows: 1) Start firmware update tool via double-clicking "u-create FirmwareUpdate.exe". 2) Confirm the following dialogue with "Next". 3) Select the desired device from the list "devices".
Maintenance traceWord ... 0: the execution of the firmware update will not be recorded. -1: the execution of the firmware update will be recorded in the system trace. Click on "Next". 9) The storage medium will be created via "Install". Information The storage medium must not be removed while it is being written to! 10) Exit the firmware update tool via "Finish". Information It is recommended to execute "Eject device" under Windows before removing the storage medium.
Technical data 17 Technical data Detailed information concerning the technical data can be found in the respective project engineering manuals. 106 System manual 2696790000/02/04.
Directives and standards 18 Directives and standards Detailed information about directives and standards can be found in the project engineering manual of your modules. 2696790000/02/04.
Appendix: Tutorial - creating an IEC project 19 Appendix: Tutorial - creating an IEC project This tutorial describes step-by-step how a u-create studio project is created and programmed. Then, it illustrates how the project is uploaded onto a control and executed. 19.1 Creating a new project Start u-create studio and call the command File > New project the main menu. Fig.
Appendix: Tutorial - creating an IEC project Fig. 19-16: Creating a new project u-create studio automatically creates the project in the indicated directory and issues the addition ".project". The empty project opens and a target system can be inserted into the project tree. To do this, open the context menu of the project in the project tree and click on "Append Device...". This opens a dialog to select a control.
Appendix: Tutorial - creating an IEC project Fig. 19-17: Add POU A dialog opens where you can set the name, the type, and the implementation language of the POU. In this example, the name "myProg", the type "Program", and the language ST (Structured Text) are used for the block: Fig. 19-18: POU settings After the settings have been selected, the POU is inserted under the node Application via "Add"; the program editor automatically opens and the work area is ready for additional programming.
Appendix: Tutorial - creating an IEC project Fig. 19-19: Program editor of the POU 19.2 Creating a simple program The newly created POU is now expanded through programming: A numerical variable needs to be created that changes its value cyclically. The necessary entries (declaration of a numerical variable, value change of the variable) can be carried out in the displayed editor via keyboard entries in the programming language ST ( structured text) selected during the creation of the module.
Appendix: Tutorial - creating an IEC project Fig. 19-21: Input assistance for the selection of a data type In this tutorial, a variable X of the type DINT is to be declared: Fig. 19-22: Dialog "Variable Declaration" with entered variable name and data type The created command (declaration of a variable) is inserted in the top part of the editor.
Appendix: Tutorial - creating an IEC project After creating the program, a task must be created in which the program module needs to be processed. To do so, right click on Application in the project tree and select Add Object > Task Configuration.... A dialog opens, which can be used to create a node for several tasks in the project tree. Via Add the node is set up in the project tree under Application > Task Configuration, which already contains a task. It is automatically opened in the work area. Fig.
Appendix: Tutorial - creating an IEC project 19.3 Saving u-create studio project The entire project is saved with the menu command File > Save Project or via the Save icon on the toolbar in the directory indicated during the creation of the project. The project is automatically compiled during the saving process. 19.4 Load firmware onto device There is the possibility to install the firmware on a device (e.g. control) via a removable disk (e.g. SD card).
Appendix: Tutorial - creating an IEC project Name Description Name: Name of the control or the active static operating panel Description: Individual description Selection of the removable disk or any folder. If no removable disk is selected, a warning will be shown and the content is saved in the selected directory. If a removable disk is selected, it is checked whether the removable disk is a valid Service Medium.
Appendix: Tutorial - creating an IEC project Installing firmware on devices without display Caution Never remove the removable disk during an update procedure nor disconnect the device from the power supply. This can lead to destruction of the firmware on the components and thus make a further operation impossible.
Appendix: Tutorial - creating an IEC project 19.5 Configuration of the control During the next step, the target PLC must be specified and configured. To do so, open the control configuration in u-create studio by double-clicking on the control in the project tree and switch to the "Communication Settings" tab: Fig. 19-27: Communication settings By clicking on Scan in the top area of the window, all controls available in the network are displayed.
Appendix: Tutorial - creating an IEC project It can be selected which parts of the project are to be downloaded to the device. Fig. 19-29: Selection of the data to be uploaded on the control If a new configuration is loaded onto the control, the control must be restarted. To do this, a dialog is displayed after the configuration is downloaded. If this dialog is confirmed, only the configuration is loaded onto the control and the control implements a restart.
Appendix: Tutorial - creating an IEC project Fig. 19-30: Started sample project 2696790000/02/04.
Appendix: Addressing in the Ethernet (basics) 20 Appendix: Addressing in the Ethernet (basics) Due to the separation of logic and physical protocol levels (Ethernet and TCP/ IP) two types of addresses exist in the network: ● ● A fixed Ethernet address (MAC-ID) for each unit and an IP address, which is allocated to each unit in the network. The application always sends data to or receives data from an IP address.
Appendix: Addressing in the Ethernet (basics) Example: In a small network with the net mask 255.255.255.0, at the IP address 192.168.181.1 the Net ID is 192.168.181 and the Host ID is 1. If (in a different, medium-sized network) net mask 255.255.0.0 is set, then at IP address 192.169.100.1, the Net ID is 192.169 and the Host ID is 100.1. Gateway Networks with different Net IDs are connected together via routers or gateways.
Appendix: Tutorial FoE 21 Appendix: Tutorial FoE Access via FoE to a device (e.g. to load files onto the device) must be solved programmatically via the application. In this chapter, a firmware update on a UC20 bus coupler is executed as an example via FoE. The sequence of the firmware update is displayed in the message monitor.
Appendix: Tutorial FoE KSys_TraceUOS(ADR(msState)); miState:= 11; END_IF 11: //Download file dir:= IoEcat_FileDirection.download; slavedir:= ''; masterdir:= CONCAT(msFileDir,msFileName); state := K_IoApi.IoApi_EcatFileTransfer(devHdl:= mDevHandle, direction:= dir, slaveFileName:= slavedir, masterFileName:= masterdir, password:= pass, errorCode:= err); IF state = IoApi_State.
Appendix: Tutorial - call C function from IEC 22 Appendix: Tutorial - call C function from IEC The u-create system offers the possibility to call C functions in IEC created with u-create studio C++. Therefore a template with a predefinded interface for data exchange exists in u-create studio C++. It is recommanded to create a function in IEC which takes care of the call of the C function and the correct data exchange. The data exchange itself takes place on a shared memory area.
Appendix: Tutorial - call C function from IEC Afterwards, the changed values of the variables should be accessable in the IEC application again. Therefore the following steps are necessary: ● ● ● 22.3 Creation of the IEC function Creation of the C function and download to controller Call of IEC function in IEC application and download Creating the C function and download After starting the u-create studio C++ a new project is created via File ► New ► C/C++ Target Application in the menu bar.
Appendix: Tutorial - call C function from IEC struct func1_Instance { int32_t *inst_global; }; In addition both files stdio.h and string.h must be included. To create the C function the file MyIEC_C_Call.c under myIEC_C_Call ► src in the project tree must be opened in the working area. The program code in the function int func1(...) is removed and replaced with the following code parts. In the first code line the variable char msg [106] is defined. This variable is used later to buffer a text.
Appendix: Tutorial - call C function from IEC rv1: DINT; res1 : REAL; res2 : STRING [106]; END_VAR In the code area the IEC function MyCFunction is called as follows: rv1 := MyCFunction( in_dword := 17, in_string := 'Hello c-Function', in_real := 25.58, out_real => res1, out_string => res2); The variables res1 and res2 contain the variables calculated in the C function which can be used later in the application.
Index Index C F C functions ............................................ 124 Fast control.............................................. 30 Configuration Firmware Control .............................................. 117 Creating project ..................................... 108 Installing.............................................. 27 I Interfaces D DevAdmin EtherCAT ............................................ 19 Backup................................................ 49 Modbus TCP/IP .....