OLM_OnlineLicenseManager.DemoModeStartedID (METH) ¶ METHOD DemoModeStartedID With this method a component can propagade in a uniform way that it is running in demo mode and will - after a certain time - stop. This method should be called after it is clear that the license will stay in demo mode, in particular the (possibly later / after initialization phase) confirmation of dynamic licenses should be taken into account. Therefore it is recommended for the OEM to confirm dynamic licenses during the initialization (after global init slot 40000) and before the application is started. In contrast to the method DemoModeStarted, this function will post the message only once, and so the caller doesn’t have to take care and make sure to call it only once by himself InOut: Scope Name Type Comment Input strComponent STRING name of the component udiLicenseID UDINT license ID of the component
OLM_OnlineLicenseManager.GetUserLicenseValue (METH) ¶ METHOD GetUserLicenseValue : UDINT This method allows to ask for the license value of a component (specified by udiLicenseID) InOut: Scope Name Type Comment Return GetUserLicenseValue UDINT Possible values: 0 no valid license installed 16#FFFFFFFF demo mode (lasts for 30 min) else license value; interpretation depends on component Input udiLicenseID UDINT ID of the component that asks for its license value (centrally assigned by 3S)
OLM_OnlineLicenseManager.LicenseMissingID (METH) ¶ METHOD LicenseMissingID With this method a component that previously asked for a license and received a negative result can post an error log message in a unified way Hence this method should be called after GetUserLicenseValue has been called and returned no license. In contrast to the method LicenseMissing, this function will post the message only once, and so the caller doesn’t have to take care and make sure to call it only once by himself InOut: Scope Name Type Comment Input strComponent STRING name of the component udiLicenseID UDINT license ID of the component
File and Project Information ¶ Scope Name Type Content FileHeader creationDateTime date 14.03.2024, 07:52:33 companyName string 3S-Smart Software Solutions GmbH libraryFile 3SLicense.library primaryProject True productName CODESYS productProfile CODESYS V3.5 SP16 Patch 3 contentFile 3SLicense.clean.json version version 2.0.0.0 ProjectInformation ActivateSigning bool False LinkInSimulation True Released True SIL2 False LastModificationDateTime date 14.03.2024, 07:52:31 LibraryCategories library-category-list Intern Author string CODESYS Development GmbH Company CODESYS CompiledLibraryCompatibilityVersion CODESYS V3.5 SP16 DefaultNamespace 3S_LICENSE Description See: Description DocFormat reStructuredText Placeholder 3SLicense PrivateKeyFile ./../../../3sSignedLibrary_topsecret.libpk Project 3SLicense Title 3SLicense Version version 3.5.20.0
Library Reference ¶ This is a dictionary of all referenced libraries and their name spaces. CAA Types Extern ¶ Library Identification ¶ Placeholder: CAA Types Default Resolution: CAA Types Extern, * (CAA Technical Workgroup) Namespace: CAA Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: True SystemLibrary: False Key: CAA Types CmpApp ¶ Library Identification ¶ Placeholder: CmpApp Default Resolution: CmpApp, * (System) Namespace: CmpApp Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: CmpApp CmpCodeMeter ¶ Library Identification ¶ Placeholder: CmpCodeMeter Default Resolution: CmpCodeMeter, * (System) Namespace: CmpCodeMeter Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: CmpCodeMeter CmpErrors2 Interfaces ¶ Library Identification ¶ Name: CmpErrors2 Interfaces Version: newest Company: System Namespace: CmpErrors Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: CmpErrors2 Interfaces, * (System) CmpEventMgr ¶ Library Identification ¶ Placeholder: CmpEventMgr Default Resolution: CmpEventMgr, * (System) Namespace: CmpEventMgr Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: CmpEventMgr CmpLog ¶ Library Identification ¶ Placeholder: CmpLog Default Resolution: CmpLog, * (System) Namespace: CmpLog Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: CmpLog Component Manager ¶ Library Identification ¶ Placeholder: Component Manager Default Resolution: Component Manager, * (System) Namespace: Component_Manager Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: Component Manager Standard ¶ Library Identification ¶ Placeholder: Standard Default Resolution: Standard, * (System) Namespace: Standard Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: Standard SysCpuHandling ¶ Library Identification ¶ Placeholder: SysCpuHandling Default Resolution: SysCpuHandling, * (System) Namespace: SysCpuHandling Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: SysCpuHandling SysTypes2 Interfaces ¶ Library Identification ¶ Name: SysTypes2 Interfaces Version: newest Company: System Namespace: SysTypes Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: SysTypes2 Interfaces, * (System)
RCVREC (FB) ¶ FUNCTION_BLOCK RCVREC A Field Device can receive an acyclic process data record from a Host Controller or a Supervisor (The Host may use the WRREC function block). The application of a programmable field device is informed about this request and can receive the data using the RCVREC function block. This function blocks contains the methods to check, receive and acknowledge a process data record. All aspects of receiving a process data record may use one function block instance, the different methods are distinguished using the MODE input. IF a data record is received (with MODE=1 OR MODE=2), the NEW output indicates that the data record is stored in the variable given AT the RECORD parameter. If the function block refuses to accept the data record, the CODE1 input sets the Error Code 1, and the CODE2 input sets the Error Code 2 of the negative response. If an error occurred, the ENO=0 indicates an error and the STATUS output contains the error code. Note The application program of the Field Device shall acknowledge the received request, otherwise the Host Controller will get a timeout error or the device stack will send a negative response. Code-Example PROGRAM ReceiveData VAR recvData : CommFB.RCVREC ; data : ARRAY [0..64] OF BYTE ; recvAll : CommFB.RCVREC ; param1 : ARRAY [0..7] OF BYTE ; param2 : ARRAY [0..7] OF BYTE ; END_VAR // Variant 1: receive data for a specific slot: recvData.EN := 1 ; recvData.F_ID := CommFB.SUBSLOT_ID ( EN := TRUE , PN_Device.DeviceID , 2 , 1 ); // get ID of Slot 2 of the specified device recvData.MLEN := SIZEOF ( data ); recvData.RECORD := ADR ( data ); recvData ( MODE := CommFB.RCVREC_MODE.RECEIVE_BY_SLOT ); // receive data and write it to RECORD IF recvData.NEW THEN IF ( recvData.INDEX = 10 ) THEN // ...process and opt. check received data recvData ( MODE := CommFB.RCVREC_MODE.POS_RESPONSE ); // send pos. response to host ELSE recvData ( MODE := CommFB.RCVREC_MODE.NEG_RESPONSE , CODE1 := CommFB.ErrorCode1_RW.Invalid_index ); // signal error to host END_IF END_IF // Variant 2: check for any request and then (opt.) receive it in a second step // MODE := 0 = CommFB.RCVREC_MODE.CHECK // MODE := 1 = CommFB.RCVREC_MODE.RECEIVE // MODE := 3 = CommFB.RCVREC_MODE.POS_RESPONSE // MODE := 4 = CommFB.RCVREC_MODE.NEG_RESPONSE recvAll ( EN := TRUE , MODE := 0 ); // check for new data IF ( recvAll.NEW ) THEN // received data IF ( recvAll.SLOT = 1 AND recvAll.INDEX = 100 ) THEN recvAll ( MODE := 1 , MLEN := SIZEOF ( param1 ), RECORD := ADR ( param1 )); // get data recvAll ( MODE := 3 ); // pos. response ELSIF ( recvAll.SLOT = 3 AND recvAll.INDEX = 200 ) THEN recvAll ( MODE := 1 , MLEN := SIZEOF ( param2 ), RECORD := ADR ( param2 )); // get data recvAll ( MODE := 3 ); // pos. response ELSE recvAll ( MODE := 4 , CODE1 := CommFB.ErrorCode1_RW.Invalid_slot_or_subslot ); // signal error to host END_IF END_IF InOut: Scope Name Type Comment Input EN BOOL The function is invoked by EN=1. MODE UINT Function specifier, see RCVREC_MODE F_ID DWORD Slot / subslot to filter the data records to receive MLEN UINT Maximum length of a data record to receive CODE1 BYTE Reason for negative response. (see ErrorCode1_RW ) CODE2 BYTE Reason for negative response. (0 or user specific) RECORD POINTER TO BYTE Received data record. Shall be at least of MLEN byte Output ENO BOOL Function enabled NEW BOOL New data record received STATUS DWORD Field Device interface status SLOT UINT Slot the record is received for SUBSLOT UINT Subslot the record is received for INDEX UINT Index of the received data record LEN UINT Length of the received data record
RCVREC_MODE (ENUM) ¶ TYPE RCVREC_MODE : Attributes: qualified_only InOut: Name Initial Comment CHECK 0 If the Field Device interface has received a process data record, only the outputs NEW, SLOT, INDEX and RLEN are set. Multiple calls of this function block with MODE=0 returns the outputs for the same request. RECEIVE 1 If the Field Device interface has received a process data record, the function block outputs are updated and the data record is transferred to the RECORD parameter. RECEIVE_BY_SLOT 2 If the Field Device interface has received a process data record for the slot or subslot the num-bers of which are given in input F_ID, the function block outputs are updated and the data re-cord is transferred to the RECORD parameter. POS_RESPONSE 3 The service is responded positively. NEG_RESPONSE 4 After checking the request to receive a process data record, this function block refuses to accept this record and sends a negative response to the Host Controller. The error reason is given with the inputs CODE1 and CODE2.
SALARM (FB) ¶ FUNCTION_BLOCK SALARM A Field Device can generate alarms to its associated Host Controller to inform it e.g. about certain process events or other events to state there are some limitations of the capabilities of the Field Device for diagnostic reasons. The Host application may use the RALARM function block to receive these alarms. The ID parameter identifies the slot of the Field Device the alarm is generated for. The ATYPE input shall contain the alarm type. The ASPEC input shall contain the alarm specifier. The LEN input contains the length in byte of the additional alarm information stored in the AINFO parameter. The Variable given as AINFO parameter shall be at least of LEN byte. If the alarm is transmitted successfully, the VALID output indicates that the alarm was received by the Host Controller. If an error occurred, the ERROR output indicates an error and the STATUS output contains the error code. Code-Example PROGRAM SendAlarm VAR sender : CommFB.SALARM ; alarmPayload : ARRAY [0..3] OF BYTE := [0, 1, 2, 3] ; // encoding for Profinet: USI (UInt16), ARRAY[0..n] OF BYTE; ID : DWORD := CommFB.Constants.INVALID_ID ; END_VAR ID := CommFB.SUBSLOT_ID ( EN := TRUE , ID := PN_Device.DeviceID , SLOT := 2 , SUBSLOT := 1 ); sender.ID := ID ; sender.ATYPE := ProfinetCommon.AlarmType.PROCESS ; sender.ASPEC := 0 ; // 0 for process-alarm sender.LEN := SIZEOF ( alarmPayload ); sender.AINFO := ADR ( alarmPayload ); sender (); IF ( sender.DONE OR sender.ERROR ) THEN sender ( REQ := FALSE ); END_IF InOut: Scope Name Type Comment Input REQ BOOL The function is invoked when the REQ input is equal to 1. ID DWORD Handle of the slot of the alarm source ATYPE UINT Type of the alarm ASPEC UINT Specifier of the alarm LEN UINT Length of AINFO data in bytes AINFO POINTER TO BYTE Additional alarm information Output DONE BOOL Indicates that the alarm was received by the Host Controller BUSY BOOL FB is busy ERROR BOOL Error detected STATUS DWORD Last detected status
GETIO_PART (FB) ¶ FUNCTION_BLOCK GETIO_PART The GETIO_PART function block gets a subset of the input data associated to a slot or subslot of a Field Device. The input data are addressed within the slot or subslot through OFFSET and LEN parameters. The GETIO_PART function block gets the input data from the Host Controller interface out of the cyclically read input data of the Field Device. The function block is invoked by a 1 of the EN input. If the input data are valid, the ENO output is set to 1, the ERROR output is set to 0, and the input data are stored in the variable given at the INPUTS parameter. The variable passed to the INPUTS parameter shall be of appropriate size to receive the input data. Never use GETIO-/SETIO_PART FBs concurrently with %I/%Q-Input/Output-Mapping for the same slot/subslot ! InOut: Scope Name Type Comment Input EN BOOL Enable ID DWORD Identifier of a slot or subslot of a Field Device OFFSET INT Count of the first byte within the IO data object LEN INT Length of the data to read INPUTS POINTER TO BYTE Requested subset of the input data Output ENO BOOL Flag indication received data OK STATUS DWORD Last detected status ERROR BOOL Flag indication an error
PN_AINFO (STRUCT) ¶ TYPE PN_AINFO : STRUCT Alarm information of a profinet device (see: RALARM ). (see IEC 61158-6) InOut: Name Type Comment BlockType UINT BlockType BlockLength UINT Length (in bytes) of field AlarmData Version UINT version high + low AlarmType UINT Alarm type API UDINT Application Process Identifier Slot UINT Slot number Subslot UINT Subslot number ModuleIdentNumber UDINT Module Identification number SubmoduleIdentNumber UDINT Submodule Identification number AlarmSpecifier UINT Alarm Specifier Bit 0 to 10: SequenceNumber Bit 11: ChannelDiagnosis Bit 12: ManufacturerSpecificDiagnosis Bit 13: SubmoduleDiagnosisState Bit 14: not used Bit 15: ARDiagnosisState USI UINT UserStructure Identifier AlarmData ARRAY [0..(Constants.MAX_PN_ALARM_DATA - 1)] OF BYTE Alarm information (0..n) bytes)