diff --git a/.github/workflows/build-export-publish.yml b/.github/workflows/build-export-publish.yml new file mode 100644 index 0000000..3824197 --- /dev/null +++ b/.github/workflows/build-export-publish.yml @@ -0,0 +1,126 @@ +name: Build, Export, and Publish + +on: + push: + tags: + - 'v*.*.*' + workflow_dispatch: + inputs: + version: + description: 'Version to publish (e.g. v1.0.0)' + required: true + +jobs: + build-export-publish: + runs-on: [AS6-runner] + + permissions: + contents: read + packages: write + + env: + PROJECT: example/AsProject/AsProject.apj + PROJECT_DIR: example/AsProject + LIBRARY: OMJSON + LIBRARY_DIR: src/Ar/OMJSON + EXPORT_DIR: export + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + registry-url: 'https://npm.pkg.github.com' + scope: '@loupeteam' + + - name: Resolve version + id: version + shell: pwsh + run: | + if ($env:GITHUB_REF_TYPE -eq 'tag') { + $ver = $env:GITHUB_REF_NAME -replace '^v', '' + } else { + $ver = "${{ inputs.version }}" -replace '^v', '' + } + if (-not $ver) { + Write-Error "Could not determine version. Push a v*.*.* tag or supply the version input." + exit 1 + } + Write-Host "Publishing version: $ver" + "version=$ver" | Out-File -Append -Encoding utf8 -FilePath $env:GITHUB_OUTPUT + + - name: Find AS6 build executable + uses: loupeteam/br-actions/find-as6-build@v1 + id: find-as + + - name: Build Intel + uses: loupeteam/br-actions/build-as-project@v1 + with: + exe-path: ${{ steps.find-as.outputs.exe-path }} + project: ${{ env.PROJECT }} + config: Intel + + - name: Build ARM + uses: loupeteam/br-actions/build-as-project@v1 + with: + exe-path: ${{ steps.find-as.outputs.exe-path }} + project: ${{ env.PROJECT }} + config: ARM + + - name: Export library + uses: loupeteam/br-actions/export-as-library@v1 + with: + project-dir: ${{ env.PROJECT_DIR }} + library: ${{ env.LIBRARY }} + library-dir: ${{ env.LIBRARY_DIR }} + configs: Intel ARM + output: ${{ env.EXPORT_DIR }} + as-install: ${{ steps.find-as.outputs.install-path }} + + - name: Locate exported version directory + id: export-dir + shell: pwsh + run: | + $path = Get-ChildItem "$env:EXPORT_DIR/$env:LIBRARY" -Directory | + Select-Object -First 1 -ExpandProperty FullName + if (-not $path) { + Write-Error "No exported version directory found under $env:EXPORT_DIR/$env:LIBRARY" + exit 1 + } + Write-Host "Exported version directory: $path" + "path=$path" | Out-File -Append -Encoding utf8 -FilePath $env:GITHUB_OUTPUT + + - name: Generate package.json + uses: loupeteam/br-actions/prepare-lpm-package@v1 + with: + library-dir: ${{ env.LIBRARY_DIR }} + output-dir: ${{ steps.export-dir.outputs.path }} + version: ${{ steps.version.outputs.version }} + + - name: Publish to GitHub Packages + shell: pwsh + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + Write-Host "Publishing @loupeteam/$($env:LIBRARY.ToLower())@${{ steps.version.outputs.version }}" + Push-Location "${{ steps.export-dir.outputs.path }}" + npm publish + Pop-Location + + - name: Upload exported library artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ env.LIBRARY }}-${{ steps.version.outputs.version }} + path: ${{ env.EXPORT_DIR }}/${{ env.LIBRARY }}/ + if-no-files-found: error + + - name: Upload build diagnostics + if: always() + uses: actions/upload-artifact@v4 + with: + name: BuildDiagnostics + path: example/AsProject/Temp/BuildDiagnostics.log + if-no-files-found: ignore diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..7ed21d6 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,57 @@ +name: Build + +on: + workflow_dispatch: + inputs: + build_mode: + description: 'Build mode' + required: false + default: 'Build' + type: choice + options: + - Build + - Rebuild + pull_request: + paths-ignore: + - '**/*.md' + - 'docs/**' + - 'LICENSE' + +jobs: + build: + runs-on: [AS6-runner] + + env: + PROJECT: example/AsProject/AsProject.apj + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Find AS6 build executable + uses: loupeteam/br-actions/find-as6-build@v1 + id: find-as + + - name: Build Intel + uses: loupeteam/br-actions/build-as-project@v1 + with: + exe-path: ${{ steps.find-as.outputs.exe-path }} + project: ${{ env.PROJECT }} + config: Intel + build-mode: ${{ inputs.build_mode || 'Build' }} + + - name: Build ARM + uses: loupeteam/br-actions/build-as-project@v1 + with: + exe-path: ${{ steps.find-as.outputs.exe-path }} + project: ${{ env.PROJECT }} + config: ARM + build-mode: ${{ inputs.build_mode || 'Build' }} + + - name: Upload build diagnostics + if: always() + uses: actions/upload-artifact@v4 + with: + name: BuildDiagnostics + path: example/AsProject/Temp/BuildDiagnostics.log + if-no-files-found: ignore diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index 5ccb648..0000000 --- a/Jenkinsfile +++ /dev/null @@ -1,10 +0,0 @@ -library "jenkinsLibrary@develop" - -buildPublishPipeline( - slackChannel: "sandbox-github", - asProjectRepo: "OMJSON", - asProjectVersion: "main", - asProjectPath: "example/AsProject", - skipLpmInstall: true, - packagesToPublish: ['src/Ar/OMJSON', 'src/Ar/Lux'] -) diff --git a/example/AsProject/AsProject.apj b/example/AsProject/AsProject.apj index f6e0765..bce165c 100644 --- a/example/AsProject/AsProject.apj +++ b/example/AsProject/AsProject.apj @@ -1,10 +1,13 @@  - - + + + + + \ No newline at end of file diff --git a/example/AsProject/LICENSE b/example/AsProject/LICENSE new file mode 100644 index 0000000..98a27ba --- /dev/null +++ b/example/AsProject/LICENSE @@ -0,0 +1,9 @@ +The MIT License + +Copyright 2023 Loupe + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/Loupe/Package.pkg b/example/AsProject/Logical/Libraries/Loupe/Package.pkg index 7874e58..4027671 100644 --- a/example/AsProject/Logical/Libraries/Loupe/Package.pkg +++ b/example/AsProject/Logical/Libraries/Loupe/Package.pkg @@ -1,20 +1,11 @@ - - + vartools databuffer - persist - csvfilelib - fiowrap - piper - hmitools - ringbuflib - logthat websocket tcpcomm stringext ..\..\src\Ar\OMJSON\ANSIC.lby - hammers - \ No newline at end of file + diff --git a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/Binary.lby b/example/AsProject/Logical/Libraries/Loupe/csvfilelib/Binary.lby deleted file mode 100644 index d921804..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/Binary.lby +++ /dev/null @@ -1,25 +0,0 @@ - - - - CSVFileLib.typ - CSVFileLib.var - CSVFileLib.fun - CSVFileLib_enum.typ - CSVFileMgr.typ - CSVFileMgr_HMI.typ - BuildOptions.txt - CHANGELOG.md - - - - - - - - - - - - - - diff --git a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/BuildOptions.txt b/example/AsProject/Logical/Libraries/Loupe/csvfilelib/BuildOptions.txt deleted file mode 100644 index 313bbae..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/BuildOptions.txt +++ /dev/null @@ -1 +0,0 @@ --lc \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/CHANGELOG.md b/example/AsProject/Logical/Libraries/Loupe/csvfilelib/CHANGELOG.md deleted file mode 100644 index 926efe7..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/CHANGELOG.md +++ /dev/null @@ -1,82 +0,0 @@ -1.2.2 - Increase maximum size of variable list from 50 to 100 - -1.2.1 - Fix internal variable usage - -1.2.0 - Add configurable number of Significant Figures for LREALs - -1.1.0 - Add LREAL support - Add '-lc' build option requirement - -1.0.4 - Update to support new logThat - -1.0.3 - Update dependencies - -1.0.2 - Update dependencies - -1.0.1 - Support both new and old revInfo var names for header info - -1.0.0 - Add support for quoted string values - Change output format to use single quotes for strings instead of double - quotes - Increase number of characters stored in variable values - -0.16.0 - Add feature to use a global Variable to look up type but write to a - user supplied memory area - -0.15.1 - Migrate from AsString to AsBrStr - -0.15.0 - 20160322 - Update HMI to be a bit more user friendly - -0.14.9 - 20150925 - Fix bug with temp file in folders - -0.14.8 - 20150805 - Make temp file hidden - -0.14.7 - 20150701 - Fix a version dependancy - -0.14.6 - 20150122 - Change logging to use new LogThat library - While saving, CSVFn_HMI_Cyclic.c now appends the selected - file extension "FileExtSelection" from HMIFileBrowse FUB - if no extension is found in the FileSelection - Change default max file size to 65536 to fix a complex - problem - Add revision information to file header - -0.13.0 - 20130730 - Add csvOpenFile_Init() fn - -0.12.0 - 20130627 - Add logging functionality - -0.11.0 - 20130114 - Update dependencies on HMITools library - -0.10.0 - 20121022 - Add support for enums - -0.9.0 - 20120803 - Update documentation to reflect changes to inputs - Change the temporary filename to include the input filename - to fix the same problems as for the log file in 0.08.2 - Have a CFG input for the log file name - this fixes some - problems if multiple CSV objects are trying to write to the - log file around the same time - Prohibit empty file name input - -0.8.0 - 20120420 - Add prefixes - -0.7.0 - 20120410 - Make csvProcessData() reentrant (asynchronous) - -0.6.0 - 20120405 - Change implementation to get better performance - Add support for TIME and DATE_AND_TIME variables as integers - -0.5.0 - 20120322 - Start HMI functionality - Add DeleteFile CMD and functionality - First full release candidate - -0.4.0 - 20120320 - Change MaxIterations to MaxLines and retested - Update documentation - Add functionality to save variables - Add new data types - Change name to 'CSVFileLib' - Change command names - Change nomenclature from cfg/cfm to csv throughout library - -0.3.0 - 20120113 - NEW FILE FORMAT - INCOMPATIBLE WITH ALL OLDER VERSIONS OF CFGFileLib!!! - -0.1.0 - 20110613 - First version diff --git a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/CSVFileLib.fun b/example/AsProject/Logical/Libraries/Loupe/csvfilelib/CSVFileLib.fun deleted file mode 100644 index 7fd825e..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/CSVFileLib.fun +++ /dev/null @@ -1,179 +0,0 @@ -(* -* File: CSVFileLib.fun -* Copyright (c) 2023 Loupe -* https://loupe.team -* -* This file is part of CSVFileLib, licensed under the MIT License. -* -*) - -FUNCTION CSVFn_Init : UINT (*CSVFileMgr initialization function*) - VAR_IN_OUT - t : CSVFileMgr_typ; - END_VAR -END_FUNCTION - -FUNCTION CSVOpenFile_Init : UINT (*Open a file in an INIT routine*) - VAR_IN_OUT - t : CSVFileMgr_typ; - END_VAR -END_FUNCTION - -FUNCTION CSVFn_Cyclic : UINT (*CSVFileMgr cyclic function*) - VAR_IN_OUT - t : CSVFileMgr_typ; - END_VAR -END_FUNCTION - -FUNCTION csvInitBuffer : UINT (*Initialize a buffer*) - VAR_INPUT - BufferLength : UDINT; - END_VAR - VAR_IN_OUT - pBuffer : CSVFileMgr_Int_Buffer_typ; - END_VAR -END_FUNCTION - -FUNCTION csvClearBuffer : UINT (*Clear a buffer*) - VAR_IN_OUT - pBuffer : CSVFileMgr_Int_Buffer_typ; - END_VAR -END_FUNCTION - -FUNCTION csvAddToBuffer : UINT (*Add data to the end of a buffer, checking for overflow*) - VAR_INPUT - pData : UDINT; - DataLength : UDINT; - END_VAR - VAR_IN_OUT - pBuffer : CSVFileMgr_Int_Buffer_typ; - END_VAR -END_FUNCTION - -FUNCTION csvSetError : UINT (*Set error status on CSVFileMgr*) - VAR_INPUT - ErrorID : UINT; - END_VAR - VAR_IN_OUT - t : CSVFileMgr_typ; - END_VAR -END_FUNCTION - -FUNCTION csvExpandVar : UINT (*Expand a complex variable into simple variables*) - VAR_INPUT - pVarName : UDINT; - END_VAR - VAR_IN_OUT - pBuffer : CSVFileMgr_Int_Buffer_typ; - pStructData : CSVFileMgr_StructData_typ; - t : CSVFileMgr_typ; - END_VAR -END_FUNCTION - -FUNCTION csvProcessData : UINT (*Process data from file*) - VAR_IN_OUT - t : CSVFileMgr_typ; - END_VAR -END_FUNCTION - -FUNCTION csvAddLogInfo : UINT (*Add information to the parse status log*) - VAR_INPUT - InfoID : UINT; - LineNumber : UDINT; - pAddInfo : UDINT; - END_VAR - VAR_IN_OUT - t : CSVFileMgr_typ; - END_VAR -END_FUNCTION - -FUNCTION csvParseLine : UINT (*Parse one line of the file*) - VAR_INPUT - pLine : UDINT; - LineNumber : UDINT; - END_VAR - VAR_IN_OUT - pVariable : CSVFileVariable_typ; - t : CSVFileMgr_typ; - END_VAR -END_FUNCTION - -FUNCTION csvGetVarInfo : UINT (*Get variable address and data type based on variable name*) - VAR_INPUT - LineNumber : UDINT; - END_VAR - VAR_IN_OUT - pVariable : CSVFileVariable_typ; - t : CSVFileMgr_typ; - END_VAR -END_FUNCTION - -FUNCTION csvOpenVar : UINT (*Process one variable of an Open operation*) - VAR_INPUT - LineNumber : UDINT; - END_VAR - VAR_IN_OUT - pVariable : CSVFileVariable_typ; - t : CSVFileMgr_typ; - END_VAR -END_FUNCTION - -FUNCTION csvSaveVar : UINT (*Process one variable of a Save operation*) - VAR_INPUT - LineNumber : UDINT; - END_VAR - VAR_IN_OUT - pVariable : CSVFileVariable_typ; - t : CSVFileMgr_typ; - END_VAR -END_FUNCTION - -FUNCTION csvWriteHeader : UINT (*Write the header to the file*) - VAR_IN_OUT - t : CSVFileMgr_typ; - END_VAR -END_FUNCTION - -FUNCTION csvRemovePrefix : UINT (*Remove the prefix from the string if necessary*) - VAR_INPUT - MaxLength : UDINT; - END_VAR - VAR_IN_OUT - String : STRING[1]; - Prefix : STRING[1]; - END_VAR -END_FUNCTION - -FUNCTION csvAddPrefix : UINT (*Add a prefix to a string, unconditionally*) - VAR_INPUT - MaxLength : UDINT; - END_VAR - VAR_IN_OUT - String : STRING[1]; - Prefix : STRING[1]; - END_VAR -END_FUNCTION - -FUNCTION CSVFn_HMI_Cyclic : UINT (*CSVFileMgr cyclic HMI function*) - VAR_IN_OUT - HMI : CSVFileMgr_HMI_typ; - t : CSVFileMgr_typ; - END_VAR -END_FUNCTION - -FUNCTION csvhmiGenerateFileListString : UINT (*Generate the file list string for a given file*) - VAR_INPUT - pFileListString : UDINT; - END_VAR - VAR_IN_OUT - pDirReadData : fiDIR_READ_DATA; - END_VAR -END_FUNCTION - -FUNCTION csvDTOA : UDINT (*Convert double to string*) - VAR_INPUT - value : LREAL; - pString : UDINT; - numSigFigs : USINT; - END_VAR -END_FUNCTION diff --git a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/CSVFileLib.typ b/example/AsProject/Logical/Libraries/Loupe/csvfilelib/CSVFileLib.typ deleted file mode 100644 index 70a54f6..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/CSVFileLib.typ +++ /dev/null @@ -1,8 +0,0 @@ -(* -* File: CSVFileLib.typ -* Copyright (c) 2023 Loupe -* https://loupe.team -* -* This file is part of CSVFileLib, licensed under the MIT License. -* -*) diff --git a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/CSVFileLib.var b/example/AsProject/Logical/Libraries/Loupe/csvfilelib/CSVFileLib.var deleted file mode 100644 index 0a4f682..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/CSVFileLib.var +++ /dev/null @@ -1,60 +0,0 @@ -(* -* File: CSVFileLib.var -* Copyright (c) 2023 Loupe -* https://loupe.team -* -* This file is part of CSVFileLib, licensed under the MIT License. -* -*) -VAR CONSTANT - CSV_PADDINGCHARS : STRING[6] := ' $T$R$L$P$"'; -END_VAR -(*Max Array Indices*) -VAR CONSTANT - CSV_MAI_LEVEL : USINT := 29; - CSV_MAI_VARLIST : USINT := 99; - CSV_MAI_FILELIST : UINT := 299; -END_VAR -(*String Lengths*) -VAR CONSTANT - CSV_STRLEN_FILENAME : UINT := 260; - CSV_STRLEN_TEMPFILENAME : UINT := CSV_STRLEN_FILENAME + 3; - CSV_STRLEN_FILEDEVICE : UINT := 260; - CSV_STRLEN_FILENAMEDISPLAY : USINT := 30; - CSV_STRLEN_MINSPACING : USINT := 4; - CSV_STRLEN_TIMESTAMP : USINT := 16; - CSV_STRLEN_ERROR : USINT := 99; - CSV_STRLEN_VARNAME : USINT := 120; - CSV_STRLEN_VARVALUE : UINT := 500; - CSV_STRLEN_VARDESCRIPTION : USINT := 120; - CSV_STRLEN_FILELIST : USINT := CSV_STRLEN_FILENAMEDISPLAY + CSV_STRLEN_MINSPACING + CSV_STRLEN_TIMESTAMP; - CSV_STRLEN_INFOSTRING : USINT := 200; - CSV_STRLEN_HEADER : UINT := 44+320; -END_VAR -(*Default CFG values*) -VAR CONSTANT - CSV_DEFAULT_MAXFILESIZE : UDINT := 65536; - CSV_DEFAULT_MAXLINELENGTH : UDINT := 500; - CSV_DEFAULT_MAXLINESPERSCAN : UDINT := 500; - CSV_DEFAULT_LOGGERNAME : STRING[LOG_STRLEN_LOGGERNAME] := 'Files'; - CSV_DEFAULT_SIGFIGS : USINT := 16; -END_VAR -(*Data type limits*) -VAR CONSTANT - CSV_MIN_SINT : DINT := -128; - CSV_MAX_SINT : DINT := 127; - CSV_MIN_INT : DINT := -32768; - CSV_MAX_INT : DINT := 32767; - CSV_MIN_DINT : DINT := -2147483647; - CSV_MAX_DINT : DINT := 2147483647; - CSV_MIN_USINT : DINT := 0; - CSV_MAX_USINT : DINT := 255; - CSV_MIN_UINT : DINT := 0; - CSV_MAX_UINT : DINT := 65535; - CSV_MIN_UDINT : UDINT := 0; - CSV_MAX_UDINT : UDINT := 4294967295; - CSV_MIN_REAL : REAL := -3.4E038; - CSV_MAX_REAL : REAL := 3.4E038; - CSV_MIN_LREAL : LREAL := -1.7976931348623158E308; - CSV_MAX_LREAL : LREAL := 1.7976931348623158E308; -END_VAR diff --git a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/CSVFileLib_enum.typ b/example/AsProject/Logical/Libraries/Loupe/csvfilelib/CSVFileLib_enum.typ deleted file mode 100644 index a75e65e..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/CSVFileLib_enum.typ +++ /dev/null @@ -1,115 +0,0 @@ -(* -* File: CSVFileLib_enum.typ -* Copyright (c) 2023 Loupe -* https://loupe.team -* -* This file is part of CSVFileLib, licensed under the MIT License. -* -*) - -TYPE - CSV_ERR_enum : - ( - CSV_ERR_PVITEM_ENUM := 14713, - CSV_ERR_INVALIDINPUT := 50000, - CSV_ERR_MEMCFG, - CSV_ERR_MEMALLOC, - CSV_ERR_NOTINITIALIZED, - CSV_ERR_LINEFAILURE, - CSV_ERR_BUFFERFULL, - CSV_ERR_LOGNOTAVAILABLE, - CSV_ERR_LOGFULL, - CSV_ERR_INVALIDOPERATION, - CSV_ERR_COMMENT, - CSV_ERR_NOVARNAMEFOUND, - CSV_ERR_NOVALUEFOUND, - CSV_ERR_INVALIDVALUE, - CSV_ERR_UNSUPPORTEDTYPE, - CSV_ERR_INVALIDTYPE, - CSV_ERR_MAXLEVELREACHED, - CSV_ERR_PREFIXNOTSTRUCTURE, - CSV_ERR_EMPTYFILENAME, - CSV_ERR_BUSY := 65535 - ); - CSV_TYPE_enum : - ( - CSV_TYPE_STRUCT := 0, (*0*) - CSV_TYPE_BOOL, - CSV_TYPE_SINT, - CSV_TYPE_INT, - CSV_TYPE_DINT, - CSV_TYPE_USINT, (*5*) - CSV_TYPE_UINT, - CSV_TYPE_UDINT, - CSV_TYPE_REAL, - CSV_TYPE_STRING, - CSV_TYPE_ULINT, (*10*) - CSV_TYPE_DATE_AND_TIME, - CSV_TYPE_TIME, - CSV_TYPE_DATE, - CSV_TYPE_LREAL, - CSV_TYPE_ARRAY_OF_STRUCT, (*15*) - CSV_TYPE_TIME_OF_DAY, - CSV_TYPE_BYTE, - CSV_TYPE_WORD, - CSV_TYPE_DWORD, - CSV_TYPE_LWORD, (*20*) - CSV_TYPE_WSTRING, (*21*) - CSV_TYPE_LINT := 23 (*23*) - ); - CSV_INFO_enum : - ( - CSV_INFO_NOVARNAMEFOUND, (*0*) - CSV_INFO_NOVALUEFOUND, - CSV_INFO_ADDRESSNOTFOUND, - CSV_INFO_DATATYPENOTFOUND, - CSV_INFO_INVALIDVALUE, - CSV_INFO_UNSUPPORTEDTYPE, (*5*) - CSV_INFO_INVALIDTYPE, - CSV_INFO_INVALIDINPUT, - CSV_INFO_FILEFULL, - CSV_INFO_INFONOTFOUND, - CSV_INFO_MAXLEVELREACHED, (*10*) - CSV_INFO_ITEMNOTFOUND, - CSV_INFO_PREFIXNOTSTRUCTURE, - CSV_INFO_VERBOSE_VARNAME, - CSV_INFO_VERBOSE_VALUE, - CSV_INFO_VERBOSE_DESCRIPTION, (*15*) - CSV_INFO_VERBOSE_VARADDRESS, - CSV_INFO_VERBOSE_VARTYPE, - CSV_INFO_VERBOSE_VARLENGTH, - CSV_INFO_VERBOSE_VARDIMENSION, - CSV_INFO_VERBOSE_COMMENT, (*20*) - CSV_INFO_DONE (*21*) - ); - CSV_FILELIST_ST_enum : - ( - CSV_FILELIST_ST_IDLE, - CSV_FILELIST_ST_DIRINFO, - CSV_FILELIST_ST_DIRREAD, - CSV_FILELIST_ST_ - ); - CSV_ST_enum : - ( - CSV_ST_IDLE := 0, (*0*) - CSV_ST_GET_TEMPLATE, - CSV_ST_EXPANDVARS, - CSV_ST_OPEN, - CSV_ST_PROCESS, - CSV_ST_DELETELOG, - CSV_ST_SAVELOG, (*4*) - CSV_ST_DELETETEMP := 100, (*100*) - CSV_ST_SAVETEMP, - CSV_ST_DELETEORIGINAL, - CSV_ST_RENAMETEMP, (*103*) - CSV_ST_DELETEFILE := 200, (*200*) - CSV_ST_ERROR := 999 (*999*) - ); - CSV_OP_enum : - ( - CSV_OP_INVALID := 0, - CSV_OP_OPEN, - CSV_OP_SAVE, - CSV_OP_DELETE - ); -END_TYPE diff --git a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/CSVFileMgr.typ b/example/AsProject/Logical/Libraries/Loupe/csvfilelib/CSVFileMgr.typ deleted file mode 100644 index a549e93..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/CSVFileMgr.typ +++ /dev/null @@ -1,110 +0,0 @@ -(* -* File: CSVFileMgr.typ -* Copyright (c) 2023 Loupe -* https://loupe.team -* -* This file is part of CSVFileLib, licensed under the MIT License. -* -*) - -TYPE - CSVFileVariable_typ : STRUCT - Name : STRING[CSV_STRLEN_VARNAME]; - Value : STRING[CSV_STRLEN_VARVALUE]; - Description : STRING[CSV_STRLEN_VARDESCRIPTION]; - Address : UDINT; - DataType : UDINT; - Length : UDINT; - Dimension : UINT; - END_STRUCT; - CSVFileMgr_StructLevel_typ : STRUCT - Name : STRING[CSV_STRLEN_VARNAME]; - DataType : UDINT; - Length : UDINT; - Dimension : UINT; - iItem : UINT; - END_STRUCT; - CSVFileMgr_StructData_typ : STRUCT - iLevel : INT; - Level : ARRAY[0..CSV_MAI_LEVEL]OF CSVFileMgr_StructLevel_typ; - END_STRUCT; - CSVFileMgr_Int_Buffer_typ : STRUCT - pData : UDINT; - CurrentLength : UDINT; - MaxLength : UDINT; - END_STRUCT; - CSVFileMgr_Internal_typ : STRUCT - Initialized : BOOL; - CurrOperation : DINT; - ProcessStatus : UINT; - ExpandStatus : UINT; - ExpandError : BOOL; - ReadBuffer : CSVFileMgr_Int_Buffer_typ; - WriteBuffer : CSVFileMgr_Int_Buffer_typ; - LogBuffer : CSVFileMgr_Int_Buffer_typ; - pLine : UDINT; - LineNumber : UDINT; - pToken : UDINT; - pString : UDINT; - pReentry : UDINT; - SuccessfulLineCount : UDINT; - FailedLineCount : UDINT; - ScanCount : UDINT; - StructureData : CSVFileMgr_StructData_typ; - iVar : USINT; - FileRename : FileRename; - FIOWrap : FIOWrap_typ; - CMD : CSVFileMgr_IN_CMD_typ; - TempFileName : STRING[CSV_STRLEN_TEMPFILENAME]; - TemplateVariable : CSVFileVariable_typ; - pUserVariable : UDINT; - StartState : DINT; - END_STRUCT; - CSVFileMgr_OUT_STAT_typ : STRUCT - Busy : BOOL; - Done : BOOL; - Error : BOOL; - ErrorID : UINT; - ErrorString : STRING[CSV_STRLEN_ERROR]; - ErrorLevel : USINT; - ErrorState : DINT; - State : DINT; - END_STRUCT; - CSVFileMgr_OUT_typ : STRUCT - STAT : CSVFileMgr_OUT_STAT_typ; - END_STRUCT; - CSVFileMgr_IN_CFG_typ : STRUCT - MaxFileSize : UDINT; - MaxLineLength : UDINT; - MaxLinesPerScan : UDINT; - VerboseLog : BOOL; - LogFileName : STRING[CSV_STRLEN_FILENAME]; - DisableLogging : BOOL; - LoggerName : STRING[LOG_STRLEN_LOGGERNAME]; - DoubleSigFigs : USINT; - END_STRUCT; - CSVFileMgr_IN_PAR_typ : STRUCT - FileDevice : STRING[CSV_STRLEN_FILEDEVICE]; - FileName : STRING[CSV_STRLEN_FILENAME]; - VariableList : ARRAY[0..CSV_MAI_VARLIST]OF STRING[CSV_STRLEN_VARNAME]; - Prefix : STRING[CSV_STRLEN_VARNAME]; - pUserVariable : UDINT; - END_STRUCT; - CSVFileMgr_IN_CMD_typ : STRUCT - OpenFile : BOOL; - UpdateFile : BOOL; - SaveVariableListToFile : BOOL; - DeleteFile : BOOL; - AcknowledgeError : BOOL; - END_STRUCT; - CSVFileMgr_IN_typ : STRUCT - CMD : CSVFileMgr_IN_CMD_typ; - PAR : CSVFileMgr_IN_PAR_typ; - CFG : CSVFileMgr_IN_CFG_typ; - END_STRUCT; - CSVFileMgr_typ : STRUCT - IN : CSVFileMgr_IN_typ; - OUT : CSVFileMgr_OUT_typ; - Internal : CSVFileMgr_Internal_typ; - END_STRUCT; -END_TYPE diff --git a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/CSVFileMgr_HMI.typ b/example/AsProject/Logical/Libraries/Loupe/csvfilelib/CSVFileMgr_HMI.typ deleted file mode 100644 index 3bd3554..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/CSVFileMgr_HMI.typ +++ /dev/null @@ -1,61 +0,0 @@ -(* -* File: CSVFileMgr_HMI.typ -* Copyright (c) 2023 Loupe -* https://loupe.team -* -* This file is part of CSVFileLib, licensed under the MIT License. -* -*) - -TYPE - CSVFileMgr_HMI_Internal_typ : STRUCT - ProgressTimer : TON_10ms; - HMI_CMD_Active : BOOL; - HMI_CMD_Active_Old : BOOL; - END_STRUCT; - CSVFileMgr_HMI_TextSnippets_typ : STRUCT - FileName : STRING[CSV_STRLEN_FILENAME]; - PopupHeader : STRING[CSV_STRLEN_FILENAME]; - Action : STRING[CSV_STRLEN_FILENAME]; - ProgressLabel : STRING[CSV_STRLEN_FILENAME]; - ErrorID : UINT; - ErrorString : STRING[CSV_STRLEN_ERROR]; - END_STRUCT; - CSVFileMgr_HMI_ErrorStatus_typ : STRUCT - StatusDP : UINT; - AcknowledgeError : HMI_Button_typ; - END_STRUCT; - CSVFileMgr_HMI_Progress_typ : STRUCT - StatusDP : UINT; - Progress : UDINT; - END_STRUCT; - CSVFileMgr_HMI_DeleteConfirm_typ : STRUCT - StatusDP : UINT; - Yes : HMI_Button_typ; - No : HMI_Button_typ; - END_STRUCT; - CSVFileMgr_HMI_DialogBox_typ : STRUCT - StatusDP : UINT; - FileNameList : ARRAY[0..CSV_MAI_FILELIST]OF STRING[LIST_BOX_STRING_SIZE]; - FileBrowser : HMIFileBrowse; - PageUp : HMI_Button_typ; - PageDown : HMI_Button_typ; - Action : HMI_Button_typ; - Cancel : HMI_Button_typ; - END_STRUCT; - CSVFileMgr_HMI_Main_typ : STRUCT - OpenFile : HMI_Button_typ; - UpdateFile : HMI_Button_typ; - SaveVariableListToFile : HMI_Button_typ; - DeleteFile : HMI_Button_typ; - END_STRUCT; - CSVFileMgr_HMI_typ : STRUCT - Main : CSVFileMgr_HMI_Main_typ; - DialogBox : CSVFileMgr_HMI_DialogBox_typ; - DeleteConfirm : CSVFileMgr_HMI_DeleteConfirm_typ; - Progress : CSVFileMgr_HMI_Progress_typ; - ErrorStatus : CSVFileMgr_HMI_ErrorStatus_typ; - TextSnippets : CSVFileMgr_HMI_TextSnippets_typ; - Internal : CSVFileMgr_HMI_Internal_typ; - END_STRUCT; -END_TYPE diff --git a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/SG4/Arm/csvfilelib.br b/example/AsProject/Logical/Libraries/Loupe/csvfilelib/SG4/Arm/csvfilelib.br deleted file mode 100644 index 15516aa..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/SG4/Arm/csvfilelib.br and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/SG4/Arm/csvfilelib.h b/example/AsProject/Logical/Libraries/Loupe/csvfilelib/SG4/Arm/csvfilelib.h deleted file mode 100644 index 0e74fec..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/SG4/Arm/csvfilelib.h +++ /dev/null @@ -1,453 +0,0 @@ -/* Automation Studio generated header file */ -/* Do not edit ! */ -/* csvfilelib 1.02.2 */ - -#ifndef _CSVFILELIB_ -#define _CSVFILELIB_ -#ifdef __cplusplus -extern "C" -{ -#endif -#ifndef _csvfilelib_VERSION -#define _csvfilelib_VERSION 1.02.2 -#endif - -#include - -#ifndef _BUR_PUBLIC -#define _BUR_PUBLIC -#endif -#ifdef _SG3 - #include "AsBrStr.h" - #include "astime.h" - #include "FileIO.h" - #include "runtime.h" - #include "standard.h" - #include "sys_lib.h" - #include "fiowrap.h" - #include "stringext.h" - #include "hmitools.h" - #include "logthat.h" -#endif -#ifdef _SG4 - #include "AsBrStr.h" - #include "astime.h" - #include "FileIO.h" - #include "runtime.h" - #include "standard.h" - #include "sys_lib.h" - #include "fiowrap.h" - #include "stringext.h" - #include "hmitools.h" - #include "logthat.h" -#endif -#ifdef _SGC - #include "AsBrStr.h" - #include "astime.h" - #include "FileIO.h" - #include "runtime.h" - #include "standard.h" - #include "sys_lib.h" - #include "fiowrap.h" - #include "stringext.h" - #include "hmitools.h" - #include "logthat.h" -#endif - - -/* Constants */ -#ifdef _REPLACE_CONST - #define CSV_MAX_LREAL 1.79769313486232e+308 - #define CSV_MIN_LREAL (-1.79769313486232e+308) - #define CSV_MAX_REAL 3.4e+38f - #define CSV_MIN_REAL (-3.4e+38f) - #define CSV_MAX_UDINT 4294967295U - #define CSV_MIN_UDINT 0U - #define CSV_MAX_UINT 65535 - #define CSV_MIN_UINT 0 - #define CSV_MAX_USINT 255 - #define CSV_MIN_USINT 0 - #define CSV_MAX_DINT 2147483647 - #define CSV_MIN_DINT (-2147483647) - #define CSV_MAX_INT 32767 - #define CSV_MIN_INT (-32768) - #define CSV_MAX_SINT 127 - #define CSV_MIN_SINT (-128) - #define CSV_DEFAULT_SIGFIGS 16U - #define CSV_DEFAULT_LOGGERNAME "Files" - #define CSV_DEFAULT_MAXLINESPERSCAN 500U - #define CSV_DEFAULT_MAXLINELENGTH 500U - #define CSV_DEFAULT_MAXFILESIZE 65536U - #define CSV_STRLEN_HEADER 364U - #define CSV_STRLEN_INFOSTRING 200U - #define CSV_STRLEN_FILELIST 50U - #define CSV_STRLEN_VARDESCRIPTION 120U - #define CSV_STRLEN_VARVALUE 500U - #define CSV_STRLEN_VARNAME 120U - #define CSV_STRLEN_ERROR 99U - #define CSV_STRLEN_TIMESTAMP 16U - #define CSV_STRLEN_MINSPACING 4U - #define CSV_STRLEN_FILENAMEDISPLAY 30U - #define CSV_STRLEN_FILEDEVICE 260U - #define CSV_STRLEN_TEMPFILENAME 263U - #define CSV_STRLEN_FILENAME 260U - #define CSV_MAI_FILELIST 299U - #define CSV_MAI_VARLIST 99U - #define CSV_MAI_LEVEL 29U - #define CSV_PADDINGCHARS " \t\r\n\f\"" -#else - _GLOBAL_CONST double CSV_MAX_LREAL; - _GLOBAL_CONST double CSV_MIN_LREAL; - _GLOBAL_CONST float CSV_MAX_REAL; - _GLOBAL_CONST float CSV_MIN_REAL; - _GLOBAL_CONST unsigned long CSV_MAX_UDINT; - _GLOBAL_CONST unsigned long CSV_MIN_UDINT; - _GLOBAL_CONST signed long CSV_MAX_UINT; - _GLOBAL_CONST signed long CSV_MIN_UINT; - _GLOBAL_CONST signed long CSV_MAX_USINT; - _GLOBAL_CONST signed long CSV_MIN_USINT; - _GLOBAL_CONST signed long CSV_MAX_DINT; - _GLOBAL_CONST signed long CSV_MIN_DINT; - _GLOBAL_CONST signed long CSV_MAX_INT; - _GLOBAL_CONST signed long CSV_MIN_INT; - _GLOBAL_CONST signed long CSV_MAX_SINT; - _GLOBAL_CONST signed long CSV_MIN_SINT; - _GLOBAL_CONST unsigned char CSV_DEFAULT_SIGFIGS; - _GLOBAL_CONST plcstring CSV_DEFAULT_LOGGERNAME[9]; - _GLOBAL_CONST unsigned long CSV_DEFAULT_MAXLINESPERSCAN; - _GLOBAL_CONST unsigned long CSV_DEFAULT_MAXLINELENGTH; - _GLOBAL_CONST unsigned long CSV_DEFAULT_MAXFILESIZE; - _GLOBAL_CONST unsigned short CSV_STRLEN_HEADER; - _GLOBAL_CONST unsigned char CSV_STRLEN_INFOSTRING; - _GLOBAL_CONST unsigned char CSV_STRLEN_FILELIST; - _GLOBAL_CONST unsigned char CSV_STRLEN_VARDESCRIPTION; - _GLOBAL_CONST unsigned short CSV_STRLEN_VARVALUE; - _GLOBAL_CONST unsigned char CSV_STRLEN_VARNAME; - _GLOBAL_CONST unsigned char CSV_STRLEN_ERROR; - _GLOBAL_CONST unsigned char CSV_STRLEN_TIMESTAMP; - _GLOBAL_CONST unsigned char CSV_STRLEN_MINSPACING; - _GLOBAL_CONST unsigned char CSV_STRLEN_FILENAMEDISPLAY; - _GLOBAL_CONST unsigned short CSV_STRLEN_FILEDEVICE; - _GLOBAL_CONST unsigned short CSV_STRLEN_TEMPFILENAME; - _GLOBAL_CONST unsigned short CSV_STRLEN_FILENAME; - _GLOBAL_CONST unsigned short CSV_MAI_FILELIST; - _GLOBAL_CONST unsigned char CSV_MAI_VARLIST; - _GLOBAL_CONST unsigned char CSV_MAI_LEVEL; - _GLOBAL_CONST plcstring CSV_PADDINGCHARS[7]; -#endif - - - - -/* Datatypes and datatypes of function blocks */ -typedef enum CSV_ERR_enum -{ CSV_ERR_PVITEM_ENUM = 14713, - CSV_ERR_INVALIDINPUT = 50000, - CSV_ERR_MEMCFG, - CSV_ERR_MEMALLOC, - CSV_ERR_NOTINITIALIZED, - CSV_ERR_LINEFAILURE, - CSV_ERR_BUFFERFULL, - CSV_ERR_LOGNOTAVAILABLE, - CSV_ERR_LOGFULL, - CSV_ERR_INVALIDOPERATION, - CSV_ERR_COMMENT, - CSV_ERR_NOVARNAMEFOUND, - CSV_ERR_NOVALUEFOUND, - CSV_ERR_INVALIDVALUE, - CSV_ERR_UNSUPPORTEDTYPE, - CSV_ERR_INVALIDTYPE, - CSV_ERR_MAXLEVELREACHED, - CSV_ERR_PREFIXNOTSTRUCTURE, - CSV_ERR_EMPTYFILENAME, - CSV_ERR_BUSY = 65535 -} CSV_ERR_enum; - -typedef enum CSV_TYPE_enum -{ CSV_TYPE_STRUCT = 0, - CSV_TYPE_BOOL, - CSV_TYPE_SINT, - CSV_TYPE_INT, - CSV_TYPE_DINT, - CSV_TYPE_USINT, - CSV_TYPE_UINT, - CSV_TYPE_UDINT, - CSV_TYPE_REAL, - CSV_TYPE_STRING, - CSV_TYPE_ULINT, - CSV_TYPE_DATE_AND_TIME, - CSV_TYPE_TIME, - CSV_TYPE_DATE, - CSV_TYPE_LREAL, - CSV_TYPE_ARRAY_OF_STRUCT, - CSV_TYPE_TIME_OF_DAY, - CSV_TYPE_BYTE, - CSV_TYPE_WORD, - CSV_TYPE_DWORD, - CSV_TYPE_LWORD, - CSV_TYPE_WSTRING, - CSV_TYPE_LINT = 23 -} CSV_TYPE_enum; - -typedef enum CSV_INFO_enum -{ CSV_INFO_NOVARNAMEFOUND, - CSV_INFO_NOVALUEFOUND, - CSV_INFO_ADDRESSNOTFOUND, - CSV_INFO_DATATYPENOTFOUND, - CSV_INFO_INVALIDVALUE, - CSV_INFO_UNSUPPORTEDTYPE, - CSV_INFO_INVALIDTYPE, - CSV_INFO_INVALIDINPUT, - CSV_INFO_FILEFULL, - CSV_INFO_INFONOTFOUND, - CSV_INFO_MAXLEVELREACHED, - CSV_INFO_ITEMNOTFOUND, - CSV_INFO_PREFIXNOTSTRUCTURE, - CSV_INFO_VERBOSE_VARNAME, - CSV_INFO_VERBOSE_VALUE, - CSV_INFO_VERBOSE_DESCRIPTION, - CSV_INFO_VERBOSE_VARADDRESS, - CSV_INFO_VERBOSE_VARTYPE, - CSV_INFO_VERBOSE_VARLENGTH, - CSV_INFO_VERBOSE_VARDIMENSION, - CSV_INFO_VERBOSE_COMMENT, - CSV_INFO_DONE -} CSV_INFO_enum; - -typedef enum CSV_FILELIST_ST_enum -{ CSV_FILELIST_ST_IDLE, - CSV_FILELIST_ST_DIRINFO, - CSV_FILELIST_ST_DIRREAD, - CSV_FILELIST_ST_ -} CSV_FILELIST_ST_enum; - -typedef enum CSV_ST_enum -{ CSV_ST_IDLE = 0, - CSV_ST_GET_TEMPLATE, - CSV_ST_EXPANDVARS, - CSV_ST_OPEN, - CSV_ST_PROCESS, - CSV_ST_DELETELOG, - CSV_ST_SAVELOG, - CSV_ST_DELETETEMP = 100, - CSV_ST_SAVETEMP, - CSV_ST_DELETEORIGINAL, - CSV_ST_RENAMETEMP, - CSV_ST_DELETEFILE = 200, - CSV_ST_ERROR = 999 -} CSV_ST_enum; - -typedef enum CSV_OP_enum -{ CSV_OP_INVALID = 0, - CSV_OP_OPEN, - CSV_OP_SAVE, - CSV_OP_DELETE -} CSV_OP_enum; - -typedef struct CSVFileVariable_typ -{ plcstring Name[121]; - plcstring Value[501]; - plcstring Description[121]; - unsigned long Address; - unsigned long DataType; - unsigned long Length; - unsigned short Dimension; -} CSVFileVariable_typ; - -typedef struct CSVFileMgr_StructLevel_typ -{ plcstring Name[121]; - unsigned long DataType; - unsigned long Length; - unsigned short Dimension; - unsigned short iItem; -} CSVFileMgr_StructLevel_typ; - -typedef struct CSVFileMgr_StructData_typ -{ signed short iLevel; - struct CSVFileMgr_StructLevel_typ Level[30]; -} CSVFileMgr_StructData_typ; - -typedef struct CSVFileMgr_Int_Buffer_typ -{ unsigned long pData; - unsigned long CurrentLength; - unsigned long MaxLength; -} CSVFileMgr_Int_Buffer_typ; - -typedef struct CSVFileMgr_IN_CMD_typ -{ plcbit OpenFile; - plcbit UpdateFile; - plcbit SaveVariableListToFile; - plcbit DeleteFile; - plcbit AcknowledgeError; -} CSVFileMgr_IN_CMD_typ; - -typedef struct CSVFileMgr_Internal_typ -{ plcbit Initialized; - signed long CurrOperation; - unsigned short ProcessStatus; - unsigned short ExpandStatus; - plcbit ExpandError; - struct CSVFileMgr_Int_Buffer_typ ReadBuffer; - struct CSVFileMgr_Int_Buffer_typ WriteBuffer; - struct CSVFileMgr_Int_Buffer_typ LogBuffer; - unsigned long pLine; - unsigned long LineNumber; - unsigned long pToken; - unsigned long pString; - unsigned long pReentry; - unsigned long SuccessfulLineCount; - unsigned long FailedLineCount; - unsigned long ScanCount; - struct CSVFileMgr_StructData_typ StructureData; - unsigned char iVar; - struct FileRename FileRename; - struct FIOWrap_typ FIOWrap; - struct CSVFileMgr_IN_CMD_typ CMD; - plcstring TempFileName[264]; - struct CSVFileVariable_typ TemplateVariable; - unsigned long pUserVariable; - signed long StartState; -} CSVFileMgr_Internal_typ; - -typedef struct CSVFileMgr_OUT_STAT_typ -{ plcbit Busy; - plcbit Done; - plcbit Error; - unsigned short ErrorID; - plcstring ErrorString[100]; - unsigned char ErrorLevel; - signed long ErrorState; - signed long State; -} CSVFileMgr_OUT_STAT_typ; - -typedef struct CSVFileMgr_OUT_typ -{ struct CSVFileMgr_OUT_STAT_typ STAT; -} CSVFileMgr_OUT_typ; - -typedef struct CSVFileMgr_IN_CFG_typ -{ unsigned long MaxFileSize; - unsigned long MaxLineLength; - unsigned long MaxLinesPerScan; - plcbit VerboseLog; - plcstring LogFileName[261]; - plcbit DisableLogging; - plcstring LoggerName[9]; - unsigned char DoubleSigFigs; -} CSVFileMgr_IN_CFG_typ; - -typedef struct CSVFileMgr_IN_PAR_typ -{ plcstring FileDevice[261]; - plcstring FileName[261]; - plcstring VariableList[100][121]; - plcstring Prefix[121]; - unsigned long pUserVariable; -} CSVFileMgr_IN_PAR_typ; - -typedef struct CSVFileMgr_IN_typ -{ struct CSVFileMgr_IN_CMD_typ CMD; - struct CSVFileMgr_IN_PAR_typ PAR; - struct CSVFileMgr_IN_CFG_typ CFG; -} CSVFileMgr_IN_typ; - -typedef struct CSVFileMgr_typ -{ struct CSVFileMgr_IN_typ IN; - struct CSVFileMgr_OUT_typ OUT; - struct CSVFileMgr_Internal_typ Internal; -} CSVFileMgr_typ; - -typedef struct CSVFileMgr_HMI_Internal_typ -{ struct TON_10ms ProgressTimer; - plcbit HMI_CMD_Active; - plcbit HMI_CMD_Active_Old; -} CSVFileMgr_HMI_Internal_typ; - -typedef struct CSVFileMgr_HMI_TextSnippets_typ -{ plcstring FileName[261]; - plcstring PopupHeader[261]; - plcstring Action[261]; - plcstring ProgressLabel[261]; - unsigned short ErrorID; - plcstring ErrorString[100]; -} CSVFileMgr_HMI_TextSnippets_typ; - -typedef struct CSVFileMgr_HMI_ErrorStatus_typ -{ unsigned short StatusDP; - struct HMI_Button_typ AcknowledgeError; -} CSVFileMgr_HMI_ErrorStatus_typ; - -typedef struct CSVFileMgr_HMI_Progress_typ -{ unsigned short StatusDP; - unsigned long Progress; -} CSVFileMgr_HMI_Progress_typ; - -typedef struct CSVFileMgr_HMI_DeleteConfirm_typ -{ unsigned short StatusDP; - struct HMI_Button_typ Yes; - struct HMI_Button_typ No; -} CSVFileMgr_HMI_DeleteConfirm_typ; - -typedef struct CSVFileMgr_HMI_DialogBox_typ -{ unsigned short StatusDP; - plcstring FileNameList[300][261]; - struct HMIFileBrowse FileBrowser; - struct HMI_Button_typ PageUp; - struct HMI_Button_typ PageDown; - struct HMI_Button_typ Action; - struct HMI_Button_typ Cancel; -} CSVFileMgr_HMI_DialogBox_typ; - -typedef struct CSVFileMgr_HMI_Main_typ -{ struct HMI_Button_typ OpenFile; - struct HMI_Button_typ UpdateFile; - struct HMI_Button_typ SaveVariableListToFile; - struct HMI_Button_typ DeleteFile; -} CSVFileMgr_HMI_Main_typ; - -typedef struct CSVFileMgr_HMI_typ -{ struct CSVFileMgr_HMI_Main_typ Main; - struct CSVFileMgr_HMI_DialogBox_typ DialogBox; - struct CSVFileMgr_HMI_DeleteConfirm_typ DeleteConfirm; - struct CSVFileMgr_HMI_Progress_typ Progress; - struct CSVFileMgr_HMI_ErrorStatus_typ ErrorStatus; - struct CSVFileMgr_HMI_TextSnippets_typ TextSnippets; - struct CSVFileMgr_HMI_Internal_typ Internal; -} CSVFileMgr_HMI_typ; - - - -/* Prototyping of functions and function blocks */ -_BUR_PUBLIC unsigned short CSVFn_Init(struct CSVFileMgr_typ* t); -_BUR_PUBLIC unsigned short CSVOpenFile_Init(struct CSVFileMgr_typ* t); -_BUR_PUBLIC unsigned short CSVFn_Cyclic(struct CSVFileMgr_typ* t); -_BUR_PUBLIC unsigned short csvInitBuffer(unsigned long BufferLength, struct CSVFileMgr_Int_Buffer_typ* pBuffer); -_BUR_PUBLIC unsigned short csvClearBuffer(struct CSVFileMgr_Int_Buffer_typ* pBuffer); -_BUR_PUBLIC unsigned short csvAddToBuffer(unsigned long pData, unsigned long DataLength, struct CSVFileMgr_Int_Buffer_typ* pBuffer); -_BUR_PUBLIC unsigned short csvSetError(unsigned short ErrorID, struct CSVFileMgr_typ* t); -_BUR_PUBLIC unsigned short csvExpandVar(unsigned long pVarName, struct CSVFileMgr_Int_Buffer_typ* pBuffer, struct CSVFileMgr_StructData_typ* pStructData, struct CSVFileMgr_typ* t); -_BUR_PUBLIC unsigned short csvProcessData(struct CSVFileMgr_typ* t); -_BUR_PUBLIC unsigned short csvAddLogInfo(unsigned short InfoID, unsigned long LineNumber, unsigned long pAddInfo, struct CSVFileMgr_typ* t); -_BUR_PUBLIC unsigned short csvParseLine(unsigned long pLine, unsigned long LineNumber, struct CSVFileVariable_typ* pVariable, struct CSVFileMgr_typ* t); -_BUR_PUBLIC unsigned short csvGetVarInfo(unsigned long LineNumber, struct CSVFileVariable_typ* pVariable, struct CSVFileMgr_typ* t); -_BUR_PUBLIC unsigned short csvOpenVar(unsigned long LineNumber, struct CSVFileVariable_typ* pVariable, struct CSVFileMgr_typ* t); -_BUR_PUBLIC unsigned short csvSaveVar(unsigned long LineNumber, struct CSVFileVariable_typ* pVariable, struct CSVFileMgr_typ* t); -_BUR_PUBLIC unsigned short csvWriteHeader(struct CSVFileMgr_typ* t); -_BUR_PUBLIC unsigned short csvRemovePrefix(unsigned long MaxLength, plcstring* String, plcstring* Prefix); -_BUR_PUBLIC unsigned short csvAddPrefix(unsigned long MaxLength, plcstring* String, plcstring* Prefix); -_BUR_PUBLIC unsigned short CSVFn_HMI_Cyclic(struct CSVFileMgr_HMI_typ* HMI, struct CSVFileMgr_typ* t); -_BUR_PUBLIC unsigned short csvhmiGenerateFileListString(unsigned long pFileListString, struct fiDIR_READ_DATA* pDirReadData); -_BUR_PUBLIC unsigned long csvDTOA(double value, unsigned long pString, unsigned char numSigFigs); - - -__asm__(".section \".plc\""); - -/* Additional IEC dependencies */ -__asm__(".ascii \"iecdep \\\"Logical/Libraries/Loupe/logthat/Constants.var\\\" scope \\\"global\\\"\\n\""); -__asm__(".ascii \"iecdep \\\"Logical/Libraries/Loupe/hmitools/HMITools.var\\\" scope \\\"global\\\"\\n\""); - -__asm__(".previous"); - -#ifdef __cplusplus -}; -#endif -#endif /* _CSVFILELIB_ */ - diff --git a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/SG4/Arm/libcsvfilelib.a b/example/AsProject/Logical/Libraries/Loupe/csvfilelib/SG4/Arm/libcsvfilelib.a deleted file mode 100644 index aa50215..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/SG4/Arm/libcsvfilelib.a and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/SG4/csvfilelib.br b/example/AsProject/Logical/Libraries/Loupe/csvfilelib/SG4/csvfilelib.br deleted file mode 100644 index 575d6cc..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/SG4/csvfilelib.br and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/SG4/csvfilelib.h b/example/AsProject/Logical/Libraries/Loupe/csvfilelib/SG4/csvfilelib.h deleted file mode 100644 index 0e74fec..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/SG4/csvfilelib.h +++ /dev/null @@ -1,453 +0,0 @@ -/* Automation Studio generated header file */ -/* Do not edit ! */ -/* csvfilelib 1.02.2 */ - -#ifndef _CSVFILELIB_ -#define _CSVFILELIB_ -#ifdef __cplusplus -extern "C" -{ -#endif -#ifndef _csvfilelib_VERSION -#define _csvfilelib_VERSION 1.02.2 -#endif - -#include - -#ifndef _BUR_PUBLIC -#define _BUR_PUBLIC -#endif -#ifdef _SG3 - #include "AsBrStr.h" - #include "astime.h" - #include "FileIO.h" - #include "runtime.h" - #include "standard.h" - #include "sys_lib.h" - #include "fiowrap.h" - #include "stringext.h" - #include "hmitools.h" - #include "logthat.h" -#endif -#ifdef _SG4 - #include "AsBrStr.h" - #include "astime.h" - #include "FileIO.h" - #include "runtime.h" - #include "standard.h" - #include "sys_lib.h" - #include "fiowrap.h" - #include "stringext.h" - #include "hmitools.h" - #include "logthat.h" -#endif -#ifdef _SGC - #include "AsBrStr.h" - #include "astime.h" - #include "FileIO.h" - #include "runtime.h" - #include "standard.h" - #include "sys_lib.h" - #include "fiowrap.h" - #include "stringext.h" - #include "hmitools.h" - #include "logthat.h" -#endif - - -/* Constants */ -#ifdef _REPLACE_CONST - #define CSV_MAX_LREAL 1.79769313486232e+308 - #define CSV_MIN_LREAL (-1.79769313486232e+308) - #define CSV_MAX_REAL 3.4e+38f - #define CSV_MIN_REAL (-3.4e+38f) - #define CSV_MAX_UDINT 4294967295U - #define CSV_MIN_UDINT 0U - #define CSV_MAX_UINT 65535 - #define CSV_MIN_UINT 0 - #define CSV_MAX_USINT 255 - #define CSV_MIN_USINT 0 - #define CSV_MAX_DINT 2147483647 - #define CSV_MIN_DINT (-2147483647) - #define CSV_MAX_INT 32767 - #define CSV_MIN_INT (-32768) - #define CSV_MAX_SINT 127 - #define CSV_MIN_SINT (-128) - #define CSV_DEFAULT_SIGFIGS 16U - #define CSV_DEFAULT_LOGGERNAME "Files" - #define CSV_DEFAULT_MAXLINESPERSCAN 500U - #define CSV_DEFAULT_MAXLINELENGTH 500U - #define CSV_DEFAULT_MAXFILESIZE 65536U - #define CSV_STRLEN_HEADER 364U - #define CSV_STRLEN_INFOSTRING 200U - #define CSV_STRLEN_FILELIST 50U - #define CSV_STRLEN_VARDESCRIPTION 120U - #define CSV_STRLEN_VARVALUE 500U - #define CSV_STRLEN_VARNAME 120U - #define CSV_STRLEN_ERROR 99U - #define CSV_STRLEN_TIMESTAMP 16U - #define CSV_STRLEN_MINSPACING 4U - #define CSV_STRLEN_FILENAMEDISPLAY 30U - #define CSV_STRLEN_FILEDEVICE 260U - #define CSV_STRLEN_TEMPFILENAME 263U - #define CSV_STRLEN_FILENAME 260U - #define CSV_MAI_FILELIST 299U - #define CSV_MAI_VARLIST 99U - #define CSV_MAI_LEVEL 29U - #define CSV_PADDINGCHARS " \t\r\n\f\"" -#else - _GLOBAL_CONST double CSV_MAX_LREAL; - _GLOBAL_CONST double CSV_MIN_LREAL; - _GLOBAL_CONST float CSV_MAX_REAL; - _GLOBAL_CONST float CSV_MIN_REAL; - _GLOBAL_CONST unsigned long CSV_MAX_UDINT; - _GLOBAL_CONST unsigned long CSV_MIN_UDINT; - _GLOBAL_CONST signed long CSV_MAX_UINT; - _GLOBAL_CONST signed long CSV_MIN_UINT; - _GLOBAL_CONST signed long CSV_MAX_USINT; - _GLOBAL_CONST signed long CSV_MIN_USINT; - _GLOBAL_CONST signed long CSV_MAX_DINT; - _GLOBAL_CONST signed long CSV_MIN_DINT; - _GLOBAL_CONST signed long CSV_MAX_INT; - _GLOBAL_CONST signed long CSV_MIN_INT; - _GLOBAL_CONST signed long CSV_MAX_SINT; - _GLOBAL_CONST signed long CSV_MIN_SINT; - _GLOBAL_CONST unsigned char CSV_DEFAULT_SIGFIGS; - _GLOBAL_CONST plcstring CSV_DEFAULT_LOGGERNAME[9]; - _GLOBAL_CONST unsigned long CSV_DEFAULT_MAXLINESPERSCAN; - _GLOBAL_CONST unsigned long CSV_DEFAULT_MAXLINELENGTH; - _GLOBAL_CONST unsigned long CSV_DEFAULT_MAXFILESIZE; - _GLOBAL_CONST unsigned short CSV_STRLEN_HEADER; - _GLOBAL_CONST unsigned char CSV_STRLEN_INFOSTRING; - _GLOBAL_CONST unsigned char CSV_STRLEN_FILELIST; - _GLOBAL_CONST unsigned char CSV_STRLEN_VARDESCRIPTION; - _GLOBAL_CONST unsigned short CSV_STRLEN_VARVALUE; - _GLOBAL_CONST unsigned char CSV_STRLEN_VARNAME; - _GLOBAL_CONST unsigned char CSV_STRLEN_ERROR; - _GLOBAL_CONST unsigned char CSV_STRLEN_TIMESTAMP; - _GLOBAL_CONST unsigned char CSV_STRLEN_MINSPACING; - _GLOBAL_CONST unsigned char CSV_STRLEN_FILENAMEDISPLAY; - _GLOBAL_CONST unsigned short CSV_STRLEN_FILEDEVICE; - _GLOBAL_CONST unsigned short CSV_STRLEN_TEMPFILENAME; - _GLOBAL_CONST unsigned short CSV_STRLEN_FILENAME; - _GLOBAL_CONST unsigned short CSV_MAI_FILELIST; - _GLOBAL_CONST unsigned char CSV_MAI_VARLIST; - _GLOBAL_CONST unsigned char CSV_MAI_LEVEL; - _GLOBAL_CONST plcstring CSV_PADDINGCHARS[7]; -#endif - - - - -/* Datatypes and datatypes of function blocks */ -typedef enum CSV_ERR_enum -{ CSV_ERR_PVITEM_ENUM = 14713, - CSV_ERR_INVALIDINPUT = 50000, - CSV_ERR_MEMCFG, - CSV_ERR_MEMALLOC, - CSV_ERR_NOTINITIALIZED, - CSV_ERR_LINEFAILURE, - CSV_ERR_BUFFERFULL, - CSV_ERR_LOGNOTAVAILABLE, - CSV_ERR_LOGFULL, - CSV_ERR_INVALIDOPERATION, - CSV_ERR_COMMENT, - CSV_ERR_NOVARNAMEFOUND, - CSV_ERR_NOVALUEFOUND, - CSV_ERR_INVALIDVALUE, - CSV_ERR_UNSUPPORTEDTYPE, - CSV_ERR_INVALIDTYPE, - CSV_ERR_MAXLEVELREACHED, - CSV_ERR_PREFIXNOTSTRUCTURE, - CSV_ERR_EMPTYFILENAME, - CSV_ERR_BUSY = 65535 -} CSV_ERR_enum; - -typedef enum CSV_TYPE_enum -{ CSV_TYPE_STRUCT = 0, - CSV_TYPE_BOOL, - CSV_TYPE_SINT, - CSV_TYPE_INT, - CSV_TYPE_DINT, - CSV_TYPE_USINT, - CSV_TYPE_UINT, - CSV_TYPE_UDINT, - CSV_TYPE_REAL, - CSV_TYPE_STRING, - CSV_TYPE_ULINT, - CSV_TYPE_DATE_AND_TIME, - CSV_TYPE_TIME, - CSV_TYPE_DATE, - CSV_TYPE_LREAL, - CSV_TYPE_ARRAY_OF_STRUCT, - CSV_TYPE_TIME_OF_DAY, - CSV_TYPE_BYTE, - CSV_TYPE_WORD, - CSV_TYPE_DWORD, - CSV_TYPE_LWORD, - CSV_TYPE_WSTRING, - CSV_TYPE_LINT = 23 -} CSV_TYPE_enum; - -typedef enum CSV_INFO_enum -{ CSV_INFO_NOVARNAMEFOUND, - CSV_INFO_NOVALUEFOUND, - CSV_INFO_ADDRESSNOTFOUND, - CSV_INFO_DATATYPENOTFOUND, - CSV_INFO_INVALIDVALUE, - CSV_INFO_UNSUPPORTEDTYPE, - CSV_INFO_INVALIDTYPE, - CSV_INFO_INVALIDINPUT, - CSV_INFO_FILEFULL, - CSV_INFO_INFONOTFOUND, - CSV_INFO_MAXLEVELREACHED, - CSV_INFO_ITEMNOTFOUND, - CSV_INFO_PREFIXNOTSTRUCTURE, - CSV_INFO_VERBOSE_VARNAME, - CSV_INFO_VERBOSE_VALUE, - CSV_INFO_VERBOSE_DESCRIPTION, - CSV_INFO_VERBOSE_VARADDRESS, - CSV_INFO_VERBOSE_VARTYPE, - CSV_INFO_VERBOSE_VARLENGTH, - CSV_INFO_VERBOSE_VARDIMENSION, - CSV_INFO_VERBOSE_COMMENT, - CSV_INFO_DONE -} CSV_INFO_enum; - -typedef enum CSV_FILELIST_ST_enum -{ CSV_FILELIST_ST_IDLE, - CSV_FILELIST_ST_DIRINFO, - CSV_FILELIST_ST_DIRREAD, - CSV_FILELIST_ST_ -} CSV_FILELIST_ST_enum; - -typedef enum CSV_ST_enum -{ CSV_ST_IDLE = 0, - CSV_ST_GET_TEMPLATE, - CSV_ST_EXPANDVARS, - CSV_ST_OPEN, - CSV_ST_PROCESS, - CSV_ST_DELETELOG, - CSV_ST_SAVELOG, - CSV_ST_DELETETEMP = 100, - CSV_ST_SAVETEMP, - CSV_ST_DELETEORIGINAL, - CSV_ST_RENAMETEMP, - CSV_ST_DELETEFILE = 200, - CSV_ST_ERROR = 999 -} CSV_ST_enum; - -typedef enum CSV_OP_enum -{ CSV_OP_INVALID = 0, - CSV_OP_OPEN, - CSV_OP_SAVE, - CSV_OP_DELETE -} CSV_OP_enum; - -typedef struct CSVFileVariable_typ -{ plcstring Name[121]; - plcstring Value[501]; - plcstring Description[121]; - unsigned long Address; - unsigned long DataType; - unsigned long Length; - unsigned short Dimension; -} CSVFileVariable_typ; - -typedef struct CSVFileMgr_StructLevel_typ -{ plcstring Name[121]; - unsigned long DataType; - unsigned long Length; - unsigned short Dimension; - unsigned short iItem; -} CSVFileMgr_StructLevel_typ; - -typedef struct CSVFileMgr_StructData_typ -{ signed short iLevel; - struct CSVFileMgr_StructLevel_typ Level[30]; -} CSVFileMgr_StructData_typ; - -typedef struct CSVFileMgr_Int_Buffer_typ -{ unsigned long pData; - unsigned long CurrentLength; - unsigned long MaxLength; -} CSVFileMgr_Int_Buffer_typ; - -typedef struct CSVFileMgr_IN_CMD_typ -{ plcbit OpenFile; - plcbit UpdateFile; - plcbit SaveVariableListToFile; - plcbit DeleteFile; - plcbit AcknowledgeError; -} CSVFileMgr_IN_CMD_typ; - -typedef struct CSVFileMgr_Internal_typ -{ plcbit Initialized; - signed long CurrOperation; - unsigned short ProcessStatus; - unsigned short ExpandStatus; - plcbit ExpandError; - struct CSVFileMgr_Int_Buffer_typ ReadBuffer; - struct CSVFileMgr_Int_Buffer_typ WriteBuffer; - struct CSVFileMgr_Int_Buffer_typ LogBuffer; - unsigned long pLine; - unsigned long LineNumber; - unsigned long pToken; - unsigned long pString; - unsigned long pReentry; - unsigned long SuccessfulLineCount; - unsigned long FailedLineCount; - unsigned long ScanCount; - struct CSVFileMgr_StructData_typ StructureData; - unsigned char iVar; - struct FileRename FileRename; - struct FIOWrap_typ FIOWrap; - struct CSVFileMgr_IN_CMD_typ CMD; - plcstring TempFileName[264]; - struct CSVFileVariable_typ TemplateVariable; - unsigned long pUserVariable; - signed long StartState; -} CSVFileMgr_Internal_typ; - -typedef struct CSVFileMgr_OUT_STAT_typ -{ plcbit Busy; - plcbit Done; - plcbit Error; - unsigned short ErrorID; - plcstring ErrorString[100]; - unsigned char ErrorLevel; - signed long ErrorState; - signed long State; -} CSVFileMgr_OUT_STAT_typ; - -typedef struct CSVFileMgr_OUT_typ -{ struct CSVFileMgr_OUT_STAT_typ STAT; -} CSVFileMgr_OUT_typ; - -typedef struct CSVFileMgr_IN_CFG_typ -{ unsigned long MaxFileSize; - unsigned long MaxLineLength; - unsigned long MaxLinesPerScan; - plcbit VerboseLog; - plcstring LogFileName[261]; - plcbit DisableLogging; - plcstring LoggerName[9]; - unsigned char DoubleSigFigs; -} CSVFileMgr_IN_CFG_typ; - -typedef struct CSVFileMgr_IN_PAR_typ -{ plcstring FileDevice[261]; - plcstring FileName[261]; - plcstring VariableList[100][121]; - plcstring Prefix[121]; - unsigned long pUserVariable; -} CSVFileMgr_IN_PAR_typ; - -typedef struct CSVFileMgr_IN_typ -{ struct CSVFileMgr_IN_CMD_typ CMD; - struct CSVFileMgr_IN_PAR_typ PAR; - struct CSVFileMgr_IN_CFG_typ CFG; -} CSVFileMgr_IN_typ; - -typedef struct CSVFileMgr_typ -{ struct CSVFileMgr_IN_typ IN; - struct CSVFileMgr_OUT_typ OUT; - struct CSVFileMgr_Internal_typ Internal; -} CSVFileMgr_typ; - -typedef struct CSVFileMgr_HMI_Internal_typ -{ struct TON_10ms ProgressTimer; - plcbit HMI_CMD_Active; - plcbit HMI_CMD_Active_Old; -} CSVFileMgr_HMI_Internal_typ; - -typedef struct CSVFileMgr_HMI_TextSnippets_typ -{ plcstring FileName[261]; - plcstring PopupHeader[261]; - plcstring Action[261]; - plcstring ProgressLabel[261]; - unsigned short ErrorID; - plcstring ErrorString[100]; -} CSVFileMgr_HMI_TextSnippets_typ; - -typedef struct CSVFileMgr_HMI_ErrorStatus_typ -{ unsigned short StatusDP; - struct HMI_Button_typ AcknowledgeError; -} CSVFileMgr_HMI_ErrorStatus_typ; - -typedef struct CSVFileMgr_HMI_Progress_typ -{ unsigned short StatusDP; - unsigned long Progress; -} CSVFileMgr_HMI_Progress_typ; - -typedef struct CSVFileMgr_HMI_DeleteConfirm_typ -{ unsigned short StatusDP; - struct HMI_Button_typ Yes; - struct HMI_Button_typ No; -} CSVFileMgr_HMI_DeleteConfirm_typ; - -typedef struct CSVFileMgr_HMI_DialogBox_typ -{ unsigned short StatusDP; - plcstring FileNameList[300][261]; - struct HMIFileBrowse FileBrowser; - struct HMI_Button_typ PageUp; - struct HMI_Button_typ PageDown; - struct HMI_Button_typ Action; - struct HMI_Button_typ Cancel; -} CSVFileMgr_HMI_DialogBox_typ; - -typedef struct CSVFileMgr_HMI_Main_typ -{ struct HMI_Button_typ OpenFile; - struct HMI_Button_typ UpdateFile; - struct HMI_Button_typ SaveVariableListToFile; - struct HMI_Button_typ DeleteFile; -} CSVFileMgr_HMI_Main_typ; - -typedef struct CSVFileMgr_HMI_typ -{ struct CSVFileMgr_HMI_Main_typ Main; - struct CSVFileMgr_HMI_DialogBox_typ DialogBox; - struct CSVFileMgr_HMI_DeleteConfirm_typ DeleteConfirm; - struct CSVFileMgr_HMI_Progress_typ Progress; - struct CSVFileMgr_HMI_ErrorStatus_typ ErrorStatus; - struct CSVFileMgr_HMI_TextSnippets_typ TextSnippets; - struct CSVFileMgr_HMI_Internal_typ Internal; -} CSVFileMgr_HMI_typ; - - - -/* Prototyping of functions and function blocks */ -_BUR_PUBLIC unsigned short CSVFn_Init(struct CSVFileMgr_typ* t); -_BUR_PUBLIC unsigned short CSVOpenFile_Init(struct CSVFileMgr_typ* t); -_BUR_PUBLIC unsigned short CSVFn_Cyclic(struct CSVFileMgr_typ* t); -_BUR_PUBLIC unsigned short csvInitBuffer(unsigned long BufferLength, struct CSVFileMgr_Int_Buffer_typ* pBuffer); -_BUR_PUBLIC unsigned short csvClearBuffer(struct CSVFileMgr_Int_Buffer_typ* pBuffer); -_BUR_PUBLIC unsigned short csvAddToBuffer(unsigned long pData, unsigned long DataLength, struct CSVFileMgr_Int_Buffer_typ* pBuffer); -_BUR_PUBLIC unsigned short csvSetError(unsigned short ErrorID, struct CSVFileMgr_typ* t); -_BUR_PUBLIC unsigned short csvExpandVar(unsigned long pVarName, struct CSVFileMgr_Int_Buffer_typ* pBuffer, struct CSVFileMgr_StructData_typ* pStructData, struct CSVFileMgr_typ* t); -_BUR_PUBLIC unsigned short csvProcessData(struct CSVFileMgr_typ* t); -_BUR_PUBLIC unsigned short csvAddLogInfo(unsigned short InfoID, unsigned long LineNumber, unsigned long pAddInfo, struct CSVFileMgr_typ* t); -_BUR_PUBLIC unsigned short csvParseLine(unsigned long pLine, unsigned long LineNumber, struct CSVFileVariable_typ* pVariable, struct CSVFileMgr_typ* t); -_BUR_PUBLIC unsigned short csvGetVarInfo(unsigned long LineNumber, struct CSVFileVariable_typ* pVariable, struct CSVFileMgr_typ* t); -_BUR_PUBLIC unsigned short csvOpenVar(unsigned long LineNumber, struct CSVFileVariable_typ* pVariable, struct CSVFileMgr_typ* t); -_BUR_PUBLIC unsigned short csvSaveVar(unsigned long LineNumber, struct CSVFileVariable_typ* pVariable, struct CSVFileMgr_typ* t); -_BUR_PUBLIC unsigned short csvWriteHeader(struct CSVFileMgr_typ* t); -_BUR_PUBLIC unsigned short csvRemovePrefix(unsigned long MaxLength, plcstring* String, plcstring* Prefix); -_BUR_PUBLIC unsigned short csvAddPrefix(unsigned long MaxLength, plcstring* String, plcstring* Prefix); -_BUR_PUBLIC unsigned short CSVFn_HMI_Cyclic(struct CSVFileMgr_HMI_typ* HMI, struct CSVFileMgr_typ* t); -_BUR_PUBLIC unsigned short csvhmiGenerateFileListString(unsigned long pFileListString, struct fiDIR_READ_DATA* pDirReadData); -_BUR_PUBLIC unsigned long csvDTOA(double value, unsigned long pString, unsigned char numSigFigs); - - -__asm__(".section \".plc\""); - -/* Additional IEC dependencies */ -__asm__(".ascii \"iecdep \\\"Logical/Libraries/Loupe/logthat/Constants.var\\\" scope \\\"global\\\"\\n\""); -__asm__(".ascii \"iecdep \\\"Logical/Libraries/Loupe/hmitools/HMITools.var\\\" scope \\\"global\\\"\\n\""); - -__asm__(".previous"); - -#ifdef __cplusplus -}; -#endif -#endif /* _CSVFILELIB_ */ - diff --git a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/SG4/libcsvfilelib.a b/example/AsProject/Logical/Libraries/Loupe/csvfilelib/SG4/libcsvfilelib.a deleted file mode 100644 index 54498f5..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/SG4/libcsvfilelib.a and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/package.json b/example/AsProject/Logical/Libraries/Loupe/csvfilelib/package.json deleted file mode 100644 index 78b71c3..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/csvfilelib/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@loupeteam/csvfilelib", - "version": "1.2.2", - "description": "Loupe's csvfilelib library for Automation Runtime", - "homepage": "https://loupeteam.github.io/LoupeDocs/libraries/csvfilelib.html", - "scripts": {}, - "keywords": [], - "author": "Loupe", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/loupeteam/csvfilelib" - }, - "lpm": { - "type": "library" - }, - "dependencies": { - "@loupeteam/fiowrap": ">=0.9.0 <=0.9.9", - "@loupeteam/hmitools": ">=0.11.3 <=0.11.9", - "@loupeteam/stringext": ">=0.14.1 <=0.14.9", - "@loupeteam/logthat": ">=0.5.0 <=0.5.9" - } -} \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/Loupe/databuffer/Binary.lby b/example/AsProject/Logical/Libraries/Loupe/databuffer/Binary.lby index 8475bca..f8b5285 100644 --- a/example/AsProject/Logical/Libraries/Loupe/databuffer/Binary.lby +++ b/example/AsProject/Logical/Libraries/Loupe/databuffer/Binary.lby @@ -1,12 +1,11 @@ - + DataBuffer.typ DataBuffer.var DataBuffer.fun - CHANGELOG.md - + - + \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/Loupe/databuffer/CHANGELOG.md b/example/AsProject/Logical/Libraries/Loupe/databuffer/CHANGELOG.md deleted file mode 100644 index d1b1e63..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/databuffer/CHANGELOG.md +++ /dev/null @@ -1,6 +0,0 @@ -0.01.1 - Changed AppendToBuffer() behavior if data does not fit entirely in buffer. - Previously, no data was added to the buffer. - Now, the buffer will be filled with the beginning of the data. - The same status will be returned as before. - -0.01 - First version. Includes datbufInitBuffer(), datbufClearBuffer(), and datbufAppendToBuffer(). diff --git a/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/databuffer.h b/example/AsProject/Logical/Libraries/Loupe/databuffer/SG3/DataBuffer.h similarity index 88% rename from example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/databuffer.h rename to example/AsProject/Logical/Libraries/Loupe/databuffer/SG3/DataBuffer.h index 390382b..2e7bc4f 100644 --- a/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/databuffer.h +++ b/example/AsProject/Logical/Libraries/Loupe/databuffer/SG3/DataBuffer.h @@ -1,6 +1,6 @@ /* Automation Studio generated header file */ /* Do not edit ! */ -/* databuffer 0.01.1 */ +/* DataBuffer 1.0.0 */ #ifndef _DATABUFFER_ #define _DATABUFFER_ @@ -8,8 +8,8 @@ extern "C" { #endif -#ifndef _databuffer_VERSION -#define _databuffer_VERSION 0.01.1 +#ifndef _DataBuffer_VERSION +#define _DataBuffer_VERSION 1.0.0 #endif #include diff --git a/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/Arm/DataBuffer.br b/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/Arm/DataBuffer.br new file mode 100644 index 0000000..05cb878 Binary files /dev/null and b/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/Arm/DataBuffer.br differ diff --git a/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/Arm/databuffer.br b/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/Arm/databuffer.br deleted file mode 100644 index 89f6877..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/Arm/databuffer.br and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/Arm/libDataBuffer.a b/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/Arm/libDataBuffer.a new file mode 100644 index 0000000..9532961 Binary files /dev/null and b/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/Arm/libDataBuffer.a differ diff --git a/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/Arm/libdatabuffer.a b/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/Arm/libdatabuffer.a deleted file mode 100644 index 0a8d97b..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/Arm/libdatabuffer.a and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/DataBuffer.br b/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/DataBuffer.br new file mode 100644 index 0000000..634e4f0 Binary files /dev/null and b/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/DataBuffer.br differ diff --git a/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/Arm/databuffer.h b/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/DataBuffer.h similarity index 88% rename from example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/Arm/databuffer.h rename to example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/DataBuffer.h index 390382b..2e7bc4f 100644 --- a/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/Arm/databuffer.h +++ b/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/DataBuffer.h @@ -1,6 +1,6 @@ /* Automation Studio generated header file */ /* Do not edit ! */ -/* databuffer 0.01.1 */ +/* DataBuffer 1.0.0 */ #ifndef _DATABUFFER_ #define _DATABUFFER_ @@ -8,8 +8,8 @@ extern "C" { #endif -#ifndef _databuffer_VERSION -#define _databuffer_VERSION 0.01.1 +#ifndef _DataBuffer_VERSION +#define _DataBuffer_VERSION 1.0.0 #endif #include diff --git a/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/databuffer.br b/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/databuffer.br deleted file mode 100644 index 5169b3b..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/databuffer.br and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/libDataBuffer.a b/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/libDataBuffer.a new file mode 100644 index 0000000..bef8047 Binary files /dev/null and b/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/libDataBuffer.a differ diff --git a/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/libdatabuffer.a b/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/libdatabuffer.a deleted file mode 100644 index f9655bd..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/databuffer/SG4/libdatabuffer.a and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/databuffer/SGC/DataBuffer.h b/example/AsProject/Logical/Libraries/Loupe/databuffer/SGC/DataBuffer.h new file mode 100644 index 0000000..2e7bc4f --- /dev/null +++ b/example/AsProject/Logical/Libraries/Loupe/databuffer/SGC/DataBuffer.h @@ -0,0 +1,57 @@ +/* Automation Studio generated header file */ +/* Do not edit ! */ +/* DataBuffer 1.0.0 */ + +#ifndef _DATABUFFER_ +#define _DATABUFFER_ +#ifdef __cplusplus +extern "C" +{ +#endif +#ifndef _DataBuffer_VERSION +#define _DataBuffer_VERSION 1.0.0 +#endif + +#include + +#ifndef _BUR_PUBLIC +#define _BUR_PUBLIC +#endif +#ifdef _SG3 + #include "sys_lib.h" +#endif +#ifdef _SG4 + #include "sys_lib.h" +#endif +#ifdef _SGC + #include "sys_lib.h" +#endif + + +/* Datatypes and datatypes of function blocks */ +typedef enum DATBUF_ERR_enum +{ DATBUF_ERR_INVALIDINPUT = 50000, + DATBUF_ERR_MEMALLOC, + DATBUF_ERR_NOTINITIALIZED, + DATBUF_ERR_BUFFERFULL +} DATBUF_ERR_enum; + +typedef struct datbufBuffer_typ +{ unsigned long pData; + unsigned long currentLength; + unsigned long maxLength; +} datbufBuffer_typ; + + + +/* Prototyping of functions and function blocks */ +_BUR_PUBLIC unsigned short datbufClearBuffer(unsigned long pBuffer); +_BUR_PUBLIC unsigned short datbufInitBuffer(unsigned long pBuffer, unsigned long maxLength); +_BUR_PUBLIC unsigned short datbufAppendToBuffer(unsigned long pBuffer, unsigned long pData, unsigned long dataLength); + + +#ifdef __cplusplus +}; +#endif +#endif /* _DATABUFFER_ */ + diff --git a/example/AsProject/Logical/Libraries/Loupe/databuffer/package.json b/example/AsProject/Logical/Libraries/Loupe/databuffer/package.json index 451f255..d3a7490 100644 --- a/example/AsProject/Logical/Libraries/Loupe/databuffer/package.json +++ b/example/AsProject/Logical/Libraries/Loupe/databuffer/package.json @@ -1,18 +1,18 @@ -{ - "name": "@loupeteam/databuffer", - "version": "0.1.1", - "description": "Loupe's databuffer library for Automation Runtime", - "homepage": "https://loupeteam.github.io/LoupeDocs/libraries/databuffer.html", - "scripts": {}, - "keywords": [], - "author": "Loupe", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/loupeteam/databuffer" - }, - "lpm": { - "type": "library" - }, - "dependencies": {} -} \ No newline at end of file +{ + "name": "@loupeteam/databuffer", + "version": "1.0.0", + "description": "Data buffer library for B&R Automation Studio", + "homepage": "https://loupeteam.github.io/LoupeDocs/libraries/databuffer.html", + "scripts": {}, + "keywords": [], + "author": "Loupe", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/loupeteam/DataBuffer" + }, + "lpm": { + "type": "library" + }, + "dependencies": {} +} diff --git a/example/AsProject/Logical/Libraries/Loupe/fiowrap/Binary.lby b/example/AsProject/Logical/Libraries/Loupe/fiowrap/Binary.lby deleted file mode 100644 index 7eb914d..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/fiowrap/Binary.lby +++ /dev/null @@ -1,15 +0,0 @@ - - - - FIOWrap.typ - FIOWrap.var - FIOWrap.fun - CHANGELOG.md - - - - - - - - diff --git a/example/AsProject/Logical/Libraries/Loupe/fiowrap/CHANGELOG.md b/example/AsProject/Logical/Libraries/Loupe/fiowrap/CHANGELOG.md deleted file mode 100644 index 44cb225..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/fiowrap/CHANGELOG.md +++ /dev/null @@ -1,25 +0,0 @@ -0.9.1 - Migrate from AsString to AsBrStr - -0.9.0 - FIOWrap: Add configurable suffix - FIOManage: Change parameter names - FileDirectory to Directory, FileName to ItemName, and MaxNumFiles to MaxNumItems - Manage number of directories based on operating mode input - -0.8.1 - Read directory after scan command - -0.8.0 - Add fioOpenFile_Init() - -0.7.0 - 20180402 - Add FIOManage() - Add multi-file overflow to FIOWrapFn_Cyclic() - -0.6.0 - 20120329 - Change max file name length to 260 - -0.5.0 - 201120131 - Move FileDevice and MaxFileSize from CFG to PAR - -0.4.0 - 20111222 - Change ErrorLevel from warning to error - -0.3.0 - 20111222 - Change error handling - -0.2.0 - 20110602 - Update to be more consistent with current interfaces - Add Delete CMD - -0.1.0 - 20110504 - First release diff --git a/example/AsProject/Logical/Libraries/Loupe/fiowrap/FIOWrap.fun b/example/AsProject/Logical/Libraries/Loupe/fiowrap/FIOWrap.fun deleted file mode 100644 index 23ec598..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/fiowrap/FIOWrap.fun +++ /dev/null @@ -1,46 +0,0 @@ -(* - * File: FIOWrap.fun - * Copyright (c) 2023 Loupe - * https://loupe.team - * - * This file is part of FIOWrap, licensed under the MIT License. - * - ******************************************************************** - * Functions and function blocks of library FIOWrap - ********************************************************************) - -FUNCTION FIOManageFn_Cyclic : BOOL - VAR_IN_OUT - t : FIOManage_typ; - END_VAR -END_FUNCTION - -FUNCTION FIOWrapFn_Cyclic : BOOL (*This function manages file reads and writes.*) - VAR_IN_OUT - t : FIOWrap_typ; (*FIOWrap Mgr structure*) - END_VAR -END_FUNCTION - -FUNCTION fiowSetError : BOOL (*Set error status on FIOWrap*) - VAR_INPUT - ErrorID : UINT; - END_VAR - VAR_IN_OUT - t : FIOWrap_typ; - END_VAR -END_FUNCTION - -FUNCTION fiomSetError : BOOL - VAR_INPUT - ErrorID : UINT; - END_VAR - VAR_IN_OUT - t : FIOManage_typ; - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION fioOpenFile_Init : UINT (*Open a file in the init subroutine*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*) - VAR_IN_OUT - t : FIOWrap_typ; - END_VAR -END_FUNCTION diff --git a/example/AsProject/Logical/Libraries/Loupe/fiowrap/FIOWrap.typ b/example/AsProject/Logical/Libraries/Loupe/fiowrap/FIOWrap.typ deleted file mode 100644 index b8ed882..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/fiowrap/FIOWrap.typ +++ /dev/null @@ -1,174 +0,0 @@ -(* - * File: FIOWrap.typ - * Copyright (c) 2023 Loupe - * https://loupe.team - * - * This file is part of FIOWrap, licensed under the MIT License. - * - ******************************************************************** - * Data types of library FIOWrap - ********************************************************************) - -TYPE - FIOWRAP_ERR_enum : - ( - FIOWRAP_ERR_INVALIDOP := 50000, - FIOWRAP_ERR_INVALIDFILTER, - FIOWRAP_ERR_INVALIDDIR, - FIOWRAP_ERR_MAXFILESIZE - ); - FIOWRAP_OP_enum : - ( - FIOWRAP_OP_INVALID := 0, - FIOWRAP_OP_OPEN, - FIOWRAP_OP_SAVEAS, - FIOWRAP_OP_APPEND, - FIOWRAP_OP_APPEND_NEW, - FIOWRAP_OP_SCAN, - FIOWRAP_OP_DELETE, - FIOWRAP_OP_DELETE_ALL, - FIOWRAP_OP_ERROR - ); - FIOWRAP_ST_enum : - ( - FIOWRAP_ST_WAIT := 0, (*0*) - FIOWRAP_ST_OPEN, (*1*) - FIOWRAP_ST_CREATE, (*2*) - FIOWRAP_ST_READ, (*3*) - FIOWRAP_ST_WRITE, (*4*) - FIOWRAP_ST_CLOSE, (*5*) - FIOWRAP_ST_DELETE, (*6*) - FIOWRAP_ST_DELETE_FILE, (*7*) - FIOWRAP_ST_DELETE_DIR, (*8*) - FIOWRAP_ST_RENAME, (*9*) - FIOWRAP_ST_ERROR := 999, (*999*) - FIOWRAP_ST_ - ); - FIOWrap_Int_FUB_typ : STRUCT - Open : FileOpen; - Create : FileCreate; - Read : FileRead; - Write : FileWrite; - Close : FileClose; - Delete : FileDelete; - Rename : FileRename; - GetTime : DTGetTime; - END_STRUCT; - FIOWrap_Internal_typ : STRUCT - FileID : UDINT; (*File Ident for reading and writing*) - FileLen : UDINT; (*Length of the current file for appending*) - FileCreated : BOOL; (*Error happened after opening file. Need to close and then go to error state.*) - ErrorClose : BOOL; (*Error happened after opening file. Need to close and then go to error state.*) - CurrOperation : DINT; - State : DINT; - Timestamp : STRING[30]; - newFileName : STRING[FIOWRAP_STRLEN_NAME]; - Name : STRING[FIOWRAP_STRLEN_NAME]; - Extension : STRING[FIOWRAP_STRLEN_NAME]; - FUB : FIOWrap_Int_FUB_typ; - CMD : FIOWrap_IN_CMD_typ; - DTStruct : DTStructure; - TempStr : STRING[FIOWRAP_STRLEN_NAME]; - END_STRUCT; - FIOWrap_OUT_STAT_typ : STRUCT - Busy : BOOL; - Done : BOOL; - Error : BOOL; - ErrorID : UINT; - ErrorString : STRING[FIOWRAP_STRLEN_ERROR]; - ErrorLevel : USINT; - ReadyForCMD : BOOL; - NewFile : BOOL; (*Length of the current file for appending*) - FileLen : UDINT; (*Length of the current file for appending*) - END_STRUCT; - FIOWrap_OUT_typ : STRUCT - STAT : FIOWrap_OUT_STAT_typ; - END_STRUCT; - FIOWrap_IN_PAR_typ : STRUCT - FileDevice : STRING[FIOWRAP_STRLEN_NAME]; (*File device name*) - FileName : STRING[FIOWRAP_STRLEN_NAME]; (*File name (with extension)*) - Suffix : STRING[FIOWRAP_STRLEN_NAME]; (*File name (with extension)*) - pData : UDINT; (*Address of the data to be read or written*) - len : UDINT; (*Length of the data to be read or written*) - offset : UDINT; (*Offset within the file to read/write from/to.*) - MaxFileSize : UDINT; (*Maximum file size (only evaluated when appending to a file)*) - MultiFile : BOOL; - END_STRUCT; - FIOWrap_IN_CMD_typ : STRUCT - Open : BOOL; (*Open a file and read its contents*) - SaveAs : BOOL; (*Save data to a file*) - AppendToFile : BOOL; (*Append data to the end of a file*) - Delete : BOOL; - AcknowledgeError : BOOL; - END_STRUCT; - FIOWrap_IN_typ : STRUCT - CMD : FIOWrap_IN_CMD_typ; - PAR : FIOWrap_IN_PAR_typ; - END_STRUCT; - FIOWrap_typ : STRUCT - IN : FIOWrap_IN_typ; - OUT : FIOWrap_OUT_typ; - Internal : FIOWrap_Internal_typ; - END_STRUCT; - FIOManage_Int_FUB_typ : STRUCT - DirOpen : DirOpen; - DirClose : DirClose; - DirRead : DirReadEx; - DeleteDir : DirDeleteEx; - Delete : FileDelete; - END_STRUCT; - FIOManage_Internal_typ : STRUCT - DirID : UDINT; (*File Ident for reading and writing*) - NumDirs : UDINT; (*Length of the current file for appending*) - NumItems : UDINT; (*Length of the current file for appending*) - CurrOperation : FIOWRAP_OP_enum; - ErrorClose : BOOL; (*Error happened after opening file. Need to close and then go to error state.*) - State : DINT; - index : USINT; - FilterName : STRING[FIOWRAP_STRLEN_NAME]; - ItemName : STRING[FIOWRAP_STRLEN_NAME]; - FileExtension : STRING[FIOWRAP_STRLEN_NAME]; - Name : STRING[FIOWRAP_STRLEN_NAME]; - Extension : STRING[FIOWRAP_STRLEN_NAME]; - NumItemsDelete : DINT; - ItemInfo : fiDIR_READ_EX_DATA; - ItemInfoCache : ARRAY[0..FIOWRAP_MAI_DELETE]OF fiDIR_READ_EX_DATA; - NewestIndex : USINT; - OldestIndex : USINT; - FUB : FIOManage_Int_FUB_typ; - CMD : FIOManage_IN_CMD_typ; - END_STRUCT; - FIOManage_OUT_STAT_typ : STRUCT - Busy : BOOL; - Done : BOOL; - Error : BOOL; - ErrorID : UINT; - ErrorString : STRING[FIOWRAP_STRLEN_ERROR]; - ErrorLevel : USINT; - ReadyForCMD : BOOL; - END_STRUCT; - FIOManage_OUT_typ : STRUCT - STAT : FIOManage_OUT_STAT_typ; - END_STRUCT; - FIOManage_IN_PAR_typ : STRUCT - FileDevice : STRING[FIOWRAP_STRLEN_NAME]; (*File device name*) - Directory : STRING[FIOWRAP_STRLEN_NAME]; (*Directory to navigate to*) - ItemName : STRING[FIOWRAP_STRLEN_NAME]; (*Address of the data to be read or written*) - MaxNumItems : UDINT; (*Maximum file size (only evaluated when appending to a file)*) - Mode : USINT; (*Maximum file size (only evaluated when appending to a file)*) - END_STRUCT; - FIOManage_IN_CMD_typ : STRUCT - Scan : BOOL; - DeleteAll : BOOL; - AcknowledgeError : BOOL; - END_STRUCT; - FIOManage_IN_typ : STRUCT - CMD : FIOManage_IN_CMD_typ; - PAR : FIOManage_IN_PAR_typ; - END_STRUCT; - FIOManage_typ : STRUCT - IN : FIOManage_IN_typ; - OUT : FIOManage_OUT_typ; - Internal : FIOManage_Internal_typ; - END_STRUCT; -END_TYPE diff --git a/example/AsProject/Logical/Libraries/Loupe/fiowrap/FIOWrap.var b/example/AsProject/Logical/Libraries/Loupe/fiowrap/FIOWrap.var deleted file mode 100644 index a8207d2..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/fiowrap/FIOWrap.var +++ /dev/null @@ -1,18 +0,0 @@ -(* - * File: FIOWrap.var - * Copyright (c) 2023 Loupe - * https://loupe.team - * - * This file is part of FIOWrap, licensed under the MIT License. - * - ******************************************************************** - * Constants of library FIOWrap - ********************************************************************) -VAR CONSTANT - FIOWRAP_STRLEN_ERROR : USINT := 120; - FIOWRAP_NUM_DELETE : USINT := 10; - FIOWRAP_MAI_DELETE : USINT := FIOWRAP_NUM_DELETE-1; - FIOWRAP_STRLEN_NAME : UINT := 260; - FIOWRAP_STAT_OK : UINT := 0; - FIOWRAP_STAT_DISABLED : UINT := 65534; -END_VAR diff --git a/example/AsProject/Logical/Libraries/Loupe/fiowrap/SG4/Arm/fiowrap.br b/example/AsProject/Logical/Libraries/Loupe/fiowrap/SG4/Arm/fiowrap.br deleted file mode 100644 index 4ee6ec2..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/fiowrap/SG4/Arm/fiowrap.br and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/fiowrap/SG4/Arm/fiowrap.h b/example/AsProject/Logical/Libraries/Loupe/fiowrap/SG4/Arm/fiowrap.h deleted file mode 100644 index eeaf8ed..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/fiowrap/SG4/Arm/fiowrap.h +++ /dev/null @@ -1,252 +0,0 @@ -/* Automation Studio generated header file */ -/* Do not edit ! */ -/* fiowrap 0.09.1 */ - -#ifndef _FIOWRAP_ -#define _FIOWRAP_ -#ifdef __cplusplus -extern "C" -{ -#endif -#ifndef _fiowrap_VERSION -#define _fiowrap_VERSION 0.09.1 -#endif - -#include - -#ifndef _BUR_PUBLIC -#define _BUR_PUBLIC -#endif -#ifdef _SG3 - #include "AsBrStr.h" - #include "astime.h" - #include "FileIO.h" - #include "stringext.h" -#endif -#ifdef _SG4 - #include "AsBrStr.h" - #include "astime.h" - #include "FileIO.h" - #include "stringext.h" -#endif -#ifdef _SGC - #include "AsBrStr.h" - #include "astime.h" - #include "FileIO.h" - #include "stringext.h" -#endif - - -/* Constants */ -#ifdef _REPLACE_CONST - #define FIOWRAP_STRLEN_ERROR 120U - #define FIOWRAP_NUM_DELETE 10U - #define FIOWRAP_MAI_DELETE 9U - #define FIOWRAP_STRLEN_NAME 260U - #define FIOWRAP_STAT_OK 0U - #define FIOWRAP_STAT_DISABLED 65534U -#else - _GLOBAL_CONST unsigned char FIOWRAP_STRLEN_ERROR; - _GLOBAL_CONST unsigned char FIOWRAP_NUM_DELETE; - _GLOBAL_CONST unsigned char FIOWRAP_MAI_DELETE; - _GLOBAL_CONST unsigned short FIOWRAP_STRLEN_NAME; - _GLOBAL_CONST unsigned short FIOWRAP_STAT_OK; - _GLOBAL_CONST unsigned short FIOWRAP_STAT_DISABLED; -#endif - - - - -/* Datatypes and datatypes of function blocks */ -typedef enum FIOWRAP_ERR_enum -{ FIOWRAP_ERR_INVALIDOP = 50000, - FIOWRAP_ERR_INVALIDFILTER, - FIOWRAP_ERR_INVALIDDIR, - FIOWRAP_ERR_MAXFILESIZE -} FIOWRAP_ERR_enum; - -typedef enum FIOWRAP_OP_enum -{ FIOWRAP_OP_INVALID = 0, - FIOWRAP_OP_OPEN, - FIOWRAP_OP_SAVEAS, - FIOWRAP_OP_APPEND, - FIOWRAP_OP_APPEND_NEW, - FIOWRAP_OP_SCAN, - FIOWRAP_OP_DELETE, - FIOWRAP_OP_DELETE_ALL, - FIOWRAP_OP_ERROR -} FIOWRAP_OP_enum; - -typedef enum FIOWRAP_ST_enum -{ FIOWRAP_ST_WAIT = 0, - FIOWRAP_ST_OPEN, - FIOWRAP_ST_CREATE, - FIOWRAP_ST_READ, - FIOWRAP_ST_WRITE, - FIOWRAP_ST_CLOSE, - FIOWRAP_ST_DELETE, - FIOWRAP_ST_DELETE_FILE, - FIOWRAP_ST_DELETE_DIR, - FIOWRAP_ST_RENAME, - FIOWRAP_ST_ERROR = 999, - FIOWRAP_ST_ -} FIOWRAP_ST_enum; - -typedef struct FIOWrap_Int_FUB_typ -{ struct FileOpen Open; - struct FileCreate Create; - struct FileRead Read; - struct FileWrite Write; - struct FileClose Close; - struct FileDelete Delete; - struct FileRename Rename; - struct DTGetTime GetTime; -} FIOWrap_Int_FUB_typ; - -typedef struct FIOWrap_IN_CMD_typ -{ plcbit Open; - plcbit SaveAs; - plcbit AppendToFile; - plcbit Delete; - plcbit AcknowledgeError; -} FIOWrap_IN_CMD_typ; - -typedef struct FIOWrap_Internal_typ -{ unsigned long FileID; - unsigned long FileLen; - plcbit FileCreated; - plcbit ErrorClose; - signed long CurrOperation; - signed long State; - plcstring Timestamp[31]; - plcstring newFileName[261]; - plcstring Name[261]; - plcstring Extension[261]; - struct FIOWrap_Int_FUB_typ FUB; - struct FIOWrap_IN_CMD_typ CMD; - struct DTStructure DTStruct; - plcstring TempStr[261]; -} FIOWrap_Internal_typ; - -typedef struct FIOWrap_OUT_STAT_typ -{ plcbit Busy; - plcbit Done; - plcbit Error; - unsigned short ErrorID; - plcstring ErrorString[121]; - unsigned char ErrorLevel; - plcbit ReadyForCMD; - plcbit NewFile; - unsigned long FileLen; -} FIOWrap_OUT_STAT_typ; - -typedef struct FIOWrap_OUT_typ -{ struct FIOWrap_OUT_STAT_typ STAT; -} FIOWrap_OUT_typ; - -typedef struct FIOWrap_IN_PAR_typ -{ plcstring FileDevice[261]; - plcstring FileName[261]; - plcstring Suffix[261]; - unsigned long pData; - unsigned long len; - unsigned long offset; - unsigned long MaxFileSize; - plcbit MultiFile; -} FIOWrap_IN_PAR_typ; - -typedef struct FIOWrap_IN_typ -{ struct FIOWrap_IN_CMD_typ CMD; - struct FIOWrap_IN_PAR_typ PAR; -} FIOWrap_IN_typ; - -typedef struct FIOWrap_typ -{ struct FIOWrap_IN_typ IN; - struct FIOWrap_OUT_typ OUT; - struct FIOWrap_Internal_typ Internal; -} FIOWrap_typ; - -typedef struct FIOManage_Int_FUB_typ -{ struct DirOpen DirOpen; - struct DirClose DirClose; - struct DirReadEx DirRead; - struct DirDeleteEx DeleteDir; - struct FileDelete Delete; -} FIOManage_Int_FUB_typ; - -typedef struct FIOManage_IN_CMD_typ -{ plcbit Scan; - plcbit DeleteAll; - plcbit AcknowledgeError; -} FIOManage_IN_CMD_typ; - -typedef struct FIOManage_Internal_typ -{ unsigned long DirID; - unsigned long NumDirs; - unsigned long NumItems; - enum FIOWRAP_OP_enum CurrOperation; - plcbit ErrorClose; - signed long State; - unsigned char index; - plcstring FilterName[261]; - plcstring ItemName[261]; - plcstring FileExtension[261]; - plcstring Name[261]; - plcstring Extension[261]; - signed long NumItemsDelete; - struct fiDIR_READ_EX_DATA ItemInfo; - struct fiDIR_READ_EX_DATA ItemInfoCache[10]; - unsigned char NewestIndex; - unsigned char OldestIndex; - struct FIOManage_Int_FUB_typ FUB; - struct FIOManage_IN_CMD_typ CMD; -} FIOManage_Internal_typ; - -typedef struct FIOManage_OUT_STAT_typ -{ plcbit Busy; - plcbit Done; - plcbit Error; - unsigned short ErrorID; - plcstring ErrorString[121]; - unsigned char ErrorLevel; - plcbit ReadyForCMD; -} FIOManage_OUT_STAT_typ; - -typedef struct FIOManage_OUT_typ -{ struct FIOManage_OUT_STAT_typ STAT; -} FIOManage_OUT_typ; - -typedef struct FIOManage_IN_PAR_typ -{ plcstring FileDevice[261]; - plcstring Directory[261]; - plcstring ItemName[261]; - unsigned long MaxNumItems; - unsigned char Mode; -} FIOManage_IN_PAR_typ; - -typedef struct FIOManage_IN_typ -{ struct FIOManage_IN_CMD_typ CMD; - struct FIOManage_IN_PAR_typ PAR; -} FIOManage_IN_typ; - -typedef struct FIOManage_typ -{ struct FIOManage_IN_typ IN; - struct FIOManage_OUT_typ OUT; - struct FIOManage_Internal_typ Internal; -} FIOManage_typ; - - - -/* Prototyping of functions and function blocks */ -_BUR_PUBLIC plcbit FIOManageFn_Cyclic(struct FIOManage_typ* t); -_BUR_PUBLIC plcbit FIOWrapFn_Cyclic(struct FIOWrap_typ* t); -_BUR_PUBLIC plcbit fiowSetError(unsigned short ErrorID, struct FIOWrap_typ* t); -_BUR_PUBLIC plcbit fiomSetError(unsigned short ErrorID, struct FIOManage_typ* t); -_BUR_PUBLIC unsigned short fioOpenFile_Init(struct FIOWrap_typ* t); - - -#ifdef __cplusplus -}; -#endif -#endif /* _FIOWRAP_ */ - diff --git a/example/AsProject/Logical/Libraries/Loupe/fiowrap/SG4/Arm/libfiowrap.a b/example/AsProject/Logical/Libraries/Loupe/fiowrap/SG4/Arm/libfiowrap.a deleted file mode 100644 index 6d20a04..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/fiowrap/SG4/Arm/libfiowrap.a and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/fiowrap/SG4/fiowrap.br b/example/AsProject/Logical/Libraries/Loupe/fiowrap/SG4/fiowrap.br deleted file mode 100644 index 18c670b..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/fiowrap/SG4/fiowrap.br and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/fiowrap/SG4/fiowrap.h b/example/AsProject/Logical/Libraries/Loupe/fiowrap/SG4/fiowrap.h deleted file mode 100644 index eeaf8ed..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/fiowrap/SG4/fiowrap.h +++ /dev/null @@ -1,252 +0,0 @@ -/* Automation Studio generated header file */ -/* Do not edit ! */ -/* fiowrap 0.09.1 */ - -#ifndef _FIOWRAP_ -#define _FIOWRAP_ -#ifdef __cplusplus -extern "C" -{ -#endif -#ifndef _fiowrap_VERSION -#define _fiowrap_VERSION 0.09.1 -#endif - -#include - -#ifndef _BUR_PUBLIC -#define _BUR_PUBLIC -#endif -#ifdef _SG3 - #include "AsBrStr.h" - #include "astime.h" - #include "FileIO.h" - #include "stringext.h" -#endif -#ifdef _SG4 - #include "AsBrStr.h" - #include "astime.h" - #include "FileIO.h" - #include "stringext.h" -#endif -#ifdef _SGC - #include "AsBrStr.h" - #include "astime.h" - #include "FileIO.h" - #include "stringext.h" -#endif - - -/* Constants */ -#ifdef _REPLACE_CONST - #define FIOWRAP_STRLEN_ERROR 120U - #define FIOWRAP_NUM_DELETE 10U - #define FIOWRAP_MAI_DELETE 9U - #define FIOWRAP_STRLEN_NAME 260U - #define FIOWRAP_STAT_OK 0U - #define FIOWRAP_STAT_DISABLED 65534U -#else - _GLOBAL_CONST unsigned char FIOWRAP_STRLEN_ERROR; - _GLOBAL_CONST unsigned char FIOWRAP_NUM_DELETE; - _GLOBAL_CONST unsigned char FIOWRAP_MAI_DELETE; - _GLOBAL_CONST unsigned short FIOWRAP_STRLEN_NAME; - _GLOBAL_CONST unsigned short FIOWRAP_STAT_OK; - _GLOBAL_CONST unsigned short FIOWRAP_STAT_DISABLED; -#endif - - - - -/* Datatypes and datatypes of function blocks */ -typedef enum FIOWRAP_ERR_enum -{ FIOWRAP_ERR_INVALIDOP = 50000, - FIOWRAP_ERR_INVALIDFILTER, - FIOWRAP_ERR_INVALIDDIR, - FIOWRAP_ERR_MAXFILESIZE -} FIOWRAP_ERR_enum; - -typedef enum FIOWRAP_OP_enum -{ FIOWRAP_OP_INVALID = 0, - FIOWRAP_OP_OPEN, - FIOWRAP_OP_SAVEAS, - FIOWRAP_OP_APPEND, - FIOWRAP_OP_APPEND_NEW, - FIOWRAP_OP_SCAN, - FIOWRAP_OP_DELETE, - FIOWRAP_OP_DELETE_ALL, - FIOWRAP_OP_ERROR -} FIOWRAP_OP_enum; - -typedef enum FIOWRAP_ST_enum -{ FIOWRAP_ST_WAIT = 0, - FIOWRAP_ST_OPEN, - FIOWRAP_ST_CREATE, - FIOWRAP_ST_READ, - FIOWRAP_ST_WRITE, - FIOWRAP_ST_CLOSE, - FIOWRAP_ST_DELETE, - FIOWRAP_ST_DELETE_FILE, - FIOWRAP_ST_DELETE_DIR, - FIOWRAP_ST_RENAME, - FIOWRAP_ST_ERROR = 999, - FIOWRAP_ST_ -} FIOWRAP_ST_enum; - -typedef struct FIOWrap_Int_FUB_typ -{ struct FileOpen Open; - struct FileCreate Create; - struct FileRead Read; - struct FileWrite Write; - struct FileClose Close; - struct FileDelete Delete; - struct FileRename Rename; - struct DTGetTime GetTime; -} FIOWrap_Int_FUB_typ; - -typedef struct FIOWrap_IN_CMD_typ -{ plcbit Open; - plcbit SaveAs; - plcbit AppendToFile; - plcbit Delete; - plcbit AcknowledgeError; -} FIOWrap_IN_CMD_typ; - -typedef struct FIOWrap_Internal_typ -{ unsigned long FileID; - unsigned long FileLen; - plcbit FileCreated; - plcbit ErrorClose; - signed long CurrOperation; - signed long State; - plcstring Timestamp[31]; - plcstring newFileName[261]; - plcstring Name[261]; - plcstring Extension[261]; - struct FIOWrap_Int_FUB_typ FUB; - struct FIOWrap_IN_CMD_typ CMD; - struct DTStructure DTStruct; - plcstring TempStr[261]; -} FIOWrap_Internal_typ; - -typedef struct FIOWrap_OUT_STAT_typ -{ plcbit Busy; - plcbit Done; - plcbit Error; - unsigned short ErrorID; - plcstring ErrorString[121]; - unsigned char ErrorLevel; - plcbit ReadyForCMD; - plcbit NewFile; - unsigned long FileLen; -} FIOWrap_OUT_STAT_typ; - -typedef struct FIOWrap_OUT_typ -{ struct FIOWrap_OUT_STAT_typ STAT; -} FIOWrap_OUT_typ; - -typedef struct FIOWrap_IN_PAR_typ -{ plcstring FileDevice[261]; - plcstring FileName[261]; - plcstring Suffix[261]; - unsigned long pData; - unsigned long len; - unsigned long offset; - unsigned long MaxFileSize; - plcbit MultiFile; -} FIOWrap_IN_PAR_typ; - -typedef struct FIOWrap_IN_typ -{ struct FIOWrap_IN_CMD_typ CMD; - struct FIOWrap_IN_PAR_typ PAR; -} FIOWrap_IN_typ; - -typedef struct FIOWrap_typ -{ struct FIOWrap_IN_typ IN; - struct FIOWrap_OUT_typ OUT; - struct FIOWrap_Internal_typ Internal; -} FIOWrap_typ; - -typedef struct FIOManage_Int_FUB_typ -{ struct DirOpen DirOpen; - struct DirClose DirClose; - struct DirReadEx DirRead; - struct DirDeleteEx DeleteDir; - struct FileDelete Delete; -} FIOManage_Int_FUB_typ; - -typedef struct FIOManage_IN_CMD_typ -{ plcbit Scan; - plcbit DeleteAll; - plcbit AcknowledgeError; -} FIOManage_IN_CMD_typ; - -typedef struct FIOManage_Internal_typ -{ unsigned long DirID; - unsigned long NumDirs; - unsigned long NumItems; - enum FIOWRAP_OP_enum CurrOperation; - plcbit ErrorClose; - signed long State; - unsigned char index; - plcstring FilterName[261]; - plcstring ItemName[261]; - plcstring FileExtension[261]; - plcstring Name[261]; - plcstring Extension[261]; - signed long NumItemsDelete; - struct fiDIR_READ_EX_DATA ItemInfo; - struct fiDIR_READ_EX_DATA ItemInfoCache[10]; - unsigned char NewestIndex; - unsigned char OldestIndex; - struct FIOManage_Int_FUB_typ FUB; - struct FIOManage_IN_CMD_typ CMD; -} FIOManage_Internal_typ; - -typedef struct FIOManage_OUT_STAT_typ -{ plcbit Busy; - plcbit Done; - plcbit Error; - unsigned short ErrorID; - plcstring ErrorString[121]; - unsigned char ErrorLevel; - plcbit ReadyForCMD; -} FIOManage_OUT_STAT_typ; - -typedef struct FIOManage_OUT_typ -{ struct FIOManage_OUT_STAT_typ STAT; -} FIOManage_OUT_typ; - -typedef struct FIOManage_IN_PAR_typ -{ plcstring FileDevice[261]; - plcstring Directory[261]; - plcstring ItemName[261]; - unsigned long MaxNumItems; - unsigned char Mode; -} FIOManage_IN_PAR_typ; - -typedef struct FIOManage_IN_typ -{ struct FIOManage_IN_CMD_typ CMD; - struct FIOManage_IN_PAR_typ PAR; -} FIOManage_IN_typ; - -typedef struct FIOManage_typ -{ struct FIOManage_IN_typ IN; - struct FIOManage_OUT_typ OUT; - struct FIOManage_Internal_typ Internal; -} FIOManage_typ; - - - -/* Prototyping of functions and function blocks */ -_BUR_PUBLIC plcbit FIOManageFn_Cyclic(struct FIOManage_typ* t); -_BUR_PUBLIC plcbit FIOWrapFn_Cyclic(struct FIOWrap_typ* t); -_BUR_PUBLIC plcbit fiowSetError(unsigned short ErrorID, struct FIOWrap_typ* t); -_BUR_PUBLIC plcbit fiomSetError(unsigned short ErrorID, struct FIOManage_typ* t); -_BUR_PUBLIC unsigned short fioOpenFile_Init(struct FIOWrap_typ* t); - - -#ifdef __cplusplus -}; -#endif -#endif /* _FIOWRAP_ */ - diff --git a/example/AsProject/Logical/Libraries/Loupe/fiowrap/SG4/libfiowrap.a b/example/AsProject/Logical/Libraries/Loupe/fiowrap/SG4/libfiowrap.a deleted file mode 100644 index 347317b..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/fiowrap/SG4/libfiowrap.a and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/fiowrap/package.json b/example/AsProject/Logical/Libraries/Loupe/fiowrap/package.json deleted file mode 100644 index 35631bd..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/fiowrap/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "@loupeteam/fiowrap", - "version": "0.9.1", - "description": "Loupe's fiowrap library for Automation Runtime", - "homepage": "https://loupeteam.github.io/LoupeDocs/libraries/fiowrap.html", - "scripts": {}, - "keywords": [], - "author": "Loupe", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/loupeteam/fiowrap" - }, - "lpm": { - "type": "library" - }, - "dependencies": { - "@loupeteam/stringext": ">=0.11.0" - } -} \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/Loupe/hammers/Binary.lby b/example/AsProject/Logical/Libraries/Loupe/hammers/Binary.lby deleted file mode 100644 index e74368c..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/hammers/Binary.lby +++ /dev/null @@ -1,16 +0,0 @@ - - - - Hammers.fun - Hammers.typ - Hammers.var - cABS.h - TempSensor.typ - CHANGELOG.md - - - - - - - diff --git a/example/AsProject/Logical/Libraries/Loupe/hammers/CHANGELOG.md b/example/AsProject/Logical/Libraries/Loupe/hammers/CHANGELOG.md deleted file mode 100644 index da0d36f..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/hammers/CHANGELOG.md +++ /dev/null @@ -1,13 +0,0 @@ -0.10.0 - Add SimulationStatus function -0.9.0 - Add SettleDown (Debounce) fub -0.8.0 - Add FastTON, Interval function blocks -0.7.2 - Change return and input types in crc_16 to match .fun file -0.7.1 - Blink FUB: Increase accuracy and bug fixes -0.7 - Added Blinking function -0.6 - Added CRC16 function -0.5 - Change TempSensor types to hamTempSensor types to fix a conflict -0.4 - Add Mean and StdDev -0.3 - Add ScaleAnalogInput -0.2 - Add TempSensorFn -0.1 - Accumulate, cABS macro, subtractWithRollover - diff --git a/example/AsProject/Logical/Libraries/Loupe/hammers/Hammers.fun b/example/AsProject/Logical/Libraries/Loupe/hammers/Hammers.fun deleted file mode 100644 index cbfbac8..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/hammers/Hammers.fun +++ /dev/null @@ -1,174 +0,0 @@ -(* - * File: Hammers.fun - * Copyright (c) 2023 Loupe - * https://loupe.team - * - * This file is part of Hammers, licensed under the MIT License. - * - ******************************************************************** - * Functions and function blocks of library Hammers - ********************************************************************) - -FUNCTION crc_16 : UINT - VAR_INPUT - input_str : UDINT; - num_bytes : UDINT; - END_VAR -END_FUNCTION - -FUNCTION_BLOCK AccumulateDistance - VAR_INPUT - enable : BOOL; - input : REAL; (*Periodic input value*) - period : REAL; (*Period of input value*) - pDistance : UDINT; - END_VAR - VAR_OUTPUT - initialized : BOOL; - outputREAL : REAL; (*Accumulated output*) - outputLREAL : LREAL; (*Accumulated output*) - outputCYCLIC_POSITION : hamCYCLIC_POSITION; (*Accumulated output*) - END_VAR - VAR - inputOld : REAL; (*Last value of input for calculating delta*) - delta : LREAL; (*Change in value in last scan, corrected for rollover*) - END_VAR -END_FUNCTION_BLOCK - -FUNCTION_BLOCK Accumulate (*Accumulate a periodic input (un-modulo)*) (*$GROUP=User*) - VAR_INPUT - input : REAL; (*Periodic input value*) - period : REAL; (*Period of input value*) - setToInput : BOOL; (*Force the input to the output and reinitialize accumulator*) - END_VAR - VAR_OUTPUT - outputREAL : REAL; (*Accumulated output*) - outputLREAL : LREAL; (*Accumulated output*) - outputCYCLIC_POSITION : hamCYCLIC_POSITION; (*Accumulated output*) - END_VAR - VAR - initialized : BOOL; (*Function block has been initialized*) - inputOld : REAL; (*Last value of input for calculating delta*) - delta : LREAL; (*Change in value in last scan, corrected for rollover*) - numPeriods : DINT; (*Signed number of periods the input has gone through*) - accumulatedValue_add : LREAL; (*Accumulated output computed by (accumulatedValue_add + delta)*) - accumulatedValue_mult : LREAL; (*Accumulated output computed by (numPeriods * period + input)*) - END_VAR -END_FUNCTION_BLOCK - -FUNCTION_BLOCK ScaleAnalogInput (*Scale an analog input value from counts to units*) (*$GROUP=User*) - VAR_INPUT - enable : BOOL; - input : INT; - configuration : hamAIO_CONFIG; - V : ARRAY[0..HAM_MAI_SCALE_POINTS] OF REAL; - mA : ARRAY[0..HAM_MAI_SCALE_POINTS] OF REAL; - units : ARRAY[0..HAM_MAI_SCALE_POINTS] OF REAL; - numberOfPoints : USINT; - update : BOOL; - END_VAR - VAR_OUTPUT - output : REAL; - status : DINT; - updateDone : BOOL; - END_VAR - VAR - internal : hamScaleAI_internal_typ; - END_VAR -END_FUNCTION_BLOCK - -FUNCTION hamTempSensorFn : BOOL - VAR_IN_OUT - t : hamTempSensor_typ; - END_VAR -END_FUNCTION - -FUNCTION subtractWithRollover : REAL (*Subtract two REALs and return the difference, corrected for rollover*) (*$GROUP=User*) - VAR_INPUT - minuend : REAL; - subtrahend : REAL; - rolloverPeriod : REAL; - END_VAR -END_FUNCTION - -FUNCTION Mean : LREAL (*Return the mean of a data set*) (*$GROUP=User*) - VAR_INPUT - pData : UDINT; - n : UDINT; - END_VAR -END_FUNCTION - -FUNCTION StandardDeviation : LREAL (*Compute the standard deviation of a data set*) (*$GROUP=User*) - VAR_INPUT - pData : UDINT; - n : UDINT; - END_VAR -END_FUNCTION - -FUNCTION_BLOCK Blink (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*) - VAR_INPUT - Enable : BOOL; - Time : DINT; - Percentage : UDINT; - END_VAR - VAR_OUTPUT - Out : BOOL; - END_VAR - VAR - TimerOff : TON; - TimerOn : TON; - onTime : UDINT; - offTime : UDINT; - _RTInfo : RTInfo; - END_VAR -END_FUNCTION_BLOCK - -FUNCTION_BLOCK Interval - VAR_INPUT - IN : BOOL; - PT : UDINT; (*[us]*) - END_VAR - VAR_OUTPUT - ET : UDINT; (*[us]*) - Q : BOOL; - END_VAR - VAR - start : UDINT; - started : BOOL; - END_VAR -END_FUNCTION_BLOCK - -FUNCTION_BLOCK FastTON - VAR_INPUT - IN : BOOL; - PT : UDINT; (*[us]*) - END_VAR - VAR_OUTPUT - ET : UDINT; (*[us]*) - Q : BOOL; - END_VAR - VAR - start : UDINT; - started : BOOL; - END_VAR -END_FUNCTION_BLOCK - -{REDUND_ERROR} FUNCTION_BLOCK SettleDown (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*) - VAR_INPUT - in : BOOL; - onTime : TIME; - offTime : TIME; - END_VAR - VAR_OUTPUT - out : BOOL; - END_VAR - VAR - internal : SdInternal_typ; - END_VAR -END_FUNCTION_BLOCK - -FUNCTION SimulationStatus : BOOL (*Used to find the Simulation status for your project*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*) - VAR_INPUT - pOverride : UDINT; (**) - END_VAR -END_FUNCTION diff --git a/example/AsProject/Logical/Libraries/Loupe/hammers/Hammers.typ b/example/AsProject/Logical/Libraries/Loupe/hammers/Hammers.typ deleted file mode 100644 index e270943..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/hammers/Hammers.typ +++ /dev/null @@ -1,40 +0,0 @@ -(* - * File: Hammers.typ - * Copyright (c) 2023 Loupe - * https://loupe.team - * - * This file is part of Hammers, licensed under the MIT License. - * - ******************************************************************** - * Data types of library Hammers - ********************************************************************) - -TYPE - hamAIO_CONFIG : - ( - hamAIO_CONFIG_V, - hamAIO_CONFIG_0_20_MA, - hamAIO_CONFIG_4_20_MA - ); - hamCYCLIC_POSITION : STRUCT - Integer : DINT; - Real : REAL; - END_STRUCT; - hamScaleAI_internal_typ : STRUCT - mtLookup_ctsToVmA : MTLookUpTable; - mtLookup_VmAToUnits : MTLookUpTable; - END_STRUCT; - SdInternal_typ : STRUCT - fb : SdFB_typ; - _in : BOOL; - state : SdState_enum; - END_STRUCT; - SdFB_typ : STRUCT - timer : TON; - END_STRUCT; - SdState_enum : - ( - ST_SD_IDLE, - ST_SD_DEBOUNCE - ); -END_TYPE diff --git a/example/AsProject/Logical/Libraries/Loupe/hammers/Hammers.var b/example/AsProject/Logical/Libraries/Loupe/hammers/Hammers.var deleted file mode 100644 index e38d9b6..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/hammers/Hammers.var +++ /dev/null @@ -1,14 +0,0 @@ -(* - * File: Hammers.var - * Copyright (c) 2023 Loupe - * https://loupe.team - * - * This file is part of Hammers, licensed under the MIT License. - * - ******************************************************************** - * Constants of library Hammers - ********************************************************************) -VAR CONSTANT - HAM_NUM_SCALE_POINTS : USINT := 50; - HAM_MAI_SCALE_POINTS : USINT := HAM_NUM_SCALE_POINTS-1; -END_VAR diff --git a/example/AsProject/Logical/Libraries/Loupe/hammers/SG4/Arm/Hammers.br b/example/AsProject/Logical/Libraries/Loupe/hammers/SG4/Arm/Hammers.br deleted file mode 100644 index e1254e4..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/hammers/SG4/Arm/Hammers.br and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/hammers/SG4/Arm/Hammers.h b/example/AsProject/Logical/Libraries/Loupe/hammers/SG4/Arm/Hammers.h deleted file mode 100644 index bf33095..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/hammers/SG4/Arm/Hammers.h +++ /dev/null @@ -1,260 +0,0 @@ -/* Automation Studio generated header file */ -/* Do not edit ! */ -/* Hammers 0.10.0 */ - -#ifndef _HAMMERS_ -#define _HAMMERS_ -#ifdef __cplusplus -extern "C" -{ -#endif -#ifndef _Hammers_VERSION -#define _Hammers_VERSION 0.10.0 -#endif - -#include - -#ifndef _BUR_PUBLIC -#define _BUR_PUBLIC -#endif -#ifdef _SG3 - #include "AsIOTime.h" - #include "standard.h" - #include "MTLookUp.h" -#endif -#ifdef _SG4 - #include "AsIOTime.h" - #include "standard.h" - #include "MTLookUp.h" -#endif -#ifdef _SGC - #include "AsIOTime.h" - #include "standard.h" - #include "MTLookUp.h" -#endif - - -/* Constants */ -#ifdef _REPLACE_CONST - #define HAM_NUM_SCALE_POINTS 50U - #define HAM_MAI_SCALE_POINTS 49U -#else - _GLOBAL_CONST unsigned char HAM_NUM_SCALE_POINTS; - _GLOBAL_CONST unsigned char HAM_MAI_SCALE_POINTS; -#endif - - - - -/* Datatypes and datatypes of function blocks */ -typedef enum hamAIO_CONFIG -{ hamAIO_CONFIG_V, - hamAIO_CONFIG_0_20_MA, - hamAIO_CONFIG_4_20_MA -} hamAIO_CONFIG; - -typedef enum SdState_enum -{ ST_SD_IDLE, - ST_SD_DEBOUNCE -} SdState_enum; - -typedef enum TEMP_LEVEL_enum -{ TEMP_LEVEL_OK, - TEMP_LEVEL_WARNING, - TEMP_LEVEL_HIGH -} TEMP_LEVEL_enum; - -typedef struct hamCYCLIC_POSITION -{ signed long Integer; - float Real; -} hamCYCLIC_POSITION; - -typedef struct hamScaleAI_internal_typ -{ struct MTLookUpTable mtLookup_ctsToVmA; - struct MTLookUpTable mtLookup_VmAToUnits; -} hamScaleAI_internal_typ; - -typedef struct SdFB_typ -{ struct TON timer; -} SdFB_typ; - -typedef struct SdInternal_typ -{ struct SdFB_typ fb; - plcbit _in; - enum SdState_enum state; -} SdInternal_typ; - -typedef struct hamTempSensor_OUT_typ -{ float Temperature; - enum TEMP_LEVEL_enum TempLevel; - plcbit HighTempAlarm; - plcbit WarningTempAlarm; -} hamTempSensor_OUT_typ; - -typedef struct hamTempSensor_IN_PAR_typ -{ signed short aiValue; -} hamTempSensor_IN_PAR_typ; - -typedef struct hamTempSensor_IN_CFG_typ -{ float ScaleFactor; - float HighTemp; - float WarningPercentage; - float HighPercentage; -} hamTempSensor_IN_CFG_typ; - -typedef struct hamTempSensor_IN_typ -{ struct hamTempSensor_IN_PAR_typ PAR; - struct hamTempSensor_IN_CFG_typ CFG; -} hamTempSensor_IN_typ; - -typedef struct hamTempSensor_typ -{ struct hamTempSensor_IN_typ IN; - struct hamTempSensor_OUT_typ OUT; -} hamTempSensor_typ; - -typedef struct AccumulateDistance -{ - /* VAR_INPUT (analog) */ - float input; - float period; - unsigned long pDistance; - /* VAR_OUTPUT (analog) */ - float outputREAL; - double outputLREAL; - struct hamCYCLIC_POSITION outputCYCLIC_POSITION; - /* VAR (analog) */ - float inputOld; - double delta; - /* VAR_INPUT (digital) */ - plcbit enable; - /* VAR_OUTPUT (digital) */ - plcbit initialized; -} AccumulateDistance_typ; - -typedef struct Accumulate -{ - /* VAR_INPUT (analog) */ - float input; - float period; - /* VAR_OUTPUT (analog) */ - float outputREAL; - double outputLREAL; - struct hamCYCLIC_POSITION outputCYCLIC_POSITION; - /* VAR (analog) */ - float inputOld; - double delta; - signed long numPeriods; - double accumulatedValue_add; - double accumulatedValue_mult; - /* VAR_INPUT (digital) */ - plcbit setToInput; - /* VAR (digital) */ - plcbit initialized; -} Accumulate_typ; - -typedef struct ScaleAnalogInput -{ - /* VAR_INPUT (analog) */ - signed short input; - enum hamAIO_CONFIG configuration; - float V[50]; - float mA[50]; - float units[50]; - unsigned char numberOfPoints; - /* VAR_OUTPUT (analog) */ - float output; - signed long status; - /* VAR (analog) */ - struct hamScaleAI_internal_typ internal; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit update; - /* VAR_OUTPUT (digital) */ - plcbit updateDone; -} ScaleAnalogInput_typ; - -typedef struct Blink -{ - /* VAR_INPUT (analog) */ - signed long Time; - unsigned long Percentage; - /* VAR (analog) */ - struct TON TimerOff; - struct TON TimerOn; - unsigned long onTime; - unsigned long offTime; - struct RTInfo _RTInfo; - /* VAR_INPUT (digital) */ - plcbit Enable; - /* VAR_OUTPUT (digital) */ - plcbit Out; -} Blink_typ; - -typedef struct Interval -{ - /* VAR_INPUT (analog) */ - unsigned long PT; - /* VAR_OUTPUT (analog) */ - unsigned long ET; - /* VAR (analog) */ - unsigned long start; - /* VAR_INPUT (digital) */ - plcbit IN; - /* VAR_OUTPUT (digital) */ - plcbit Q; - /* VAR (digital) */ - plcbit started; -} Interval_typ; - -typedef struct FastTON -{ - /* VAR_INPUT (analog) */ - unsigned long PT; - /* VAR_OUTPUT (analog) */ - unsigned long ET; - /* VAR (analog) */ - unsigned long start; - /* VAR_INPUT (digital) */ - plcbit IN; - /* VAR_OUTPUT (digital) */ - plcbit Q; - /* VAR (digital) */ - plcbit started; -} FastTON_typ; - -typedef struct SettleDown -{ - /* VAR_INPUT (analog) */ - plctime onTime; - plctime offTime; - /* VAR (analog) */ - struct SdInternal_typ internal; - /* VAR_INPUT (digital) */ - plcbit in; - /* VAR_OUTPUT (digital) */ - plcbit out; -} SettleDown_typ; - - - -/* Prototyping of functions and function blocks */ -_BUR_PUBLIC void AccumulateDistance(struct AccumulateDistance* inst); -_BUR_PUBLIC void Accumulate(struct Accumulate* inst); -_BUR_PUBLIC void ScaleAnalogInput(struct ScaleAnalogInput* inst); -_BUR_PUBLIC void Blink(struct Blink* inst); -_BUR_PUBLIC void Interval(struct Interval* inst); -_BUR_PUBLIC void FastTON(struct FastTON* inst); -_BUR_PUBLIC void SettleDown(struct SettleDown* inst); -_BUR_PUBLIC unsigned short crc_16(unsigned long input_str, unsigned long num_bytes); -_BUR_PUBLIC plcbit hamTempSensorFn(struct hamTempSensor_typ* t); -_BUR_PUBLIC float subtractWithRollover(float minuend, float subtrahend, float rolloverPeriod); -_BUR_PUBLIC double Mean(unsigned long pData, unsigned long n); -_BUR_PUBLIC double StandardDeviation(unsigned long pData, unsigned long n); -_BUR_PUBLIC plcbit SimulationStatus(unsigned long pOverride); - - -#ifdef __cplusplus -}; -#endif -#endif /* _HAMMERS_ */ - diff --git a/example/AsProject/Logical/Libraries/Loupe/hammers/SG4/Arm/libHammers.a b/example/AsProject/Logical/Libraries/Loupe/hammers/SG4/Arm/libHammers.a deleted file mode 100644 index 21e7966..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/hammers/SG4/Arm/libHammers.a and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/hammers/SG4/Hammers.br b/example/AsProject/Logical/Libraries/Loupe/hammers/SG4/Hammers.br deleted file mode 100644 index ba73b8b..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/hammers/SG4/Hammers.br and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/hammers/SG4/Hammers.h b/example/AsProject/Logical/Libraries/Loupe/hammers/SG4/Hammers.h deleted file mode 100644 index bf33095..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/hammers/SG4/Hammers.h +++ /dev/null @@ -1,260 +0,0 @@ -/* Automation Studio generated header file */ -/* Do not edit ! */ -/* Hammers 0.10.0 */ - -#ifndef _HAMMERS_ -#define _HAMMERS_ -#ifdef __cplusplus -extern "C" -{ -#endif -#ifndef _Hammers_VERSION -#define _Hammers_VERSION 0.10.0 -#endif - -#include - -#ifndef _BUR_PUBLIC -#define _BUR_PUBLIC -#endif -#ifdef _SG3 - #include "AsIOTime.h" - #include "standard.h" - #include "MTLookUp.h" -#endif -#ifdef _SG4 - #include "AsIOTime.h" - #include "standard.h" - #include "MTLookUp.h" -#endif -#ifdef _SGC - #include "AsIOTime.h" - #include "standard.h" - #include "MTLookUp.h" -#endif - - -/* Constants */ -#ifdef _REPLACE_CONST - #define HAM_NUM_SCALE_POINTS 50U - #define HAM_MAI_SCALE_POINTS 49U -#else - _GLOBAL_CONST unsigned char HAM_NUM_SCALE_POINTS; - _GLOBAL_CONST unsigned char HAM_MAI_SCALE_POINTS; -#endif - - - - -/* Datatypes and datatypes of function blocks */ -typedef enum hamAIO_CONFIG -{ hamAIO_CONFIG_V, - hamAIO_CONFIG_0_20_MA, - hamAIO_CONFIG_4_20_MA -} hamAIO_CONFIG; - -typedef enum SdState_enum -{ ST_SD_IDLE, - ST_SD_DEBOUNCE -} SdState_enum; - -typedef enum TEMP_LEVEL_enum -{ TEMP_LEVEL_OK, - TEMP_LEVEL_WARNING, - TEMP_LEVEL_HIGH -} TEMP_LEVEL_enum; - -typedef struct hamCYCLIC_POSITION -{ signed long Integer; - float Real; -} hamCYCLIC_POSITION; - -typedef struct hamScaleAI_internal_typ -{ struct MTLookUpTable mtLookup_ctsToVmA; - struct MTLookUpTable mtLookup_VmAToUnits; -} hamScaleAI_internal_typ; - -typedef struct SdFB_typ -{ struct TON timer; -} SdFB_typ; - -typedef struct SdInternal_typ -{ struct SdFB_typ fb; - plcbit _in; - enum SdState_enum state; -} SdInternal_typ; - -typedef struct hamTempSensor_OUT_typ -{ float Temperature; - enum TEMP_LEVEL_enum TempLevel; - plcbit HighTempAlarm; - plcbit WarningTempAlarm; -} hamTempSensor_OUT_typ; - -typedef struct hamTempSensor_IN_PAR_typ -{ signed short aiValue; -} hamTempSensor_IN_PAR_typ; - -typedef struct hamTempSensor_IN_CFG_typ -{ float ScaleFactor; - float HighTemp; - float WarningPercentage; - float HighPercentage; -} hamTempSensor_IN_CFG_typ; - -typedef struct hamTempSensor_IN_typ -{ struct hamTempSensor_IN_PAR_typ PAR; - struct hamTempSensor_IN_CFG_typ CFG; -} hamTempSensor_IN_typ; - -typedef struct hamTempSensor_typ -{ struct hamTempSensor_IN_typ IN; - struct hamTempSensor_OUT_typ OUT; -} hamTempSensor_typ; - -typedef struct AccumulateDistance -{ - /* VAR_INPUT (analog) */ - float input; - float period; - unsigned long pDistance; - /* VAR_OUTPUT (analog) */ - float outputREAL; - double outputLREAL; - struct hamCYCLIC_POSITION outputCYCLIC_POSITION; - /* VAR (analog) */ - float inputOld; - double delta; - /* VAR_INPUT (digital) */ - plcbit enable; - /* VAR_OUTPUT (digital) */ - plcbit initialized; -} AccumulateDistance_typ; - -typedef struct Accumulate -{ - /* VAR_INPUT (analog) */ - float input; - float period; - /* VAR_OUTPUT (analog) */ - float outputREAL; - double outputLREAL; - struct hamCYCLIC_POSITION outputCYCLIC_POSITION; - /* VAR (analog) */ - float inputOld; - double delta; - signed long numPeriods; - double accumulatedValue_add; - double accumulatedValue_mult; - /* VAR_INPUT (digital) */ - plcbit setToInput; - /* VAR (digital) */ - plcbit initialized; -} Accumulate_typ; - -typedef struct ScaleAnalogInput -{ - /* VAR_INPUT (analog) */ - signed short input; - enum hamAIO_CONFIG configuration; - float V[50]; - float mA[50]; - float units[50]; - unsigned char numberOfPoints; - /* VAR_OUTPUT (analog) */ - float output; - signed long status; - /* VAR (analog) */ - struct hamScaleAI_internal_typ internal; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit update; - /* VAR_OUTPUT (digital) */ - plcbit updateDone; -} ScaleAnalogInput_typ; - -typedef struct Blink -{ - /* VAR_INPUT (analog) */ - signed long Time; - unsigned long Percentage; - /* VAR (analog) */ - struct TON TimerOff; - struct TON TimerOn; - unsigned long onTime; - unsigned long offTime; - struct RTInfo _RTInfo; - /* VAR_INPUT (digital) */ - plcbit Enable; - /* VAR_OUTPUT (digital) */ - plcbit Out; -} Blink_typ; - -typedef struct Interval -{ - /* VAR_INPUT (analog) */ - unsigned long PT; - /* VAR_OUTPUT (analog) */ - unsigned long ET; - /* VAR (analog) */ - unsigned long start; - /* VAR_INPUT (digital) */ - plcbit IN; - /* VAR_OUTPUT (digital) */ - plcbit Q; - /* VAR (digital) */ - plcbit started; -} Interval_typ; - -typedef struct FastTON -{ - /* VAR_INPUT (analog) */ - unsigned long PT; - /* VAR_OUTPUT (analog) */ - unsigned long ET; - /* VAR (analog) */ - unsigned long start; - /* VAR_INPUT (digital) */ - plcbit IN; - /* VAR_OUTPUT (digital) */ - plcbit Q; - /* VAR (digital) */ - plcbit started; -} FastTON_typ; - -typedef struct SettleDown -{ - /* VAR_INPUT (analog) */ - plctime onTime; - plctime offTime; - /* VAR (analog) */ - struct SdInternal_typ internal; - /* VAR_INPUT (digital) */ - plcbit in; - /* VAR_OUTPUT (digital) */ - plcbit out; -} SettleDown_typ; - - - -/* Prototyping of functions and function blocks */ -_BUR_PUBLIC void AccumulateDistance(struct AccumulateDistance* inst); -_BUR_PUBLIC void Accumulate(struct Accumulate* inst); -_BUR_PUBLIC void ScaleAnalogInput(struct ScaleAnalogInput* inst); -_BUR_PUBLIC void Blink(struct Blink* inst); -_BUR_PUBLIC void Interval(struct Interval* inst); -_BUR_PUBLIC void FastTON(struct FastTON* inst); -_BUR_PUBLIC void SettleDown(struct SettleDown* inst); -_BUR_PUBLIC unsigned short crc_16(unsigned long input_str, unsigned long num_bytes); -_BUR_PUBLIC plcbit hamTempSensorFn(struct hamTempSensor_typ* t); -_BUR_PUBLIC float subtractWithRollover(float minuend, float subtrahend, float rolloverPeriod); -_BUR_PUBLIC double Mean(unsigned long pData, unsigned long n); -_BUR_PUBLIC double StandardDeviation(unsigned long pData, unsigned long n); -_BUR_PUBLIC plcbit SimulationStatus(unsigned long pOverride); - - -#ifdef __cplusplus -}; -#endif -#endif /* _HAMMERS_ */ - diff --git a/example/AsProject/Logical/Libraries/Loupe/hammers/SG4/libHammers.a b/example/AsProject/Logical/Libraries/Loupe/hammers/SG4/libHammers.a deleted file mode 100644 index ec84793..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/hammers/SG4/libHammers.a and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/hammers/TempSensor.typ b/example/AsProject/Logical/Libraries/Loupe/hammers/TempSensor.typ deleted file mode 100644 index 293cb98..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/hammers/TempSensor.typ +++ /dev/null @@ -1,41 +0,0 @@ -(* - * File: TempSensor.typ - * Copyright (c) 2023 Loupe - * https://loupe.team - * - * This file is part of Hammers, licensed under the MIT License. - * - *) - - -TYPE - TEMP_LEVEL_enum : - ( - TEMP_LEVEL_OK, - TEMP_LEVEL_WARNING, - TEMP_LEVEL_HIGH - ); - hamTempSensor_OUT_typ : STRUCT - Temperature : REAL; (*[�C]*) - TempLevel : TEMP_LEVEL_enum; - HighTempAlarm : BOOL; - WarningTempAlarm : BOOL; - END_STRUCT; - hamTempSensor_IN_PAR_typ : STRUCT - aiValue : INT; - END_STRUCT; - hamTempSensor_IN_CFG_typ : STRUCT - ScaleFactor : REAL; (*default [0.1�C]*) - HighTemp : REAL; (*[�C]*) - WarningPercentage : REAL; (*default 85% [%]*) - HighPercentage : REAL; (*default 95% [%]*) - END_STRUCT; - hamTempSensor_IN_typ : STRUCT - PAR : hamTempSensor_IN_PAR_typ; - CFG : hamTempSensor_IN_CFG_typ; - END_STRUCT; - hamTempSensor_typ : STRUCT - IN : hamTempSensor_IN_typ; - OUT : hamTempSensor_OUT_typ; - END_STRUCT; -END_TYPE diff --git a/example/AsProject/Logical/Libraries/Loupe/hammers/cABS.h b/example/AsProject/Logical/Libraries/Loupe/hammers/cABS.h deleted file mode 100644 index 2929e28..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/hammers/cABS.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * File: cABS.h - * Copyright (c) 2023 Loupe - * https://loupe.team - * - * This file is part of Hammers, licensed under the MIT License. - * - */ - -#ifndef __C_ABS_H__ -#define __C_ABS_H__ - -#define ABS(x) ((x)<0 ? -(x) : (x)) - -#endif diff --git a/example/AsProject/Logical/Libraries/Loupe/hammers/package.json b/example/AsProject/Logical/Libraries/Loupe/hammers/package.json deleted file mode 100644 index 2290b89..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/hammers/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@loupeteam/hammers", - "version": "0.10.0", - "description": "Loupe's hammers library for Automation Runtime", - "homepage": "https://loupeteam.github.io/LoupeDocs/libraries/hammers.html", - "scripts": {}, - "keywords": [], - "author": "Loupe", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/loupeteam/hammers" - }, - "lpm": { - "type": "library" - }, - "dependencies": {} -} \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/Loupe/hmitools/Binary.lby b/example/AsProject/Logical/Libraries/Loupe/hmitools/Binary.lby deleted file mode 100644 index 7733d23..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/hmitools/Binary.lby +++ /dev/null @@ -1,26 +0,0 @@ - - - - HMITools.typ - HMITools.var - HMITools.fun - HMI_Basic.typ - HMI_Basic.var - HMI_File_Browse.typ - LogViewer.typ - EditorControl.typ - HMI_Trend.typ - RecipeMgr.typ - Updater.typ - CHANGELOG.md - - - - - - - - - - - diff --git a/example/AsProject/Logical/Libraries/Loupe/hmitools/CHANGELOG.md b/example/AsProject/Logical/Libraries/Loupe/hmitools/CHANGELOG.md deleted file mode 100644 index 3744f67..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/hmitools/CHANGELOG.md +++ /dev/null @@ -1,113 +0,0 @@ -0.11.4 - Migrate from AsString to AsBrStr - -0.11.3 - Refresh file list when changing directories - -0.11.2 - Refresh DirectoryFub if filter changes. - -0.11.1 - Fix some bugs with DirectoryFub(). - Change DirectoryFub() refresh rate from 1s to 60s (perhaps temporarily). - Add explicit Refresh to DirectoryFub() and HMIFileBrowse(). - -0.11.0 - 20151030 - Added support for dataobjects in HMIFileBrowse(). - -0.10.4 - 20151007 - Listbox fub find index is more strict. Only selects index if it matches exaclty. - -0.10.3 - 20150914 - Fixed some issues in log viewer that cause IEC check library to complain. - -0.10.2 - 20150805 - Option to show or hide hidden files. - -0.10.1 - 20150701 - Fixed bug in HMI File Browse that causes the file selection to go nuts if a filter is applied. - -0.10.0 - 20150601 - Added confirm bit to buttons. - -0.09.6 - 20140108 - Moved recipe manager logging to LogThat functions - -0.09.5 - 20131115 - Modified recipe manager to do logging. - - Added a modified status to recipe manager. - -0.09.4 - 20131111 - DirectoryFub: Will filter file extensions only of exact match. - HMI_File_Browse: Internal vars placed into "Internal" structure. - -0.09.3 - 20131108 - Added RecipeMgr() fn. Allows for simple structure copies through VC, and will integrate with the CSVFileLib - -0.09.2 - 20131106 - FUB rename: HMIDirectory to HMIFileBrowse - -0.09.1 - 20131105 - Directoryfub changes: - - If internal fubs return busy, jump out of for loop. - -0.09.0 - 20131104 - HMIDirectory changes: - - Allow the developer to not use inputs that are optional. - - Show the applied filter in the status - - " " in filter will clear filter. - -0.08.9 - 20130909 - ListSelection resets selected value to -1 when enable is false. - -0.08.8 - 20130812 - Updated HMIDirectory for file/directory browsing - -0.08.7 - 20130729 - Updated RingBufLib dependency version. - -0.08.7 - 20130802 - Added index datapoint to HMI_Button_typ - -0.08.6 - 20130702 - Updated for new RingBufLib functions. - -0.08.5 - 20130701 - Changed dependency from RingBufST to RingBufLib - -0.08.4 - 20130628 - Get info will no longer flash error and status if it can't find the logger. - - Better handling of switching between loggers so that there aren't random entries from other loggers - - LogViewHMI will display error from LogView as first item in list - -0.08.3 - 20130522 - Removed HMI_STRING derived type, as it is incompatible with AS 3.0.81. - -0.08.2 - 20130401 - Merged TrendLib 1.90.1 into HMITools. - -0.08.1 - 20121227 - Merged with HMITools library. - -0.07.0 - 20120416 - Added HMI_Scale_typ - -0.06.0 - 20120330 - Added PageSize to HMI_Listbox_typ - -0.05.0 - 20120330 - Changed STRLEN_IN from 80 to 260 - -0.04.0 - 20120104 - Release version of 0.03.3. - -0.03.3 - 20111214 - Minor tweaks to data types. CHECK COMPATIBILITY. - -0.03.2 - 20111111 - Added CalibrationStateDP to HMI_Basic_typ. - -0.03.1 - 20111019 - Changed datatypes to be consistent with VC names. - Removed UserLevel from HMI_Basic_typ. - -0.03.0 - 20110801 - Release version of 0.02.2. Includes toggle tabs and external page changes. - -0.02.2 - 20110729 - First try at external page changes with toggle tabs. - -0.02.1 - 20110531 - First try at toggle tab CMDs. - Tested, but external page changes are impossible at this point. - -0.02.0 - 20110518 - Release version of 0.01.3. - Still need to make tab CMDs toggles instead of sets. This is going to be tricky. - -0.01.3 - 20110518 - Third crack at generic tab fns - -0.01.2 - 20110518 - Second crack at generic tab fns - Added HMI_Basic_typ - -0.01.1 - 20110517 - First crack at generic tab fns - Added HMI_FindCurrTab function to find current primary and secondary tab - -0.01.0 - 20110509 - Release version of 0.00.4 - -0.00.4 - 20110503 - Changed library name from HMI_Types to HMI_Basic - Added HMI_Show, HMI_Hide, HMI_Lock, and HMI_Unlock functions - Changed all "Visible" elements to "StatusDP" - Removed almost all "Lock" elements - Added HMI_SetFocus, HMI_ResetFocus, and HMI_OpenTouchpad functions - -0.00.3 - 20110325 - Added Completion field to HMI_Listbox_typ - -0.00.2 - 20110318 - Changed name from HMITypLib to HMI_Types. - This denotes that the library contains ONLY datatypes, no functions. - Added HMI_ to all datatypes (Button_typ -> HMI_Button_typ). - Changed 'Datapoint' to 'DP' (ColorDatapoint -> ColorDP). - -0.00.1 - 20110310 - First version \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/Loupe/hmitools/EditorControl.typ b/example/AsProject/Logical/Libraries/Loupe/hmitools/EditorControl.typ deleted file mode 100644 index fc1beb0..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/hmitools/EditorControl.typ +++ /dev/null @@ -1,91 +0,0 @@ -(* -* File: EditorControl.typ -* Copyright (c) 2023 Loupe -* https://loupe.team -* -* This file is part of HMITools, licensed under the MIT License. -* -*) -(*Application Editor*) - -TYPE - HMI_Editor_Controller_typ : STRUCT - CMD : HMI_Editor_Controller_CMD_typ; - HMI : HMI_EditControl_typ; - Internal : HMI_Editor_Controller_int_typ; - END_STRUCT; - HMI_Editor_Controller_int_typ : STRUCT - CMD : HMI_Editor_Controller_CMD_typ; - END_STRUCT; - HMI_Editor_Controller_CMD_typ : STRUCT - Load : BOOL; - Save : BOOL; - Clear : BOOL; - END_STRUCT; -END_TYPE - -(*HMI Connections*) - -TYPE - HMI_EditControl_Internal_typ : STRUCT - CurrentLineText : STRING[200]; - CurrentLineIndex : UINT; - CommandState : USINT; - EditText : STRING[80]; - DesiredLine : USINT; - DesiredColumn : USINT; - Offset : USINT; - Count : USINT; - highlightmode : USINT; - END_STRUCT; - HMI_EditControl_Runtime_Edit_typ : STRUCT - CursorLineDp : UINT; - CursorColumnDp : UINT; - InsertModeDp : UINT; - ModifiedDp : UINT; - SelectionModeDp : UINT; - END_STRUCT; - HMI_EditControl_Runtime_Comp_typ : STRUCT - CompletionDP : UINT; - END_STRUCT; - HMI_EditControl_Runtime_Cmds_typ : STRUCT - ResponseDp : STRING[80]; - RequestDp : STRING[80]; - StatusDP : UINT; - END_STRUCT; - HMI_EditControl_Runtime_typ : STRUCT - StatusDp : UINT; - BusyDp : UINT; - Commands : HMI_EditControl_Runtime_Cmds_typ; - Completion : HMI_EditControl_Runtime_Comp_typ; - Edit : HMI_EditControl_Runtime_Edit_typ; - END_STRUCT; - HMI_EditControl_Value_typ : STRUCT - Content : STRING[1000]; - URLDp : STRING[80]; - END_STRUCT; - HMI_EditControl_typ : STRUCT - Value : HMI_EditControl_Value_typ; - Runtime : HMI_EditControl_Runtime_typ; - internal : HMI_EditControl_Internal_typ; - Command : HMI_EditControl_CMDS; - END_STRUCT; - HMI_EditControl_CMDS : - ( - EC_, - EC_APPEND, - EC_CLEAR, - EC_DELETE, - EC_GET_LINE, - EC_GET_MARKED_TEXT, - EC_GET_TEXT_SIZE, - EC_GOTO, - EC_HIGHLIGHT, - EC_INSERT, - EC_LOAD, - EC_READ, - EC_REPLACE_MARKED_TEXT, - EC_SAVE, - EC_UPDATE - ); -END_TYPE diff --git a/example/AsProject/Logical/Libraries/Loupe/hmitools/HMITools.fun b/example/AsProject/Logical/Libraries/Loupe/hmitools/HMITools.fun deleted file mode 100644 index 530151a..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/hmitools/HMITools.fun +++ /dev/null @@ -1,450 +0,0 @@ -(* -* File: HMITools.fun -* Copyright (c) 2023 Loupe -* https://loupe.team -* -* This file is part of HMITools, licensed under the MIT License. -* -*) -(* -Application Ready Functions - -These can be connected directly to an HMI with minimal work -*) - -FUNCTION_BLOCK HMIFileBrowse (*HMI Ready file Selection function block with extensions*) - VAR_INPUT - Enable : BOOL; (*Enable Function Block*) - Refresh : BOOL; - FileDevice : STRING[80]; (*File device to look for files/directories*) - EnableDirectorySearch : BOOL; (*Enable to look for directories*) - EnableDataObjects : BOOL; - BrowseToDirectory : BOOL; (*Command to browse into selected directory *) - pDirectorySearchPath : UDINT; (*Search path within the file device*) - pFileList : UDINT; (*List to hold file names*) - MaxFiles : UDINT; (*Maximum number of file names list will hold*) - pFileExtList : UDINT; (*List to hold file extensions*) - MaxExt : UINT; (*Maximum number of file extensions list will hold*) - FileIndex : DINT; (*Selected file index*) - FileSelection : STRING[LIST_BOX_STRING_SIZE]; (*Selected file name*) - FileExtIndex : DINT; (*Selected file extension index*) - FileExtSelection : STRING[LIST_BOX_STRING_SIZE]; (*Selected file extension*) - END_VAR - VAR_OUTPUT - CompletionDP : BOOL; - CurrentPath : STRING[LIST_BOX_STRING_SIZE]; - NumFiles : UINT; - Status : STRING[LIST_BOX_STRING_SIZE]; - END_VAR - VAR - Internal : HMI_File_Browse_internal_typ; - END_VAR -END_FUNCTION_BLOCK - -FUNCTION_BLOCK ListBoxFub (*HMI Ready list box*) - VAR_INPUT - Enable : BOOL; (*Enable function block*) - Selection : UDINT; (*Address of Selection String*) - SelectionList : UDINT; (*List of strings to select from*) - IndexDP : DINT; (*List box select index*) - MinDP : UINT; (*List box min DP*) - MaxDP : UINT; (*List box max DP*) - OptionDP : UINT; (*List box option DP*) - StatusDP : UINT; (*List box Status DP*) - ColorDP : UINT; (*List box Color DP*) - PageSize : UINT; (*Page size*) - END_VAR - VAR_OUTPUT - CompletionDP : BOOL; - END_VAR - VAR - Files : REFERENCE TO ARRAY[0..0] OF STRING[LIST_BOX_STRING_SIZE]; - intIndex : DINT := 1; - pValue : REFERENCE TO STRING[LIST_BOX_STRING_SIZE]; - oValue : STRING[LIST_BOX_STRING_SIZE]; - END_VAR -END_FUNCTION_BLOCK - -FUNCTION LogView_init : BOOL (*Allocates resources for caching data from logger*) - VAR_INPUT - LogView : LogView_typ; - END_VAR -END_FUNCTION - -FUNCTION LogView_cyclic : BOOL (*Handles caching data from logger*) - VAR_INPUT - LogView : LogView_typ; - END_VAR - VAR - iNewEntry : LogData; - MaxTopIndex : UDINT; - pEntry : REFERENCE TO LogData; - END_VAR -END_FUNCTION - -FUNCTION LogView_HMI : BOOL (*Handles displaying alarms from buffer on HMI*) - VAR_INPUT - LogView : LogView_typ; - LogViewHMI : LogView_HMI_typ; - END_VAR - VAR - iLogData : REFERENCE TO LogData; - pLogList : REFERENCE TO ARRAY[0..99] OF STRING[LIST_BOX_STRING_SIZE]; - iNumDisplay : UINT; - i : UINT; - iOffsetCount : UDINT; - iOffset : UDINT; - TempErrorID : STRING[8]; - END_VAR -END_FUNCTION - -FUNCTION Editor_fn : BOOL (*HMI Ready editor control *) - VAR_INPUT - EditorController : HMI_Editor_Controller_typ; - END_VAR -END_FUNCTION - -FUNCTION TrendFn : BOOL (*Function for controlling a trend object. Function should be called in the Init and Cyclic subroutines.*) - VAR_IN_OUT - t : HMI_Trend_typ; (*Trend control object*) - END_VAR - VAR - i : USINT; (*Loop counter*) - END_VAR -END_FUNCTION - -FUNCTION HMI_TabControlFn_Cyclic : BOOL (*Handle tab based page switching*) - VAR_IN_OUT - t : HMI_Basic_typ; (*HMI_Basic control object*) - END_VAR - VAR - p : UINT; (*Primary tab index*) - ss : UINT; (*Secondary tab index for looping*) - SecondaryTabIndex : UINT; (*Intermediate variable for primary tab page changes*) - PrimaryActive : BOOL; (*At least one primary tab is active*) - SecondaryActive : BOOL; (*At least one secondary tab is active*) - END_VAR -END_FUNCTION -(* -Application Builder Functions - -These functions can be used as building blocks -*) - -FUNCTION HMI_Hide : BOOL (*Hide an item on the screen*) - VAR_IN_OUT - StatusDP : UINT; (*Item StatusDP*) - END_VAR -END_FUNCTION - -FUNCTION HMI_Show : BOOL (*Show an item on the screen*) - VAR_IN_OUT - StatusDP : UINT; (*Item StatusDP*) - END_VAR -END_FUNCTION - -FUNCTION HMI_Lock : BOOL (*Lock an item on the screen*) - VAR_IN_OUT - StatusDP : UINT; (*Item StatusDP*) - END_VAR -END_FUNCTION - -FUNCTION HMI_Unlock : BOOL (*Unlock an item on the screen*) - VAR_IN_OUT - StatusDP : UINT; (*Item StatusDP*) - END_VAR -END_FUNCTION - -FUNCTION HMI_SetFocus : BOOL (*Sets the focus for an item on the screen. FOCUS MUST BE RESET!*) - VAR_IN_OUT - StatusDP : UINT; - END_VAR -END_FUNCTION - -FUNCTION HMI_ResetFocus : BOOL (*Resets the focus bit for an item on the screen. THIS DOES NOT MOVE THE FOCUS!*) - VAR_IN_OUT - StatusDP : UINT; - END_VAR -END_FUNCTION - -FUNCTION HMI_OpenTouchpad : BOOL (*Opens the touchpad for an item on the screen*) - VAR_IN_OUT - StatusDP : UINT; - END_VAR -END_FUNCTION - -FUNCTION_BLOCK DirectoryFub (*Loads a directory and files on file extension*) - VAR_INPUT - Enable : BOOL; (*Enable function block*) - Refresh : BOOL; - EnableDirectorySearch : BOOL; (*Enable to look for directories*) - ShowHiddenFiles : BOOL; (*Enable showing files that start with a dot*) - FileDevice : STRING[80]; (*Directory file device*) - pPath : UDINT; (*Search path within the file device*) - MaxValues : UDINT; (*Maximum number of files that list will hold*) - NameFilter : STRING[LIST_BOX_STRING_SIZE]; (*File/Diretory name filter*) - FileList : UDINT; (*List to hold file names*) - FileExt : STRING[LIST_BOX_STRING_SIZE]; (*File extension to filter*) - END_VAR - VAR_OUTPUT - NumFiles : UINT; - status : UINT; - Updating : BOOL; - Initialized : BOOL; - END_VAR - VAR - DirectoryOpen : DirOpen; - DirectoryRead : DirReadEx; - DirectoryClose : DirClose; - Ident : UDINT; - State : USINT; - ListFileIndex : UINT; - index : UINT; - Files : REFERENCE TO ARRAY[0..0] OF STRING[LIST_BOX_STRING_SIZE]; - DirData : fiDIR_READ_EX_DATA; - TempString : STRING[LIST_BOX_STRING_SIZE]; - TempExtension : STRING[LIST_BOX_STRING_SIZE]; - lcTempString : STRING[LIST_BOX_STRING_SIZE]; - lcNameFilter : STRING[LIST_BOX_STRING_SIZE]; - iNameFilter : STRING[LIST_BOX_STRING_SIZE]; (*File/Diretory name filter*) - UpdateTimer : TON; - i : UINT; - IsolatedChar : USINT; - END_VAR -END_FUNCTION_BLOCK - -FUNCTION EditorControl : BOOL (*Controls an HMI edit control*) - VAR_INPUT - Editor : HMI_EditControl_typ; - END_VAR -END_FUNCTION - -FUNCTION ControlTouch : UINT (*Handles a custom HMI control*) - VAR_INPUT - StatusDP : REFERENCE TO UINT; - END_VAR - VAR - State : UINT; - END_VAR -END_FUNCTION - -FUNCTION ControlDismiss : BOOL (*Handles a custom HMI control*) - VAR_INPUT - StatusDP : REFERENCE TO UINT; - END_VAR -END_FUNCTION - -FUNCTION_BLOCK Trend_ZoomScroll (*Smart handling of trend zooming and scaling*) - VAR_INPUT - ZoomBase : REAL; (*Factor for zooming in and out. Will be multiplied or divided by to zoom. E.g. a ZoomBase of 2 will double or half the range when zooming in or out, respectively.*) - ZoomIn : BOOL; (*Zoom in command*) - ZoomOut : BOOL; (*Zoom out command*) - ScrollBase : REAL; (*Factor for scrolling positive or negative. Percentage of current range to scroll. E.g. a ScrollBase of 0.1 will scroll 10% of current range in the positive or negative direction.*) - ScrollPos : BOOL; (*Scroll positive command*) - ScrollNeg : BOOL; (*Scroll negative command*) - Reset : BOOL; (*Reset to default scroll and zoom and set to AutoUpdate scrolling*) - END_VAR - VAR_OUTPUT - ZoomDP : REAL; (*ZoomDatapoint for VC object*) - ScrollDP : REAL; (*ScrollDatapoint for VC object*) - ModeDP : UINT; (*Mode datapoint for time scrolling (1 = AutoUpdate, 0 = No AutoUpdate).*) - END_VAR - VAR - Init : BOOL; (*Flag to set ZoomDP and ScrollDP to default values*) - Midpt : REAL; (*Current midpoint of the display. Used to calculate scroll while zooming to maintain the midpoint of the display.*) - END_VAR -END_FUNCTION_BLOCK -(* -Log Viewer -*) - -FUNCTION LogViewerGetAlarmString : UDINT - VAR_INPUT - t : LogView_GetAlarm; - AlarmIndex : UDINT; - LoggerIdent : UDINT; - END_VAR - VAR_IN_OUT - OutputString : STRING[LIST_BOX_STRING_SIZE]; - END_VAR -END_FUNCTION - -FUNCTION LogViewerCreateString : BOOL (*Log Viewer helper function to create the log string*) - VAR_INPUT - ReadData : asarlogREAD; - ASCIIData : ARRAY[0..255] OF USINT; - END_VAR - VAR_IN_OUT - OutputString : STRING[LIST_BOX_STRING_SIZE]; - END_VAR - VAR - iString : STRING[LIST_BOX_STRING_SIZE]; - iConvString : STRING[LIST_BOX_STRING_SIZE]; - END_VAR -END_FUNCTION -(* -Editor Control Functions -*) - -FUNCTION EditControl_CS_replaceline : UDINT (*Editor Control helper*) - VAR_INPUT - Text : STRING[80]; - Line : UINT; - END_VAR - VAR_IN_OUT - Output : STRING[80]; - END_VAR - VAR - temp : STRING[80]; - END_VAR -END_FUNCTION - -FUNCTION EditControl_CS_append : UDINT (*Editor Control helper*) - VAR_INPUT - Text : STRING[80]; - END_VAR - VAR_IN_OUT - Output : STRING[80]; - END_VAR -END_FUNCTION - -FUNCTION EditControl_CS_getline : UDINT (*Editor Control helper *) - VAR_INPUT - Line : UINT; - END_VAR - VAR_IN_OUT - Output : STRING[80]; - END_VAR - VAR - temp : STRING[80]; - END_VAR -END_FUNCTION - -FUNCTION EditControl_CS_goto : UDINT (*Editor Control helper*) - VAR_INPUT - Line : UINT; - Col : UINT; - END_VAR - VAR_IN_OUT - Output : STRING[80]; - END_VAR - VAR - temp : STRING[80]; - END_VAR -END_FUNCTION - -FUNCTION EditControl_CS_highlight : UDINT (*Editor Control helper*) - VAR_INPUT - Value : UINT; - Mode : UINT; - END_VAR - VAR_IN_OUT - Output : STRING[80]; - END_VAR - VAR - temp : STRING[80]; - END_VAR -END_FUNCTION - -FUNCTION EditControl_CS_insert : UDINT (*Editor Control helper*) - VAR_INPUT - Text : STRING[80]; - Line : UINT; - END_VAR - VAR_IN_OUT - Output : STRING[80]; - END_VAR - VAR - temp : STRING[80]; - END_VAR -END_FUNCTION - -FUNCTION EditControl_CS_read : UDINT (*Editor Control helper*) - VAR_INPUT - Offset : UINT; - Count : UINT; - END_VAR - VAR_IN_OUT - Output : STRING[80]; - END_VAR - VAR - temp : STRING[80]; - END_VAR -END_FUNCTION - -FUNCTION EditControl_CS_replacemarked : UDINT (*Editor Control helper*) - VAR_INPUT - Text : STRING[80]; - END_VAR - VAR_IN_OUT - Output : STRING[80]; - END_VAR -END_FUNCTION -(* -Internal Functions, these functions should not be use, they are meant only for internal use -*) - -FUNCTION HMI_FindCurrentTab : BOOL (*Function to find the current primary and secondary tab based on the current page*) - VAR_IN_OUT - t : HMI_Basic_typ; (*HMI_Basic control object*) - END_VAR - VAR - p : UINT; (*Primary tab index*) - ss : UINT; (*Secondary tab index*) - END_VAR -END_FUNCTION - -FUNCTION FindIndexOfString : DINT (*TODO: Add your comment here*) - VAR_INPUT - Value : STRING[LIST_BOX_STRING_SIZE]; - List : UDINT; - MaxList : UDINT; - END_VAR - VAR - Files : REFERENCE TO ARRAY[0..0] OF STRING[LIST_BOX_STRING_SIZE]; - iteration : UDINT; - TempString : STRING[320]; - TempString1 : STRING[320]; - END_VAR -END_FUNCTION - -FUNCTION RecipeMgr : DINT (*Manage copying recipes to and from a running system and the HMI*) (*$GROUP=User*) - VAR_INPUT - Rec : RecipeMgr_typ; - END_VAR -END_FUNCTION - -FUNCTION_BLOCK FileQueue - VAR_INPUT - FileDevice : STRING[80]; - Path : STRING[320]; (*Maximum number of files that list will hold*) - Next : BOOL; - Cancel : BOOL; - END_VAR - VAR_OUTPUT - FileName : STRING[80]; - Execute : BOOL; - Done : BOOL; - Busy : BOOL; - Error : BOOL; - ErrorID : UDINT; - END_VAR - VAR - internal : RecipeUpdater_Internal_typ; - END_VAR -END_FUNCTION_BLOCK - -FUNCTION GetDataObjectList : UINT (* *) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*) - VAR_INPUT - List : UDINT; - MaxObjects : UDINT; - END_VAR - VAR - Files : REFERENCE TO ARRAY[0..0] OF STRING[LIST_BOX_STRING_SIZE]; - index : UINT; - numberVariables : UINT; - objectIndex : UINT; - Item : MO_List_typ; - duplicate : BOOL; - END_VAR -END_FUNCTION diff --git a/example/AsProject/Logical/Libraries/Loupe/hmitools/HMITools.typ b/example/AsProject/Logical/Libraries/Loupe/hmitools/HMITools.typ deleted file mode 100644 index f417165..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/hmitools/HMITools.typ +++ /dev/null @@ -1,17 +0,0 @@ -(* -* File: HMITools.typ -* Copyright (c) 2023 Loupe -* https://loupe.team -* -* This file is part of HMITools, licensed under the MIT License. -* -*) - -TYPE - HMI_ERR_enum : - ( - HMI_ERR_OK := 0, - HMI_ERR_INVALIDINPUT := 50000, - HMI_ERR_BUSY := 65535 - ); -END_TYPE diff --git a/example/AsProject/Logical/Libraries/Loupe/hmitools/HMITools.var b/example/AsProject/Logical/Libraries/Loupe/hmitools/HMITools.var deleted file mode 100644 index c29d2ef..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/hmitools/HMITools.var +++ /dev/null @@ -1,12 +0,0 @@ -(* -* File: HMITools.var -* Copyright (c) 2023 Loupe -* https://loupe.team -* -* This file is part of HMITools, licensed under the MIT License. -* -*) -VAR CONSTANT - LIST_BOX_STRING_SIZE : UINT := 260; - fiEXTENSION : USINT := 3; -END_VAR diff --git a/example/AsProject/Logical/Libraries/Loupe/hmitools/HMI_Basic.typ b/example/AsProject/Logical/Libraries/Loupe/hmitools/HMI_Basic.typ deleted file mode 100644 index 722fa64..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/hmitools/HMI_Basic.typ +++ /dev/null @@ -1,119 +0,0 @@ -(* -* File: HMI_Basic.typ -* Copyright (c) 2023 Loupe -* https://loupe.team -* -* This file is part of HMITools, licensed under the MIT License. -* -*) - -TYPE - HMI_StatusBits_enum : - ( - HMI_STATBIT_VIS := 0, - HMI_STATBIT_LOCK, - HMI_STATBIT_FOCUS, - HMI_STATBIT_TOUCHPAD - ); - HMI_Layer_typ : STRUCT - StatusDP : UINT; - END_STRUCT; - HMI_Shape_typ : STRUCT - StatusDP : UINT; - ColorDP : UINT; - END_STRUCT; - HMI_Scale_typ : STRUCT - Value : REAL; - MinDP : REAL; - MaxDP : REAL; - RangeStartDP : REAL; - RangeEndDP : REAL; - RangeColorDP : UINT; - StatusDP : UINT; - ColorDP : UINT; - END_STRUCT; - HMI_Listbox_typ : STRUCT - IndexDP : DINT; - MinDP : UINT; - MaxDP : UINT; - OptionDP : UINT; - StatusDP : UINT; - ColorDP : UINT; - CompletionDP : UINT; - PageSize : UINT; - END_STRUCT; - HMI_Bitmap_typ : STRUCT - IndexDP : UINT; - StatusDP : UINT; - END_STRUCT; - HMI_StringIn_typ : STRUCT - String : STRING[HMI_STRLEN_IN]; - StatusDP : UINT; - ColorDP : UINT; - CompletionDP : UINT; - END_STRUCT; - HMI_Dropdown_typ : STRUCT - IndexDP : UINT; - StatusDP : UINT; - ColorDP : UINT; - END_STRUCT; - HMI_TextBox_typ : STRUCT - IndexDP : UINT; - StatusDP : UINT; - ColorDP : UINT; - END_STRUCT; - HMI_NumericIn_typ : STRUCT - Value : REAL; - MinDP : REAL; - MaxDP : REAL; - StatusDP : UINT; - ColorDP : UINT; - CompletionDP : UINT; - END_STRUCT; - HMI_NumericOut_typ : STRUCT - Value : REAL; - StatusDP : UINT; - ColorDP : UINT; - END_STRUCT; - HMI_ButtonVC3_typ : STRUCT - CMD : USINT; - Lock : UINT; - ColorDP : UINT; - LEDDP : USINT; - END_STRUCT; - HMI_Button_typ : STRUCT - CMD : BOOL; - Confirm : BOOL; - StatusDP : UINT; - IndexDP : UINT; - ColorDP : UINT; - LEDDP : USINT; - END_STRUCT; - HMI_SecondaryTab_typ : STRUCT - ChangeToSecondaryTab : BOOL; (*CMD to change to this secondary tab*) - PageIndex : UINT; (*Page index for this secondary tab*) - END_STRUCT; - HMI_PrimaryTab_typ : STRUCT - CurrentSecondaryTab : UINT; (*Current secondary tab*) - ChangeToPrimaryTab : BOOL; (*CMD to change to this primary tab*) - Group : UINT; (*Group to which the primary tab belongs*) - SecondaryTabArray : ARRAY[0..HMI_MAI_TABS]OF HMI_SecondaryTab_typ; (*Array of secondary tabs*) - END_STRUCT; - HMI_Tabs_typ : STRUCT - CurrentPrimaryTab : UINT; - PrimaryTabArray : ARRAY[0..HMI_MAI_TABS]OF HMI_PrimaryTab_typ; - END_STRUCT; - HMI_Basic_typ : STRUCT - PageChangeDP : UINT; - PageCurrentDP : UINT; - LanguageChangeDP : UINT; - LanguageCurrentDP : UINT; - ScreensaverDP : UINT; - ScreensaverTimeDP : UINT; - BacklightDP : UINT; - BacklightTimeDP : UINT; - CalibrationStateDP : UINT; - VCHandle : UDINT; - Tabs : HMI_Tabs_typ; - END_STRUCT; -END_TYPE diff --git a/example/AsProject/Logical/Libraries/Loupe/hmitools/HMI_Basic.var b/example/AsProject/Logical/Libraries/Loupe/hmitools/HMI_Basic.var deleted file mode 100644 index 27cf730..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/hmitools/HMI_Basic.var +++ /dev/null @@ -1,63 +0,0 @@ -(* -* File: HMI_Basic.var -* Copyright (c) 2023 Loupe -* https://loupe.team -* -* This file is part of HMITools, licensed under the MIT License. -* -*) -(*Constants*) -(*Tabs*) -VAR CONSTANT - HMI_MAI_TABS : USINT := 9; - HMI_INVALIDTAB : USINT := 255; -END_VAR -(*String lengths*) -VAR CONSTANT - HMI_STRLEN_IN : UINT := 260; - HMI_STRLEN_TIME : USINT := 9; -END_VAR -(*Locked*) -VAR CONSTANT - HMI_UNLOCKED : BOOL := FALSE; - HMI_LOCKED : BOOL := TRUE; -END_VAR -(*Visible*) -VAR CONSTANT - HMI_VISIBLE : BOOL := FALSE; - HMI_INVISIBLE : BOOL := TRUE; -END_VAR -(*Colors*) -VAR CONSTANT - HMI_COLOR_FOREGROUND : UINT := 256; - HMI_COLOR_BLACK : UINT := 0; - HMI_COLOR_WHITE : UINT := 15; - HMI_COLOR_GRAY : UINT := 7; - HMI_COLOR_GRAY255 : UINT := 255; - HMI_COLOR_RED : UINT := 4; - HMI_COLOR_YELLOW : UINT := 46; - HMI_COLOR_GREEN : UINT := 10; -END_VAR -(*Completion*) -VAR CONSTANT - HMI_INCOMPLETE : UINT := 0; - HMI_COMPLETE : UINT := 1; -END_VAR -(*LED values*) -VAR CONSTANT - HMI_LED_OFF : USINT := 0; - HMI_LED_ON : USINT := 1; - HMI_LED_BLINKSLOW : USINT := 2; - HMI_LED_BLINKFAST : USINT := 3; -END_VAR -(*Trend values*) -VAR CONSTANT - HMI_TREND_MAI_CURSOR : USINT := 1; - HMI_TREND_MAI_CURVE : USINT := 15; - HMI_TREND_MAI_SCALECONTAINER : USINT := 4; - HMI_TREND_MAI_VALUESCALE : USINT := 3; -END_VAR -(*ASCII values*) -VAR CONSTANT - ASCII_BACKSLASH : USINT := 92; -END_VAR diff --git a/example/AsProject/Logical/Libraries/Loupe/hmitools/HMI_File_Browse.typ b/example/AsProject/Logical/Libraries/Loupe/hmitools/HMI_File_Browse.typ deleted file mode 100644 index 36aa8e1..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/hmitools/HMI_File_Browse.typ +++ /dev/null @@ -1,26 +0,0 @@ -(* -* File: HMI_File_Browse.typ -* Copyright (c) 2023 Loupe -* https://loupe.team -* -* This file is part of HMITools, licensed under the MIT License. -* -*) - -TYPE - HMI_File_Browse_internal_typ : STRUCT - TempFileList : UDINT; - TempFileSelection : STRING[LIST_BOX_STRING_SIZE]; - oldFileIndex : DINT; - oldFileSelection : STRING[LIST_BOX_STRING_SIZE]; - NameFilter : STRING[LIST_BOX_STRING_SIZE]; - PathStrSize : UINT; - InternalBrowsingPath : STRING[LIST_BOX_STRING_SIZE]; - i : UINT; - IsolatedChar : USINT; - FileNameSelector : ListBoxFub; - FileExtensionSelector : ListBoxFub; - Directory : DirectoryFub; - TON_0 : TON; - END_STRUCT; -END_TYPE diff --git a/example/AsProject/Logical/Libraries/Loupe/hmitools/HMI_Trend.typ b/example/AsProject/Logical/Libraries/Loupe/hmitools/HMI_Trend.typ deleted file mode 100644 index 8e644e8..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/hmitools/HMI_Trend.typ +++ /dev/null @@ -1,63 +0,0 @@ -(* -* File: HMI_Trend.typ -* Copyright (c) 2023 Loupe -* https://loupe.team -* -* This file is part of HMITools, licensed under the MIT License. -* -*) - -TYPE - HMI_TrendValueScale_typ : STRUCT - ColorDP : UINT; - ScrollManual : REAL; - ZoomManual : REAL; - ZoomScroll : Trend_ZoomScroll; - StatusDP : UINT; - END_STRUCT; - HMI_TrendTimeContainer_typ : STRUCT - ColorDP : UINT; - CursorTimeDP : ARRAY[0..HMI_TREND_MAI_CURSOR]OF REAL; (*Time at the current Trend.CursorPositionDP.*) - ZoomManual : REAL; - ScrollManual : REAL; - ModeManual : UINT; - ZoomScroll : Trend_ZoomScroll; - StatusDP : UINT; - END_STRUCT; - HMI_TrendScaleContainer_typ : STRUCT - ColorDP : UINT; - StatusDP : UINT; - END_STRUCT; - HMI_TrendCurve_typ : STRUCT - ColorDP : UINT; - CursorValueDP : ARRAY[0..HMI_TREND_MAI_CURSOR]OF REAL; (*Value of the current curve data at the current Trend.CursorPositionDP.*) - StatusDP : UINT; - END_STRUCT; - HMI_TrendGrid_typ : STRUCT - ColorDP : UINT; - StatusDP : UINT; - END_STRUCT; - HMI_Trend_typ : STRUCT - ColorDP : UINT; (*ColorDP should be mapped to the ColorDatapoint in the Trend object on the page.*) - SelectItemDP : UINT; (*SelectItemDP should be mapped to the SelectItemDatapoint in the Trend object on the page.*) - StatusDP : UINT; (*StatusDP should be mapped to the StatusDatapoint in the Trend object on the page.*) - CursorPositionDP : ARRAY[0..HMI_TREND_MAI_CURSOR]OF REAL; (*CursorPositionDP should be mapped to the Cursor PositionDatapoint in the Trend object in the trend editor. -This is used to set the current position of the cursor, as a percentage within full range.*) - CursorStatusDP : ARRAY[0..HMI_TREND_MAI_CURSOR]OF UINT; (*CursorStatusDP should be mapped to the Cursor StatusDatapoint in the Trend object in the trend editor.*) - Grid : HMI_TrendGrid_typ; (*Grid variables should be mapped to the TrendGrid in the trend editor.*) - Curve : ARRAY[0..HMI_TREND_MAI_CURVE]OF HMI_TrendCurve_typ; (*Curve variables should be mapped to the TrendCurve objects in the trend editor.*) - ScaleContainer : ARRAY[0..HMI_TREND_MAI_SCALECONTAINER]OF HMI_TrendScaleContainer_typ; (*ScaleContainer variables should be mapped to the TrendScaleContainer objects in the trend editor.*) - TimeContainer : HMI_TrendTimeContainer_typ; (*TimeContainer variables should be mapped to the TrendTimeContainer object in the trend editor.*) - ValueScale : ARRAY[0..HMI_TREND_MAI_VALUESCALE]OF HMI_TrendValueScale_typ; (*ValueScale variables should be mapped to the TrendValueScale objects in the trend editor.*) - GlobalXZoomManual : REAL; (*Global zoom and scroll datapoints can be mapped to the zoom and scroll datapoints of ALL TrendTimeContainer and TrendValueScale objects in the trend editor. -This allows for one command to affect the ENTIRE trend. -Local zoom and scroll datapoints in the Trend.TimeContainer and Trend.ValueScale structures can be used to perform zooming and scrolling independently for each TrendTimeContainer and TrendValueScale object. -For manual operation, use the manual datapoints. For automatic operation, use the respective ZoomScroll FUB instance.*) - GlobalXScrollManual : REAL; - GlobalXScrollModeManual : UINT; - GlobalXZoomScroll : Trend_ZoomScroll; - GlobalYScrollManual : REAL; - GlobalYZoomManual : REAL; - GlobalYZoomScroll : Trend_ZoomScroll; - END_STRUCT; -END_TYPE diff --git a/example/AsProject/Logical/Libraries/Loupe/hmitools/LogViewer.typ b/example/AsProject/Logical/Libraries/Loupe/hmitools/LogViewer.typ deleted file mode 100644 index 5114d92..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/hmitools/LogViewer.typ +++ /dev/null @@ -1,97 +0,0 @@ -(* -* File: LogViewer.typ -* Copyright (c) 2023 Loupe -* https://loupe.team -* -* This file is part of HMITools, licensed under the MIT License. -* -*) - -TYPE - LogView_HMI_typ : STRUCT - ListBox : HMI_Listbox_typ; - GoToTopButton : HMI_Button_typ; - PageUpButton : HMI_Button_typ; - PageDownButton : HMI_Button_typ; - UpButton : HMI_Button_typ; - DownButton : HMI_Button_typ; - Text : STRING[LIST_BOX_STRING_SIZE]; - FilterString : STRING[80]; - MaxAlarms : UDINT; - AlarmList : UDINT; - internal : LogView_HMI_internal_typ; - END_STRUCT; - LogView_HMI_internal_typ : STRUCT - Offset : DINT; - SelectedAlarmIndex : UDINT; - SelectedListIndex : UINT; - oSelectedListIndex : UINT; - NumberAlarms : UINT; - END_STRUCT; - LogView_typ : STRUCT - IN : LogView_IN_typ; - OUT : LogView_OUT_typ; - Internal : LogView_Internal_typ; - END_STRUCT; - LogView_IN_typ : STRUCT (*Logger Variables*) - PAR : LogView_PAR_typ; - CMD : LogView_CMD_typ; - CFG : LogView_CFG_typ; - END_STRUCT; - LogView_PAR_typ : STRUCT (*Logger Variables*) - LoggerName : STRING[80]; - Offset : DINT; - END_STRUCT; - LogView_CMD_typ : STRUCT (*Logger Variables*) - GoToTop : BOOL; - END_STRUCT; - LogView_CFG_typ : STRUCT (*Logger Variables*) - MaxLogs : UINT; - END_STRUCT; - LogView_OUT_typ : STRUCT (*Logger Variables*) - STAT : LogView_STAT_typ; - NumberAlarms : UDINT; - END_STRUCT; - LogView_STAT_typ : STRUCT (*Logger Variables*) - Done : BOOL; - Busy : BOOL; - Error : BOOL; - ErrorID : UINT; - ErrorString : STRING[80]; - END_STRUCT; - LogView_Internal_typ : STRUCT (*Logger Variables*) - GetInfo : AsArLogGetInfo; (*AsARLog: AsArLogGetInfo FUB*) - GetTopAlarm : LogView_GetAlarm; - GetBottomAlarm : LogView_GetAlarm; - Buffer : Buffer_typ; - OffsetIndex : UDINT; - LoggerName : STRING[80]; - Ident : UDINT; - END_STRUCT; - asarlogREAD : STRUCT (*Header data for log entry*) - len : UDINT; (*Length of the entire entry*) - lenBin : UDINT; (*Length fo the binary log data*) - lenAscii : UDINT; (*Length of the ASCII log data*) - logLevel : UDINT; (*Log level*) - errornr : UDINT; (*Error number of the entry*) - taskName : ARRAY[0..35]OF USINT; (*Task name*) - errYear : UDINT; (*Year (date of error)*) - errMonth : UDINT; (*Month (date of error)*) - errDay : UDINT; (*Day (date of error)*) - errHour : UDINT; (*Hour (date of error)*) - errMinute : UDINT; (*Minute (date of error)*) - errSecond : UDINT; (*Second (date of error)*) - errMilliSec : UDINT; (*millisecond (date of error)*) - errMicroSec : UDINT; (*microsendond (date of error)*) - END_STRUCT; - LogView_GetAlarm : STRUCT - ReadItem : AsArLogRead; (*AsARLog: AsArLogRead FUB*) - ReadData : asarlogREAD; - BinaryData : ARRAY[0..255]OF USINT; - ASCIIData : ARRAY[0..255]OF USINT; - END_STRUCT; - LogData : STRUCT - String : STRING[LIST_BOX_STRING_SIZE]; - Index : UDINT; - END_STRUCT; -END_TYPE diff --git a/example/AsProject/Logical/Libraries/Loupe/hmitools/RecipeMgr.typ b/example/AsProject/Logical/Libraries/Loupe/hmitools/RecipeMgr.typ deleted file mode 100644 index a18e58a..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/hmitools/RecipeMgr.typ +++ /dev/null @@ -1,26 +0,0 @@ -(* -* File: RecipeMgr.typ -* Copyright (c) 2023 Loupe -* https://loupe.team -* -* This file is part of HMITools, licensed under the MIT License. -* -*) - -TYPE - RecMgr_HMI_typ : STRUCT - RetrieveFromSystem : HMI_Button_typ; (*Retrieve current system recipe (copy from pSystemRecipe to pHMIRecipe)*) - ApplyToSystem : HMI_Button_typ; (*Apply current recipe to system (copy from pHMIRecipe to pSystemRecipe)*) - Modified : HMI_Bitmap_typ; - END_STRUCT; - RecMgr_IN_typ : STRUCT - pHMIRecipe : UDINT; (*HMI Recipe location. Given as an address.*) - pSystemRecipe : UDINT; (*System Recipe location. Given as an address.*) - RecipeLength : UDINT; (*Size of the recipe in bytes*) - LoggerName : STRING[LOG_STRLEN_LOGGERNAME]; - END_STRUCT; - RecipeMgr_typ : STRUCT - IN : RecMgr_IN_typ; - HMI : RecMgr_HMI_typ; - END_STRUCT; -END_TYPE diff --git a/example/AsProject/Logical/Libraries/Loupe/hmitools/SG4/Arm/hmitools.br b/example/AsProject/Logical/Libraries/Loupe/hmitools/SG4/Arm/hmitools.br deleted file mode 100644 index fed6e4f..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/hmitools/SG4/Arm/hmitools.br and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/hmitools/SG4/Arm/hmitools.h b/example/AsProject/Logical/Libraries/Loupe/hmitools/SG4/Arm/hmitools.h deleted file mode 100644 index b5f6e22..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/hmitools/SG4/Arm/hmitools.h +++ /dev/null @@ -1,717 +0,0 @@ -/* Automation Studio generated header file */ -/* Do not edit ! */ -/* hmitools 0.11.4 */ - -#ifndef _HMITOOLS_ -#define _HMITOOLS_ -#ifdef __cplusplus -extern "C" -{ -#endif -#ifndef _hmitools_VERSION -#define _hmitools_VERSION 0.11.4 -#endif - -#include - -#ifndef _BUR_PUBLIC -#define _BUR_PUBLIC -#endif -#ifdef _SG3 - #include "AsArLog.h" - #include "AsBrStr.h" - #include "FileIO.h" - #include "standard.h" - #include "ringbuflib.h" - #include "logthat.h" - #include "stringext.h" -#endif -#ifdef _SG4 - #include "AsArLog.h" - #include "AsBrStr.h" - #include "FileIO.h" - #include "standard.h" - #include "ringbuflib.h" - #include "logthat.h" - #include "stringext.h" -#endif -#ifdef _SGC - #include "AsArLog.h" - #include "AsBrStr.h" - #include "FileIO.h" - #include "standard.h" - #include "ringbuflib.h" - #include "logthat.h" - #include "stringext.h" -#endif - - -/* Constants */ -#ifdef _REPLACE_CONST - #define ASCII_BACKSLASH 92U - #define HMI_TREND_MAI_VALUESCALE 3U - #define HMI_TREND_MAI_SCALECONTAINER 4U - #define HMI_TREND_MAI_CURVE 15U - #define HMI_TREND_MAI_CURSOR 1U - #define HMI_LED_BLINKFAST 3U - #define HMI_LED_BLINKSLOW 2U - #define HMI_LED_ON 1U - #define HMI_LED_OFF 0U - #define HMI_COMPLETE 1U - #define HMI_INCOMPLETE 0U - #define HMI_COLOR_GREEN 10U - #define HMI_COLOR_YELLOW 46U - #define HMI_COLOR_RED 4U - #define HMI_COLOR_GRAY255 255U - #define HMI_COLOR_GRAY 7U - #define HMI_COLOR_WHITE 15U - #define HMI_COLOR_BLACK 0U - #define HMI_COLOR_FOREGROUND 256U - #define HMI_INVISIBLE 1 - #define HMI_VISIBLE 0 - #define HMI_LOCKED 1 - #define HMI_UNLOCKED 0 - #define HMI_STRLEN_TIME 9U - #define HMI_STRLEN_IN 260U - #define HMI_INVALIDTAB 255U - #define HMI_MAI_TABS 9U - #define LIST_BOX_STRING_SIZE 260U - #define fiEXTENSION 3U -#else - _GLOBAL_CONST unsigned char ASCII_BACKSLASH; - _GLOBAL_CONST unsigned char HMI_TREND_MAI_VALUESCALE; - _GLOBAL_CONST unsigned char HMI_TREND_MAI_SCALECONTAINER; - _GLOBAL_CONST unsigned char HMI_TREND_MAI_CURVE; - _GLOBAL_CONST unsigned char HMI_TREND_MAI_CURSOR; - _GLOBAL_CONST unsigned char HMI_LED_BLINKFAST; - _GLOBAL_CONST unsigned char HMI_LED_BLINKSLOW; - _GLOBAL_CONST unsigned char HMI_LED_ON; - _GLOBAL_CONST unsigned char HMI_LED_OFF; - _GLOBAL_CONST unsigned short HMI_COMPLETE; - _GLOBAL_CONST unsigned short HMI_INCOMPLETE; - _GLOBAL_CONST unsigned short HMI_COLOR_GREEN; - _GLOBAL_CONST unsigned short HMI_COLOR_YELLOW; - _GLOBAL_CONST unsigned short HMI_COLOR_RED; - _GLOBAL_CONST unsigned short HMI_COLOR_GRAY255; - _GLOBAL_CONST unsigned short HMI_COLOR_GRAY; - _GLOBAL_CONST unsigned short HMI_COLOR_WHITE; - _GLOBAL_CONST unsigned short HMI_COLOR_BLACK; - _GLOBAL_CONST unsigned short HMI_COLOR_FOREGROUND; - _GLOBAL_CONST plcbit HMI_INVISIBLE; - _GLOBAL_CONST plcbit HMI_VISIBLE; - _GLOBAL_CONST plcbit HMI_LOCKED; - _GLOBAL_CONST plcbit HMI_UNLOCKED; - _GLOBAL_CONST unsigned char HMI_STRLEN_TIME; - _GLOBAL_CONST unsigned short HMI_STRLEN_IN; - _GLOBAL_CONST unsigned char HMI_INVALIDTAB; - _GLOBAL_CONST unsigned char HMI_MAI_TABS; - _GLOBAL_CONST unsigned short LIST_BOX_STRING_SIZE; - _GLOBAL_CONST unsigned char fiEXTENSION; -#endif - - - - -/* Datatypes and datatypes of function blocks */ -typedef enum HMI_ERR_enum -{ HMI_ERR_OK = 0, - HMI_ERR_INVALIDINPUT = 50000, - HMI_ERR_BUSY = 65535 -} HMI_ERR_enum; - -typedef enum HMI_StatusBits_enum -{ HMI_STATBIT_VIS = 0, - HMI_STATBIT_LOCK, - HMI_STATBIT_FOCUS, - HMI_STATBIT_TOUCHPAD -} HMI_StatusBits_enum; - -typedef enum HMI_EditControl_CMDS -{ EC_, - EC_APPEND, - EC_CLEAR, - EC_DELETE, - EC_GET_LINE, - EC_GET_MARKED_TEXT, - EC_GET_TEXT_SIZE, - EC_GOTO, - EC_HIGHLIGHT, - EC_INSERT, - EC_LOAD, - EC_READ, - EC_REPLACE_MARKED_TEXT, - EC_SAVE, - EC_UPDATE -} HMI_EditControl_CMDS; - -typedef enum RecipeUpdater_STATE -{ RecipeUpdater_ST_IDLE, - RecipeUpdater_ST_ReadDirectory, - RecipeUpdater_ST_ReadFile, - RecipeUpdater_ST_WAIT, - RecipeUpdater_ST_UpdateFile, - RecipeUpdater_ST_Done, - RecipeUpdater_ST_ -} RecipeUpdater_STATE; - -typedef struct HMI_Layer_typ -{ unsigned short StatusDP; -} HMI_Layer_typ; - -typedef struct HMI_Shape_typ -{ unsigned short StatusDP; - unsigned short ColorDP; -} HMI_Shape_typ; - -typedef struct HMI_Scale_typ -{ float Value; - float MinDP; - float MaxDP; - float RangeStartDP; - float RangeEndDP; - unsigned short RangeColorDP; - unsigned short StatusDP; - unsigned short ColorDP; -} HMI_Scale_typ; - -typedef struct HMI_Listbox_typ -{ signed long IndexDP; - unsigned short MinDP; - unsigned short MaxDP; - unsigned short OptionDP; - unsigned short StatusDP; - unsigned short ColorDP; - unsigned short CompletionDP; - unsigned short PageSize; -} HMI_Listbox_typ; - -typedef struct HMI_Bitmap_typ -{ unsigned short IndexDP; - unsigned short StatusDP; -} HMI_Bitmap_typ; - -typedef struct HMI_StringIn_typ -{ plcstring String[261]; - unsigned short StatusDP; - unsigned short ColorDP; - unsigned short CompletionDP; -} HMI_StringIn_typ; - -typedef struct HMI_Dropdown_typ -{ unsigned short IndexDP; - unsigned short StatusDP; - unsigned short ColorDP; -} HMI_Dropdown_typ; - -typedef struct HMI_TextBox_typ -{ unsigned short IndexDP; - unsigned short StatusDP; - unsigned short ColorDP; -} HMI_TextBox_typ; - -typedef struct HMI_NumericIn_typ -{ float Value; - float MinDP; - float MaxDP; - unsigned short StatusDP; - unsigned short ColorDP; - unsigned short CompletionDP; -} HMI_NumericIn_typ; - -typedef struct HMI_NumericOut_typ -{ float Value; - unsigned short StatusDP; - unsigned short ColorDP; -} HMI_NumericOut_typ; - -typedef struct HMI_ButtonVC3_typ -{ unsigned char CMD; - unsigned short Lock; - unsigned short ColorDP; - unsigned char LEDDP; -} HMI_ButtonVC3_typ; - -typedef struct HMI_Button_typ -{ plcbit CMD; - plcbit Confirm; - unsigned short StatusDP; - unsigned short IndexDP; - unsigned short ColorDP; - unsigned char LEDDP; -} HMI_Button_typ; - -typedef struct HMI_SecondaryTab_typ -{ plcbit ChangeToSecondaryTab; - unsigned short PageIndex; -} HMI_SecondaryTab_typ; - -typedef struct HMI_PrimaryTab_typ -{ unsigned short CurrentSecondaryTab; - plcbit ChangeToPrimaryTab; - unsigned short Group; - struct HMI_SecondaryTab_typ SecondaryTabArray[10]; -} HMI_PrimaryTab_typ; - -typedef struct HMI_Tabs_typ -{ unsigned short CurrentPrimaryTab; - struct HMI_PrimaryTab_typ PrimaryTabArray[10]; -} HMI_Tabs_typ; - -typedef struct HMI_Basic_typ -{ unsigned short PageChangeDP; - unsigned short PageCurrentDP; - unsigned short LanguageChangeDP; - unsigned short LanguageCurrentDP; - unsigned short ScreensaverDP; - unsigned short ScreensaverTimeDP; - unsigned short BacklightDP; - unsigned short BacklightTimeDP; - unsigned short CalibrationStateDP; - unsigned long VCHandle; - struct HMI_Tabs_typ Tabs; -} HMI_Basic_typ; - -typedef struct ListBoxFub -{ - /* VAR_INPUT (analog) */ - unsigned long Selection; - unsigned long SelectionList; - signed long IndexDP; - unsigned short MinDP; - unsigned short MaxDP; - unsigned short OptionDP; - unsigned short StatusDP; - unsigned short ColorDP; - unsigned short PageSize; - /* VAR (analog) */ - plcstring (*Files)[1][261]; - signed long intIndex; - plcstring (*pValue); - plcstring oValue[261]; - /* VAR_INPUT (digital) */ - plcbit Enable; - /* VAR_OUTPUT (digital) */ - plcbit CompletionDP; -} ListBoxFub_typ; - -typedef struct DirectoryFub -{ - /* VAR_INPUT (analog) */ - plcstring FileDevice[81]; - unsigned long pPath; - unsigned long MaxValues; - plcstring NameFilter[261]; - unsigned long FileList; - plcstring FileExt[261]; - /* VAR_OUTPUT (analog) */ - unsigned short NumFiles; - unsigned short status; - /* VAR (analog) */ - struct DirOpen DirectoryOpen; - struct DirReadEx DirectoryRead; - struct DirClose DirectoryClose; - unsigned long Ident; - unsigned char State; - unsigned short ListFileIndex; - unsigned short index; - plcstring (*Files)[1][261]; - struct fiDIR_READ_EX_DATA DirData; - plcstring TempString[261]; - plcstring TempExtension[261]; - plcstring lcTempString[261]; - plcstring lcNameFilter[261]; - plcstring iNameFilter[261]; - struct TON UpdateTimer; - unsigned short i; - unsigned char IsolatedChar; - /* VAR_INPUT (digital) */ - plcbit Enable; - plcbit Refresh; - plcbit EnableDirectorySearch; - plcbit ShowHiddenFiles; - /* VAR_OUTPUT (digital) */ - plcbit Updating; - plcbit Initialized; -} DirectoryFub_typ; - -typedef struct HMI_File_Browse_internal_typ -{ unsigned long TempFileList; - plcstring TempFileSelection[261]; - signed long oldFileIndex; - plcstring oldFileSelection[261]; - plcstring NameFilter[261]; - unsigned short PathStrSize; - plcstring InternalBrowsingPath[261]; - unsigned short i; - unsigned char IsolatedChar; - struct ListBoxFub FileNameSelector; - struct ListBoxFub FileExtensionSelector; - struct DirectoryFub Directory; - struct TON TON_0; -} HMI_File_Browse_internal_typ; - -typedef struct LogView_HMI_internal_typ -{ signed long Offset; - unsigned long SelectedAlarmIndex; - unsigned short SelectedListIndex; - unsigned short oSelectedListIndex; - unsigned short NumberAlarms; -} LogView_HMI_internal_typ; - -typedef struct LogView_HMI_typ -{ struct HMI_Listbox_typ ListBox; - struct HMI_Button_typ GoToTopButton; - struct HMI_Button_typ PageUpButton; - struct HMI_Button_typ PageDownButton; - struct HMI_Button_typ UpButton; - struct HMI_Button_typ DownButton; - plcstring Text[261]; - plcstring FilterString[81]; - unsigned long MaxAlarms; - unsigned long AlarmList; - struct LogView_HMI_internal_typ internal; -} LogView_HMI_typ; - -typedef struct LogView_PAR_typ -{ plcstring LoggerName[81]; - signed long Offset; -} LogView_PAR_typ; - -typedef struct LogView_CMD_typ -{ plcbit GoToTop; -} LogView_CMD_typ; - -typedef struct LogView_CFG_typ -{ unsigned short MaxLogs; -} LogView_CFG_typ; - -typedef struct LogView_IN_typ -{ struct LogView_PAR_typ PAR; - struct LogView_CMD_typ CMD; - struct LogView_CFG_typ CFG; -} LogView_IN_typ; - -typedef struct LogView_STAT_typ -{ plcbit Done; - plcbit Busy; - plcbit Error; - unsigned short ErrorID; - plcstring ErrorString[81]; -} LogView_STAT_typ; - -typedef struct LogView_OUT_typ -{ struct LogView_STAT_typ STAT; - unsigned long NumberAlarms; -} LogView_OUT_typ; - -typedef struct asarlogREAD -{ unsigned long len; - unsigned long lenBin; - unsigned long lenAscii; - unsigned long logLevel; - unsigned long errornr; - unsigned char taskName[36]; - unsigned long errYear; - unsigned long errMonth; - unsigned long errDay; - unsigned long errHour; - unsigned long errMinute; - unsigned long errSecond; - unsigned long errMilliSec; - unsigned long errMicroSec; -} asarlogREAD; - -typedef struct LogView_GetAlarm -{ struct AsArLogRead ReadItem; - struct asarlogREAD ReadData; - unsigned char BinaryData[256]; - unsigned char ASCIIData[256]; -} LogView_GetAlarm; - -typedef struct LogView_Internal_typ -{ struct AsArLogGetInfo GetInfo; - struct LogView_GetAlarm GetTopAlarm; - struct LogView_GetAlarm GetBottomAlarm; - struct Buffer_typ Buffer; - unsigned long OffsetIndex; - plcstring LoggerName[81]; - unsigned long Ident; -} LogView_Internal_typ; - -typedef struct LogView_typ -{ struct LogView_IN_typ IN; - struct LogView_OUT_typ OUT; - struct LogView_Internal_typ Internal; -} LogView_typ; - -typedef struct LogData -{ plcstring String[261]; - unsigned long Index; -} LogData; - -typedef struct HMI_Editor_Controller_CMD_typ -{ plcbit Load; - plcbit Save; - plcbit Clear; -} HMI_Editor_Controller_CMD_typ; - -typedef struct HMI_EditControl_Value_typ -{ plcstring Content[1001]; - plcstring URLDp[81]; -} HMI_EditControl_Value_typ; - -typedef struct HMI_EditControl_Runtime_Cmds_typ -{ plcstring ResponseDp[81]; - plcstring RequestDp[81]; - unsigned short StatusDP; -} HMI_EditControl_Runtime_Cmds_typ; - -typedef struct HMI_EditControl_Runtime_Comp_typ -{ unsigned short CompletionDP; -} HMI_EditControl_Runtime_Comp_typ; - -typedef struct HMI_EditControl_Runtime_Edit_typ -{ unsigned short CursorLineDp; - unsigned short CursorColumnDp; - unsigned short InsertModeDp; - unsigned short ModifiedDp; - unsigned short SelectionModeDp; -} HMI_EditControl_Runtime_Edit_typ; - -typedef struct HMI_EditControl_Runtime_typ -{ unsigned short StatusDp; - unsigned short BusyDp; - struct HMI_EditControl_Runtime_Cmds_typ Commands; - struct HMI_EditControl_Runtime_Comp_typ Completion; - struct HMI_EditControl_Runtime_Edit_typ Edit; -} HMI_EditControl_Runtime_typ; - -typedef struct HMI_EditControl_Internal_typ -{ plcstring CurrentLineText[201]; - unsigned short CurrentLineIndex; - unsigned char CommandState; - plcstring EditText[81]; - unsigned char DesiredLine; - unsigned char DesiredColumn; - unsigned char Offset; - unsigned char Count; - unsigned char highlightmode; -} HMI_EditControl_Internal_typ; - -typedef struct HMI_EditControl_typ -{ struct HMI_EditControl_Value_typ Value; - struct HMI_EditControl_Runtime_typ Runtime; - struct HMI_EditControl_Internal_typ internal; - enum HMI_EditControl_CMDS Command; -} HMI_EditControl_typ; - -typedef struct HMI_Editor_Controller_int_typ -{ struct HMI_Editor_Controller_CMD_typ CMD; -} HMI_Editor_Controller_int_typ; - -typedef struct HMI_Editor_Controller_typ -{ struct HMI_Editor_Controller_CMD_typ CMD; - struct HMI_EditControl_typ HMI; - struct HMI_Editor_Controller_int_typ Internal; -} HMI_Editor_Controller_typ; - -typedef struct Trend_ZoomScroll -{ - /* VAR_INPUT (analog) */ - float ZoomBase; - float ScrollBase; - /* VAR_OUTPUT (analog) */ - float ZoomDP; - float ScrollDP; - unsigned short ModeDP; - /* VAR (analog) */ - float Midpt; - /* VAR_INPUT (digital) */ - plcbit ZoomIn; - plcbit ZoomOut; - plcbit ScrollPos; - plcbit ScrollNeg; - plcbit Reset; - /* VAR (digital) */ - plcbit Init; -} Trend_ZoomScroll_typ; - -typedef struct HMI_TrendValueScale_typ -{ unsigned short ColorDP; - float ScrollManual; - float ZoomManual; - struct Trend_ZoomScroll ZoomScroll; - unsigned short StatusDP; -} HMI_TrendValueScale_typ; - -typedef struct HMI_TrendTimeContainer_typ -{ unsigned short ColorDP; - float CursorTimeDP[2]; - float ZoomManual; - float ScrollManual; - unsigned short ModeManual; - struct Trend_ZoomScroll ZoomScroll; - unsigned short StatusDP; -} HMI_TrendTimeContainer_typ; - -typedef struct HMI_TrendScaleContainer_typ -{ unsigned short ColorDP; - unsigned short StatusDP; -} HMI_TrendScaleContainer_typ; - -typedef struct HMI_TrendCurve_typ -{ unsigned short ColorDP; - float CursorValueDP[2]; - unsigned short StatusDP; -} HMI_TrendCurve_typ; - -typedef struct HMI_TrendGrid_typ -{ unsigned short ColorDP; - unsigned short StatusDP; -} HMI_TrendGrid_typ; - -typedef struct HMI_Trend_typ -{ unsigned short ColorDP; - unsigned short SelectItemDP; - unsigned short StatusDP; - float CursorPositionDP[2]; - unsigned short CursorStatusDP[2]; - struct HMI_TrendGrid_typ Grid; - struct HMI_TrendCurve_typ Curve[16]; - struct HMI_TrendScaleContainer_typ ScaleContainer[5]; - struct HMI_TrendTimeContainer_typ TimeContainer; - struct HMI_TrendValueScale_typ ValueScale[4]; - float GlobalXZoomManual; - float GlobalXScrollManual; - unsigned short GlobalXScrollModeManual; - struct Trend_ZoomScroll GlobalXZoomScroll; - float GlobalYScrollManual; - float GlobalYZoomManual; - struct Trend_ZoomScroll GlobalYZoomScroll; -} HMI_Trend_typ; - -typedef struct RecMgr_HMI_typ -{ struct HMI_Button_typ RetrieveFromSystem; - struct HMI_Button_typ ApplyToSystem; - struct HMI_Bitmap_typ Modified; -} RecMgr_HMI_typ; - -typedef struct RecMgr_IN_typ -{ unsigned long pHMIRecipe; - unsigned long pSystemRecipe; - unsigned long RecipeLength; - plcstring LoggerName[9]; -} RecMgr_IN_typ; - -typedef struct RecipeMgr_typ -{ struct RecMgr_IN_typ IN; - struct RecMgr_HMI_typ HMI; -} RecipeMgr_typ; - -typedef struct RecipeUpdater_Internal_typ -{ enum RecipeUpdater_STATE State; - struct DirRead DirRead; - struct fiDIR_READ_DATA CurrentFile; -} RecipeUpdater_Internal_typ; - -typedef struct HMIFileBrowse -{ - /* VAR_INPUT (analog) */ - plcstring FileDevice[81]; - unsigned long pDirectorySearchPath; - unsigned long pFileList; - unsigned long MaxFiles; - unsigned long pFileExtList; - unsigned short MaxExt; - signed long FileIndex; - plcstring FileSelection[261]; - signed long FileExtIndex; - plcstring FileExtSelection[261]; - /* VAR_OUTPUT (analog) */ - plcstring CurrentPath[261]; - unsigned short NumFiles; - plcstring Status[261]; - /* VAR (analog) */ - struct HMI_File_Browse_internal_typ Internal; - /* VAR_INPUT (digital) */ - plcbit Enable; - plcbit Refresh; - plcbit EnableDirectorySearch; - plcbit EnableDataObjects; - plcbit BrowseToDirectory; - /* VAR_OUTPUT (digital) */ - plcbit CompletionDP; -} HMIFileBrowse_typ; - -typedef struct FileQueue -{ - /* VAR_INPUT (analog) */ - plcstring FileDevice[81]; - plcstring Path[321]; - /* VAR_OUTPUT (analog) */ - plcstring FileName[81]; - unsigned long ErrorID; - /* VAR (analog) */ - struct RecipeUpdater_Internal_typ internal; - /* VAR_INPUT (digital) */ - plcbit Next; - plcbit Cancel; - /* VAR_OUTPUT (digital) */ - plcbit Execute; - plcbit Done; - plcbit Busy; - plcbit Error; -} FileQueue_typ; - - - -/* Prototyping of functions and function blocks */ -_BUR_PUBLIC void HMIFileBrowse(struct HMIFileBrowse* inst); -_BUR_PUBLIC void ListBoxFub(struct ListBoxFub* inst); -_BUR_PUBLIC void DirectoryFub(struct DirectoryFub* inst); -_BUR_PUBLIC void Trend_ZoomScroll(struct Trend_ZoomScroll* inst); -_BUR_PUBLIC void FileQueue(struct FileQueue* inst); -_BUR_PUBLIC plcbit LogView_init(struct LogView_typ* LogView); -_BUR_PUBLIC plcbit LogView_cyclic(struct LogView_typ* LogView); -_BUR_PUBLIC plcbit LogView_HMI(struct LogView_typ* LogView, struct LogView_HMI_typ* LogViewHMI); -_BUR_PUBLIC plcbit Editor_fn(struct HMI_Editor_Controller_typ* EditorController); -_BUR_PUBLIC plcbit TrendFn(struct HMI_Trend_typ* t); -_BUR_PUBLIC plcbit HMI_TabControlFn_Cyclic(struct HMI_Basic_typ* t); -_BUR_PUBLIC plcbit HMI_Hide(unsigned short* StatusDP); -_BUR_PUBLIC plcbit HMI_Show(unsigned short* StatusDP); -_BUR_PUBLIC plcbit HMI_Lock(unsigned short* StatusDP); -_BUR_PUBLIC plcbit HMI_Unlock(unsigned short* StatusDP); -_BUR_PUBLIC plcbit HMI_SetFocus(unsigned short* StatusDP); -_BUR_PUBLIC plcbit HMI_ResetFocus(unsigned short* StatusDP); -_BUR_PUBLIC plcbit HMI_OpenTouchpad(unsigned short* StatusDP); -_BUR_PUBLIC plcbit EditorControl(struct HMI_EditControl_typ* Editor); -_BUR_PUBLIC unsigned short ControlTouch(unsigned short* StatusDP); -_BUR_PUBLIC plcbit ControlDismiss(unsigned short* StatusDP); -_BUR_PUBLIC unsigned long LogViewerGetAlarmString(struct LogView_GetAlarm* t, unsigned long AlarmIndex, unsigned long LoggerIdent, plcstring* OutputString); -_BUR_PUBLIC plcbit LogViewerCreateString(struct asarlogREAD* ReadData, unsigned char ASCIIData[256], plcstring* OutputString); -_BUR_PUBLIC unsigned long EditControl_CS_replaceline(plcstring* Text, unsigned short Line, plcstring* Output); -_BUR_PUBLIC unsigned long EditControl_CS_append(plcstring* Text, plcstring* Output); -_BUR_PUBLIC unsigned long EditControl_CS_getline(unsigned short Line, plcstring* Output); -_BUR_PUBLIC unsigned long EditControl_CS_goto(unsigned short Line, unsigned short Col, plcstring* Output); -_BUR_PUBLIC unsigned long EditControl_CS_highlight(unsigned short Value, unsigned short Mode, plcstring* Output); -_BUR_PUBLIC unsigned long EditControl_CS_insert(plcstring* Text, unsigned short Line, plcstring* Output); -_BUR_PUBLIC unsigned long EditControl_CS_read(unsigned short Offset, unsigned short Count, plcstring* Output); -_BUR_PUBLIC unsigned long EditControl_CS_replacemarked(plcstring* Text, plcstring* Output); -_BUR_PUBLIC plcbit HMI_FindCurrentTab(struct HMI_Basic_typ* t); -_BUR_PUBLIC signed long FindIndexOfString(plcstring* Value, unsigned long List, unsigned long MaxList); -_BUR_PUBLIC signed long RecipeMgr(struct RecipeMgr_typ* Rec); -_BUR_PUBLIC unsigned short GetDataObjectList(unsigned long List, unsigned long MaxObjects); - - -__asm__(".section \".plc\""); - -/* Additional IEC dependencies */ -__asm__(".ascii \"iecdep \\\"Logical/Libraries/Loupe/logthat/Constants.var\\\" scope \\\"global\\\"\\n\""); - -__asm__(".previous"); - -#ifdef __cplusplus -}; -#endif -#endif /* _HMITOOLS_ */ - diff --git a/example/AsProject/Logical/Libraries/Loupe/hmitools/SG4/Arm/libhmitools.a b/example/AsProject/Logical/Libraries/Loupe/hmitools/SG4/Arm/libhmitools.a deleted file mode 100644 index 5d559d0..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/hmitools/SG4/Arm/libhmitools.a and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/hmitools/SG4/hmitools.br b/example/AsProject/Logical/Libraries/Loupe/hmitools/SG4/hmitools.br deleted file mode 100644 index d1acc98..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/hmitools/SG4/hmitools.br and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/hmitools/SG4/hmitools.h b/example/AsProject/Logical/Libraries/Loupe/hmitools/SG4/hmitools.h deleted file mode 100644 index b5f6e22..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/hmitools/SG4/hmitools.h +++ /dev/null @@ -1,717 +0,0 @@ -/* Automation Studio generated header file */ -/* Do not edit ! */ -/* hmitools 0.11.4 */ - -#ifndef _HMITOOLS_ -#define _HMITOOLS_ -#ifdef __cplusplus -extern "C" -{ -#endif -#ifndef _hmitools_VERSION -#define _hmitools_VERSION 0.11.4 -#endif - -#include - -#ifndef _BUR_PUBLIC -#define _BUR_PUBLIC -#endif -#ifdef _SG3 - #include "AsArLog.h" - #include "AsBrStr.h" - #include "FileIO.h" - #include "standard.h" - #include "ringbuflib.h" - #include "logthat.h" - #include "stringext.h" -#endif -#ifdef _SG4 - #include "AsArLog.h" - #include "AsBrStr.h" - #include "FileIO.h" - #include "standard.h" - #include "ringbuflib.h" - #include "logthat.h" - #include "stringext.h" -#endif -#ifdef _SGC - #include "AsArLog.h" - #include "AsBrStr.h" - #include "FileIO.h" - #include "standard.h" - #include "ringbuflib.h" - #include "logthat.h" - #include "stringext.h" -#endif - - -/* Constants */ -#ifdef _REPLACE_CONST - #define ASCII_BACKSLASH 92U - #define HMI_TREND_MAI_VALUESCALE 3U - #define HMI_TREND_MAI_SCALECONTAINER 4U - #define HMI_TREND_MAI_CURVE 15U - #define HMI_TREND_MAI_CURSOR 1U - #define HMI_LED_BLINKFAST 3U - #define HMI_LED_BLINKSLOW 2U - #define HMI_LED_ON 1U - #define HMI_LED_OFF 0U - #define HMI_COMPLETE 1U - #define HMI_INCOMPLETE 0U - #define HMI_COLOR_GREEN 10U - #define HMI_COLOR_YELLOW 46U - #define HMI_COLOR_RED 4U - #define HMI_COLOR_GRAY255 255U - #define HMI_COLOR_GRAY 7U - #define HMI_COLOR_WHITE 15U - #define HMI_COLOR_BLACK 0U - #define HMI_COLOR_FOREGROUND 256U - #define HMI_INVISIBLE 1 - #define HMI_VISIBLE 0 - #define HMI_LOCKED 1 - #define HMI_UNLOCKED 0 - #define HMI_STRLEN_TIME 9U - #define HMI_STRLEN_IN 260U - #define HMI_INVALIDTAB 255U - #define HMI_MAI_TABS 9U - #define LIST_BOX_STRING_SIZE 260U - #define fiEXTENSION 3U -#else - _GLOBAL_CONST unsigned char ASCII_BACKSLASH; - _GLOBAL_CONST unsigned char HMI_TREND_MAI_VALUESCALE; - _GLOBAL_CONST unsigned char HMI_TREND_MAI_SCALECONTAINER; - _GLOBAL_CONST unsigned char HMI_TREND_MAI_CURVE; - _GLOBAL_CONST unsigned char HMI_TREND_MAI_CURSOR; - _GLOBAL_CONST unsigned char HMI_LED_BLINKFAST; - _GLOBAL_CONST unsigned char HMI_LED_BLINKSLOW; - _GLOBAL_CONST unsigned char HMI_LED_ON; - _GLOBAL_CONST unsigned char HMI_LED_OFF; - _GLOBAL_CONST unsigned short HMI_COMPLETE; - _GLOBAL_CONST unsigned short HMI_INCOMPLETE; - _GLOBAL_CONST unsigned short HMI_COLOR_GREEN; - _GLOBAL_CONST unsigned short HMI_COLOR_YELLOW; - _GLOBAL_CONST unsigned short HMI_COLOR_RED; - _GLOBAL_CONST unsigned short HMI_COLOR_GRAY255; - _GLOBAL_CONST unsigned short HMI_COLOR_GRAY; - _GLOBAL_CONST unsigned short HMI_COLOR_WHITE; - _GLOBAL_CONST unsigned short HMI_COLOR_BLACK; - _GLOBAL_CONST unsigned short HMI_COLOR_FOREGROUND; - _GLOBAL_CONST plcbit HMI_INVISIBLE; - _GLOBAL_CONST plcbit HMI_VISIBLE; - _GLOBAL_CONST plcbit HMI_LOCKED; - _GLOBAL_CONST plcbit HMI_UNLOCKED; - _GLOBAL_CONST unsigned char HMI_STRLEN_TIME; - _GLOBAL_CONST unsigned short HMI_STRLEN_IN; - _GLOBAL_CONST unsigned char HMI_INVALIDTAB; - _GLOBAL_CONST unsigned char HMI_MAI_TABS; - _GLOBAL_CONST unsigned short LIST_BOX_STRING_SIZE; - _GLOBAL_CONST unsigned char fiEXTENSION; -#endif - - - - -/* Datatypes and datatypes of function blocks */ -typedef enum HMI_ERR_enum -{ HMI_ERR_OK = 0, - HMI_ERR_INVALIDINPUT = 50000, - HMI_ERR_BUSY = 65535 -} HMI_ERR_enum; - -typedef enum HMI_StatusBits_enum -{ HMI_STATBIT_VIS = 0, - HMI_STATBIT_LOCK, - HMI_STATBIT_FOCUS, - HMI_STATBIT_TOUCHPAD -} HMI_StatusBits_enum; - -typedef enum HMI_EditControl_CMDS -{ EC_, - EC_APPEND, - EC_CLEAR, - EC_DELETE, - EC_GET_LINE, - EC_GET_MARKED_TEXT, - EC_GET_TEXT_SIZE, - EC_GOTO, - EC_HIGHLIGHT, - EC_INSERT, - EC_LOAD, - EC_READ, - EC_REPLACE_MARKED_TEXT, - EC_SAVE, - EC_UPDATE -} HMI_EditControl_CMDS; - -typedef enum RecipeUpdater_STATE -{ RecipeUpdater_ST_IDLE, - RecipeUpdater_ST_ReadDirectory, - RecipeUpdater_ST_ReadFile, - RecipeUpdater_ST_WAIT, - RecipeUpdater_ST_UpdateFile, - RecipeUpdater_ST_Done, - RecipeUpdater_ST_ -} RecipeUpdater_STATE; - -typedef struct HMI_Layer_typ -{ unsigned short StatusDP; -} HMI_Layer_typ; - -typedef struct HMI_Shape_typ -{ unsigned short StatusDP; - unsigned short ColorDP; -} HMI_Shape_typ; - -typedef struct HMI_Scale_typ -{ float Value; - float MinDP; - float MaxDP; - float RangeStartDP; - float RangeEndDP; - unsigned short RangeColorDP; - unsigned short StatusDP; - unsigned short ColorDP; -} HMI_Scale_typ; - -typedef struct HMI_Listbox_typ -{ signed long IndexDP; - unsigned short MinDP; - unsigned short MaxDP; - unsigned short OptionDP; - unsigned short StatusDP; - unsigned short ColorDP; - unsigned short CompletionDP; - unsigned short PageSize; -} HMI_Listbox_typ; - -typedef struct HMI_Bitmap_typ -{ unsigned short IndexDP; - unsigned short StatusDP; -} HMI_Bitmap_typ; - -typedef struct HMI_StringIn_typ -{ plcstring String[261]; - unsigned short StatusDP; - unsigned short ColorDP; - unsigned short CompletionDP; -} HMI_StringIn_typ; - -typedef struct HMI_Dropdown_typ -{ unsigned short IndexDP; - unsigned short StatusDP; - unsigned short ColorDP; -} HMI_Dropdown_typ; - -typedef struct HMI_TextBox_typ -{ unsigned short IndexDP; - unsigned short StatusDP; - unsigned short ColorDP; -} HMI_TextBox_typ; - -typedef struct HMI_NumericIn_typ -{ float Value; - float MinDP; - float MaxDP; - unsigned short StatusDP; - unsigned short ColorDP; - unsigned short CompletionDP; -} HMI_NumericIn_typ; - -typedef struct HMI_NumericOut_typ -{ float Value; - unsigned short StatusDP; - unsigned short ColorDP; -} HMI_NumericOut_typ; - -typedef struct HMI_ButtonVC3_typ -{ unsigned char CMD; - unsigned short Lock; - unsigned short ColorDP; - unsigned char LEDDP; -} HMI_ButtonVC3_typ; - -typedef struct HMI_Button_typ -{ plcbit CMD; - plcbit Confirm; - unsigned short StatusDP; - unsigned short IndexDP; - unsigned short ColorDP; - unsigned char LEDDP; -} HMI_Button_typ; - -typedef struct HMI_SecondaryTab_typ -{ plcbit ChangeToSecondaryTab; - unsigned short PageIndex; -} HMI_SecondaryTab_typ; - -typedef struct HMI_PrimaryTab_typ -{ unsigned short CurrentSecondaryTab; - plcbit ChangeToPrimaryTab; - unsigned short Group; - struct HMI_SecondaryTab_typ SecondaryTabArray[10]; -} HMI_PrimaryTab_typ; - -typedef struct HMI_Tabs_typ -{ unsigned short CurrentPrimaryTab; - struct HMI_PrimaryTab_typ PrimaryTabArray[10]; -} HMI_Tabs_typ; - -typedef struct HMI_Basic_typ -{ unsigned short PageChangeDP; - unsigned short PageCurrentDP; - unsigned short LanguageChangeDP; - unsigned short LanguageCurrentDP; - unsigned short ScreensaverDP; - unsigned short ScreensaverTimeDP; - unsigned short BacklightDP; - unsigned short BacklightTimeDP; - unsigned short CalibrationStateDP; - unsigned long VCHandle; - struct HMI_Tabs_typ Tabs; -} HMI_Basic_typ; - -typedef struct ListBoxFub -{ - /* VAR_INPUT (analog) */ - unsigned long Selection; - unsigned long SelectionList; - signed long IndexDP; - unsigned short MinDP; - unsigned short MaxDP; - unsigned short OptionDP; - unsigned short StatusDP; - unsigned short ColorDP; - unsigned short PageSize; - /* VAR (analog) */ - plcstring (*Files)[1][261]; - signed long intIndex; - plcstring (*pValue); - plcstring oValue[261]; - /* VAR_INPUT (digital) */ - plcbit Enable; - /* VAR_OUTPUT (digital) */ - plcbit CompletionDP; -} ListBoxFub_typ; - -typedef struct DirectoryFub -{ - /* VAR_INPUT (analog) */ - plcstring FileDevice[81]; - unsigned long pPath; - unsigned long MaxValues; - plcstring NameFilter[261]; - unsigned long FileList; - plcstring FileExt[261]; - /* VAR_OUTPUT (analog) */ - unsigned short NumFiles; - unsigned short status; - /* VAR (analog) */ - struct DirOpen DirectoryOpen; - struct DirReadEx DirectoryRead; - struct DirClose DirectoryClose; - unsigned long Ident; - unsigned char State; - unsigned short ListFileIndex; - unsigned short index; - plcstring (*Files)[1][261]; - struct fiDIR_READ_EX_DATA DirData; - plcstring TempString[261]; - plcstring TempExtension[261]; - plcstring lcTempString[261]; - plcstring lcNameFilter[261]; - plcstring iNameFilter[261]; - struct TON UpdateTimer; - unsigned short i; - unsigned char IsolatedChar; - /* VAR_INPUT (digital) */ - plcbit Enable; - plcbit Refresh; - plcbit EnableDirectorySearch; - plcbit ShowHiddenFiles; - /* VAR_OUTPUT (digital) */ - plcbit Updating; - plcbit Initialized; -} DirectoryFub_typ; - -typedef struct HMI_File_Browse_internal_typ -{ unsigned long TempFileList; - plcstring TempFileSelection[261]; - signed long oldFileIndex; - plcstring oldFileSelection[261]; - plcstring NameFilter[261]; - unsigned short PathStrSize; - plcstring InternalBrowsingPath[261]; - unsigned short i; - unsigned char IsolatedChar; - struct ListBoxFub FileNameSelector; - struct ListBoxFub FileExtensionSelector; - struct DirectoryFub Directory; - struct TON TON_0; -} HMI_File_Browse_internal_typ; - -typedef struct LogView_HMI_internal_typ -{ signed long Offset; - unsigned long SelectedAlarmIndex; - unsigned short SelectedListIndex; - unsigned short oSelectedListIndex; - unsigned short NumberAlarms; -} LogView_HMI_internal_typ; - -typedef struct LogView_HMI_typ -{ struct HMI_Listbox_typ ListBox; - struct HMI_Button_typ GoToTopButton; - struct HMI_Button_typ PageUpButton; - struct HMI_Button_typ PageDownButton; - struct HMI_Button_typ UpButton; - struct HMI_Button_typ DownButton; - plcstring Text[261]; - plcstring FilterString[81]; - unsigned long MaxAlarms; - unsigned long AlarmList; - struct LogView_HMI_internal_typ internal; -} LogView_HMI_typ; - -typedef struct LogView_PAR_typ -{ plcstring LoggerName[81]; - signed long Offset; -} LogView_PAR_typ; - -typedef struct LogView_CMD_typ -{ plcbit GoToTop; -} LogView_CMD_typ; - -typedef struct LogView_CFG_typ -{ unsigned short MaxLogs; -} LogView_CFG_typ; - -typedef struct LogView_IN_typ -{ struct LogView_PAR_typ PAR; - struct LogView_CMD_typ CMD; - struct LogView_CFG_typ CFG; -} LogView_IN_typ; - -typedef struct LogView_STAT_typ -{ plcbit Done; - plcbit Busy; - plcbit Error; - unsigned short ErrorID; - plcstring ErrorString[81]; -} LogView_STAT_typ; - -typedef struct LogView_OUT_typ -{ struct LogView_STAT_typ STAT; - unsigned long NumberAlarms; -} LogView_OUT_typ; - -typedef struct asarlogREAD -{ unsigned long len; - unsigned long lenBin; - unsigned long lenAscii; - unsigned long logLevel; - unsigned long errornr; - unsigned char taskName[36]; - unsigned long errYear; - unsigned long errMonth; - unsigned long errDay; - unsigned long errHour; - unsigned long errMinute; - unsigned long errSecond; - unsigned long errMilliSec; - unsigned long errMicroSec; -} asarlogREAD; - -typedef struct LogView_GetAlarm -{ struct AsArLogRead ReadItem; - struct asarlogREAD ReadData; - unsigned char BinaryData[256]; - unsigned char ASCIIData[256]; -} LogView_GetAlarm; - -typedef struct LogView_Internal_typ -{ struct AsArLogGetInfo GetInfo; - struct LogView_GetAlarm GetTopAlarm; - struct LogView_GetAlarm GetBottomAlarm; - struct Buffer_typ Buffer; - unsigned long OffsetIndex; - plcstring LoggerName[81]; - unsigned long Ident; -} LogView_Internal_typ; - -typedef struct LogView_typ -{ struct LogView_IN_typ IN; - struct LogView_OUT_typ OUT; - struct LogView_Internal_typ Internal; -} LogView_typ; - -typedef struct LogData -{ plcstring String[261]; - unsigned long Index; -} LogData; - -typedef struct HMI_Editor_Controller_CMD_typ -{ plcbit Load; - plcbit Save; - plcbit Clear; -} HMI_Editor_Controller_CMD_typ; - -typedef struct HMI_EditControl_Value_typ -{ plcstring Content[1001]; - plcstring URLDp[81]; -} HMI_EditControl_Value_typ; - -typedef struct HMI_EditControl_Runtime_Cmds_typ -{ plcstring ResponseDp[81]; - plcstring RequestDp[81]; - unsigned short StatusDP; -} HMI_EditControl_Runtime_Cmds_typ; - -typedef struct HMI_EditControl_Runtime_Comp_typ -{ unsigned short CompletionDP; -} HMI_EditControl_Runtime_Comp_typ; - -typedef struct HMI_EditControl_Runtime_Edit_typ -{ unsigned short CursorLineDp; - unsigned short CursorColumnDp; - unsigned short InsertModeDp; - unsigned short ModifiedDp; - unsigned short SelectionModeDp; -} HMI_EditControl_Runtime_Edit_typ; - -typedef struct HMI_EditControl_Runtime_typ -{ unsigned short StatusDp; - unsigned short BusyDp; - struct HMI_EditControl_Runtime_Cmds_typ Commands; - struct HMI_EditControl_Runtime_Comp_typ Completion; - struct HMI_EditControl_Runtime_Edit_typ Edit; -} HMI_EditControl_Runtime_typ; - -typedef struct HMI_EditControl_Internal_typ -{ plcstring CurrentLineText[201]; - unsigned short CurrentLineIndex; - unsigned char CommandState; - plcstring EditText[81]; - unsigned char DesiredLine; - unsigned char DesiredColumn; - unsigned char Offset; - unsigned char Count; - unsigned char highlightmode; -} HMI_EditControl_Internal_typ; - -typedef struct HMI_EditControl_typ -{ struct HMI_EditControl_Value_typ Value; - struct HMI_EditControl_Runtime_typ Runtime; - struct HMI_EditControl_Internal_typ internal; - enum HMI_EditControl_CMDS Command; -} HMI_EditControl_typ; - -typedef struct HMI_Editor_Controller_int_typ -{ struct HMI_Editor_Controller_CMD_typ CMD; -} HMI_Editor_Controller_int_typ; - -typedef struct HMI_Editor_Controller_typ -{ struct HMI_Editor_Controller_CMD_typ CMD; - struct HMI_EditControl_typ HMI; - struct HMI_Editor_Controller_int_typ Internal; -} HMI_Editor_Controller_typ; - -typedef struct Trend_ZoomScroll -{ - /* VAR_INPUT (analog) */ - float ZoomBase; - float ScrollBase; - /* VAR_OUTPUT (analog) */ - float ZoomDP; - float ScrollDP; - unsigned short ModeDP; - /* VAR (analog) */ - float Midpt; - /* VAR_INPUT (digital) */ - plcbit ZoomIn; - plcbit ZoomOut; - plcbit ScrollPos; - plcbit ScrollNeg; - plcbit Reset; - /* VAR (digital) */ - plcbit Init; -} Trend_ZoomScroll_typ; - -typedef struct HMI_TrendValueScale_typ -{ unsigned short ColorDP; - float ScrollManual; - float ZoomManual; - struct Trend_ZoomScroll ZoomScroll; - unsigned short StatusDP; -} HMI_TrendValueScale_typ; - -typedef struct HMI_TrendTimeContainer_typ -{ unsigned short ColorDP; - float CursorTimeDP[2]; - float ZoomManual; - float ScrollManual; - unsigned short ModeManual; - struct Trend_ZoomScroll ZoomScroll; - unsigned short StatusDP; -} HMI_TrendTimeContainer_typ; - -typedef struct HMI_TrendScaleContainer_typ -{ unsigned short ColorDP; - unsigned short StatusDP; -} HMI_TrendScaleContainer_typ; - -typedef struct HMI_TrendCurve_typ -{ unsigned short ColorDP; - float CursorValueDP[2]; - unsigned short StatusDP; -} HMI_TrendCurve_typ; - -typedef struct HMI_TrendGrid_typ -{ unsigned short ColorDP; - unsigned short StatusDP; -} HMI_TrendGrid_typ; - -typedef struct HMI_Trend_typ -{ unsigned short ColorDP; - unsigned short SelectItemDP; - unsigned short StatusDP; - float CursorPositionDP[2]; - unsigned short CursorStatusDP[2]; - struct HMI_TrendGrid_typ Grid; - struct HMI_TrendCurve_typ Curve[16]; - struct HMI_TrendScaleContainer_typ ScaleContainer[5]; - struct HMI_TrendTimeContainer_typ TimeContainer; - struct HMI_TrendValueScale_typ ValueScale[4]; - float GlobalXZoomManual; - float GlobalXScrollManual; - unsigned short GlobalXScrollModeManual; - struct Trend_ZoomScroll GlobalXZoomScroll; - float GlobalYScrollManual; - float GlobalYZoomManual; - struct Trend_ZoomScroll GlobalYZoomScroll; -} HMI_Trend_typ; - -typedef struct RecMgr_HMI_typ -{ struct HMI_Button_typ RetrieveFromSystem; - struct HMI_Button_typ ApplyToSystem; - struct HMI_Bitmap_typ Modified; -} RecMgr_HMI_typ; - -typedef struct RecMgr_IN_typ -{ unsigned long pHMIRecipe; - unsigned long pSystemRecipe; - unsigned long RecipeLength; - plcstring LoggerName[9]; -} RecMgr_IN_typ; - -typedef struct RecipeMgr_typ -{ struct RecMgr_IN_typ IN; - struct RecMgr_HMI_typ HMI; -} RecipeMgr_typ; - -typedef struct RecipeUpdater_Internal_typ -{ enum RecipeUpdater_STATE State; - struct DirRead DirRead; - struct fiDIR_READ_DATA CurrentFile; -} RecipeUpdater_Internal_typ; - -typedef struct HMIFileBrowse -{ - /* VAR_INPUT (analog) */ - plcstring FileDevice[81]; - unsigned long pDirectorySearchPath; - unsigned long pFileList; - unsigned long MaxFiles; - unsigned long pFileExtList; - unsigned short MaxExt; - signed long FileIndex; - plcstring FileSelection[261]; - signed long FileExtIndex; - plcstring FileExtSelection[261]; - /* VAR_OUTPUT (analog) */ - plcstring CurrentPath[261]; - unsigned short NumFiles; - plcstring Status[261]; - /* VAR (analog) */ - struct HMI_File_Browse_internal_typ Internal; - /* VAR_INPUT (digital) */ - plcbit Enable; - plcbit Refresh; - plcbit EnableDirectorySearch; - plcbit EnableDataObjects; - plcbit BrowseToDirectory; - /* VAR_OUTPUT (digital) */ - plcbit CompletionDP; -} HMIFileBrowse_typ; - -typedef struct FileQueue -{ - /* VAR_INPUT (analog) */ - plcstring FileDevice[81]; - plcstring Path[321]; - /* VAR_OUTPUT (analog) */ - plcstring FileName[81]; - unsigned long ErrorID; - /* VAR (analog) */ - struct RecipeUpdater_Internal_typ internal; - /* VAR_INPUT (digital) */ - plcbit Next; - plcbit Cancel; - /* VAR_OUTPUT (digital) */ - plcbit Execute; - plcbit Done; - plcbit Busy; - plcbit Error; -} FileQueue_typ; - - - -/* Prototyping of functions and function blocks */ -_BUR_PUBLIC void HMIFileBrowse(struct HMIFileBrowse* inst); -_BUR_PUBLIC void ListBoxFub(struct ListBoxFub* inst); -_BUR_PUBLIC void DirectoryFub(struct DirectoryFub* inst); -_BUR_PUBLIC void Trend_ZoomScroll(struct Trend_ZoomScroll* inst); -_BUR_PUBLIC void FileQueue(struct FileQueue* inst); -_BUR_PUBLIC plcbit LogView_init(struct LogView_typ* LogView); -_BUR_PUBLIC plcbit LogView_cyclic(struct LogView_typ* LogView); -_BUR_PUBLIC plcbit LogView_HMI(struct LogView_typ* LogView, struct LogView_HMI_typ* LogViewHMI); -_BUR_PUBLIC plcbit Editor_fn(struct HMI_Editor_Controller_typ* EditorController); -_BUR_PUBLIC plcbit TrendFn(struct HMI_Trend_typ* t); -_BUR_PUBLIC plcbit HMI_TabControlFn_Cyclic(struct HMI_Basic_typ* t); -_BUR_PUBLIC plcbit HMI_Hide(unsigned short* StatusDP); -_BUR_PUBLIC plcbit HMI_Show(unsigned short* StatusDP); -_BUR_PUBLIC plcbit HMI_Lock(unsigned short* StatusDP); -_BUR_PUBLIC plcbit HMI_Unlock(unsigned short* StatusDP); -_BUR_PUBLIC plcbit HMI_SetFocus(unsigned short* StatusDP); -_BUR_PUBLIC plcbit HMI_ResetFocus(unsigned short* StatusDP); -_BUR_PUBLIC plcbit HMI_OpenTouchpad(unsigned short* StatusDP); -_BUR_PUBLIC plcbit EditorControl(struct HMI_EditControl_typ* Editor); -_BUR_PUBLIC unsigned short ControlTouch(unsigned short* StatusDP); -_BUR_PUBLIC plcbit ControlDismiss(unsigned short* StatusDP); -_BUR_PUBLIC unsigned long LogViewerGetAlarmString(struct LogView_GetAlarm* t, unsigned long AlarmIndex, unsigned long LoggerIdent, plcstring* OutputString); -_BUR_PUBLIC plcbit LogViewerCreateString(struct asarlogREAD* ReadData, unsigned char ASCIIData[256], plcstring* OutputString); -_BUR_PUBLIC unsigned long EditControl_CS_replaceline(plcstring* Text, unsigned short Line, plcstring* Output); -_BUR_PUBLIC unsigned long EditControl_CS_append(plcstring* Text, plcstring* Output); -_BUR_PUBLIC unsigned long EditControl_CS_getline(unsigned short Line, plcstring* Output); -_BUR_PUBLIC unsigned long EditControl_CS_goto(unsigned short Line, unsigned short Col, plcstring* Output); -_BUR_PUBLIC unsigned long EditControl_CS_highlight(unsigned short Value, unsigned short Mode, plcstring* Output); -_BUR_PUBLIC unsigned long EditControl_CS_insert(plcstring* Text, unsigned short Line, plcstring* Output); -_BUR_PUBLIC unsigned long EditControl_CS_read(unsigned short Offset, unsigned short Count, plcstring* Output); -_BUR_PUBLIC unsigned long EditControl_CS_replacemarked(plcstring* Text, plcstring* Output); -_BUR_PUBLIC plcbit HMI_FindCurrentTab(struct HMI_Basic_typ* t); -_BUR_PUBLIC signed long FindIndexOfString(plcstring* Value, unsigned long List, unsigned long MaxList); -_BUR_PUBLIC signed long RecipeMgr(struct RecipeMgr_typ* Rec); -_BUR_PUBLIC unsigned short GetDataObjectList(unsigned long List, unsigned long MaxObjects); - - -__asm__(".section \".plc\""); - -/* Additional IEC dependencies */ -__asm__(".ascii \"iecdep \\\"Logical/Libraries/Loupe/logthat/Constants.var\\\" scope \\\"global\\\"\\n\""); - -__asm__(".previous"); - -#ifdef __cplusplus -}; -#endif -#endif /* _HMITOOLS_ */ - diff --git a/example/AsProject/Logical/Libraries/Loupe/hmitools/SG4/libhmitools.a b/example/AsProject/Logical/Libraries/Loupe/hmitools/SG4/libhmitools.a deleted file mode 100644 index 958e0a7..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/hmitools/SG4/libhmitools.a and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/hmitools/Updater.typ b/example/AsProject/Logical/Libraries/Loupe/hmitools/Updater.typ deleted file mode 100644 index e4f2845..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/hmitools/Updater.typ +++ /dev/null @@ -1,26 +0,0 @@ -(* -* File: Updater.typ -* Copyright (c) 2023 Loupe -* https://loupe.team -* -* This file is part of HMITools, licensed under the MIT License. -* -*) - -TYPE - RecipeUpdater_Internal_typ : STRUCT - State : RecipeUpdater_STATE; - DirRead : DirRead; - CurrentFile : fiDIR_READ_DATA; - END_STRUCT; - RecipeUpdater_STATE : - ( - RecipeUpdater_ST_IDLE, - RecipeUpdater_ST_ReadDirectory, - RecipeUpdater_ST_ReadFile, - RecipeUpdater_ST_WAIT, - RecipeUpdater_ST_UpdateFile, - RecipeUpdater_ST_Done, - RecipeUpdater_ST_ - ); -END_TYPE diff --git a/example/AsProject/Logical/Libraries/Loupe/hmitools/package.json b/example/AsProject/Logical/Libraries/Loupe/hmitools/package.json deleted file mode 100644 index 3e56afa..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/hmitools/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "@loupeteam/hmitools", - "version": "0.11.4", - "description": "Loupe's hmitools library for Automation Runtime", - "homepage": "https://loupeteam.github.io/LoupeDocs/libraries/hmitools.html", - "scripts": {}, - "keywords": [], - "author": "Loupe", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/loupeteam/hmitools" - }, - "lpm": { - "type": "library" - }, - "dependencies": { - "@loupeteam/ringbuflib": ">=0.2.0", - "@loupeteam/logthat": "*", - "@loupeteam/stringext": ">=0.4.0" - } -} \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/Loupe/logthat/Binary.lby b/example/AsProject/Logical/Libraries/Loupe/logthat/Binary.lby deleted file mode 100644 index e3fec51..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/logthat/Binary.lby +++ /dev/null @@ -1,15 +0,0 @@ - - - - Types.typ - Constants.var - LogThat.fun - LogInternalWrite.h - CHANGELOG.md - - - - - - - diff --git a/example/AsProject/Logical/Libraries/Loupe/logthat/CHANGELOG.md b/example/AsProject/Logical/Libraries/Loupe/logthat/CHANGELOG.md deleted file mode 100644 index 9ee1d68..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/logthat/CHANGELOG.md +++ /dev/null @@ -1,15 +0,0 @@ -# Change log - -- 0.05.1 - Rename problematic 'delete' internal var to 'deletion' (to avoid C++ keyword conflict in older AS versions) -- 0.05.0 - Remove constants: LOG_DEFAULT_MESSAGESIZE, LOG_DEFAULT_BUFFEREDENTRIES - - Remove ManageLoggers Fn - - Restricted formatted strings to size 320 chars - - Changed message type from BRSE_ARL_Arguments_typ to StrExtArgs_typ - - Remove the max number of configurable loggers - - Update to BR new logger system -- 0.04.1 - Add logStateChange() FUB. -- 0.04 - Change logger name strlen to 8 characters. - - Add logMessageData_typ as directly derived BRSE_ARL_Arguments_typ -- 0.03 - Increase default message size to handle ErrorLib messages by default -- 0.02 - Change internal ID handling to lessen the likelihood of ID collisions -- 0.01 - First version \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/Loupe/logthat/Constants.var b/example/AsProject/Logical/Libraries/Loupe/logthat/Constants.var deleted file mode 100644 index cc587f9..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/logthat/Constants.var +++ /dev/null @@ -1,16 +0,0 @@ -(* - * File: Constants.var - * Copyright (c) 2023 Loupe - * https://loupe.team - * - * This file is part of LogThat, licensed under the MIT License. - *) - -VAR CONSTANT - LOG_STRLEN_LOGGERNAME : UINT := 8; - LOG_STRLEN_MESSAGE : UINT := 320; - LOG_STRLEN_STATENAME : UINT := 80; - LOG_STRLEN_MODULENAME : UINT := 20; - LOG_DEFAULT_LOGGERSIZE : UDINT := 100000; - LOG_DEFAULT_FACILITY : UINT := 0; -END_VAR diff --git a/example/AsProject/Logical/Libraries/Loupe/logthat/LogInternalWrite.h b/example/AsProject/Logical/Libraries/Loupe/logthat/LogInternalWrite.h deleted file mode 100644 index bcea113..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/logthat/LogInternalWrite.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * File: LogInternal.Write.h - * Copyright (c) 2023 Loupe - * https://loupe.team - * - * This file is part of LogThat, licensed under the MIT License. - */ - - -#include -#ifdef __cplusplus - extern "C" - { -#endif - #include "LogThat.h" -#ifdef __cplusplus - }; -#endif - -#include - -// Writes to log from severity, code, and template string -// Use this when: -// - You do NOT have an eventID -// - You are sure/NOT sure you have msgData -signed long LogInternalWrite(plcstring* loggerName, unsigned char severity, unsigned short facility, unsigned short code, plcstring* message, unsigned long pMsgData); - -// Writes to log from event ID and template string -// Use this when: -// - You have an eventID -// - You are NOT sure you have msgData -signed long LogInternalWriteMsgDataSwitch(plcstring* loggerName, signed long eventID, plcstring* message, unsigned long pMsgData); - -// Formats message with message data then writes to logger -// Use this when: -// - You have an eventID -// - You are sure you have msgData -signed long LogInternalWriteMsgData(plcstring* loggerName, signed long eventID, plcstring* message, unsigned long pMsgData); - -// Writes to log from event ID and message -// Use this when: -// - You have an eventID -// - You are sure you do NOT have msgData -signed long LogInternalWriteEvent(plcstring* loggerName, signed long eventID, plcstring* message); - diff --git a/example/AsProject/Logical/Libraries/Loupe/logthat/LogThat.fun b/example/AsProject/Logical/Libraries/Loupe/logthat/LogThat.fun deleted file mode 100644 index 607ab78..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/logthat/LogThat.fun +++ /dev/null @@ -1,96 +0,0 @@ -(* - * File: LogThat.fun - * Copyright (c) 2023 Loupe - * https://loupe.team - * - * This file is part of LogThat, licensed under the MIT License. - *) - -(*!!!PRE-RELEASE!!!*) -(*Proposed API*) - -FUNCTION_BLOCK logDelete - VAR_INPUT - name : STRING[LOG_STRLEN_LOGGERNAME]; (*Name of logger to be deleted*) - execute : BOOL; (*Start deleting*) - END_VAR - VAR_OUTPUT - done : BOOL; (*Done*) - busy : BOOL; (*Busy*) - error : BOOL; (*Error has occured*) - errorID : DINT; (*Error ID*) - END_VAR - VAR - ident : ArEventLogGetIdent; - deletion : ArEventLogDelete; - END_VAR -END_FUNCTION_BLOCK - -{REDUND_CONTEXT} FUNCTION createLogInit : DINT (*Only supported in INIT*) - VAR_INPUT - loggerName : STRING[LOG_STRLEN_LOGGERNAME]; (*Name of the logbook to be created*) - size : UDINT; (*Length of the log data area in bytes (min 4096)*) - persistence : LOG_PERSISTENCE_enum; (*Persistence of logbook*) - END_VAR -END_FUNCTION - -{REDUND_CONTEXT} FUNCTION logEventID : DINT (*Write an event message to the logger*) - VAR_INPUT - loggerName : STRING[LOG_STRLEN_LOGGERNAME]; (*Pointer to string containing name of logger for message to be added*) - eventID : DINT; (*Event ID containing severity, facility, and code*) - eventString : STRING[LOG_STRLEN_MESSAGE]; (*Event message*) - pMsgData : UDINT; (*Pointer to format arguments*) - END_VAR -END_FUNCTION - -{REDUND_CONTEXT} FUNCTION logSuccess : DINT (*Write a success message to the logger*) - VAR_INPUT - loggerName : STRING[LOG_STRLEN_LOGGERNAME]; (*Pointer to string containing name of logger for message to be added*) - errorID : UINT; (*Code for logger entry*) - errorString : STRING[LOG_STRLEN_MESSAGE]; (*Message for logger entry*) - pMsgData : UDINT; (*Pointer to format arguments*) - END_VAR -END_FUNCTION -(*Legacy*) - -{REDUND_CONTEXT} FUNCTION logWarning : DINT (*Write a warning message to the logger*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*) - VAR_INPUT - loggerName : STRING[LOG_STRLEN_LOGGERNAME]; (*Pointer to string containing name of logger for message to be added*) - errorID : UINT; (*Code for logger entry*) - errorString : STRING[LOG_STRLEN_MESSAGE]; (*Message for logger entry*) - pMsgData : UDINT; (*Pointer to format arguments*) - END_VAR -END_FUNCTION - -{REDUND_CONTEXT} FUNCTION logError : DINT (*Write a fatal error message to the logger*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*) - VAR_INPUT - loggerName : STRING[LOG_STRLEN_LOGGERNAME]; (*Pointer to string containing name of logger for message to be added*) - errorID : UINT; (*Code for logger entry*) - errorString : STRING[LOG_STRLEN_MESSAGE]; (*Message for logger entry*) - pMsgData : UDINT; (*Pointer to format arguments*) - END_VAR -END_FUNCTION - -{REDUND_CONTEXT} FUNCTION logInfo : DINT (*Write an info message to the logger*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*) - VAR_INPUT - loggerName : STRING[LOG_STRLEN_LOGGERNAME]; (*Pointer to string containing name of logger for message to be added*) - errorID : UINT; (*Code for logger entry*) - errorString : STRING[LOG_STRLEN_MESSAGE]; (*Message for logger entry*) - pMsgData : UDINT; (*Pointer to format arguments*) - END_VAR -END_FUNCTION - -{REDUND_CONTEXT} FUNCTION_BLOCK logStateChange (*pass in state value and logger name. *) (*$GROUP=User*) - VAR_INPUT - LoggerName : STRING[LOG_STRLEN_LOGGERNAME]; (*Name of logger for messages to be added*) - ModuleName : STRING[LOG_STRLEN_MODULENAME]; (*Name of module with state changes*) - State : UDINT; (*Current state*) - StateName : STRING[LOG_STRLEN_STATENAME]; (*State name or description*) - END_VAR - VAR - oldState : UDINT; - oldStateName : STRING[LOG_STRLEN_STATENAME]; - Status : UINT; - initialized : BOOL; - END_VAR -END_FUNCTION_BLOCK diff --git a/example/AsProject/Logical/Libraries/Loupe/logthat/SG4/Arm/liblogthat.a b/example/AsProject/Logical/Libraries/Loupe/logthat/SG4/Arm/liblogthat.a deleted file mode 100644 index 8f4633d..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/logthat/SG4/Arm/liblogthat.a and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/logthat/SG4/Arm/logthat.br b/example/AsProject/Logical/Libraries/Loupe/logthat/SG4/Arm/logthat.br deleted file mode 100644 index 3a38358..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/logthat/SG4/Arm/logthat.br and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/logthat/SG4/Arm/logthat.h b/example/AsProject/Logical/Libraries/Loupe/logthat/SG4/Arm/logthat.h deleted file mode 100644 index 1eca467..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/logthat/SG4/Arm/logthat.h +++ /dev/null @@ -1,152 +0,0 @@ -/* Automation Studio generated header file */ -/* Do not edit ! */ -/* logthat 0.05.1 */ - -#ifndef _LOGTHAT_ -#define _LOGTHAT_ -#ifdef __cplusplus -extern "C" -{ -#endif -#ifndef _logthat_VERSION -#define _logthat_VERSION 0.05.1 -#endif - -#include - -#ifndef _BUR_PUBLIC -#define _BUR_PUBLIC -#endif -#ifdef _SG3 - #include "ArEventLog.h" - #include "AsBrStr.h" - #include "stringext.h" -#endif -#ifdef _SG4 - #include "ArEventLog.h" - #include "AsBrStr.h" - #include "stringext.h" -#endif -#ifdef _SGC - #include "ArEventLog.h" - #include "AsBrStr.h" - #include "stringext.h" -#endif - - -/* Constants */ -#ifdef _REPLACE_CONST - #define LOG_STRLEN_LOGGERNAME 8U - #define LOG_STRLEN_MESSAGE 320U - #define LOG_STRLEN_STATENAME 80U - #define LOG_STRLEN_MODULENAME 20U - #define LOG_DEFAULT_LOGGERSIZE 100000U - #define LOG_DEFAULT_FACILITY 0U -#else - _GLOBAL_CONST unsigned short LOG_STRLEN_LOGGERNAME; - _GLOBAL_CONST unsigned short LOG_STRLEN_MESSAGE; - _GLOBAL_CONST unsigned short LOG_STRLEN_STATENAME; - _GLOBAL_CONST unsigned short LOG_STRLEN_MODULENAME; - _GLOBAL_CONST unsigned long LOG_DEFAULT_LOGGERSIZE; - _GLOBAL_CONST unsigned short LOG_DEFAULT_FACILITY; -#endif - - - - -/* Datatypes and datatypes of function blocks */ -typedef enum LOG_SEVERITY_enum -{ LOG_SEVERITY_SUCCESS, - LOG_SEVERITY_INFO, - LOG_SEVERITY_WARNING, - LOG_SEVERITY_ERROR -} LOG_SEVERITY_enum; - -typedef enum LOG_PERSISTENCE_enum -{ LOG_PERSISTENCE_VOLATILE, - LOG_PERSISTENCE_REMANENT, - LOG_PERSISTENCE_PERSIST -} LOG_PERSISTENCE_enum; - -typedef enum LOG_ERR_enum -{ LOG_ERR_INVALIDINPUT = 58300, - LOG_ERR_NOTINITIALIZED, - LOG_ERR_LOGGERSFULL -} LOG_ERR_enum; - -typedef struct InteralLogFubs_typ -{ struct ArEventLogCreate CreateLog; - struct ArEventLogGetIdent GetIdent; - struct ArEventLogWrite WriteLog; -} InteralLogFubs_typ; - -typedef struct logLogger_Internal_typ -{ unsigned short ID; - plcbit Allocated; - unsigned short AllocStatus; - unsigned short CyclicStatus; - ArEventLogIdentType Ident; - unsigned char Persistance; - signed long creationStatus; -} logLogger_Internal_typ; - -typedef struct logLogger_typ -{ plcstring LoggerName[9]; - unsigned long LoggerSize; - unsigned long MessageSize; - unsigned long BufferedEntries; - plcbit Error; - unsigned short ErrorID; - struct logLogger_Internal_typ Internal; -} logLogger_typ; - -typedef struct logDelete -{ - /* VAR_INPUT (analog) */ - plcstring name[9]; - /* VAR_OUTPUT (analog) */ - signed long errorID; - /* VAR (analog) */ - struct ArEventLogGetIdent ident; - struct ArEventLogDelete deletion; - /* VAR_INPUT (digital) */ - plcbit execute; - /* VAR_OUTPUT (digital) */ - plcbit done; - plcbit busy; - plcbit error; -} logDelete_typ; - -typedef struct logStateChange -{ - /* VAR_INPUT (analog) */ - plcstring LoggerName[9]; - plcstring ModuleName[21]; - unsigned long State; - plcstring StateName[81]; - /* VAR (analog) */ - unsigned long oldState; - plcstring oldStateName[81]; - unsigned short Status; - /* VAR (digital) */ - plcbit initialized; -} logStateChange_typ; - - - -/* Prototyping of functions and function blocks */ -_BUR_PUBLIC void logDelete(struct logDelete* inst); -_BUR_PUBLIC void logStateChange(struct logStateChange* inst); -_BUR_PUBLIC signed long createLogInit(plcstring* loggerName, unsigned long size, enum LOG_PERSISTENCE_enum persistence); -_BUR_PUBLIC signed long logEventID(plcstring* loggerName, signed long eventID, plcstring* eventString, unsigned long pMsgData); -_BUR_PUBLIC signed long logSuccess(plcstring* loggerName, unsigned short errorID, plcstring* errorString, unsigned long pMsgData); -_BUR_PUBLIC signed long logWarning(plcstring* loggerName, unsigned short errorID, plcstring* errorString, unsigned long pMsgData); -_BUR_PUBLIC signed long logError(plcstring* loggerName, unsigned short errorID, plcstring* errorString, unsigned long pMsgData); -_BUR_PUBLIC signed long logInfo(plcstring* loggerName, unsigned short errorID, plcstring* errorString, unsigned long pMsgData); - - -#ifdef __cplusplus -}; -#endif -#endif /* _LOGTHAT_ */ - diff --git a/example/AsProject/Logical/Libraries/Loupe/logthat/SG4/liblogthat.a b/example/AsProject/Logical/Libraries/Loupe/logthat/SG4/liblogthat.a deleted file mode 100644 index c49e407..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/logthat/SG4/liblogthat.a and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/logthat/SG4/logthat.br b/example/AsProject/Logical/Libraries/Loupe/logthat/SG4/logthat.br deleted file mode 100644 index 2d618b3..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/logthat/SG4/logthat.br and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/logthat/SG4/logthat.h b/example/AsProject/Logical/Libraries/Loupe/logthat/SG4/logthat.h deleted file mode 100644 index 1eca467..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/logthat/SG4/logthat.h +++ /dev/null @@ -1,152 +0,0 @@ -/* Automation Studio generated header file */ -/* Do not edit ! */ -/* logthat 0.05.1 */ - -#ifndef _LOGTHAT_ -#define _LOGTHAT_ -#ifdef __cplusplus -extern "C" -{ -#endif -#ifndef _logthat_VERSION -#define _logthat_VERSION 0.05.1 -#endif - -#include - -#ifndef _BUR_PUBLIC -#define _BUR_PUBLIC -#endif -#ifdef _SG3 - #include "ArEventLog.h" - #include "AsBrStr.h" - #include "stringext.h" -#endif -#ifdef _SG4 - #include "ArEventLog.h" - #include "AsBrStr.h" - #include "stringext.h" -#endif -#ifdef _SGC - #include "ArEventLog.h" - #include "AsBrStr.h" - #include "stringext.h" -#endif - - -/* Constants */ -#ifdef _REPLACE_CONST - #define LOG_STRLEN_LOGGERNAME 8U - #define LOG_STRLEN_MESSAGE 320U - #define LOG_STRLEN_STATENAME 80U - #define LOG_STRLEN_MODULENAME 20U - #define LOG_DEFAULT_LOGGERSIZE 100000U - #define LOG_DEFAULT_FACILITY 0U -#else - _GLOBAL_CONST unsigned short LOG_STRLEN_LOGGERNAME; - _GLOBAL_CONST unsigned short LOG_STRLEN_MESSAGE; - _GLOBAL_CONST unsigned short LOG_STRLEN_STATENAME; - _GLOBAL_CONST unsigned short LOG_STRLEN_MODULENAME; - _GLOBAL_CONST unsigned long LOG_DEFAULT_LOGGERSIZE; - _GLOBAL_CONST unsigned short LOG_DEFAULT_FACILITY; -#endif - - - - -/* Datatypes and datatypes of function blocks */ -typedef enum LOG_SEVERITY_enum -{ LOG_SEVERITY_SUCCESS, - LOG_SEVERITY_INFO, - LOG_SEVERITY_WARNING, - LOG_SEVERITY_ERROR -} LOG_SEVERITY_enum; - -typedef enum LOG_PERSISTENCE_enum -{ LOG_PERSISTENCE_VOLATILE, - LOG_PERSISTENCE_REMANENT, - LOG_PERSISTENCE_PERSIST -} LOG_PERSISTENCE_enum; - -typedef enum LOG_ERR_enum -{ LOG_ERR_INVALIDINPUT = 58300, - LOG_ERR_NOTINITIALIZED, - LOG_ERR_LOGGERSFULL -} LOG_ERR_enum; - -typedef struct InteralLogFubs_typ -{ struct ArEventLogCreate CreateLog; - struct ArEventLogGetIdent GetIdent; - struct ArEventLogWrite WriteLog; -} InteralLogFubs_typ; - -typedef struct logLogger_Internal_typ -{ unsigned short ID; - plcbit Allocated; - unsigned short AllocStatus; - unsigned short CyclicStatus; - ArEventLogIdentType Ident; - unsigned char Persistance; - signed long creationStatus; -} logLogger_Internal_typ; - -typedef struct logLogger_typ -{ plcstring LoggerName[9]; - unsigned long LoggerSize; - unsigned long MessageSize; - unsigned long BufferedEntries; - plcbit Error; - unsigned short ErrorID; - struct logLogger_Internal_typ Internal; -} logLogger_typ; - -typedef struct logDelete -{ - /* VAR_INPUT (analog) */ - plcstring name[9]; - /* VAR_OUTPUT (analog) */ - signed long errorID; - /* VAR (analog) */ - struct ArEventLogGetIdent ident; - struct ArEventLogDelete deletion; - /* VAR_INPUT (digital) */ - plcbit execute; - /* VAR_OUTPUT (digital) */ - plcbit done; - plcbit busy; - plcbit error; -} logDelete_typ; - -typedef struct logStateChange -{ - /* VAR_INPUT (analog) */ - plcstring LoggerName[9]; - plcstring ModuleName[21]; - unsigned long State; - plcstring StateName[81]; - /* VAR (analog) */ - unsigned long oldState; - plcstring oldStateName[81]; - unsigned short Status; - /* VAR (digital) */ - plcbit initialized; -} logStateChange_typ; - - - -/* Prototyping of functions and function blocks */ -_BUR_PUBLIC void logDelete(struct logDelete* inst); -_BUR_PUBLIC void logStateChange(struct logStateChange* inst); -_BUR_PUBLIC signed long createLogInit(plcstring* loggerName, unsigned long size, enum LOG_PERSISTENCE_enum persistence); -_BUR_PUBLIC signed long logEventID(plcstring* loggerName, signed long eventID, plcstring* eventString, unsigned long pMsgData); -_BUR_PUBLIC signed long logSuccess(plcstring* loggerName, unsigned short errorID, plcstring* errorString, unsigned long pMsgData); -_BUR_PUBLIC signed long logWarning(plcstring* loggerName, unsigned short errorID, plcstring* errorString, unsigned long pMsgData); -_BUR_PUBLIC signed long logError(plcstring* loggerName, unsigned short errorID, plcstring* errorString, unsigned long pMsgData); -_BUR_PUBLIC signed long logInfo(plcstring* loggerName, unsigned short errorID, plcstring* errorString, unsigned long pMsgData); - - -#ifdef __cplusplus -}; -#endif -#endif /* _LOGTHAT_ */ - diff --git a/example/AsProject/Logical/Libraries/Loupe/logthat/Types.typ b/example/AsProject/Logical/Libraries/Loupe/logthat/Types.typ deleted file mode 100644 index 9a464a3..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/logthat/Types.typ +++ /dev/null @@ -1,53 +0,0 @@ -(* - * File: Types.typ - * Copyright (c) 2023 Loupe - * https://loupe.team - * - * This file is part of LogThat, licensed under the MIT License. - *) - - -TYPE - InteralLogFubs_typ : STRUCT - CreateLog : ArEventLogCreate; - GetIdent : ArEventLogGetIdent; - WriteLog : ArEventLogWrite; - END_STRUCT; - logLogger_Internal_typ : STRUCT - ID : UINT; - Allocated : BOOL; - AllocStatus : UINT; - CyclicStatus : UINT; - Ident : ArEventLogIdentType; - Persistance : USINT; - creationStatus : DINT; - END_STRUCT; - logLogger_typ : STRUCT - LoggerName : STRING[LOG_STRLEN_LOGGERNAME]; - LoggerSize : UDINT; - MessageSize : UDINT; - BufferedEntries : UDINT; - Error : BOOL; - ErrorID : UINT; - Internal : logLogger_Internal_typ; - END_STRUCT; - LOG_SEVERITY_enum : - ( (*Aligns with arEVENTLOG_SEVERITY_ constants*) - LOG_SEVERITY_SUCCESS, (*severity code success*) - LOG_SEVERITY_INFO, (*severity code informational*) - LOG_SEVERITY_WARNING, (*severity code warning*) - LOG_SEVERITY_ERROR (*severity code error*) - ); - LOG_PERSISTENCE_enum : - ( (*Aligns with arEVENTLOG_PERSISTENCE_ constants*) - LOG_PERSISTENCE_VOLATILE, (*persistence volatile*) - LOG_PERSISTENCE_REMANENT, (*persistence remanent*) - LOG_PERSISTENCE_PERSIST (*persistence persistent*) - ); - LOG_ERR_enum : - ( - LOG_ERR_INVALIDINPUT := 58300, - LOG_ERR_NOTINITIALIZED, (*Deprecated*) - LOG_ERR_LOGGERSFULL (*Deprecated*) - ); -END_TYPE diff --git a/example/AsProject/Logical/Libraries/Loupe/logthat/package.json b/example/AsProject/Logical/Libraries/Loupe/logthat/package.json deleted file mode 100644 index 4be77fc..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/logthat/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "@loupeteam/logthat", - "version": "0.5.1", - "description": "Loupe's logthat library for Automation Runtime", - "homepage": "https://loupeteam.github.io/LoupeDocs/libraries/logthat.html", - "scripts": {}, - "keywords": [], - "author": "Loupe", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/loupeteam/logthat" - }, - "lpm": { - "type": "library" - }, - "dependencies": { - "@loupeteam/stringext": ">=0.14.1" - } -} \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/Loupe/persist/Binary.lby b/example/AsProject/Logical/Libraries/Loupe/persist/Binary.lby deleted file mode 100644 index 1a8074f..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/persist/Binary.lby +++ /dev/null @@ -1,12 +0,0 @@ - - - - Persist.typ - Persist.var - Persist.fun - CHANGELOG.md - - - - - diff --git a/example/AsProject/Logical/Libraries/Loupe/persist/CHANGELOG.md b/example/AsProject/Logical/Libraries/Loupe/persist/CHANGELOG.md deleted file mode 100644 index a0486fb..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/persist/CHANGELOG.md +++ /dev/null @@ -1,13 +0,0 @@ -0.00.7 - Increase maximum size of variable list from 50 to 100 -0.00.6 - Changed PV_xgetadr status handling to properly handle deleted variables -0.00.4 - Changed memory alignment check -0.00.3 - BACKWARDS COMPATIBILITY ISSUES! - Changed DataValid to pDataValid. DataValid needs to be tracked - in an external power safe variable. Giving the Persistence object - the address of DataValid allows the object to reset DataValid if it - detects corrupted memory. - Bug fixes. - Performance improvements. -0.00.2 - Added check for data moving. -0.00.1 - PersistFn_Init() to load values from persistent memory. - PersistFn_Cyclic() to store values to persistent memory. \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/Loupe/persist/Persist.fun b/example/AsProject/Logical/Libraries/Loupe/persist/Persist.fun deleted file mode 100644 index 9c63892..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/persist/Persist.fun +++ /dev/null @@ -1,40 +0,0 @@ -(* - * File: Persist.fun - * Copyright (c) 2023 Loupe - * https://loupe.team - * - * This file is part of Persist, licensed under the MIT License. - * - * ******************************************************************** - * Functions and function blocks of library Persist - ********************************************************************) - -FUNCTION PersistFn_Init : UINT (*Copy values from persistent memory to working memory*) (*$GROUP=User*) - VAR_IN_OUT - Persistence : Persistence_typ; - END_VAR -END_FUNCTION - -FUNCTION PersistFn_Cyclic : UINT (*Copy values from working memory to persistent memory*) (*$GROUP=User*) - VAR_IN_OUT - Persistence : Persistence_typ; - END_VAR -END_FUNCTION - -FUNCTION persistInternalMapMemory : UINT (*Internal: Determine memory addresses*) (*$GROUP=User*) - VAR_IN_OUT - Persistence : Persistence_typ; - END_VAR -END_FUNCTION - -FUNCTION persistInternalBackup : UINT (*Internal: Backup to persistent memory*) (*$GROUP=User*) - VAR_IN_OUT - Persistence : Persistence_typ; - END_VAR -END_FUNCTION - -FUNCTION persistInternalRestore : UINT (*Internal: Restore from persistent memory*) (*$GROUP=User*) - VAR_IN_OUT - Persistence : Persistence_typ; - END_VAR -END_FUNCTION diff --git a/example/AsProject/Logical/Libraries/Loupe/persist/Persist.typ b/example/AsProject/Logical/Libraries/Loupe/persist/Persist.typ deleted file mode 100644 index 4be40d8..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/persist/Persist.typ +++ /dev/null @@ -1,52 +0,0 @@ -(* - * File: Persist.typ - * Copyright (c) 2023 Loupe - * https://loupe.team - * - * This file is part of Persist, licensed under the MIT License. - * - ********************************************************************* - * Data types of library Persist - ********************************************************************) -(*Public types*) - -TYPE - PERSIST_ERR_enum : - ( - PERSIST_ERR_INVALIDINPUT := 50000, - PERSIST_ERR_OUTOFMEMORY, - PERSIST_ERR_DATAMOVED_CHANGED - ); - Persistence_Int_VarInfo_typ : STRUCT - pWorkingVariable : UDINT; - sizeofWorkingVariable : UDINT; - pPersistentMemory : UDINT; - END_STRUCT; - Persistence_Internal_typ : STRUCT - WorkingVariableInfo : ARRAY[0..PERSIST_MAI_VARLIST]OF Persistence_Int_VarInfo_typ; - ValidWorkingVariable : Persistence_Int_VarInfo_typ; - iVariable : USINT; - DataValid : BOOL; - END_STRUCT; - Persistence_OUT_STAT_typ : STRUCT - RequiredMemory : UDINT; (*Number of bytes required to store every variable in WorkingVariableList*) - Initialized : BOOL; - Error : BOOL; - ErrorID : UINT; - ErrorString : STRING[PERSIST_STRLEN_ERRORSTRING]; - END_STRUCT; - Persistence_OUT_typ : STRUCT - STAT : Persistence_OUT_STAT_typ; - END_STRUCT; - Persistence_IN_typ : STRUCT - pPersistentVariable : UDINT; (*Address of the persistent variable*) - sizeofPersistentVariable : UDINT; (*Size of the persistent variable*) - pDataValid : UDINT; (*Address of the DataValid variable. If *pDataValid == TRUE, then persistent memory is copied to working memory on startup. If *pDataValid == FALSE, then persistent memory is NOT copied to working memory*) - WorkingVariableList : ARRAY[0..PERSIST_MAI_VARLIST]OF STRING[PERSIST_STRLEN_VARNAME]; (*List of working variables to be managed*) - END_STRUCT; - Persistence_typ : STRUCT - IN : Persistence_IN_typ; - OUT : Persistence_OUT_typ; - Internal : Persistence_Internal_typ; - END_STRUCT; -END_TYPE diff --git a/example/AsProject/Logical/Libraries/Loupe/persist/Persist.var b/example/AsProject/Logical/Libraries/Loupe/persist/Persist.var deleted file mode 100644 index 8a4f34c..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/persist/Persist.var +++ /dev/null @@ -1,16 +0,0 @@ -(* - * File: Persist.var - * Copyright (c) 2023 Loupe - * https://loupe.team - * - * This file is part of Persist, licensed under the MIT License. - * - ********************************************************************* - * Constants of library Persist - ********************************************************************) - -VAR CONSTANT - PERSIST_MAI_VARLIST : USINT := 99; - PERSIST_STRLEN_VARNAME : USINT := 120; - PERSIST_STRLEN_ERRORSTRING : UINT := 320; -END_VAR diff --git a/example/AsProject/Logical/Libraries/Loupe/persist/SG4/Arm/Persist.br b/example/AsProject/Logical/Libraries/Loupe/persist/SG4/Arm/Persist.br deleted file mode 100644 index fcbc278..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/persist/SG4/Arm/Persist.br and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/persist/SG4/Arm/Persist.h b/example/AsProject/Logical/Libraries/Loupe/persist/SG4/Arm/Persist.h deleted file mode 100644 index d157f1d..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/persist/SG4/Arm/Persist.h +++ /dev/null @@ -1,104 +0,0 @@ -/* Automation Studio generated header file */ -/* Do not edit ! */ -/* Persist 0.00.7 */ - -#ifndef _PERSIST_ -#define _PERSIST_ -#ifdef __cplusplus -extern "C" -{ -#endif -#ifndef _Persist_VERSION -#define _Persist_VERSION 0.00.7 -#endif - -#include - -#ifndef _BUR_PUBLIC -#define _BUR_PUBLIC -#endif -#ifdef _SG3 - #include "sys_lib.h" -#endif -#ifdef _SG4 - #include "sys_lib.h" -#endif -#ifdef _SGC - #include "sys_lib.h" -#endif - - -/* Constants */ -#ifdef _REPLACE_CONST - #define PERSIST_MAI_VARLIST 99U - #define PERSIST_STRLEN_VARNAME 120U - #define PERSIST_STRLEN_ERRORSTRING 320U -#else - _GLOBAL_CONST unsigned char PERSIST_MAI_VARLIST; - _GLOBAL_CONST unsigned char PERSIST_STRLEN_VARNAME; - _GLOBAL_CONST unsigned short PERSIST_STRLEN_ERRORSTRING; -#endif - - - - -/* Datatypes and datatypes of function blocks */ -typedef enum PERSIST_ERR_enum -{ PERSIST_ERR_INVALIDINPUT = 50000, - PERSIST_ERR_OUTOFMEMORY, - PERSIST_ERR_DATAMOVED_CHANGED -} PERSIST_ERR_enum; - -typedef struct Persistence_Int_VarInfo_typ -{ unsigned long pWorkingVariable; - unsigned long sizeofWorkingVariable; - unsigned long pPersistentMemory; -} Persistence_Int_VarInfo_typ; - -typedef struct Persistence_Internal_typ -{ struct Persistence_Int_VarInfo_typ WorkingVariableInfo[100]; - struct Persistence_Int_VarInfo_typ ValidWorkingVariable; - unsigned char iVariable; - plcbit DataValid; -} Persistence_Internal_typ; - -typedef struct Persistence_OUT_STAT_typ -{ unsigned long RequiredMemory; - plcbit Initialized; - plcbit Error; - unsigned short ErrorID; - plcstring ErrorString[321]; -} Persistence_OUT_STAT_typ; - -typedef struct Persistence_OUT_typ -{ struct Persistence_OUT_STAT_typ STAT; -} Persistence_OUT_typ; - -typedef struct Persistence_IN_typ -{ unsigned long pPersistentVariable; - unsigned long sizeofPersistentVariable; - unsigned long pDataValid; - plcstring WorkingVariableList[100][121]; -} Persistence_IN_typ; - -typedef struct Persistence_typ -{ struct Persistence_IN_typ IN; - struct Persistence_OUT_typ OUT; - struct Persistence_Internal_typ Internal; -} Persistence_typ; - - - -/* Prototyping of functions and function blocks */ -_BUR_PUBLIC unsigned short PersistFn_Init(struct Persistence_typ* Persistence); -_BUR_PUBLIC unsigned short PersistFn_Cyclic(struct Persistence_typ* Persistence); -_BUR_PUBLIC unsigned short persistInternalMapMemory(struct Persistence_typ* Persistence); -_BUR_PUBLIC unsigned short persistInternalBackup(struct Persistence_typ* Persistence); -_BUR_PUBLIC unsigned short persistInternalRestore(struct Persistence_typ* Persistence); - - -#ifdef __cplusplus -}; -#endif -#endif /* _PERSIST_ */ - diff --git a/example/AsProject/Logical/Libraries/Loupe/persist/SG4/Arm/libPersist.a b/example/AsProject/Logical/Libraries/Loupe/persist/SG4/Arm/libPersist.a deleted file mode 100644 index 55f43f9..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/persist/SG4/Arm/libPersist.a and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/persist/SG4/Persist.br b/example/AsProject/Logical/Libraries/Loupe/persist/SG4/Persist.br deleted file mode 100644 index 833d214..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/persist/SG4/Persist.br and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/persist/SG4/Persist.h b/example/AsProject/Logical/Libraries/Loupe/persist/SG4/Persist.h deleted file mode 100644 index d157f1d..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/persist/SG4/Persist.h +++ /dev/null @@ -1,104 +0,0 @@ -/* Automation Studio generated header file */ -/* Do not edit ! */ -/* Persist 0.00.7 */ - -#ifndef _PERSIST_ -#define _PERSIST_ -#ifdef __cplusplus -extern "C" -{ -#endif -#ifndef _Persist_VERSION -#define _Persist_VERSION 0.00.7 -#endif - -#include - -#ifndef _BUR_PUBLIC -#define _BUR_PUBLIC -#endif -#ifdef _SG3 - #include "sys_lib.h" -#endif -#ifdef _SG4 - #include "sys_lib.h" -#endif -#ifdef _SGC - #include "sys_lib.h" -#endif - - -/* Constants */ -#ifdef _REPLACE_CONST - #define PERSIST_MAI_VARLIST 99U - #define PERSIST_STRLEN_VARNAME 120U - #define PERSIST_STRLEN_ERRORSTRING 320U -#else - _GLOBAL_CONST unsigned char PERSIST_MAI_VARLIST; - _GLOBAL_CONST unsigned char PERSIST_STRLEN_VARNAME; - _GLOBAL_CONST unsigned short PERSIST_STRLEN_ERRORSTRING; -#endif - - - - -/* Datatypes and datatypes of function blocks */ -typedef enum PERSIST_ERR_enum -{ PERSIST_ERR_INVALIDINPUT = 50000, - PERSIST_ERR_OUTOFMEMORY, - PERSIST_ERR_DATAMOVED_CHANGED -} PERSIST_ERR_enum; - -typedef struct Persistence_Int_VarInfo_typ -{ unsigned long pWorkingVariable; - unsigned long sizeofWorkingVariable; - unsigned long pPersistentMemory; -} Persistence_Int_VarInfo_typ; - -typedef struct Persistence_Internal_typ -{ struct Persistence_Int_VarInfo_typ WorkingVariableInfo[100]; - struct Persistence_Int_VarInfo_typ ValidWorkingVariable; - unsigned char iVariable; - plcbit DataValid; -} Persistence_Internal_typ; - -typedef struct Persistence_OUT_STAT_typ -{ unsigned long RequiredMemory; - plcbit Initialized; - plcbit Error; - unsigned short ErrorID; - plcstring ErrorString[321]; -} Persistence_OUT_STAT_typ; - -typedef struct Persistence_OUT_typ -{ struct Persistence_OUT_STAT_typ STAT; -} Persistence_OUT_typ; - -typedef struct Persistence_IN_typ -{ unsigned long pPersistentVariable; - unsigned long sizeofPersistentVariable; - unsigned long pDataValid; - plcstring WorkingVariableList[100][121]; -} Persistence_IN_typ; - -typedef struct Persistence_typ -{ struct Persistence_IN_typ IN; - struct Persistence_OUT_typ OUT; - struct Persistence_Internal_typ Internal; -} Persistence_typ; - - - -/* Prototyping of functions and function blocks */ -_BUR_PUBLIC unsigned short PersistFn_Init(struct Persistence_typ* Persistence); -_BUR_PUBLIC unsigned short PersistFn_Cyclic(struct Persistence_typ* Persistence); -_BUR_PUBLIC unsigned short persistInternalMapMemory(struct Persistence_typ* Persistence); -_BUR_PUBLIC unsigned short persistInternalBackup(struct Persistence_typ* Persistence); -_BUR_PUBLIC unsigned short persistInternalRestore(struct Persistence_typ* Persistence); - - -#ifdef __cplusplus -}; -#endif -#endif /* _PERSIST_ */ - diff --git a/example/AsProject/Logical/Libraries/Loupe/persist/SG4/libPersist.a b/example/AsProject/Logical/Libraries/Loupe/persist/SG4/libPersist.a deleted file mode 100644 index 4c79573..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/persist/SG4/libPersist.a and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/persist/package.json b/example/AsProject/Logical/Libraries/Loupe/persist/package.json deleted file mode 100644 index ec8e799..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/persist/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@loupeteam/persist", - "version": "0.0.7", - "description": "Loupe's persist library for Automation Runtime", - "homepage": "https://loupeteam.github.io/LoupeDocs/libraries/persist.html", - "scripts": {}, - "keywords": [], - "author": "Loupe", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/loupeteam/persist" - }, - "lpm": { - "type": "library" - }, - "dependencies": {} -} \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/Loupe/piper/Binary.lby b/example/AsProject/Logical/Libraries/Loupe/piper/Binary.lby deleted file mode 100644 index 5dfc4d4..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/piper/Binary.lby +++ /dev/null @@ -1,17 +0,0 @@ - - - - Piper.typ - Piper.var - Piper.fun - PiperGlobal.h - CHANGELOG.md - - - - - - - - - diff --git a/example/AsProject/Logical/Libraries/Loupe/piper/CHANGELOG.md b/example/AsProject/Logical/Libraries/Loupe/piper/CHANGELOG.md deleted file mode 100644 index d7b89ec..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/piper/CHANGELOG.md +++ /dev/null @@ -1,39 +0,0 @@ -# Change log - -0.1.9 - Add Piper_getBusyModules to display several busy modules at once - - Prevent abort commands while in BOOTING and BOOTED - -0.1.8 - Update dependencies - -0.1.7 - Add Boot cycles to CFG - Fix substate incrementing before configured boot cycles - -0.1.6 - Migrate from AsString to AsBrStr - -0.01.5 - Added Bypass All commands -0.01.4 - Move SubState reset from handleResponseState() to PiperStateChange(). - Add Module.ModuleIsBypassed and MACH_ST_BYPASSED. - -0.01.2 - 20140918 - Added ability to do all transfer types without corrupting piper data. - -0.01.1 - 20140626 - Fixed logger spamming if a subsystem responded with ERROR in aborting - -0.01.0 - 20140207 - Fixed an issue that could cause a substate request to not be reported to logger. - -0.00.9 - 20140130 - Module response only reset on state change. - - Handle aborting better. - - Set substate to 65535 when main state is finished - -0.00.8 - 20140130 - Fixed some issues with aborting and substates. - -0.00.7 - 20131223 - Modified logging to use LogThat library, changed IN.CFG.LoggerID to IN.CFG.LoggerName, bug fix that cleared Piper.IN.CFG - -0.00.6 - 20131125 - If module is added after booting state it will post a WARNING. - -0.00.5 - 20131125 - Added Module Status. -0.00.4 - 20131121 - Changed logger ascii data to ease readability in App logger - -0.00.3 - 20131115 - Changed to ModuleSubStateResponse. - Fixed an issue with ModuleBypass not resetting ModuleSubStateRequest - -0.00.2 - 20131108 - Added ModuleBypass \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/Loupe/piper/Piper.fun b/example/AsProject/Logical/Libraries/Loupe/piper/Piper.fun deleted file mode 100644 index 88dd40a..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/piper/Piper.fun +++ /dev/null @@ -1,73 +0,0 @@ -(* -* File: Piper.fun -* Copyright (c) 2023 Loupe -* https://loupe.team -* -* This file is part of the Piper Library, licensed under the MIT License. -*) - -FUNCTION Piper_fn_Cyclic : BOOL (*Master Cyclic function*) (*$GROUP=User*) - VAR_INPUT - Piper : Piper_typ; - END_VAR -END_FUNCTION - -FUNCTION_BLOCK Piper_Module_Fub (*Implements the interface to a pipe*) (*$GROUP=User*) - VAR_INPUT - Piper : REFERENCE TO Piper_typ; - ModuleInterface : REFERENCE TO Module_Interface_typ; - END_VAR - VAR - internal : Piper_Module_Internal_typ; - END_VAR -END_FUNCTION_BLOCK -(* -Internal Functions -*) - -FUNCTION Piper_setCommand : BOOL (*Sets commands to the subsystems*) (*$GROUP=User*) - VAR_INPUT - Piper : Piper_typ; - END_VAR -END_FUNCTION - -FUNCTION Piper_checkResponses : BOOL (*Reads the status of Pipes*) (*$GROUP=User*) - VAR_INPUT - Piper : Piper_typ; - END_VAR -END_FUNCTION - -FUNCTION Piper_handleResponseState : BOOL (*This function looks at the response state and decides what Step or State to enter next*) (*$GROUP=User*) - VAR_INPUT - Piper : Piper_typ; - END_VAR -END_FUNCTION - -FUNCTION Piper_PackML : BOOL (*Implements PackML state machine for Piper*) (*$GROUP=User*) - VAR_INPUT - Piper : Piper_typ; - END_VAR -END_FUNCTION - -FUNCTION PackMLStateString : BOOL (*Returns a string for the given PackML state*) (*$GROUP=User*) - VAR_INPUT - State : MACH_ST_enum; - String : STRING[80]; - END_VAR -END_FUNCTION - -FUNCTION PiperStateChange : BOOL (*Logs a state change.*) (*$GROUP=User*) - VAR_INPUT - Piper : Piper_typ; - State : MACH_ST_enum; - END_VAR -END_FUNCTION - -FUNCTION Piper_getBusyModules : UINT (*This function finds modules reporting busy to Piper*) - VAR_INPUT - Piper : Piper_typ; - pModuleArray : UDINT; - numModules : UINT; - offset : UINT; - END_VAR -END_FUNCTION \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/Loupe/piper/Piper.typ b/example/AsProject/Logical/Libraries/Loupe/piper/Piper.typ deleted file mode 100644 index f0ee14c..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/piper/Piper.typ +++ /dev/null @@ -1,102 +0,0 @@ -(* -* File: Piper.typ -* Copyright (c) 2023 Loupe -* https://loupe.team -* -* This file is part of the Piper Library, licensed under the MIT License. -*) - -TYPE - Piper_typ : STRUCT - IN : Piper_IN_typ; - OUT : Piper_OUT_typ; - Internal : Piper_Internal_typ; - END_STRUCT; - Piper_IN_typ : STRUCT - CMD : Piper_IN_CMD_typ; - CFG : Piper_IN_CFG_typ; - END_STRUCT; - Piper_IN_CFG_typ : STRUCT - BootCycles : UINT := PIPER_DEFAULT_BOOTING_CYCLES; - LoggerName : STRING[LOG_STRLEN_LOGGERNAME]; - END_STRUCT; - Piper_IN_CMD_typ : STRUCT - Reset : BOOL; - Start : BOOL; - Stop : BOOL; - Hold : BOOL; - Unhold : BOOL; - Suspend : BOOL; - Unsuspend : BOOL; - Abort : BOOL; - Clear : BOOL; - BypassAll : BOOL; - AcknowledgeError : BOOL; - END_STRUCT; - Piper_OUT_typ : STRUCT - Error : UINT; - ErrorString : STRING[80]; - State : MACH_ST_enum; (*The current PackML state of system*) - SubState : DINT; (*The current step within the PackML state*) - BusyModule : UDINT; (*The first module that is busy*) - ErrorModule : UDINT; (*The first module that has an error*) - SubStateRequestModule : UDINT; (*The module that requested the next step*) - END_STRUCT; - Piper_Internal_typ : STRUCT - NextSubState : DINT; (*The next step that should be executed when the current step is complete*) - ResponseStatus : PIPER_RESPONSE_ST; (*The state of the response of the current step*) - ModuleList : ARRAY[0..MAI_PIPER_MODULES]OF UDINT; (*The pipes that are attached to this manager*) - ModuleNames : ARRAY[0..MAI_PIPER_MODULES]OF STRING[80]; (*Names of the modules to ensure uniqueness after download*) - NumberModules : DINT; - BootCycles : UINT; - END_STRUCT; - Module_Interface_typ : STRUCT - ModuleName : STRING[80]; - ModuleStatus : STRING[80]; - PiperState : MACH_ST_enum; - PiperSubState : DINT; - ModuleResponse : MACH_ST_enum; - ModuleSubStateRequest : DINT; - ModuleBypass : BOOL; - ModuleIsBypassed : BOOL; - END_STRUCT; - Piper_Module_Internal_typ : STRUCT - Added : BOOL; - ModuleIndex : UDINT; - END_STRUCT; - PIPER_RESPONSE_ST : - ( - PIPER_RESPONSE_ST_NONE, - PIPER_RESPONSE_ST_ERROR, - PIPER_RESPONSE_ST_STEP_DONE, - PIPER_RESPONSE_ST_NEXT_STEP, - PIPER_RESPONSE_ST_STATE_DONE, - PIPER_RESPONSE_ST_BUSY - ); - MACH_ST_enum : - ( - MACH_ST_NOT_READY := 0, (*0*) - MACH_ST_BOOTING := 1, (*1*) - MACH_ST_BOOTED, - MACH_ST_ERROR, - MACH_ST_CLEARING, - MACH_ST_STOPPED, (*5*) - MACH_ST_STARTING, - MACH_ST_IDLE, - MACH_ST_SUSPENDED, - MACH_ST_EXECUTE, - MACH_ST_STOPPING, (*10*) - MACH_ST_ABORTING, - MACH_ST_ABORTED, - MACH_ST_HOLDING, - MACH_ST_HELD, - MACH_ST_UNHOLDING, (*15*) - MACH_ST_SUSPENDING, - MACH_ST_UNSUSPENDING, - MACH_ST_RESETTING, - MACH_ST_COMPLETING, - MACH_ST_COMPLETE, (*20*) - MACH_ST_BYPASSED, - MACH_ST_ (*22*) - ); -END_TYPE diff --git a/example/AsProject/Logical/Libraries/Loupe/piper/Piper.var b/example/AsProject/Logical/Libraries/Loupe/piper/Piper.var deleted file mode 100644 index 079620d..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/piper/Piper.var +++ /dev/null @@ -1,14 +0,0 @@ -(* -* File: Piper.var -* Copyright (c) 2023 Loupe -* https://loupe.team -* -* This file is part of the Piper Library, licensed under the MIT License. -*) - -VAR CONSTANT - PIPER_DEFAULT_BOOTING_CYCLES : UINT := 50; - MAI_PIPER_MODULES : USINT := 99; - PIPER_DEFAULT_LOGGERNAME : STRING[LOG_STRLEN_LOGGERNAME] := 'App'; - IDLE_SUBSTATE : DINT := 65535; -END_VAR diff --git a/example/AsProject/Logical/Libraries/Loupe/piper/PiperGlobal.h b/example/AsProject/Logical/Libraries/Loupe/piper/PiperGlobal.h deleted file mode 100644 index 8c5efb1..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/piper/PiperGlobal.h +++ /dev/null @@ -1,10 +0,0 @@ -/* -* File: PiperGlobal.h -* Copyright (c) 2023 Loupe -* https://loupe.team -* -* This file is part of the Piper Library, licensed under the MIT License. -*/ - - -#include diff --git a/example/AsProject/Logical/Libraries/Loupe/piper/SG4/Arm/Piper.br b/example/AsProject/Logical/Libraries/Loupe/piper/SG4/Arm/Piper.br deleted file mode 100644 index 731cd8f..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/piper/SG4/Arm/Piper.br and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/piper/SG4/Arm/Piper.h b/example/AsProject/Logical/Libraries/Loupe/piper/SG4/Arm/Piper.h deleted file mode 100644 index 14d86df..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/piper/SG4/Arm/Piper.h +++ /dev/null @@ -1,194 +0,0 @@ -/* Automation Studio generated header file */ -/* Do not edit ! */ -/* Piper 0.01.9 */ - -#ifndef _PIPER_ -#define _PIPER_ -#ifdef __cplusplus -extern "C" -{ -#endif -#ifndef _Piper_VERSION -#define _Piper_VERSION 0.01.9 -#endif - -#include - -#ifndef _BUR_PUBLIC -#define _BUR_PUBLIC -#endif -#ifdef _SG3 - #include "operator.h" - #include "sys_lib.h" - #include "AsBrStr.h" - #include "logthat.h" - #include "stringext.h" -#endif -#ifdef _SG4 - #include "operator.h" - #include "sys_lib.h" - #include "AsBrStr.h" - #include "logthat.h" - #include "stringext.h" -#endif -#ifdef _SGC - #include "operator.h" - #include "sys_lib.h" - #include "AsBrStr.h" - #include "logthat.h" - #include "stringext.h" -#endif - - -/* Constants */ -#ifdef _REPLACE_CONST - #define PIPER_DEFAULT_BOOTING_CYCLES 50U - #define MAI_PIPER_MODULES 99U - #define PIPER_DEFAULT_LOGGERNAME "App" - #define IDLE_SUBSTATE 65535 -#else - _GLOBAL_CONST unsigned short PIPER_DEFAULT_BOOTING_CYCLES; - _GLOBAL_CONST unsigned char MAI_PIPER_MODULES; - _GLOBAL_CONST plcstring PIPER_DEFAULT_LOGGERNAME[9]; - _GLOBAL_CONST signed long IDLE_SUBSTATE; -#endif - - - - -/* Datatypes and datatypes of function blocks */ -typedef enum PIPER_RESPONSE_ST -{ PIPER_RESPONSE_ST_NONE, - PIPER_RESPONSE_ST_ERROR, - PIPER_RESPONSE_ST_STEP_DONE, - PIPER_RESPONSE_ST_NEXT_STEP, - PIPER_RESPONSE_ST_STATE_DONE, - PIPER_RESPONSE_ST_BUSY -} PIPER_RESPONSE_ST; - -typedef enum MACH_ST_enum -{ MACH_ST_NOT_READY = 0, - MACH_ST_BOOTING = 1, - MACH_ST_BOOTED, - MACH_ST_ERROR, - MACH_ST_CLEARING, - MACH_ST_STOPPED, - MACH_ST_STARTING, - MACH_ST_IDLE, - MACH_ST_SUSPENDED, - MACH_ST_EXECUTE, - MACH_ST_STOPPING, - MACH_ST_ABORTING, - MACH_ST_ABORTED, - MACH_ST_HOLDING, - MACH_ST_HELD, - MACH_ST_UNHOLDING, - MACH_ST_SUSPENDING, - MACH_ST_UNSUSPENDING, - MACH_ST_RESETTING, - MACH_ST_COMPLETING, - MACH_ST_COMPLETE, - MACH_ST_BYPASSED, - MACH_ST_ -} MACH_ST_enum; - -typedef struct Piper_IN_CMD_typ -{ plcbit Reset; - plcbit Start; - plcbit Stop; - plcbit Hold; - plcbit Unhold; - plcbit Suspend; - plcbit Unsuspend; - plcbit Abort; - plcbit Clear; - plcbit BypassAll; - plcbit AcknowledgeError; -} Piper_IN_CMD_typ; - -typedef struct Piper_IN_CFG_typ -{ unsigned short BootCycles; - plcstring LoggerName[9]; -} Piper_IN_CFG_typ; - -typedef struct Piper_IN_typ -{ struct Piper_IN_CMD_typ CMD; - struct Piper_IN_CFG_typ CFG; -} Piper_IN_typ; - -typedef struct Piper_OUT_typ -{ unsigned short Error; - plcstring ErrorString[81]; - enum MACH_ST_enum State; - signed long SubState; - unsigned long BusyModule; - unsigned long ErrorModule; - unsigned long SubStateRequestModule; -} Piper_OUT_typ; - -typedef struct Piper_Internal_typ -{ signed long NextSubState; - enum PIPER_RESPONSE_ST ResponseStatus; - unsigned long ModuleList[100]; - plcstring ModuleNames[100][81]; - signed long NumberModules; - unsigned short BootCycles; -} Piper_Internal_typ; - -typedef struct Piper_typ -{ struct Piper_IN_typ IN; - struct Piper_OUT_typ OUT; - struct Piper_Internal_typ Internal; -} Piper_typ; - -typedef struct Module_Interface_typ -{ plcstring ModuleName[81]; - plcstring ModuleStatus[81]; - enum MACH_ST_enum PiperState; - signed long PiperSubState; - enum MACH_ST_enum ModuleResponse; - signed long ModuleSubStateRequest; - plcbit ModuleBypass; - plcbit ModuleIsBypassed; -} Module_Interface_typ; - -typedef struct Piper_Module_Internal_typ -{ plcbit Added; - unsigned long ModuleIndex; -} Piper_Module_Internal_typ; - -typedef struct Piper_Module_Fub -{ - /* VAR_INPUT (analog) */ - struct Piper_typ* Piper; - struct Module_Interface_typ* ModuleInterface; - /* VAR (analog) */ - struct Piper_Module_Internal_typ internal; -} Piper_Module_Fub_typ; - - - -/* Prototyping of functions and function blocks */ -_BUR_PUBLIC void Piper_Module_Fub(struct Piper_Module_Fub* inst); -_BUR_PUBLIC plcbit Piper_fn_Cyclic(struct Piper_typ* Piper); -_BUR_PUBLIC plcbit Piper_setCommand(struct Piper_typ* Piper); -_BUR_PUBLIC plcbit Piper_checkResponses(struct Piper_typ* Piper); -_BUR_PUBLIC plcbit Piper_handleResponseState(struct Piper_typ* Piper); -_BUR_PUBLIC plcbit Piper_PackML(struct Piper_typ* Piper); -_BUR_PUBLIC plcbit PackMLStateString(enum MACH_ST_enum State, plcstring* String); -_BUR_PUBLIC plcbit PiperStateChange(struct Piper_typ* Piper, enum MACH_ST_enum State); -_BUR_PUBLIC unsigned short Piper_getBusyModules(struct Piper_typ* Piper, unsigned long pModuleArray, unsigned short numModules, unsigned short offset); - - -__asm__(".section \".plc\""); - -/* Additional IEC dependencies */ -__asm__(".ascii \"iecdep \\\"Logical/Libraries/Loupe/logthat/Constants.var\\\" scope \\\"global\\\"\\n\""); - -__asm__(".previous"); - -#ifdef __cplusplus -}; -#endif -#endif /* _PIPER_ */ - diff --git a/example/AsProject/Logical/Libraries/Loupe/piper/SG4/Arm/libPiper.a b/example/AsProject/Logical/Libraries/Loupe/piper/SG4/Arm/libPiper.a deleted file mode 100644 index 430fc1b..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/piper/SG4/Arm/libPiper.a and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/piper/SG4/Piper.br b/example/AsProject/Logical/Libraries/Loupe/piper/SG4/Piper.br deleted file mode 100644 index f17074d..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/piper/SG4/Piper.br and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/piper/SG4/Piper.h b/example/AsProject/Logical/Libraries/Loupe/piper/SG4/Piper.h deleted file mode 100644 index 14d86df..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/piper/SG4/Piper.h +++ /dev/null @@ -1,194 +0,0 @@ -/* Automation Studio generated header file */ -/* Do not edit ! */ -/* Piper 0.01.9 */ - -#ifndef _PIPER_ -#define _PIPER_ -#ifdef __cplusplus -extern "C" -{ -#endif -#ifndef _Piper_VERSION -#define _Piper_VERSION 0.01.9 -#endif - -#include - -#ifndef _BUR_PUBLIC -#define _BUR_PUBLIC -#endif -#ifdef _SG3 - #include "operator.h" - #include "sys_lib.h" - #include "AsBrStr.h" - #include "logthat.h" - #include "stringext.h" -#endif -#ifdef _SG4 - #include "operator.h" - #include "sys_lib.h" - #include "AsBrStr.h" - #include "logthat.h" - #include "stringext.h" -#endif -#ifdef _SGC - #include "operator.h" - #include "sys_lib.h" - #include "AsBrStr.h" - #include "logthat.h" - #include "stringext.h" -#endif - - -/* Constants */ -#ifdef _REPLACE_CONST - #define PIPER_DEFAULT_BOOTING_CYCLES 50U - #define MAI_PIPER_MODULES 99U - #define PIPER_DEFAULT_LOGGERNAME "App" - #define IDLE_SUBSTATE 65535 -#else - _GLOBAL_CONST unsigned short PIPER_DEFAULT_BOOTING_CYCLES; - _GLOBAL_CONST unsigned char MAI_PIPER_MODULES; - _GLOBAL_CONST plcstring PIPER_DEFAULT_LOGGERNAME[9]; - _GLOBAL_CONST signed long IDLE_SUBSTATE; -#endif - - - - -/* Datatypes and datatypes of function blocks */ -typedef enum PIPER_RESPONSE_ST -{ PIPER_RESPONSE_ST_NONE, - PIPER_RESPONSE_ST_ERROR, - PIPER_RESPONSE_ST_STEP_DONE, - PIPER_RESPONSE_ST_NEXT_STEP, - PIPER_RESPONSE_ST_STATE_DONE, - PIPER_RESPONSE_ST_BUSY -} PIPER_RESPONSE_ST; - -typedef enum MACH_ST_enum -{ MACH_ST_NOT_READY = 0, - MACH_ST_BOOTING = 1, - MACH_ST_BOOTED, - MACH_ST_ERROR, - MACH_ST_CLEARING, - MACH_ST_STOPPED, - MACH_ST_STARTING, - MACH_ST_IDLE, - MACH_ST_SUSPENDED, - MACH_ST_EXECUTE, - MACH_ST_STOPPING, - MACH_ST_ABORTING, - MACH_ST_ABORTED, - MACH_ST_HOLDING, - MACH_ST_HELD, - MACH_ST_UNHOLDING, - MACH_ST_SUSPENDING, - MACH_ST_UNSUSPENDING, - MACH_ST_RESETTING, - MACH_ST_COMPLETING, - MACH_ST_COMPLETE, - MACH_ST_BYPASSED, - MACH_ST_ -} MACH_ST_enum; - -typedef struct Piper_IN_CMD_typ -{ plcbit Reset; - plcbit Start; - plcbit Stop; - plcbit Hold; - plcbit Unhold; - plcbit Suspend; - plcbit Unsuspend; - plcbit Abort; - plcbit Clear; - plcbit BypassAll; - plcbit AcknowledgeError; -} Piper_IN_CMD_typ; - -typedef struct Piper_IN_CFG_typ -{ unsigned short BootCycles; - plcstring LoggerName[9]; -} Piper_IN_CFG_typ; - -typedef struct Piper_IN_typ -{ struct Piper_IN_CMD_typ CMD; - struct Piper_IN_CFG_typ CFG; -} Piper_IN_typ; - -typedef struct Piper_OUT_typ -{ unsigned short Error; - plcstring ErrorString[81]; - enum MACH_ST_enum State; - signed long SubState; - unsigned long BusyModule; - unsigned long ErrorModule; - unsigned long SubStateRequestModule; -} Piper_OUT_typ; - -typedef struct Piper_Internal_typ -{ signed long NextSubState; - enum PIPER_RESPONSE_ST ResponseStatus; - unsigned long ModuleList[100]; - plcstring ModuleNames[100][81]; - signed long NumberModules; - unsigned short BootCycles; -} Piper_Internal_typ; - -typedef struct Piper_typ -{ struct Piper_IN_typ IN; - struct Piper_OUT_typ OUT; - struct Piper_Internal_typ Internal; -} Piper_typ; - -typedef struct Module_Interface_typ -{ plcstring ModuleName[81]; - plcstring ModuleStatus[81]; - enum MACH_ST_enum PiperState; - signed long PiperSubState; - enum MACH_ST_enum ModuleResponse; - signed long ModuleSubStateRequest; - plcbit ModuleBypass; - plcbit ModuleIsBypassed; -} Module_Interface_typ; - -typedef struct Piper_Module_Internal_typ -{ plcbit Added; - unsigned long ModuleIndex; -} Piper_Module_Internal_typ; - -typedef struct Piper_Module_Fub -{ - /* VAR_INPUT (analog) */ - struct Piper_typ* Piper; - struct Module_Interface_typ* ModuleInterface; - /* VAR (analog) */ - struct Piper_Module_Internal_typ internal; -} Piper_Module_Fub_typ; - - - -/* Prototyping of functions and function blocks */ -_BUR_PUBLIC void Piper_Module_Fub(struct Piper_Module_Fub* inst); -_BUR_PUBLIC plcbit Piper_fn_Cyclic(struct Piper_typ* Piper); -_BUR_PUBLIC plcbit Piper_setCommand(struct Piper_typ* Piper); -_BUR_PUBLIC plcbit Piper_checkResponses(struct Piper_typ* Piper); -_BUR_PUBLIC plcbit Piper_handleResponseState(struct Piper_typ* Piper); -_BUR_PUBLIC plcbit Piper_PackML(struct Piper_typ* Piper); -_BUR_PUBLIC plcbit PackMLStateString(enum MACH_ST_enum State, plcstring* String); -_BUR_PUBLIC plcbit PiperStateChange(struct Piper_typ* Piper, enum MACH_ST_enum State); -_BUR_PUBLIC unsigned short Piper_getBusyModules(struct Piper_typ* Piper, unsigned long pModuleArray, unsigned short numModules, unsigned short offset); - - -__asm__(".section \".plc\""); - -/* Additional IEC dependencies */ -__asm__(".ascii \"iecdep \\\"Logical/Libraries/Loupe/logthat/Constants.var\\\" scope \\\"global\\\"\\n\""); - -__asm__(".previous"); - -#ifdef __cplusplus -}; -#endif -#endif /* _PIPER_ */ - diff --git a/example/AsProject/Logical/Libraries/Loupe/piper/SG4/libPiper.a b/example/AsProject/Logical/Libraries/Loupe/piper/SG4/libPiper.a deleted file mode 100644 index e286d99..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/piper/SG4/libPiper.a and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/piper/package.json b/example/AsProject/Logical/Libraries/Loupe/piper/package.json deleted file mode 100644 index 39cbc87..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/piper/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "@loupeteam/piper", - "version": "0.1.9", - "description": "A new source library", - "homepage": "https://loupeteam.github.io/LoupeDocs/libraries/piper.html", - "scripts": {}, - "keywords": [], - "author": "Loupe", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/loupeteam/piper" - }, - "lpm": { - "type": "library" - }, - "dependencies": { - "@loupeteam/logthat": ">=0.5.0 <=0.5.9", - "@loupeteam/stringext": ">=0.14.0 <=0.14.9" - } -} \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/Loupe/ringbuflib/Binary.lby b/example/AsProject/Logical/Libraries/Loupe/ringbuflib/Binary.lby deleted file mode 100644 index c964e62..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/ringbuflib/Binary.lby +++ /dev/null @@ -1,11 +0,0 @@ - - - - RingBufLib.typ - RingBufLib.fun - CHANGELOG.md - - - - - diff --git a/example/AsProject/Logical/Libraries/Loupe/ringbuflib/CHANGELOG.md b/example/AsProject/Logical/Libraries/Loupe/ringbuflib/CHANGELOG.md deleted file mode 100644 index 7e893bd..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/ringbuflib/CHANGELOG.md +++ /dev/null @@ -1,22 +0,0 @@ -0.2.4 - Migrate from AsString to AsBrStr - -0.02.3 20170525 - Bug Fix BufferRemoveOffset function - -0.02.2 20170421 - Fixed BufferRemoveOffset function - -0.02.1 20170412 - Added BufferRemoveOffset function - -0.02.0 20130729 - Cleaned up versioning. - -0.01.1 20130730 - Fixed compiler warnings. - -0.01.0 20130702 - Old functions incompatible - - Changed some function calls to give optional status - - New function: BufferCopyItems - - Updated documentation. - -0.00.2 20130701 - Converted to RingBufLib. - - Added documentation - - Changed unused return values to return buffer status if it was not valid - -0.00.1 ? - First version \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/Loupe/ringbuflib/RingBufLib.fun b/example/AsProject/Logical/Libraries/Loupe/ringbuflib/RingBufLib.fun deleted file mode 100644 index f9abb31..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/ringbuflib/RingBufLib.fun +++ /dev/null @@ -1,203 +0,0 @@ -(* - * File: RingBufLib.fun - * Copyright (c) 2023 Loupe - * https://loupe.team - * - * This file is part of RingBufLib, licensed under the MIT License. - * - ******************************************************************** - * Functions and function blocks of library RingBufST - ********************************************************************) - -FUNCTION BufferCopyItems : UINT (*Copies the number of items specified into the buffer given*) - VAR_INPUT - Buffer : UDINT; (*Pointer to the buffer*) - Offset : UINT; (*Item offset from the top of the buffer*) - NumEntries : UINT; (*Number of entries to read*) - Destination : UDINT; (*Pointer to where to put the data*) - Status : UDINT; (*OPTIONAL: Pointer to status UINT*) - END_VAR - VAR - Index : INT; - CopyLen : INT; (*Internal value for number of entries to copy for each operation*) - iNumEntries : UINT; (*Internal limited number of entries to copy*) - iDestination : UDINT; (*Internal pointer to where to put the data for second copy*) - ibuf : REFERENCE TO Buffer_typ; - END_VAR -END_FUNCTION - -FUNCTION BufferGetItemAdr : UDINT (*Gets a pointer the item at the specified index*) - VAR_INPUT - Buffer : UDINT; (*Pointer to the buffer*) - Offset : UINT; (*Item offset from the top of the buffer*) - Status : UDINT; (*OPTIONAL: Pointer to status UINT*) - END_VAR - VAR - Index : INT; - ibuf : REFERENCE TO Buffer_typ; - END_VAR -END_FUNCTION - -FUNCTION BufferAddToBottom : UINT (*Adds an item to the buttom of the buffer*) - VAR_INPUT - Buffer : UDINT; (*Pointer to the buffer*) - Data : UDINT; (*Address of data to copy*) - END_VAR - VAR - ibuf : REFERENCE TO Buffer_typ; - END_VAR -END_FUNCTION - -FUNCTION BufferAddToTop : UINT (*Adds an item to the top of the buffer*) - VAR_INPUT - Buffer : UDINT; (*Pointer to the buffer*) - Data : UDINT; (*Address of data to copy*) - END_VAR - VAR - ibuf : REFERENCE TO Buffer_typ; - END_VAR -END_FUNCTION - -FUNCTION BufferRemoveBottom : UINT (*Removes the item at the bottom of the buffer*) - VAR_INPUT - Buffer : UDINT; (*Pointer to the buffer*) - END_VAR - VAR - ibuf : REFERENCE TO Buffer_typ; - END_VAR -END_FUNCTION - -FUNCTION BufferRemoveTop : UINT (*Removes the item at the top of the buffer*) - VAR_INPUT - Buffer : UDINT; (*Pointer to the buffer*) - END_VAR - VAR - ibuf : REFERENCE TO Buffer_typ; - END_VAR -END_FUNCTION - -FUNCTION BufferRemoveOffset : UINT - VAR_INPUT - Buffer : UDINT; (*Pointer to the buffer*) - Offset : UINT; (*Item offset from the top of the buffer*) - Status : UDINT; (*OPTIONAL: Pointer to status UINT*) - END_VAR - VAR - Index : INT; - CopyLen : INT; (*Internal value for number of entries to copy for each operation*) - iNumEntries : UINT; (*Internal limited number of entries to copy*) - iDestination : UDINT; (*Internal pointer to where to put the data for second copy*) - ibuf : REFERENCE TO Buffer_typ; - END_VAR -END_FUNCTION - -FUNCTION BufferBottom : UINT (*Returns the index of the bottom of the buffer*) - VAR_INPUT - Buffer : UDINT; (*Pointer to the buffer*) - END_VAR - VAR - ibuf : REFERENCE TO Buffer_typ; - END_VAR -END_FUNCTION - -FUNCTION BufferInit : UINT (*Allocates buffer memory*) - VAR_INPUT - Buffer : UDINT; (*Pointer to the buffer*) - MaxValues : UINT; (*Max number of entries*) - DataSize : UDINT; (*Size of each entry*) - END_VAR - VAR - ibuf : REFERENCE TO Buffer_typ; - END_VAR -END_FUNCTION - -FUNCTION BufferDestroy : UINT (*Deallocates buffer memory*) - VAR_INPUT - Buffer : UDINT; (*Pointer to the buffer*) - END_VAR - VAR - ibuf : REFERENCE TO Buffer_typ; - END_VAR -END_FUNCTION - -FUNCTION BufferClear : UINT (*Clears the contents of the buffer*) - VAR_INPUT - Buffer : UDINT; (*Pointer to the buffer*) - END_VAR - VAR - ibuf : REFERENCE TO Buffer_typ; - END_VAR -END_FUNCTION - -FUNCTION BufferFull : BOOL (*Returns 1 if the buffer is full, 0 if buffer is not full*) - VAR_INPUT - Buffer : UDINT; (*Pointer to the buffer*) - END_VAR - VAR - ibuf : REFERENCE TO Buffer_typ; - END_VAR -END_FUNCTION - -FUNCTION BufferValid : BOOL (*Returns 1 if the buffer is valid, 0 if the buffer is not valid*) - VAR_INPUT - Buffer : UDINT; (*Pointer to the buffer*) - END_VAR - VAR - ibuf : REFERENCE TO Buffer_typ; - END_VAR -END_FUNCTION - -FUNCTION BufferStatus : UINT (*Returns 0 if everything is ok, else returns error number why buffer is invalid*) - VAR_INPUT - Buffer : UDINT; (*Pointer to the buffer*) - END_VAR - VAR - ibuf : REFERENCE TO Buffer_typ; - END_VAR -END_FUNCTION - -FUNCTION GetTopIndex : UINT (*Internal function: Returns offset of the top of the buffer.*) - VAR_INPUT - Buffer : UDINT; (*Pointer to the buffer*) - END_VAR - VAR - ibuf : REFERENCE TO Buffer_typ; - END_VAR -END_FUNCTION - -FUNCTION GetBottomIndex : UINT (*Internal function: Returns offset of the bottom of the buffer*) - VAR_INPUT - Buffer : UDINT; (*Pointer to the buffer*) - END_VAR - VAR - ibuf : REFERENCE TO Buffer_typ; - END_VAR -END_FUNCTION - -FUNCTION GetNextBottomIndex : UDINT (*Internal function: Returns offset to the next valid item at them bottom*) - VAR_INPUT - Buffer : UDINT; (*Pointer to the buffer*) - END_VAR - VAR - ibuf : REFERENCE TO Buffer_typ; - END_VAR -END_FUNCTION - -FUNCTION SetStatusPointer : BOOL - VAR_INPUT - pStatus : UDINT; - Status : UINT; - END_VAR - VAR - iStatus : REFERENCE TO UINT; - END_VAR -END_FUNCTION - -FUNCTION GetNextTopIndex : UDINT (*Internal function: Returns offset to the next valid item at them bottom*) - VAR_INPUT - Buffer : UDINT; (*Pointer to the buffer*) - END_VAR - VAR - ibuf : REFERENCE TO Buffer_typ; - END_VAR -END_FUNCTION diff --git a/example/AsProject/Logical/Libraries/Loupe/ringbuflib/RingBufLib.typ b/example/AsProject/Logical/Libraries/Loupe/ringbuflib/RingBufLib.typ deleted file mode 100644 index 65e1496..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/ringbuflib/RingBufLib.typ +++ /dev/null @@ -1,31 +0,0 @@ -(* - * File: RingBufLib.typ - * Copyright (c) 2023 Loupe - * https://loupe.team - * - * This file is part of RingBufLib, licensed under the MIT License. - * - ******************************************************************** - * Data types of library RingBufST - ********************************************************************) - -TYPE - RING_BUF_ERR : - ( - RING_BUF_ERR_INVALID_BUFFER, - RING_BUF_ERR_INVALID_BUF_POINTER, - RING_BUF_ERR_DATA_NOT_INIT, - RING_BUF_ERR_MAX_VALUES_ZERO, - RING_BUF_ERR_INDEX_OUTSIDE_RANGE, - RING_BUF_ERR_NUM_ENTRIES_ZERO, - RING_BUF_ERR_DEST_INVALID, - RING_BUF_ERR_ - ); - Buffer_typ : STRUCT - Data : UDINT; - DataSize : UDINT; - TopIndex : INT; - MaxValues : UINT; - NumberValues : UINT; - END_STRUCT; -END_TYPE diff --git a/example/AsProject/Logical/Libraries/Loupe/ringbuflib/SG4/Arm/libringbuflib.a b/example/AsProject/Logical/Libraries/Loupe/ringbuflib/SG4/Arm/libringbuflib.a deleted file mode 100644 index a4d603d..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/ringbuflib/SG4/Arm/libringbuflib.a and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/ringbuflib/SG4/Arm/ringbuflib.br b/example/AsProject/Logical/Libraries/Loupe/ringbuflib/SG4/Arm/ringbuflib.br deleted file mode 100644 index fe75ea3..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/ringbuflib/SG4/Arm/ringbuflib.br and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/ringbuflib/SG4/Arm/ringbuflib.h b/example/AsProject/Logical/Libraries/Loupe/ringbuflib/SG4/Arm/ringbuflib.h deleted file mode 100644 index 0ae8610..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/ringbuflib/SG4/Arm/ringbuflib.h +++ /dev/null @@ -1,79 +0,0 @@ -/* Automation Studio generated header file */ -/* Do not edit ! */ -/* ringbuflib 0.02.4 */ - -#ifndef _RINGBUFLIB_ -#define _RINGBUFLIB_ -#ifdef __cplusplus -extern "C" -{ -#endif -#ifndef _ringbuflib_VERSION -#define _ringbuflib_VERSION 0.02.4 -#endif - -#include - -#ifndef _BUR_PUBLIC -#define _BUR_PUBLIC -#endif -#ifdef _SG3 - #include "AsBrStr.h" -#endif -#ifdef _SG4 - #include "AsBrStr.h" -#endif -#ifdef _SGC - #include "AsBrStr.h" -#endif - - -/* Datatypes and datatypes of function blocks */ -typedef enum RING_BUF_ERR -{ RING_BUF_ERR_INVALID_BUFFER, - RING_BUF_ERR_INVALID_BUF_POINTER, - RING_BUF_ERR_DATA_NOT_INIT, - RING_BUF_ERR_MAX_VALUES_ZERO, - RING_BUF_ERR_INDEX_OUTSIDE_RANGE, - RING_BUF_ERR_NUM_ENTRIES_ZERO, - RING_BUF_ERR_DEST_INVALID, - RING_BUF_ERR_ -} RING_BUF_ERR; - -typedef struct Buffer_typ -{ unsigned long Data; - unsigned long DataSize; - signed short TopIndex; - unsigned short MaxValues; - unsigned short NumberValues; -} Buffer_typ; - - - -/* Prototyping of functions and function blocks */ -_BUR_PUBLIC unsigned short BufferCopyItems(unsigned long Buffer, unsigned short Offset, unsigned short NumEntries, unsigned long Destination, unsigned long Status); -_BUR_PUBLIC unsigned long BufferGetItemAdr(unsigned long Buffer, unsigned short Offset, unsigned long Status); -_BUR_PUBLIC unsigned short BufferAddToBottom(unsigned long Buffer, unsigned long Data); -_BUR_PUBLIC unsigned short BufferAddToTop(unsigned long Buffer, unsigned long Data); -_BUR_PUBLIC unsigned short BufferRemoveBottom(unsigned long Buffer); -_BUR_PUBLIC unsigned short BufferRemoveTop(unsigned long Buffer); -_BUR_PUBLIC unsigned short BufferRemoveOffset(unsigned long Buffer, unsigned short Offset, unsigned long Status); -_BUR_PUBLIC unsigned short BufferBottom(unsigned long Buffer); -_BUR_PUBLIC unsigned short BufferInit(unsigned long Buffer, unsigned short MaxValues, unsigned long DataSize); -_BUR_PUBLIC unsigned short BufferDestroy(unsigned long Buffer); -_BUR_PUBLIC unsigned short BufferClear(unsigned long Buffer); -_BUR_PUBLIC plcbit BufferFull(unsigned long Buffer); -_BUR_PUBLIC plcbit BufferValid(unsigned long Buffer); -_BUR_PUBLIC unsigned short BufferStatus(unsigned long Buffer); -_BUR_PUBLIC unsigned short GetTopIndex(unsigned long Buffer); -_BUR_PUBLIC unsigned short GetBottomIndex(unsigned long Buffer); -_BUR_PUBLIC unsigned long GetNextBottomIndex(unsigned long Buffer); -_BUR_PUBLIC plcbit SetStatusPointer(unsigned long pStatus, unsigned short Status); -_BUR_PUBLIC unsigned long GetNextTopIndex(unsigned long Buffer); - - -#ifdef __cplusplus -}; -#endif -#endif /* _RINGBUFLIB_ */ - diff --git a/example/AsProject/Logical/Libraries/Loupe/ringbuflib/SG4/libringbuflib.a b/example/AsProject/Logical/Libraries/Loupe/ringbuflib/SG4/libringbuflib.a deleted file mode 100644 index 756bbc3..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/ringbuflib/SG4/libringbuflib.a and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/ringbuflib/SG4/ringbuflib.br b/example/AsProject/Logical/Libraries/Loupe/ringbuflib/SG4/ringbuflib.br deleted file mode 100644 index 14f2034..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/ringbuflib/SG4/ringbuflib.br and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/ringbuflib/SG4/ringbuflib.h b/example/AsProject/Logical/Libraries/Loupe/ringbuflib/SG4/ringbuflib.h deleted file mode 100644 index 0ae8610..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/ringbuflib/SG4/ringbuflib.h +++ /dev/null @@ -1,79 +0,0 @@ -/* Automation Studio generated header file */ -/* Do not edit ! */ -/* ringbuflib 0.02.4 */ - -#ifndef _RINGBUFLIB_ -#define _RINGBUFLIB_ -#ifdef __cplusplus -extern "C" -{ -#endif -#ifndef _ringbuflib_VERSION -#define _ringbuflib_VERSION 0.02.4 -#endif - -#include - -#ifndef _BUR_PUBLIC -#define _BUR_PUBLIC -#endif -#ifdef _SG3 - #include "AsBrStr.h" -#endif -#ifdef _SG4 - #include "AsBrStr.h" -#endif -#ifdef _SGC - #include "AsBrStr.h" -#endif - - -/* Datatypes and datatypes of function blocks */ -typedef enum RING_BUF_ERR -{ RING_BUF_ERR_INVALID_BUFFER, - RING_BUF_ERR_INVALID_BUF_POINTER, - RING_BUF_ERR_DATA_NOT_INIT, - RING_BUF_ERR_MAX_VALUES_ZERO, - RING_BUF_ERR_INDEX_OUTSIDE_RANGE, - RING_BUF_ERR_NUM_ENTRIES_ZERO, - RING_BUF_ERR_DEST_INVALID, - RING_BUF_ERR_ -} RING_BUF_ERR; - -typedef struct Buffer_typ -{ unsigned long Data; - unsigned long DataSize; - signed short TopIndex; - unsigned short MaxValues; - unsigned short NumberValues; -} Buffer_typ; - - - -/* Prototyping of functions and function blocks */ -_BUR_PUBLIC unsigned short BufferCopyItems(unsigned long Buffer, unsigned short Offset, unsigned short NumEntries, unsigned long Destination, unsigned long Status); -_BUR_PUBLIC unsigned long BufferGetItemAdr(unsigned long Buffer, unsigned short Offset, unsigned long Status); -_BUR_PUBLIC unsigned short BufferAddToBottom(unsigned long Buffer, unsigned long Data); -_BUR_PUBLIC unsigned short BufferAddToTop(unsigned long Buffer, unsigned long Data); -_BUR_PUBLIC unsigned short BufferRemoveBottom(unsigned long Buffer); -_BUR_PUBLIC unsigned short BufferRemoveTop(unsigned long Buffer); -_BUR_PUBLIC unsigned short BufferRemoveOffset(unsigned long Buffer, unsigned short Offset, unsigned long Status); -_BUR_PUBLIC unsigned short BufferBottom(unsigned long Buffer); -_BUR_PUBLIC unsigned short BufferInit(unsigned long Buffer, unsigned short MaxValues, unsigned long DataSize); -_BUR_PUBLIC unsigned short BufferDestroy(unsigned long Buffer); -_BUR_PUBLIC unsigned short BufferClear(unsigned long Buffer); -_BUR_PUBLIC plcbit BufferFull(unsigned long Buffer); -_BUR_PUBLIC plcbit BufferValid(unsigned long Buffer); -_BUR_PUBLIC unsigned short BufferStatus(unsigned long Buffer); -_BUR_PUBLIC unsigned short GetTopIndex(unsigned long Buffer); -_BUR_PUBLIC unsigned short GetBottomIndex(unsigned long Buffer); -_BUR_PUBLIC unsigned long GetNextBottomIndex(unsigned long Buffer); -_BUR_PUBLIC plcbit SetStatusPointer(unsigned long pStatus, unsigned short Status); -_BUR_PUBLIC unsigned long GetNextTopIndex(unsigned long Buffer); - - -#ifdef __cplusplus -}; -#endif -#endif /* _RINGBUFLIB_ */ - diff --git a/example/AsProject/Logical/Libraries/Loupe/ringbuflib/package.json b/example/AsProject/Logical/Libraries/Loupe/ringbuflib/package.json deleted file mode 100644 index 6ffb85e..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/ringbuflib/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "@loupeteam/ringbuflib", - "version": "0.2.4", - "description": "Loupe's ringbuflib library for Automation Runtime", - "homepage": "https://loupeteam.github.io/LoupeDocs/libraries/ringbuflib.html", - "scripts": {}, - "keywords": [], - "author": "Loupe", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/loupeteam/ringbuflib" - }, - "lpm": { - "type": "library" - }, - "dependencies": {} -} \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/Loupe/stringext/Binary.lby b/example/AsProject/Logical/Libraries/Loupe/stringext/Binary.lby index 50e77d3..5590deb 100644 --- a/example/AsProject/Logical/Libraries/Loupe/stringext/Binary.lby +++ b/example/AsProject/Logical/Libraries/Loupe/stringext/Binary.lby @@ -1,14 +1,13 @@ - - - StringExt.typ - StringExt.var - StringExt.fun - CHANGELOG.md - + + + StringExt.typ + StringExt.var + StringExt.fun + - + \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/Loupe/stringext/CHANGELOG.md b/example/AsProject/Logical/Libraries/Loupe/stringext/CHANGELOG.md deleted file mode 100644 index 21ec3c3..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/stringext/CHANGELOG.md +++ /dev/null @@ -1,19 +0,0 @@ -0.14.4 - Fix bug in SplitFileName() -0.14.3 - Add support for strptime in GCC6 -0.14.2 - Add stringpTime() and stringfTime() -0.14.1 - Add formatString() -0.14.0 - Critical fix to work with BR library AsIecCon -0.13.0 - Add supporting functions for wstrings *Use v0.14.0 instead* -0.12.1 - Add stringlcpy() and stringlcat() -0.12 - Add GenerateTimestampMS_1() - YYYYMMDD_HHMMSS_SSS -0.11 - Add SplitFileName() -0.10 - Add GenerateTimestampMS() -0.9 - HexStringToDINT -0.8 - Move from AsString to AsBrStr to fix header clashes with stdlib -0.7 - Add appendArrayIndex() -0.6 - Fix bugs in ToUpper() and ToLower() -0.5 - Add Timestamp_TO_DT() -0.4 - Add ToUpper() and ToLower() -0.3 - Add strncat4() -0.2 - Add GenerateTimestamp() -0.1 - First version, includes lstrip(), rstrip(), atoui(), uitoa(), ByteToHexString() diff --git a/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/Arm/stringext.h b/example/AsProject/Logical/Libraries/Loupe/stringext/SG3/StringExt.h similarity index 86% rename from example/AsProject/Logical/Libraries/Loupe/stringext/SG4/Arm/stringext.h rename to example/AsProject/Logical/Libraries/Loupe/stringext/SG3/StringExt.h index 8f03aa9..286285c 100644 --- a/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/Arm/stringext.h +++ b/example/AsProject/Logical/Libraries/Loupe/stringext/SG3/StringExt.h @@ -1,6 +1,6 @@ /* Automation Studio generated header file */ /* Do not edit ! */ -/* stringext 0.14.4 */ +/* stringext 1.0.0 */ #ifndef _STRINGEXT_ #define _STRINGEXT_ @@ -9,7 +9,7 @@ extern "C" { #endif #ifndef _stringext_VERSION -#define _stringext_VERSION 0.14.4 +#define _stringext_VERSION 1.0.0 #endif #include @@ -18,34 +18,22 @@ extern "C" #define _BUR_PUBLIC #endif #ifdef _SG3 - #include "AsBrStr.h" #include "astime.h" + #include "AsBrStr.h" #include "AsBrWStr.h" #endif #ifdef _SG4 - #include "AsBrStr.h" #include "astime.h" + #include "AsBrStr.h" #include "AsBrWStr.h" #endif #ifdef _SGC - #include "AsBrStr.h" #include "astime.h" + #include "AsBrStr.h" #include "AsBrWStr.h" #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define STREXT_INVALID_CHAR 221U - #define STREXT_MAX_UDINT 4294967295U -#else - _GLOBAL_CONST unsigned char STREXT_INVALID_CHAR; - _GLOBAL_CONST unsigned long STREXT_MAX_UDINT; -#endif - - - - /* Datatypes and datatypes of function blocks */ typedef enum STREXT_ERR_enum { STREXT_ERR_INVALID_INPUT = -1 @@ -85,6 +73,22 @@ _BUR_PUBLIC unsigned char wchar2char(unsigned short wcharacter); _BUR_PUBLIC signed long formatString(plcstring* dest, unsigned long destSize, plcstring* format, struct StrExtArgs_typ* pArgs); _BUR_PUBLIC unsigned long stringfTime(unsigned long dest, unsigned long destSize, unsigned long format, plcdt time); _BUR_PUBLIC plcdt stringpTime(unsigned long src, unsigned long format); +_BUR_PUBLIC unsigned long stringdtoa(double value, plcstring* buffer, unsigned long ndigits, unsigned long bufferSize); +_BUR_PUBLIC unsigned long stringftoa(float value, plcstring* buffer, unsigned long ndigits, unsigned long bufferSize); +_BUR_PUBLIC double stringstrtod(plcstring* value, plcstring** pEnd); +_BUR_PUBLIC float stringstrtof(plcstring* value, plcstring** pEnd); + + +/* Constants */ +#ifdef _REPLACE_CONST + #define STREXT_INVALID_CHAR 221U + #define STREXT_MAX_UDINT 4294967295U +#else + _GLOBAL_CONST unsigned char STREXT_INVALID_CHAR; + _GLOBAL_CONST unsigned long STREXT_MAX_UDINT; +#endif + + #ifdef __cplusplus diff --git a/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/Arm/StringExt.br b/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/Arm/StringExt.br new file mode 100644 index 0000000..a021a7a Binary files /dev/null and b/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/Arm/StringExt.br differ diff --git a/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/Arm/libStringExt.a b/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/Arm/libStringExt.a new file mode 100644 index 0000000..42007b7 Binary files /dev/null and b/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/Arm/libStringExt.a differ diff --git a/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/Arm/libstringext.a b/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/Arm/libstringext.a deleted file mode 100644 index 4f2b5ee..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/Arm/libstringext.a and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/Arm/stringext.br b/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/Arm/stringext.br deleted file mode 100644 index 630e714..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/Arm/stringext.br and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/StringExt.br b/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/StringExt.br new file mode 100644 index 0000000..24cede3 Binary files /dev/null and b/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/StringExt.br differ diff --git a/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/stringext.h b/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/StringExt.h similarity index 86% rename from example/AsProject/Logical/Libraries/Loupe/stringext/SG4/stringext.h rename to example/AsProject/Logical/Libraries/Loupe/stringext/SG4/StringExt.h index 8f03aa9..286285c 100644 --- a/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/stringext.h +++ b/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/StringExt.h @@ -1,6 +1,6 @@ /* Automation Studio generated header file */ /* Do not edit ! */ -/* stringext 0.14.4 */ +/* stringext 1.0.0 */ #ifndef _STRINGEXT_ #define _STRINGEXT_ @@ -9,7 +9,7 @@ extern "C" { #endif #ifndef _stringext_VERSION -#define _stringext_VERSION 0.14.4 +#define _stringext_VERSION 1.0.0 #endif #include @@ -18,34 +18,22 @@ extern "C" #define _BUR_PUBLIC #endif #ifdef _SG3 - #include "AsBrStr.h" #include "astime.h" + #include "AsBrStr.h" #include "AsBrWStr.h" #endif #ifdef _SG4 - #include "AsBrStr.h" #include "astime.h" + #include "AsBrStr.h" #include "AsBrWStr.h" #endif #ifdef _SGC - #include "AsBrStr.h" #include "astime.h" + #include "AsBrStr.h" #include "AsBrWStr.h" #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define STREXT_INVALID_CHAR 221U - #define STREXT_MAX_UDINT 4294967295U -#else - _GLOBAL_CONST unsigned char STREXT_INVALID_CHAR; - _GLOBAL_CONST unsigned long STREXT_MAX_UDINT; -#endif - - - - /* Datatypes and datatypes of function blocks */ typedef enum STREXT_ERR_enum { STREXT_ERR_INVALID_INPUT = -1 @@ -85,6 +73,22 @@ _BUR_PUBLIC unsigned char wchar2char(unsigned short wcharacter); _BUR_PUBLIC signed long formatString(plcstring* dest, unsigned long destSize, plcstring* format, struct StrExtArgs_typ* pArgs); _BUR_PUBLIC unsigned long stringfTime(unsigned long dest, unsigned long destSize, unsigned long format, plcdt time); _BUR_PUBLIC plcdt stringpTime(unsigned long src, unsigned long format); +_BUR_PUBLIC unsigned long stringdtoa(double value, plcstring* buffer, unsigned long ndigits, unsigned long bufferSize); +_BUR_PUBLIC unsigned long stringftoa(float value, plcstring* buffer, unsigned long ndigits, unsigned long bufferSize); +_BUR_PUBLIC double stringstrtod(plcstring* value, plcstring** pEnd); +_BUR_PUBLIC float stringstrtof(plcstring* value, plcstring** pEnd); + + +/* Constants */ +#ifdef _REPLACE_CONST + #define STREXT_INVALID_CHAR 221U + #define STREXT_MAX_UDINT 4294967295U +#else + _GLOBAL_CONST unsigned char STREXT_INVALID_CHAR; + _GLOBAL_CONST unsigned long STREXT_MAX_UDINT; +#endif + + #ifdef __cplusplus diff --git a/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/libStringExt.a b/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/libStringExt.a new file mode 100644 index 0000000..d0ba07f Binary files /dev/null and b/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/libStringExt.a differ diff --git a/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/libstringext.a b/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/libstringext.a deleted file mode 100644 index 8efeebf..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/libstringext.a and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/stringext.br b/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/stringext.br deleted file mode 100644 index d4af276..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/stringext/SG4/stringext.br and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/stringext/SGC/StringExt.h b/example/AsProject/Logical/Libraries/Loupe/stringext/SGC/StringExt.h new file mode 100644 index 0000000..286285c --- /dev/null +++ b/example/AsProject/Logical/Libraries/Loupe/stringext/SGC/StringExt.h @@ -0,0 +1,98 @@ +/* Automation Studio generated header file */ +/* Do not edit ! */ +/* stringext 1.0.0 */ + +#ifndef _STRINGEXT_ +#define _STRINGEXT_ +#ifdef __cplusplus +extern "C" +{ +#endif +#ifndef _stringext_VERSION +#define _stringext_VERSION 1.0.0 +#endif + +#include + +#ifndef _BUR_PUBLIC +#define _BUR_PUBLIC +#endif +#ifdef _SG3 + #include "astime.h" + #include "AsBrStr.h" + #include "AsBrWStr.h" +#endif +#ifdef _SG4 + #include "astime.h" + #include "AsBrStr.h" + #include "AsBrWStr.h" +#endif +#ifdef _SGC + #include "astime.h" + #include "AsBrStr.h" + #include "AsBrWStr.h" +#endif + + +/* Datatypes and datatypes of function blocks */ +typedef enum STREXT_ERR_enum +{ STREXT_ERR_INVALID_INPUT = -1 +} STREXT_ERR_enum; + +typedef struct StrExtArgs_typ +{ float r[5]; + unsigned long s[5]; + plcbit b[5]; + signed long i[5]; +} StrExtArgs_typ; + + + +/* Prototyping of functions and function blocks */ +_BUR_PUBLIC unsigned long lstrip(unsigned long pString, unsigned long pChars); +_BUR_PUBLIC unsigned long rstrip(unsigned long pString, unsigned long pChars); +_BUR_PUBLIC unsigned long atoui(unsigned long pString); +_BUR_PUBLIC unsigned long uitoa(unsigned long Value, unsigned long pString); +_BUR_PUBLIC unsigned long ByteToHexString(unsigned long pByte, unsigned long NumBytes, unsigned long pString); +_BUR_PUBLIC signed long HexStringToDINT(unsigned long pHexStr); +_BUR_PUBLIC unsigned short GenerateTimestampMS_1(unsigned long pDTStructure, unsigned long pTimestamp, unsigned long TimestampLength); +_BUR_PUBLIC unsigned short GenerateTimestampMS(unsigned long pDTStructure, unsigned long pTimestamp, unsigned long TimestampLength); +_BUR_PUBLIC unsigned short GenerateTimestamp(plcdt DT1, unsigned long pTimestamp, unsigned long TimestampLength); +_BUR_PUBLIC unsigned short strncat4(unsigned long pDest, unsigned long pSource1, unsigned long pSource2, unsigned long pSource3, unsigned long pSource4, unsigned long MaxLength); +_BUR_PUBLIC unsigned long ToUpper(unsigned long pString); +_BUR_PUBLIC unsigned long ToLower(unsigned long pString); +_BUR_PUBLIC plcdt Timestamp_TO_DT(unsigned long pDT, unsigned long pTimestamp); +_BUR_PUBLIC unsigned long appendArrayIndex(unsigned long Value, unsigned long pString); +_BUR_PUBLIC unsigned long SplitFileName(unsigned long pFileName, unsigned long pName, unsigned long pExtension); +_BUR_PUBLIC unsigned long stringlcpy(unsigned long pDest, unsigned long pSrc, unsigned long dSize); +_BUR_PUBLIC unsigned long stringlcat(unsigned long pDest, unsigned long pSrc, unsigned long dSize); +_BUR_PUBLIC unsigned long string2wstring(unsigned long pDest, unsigned long pSrc, unsigned long dSize); +_BUR_PUBLIC unsigned long wstring2string(unsigned long pDest, unsigned long pSrc, unsigned long dSize); +_BUR_PUBLIC unsigned short char2wchar(unsigned char character); +_BUR_PUBLIC unsigned char wchar2char(unsigned short wcharacter); +_BUR_PUBLIC signed long formatString(plcstring* dest, unsigned long destSize, plcstring* format, struct StrExtArgs_typ* pArgs); +_BUR_PUBLIC unsigned long stringfTime(unsigned long dest, unsigned long destSize, unsigned long format, plcdt time); +_BUR_PUBLIC plcdt stringpTime(unsigned long src, unsigned long format); +_BUR_PUBLIC unsigned long stringdtoa(double value, plcstring* buffer, unsigned long ndigits, unsigned long bufferSize); +_BUR_PUBLIC unsigned long stringftoa(float value, plcstring* buffer, unsigned long ndigits, unsigned long bufferSize); +_BUR_PUBLIC double stringstrtod(plcstring* value, plcstring** pEnd); +_BUR_PUBLIC float stringstrtof(plcstring* value, plcstring** pEnd); + + +/* Constants */ +#ifdef _REPLACE_CONST + #define STREXT_INVALID_CHAR 221U + #define STREXT_MAX_UDINT 4294967295U +#else + _GLOBAL_CONST unsigned char STREXT_INVALID_CHAR; + _GLOBAL_CONST unsigned long STREXT_MAX_UDINT; +#endif + + + + +#ifdef __cplusplus +}; +#endif +#endif /* _STRINGEXT_ */ + diff --git a/example/AsProject/Logical/Libraries/Loupe/stringext/StringExt.fun b/example/AsProject/Logical/Libraries/Loupe/stringext/StringExt.fun index 4d89cf4..cd16c7f 100644 --- a/example/AsProject/Logical/Libraries/Loupe/stringext/StringExt.fun +++ b/example/AsProject/Logical/Libraries/Loupe/stringext/StringExt.fun @@ -185,3 +185,35 @@ FUNCTION stringpTime : DATE_AND_TIME (*Parse time string*) format : UDINT; (*Assumed format of time string*) END_VAR END_FUNCTION + +FUNCTION stringdtoa : UDINT + VAR_INPUT + value : LREAL; + buffer : STRING[80]; + ndigits : UDINT; + bufferSize : UDINT; + END_VAR +END_FUNCTION + +FUNCTION stringftoa : UDINT + VAR_INPUT + value : REAL; + buffer : STRING[80]; + ndigits : UDINT; + bufferSize : UDINT; + END_VAR +END_FUNCTION + +FUNCTION stringstrtod : LREAL + VAR_INPUT + value : STRING[80]; + pEnd : REFERENCE TO STRING[80]; + END_VAR +END_FUNCTION + +FUNCTION stringstrtof : REAL + VAR_INPUT + value : STRING[80]; + pEnd : REFERENCE TO STRING[80]; + END_VAR +END_FUNCTION diff --git a/example/AsProject/Logical/Libraries/Loupe/stringext/package.json b/example/AsProject/Logical/Libraries/Loupe/stringext/package.json index 67fcceb..275ab8d 100644 --- a/example/AsProject/Logical/Libraries/Loupe/stringext/package.json +++ b/example/AsProject/Logical/Libraries/Loupe/stringext/package.json @@ -1,18 +1,18 @@ -{ - "name": "@loupeteam/stringext", - "version": "0.14.4", - "description": "Loupe's stringext library for Automation Runtime", - "homepage": "https://loupeteam.github.io/LoupeDocs/libraries/stringext.html", - "scripts": {}, - "keywords": [], - "author": "Loupe", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/loupeteam/stringext" - }, - "lpm": { - "type": "library" - }, - "dependencies": {} -} \ No newline at end of file +{ + "name": "@loupeteam/stringext", + "version": "1.0.0", + "description": "String manipulation functions for B&R Automation Studio (ANSIC library)", + "homepage": "https://loupeteam.github.io/LoupeDocs/libraries/stringext.html", + "scripts": {}, + "keywords": [], + "author": "Loupe", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/loupeteam/stringext" + }, + "lpm": { + "type": "library" + }, + "dependencies": {} +} diff --git a/example/AsProject/Logical/Libraries/Loupe/tcpcomm/Binary.lby b/example/AsProject/Logical/Libraries/Loupe/tcpcomm/Binary.lby index d00481f..bbc341f 100644 --- a/example/AsProject/Logical/Libraries/Loupe/tcpcomm/Binary.lby +++ b/example/AsProject/Logical/Libraries/Loupe/tcpcomm/Binary.lby @@ -1,13 +1,12 @@ - + TCPComm.var TCPStream.typ TCPConnectionMgr.typ TCPComm.fun - CHANGELOG.md - + - + \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/Loupe/tcpcomm/CHANGELOG.md b/example/AsProject/Logical/Libraries/Loupe/tcpcomm/CHANGELOG.md deleted file mode 100644 index 75f10f3..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/tcpcomm/CHANGELOG.md +++ /dev/null @@ -1,22 +0,0 @@ -0.10.0 - Increase IP Address len to 255 chars to support urls - -0.9.0 - Add UID to connection description - -0.8.1 - Close socket if an error is received on TCPClient to allow a new connection - -0.8.0 - Add support for SSL - -0.7.0 - Optionally set send buffer size on open; Necessary for large payloads on ARwin - -0.6.0 - Halve receive speed; Too close to the sun - -0.5.0 - Double receive speed; No biggie - -0.4.0 - Rework interfaces - Fix bugs when trying to reopen client port - -0.3.0 - Allow empty IP address - -0.2.0 - Fix some warnings - -0.1.0 - First version diff --git a/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/Arm/tcpcomm.h b/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG3/TCPComm.h similarity index 94% rename from example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/Arm/tcpcomm.h rename to example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG3/TCPComm.h index 4d906e0..759a7b5 100644 --- a/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/Arm/tcpcomm.h +++ b/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG3/TCPComm.h @@ -1,6 +1,6 @@ /* Automation Studio generated header file */ /* Do not edit ! */ -/* tcpcomm 0.10.0 */ +/* TCPComm 1.0.0 */ #ifndef _TCPCOMM_ #define _TCPCOMM_ @@ -8,8 +8,8 @@ extern "C" { #endif -#ifndef _tcpcomm_VERSION -#define _tcpcomm_VERSION 0.10.0 +#ifndef _TCPComm_VERSION +#define _TCPComm_VERSION 1.0.0 #endif #include @@ -28,18 +28,6 @@ extern "C" #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define TCPCOMM_STRLEN_IPADDRESS 255U - #define TCPCOMM_STRLEN_ERRORSTRING 320U -#else - _GLOBAL_CONST unsigned char TCPCOMM_STRLEN_IPADDRESS; - _GLOBAL_CONST unsigned short TCPCOMM_STRLEN_ERRORSTRING; -#endif - - - - /* Datatypes and datatypes of function blocks */ typedef enum TCPCOMM_MODE_enum { TCPCOMM_MODE_SERVER = 50000, @@ -218,6 +206,18 @@ _BUR_PUBLIC unsigned short TCPStreamReceive(struct TCPStream_typ* t); _BUR_PUBLIC unsigned short TCPStreamSend(struct TCPStream_typ* t); +/* Constants */ +#ifdef _REPLACE_CONST + #define TCPCOMM_STRLEN_IPADDRESS 255U + #define TCPCOMM_STRLEN_ERRORSTRING 320U +#else + _GLOBAL_CONST unsigned char TCPCOMM_STRLEN_IPADDRESS; + _GLOBAL_CONST unsigned short TCPCOMM_STRLEN_ERRORSTRING; +#endif + + + + #ifdef __cplusplus }; #endif diff --git a/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/Arm/TCPComm.br b/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/Arm/TCPComm.br new file mode 100644 index 0000000..4b042a9 Binary files /dev/null and b/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/Arm/TCPComm.br differ diff --git a/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/Arm/libTCPComm.a b/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/Arm/libTCPComm.a new file mode 100644 index 0000000..1ec4ce3 Binary files /dev/null and b/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/Arm/libTCPComm.a differ diff --git a/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/Arm/libtcpcomm.a b/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/Arm/libtcpcomm.a deleted file mode 100644 index e1acb1a..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/Arm/libtcpcomm.a and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/Arm/tcpcomm.br b/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/Arm/tcpcomm.br deleted file mode 100644 index e08541f..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/Arm/tcpcomm.br and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/TCPComm.br b/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/TCPComm.br new file mode 100644 index 0000000..66edd08 Binary files /dev/null and b/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/TCPComm.br differ diff --git a/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/tcpcomm.h b/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/TCPComm.h similarity index 94% rename from example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/tcpcomm.h rename to example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/TCPComm.h index 4d906e0..759a7b5 100644 --- a/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/tcpcomm.h +++ b/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/TCPComm.h @@ -1,6 +1,6 @@ /* Automation Studio generated header file */ /* Do not edit ! */ -/* tcpcomm 0.10.0 */ +/* TCPComm 1.0.0 */ #ifndef _TCPCOMM_ #define _TCPCOMM_ @@ -8,8 +8,8 @@ extern "C" { #endif -#ifndef _tcpcomm_VERSION -#define _tcpcomm_VERSION 0.10.0 +#ifndef _TCPComm_VERSION +#define _TCPComm_VERSION 1.0.0 #endif #include @@ -28,18 +28,6 @@ extern "C" #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define TCPCOMM_STRLEN_IPADDRESS 255U - #define TCPCOMM_STRLEN_ERRORSTRING 320U -#else - _GLOBAL_CONST unsigned char TCPCOMM_STRLEN_IPADDRESS; - _GLOBAL_CONST unsigned short TCPCOMM_STRLEN_ERRORSTRING; -#endif - - - - /* Datatypes and datatypes of function blocks */ typedef enum TCPCOMM_MODE_enum { TCPCOMM_MODE_SERVER = 50000, @@ -218,6 +206,18 @@ _BUR_PUBLIC unsigned short TCPStreamReceive(struct TCPStream_typ* t); _BUR_PUBLIC unsigned short TCPStreamSend(struct TCPStream_typ* t); +/* Constants */ +#ifdef _REPLACE_CONST + #define TCPCOMM_STRLEN_IPADDRESS 255U + #define TCPCOMM_STRLEN_ERRORSTRING 320U +#else + _GLOBAL_CONST unsigned char TCPCOMM_STRLEN_IPADDRESS; + _GLOBAL_CONST unsigned short TCPCOMM_STRLEN_ERRORSTRING; +#endif + + + + #ifdef __cplusplus }; #endif diff --git a/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/libTCPComm.a b/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/libTCPComm.a new file mode 100644 index 0000000..53785bb Binary files /dev/null and b/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/libTCPComm.a differ diff --git a/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/libtcpcomm.a b/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/libtcpcomm.a deleted file mode 100644 index 696ebb0..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/libtcpcomm.a and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/tcpcomm.br b/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/tcpcomm.br deleted file mode 100644 index a94f316..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SG4/tcpcomm.br and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SGC/TCPComm.h b/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SGC/TCPComm.h new file mode 100644 index 0000000..759a7b5 --- /dev/null +++ b/example/AsProject/Logical/Libraries/Loupe/tcpcomm/SGC/TCPComm.h @@ -0,0 +1,225 @@ +/* Automation Studio generated header file */ +/* Do not edit ! */ +/* TCPComm 1.0.0 */ + +#ifndef _TCPCOMM_ +#define _TCPCOMM_ +#ifdef __cplusplus +extern "C" +{ +#endif +#ifndef _TCPComm_VERSION +#define _TCPComm_VERSION 1.0.0 +#endif + +#include + +#ifndef _BUR_PUBLIC +#define _BUR_PUBLIC +#endif +#ifdef _SG3 + #include "AsTCP.h" +#endif +#ifdef _SG4 + #include "AsTCP.h" +#endif +#ifdef _SGC + #include "AsTCP.h" +#endif + + +/* Datatypes and datatypes of function blocks */ +typedef enum TCPCOMM_MODE_enum +{ TCPCOMM_MODE_SERVER = 50000, + TCPCOMM_MODE_CLIENT +} TCPCOMM_MODE_enum; + +typedef enum TCPCOMM_ERR_enum +{ TCPCOMM_ERR_INVALIDINPUT = 50000, + TCPCOMM_ERR_SENDDATATOOLARGE, + TCPCOMM_ERR_ +} TCPCOMM_ERR_enum; + +typedef enum TCPCOMM_ST_enum +{ TCPCOMM_ST_CLOSED, + TCPCOMM_ST_OPENING, + TCPCOMM_ST_IOCTL, + TCPCOMM_ST_LISTEN, + TCPCOMM_ST_RUNNING, + TCPCOMM_ST_CLOSE_CONNECTION, + TCPCOMM_ST_CLOSING, + TCPCOMM_ST_ERROR +} TCPCOMM_ST_enum; + +typedef enum TCPCOMM_SEND_ST_enum +{ TCPCOMM_SEND_ST_IDLE, + TCPCOMM_SEND_ST_SEND +} TCPCOMM_SEND_ST_enum; + +typedef enum TCPCOMM_RECV_ST_enum +{ TCPCOMM_RECV_ST_READ +} TCPCOMM_RECV_ST_enum; + +typedef struct TCPStream_Int_Debug_Mng_typ +{ unsigned char New_Member; +} TCPStream_Int_Debug_Mng_typ; + +typedef struct TCPStream_Int_Debug_Recv_typ +{ plcbit enable[2]; + unsigned short status[2]; +} TCPStream_Int_Debug_Recv_typ; + +typedef struct TCPStream_Int_Debug_Send_typ +{ unsigned char New_Member; +} TCPStream_Int_Debug_Send_typ; + +typedef struct TCPStream_Int_Debug_typ +{ struct TCPStream_Int_Debug_Mng_typ manage; + struct TCPStream_Int_Debug_Recv_typ receive; + struct TCPStream_Int_Debug_Send_typ send; +} TCPStream_Int_Debug_typ; + +typedef struct TCPStream_Int_FUB_typ +{ struct TcpSend Send; + struct TcpRecv Receive; + struct TcpClose Close; +} TCPStream_Int_FUB_typ; + +typedef struct TCPStream_Internal_typ +{ enum TCPCOMM_ST_enum CommState; + unsigned long Ident; + unsigned long UID; + struct TCPStream_Int_FUB_typ FUB; + struct TCPStream_Int_Debug_typ debug; +} TCPStream_Internal_typ; + +typedef struct TCPConnection_Desc_typ +{ plcstring IPAddress[256]; + unsigned short Port; + unsigned short Ident; + unsigned long UID; +} TCPConnection_Desc_typ; + +typedef struct TCPStream_OUT_typ +{ struct TCPConnection_Desc_typ Connection; + plcbit Active; + plcbit Receiving; + plcbit DataReceived; + unsigned long ReceivedDataLength; + plcbit Sending; + plcbit DataSent; + unsigned long SentDataLength; + plcbit Error; + unsigned short ErrorID; + plcstring ErrorString[321]; +} TCPStream_OUT_typ; + +typedef struct TCPStream_IN_PAR_typ +{ struct TCPConnection_Desc_typ Connection; + unsigned long pReceiveData; + unsigned long MaxReceiveLength; + unsigned short ReceiveFlags; + plcbit AllowContinuousReceive; + unsigned long pSendData; + unsigned long SendLength; + unsigned short SendFlags; + plcbit AllowContinuousSend; +} TCPStream_IN_PAR_typ; + +typedef struct TCPStream_IN_CMD_typ +{ plcbit Receive; + plcbit Send; + plcbit Close; + plcbit AcknowledgeData; + plcbit AcknowledgeError; +} TCPStream_IN_CMD_typ; + +typedef struct TCPStream_IN_typ +{ struct TCPStream_IN_CMD_typ CMD; + struct TCPStream_IN_PAR_typ PAR; +} TCPStream_IN_typ; + +typedef struct TCPStream_typ +{ struct TCPStream_IN_typ IN; + struct TCPStream_OUT_typ OUT; + struct TCPStream_Internal_typ Internal; +} TCPStream_typ; + +typedef struct TCPConnectionMgr_Int_FUB_typ +{ struct TcpOpen Open; + struct TcpOpenSsl OpenSSL; + struct TcpIoctl Ioctl; + struct TcpServer Server; + struct TcpClient Client; + struct TcpClose Close; +} TCPConnectionMgr_Int_FUB_typ; + +typedef struct TCPConnectionMgr_Internal_typ +{ struct TCPConnectionMgr_Int_FUB_typ FUB; + enum TCPCOMM_ST_enum CommState; + enum TCPCOMM_MODE_enum Mode; + unsigned long Ident; + unsigned long ConnectionUID; +} TCPConnectionMgr_Internal_typ; + +typedef struct TCPConnectionMgr_OUT_typ +{ plcbit NewConnectionAvailable; + struct TCPConnection_Desc_typ Connection; + plcbit Error; + unsigned short ErrorID; + plcstring ErrorString[321]; +} TCPConnectionMgr_OUT_typ; + +typedef struct TCPConnectionMgr_IN_CFG_typ +{ enum TCPCOMM_MODE_enum Mode; + plcstring LocalIPAddress[256]; + unsigned short LocalPort; + plcstring RemoteIPAddress[256]; + unsigned short RemotePort; + unsigned long SendBufferSize; + plcbit UseSSL; + unsigned long SSLCertificate; +} TCPConnectionMgr_IN_CFG_typ; + +typedef struct TCPConnectionMgr_IN_CMD_typ +{ plcbit Enable; + plcbit AcknowledgeConnection; + plcbit AcknowledgeError; +} TCPConnectionMgr_IN_CMD_typ; + +typedef struct TCPConnectionMgr_IN_typ +{ struct TCPConnectionMgr_IN_CMD_typ CMD; + struct TCPConnectionMgr_IN_CFG_typ CFG; +} TCPConnectionMgr_IN_typ; + +typedef struct TCPConnectionMgr_typ +{ struct TCPConnectionMgr_IN_typ IN; + struct TCPConnectionMgr_OUT_typ OUT; + struct TCPConnectionMgr_Internal_typ Internal; +} TCPConnectionMgr_typ; + + + +/* Prototyping of functions and function blocks */ +_BUR_PUBLIC unsigned short TCPManageConnection(struct TCPConnectionMgr_typ* t); +_BUR_PUBLIC unsigned short TCPStreamReceive(struct TCPStream_typ* t); +_BUR_PUBLIC unsigned short TCPStreamSend(struct TCPStream_typ* t); + + +/* Constants */ +#ifdef _REPLACE_CONST + #define TCPCOMM_STRLEN_IPADDRESS 255U + #define TCPCOMM_STRLEN_ERRORSTRING 320U +#else + _GLOBAL_CONST unsigned char TCPCOMM_STRLEN_IPADDRESS; + _GLOBAL_CONST unsigned short TCPCOMM_STRLEN_ERRORSTRING; +#endif + + + + +#ifdef __cplusplus +}; +#endif +#endif /* _TCPCOMM_ */ + diff --git a/example/AsProject/Logical/Libraries/Loupe/tcpcomm/package.json b/example/AsProject/Logical/Libraries/Loupe/tcpcomm/package.json index d96b2f3..9ca6b38 100644 --- a/example/AsProject/Logical/Libraries/Loupe/tcpcomm/package.json +++ b/example/AsProject/Logical/Libraries/Loupe/tcpcomm/package.json @@ -1,18 +1,18 @@ -{ - "name": "@loupeteam/tcpcomm", - "version": "0.10.0", - "description": "Loupe's tcpcomm library for Automation Runtime", - "homepage": "https://loupeteam.github.io/LoupeDocs/libraries/tcpcomm.html", - "scripts": {}, - "keywords": [], - "author": "Loupe", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/loupeteam/tcpcomm" - }, - "lpm": { - "type": "library" - }, - "dependencies": {} -} \ No newline at end of file +{ + "name": "@loupeteam/tcpcomm", + "version": "1.0.0", + "description": "TCP communication library for B&R Automation Studio", + "homepage": "https://loupeteam.github.io/LoupeDocs/libraries/tcpcomm.html", + "scripts": {}, + "keywords": [], + "author": "Loupe", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/loupeteam/TCPComm" + }, + "lpm": { + "type": "library" + }, + "dependencies": {} +} diff --git a/example/AsProject/Logical/Libraries/Loupe/vartools/Binary.lby b/example/AsProject/Logical/Libraries/Loupe/vartools/Binary.lby index 118ca6b..eb2195b 100644 --- a/example/AsProject/Logical/Libraries/Loupe/vartools/Binary.lby +++ b/example/AsProject/Logical/Libraries/Loupe/vartools/Binary.lby @@ -1,16 +1,14 @@ - + VarTools.typ VarTools.var VarTools.fun - varToolsInternal.h - CHANGELOG.md - + - + - + \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/Loupe/vartools/CHANGELOG.md b/example/AsProject/Logical/Libraries/Loupe/vartools/CHANGELOG.md deleted file mode 100644 index 4c08175..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/vartools/CHANGELOG.md +++ /dev/null @@ -1,26 +0,0 @@ -0.11.3 - Increase maximum size of variable list from 50 to 100 -0.11.2 - populate variable values will populate ._ with just the parent name -0.11.1 - Fix bug in populate variable values with arrays of strings -0.11.0 - Add new function to populate all the string members of a structure to the variable name -0.10.1 - Add support for external build -0.10.0 - Add support for BYTE, WORD, and DWORD -0.9.2 - Reduce repeated varGetInfo calls on unfound vars - - Add varRefresh Fn to force refresh of variable info -0.9.1 - Update StringExt from 0.13 to 0.14 -0.9.0 - Add support for WSTRING -0.8.2 - Add varGetValueLreal to get a PV value as an lreal -0.8.1 - Explicitly add null character at end of value strings -0.8 - Move from AsString functions to AsBrStr functions. - Alphabetize the list coming from varGetVariableList(). - Add LREAL support for get and set. - Add VAR_TYPE_UNDEFINED if error getting address. - Add Array of variable member values to varVariableWatch for display purposes. -0.7 - Add varVariableWatch as an end-user facing function block to monitor values. - Modify variableBrowser to use varVariableWatch. - Add varGetValueReal to get a PV value as a real instead of a string. -0.6 - Add variableBrowser(). - varGetLocalVariableList now checks for duplicates. -0.5 - Add varGetLocalVariableList(). -0.3 - Change handling of invalid BOOL values. -0.2 - Minor change to varGetInfo() implementation. No change to API. -0.1 - Includes varGetInfo(), varGetValue(), and varSetValue(). diff --git a/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/Arm/vartools.h b/example/AsProject/Logical/Libraries/Loupe/vartools/SG3/VarTools.h similarity index 79% rename from example/AsProject/Logical/Libraries/Loupe/vartools/SG4/Arm/vartools.h rename to example/AsProject/Logical/Libraries/Loupe/vartools/SG3/VarTools.h index ff1766d..f40d721 100644 --- a/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/Arm/vartools.h +++ b/example/AsProject/Logical/Libraries/Loupe/vartools/SG3/VarTools.h @@ -1,6 +1,6 @@ /* Automation Studio generated header file */ /* Do not edit ! */ -/* vartools 0.11.3 */ +/* VarTools 1.0.0 */ #ifndef _VARTOOLS_ #define _VARTOOLS_ @@ -8,8 +8,8 @@ extern "C" { #endif -#ifndef _vartools_VERSION -#define _vartools_VERSION 0.11.3 +#ifndef _VarTools_VERSION +#define _VarTools_VERSION 1.0.0 #endif #include @@ -37,50 +37,6 @@ extern "C" #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define VAR_STRLEN_NAME 120U - #define VAR_STRLEN_VALUE 120U - #define VAR_MAI_MEMBERS 49U - #define VAR_MAI_VARLIST 99U - #define VAR_MIN_SINT (-128) - #define VAR_MAX_SINT 127 - #define VAR_MIN_INT (-32768) - #define VAR_MAX_INT 32767 - #define VAR_MIN_DINT (-2147483647) - #define VAR_MAX_DINT 2147483647 - #define VAR_MIN_USINT 0 - #define VAR_MAX_USINT 255 - #define VAR_MIN_UINT 0 - #define VAR_MAX_UINT 65535 - #define VAR_MIN_UDINT 0U - #define VAR_MAX_UDINT 4294967295U - #define VAR_MIN_REAL (-3.4e+38f) - #define VAR_MAX_REAL 3.4e+38f -#else - _GLOBAL_CONST unsigned char VAR_STRLEN_NAME; - _GLOBAL_CONST unsigned char VAR_STRLEN_VALUE; - _GLOBAL_CONST unsigned short VAR_MAI_MEMBERS; - _GLOBAL_CONST unsigned char VAR_MAI_VARLIST; - _GLOBAL_CONST signed long VAR_MIN_SINT; - _GLOBAL_CONST signed long VAR_MAX_SINT; - _GLOBAL_CONST signed long VAR_MIN_INT; - _GLOBAL_CONST signed long VAR_MAX_INT; - _GLOBAL_CONST signed long VAR_MIN_DINT; - _GLOBAL_CONST signed long VAR_MAX_DINT; - _GLOBAL_CONST signed long VAR_MIN_USINT; - _GLOBAL_CONST signed long VAR_MAX_USINT; - _GLOBAL_CONST signed long VAR_MIN_UINT; - _GLOBAL_CONST signed long VAR_MAX_UINT; - _GLOBAL_CONST unsigned long VAR_MIN_UDINT; - _GLOBAL_CONST unsigned long VAR_MAX_UDINT; - _GLOBAL_CONST float VAR_MIN_REAL; - _GLOBAL_CONST float VAR_MAX_REAL; -#endif - - - - /* Datatypes and datatypes of function blocks */ typedef enum VAR_ERR_enum { VAR_ERR_PV_NOT_FOUND = 14710, @@ -162,11 +118,45 @@ typedef struct variableBrowser plcbit Back; } variableBrowser_typ; +typedef struct varGetAllVars_internal_typ +{ unsigned long iVar; + unsigned short iDeep; + unsigned short iMember[50]; + struct variableBrowser Browser; + plcstring Deep[50][121]; + plcbit NextVariable; + struct PV_xList_typ xList; + struct slMoList moList; + plcstring AppMoName[33]; + plcstring MoName[13]; + plcbit checkGlobal; + plcbit isGlobal; + plcbit validVar; + unsigned long numUniqueVars; + plcstring uniqueVars[2000][121]; +} varGetAllVars_internal_typ; + +typedef struct varGetAllVars +{ + /* VAR_OUTPUT (analog) */ + unsigned short Status; + struct varVariable_typ Variable; + /* VAR (analog) */ + struct varGetAllVars_internal_typ Internal; + /* VAR_INPUT (digital) */ + plcbit Execute; + plcbit AcknowledgeError; + plcbit PrimitivesOnly; + plcbit ExpandStructs; + plcbit CondenseArrays; +} varGetAllVars_typ; + /* Prototyping of functions and function blocks */ _BUR_PUBLIC void varVariableWatch(struct varVariableWatch* inst); _BUR_PUBLIC void variableBrowser(struct variableBrowser* inst); +_BUR_PUBLIC void varGetAllVars(struct varGetAllVars* inst); _BUR_PUBLIC unsigned short varGetInfo(unsigned long pVariable); _BUR_PUBLIC unsigned short varGetValue(unsigned long pVariable); _BUR_PUBLIC unsigned short varGetLrealValue(unsigned long pVariable, unsigned long pValue); @@ -177,6 +167,50 @@ _BUR_PUBLIC unsigned short varGetVariableList(unsigned long pVariableName, unsig _BUR_PUBLIC plcbit varPopulateMemberNames(plcstring* PVName, unsigned char prefix); +/* Constants */ +#ifdef _REPLACE_CONST + #define VAR_STRLEN_NAME 120U + #define VAR_STRLEN_VALUE 120U + #define VAR_MAI_MEMBERS 49U + #define VAR_MAI_VARLIST 99U + #define VAR_MIN_SINT (-128) + #define VAR_MAX_SINT 127 + #define VAR_MIN_INT (-32768) + #define VAR_MAX_INT 32767 + #define VAR_MIN_DINT (-2147483647) + #define VAR_MAX_DINT 2147483647 + #define VAR_MIN_USINT 0 + #define VAR_MAX_USINT 255 + #define VAR_MIN_UINT 0 + #define VAR_MAX_UINT 65535 + #define VAR_MIN_UDINT 0U + #define VAR_MAX_UDINT 4294967295U + #define VAR_MIN_REAL (-3.4e+38f) + #define VAR_MAX_REAL 3.4e+38f +#else + _GLOBAL_CONST unsigned char VAR_STRLEN_NAME; + _GLOBAL_CONST unsigned char VAR_STRLEN_VALUE; + _GLOBAL_CONST unsigned short VAR_MAI_MEMBERS; + _GLOBAL_CONST unsigned char VAR_MAI_VARLIST; + _GLOBAL_CONST signed long VAR_MIN_SINT; + _GLOBAL_CONST signed long VAR_MAX_SINT; + _GLOBAL_CONST signed long VAR_MIN_INT; + _GLOBAL_CONST signed long VAR_MAX_INT; + _GLOBAL_CONST signed long VAR_MIN_DINT; + _GLOBAL_CONST signed long VAR_MAX_DINT; + _GLOBAL_CONST signed long VAR_MIN_USINT; + _GLOBAL_CONST signed long VAR_MAX_USINT; + _GLOBAL_CONST signed long VAR_MIN_UINT; + _GLOBAL_CONST signed long VAR_MAX_UINT; + _GLOBAL_CONST unsigned long VAR_MIN_UDINT; + _GLOBAL_CONST unsigned long VAR_MAX_UDINT; + _GLOBAL_CONST float VAR_MIN_REAL; + _GLOBAL_CONST float VAR_MAX_REAL; +#endif + + + + #ifdef __cplusplus }; #endif diff --git a/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/Arm/VarTools.br b/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/Arm/VarTools.br new file mode 100644 index 0000000..cadeecc Binary files /dev/null and b/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/Arm/VarTools.br differ diff --git a/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/Arm/libVarTools.a b/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/Arm/libVarTools.a new file mode 100644 index 0000000..d143eed Binary files /dev/null and b/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/Arm/libVarTools.a differ diff --git a/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/Arm/libvartools.a b/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/Arm/libvartools.a deleted file mode 100644 index ae095bc..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/Arm/libvartools.a and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/Arm/vartools.br b/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/Arm/vartools.br deleted file mode 100644 index 77afbb0..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/Arm/vartools.br and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/VarTools.br b/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/VarTools.br new file mode 100644 index 0000000..f3ca8a2 Binary files /dev/null and b/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/VarTools.br differ diff --git a/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/vartools.h b/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/VarTools.h similarity index 79% rename from example/AsProject/Logical/Libraries/Loupe/vartools/SG4/vartools.h rename to example/AsProject/Logical/Libraries/Loupe/vartools/SG4/VarTools.h index ff1766d..f40d721 100644 --- a/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/vartools.h +++ b/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/VarTools.h @@ -1,6 +1,6 @@ /* Automation Studio generated header file */ /* Do not edit ! */ -/* vartools 0.11.3 */ +/* VarTools 1.0.0 */ #ifndef _VARTOOLS_ #define _VARTOOLS_ @@ -8,8 +8,8 @@ extern "C" { #endif -#ifndef _vartools_VERSION -#define _vartools_VERSION 0.11.3 +#ifndef _VarTools_VERSION +#define _VarTools_VERSION 1.0.0 #endif #include @@ -37,50 +37,6 @@ extern "C" #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define VAR_STRLEN_NAME 120U - #define VAR_STRLEN_VALUE 120U - #define VAR_MAI_MEMBERS 49U - #define VAR_MAI_VARLIST 99U - #define VAR_MIN_SINT (-128) - #define VAR_MAX_SINT 127 - #define VAR_MIN_INT (-32768) - #define VAR_MAX_INT 32767 - #define VAR_MIN_DINT (-2147483647) - #define VAR_MAX_DINT 2147483647 - #define VAR_MIN_USINT 0 - #define VAR_MAX_USINT 255 - #define VAR_MIN_UINT 0 - #define VAR_MAX_UINT 65535 - #define VAR_MIN_UDINT 0U - #define VAR_MAX_UDINT 4294967295U - #define VAR_MIN_REAL (-3.4e+38f) - #define VAR_MAX_REAL 3.4e+38f -#else - _GLOBAL_CONST unsigned char VAR_STRLEN_NAME; - _GLOBAL_CONST unsigned char VAR_STRLEN_VALUE; - _GLOBAL_CONST unsigned short VAR_MAI_MEMBERS; - _GLOBAL_CONST unsigned char VAR_MAI_VARLIST; - _GLOBAL_CONST signed long VAR_MIN_SINT; - _GLOBAL_CONST signed long VAR_MAX_SINT; - _GLOBAL_CONST signed long VAR_MIN_INT; - _GLOBAL_CONST signed long VAR_MAX_INT; - _GLOBAL_CONST signed long VAR_MIN_DINT; - _GLOBAL_CONST signed long VAR_MAX_DINT; - _GLOBAL_CONST signed long VAR_MIN_USINT; - _GLOBAL_CONST signed long VAR_MAX_USINT; - _GLOBAL_CONST signed long VAR_MIN_UINT; - _GLOBAL_CONST signed long VAR_MAX_UINT; - _GLOBAL_CONST unsigned long VAR_MIN_UDINT; - _GLOBAL_CONST unsigned long VAR_MAX_UDINT; - _GLOBAL_CONST float VAR_MIN_REAL; - _GLOBAL_CONST float VAR_MAX_REAL; -#endif - - - - /* Datatypes and datatypes of function blocks */ typedef enum VAR_ERR_enum { VAR_ERR_PV_NOT_FOUND = 14710, @@ -162,11 +118,45 @@ typedef struct variableBrowser plcbit Back; } variableBrowser_typ; +typedef struct varGetAllVars_internal_typ +{ unsigned long iVar; + unsigned short iDeep; + unsigned short iMember[50]; + struct variableBrowser Browser; + plcstring Deep[50][121]; + plcbit NextVariable; + struct PV_xList_typ xList; + struct slMoList moList; + plcstring AppMoName[33]; + plcstring MoName[13]; + plcbit checkGlobal; + plcbit isGlobal; + plcbit validVar; + unsigned long numUniqueVars; + plcstring uniqueVars[2000][121]; +} varGetAllVars_internal_typ; + +typedef struct varGetAllVars +{ + /* VAR_OUTPUT (analog) */ + unsigned short Status; + struct varVariable_typ Variable; + /* VAR (analog) */ + struct varGetAllVars_internal_typ Internal; + /* VAR_INPUT (digital) */ + plcbit Execute; + plcbit AcknowledgeError; + plcbit PrimitivesOnly; + plcbit ExpandStructs; + plcbit CondenseArrays; +} varGetAllVars_typ; + /* Prototyping of functions and function blocks */ _BUR_PUBLIC void varVariableWatch(struct varVariableWatch* inst); _BUR_PUBLIC void variableBrowser(struct variableBrowser* inst); +_BUR_PUBLIC void varGetAllVars(struct varGetAllVars* inst); _BUR_PUBLIC unsigned short varGetInfo(unsigned long pVariable); _BUR_PUBLIC unsigned short varGetValue(unsigned long pVariable); _BUR_PUBLIC unsigned short varGetLrealValue(unsigned long pVariable, unsigned long pValue); @@ -177,6 +167,50 @@ _BUR_PUBLIC unsigned short varGetVariableList(unsigned long pVariableName, unsig _BUR_PUBLIC plcbit varPopulateMemberNames(plcstring* PVName, unsigned char prefix); +/* Constants */ +#ifdef _REPLACE_CONST + #define VAR_STRLEN_NAME 120U + #define VAR_STRLEN_VALUE 120U + #define VAR_MAI_MEMBERS 49U + #define VAR_MAI_VARLIST 99U + #define VAR_MIN_SINT (-128) + #define VAR_MAX_SINT 127 + #define VAR_MIN_INT (-32768) + #define VAR_MAX_INT 32767 + #define VAR_MIN_DINT (-2147483647) + #define VAR_MAX_DINT 2147483647 + #define VAR_MIN_USINT 0 + #define VAR_MAX_USINT 255 + #define VAR_MIN_UINT 0 + #define VAR_MAX_UINT 65535 + #define VAR_MIN_UDINT 0U + #define VAR_MAX_UDINT 4294967295U + #define VAR_MIN_REAL (-3.4e+38f) + #define VAR_MAX_REAL 3.4e+38f +#else + _GLOBAL_CONST unsigned char VAR_STRLEN_NAME; + _GLOBAL_CONST unsigned char VAR_STRLEN_VALUE; + _GLOBAL_CONST unsigned short VAR_MAI_MEMBERS; + _GLOBAL_CONST unsigned char VAR_MAI_VARLIST; + _GLOBAL_CONST signed long VAR_MIN_SINT; + _GLOBAL_CONST signed long VAR_MAX_SINT; + _GLOBAL_CONST signed long VAR_MIN_INT; + _GLOBAL_CONST signed long VAR_MAX_INT; + _GLOBAL_CONST signed long VAR_MIN_DINT; + _GLOBAL_CONST signed long VAR_MAX_DINT; + _GLOBAL_CONST signed long VAR_MIN_USINT; + _GLOBAL_CONST signed long VAR_MAX_USINT; + _GLOBAL_CONST signed long VAR_MIN_UINT; + _GLOBAL_CONST signed long VAR_MAX_UINT; + _GLOBAL_CONST unsigned long VAR_MIN_UDINT; + _GLOBAL_CONST unsigned long VAR_MAX_UDINT; + _GLOBAL_CONST float VAR_MIN_REAL; + _GLOBAL_CONST float VAR_MAX_REAL; +#endif + + + + #ifdef __cplusplus }; #endif diff --git a/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/libVarTools.a b/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/libVarTools.a new file mode 100644 index 0000000..1681b6c Binary files /dev/null and b/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/libVarTools.a differ diff --git a/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/libvartools.a b/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/libvartools.a deleted file mode 100644 index ee963d3..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/libvartools.a and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/vartools.br b/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/vartools.br deleted file mode 100644 index d6838f8..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/vartools/SG4/vartools.br and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/vartools/SGC/VarTools.h b/example/AsProject/Logical/Libraries/Loupe/vartools/SGC/VarTools.h new file mode 100644 index 0000000..f40d721 --- /dev/null +++ b/example/AsProject/Logical/Libraries/Loupe/vartools/SGC/VarTools.h @@ -0,0 +1,218 @@ +/* Automation Studio generated header file */ +/* Do not edit ! */ +/* VarTools 1.0.0 */ + +#ifndef _VARTOOLS_ +#define _VARTOOLS_ +#ifdef __cplusplus +extern "C" +{ +#endif +#ifndef _VarTools_VERSION +#define _VarTools_VERSION 1.0.0 +#endif + +#include + +#ifndef _BUR_PUBLIC +#define _BUR_PUBLIC +#endif +#ifdef _SG3 + #include "AsBrStr.h" + #include "sys_lib.h" + #include "AsBrWStr.h" + #include "stringext.h" +#endif +#ifdef _SG4 + #include "AsBrStr.h" + #include "sys_lib.h" + #include "AsBrWStr.h" + #include "stringext.h" +#endif +#ifdef _SGC + #include "AsBrStr.h" + #include "sys_lib.h" + #include "AsBrWStr.h" + #include "stringext.h" +#endif + + +/* Datatypes and datatypes of function blocks */ +typedef enum VAR_ERR_enum +{ VAR_ERR_PV_NOT_FOUND = 14710, + VAR_ERR_PVITEM_ENUM = 14713, + VAR_ERR_INVALIDINPUT = 50000, + VAR_ERR_INVALIDVALUE, + VAR_ERR_UNSUPPORTEDTYPE, + VAR_ERR_INVALIDTYPE, + VAR_ERR_TOO_MANY_ITEMS, + VAR_ERR_ +} VAR_ERR_enum; + +typedef enum VAR_TYPE_enum +{ VAR_TYPE_STRUCT = 0, + VAR_TYPE_BOOL, + VAR_TYPE_SINT, + VAR_TYPE_INT, + VAR_TYPE_DINT, + VAR_TYPE_USINT, + VAR_TYPE_UINT, + VAR_TYPE_UDINT, + VAR_TYPE_REAL, + VAR_TYPE_STRING, + VAR_TYPE_ULINT, + VAR_TYPE_DATE_AND_TIME, + VAR_TYPE_TIME, + VAR_TYPE_DATE, + VAR_TYPE_LREAL, + VAR_TYPE_ARRAY_OF_STRUCT, + VAR_TYPE_TIME_OF_DAY, + VAR_TYPE_BYTE, + VAR_TYPE_WORD, + VAR_TYPE_DWORD, + VAR_TYPE_LWORD, + VAR_TYPE_WSTRING, + VAR_TYPE_LINT = 23, + VAR_TYPE_UNDEFINED = 999 +} VAR_TYPE_enum; + +typedef struct varVariable_typ +{ plcstring name[121]; + plcstring value[121]; + unsigned long address; + unsigned long dataType; + unsigned long length; + unsigned short dimension; +} varVariable_typ; + +typedef struct varVariableWatch +{ + /* VAR_INPUT (analog) */ + unsigned long pVariable; + /* VAR_OUTPUT (analog) */ + unsigned short Status; + /* VAR (analog) */ + plcstring iName[121]; + plcstring iValue[121]; +} varVariableWatch_typ; + +typedef struct variableBrowser +{ + /* VAR_INPUT (analog) */ + plcstring VariableName[121]; + signed short MemberIndex; + /* VAR_OUTPUT (analog) */ + plcstring CurrentVariable[121]; + plcstring MemberName[50][121]; + plcstring MemberValue[50][121]; + struct varVariable_typ MemberInfo[50]; + unsigned short NumberMembers; + struct varVariable_typ info; + /* VAR (analog) */ + struct varVariableWatch iMemberWatch[50]; + struct varVariableWatch iCurrentWatch; + plcstring iLevel[20][33]; + unsigned char iLevelIndex; + unsigned char iMemberIndex; + /* VAR_INPUT (digital) */ + plcbit Back; +} variableBrowser_typ; + +typedef struct varGetAllVars_internal_typ +{ unsigned long iVar; + unsigned short iDeep; + unsigned short iMember[50]; + struct variableBrowser Browser; + plcstring Deep[50][121]; + plcbit NextVariable; + struct PV_xList_typ xList; + struct slMoList moList; + plcstring AppMoName[33]; + plcstring MoName[13]; + plcbit checkGlobal; + plcbit isGlobal; + plcbit validVar; + unsigned long numUniqueVars; + plcstring uniqueVars[2000][121]; +} varGetAllVars_internal_typ; + +typedef struct varGetAllVars +{ + /* VAR_OUTPUT (analog) */ + unsigned short Status; + struct varVariable_typ Variable; + /* VAR (analog) */ + struct varGetAllVars_internal_typ Internal; + /* VAR_INPUT (digital) */ + plcbit Execute; + plcbit AcknowledgeError; + plcbit PrimitivesOnly; + plcbit ExpandStructs; + plcbit CondenseArrays; +} varGetAllVars_typ; + + + +/* Prototyping of functions and function blocks */ +_BUR_PUBLIC void varVariableWatch(struct varVariableWatch* inst); +_BUR_PUBLIC void variableBrowser(struct variableBrowser* inst); +_BUR_PUBLIC void varGetAllVars(struct varGetAllVars* inst); +_BUR_PUBLIC unsigned short varGetInfo(unsigned long pVariable); +_BUR_PUBLIC unsigned short varGetValue(unsigned long pVariable); +_BUR_PUBLIC unsigned short varGetLrealValue(unsigned long pVariable, unsigned long pValue); +_BUR_PUBLIC unsigned short varGetRealValue(unsigned long pVariable, unsigned long pValue); +_BUR_PUBLIC unsigned short varRefresh(unsigned long pVariable); +_BUR_PUBLIC unsigned short varSetValue(unsigned long pVariable); +_BUR_PUBLIC unsigned short varGetVariableList(unsigned long pVariableName, unsigned long List); +_BUR_PUBLIC plcbit varPopulateMemberNames(plcstring* PVName, unsigned char prefix); + + +/* Constants */ +#ifdef _REPLACE_CONST + #define VAR_STRLEN_NAME 120U + #define VAR_STRLEN_VALUE 120U + #define VAR_MAI_MEMBERS 49U + #define VAR_MAI_VARLIST 99U + #define VAR_MIN_SINT (-128) + #define VAR_MAX_SINT 127 + #define VAR_MIN_INT (-32768) + #define VAR_MAX_INT 32767 + #define VAR_MIN_DINT (-2147483647) + #define VAR_MAX_DINT 2147483647 + #define VAR_MIN_USINT 0 + #define VAR_MAX_USINT 255 + #define VAR_MIN_UINT 0 + #define VAR_MAX_UINT 65535 + #define VAR_MIN_UDINT 0U + #define VAR_MAX_UDINT 4294967295U + #define VAR_MIN_REAL (-3.4e+38f) + #define VAR_MAX_REAL 3.4e+38f +#else + _GLOBAL_CONST unsigned char VAR_STRLEN_NAME; + _GLOBAL_CONST unsigned char VAR_STRLEN_VALUE; + _GLOBAL_CONST unsigned short VAR_MAI_MEMBERS; + _GLOBAL_CONST unsigned char VAR_MAI_VARLIST; + _GLOBAL_CONST signed long VAR_MIN_SINT; + _GLOBAL_CONST signed long VAR_MAX_SINT; + _GLOBAL_CONST signed long VAR_MIN_INT; + _GLOBAL_CONST signed long VAR_MAX_INT; + _GLOBAL_CONST signed long VAR_MIN_DINT; + _GLOBAL_CONST signed long VAR_MAX_DINT; + _GLOBAL_CONST signed long VAR_MIN_USINT; + _GLOBAL_CONST signed long VAR_MAX_USINT; + _GLOBAL_CONST signed long VAR_MIN_UINT; + _GLOBAL_CONST signed long VAR_MAX_UINT; + _GLOBAL_CONST unsigned long VAR_MIN_UDINT; + _GLOBAL_CONST unsigned long VAR_MAX_UDINT; + _GLOBAL_CONST float VAR_MIN_REAL; + _GLOBAL_CONST float VAR_MAX_REAL; +#endif + + + + +#ifdef __cplusplus +}; +#endif +#endif /* _VARTOOLS_ */ + diff --git a/example/AsProject/Logical/Libraries/Loupe/vartools/VarTools.fun b/example/AsProject/Logical/Libraries/Loupe/vartools/VarTools.fun index 61e07e2..2175951 100644 --- a/example/AsProject/Logical/Libraries/Loupe/vartools/VarTools.fun +++ b/example/AsProject/Logical/Libraries/Loupe/vartools/VarTools.fun @@ -1,96 +1,114 @@ -(* - * File: VarTools.fun - * Copyright (c) 2023 Loupe - * https://loupe.team - * - * This file is part of VarTools, licensed under the MIT License. - * - *) - -FUNCTION varGetInfo : UINT (*Get variable information*) (*$GROUP=User*) - VAR_INPUT - pVariable : UDINT; - END_VAR -END_FUNCTION - -FUNCTION varGetValue : UINT (*Get the value of a variable as a string*) (*$GROUP=User*) - VAR_INPUT - pVariable : UDINT; - END_VAR -END_FUNCTION - -FUNCTION varGetLrealValue : UINT (*Get the value of a variable as an lreal*) - VAR_INPUT - pVariable : UDINT; - pValue : UDINT; - END_VAR -END_FUNCTION - -FUNCTION varGetRealValue : UINT (*Get the value of a variable as a real*) (*$GROUP=User*) - VAR_INPUT - pVariable : UDINT; - pValue : UDINT; - END_VAR -END_FUNCTION - -FUNCTION varRefresh : UINT (*Force refresh of variable information in next getValue call*) - VAR_INPUT - pVariable : UDINT; - END_VAR -END_FUNCTION - -FUNCTION varSetValue : UINT (*Set the value of a variable from a string*) (*$GROUP=User*) - VAR_INPUT - pVariable : UDINT; - END_VAR -END_FUNCTION - -FUNCTION varGetVariableList : UINT (*Get a list of all local and global variables with a given name*) (*$GROUP=User*) - VAR_INPUT - pVariableName : UDINT; - List : UDINT; - END_VAR -END_FUNCTION - -FUNCTION varPopulateMemberNames : BOOL - VAR_INPUT - PVName : STRING[80]; - prefix : USINT; - END_VAR -END_FUNCTION - -FUNCTION_BLOCK varVariableWatch - VAR_INPUT - pVariable : {REDUND_UNREPLICABLE} UDINT; - END_VAR - VAR_OUTPUT - Status : UINT; - END_VAR - VAR - iName : STRING[VAR_STRLEN_NAME]; - iValue : STRING[VAR_STRLEN_VALUE]; - END_VAR -END_FUNCTION_BLOCK - -FUNCTION_BLOCK variableBrowser (*TODO: Add your comment here*) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*) - VAR_INPUT - VariableName : STRING[VAR_STRLEN_VALUE]; - MemberIndex : INT; - Back : BOOL; - END_VAR - VAR_OUTPUT - CurrentVariable : STRING[VAR_STRLEN_VALUE]; - MemberName : ARRAY[0..VAR_MAI_MEMBERS] OF STRING[VAR_STRLEN_NAME]; - MemberValue : ARRAY[0..VAR_MAI_MEMBERS] OF STRING[VAR_STRLEN_VALUE]; - MemberInfo : ARRAY[0..VAR_MAI_MEMBERS] OF varVariable_typ; - NumberMembers : UINT; - info : varVariable_typ; - END_VAR - VAR - iMemberWatch : ARRAY[0..VAR_MAI_MEMBERS] OF varVariableWatch; - iCurrentWatch : varVariableWatch; - iLevel : ARRAY[0..19] OF STRING[32]; - iLevelIndex : USINT; - iMemberIndex : USINT; - END_VAR -END_FUNCTION_BLOCK +(* + * File: VarTools.fun + * Copyright (c) 2023 Loupe + * https://loupe.team + * + * This file is part of VarTools, licensed under the MIT License. + * + *) + +FUNCTION varGetInfo : UINT (*Get variable information*) (*$GROUP=User*) + VAR_INPUT + pVariable : UDINT; + END_VAR +END_FUNCTION + +FUNCTION varGetValue : UINT (*Get the value of a variable as a string*) (*$GROUP=User*) + VAR_INPUT + pVariable : UDINT; + END_VAR +END_FUNCTION + +FUNCTION varGetLrealValue : UINT (*Get the value of a variable as an lreal*) + VAR_INPUT + pVariable : UDINT; + pValue : UDINT; + END_VAR +END_FUNCTION + +FUNCTION varGetRealValue : UINT (*Get the value of a variable as a real*) (*$GROUP=User*) + VAR_INPUT + pVariable : UDINT; + pValue : UDINT; + END_VAR +END_FUNCTION + +FUNCTION varRefresh : UINT (*Force refresh of variable information in next getValue call*) + VAR_INPUT + pVariable : UDINT; + END_VAR +END_FUNCTION + +FUNCTION varSetValue : UINT (*Set the value of a variable from a string*) (*$GROUP=User*) + VAR_INPUT + pVariable : UDINT; + END_VAR +END_FUNCTION + +FUNCTION varGetVariableList : UINT (*Get a list of all local and global variables with a given name*) (*$GROUP=User*) + VAR_INPUT + pVariableName : UDINT; + List : UDINT; + END_VAR +END_FUNCTION + +FUNCTION varPopulateMemberNames : BOOL + VAR_INPUT + PVName : STRING[80]; + prefix : USINT; + END_VAR +END_FUNCTION + +FUNCTION_BLOCK varVariableWatch + VAR_INPUT + pVariable : {REDUND_UNREPLICABLE} UDINT; + END_VAR + VAR_OUTPUT + Status : UINT; + END_VAR + VAR + iName : STRING[VAR_STRLEN_NAME]; + iValue : STRING[VAR_STRLEN_VALUE]; + END_VAR +END_FUNCTION_BLOCK + +FUNCTION_BLOCK variableBrowser (* *) (*$GROUP=User,$CAT=User,$GROUPICON=User.png,$CATICON=User.png*) + VAR_INPUT + VariableName : STRING[VAR_STRLEN_VALUE]; + MemberIndex : INT; + Back : BOOL; + END_VAR + VAR_OUTPUT + CurrentVariable : STRING[VAR_STRLEN_VALUE]; + MemberName : ARRAY[0..VAR_MAI_MEMBERS] OF STRING[VAR_STRLEN_NAME]; + MemberValue : ARRAY[0..VAR_MAI_MEMBERS] OF STRING[VAR_STRLEN_VALUE]; + MemberInfo : ARRAY[0..VAR_MAI_MEMBERS] OF varVariable_typ; + NumberMembers : UINT; + info : varVariable_typ; + END_VAR + VAR + iMemberWatch : ARRAY[0..VAR_MAI_MEMBERS] OF varVariableWatch; + iCurrentWatch : varVariableWatch; + iLevel : ARRAY[0..19] OF STRING[32]; + iLevelIndex : USINT; + iMemberIndex : USINT; + END_VAR +END_FUNCTION_BLOCK +(*Experimental*) + +FUNCTION_BLOCK varGetAllVars (*Get all varaiables on system*) + VAR_INPUT + Execute : BOOL; (*Starts searching variables on rising edge*) + AcknowledgeError : BOOL; (*Clears errors*) + PrimitivesOnly : BOOL; (*Return primitives only *) + ExpandStructs : BOOL; (*Search through structures*) + CondenseArrays : BOOL; (*Return one element per array *) + END_VAR + VAR_OUTPUT + Status : UINT; (*Status*) + Variable : varVariable_typ; (*Found varaible info *) + END_VAR + VAR + Internal : varGetAllVars_internal_typ; + END_VAR +END_FUNCTION_BLOCK diff --git a/example/AsProject/Logical/Libraries/Loupe/vartools/VarTools.typ b/example/AsProject/Logical/Libraries/Loupe/vartools/VarTools.typ index 1553e84..569430b 100644 --- a/example/AsProject/Logical/Libraries/Loupe/vartools/VarTools.typ +++ b/example/AsProject/Logical/Libraries/Loupe/vartools/VarTools.typ @@ -1,57 +1,74 @@ -(* - * File: VarTools.typ - * Copyright (c) 2023 Loupe - * https://loupe.team - * - * This file is part of VarTools, licensed under the MIT License. - * - *) - -TYPE - VAR_ERR_enum : - ( - VAR_ERR_PV_NOT_FOUND := 14710, - VAR_ERR_PVITEM_ENUM := 14713, - VAR_ERR_INVALIDINPUT := 50000, - VAR_ERR_INVALIDVALUE, - VAR_ERR_UNSUPPORTEDTYPE, - VAR_ERR_INVALIDTYPE, - VAR_ERR_TOO_MANY_ITEMS, - VAR_ERR_ - ); - VAR_TYPE_enum : - ( - VAR_TYPE_STRUCT := 0, (*0*) - VAR_TYPE_BOOL, - VAR_TYPE_SINT, - VAR_TYPE_INT, - VAR_TYPE_DINT, - VAR_TYPE_USINT, (*5*) - VAR_TYPE_UINT, - VAR_TYPE_UDINT, - VAR_TYPE_REAL, - VAR_TYPE_STRING, - VAR_TYPE_ULINT, (*10*) - VAR_TYPE_DATE_AND_TIME, - VAR_TYPE_TIME, - VAR_TYPE_DATE, - VAR_TYPE_LREAL, - VAR_TYPE_ARRAY_OF_STRUCT, (*15*) - VAR_TYPE_TIME_OF_DAY, - VAR_TYPE_BYTE, - VAR_TYPE_WORD, - VAR_TYPE_DWORD, - VAR_TYPE_LWORD, (*20*) - VAR_TYPE_WSTRING, (*21*) - VAR_TYPE_LINT := 23, (*23*) - VAR_TYPE_UNDEFINED := 999 - ); - varVariable_typ : STRUCT - name : STRING[VAR_STRLEN_NAME]; - value : STRING[VAR_STRLEN_VALUE]; - address : UDINT; - dataType : UDINT; - length : UDINT; - dimension : UINT; - END_STRUCT; -END_TYPE +(* + * File: VarTools.typ + * Copyright (c) 2023 Loupe + * https://loupe.team + * + * This file is part of VarTools, licensed under the MIT License. + * + *) + +TYPE + VAR_ERR_enum : + ( + VAR_ERR_PV_NOT_FOUND := 14710, + VAR_ERR_PVITEM_ENUM := 14713, + VAR_ERR_INVALIDINPUT := 50000, + VAR_ERR_INVALIDVALUE, + VAR_ERR_UNSUPPORTEDTYPE, + VAR_ERR_INVALIDTYPE, + VAR_ERR_TOO_MANY_ITEMS, + VAR_ERR_ + ); + VAR_TYPE_enum : + ( + VAR_TYPE_STRUCT := 0, (*0*) + VAR_TYPE_BOOL, + VAR_TYPE_SINT, + VAR_TYPE_INT, + VAR_TYPE_DINT, + VAR_TYPE_USINT, (*5*) + VAR_TYPE_UINT, + VAR_TYPE_UDINT, + VAR_TYPE_REAL, + VAR_TYPE_STRING, + VAR_TYPE_ULINT, (*10*) + VAR_TYPE_DATE_AND_TIME, + VAR_TYPE_TIME, + VAR_TYPE_DATE, + VAR_TYPE_LREAL, + VAR_TYPE_ARRAY_OF_STRUCT, (*15*) + VAR_TYPE_TIME_OF_DAY, + VAR_TYPE_BYTE, + VAR_TYPE_WORD, + VAR_TYPE_DWORD, + VAR_TYPE_LWORD, (*20*) + VAR_TYPE_WSTRING, (*21*) + VAR_TYPE_LINT := 23, (*23*) + VAR_TYPE_UNDEFINED := 999 + ); + varVariable_typ : STRUCT + name : STRING[VAR_STRLEN_NAME]; + value : STRING[VAR_STRLEN_VALUE]; + address : UDINT; + dataType : UDINT; + length : UDINT; + dimension : UINT; + END_STRUCT; + varGetAllVars_internal_typ : STRUCT + iVar : UDINT := 65535; + iDeep : UINT; + iMember : ARRAY[0..49]OF UINT; + Browser : variableBrowser; + Deep : ARRAY[0..49]OF STRING[VAR_STRLEN_NAME]; + NextVariable : BOOL; + xList : PV_xList_typ; + moList : slMoList; + AppMoName : STRING[32]; + MoName : STRING[12]; + checkGlobal : BOOL; + isGlobal : BOOL; + validVar : BOOL; + numUniqueVars : UDINT; + uniqueVars : ARRAY[0..1999]OF STRING[VAR_STRLEN_NAME]; + END_STRUCT; +END_TYPE diff --git a/example/AsProject/Logical/Libraries/Loupe/vartools/VarTools.var b/example/AsProject/Logical/Libraries/Loupe/vartools/VarTools.var index b5805da..c734f88 100644 --- a/example/AsProject/Logical/Libraries/Loupe/vartools/VarTools.var +++ b/example/AsProject/Logical/Libraries/Loupe/vartools/VarTools.var @@ -1,31 +1,31 @@ -(* - * File: VarTools.var - * Copyright (c) 2023 Loupe - * https://loupe.team - * - * This file is part of VarTools, licensed under the MIT License. - * - *) -VAR CONSTANT - VAR_STRLEN_NAME : USINT := 120; - VAR_STRLEN_VALUE : USINT := 120; - VAR_MAI_MEMBERS : UINT := 49; - VAR_MAI_VARLIST : USINT := 99; -END_VAR -(*Data type limits*) -VAR CONSTANT - VAR_MIN_SINT : DINT := -128; - VAR_MAX_SINT : DINT := 127; - VAR_MIN_INT : DINT := -32768; - VAR_MAX_INT : DINT := 32767; - VAR_MIN_DINT : DINT := -2147483647; - VAR_MAX_DINT : DINT := 2147483647; - VAR_MIN_USINT : DINT := 0; - VAR_MAX_USINT : DINT := 255; - VAR_MIN_UINT : DINT := 0; - VAR_MAX_UINT : DINT := 65535; - VAR_MIN_UDINT : UDINT := 0; - VAR_MAX_UDINT : UDINT := 4294967295; - VAR_MIN_REAL : REAL := -3.4E038; - VAR_MAX_REAL : REAL := 3.4E038; -END_VAR +(* + * File: VarTools.var + * Copyright (c) 2023 Loupe + * https://loupe.team + * + * This file is part of VarTools, licensed under the MIT License. + * + *) +VAR CONSTANT + VAR_STRLEN_NAME : USINT := 120; + VAR_STRLEN_VALUE : USINT := 120; + VAR_MAI_MEMBERS : UINT := 49; + VAR_MAI_VARLIST : USINT := 99; +END_VAR +(*Data type limits*) +VAR CONSTANT + VAR_MIN_SINT : DINT := -128; + VAR_MAX_SINT : DINT := 127; + VAR_MIN_INT : DINT := -32768; + VAR_MAX_INT : DINT := 32767; + VAR_MIN_DINT : DINT := -2147483647; + VAR_MAX_DINT : DINT := 2147483647; + VAR_MIN_USINT : DINT := 0; + VAR_MAX_USINT : DINT := 255; + VAR_MIN_UINT : DINT := 0; + VAR_MAX_UINT : DINT := 65535; + VAR_MIN_UDINT : UDINT := 0; + VAR_MAX_UDINT : UDINT := 4294967295; + VAR_MIN_REAL : REAL := -3.4E038; + VAR_MAX_REAL : REAL := 3.4E038; +END_VAR diff --git a/example/AsProject/Logical/Libraries/Loupe/vartools/package.json b/example/AsProject/Logical/Libraries/Loupe/vartools/package.json index de49e05..c149d1e 100644 --- a/example/AsProject/Logical/Libraries/Loupe/vartools/package.json +++ b/example/AsProject/Logical/Libraries/Loupe/vartools/package.json @@ -1,20 +1,20 @@ -{ - "name": "@loupeteam/vartools", - "version": "0.11.3", - "description": "Loupe's vartools library for Automation Runtime", - "homepage": "https://loupeteam.github.io/LoupeDocs/libraries/vartools.html", - "scripts": {}, - "keywords": [], - "author": "Loupe", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/loupeteam/vartools" - }, - "lpm": { - "type": "library" - }, - "dependencies": { - "@loupeteam/stringext": ">=0.14.0 <=0.14.9" - } -} \ No newline at end of file +{ + "name": "@loupeteam/vartools", + "version": "1.0.0", + "description": "Helper library for getting and setting variable values in B&R Automation Studio", + "homepage": "https://loupeteam.github.io/LoupeDocs/libraries/vartools.html", + "scripts": {}, + "keywords": [], + "author": "Loupe", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/loupeteam/vartools" + }, + "lpm": { + "type": "library" + }, + "dependencies": { + "@loupeteam/stringext": "*" + } +} diff --git a/example/AsProject/Logical/Libraries/Loupe/vartools/varToolsInternal.h b/example/AsProject/Logical/Libraries/Loupe/vartools/varToolsInternal.h deleted file mode 100644 index 0236be7..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/vartools/varToolsInternal.h +++ /dev/null @@ -1,3 +0,0 @@ -#if !defined(_SG4) -#include "bur.h" -#endif diff --git a/example/AsProject/Logical/Libraries/Loupe/websocket/Binary.lby b/example/AsProject/Logical/Libraries/Loupe/websocket/Binary.lby index 4cc9eda..ff25e5c 100644 --- a/example/AsProject/Logical/Libraries/Loupe/websocket/Binary.lby +++ b/example/AsProject/Logical/Libraries/Loupe/websocket/Binary.lby @@ -1,19 +1,18 @@ - + + README.md + LICENSE.txt Types.typ WSMgr.typ WSStream.typ Constants.var WebSocket.fun - sha1.h - CHANGELOG.md - Internal.h - + - - + + - + \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/Loupe/websocket/CHANGELOG.md b/example/AsProject/Logical/Libraries/Loupe/websocket/CHANGELOG.md deleted file mode 100644 index fbb42ac..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/websocket/CHANGELOG.md +++ /dev/null @@ -1,8 +0,0 @@ -# Change log - - - 0.02.2 - Fix not properly detecting disconnects in some scenarios - - 0.02.1 - Expand StringExt dependency - - 0.02.0 - Remove technology guarding license requirement - - 0.01.0 - Update dependencies - - 0.00.2 - Add Client support - - 0.00.1 - Initial version \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/Loupe/websocket/Internal.h b/example/AsProject/Logical/Libraries/Loupe/websocket/Internal.h deleted file mode 100644 index cc224e2..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/websocket/Internal.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * File: Internal.h - * Copyright (c) 2023 Loupe - * https://loupe.team - * - * This file is part of WebSocket, licensed under the MIT License. - */ - -#ifndef __JSON_INTERNAL_H__ -#define __JSON_INTERNAL_H__ - -#ifdef __cplusplus - extern "C" - { -#endif - -#include - -// Internal function prototypes - -// Set error for connection mgr -unsigned short internalSetWSConnectionError(struct WSConnectionManager_typ* t, signed long errorID, char* errorString); - -// Set error for stream mgr -unsigned short internalSetWSStreamError(struct WSStream_typ* t, signed long errorID, char* errorString); - -// Get error message for error ID -unsigned short internalGetErrorMsg(char* errorString, signed long errorID, unsigned long errorStringSize); - -// Skip whitespace -char *skip(char *in); - -#ifdef __cplusplus - }; -#endif - -#endif diff --git a/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/Arm/websocket.h b/example/AsProject/Logical/Libraries/Loupe/websocket/SG3/WebSocket.h similarity index 95% rename from example/AsProject/Logical/Libraries/Loupe/websocket/SG4/Arm/websocket.h rename to example/AsProject/Logical/Libraries/Loupe/websocket/SG3/WebSocket.h index 7f537df..b272a42 100644 --- a/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/Arm/websocket.h +++ b/example/AsProject/Logical/Libraries/Loupe/websocket/SG3/WebSocket.h @@ -1,6 +1,6 @@ /* Automation Studio generated header file */ /* Do not edit ! */ -/* websocket 0.02.2 */ +/* WebSocket 1.0.0 */ #ifndef _WEBSOCKET_ #define _WEBSOCKET_ @@ -8,8 +8,8 @@ extern "C" { #endif -#ifndef _websocket_VERSION -#define _websocket_VERSION 0.02.2 +#ifndef _WebSocket_VERSION +#define _WebSocket_VERSION 1.0.0 #endif #include @@ -37,26 +37,6 @@ extern "C" #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define WS_HEADER_MAX_LEN 14U - #define WS_HEADER_MIN_LEN 2U - #define WS_STRLEN_ERRORSTRING 320U - #define WS_STRLEN_CONNECTMESSAGE 129U - #define WS_STRLEN_KEYHEADER 18U - #define WS_SOC_MAGICSTRING "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" -#else - _GLOBAL_CONST unsigned char WS_HEADER_MAX_LEN; - _GLOBAL_CONST unsigned char WS_HEADER_MIN_LEN; - _GLOBAL_CONST unsigned short WS_STRLEN_ERRORSTRING; - _GLOBAL_CONST unsigned char WS_STRLEN_CONNECTMESSAGE; - _GLOBAL_CONST unsigned short WS_STRLEN_KEYHEADER; - _GLOBAL_CONST plcstring WS_SOC_MAGICSTRING[37]; -#endif - - - - /* Datatypes and datatypes of function blocks */ typedef enum WS_OpCode_enum { WS_OPCODE_CONTINUATION = 0, @@ -324,6 +304,26 @@ _BUR_PUBLIC unsigned long wsGetErrorMsg(unsigned long dest, signed long errorID, _BUR_PUBLIC plcbit wsModeIsValid(signed long mode); +/* Constants */ +#ifdef _REPLACE_CONST + #define WS_HEADER_MAX_LEN 14U + #define WS_HEADER_MIN_LEN 2U + #define WS_STRLEN_ERRORSTRING 320U + #define WS_STRLEN_CONNECTMESSAGE 129U + #define WS_STRLEN_KEYHEADER 18U + #define WS_SOC_MAGICSTRING "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" +#else + _GLOBAL_CONST unsigned char WS_HEADER_MAX_LEN; + _GLOBAL_CONST unsigned char WS_HEADER_MIN_LEN; + _GLOBAL_CONST unsigned short WS_STRLEN_ERRORSTRING; + _GLOBAL_CONST unsigned char WS_STRLEN_CONNECTMESSAGE; + _GLOBAL_CONST unsigned short WS_STRLEN_KEYHEADER; + _GLOBAL_CONST plcstring WS_SOC_MAGICSTRING[37]; +#endif + + + + __asm__(".section \".plc\""); /* Additional IEC dependencies */ diff --git a/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/Arm/WebSocket.br b/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/Arm/WebSocket.br new file mode 100644 index 0000000..7a11e9c Binary files /dev/null and b/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/Arm/WebSocket.br differ diff --git a/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/Arm/libWebSocket.a b/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/Arm/libWebSocket.a new file mode 100644 index 0000000..3717170 Binary files /dev/null and b/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/Arm/libWebSocket.a differ diff --git a/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/Arm/libwebsocket.a b/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/Arm/libwebsocket.a deleted file mode 100644 index 085b363..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/Arm/libwebsocket.a and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/Arm/websocket.br b/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/Arm/websocket.br deleted file mode 100644 index 76a1a10..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/Arm/websocket.br and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/WebSocket.br b/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/WebSocket.br new file mode 100644 index 0000000..e279a35 Binary files /dev/null and b/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/WebSocket.br differ diff --git a/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/websocket.h b/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/WebSocket.h similarity index 95% rename from example/AsProject/Logical/Libraries/Loupe/websocket/SG4/websocket.h rename to example/AsProject/Logical/Libraries/Loupe/websocket/SG4/WebSocket.h index 7f537df..b272a42 100644 --- a/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/websocket.h +++ b/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/WebSocket.h @@ -1,6 +1,6 @@ /* Automation Studio generated header file */ /* Do not edit ! */ -/* websocket 0.02.2 */ +/* WebSocket 1.0.0 */ #ifndef _WEBSOCKET_ #define _WEBSOCKET_ @@ -8,8 +8,8 @@ extern "C" { #endif -#ifndef _websocket_VERSION -#define _websocket_VERSION 0.02.2 +#ifndef _WebSocket_VERSION +#define _WebSocket_VERSION 1.0.0 #endif #include @@ -37,26 +37,6 @@ extern "C" #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define WS_HEADER_MAX_LEN 14U - #define WS_HEADER_MIN_LEN 2U - #define WS_STRLEN_ERRORSTRING 320U - #define WS_STRLEN_CONNECTMESSAGE 129U - #define WS_STRLEN_KEYHEADER 18U - #define WS_SOC_MAGICSTRING "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" -#else - _GLOBAL_CONST unsigned char WS_HEADER_MAX_LEN; - _GLOBAL_CONST unsigned char WS_HEADER_MIN_LEN; - _GLOBAL_CONST unsigned short WS_STRLEN_ERRORSTRING; - _GLOBAL_CONST unsigned char WS_STRLEN_CONNECTMESSAGE; - _GLOBAL_CONST unsigned short WS_STRLEN_KEYHEADER; - _GLOBAL_CONST plcstring WS_SOC_MAGICSTRING[37]; -#endif - - - - /* Datatypes and datatypes of function blocks */ typedef enum WS_OpCode_enum { WS_OPCODE_CONTINUATION = 0, @@ -324,6 +304,26 @@ _BUR_PUBLIC unsigned long wsGetErrorMsg(unsigned long dest, signed long errorID, _BUR_PUBLIC plcbit wsModeIsValid(signed long mode); +/* Constants */ +#ifdef _REPLACE_CONST + #define WS_HEADER_MAX_LEN 14U + #define WS_HEADER_MIN_LEN 2U + #define WS_STRLEN_ERRORSTRING 320U + #define WS_STRLEN_CONNECTMESSAGE 129U + #define WS_STRLEN_KEYHEADER 18U + #define WS_SOC_MAGICSTRING "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" +#else + _GLOBAL_CONST unsigned char WS_HEADER_MAX_LEN; + _GLOBAL_CONST unsigned char WS_HEADER_MIN_LEN; + _GLOBAL_CONST unsigned short WS_STRLEN_ERRORSTRING; + _GLOBAL_CONST unsigned char WS_STRLEN_CONNECTMESSAGE; + _GLOBAL_CONST unsigned short WS_STRLEN_KEYHEADER; + _GLOBAL_CONST plcstring WS_SOC_MAGICSTRING[37]; +#endif + + + + __asm__(".section \".plc\""); /* Additional IEC dependencies */ diff --git a/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/libWebSocket.a b/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/libWebSocket.a new file mode 100644 index 0000000..19c8fc4 Binary files /dev/null and b/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/libWebSocket.a differ diff --git a/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/libwebsocket.a b/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/libwebsocket.a deleted file mode 100644 index 4eab4e7..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/libwebsocket.a and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/websocket.br b/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/websocket.br deleted file mode 100644 index 52c113d..0000000 Binary files a/example/AsProject/Logical/Libraries/Loupe/websocket/SG4/websocket.br and /dev/null differ diff --git a/example/AsProject/Logical/Libraries/Loupe/websocket/SGC/WebSocket.h b/example/AsProject/Logical/Libraries/Loupe/websocket/SGC/WebSocket.h new file mode 100644 index 0000000..b272a42 --- /dev/null +++ b/example/AsProject/Logical/Libraries/Loupe/websocket/SGC/WebSocket.h @@ -0,0 +1,338 @@ +/* Automation Studio generated header file */ +/* Do not edit ! */ +/* WebSocket 1.0.0 */ + +#ifndef _WEBSOCKET_ +#define _WEBSOCKET_ +#ifdef __cplusplus +extern "C" +{ +#endif +#ifndef _WebSocket_VERSION +#define _WebSocket_VERSION 1.0.0 +#endif + +#include + +#ifndef _BUR_PUBLIC +#define _BUR_PUBLIC +#endif +#ifdef _SG3 + #include "AsHttp.h" + #include "sys_lib.h" + #include "tcpcomm.h" + #include "stringext.h" +#endif +#ifdef _SG4 + #include "AsHttp.h" + #include "sys_lib.h" + #include "tcpcomm.h" + #include "stringext.h" +#endif +#ifdef _SGC + #include "AsHttp.h" + #include "sys_lib.h" + #include "tcpcomm.h" + #include "stringext.h" +#endif + + +/* Datatypes and datatypes of function blocks */ +typedef enum WS_OpCode_enum +{ WS_OPCODE_CONTINUATION = 0, + WS_OPCODE_TEXT = 1, + WS_OPCODE_BINARY = 2, + WS_OPCODE_RESERVED_NON_CONTROL = 3, + WS_OPCODE_CONNECTION_CLOSE = 8, + WS_OPCODE_PING = 9, + WS_OPCODE_PONG = 10, + WS_OPCODE_RESERVED_CONTROL = 11 +} WS_OpCode_enum; + +typedef enum WS_ERR_enum +{ WS_ERR_OK, + WS_ERR_INVALID_INPUT = 5500, + WS_ERR_NOT_IMPLEMENTED, + WS_ERR_PAYLOAD_LENGTH, + WS_ERR_MEM_ALLOC, + WS_ERR_NO_LICENSE, + WS_ERR_KEY_NOT_FOUND, + WS_ERR_PARTIAL_HTTP_MESSAGE, + WS_ERR_INVALID_HTTP_MESSAGE, + WS_ERR_BUFFER_FULL, + WS_ERR_ +} WS_ERR_enum; + +typedef enum WS_Mode_enum +{ WS_MODE_SERVER = 50000, + WS_MODE_CLIENT +} WS_Mode_enum; + +typedef struct WSHeader_typ +{ plcbit fin; + unsigned char rsv; + unsigned char opCode; + plcbit mask; + unsigned char maskingKey[4]; + unsigned long frameLength; +} WSHeader_typ; + +typedef unsigned char MaskingKey_typ[4]; + +typedef struct wsMask +{ + /* VAR_INPUT (analog) */ + unsigned long src; + unsigned long srcLength; + unsigned long dest; + unsigned long destSize; + MaskingKey_typ maskingKey; + /* VAR_OUTPUT (analog) */ + unsigned short status; + unsigned long destLength; +} wsMask_typ; + +typedef struct WSDecode_Internal_typ +{ struct wsMask mask; +} WSDecode_Internal_typ; + +typedef struct WSEncode_Internal_typ +{ struct wsMask mask; +} WSEncode_Internal_typ; + +typedef struct WSConnect_Internal_typ +{ struct httpEncodeBase64 encodeBase64; +} WSConnect_Internal_typ; + +typedef struct WSConnectionManager_In_Cmd_typ +{ plcbit enable; + plcbit acknowledgeConnection; + plcbit acknowledgeError; +} WSConnectionManager_In_Cmd_typ; + +typedef struct WSConnectionManager_In_Cfg_typ +{ enum WS_Mode_enum mode; + plcstring localIPAddress[256]; + unsigned long localPort; + plcstring remoteIPAddress[256]; + unsigned long remotePort; + unsigned long sendBufferSize; + plcbit useSSL; + unsigned long sslCertificate; +} WSConnectionManager_In_Cfg_typ; + +typedef struct WSConnectionManager_In_typ +{ struct WSConnectionManager_In_Cmd_typ cmd; + struct WSConnectionManager_In_Cfg_typ cfg; +} WSConnectionManager_In_typ; + +typedef struct WSConnectionManager_Desc_typ +{ struct TCPConnection_Desc_typ parameters; + enum WS_Mode_enum mode; +} WSConnectionManager_Desc_typ; + +typedef struct WSConnectionManager_Out_typ +{ plcbit newConnectionAvailable; + struct WSConnectionManager_Desc_typ connection; + plcbit error; + unsigned short errorID; + plcstring errorString[321]; +} WSConnectionManager_Out_typ; + +typedef struct WSConnectionManager_Internal_typ +{ struct TCPConnectionMgr_typ tcpConnection; +} WSConnectionManager_Internal_typ; + +typedef struct WSConnectionManager_typ +{ struct WSConnectionManager_In_typ in; + struct WSConnectionManager_Out_typ out; + struct WSConnectionManager_Internal_typ internal; +} WSConnectionManager_typ; + +typedef struct WSStream_IN_CMD_typ +{ plcbit receive; + plcbit send; + plcbit close; + plcbit acknowledgeData; + plcbit acknowledgeError; +} WSStream_IN_CMD_typ; + +typedef struct WSStream_IN_PAR_typ +{ struct WSConnectionManager_Desc_typ connection; + unsigned long pReceiveData; + unsigned long maxReceiveLength; + unsigned short receiveFlags; + plcbit allowContinuousReceive; + unsigned long pSendData; + unsigned long sendLength; + struct WSHeader_typ sendHeader; + unsigned short sendFlags; + plcbit allowContinuousSend; +} WSStream_IN_PAR_typ; + +typedef struct WSStream_IN_CFG_typ +{ unsigned long bufferSize; +} WSStream_IN_CFG_typ; + +typedef struct WSStream_IN_typ +{ struct WSStream_IN_CMD_typ cmd; + struct WSStream_IN_PAR_typ par; + struct WSStream_IN_CFG_typ cfg; +} WSStream_IN_typ; + +typedef struct WSStream_OUT_typ +{ struct WSConnectionManager_Desc_typ connection; + plcbit active; + plcbit connected; + plcbit receiving; + struct WSHeader_typ header; + plcbit partialDataReceived; + plcbit dataReceived; + unsigned long receivedDataLength; + plcbit sending; + plcbit dataSent; + unsigned long sentDataLength; + plcbit error; + unsigned short errorID; + plcstring errorString[321]; +} WSStream_OUT_typ; + +typedef struct WSStream_Int_Debug_typ +{ unsigned long websocketPacketTooBig; + unsigned long receiveBufferShiftFull; + unsigned long receiveBufferReset; + unsigned long receiveBufferShift; + plcbit receiveBufferIsShifted; +} WSStream_Int_Debug_typ; + +typedef struct wsDecode +{ + /* VAR_INPUT (analog) */ + unsigned long pFrame; + unsigned long frameLength; + unsigned long pPayload; + unsigned long payloadSize; + /* VAR_OUTPUT (analog) */ + unsigned short status; + unsigned char rsv; + unsigned char opCode; + MaskingKey_typ maskingKey; + unsigned long headerLength; + unsigned long payloadLength; + unsigned long decodeLength; + /* VAR (analog) */ + struct WSDecode_Internal_typ internal; + /* VAR_OUTPUT (digital) */ + plcbit partialHeader; + plcbit partialFrame; + plcbit fin; + plcbit mask; +} wsDecode_typ; + +typedef struct wsEncode +{ + /* VAR_INPUT (analog) */ + unsigned long pFrame; + unsigned long frameSize; + unsigned char rsv; + unsigned char opCode; + MaskingKey_typ maskingKey; + unsigned long pPayload; + unsigned long payloadLength; + /* VAR_OUTPUT (analog) */ + unsigned short status; + unsigned long frameLength; + /* VAR (analog) */ + struct WSEncode_Internal_typ internal; + /* VAR_INPUT (digital) */ + plcbit fin; + plcbit mask; +} wsEncode_typ; + +typedef struct wsConnect +{ + /* VAR_INPUT (analog) */ + unsigned long pInputMessage; + unsigned long pOutputMessage; + unsigned long outputMessageSize; + /* VAR_OUTPUT (analog) */ + unsigned short status; + unsigned long outputMessageLength; + /* VAR (analog) */ + struct WSConnect_Internal_typ internal; +} wsConnect_typ; + +typedef struct WSStream_Int_FUB_typ +{ struct TCPStream_typ tcpStream; + struct wsDecode wsDecode; + struct wsEncode wsEncode; + struct wsConnect wsConnect; + struct wsMask wsMask; +} WSStream_Int_FUB_typ; + +typedef struct WSStream_Internal_typ +{ struct WSStream_Int_Debug_typ debug; + struct WSStream_Int_FUB_typ fub; + struct WSConnectionManager_Desc_typ connection; + plcbit initialized; + plcbit connected; + plcbit connectionUpgraded; + unsigned short connectionState; + unsigned long bufferSize; + unsigned long sendBuffer; + unsigned long receiveBuffer; + plcbit prevSend; +} WSStream_Internal_typ; + +typedef struct WSStream_typ +{ struct WSStream_IN_typ in; + struct WSStream_OUT_typ out; + struct WSStream_Internal_typ internal; +} WSStream_typ; + + + +/* Prototyping of functions and function blocks */ +_BUR_PUBLIC void wsConnect(struct wsConnect* inst); +_BUR_PUBLIC void wsDecode(struct wsDecode* inst); +_BUR_PUBLIC void wsEncode(struct wsEncode* inst); +_BUR_PUBLIC void wsMask(struct wsMask* inst); +_BUR_PUBLIC plcbit wsManageConnection(struct WSConnectionManager_typ* inst); +_BUR_PUBLIC plcbit wsSend(struct WSStream_typ* inst); +_BUR_PUBLIC plcbit wsReceive(struct WSStream_typ* inst); +_BUR_PUBLIC unsigned long wsGetErrorMsg(unsigned long dest, signed long errorID, unsigned long destSize); +_BUR_PUBLIC plcbit wsModeIsValid(signed long mode); + + +/* Constants */ +#ifdef _REPLACE_CONST + #define WS_HEADER_MAX_LEN 14U + #define WS_HEADER_MIN_LEN 2U + #define WS_STRLEN_ERRORSTRING 320U + #define WS_STRLEN_CONNECTMESSAGE 129U + #define WS_STRLEN_KEYHEADER 18U + #define WS_SOC_MAGICSTRING "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" +#else + _GLOBAL_CONST unsigned char WS_HEADER_MAX_LEN; + _GLOBAL_CONST unsigned char WS_HEADER_MIN_LEN; + _GLOBAL_CONST unsigned short WS_STRLEN_ERRORSTRING; + _GLOBAL_CONST unsigned char WS_STRLEN_CONNECTMESSAGE; + _GLOBAL_CONST unsigned short WS_STRLEN_KEYHEADER; + _GLOBAL_CONST plcstring WS_SOC_MAGICSTRING[37]; +#endif + + + + +__asm__(".section \".plc\""); + +/* Additional IEC dependencies */ +__asm__(".ascii \"iecdep \\\"Logical/Libraries/Loupe/tcpcomm/TCPComm.var\\\" scope \\\"global\\\"\\n\""); + +__asm__(".previous"); + +#ifdef __cplusplus +}; +#endif +#endif /* _WEBSOCKET_ */ + diff --git a/example/AsProject/Logical/Libraries/Loupe/websocket/package.json b/example/AsProject/Logical/Libraries/Loupe/websocket/package.json index 381af1c..f236f5f 100644 --- a/example/AsProject/Logical/Libraries/Loupe/websocket/package.json +++ b/example/AsProject/Logical/Libraries/Loupe/websocket/package.json @@ -1,21 +1,21 @@ -{ - "name": "@loupeteam/websocket", - "version": "0.2.2", - "description": "Loupe's websocket library for Automation Runtime", - "homepage": "https://loupeteam.github.io/LoupeDocs/libraries/websocket.html", - "scripts": {}, - "keywords": [], - "author": "Loupe", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/loupeteam/websocket" - }, - "lpm": { - "type": "library" - }, - "dependencies": { - "@loupeteam/tcpcomm": ">=0.10.0 <=0.10.9", - "@loupeteam/stringext": ">=0.14.0 <=0.15.9" - } -} \ No newline at end of file +{ + "name": "@loupeteam/websocket", + "version": "1.0.0", + "description": "WebSocket library for B&R Automation Studio", + "homepage": "https://loupeteam.github.io/LoupeDocs/libraries/websocket.html", + "scripts": {}, + "keywords": [], + "author": "Loupe", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/loupeteam/WebSocket" + }, + "lpm": { + "type": "library" + }, + "dependencies": { + "@loupeteam/tcpcomm": ">=1.0.0", + "@loupeteam/stringext": ">=1.0.0" + } +} diff --git a/example/AsProject/Logical/Libraries/Loupe/websocket/sha1.h b/example/AsProject/Logical/Libraries/Loupe/websocket/sha1.h deleted file mode 100644 index f1f02dd..0000000 --- a/example/AsProject/Logical/Libraries/Loupe/websocket/sha1.h +++ /dev/null @@ -1,93 +0,0 @@ -/* sha1.c : Implementation of the Secure Hash Algorithm */ - -/* SHA: NIST's Secure Hash Algorithm */ - -/* This version written November 2000 by David Ireland of - DI Management Services Pty Limited - - Adapted from code in the Python Cryptography Toolkit, - version 1.0.0 by A.M. Kuchling 1995. -*/ - -/* AM Kuchling's posting:- - Based on SHA code originally posted to sci.crypt by Peter Gutmann - in message <30ajo5$oe8@ccu2.auckland.ac.nz>. - Modified to test for endianness on creation of SHA objects by AMK. - Also, the original specification of SHA was found to have a weakness - by NSA/NIST. This code implements the fixed version of SHA. -*/ - -/* Here's the first paragraph of Peter Gutmann's posting: - -The following is my SHA (FIPS 180) code updated to allow use of the "fixed" -SHA, thanks to Jim Gillogly and an anonymous contributor for the information on -what's changed in the new version. The fix is a simple change which involves -adding a single rotate in the initial expansion function. It is unknown -whether this is an optimal solution to the problem which was discovered in the -SHA or whether it's simply a bandaid which fixes the problem with a minimum of -effort (for example the reengineering of a great many Capstone chips). -*/ - - -/********************************************************************/ -/* global.h */ -/********************************************************************/ - -#ifndef _GLOBAL_H_ -#define _GLOBAL_H_ 1 - -/* POINTER defines a generic pointer type */ -typedef unsigned char *POINTER; - -/* UINT4 defines a four byte word */ -typedef unsigned long int UINT4; - -/* BYTE defines a unsigned character */ -#include -//typedef unsigned char BYTE; - -#ifndef TRUE - #define FALSE 0 - #define TRUE ( !FALSE ) -#endif /* TRUE */ - -#endif /* end _GLOBAL_H_ */ - - -/********************************************************************/ -/* sha.h */ -/********************************************************************/ - -#ifndef _SHA_H_ -#define _SHA_H_ 1 - -/* #include "global.h" */ - -/* The structure for storing SHS info */ - -typedef struct -{ - UINT4 digest[ 5 ]; /* Message digest */ - UINT4 countLo, countHi; /* 64-bit bit count */ - UINT4 data[ 16 ]; /* SHS data buffer */ - int Endianness; -} SHA_CTX; - -/* Message digest functions */ - -void SHAInit(SHA_CTX *); -void SHAUpdate(SHA_CTX *, BYTE *buffer, int count); -void SHAFinal(BYTE *output, SHA_CTX *); - -#endif /* end _SHA_H_ */ - -/********************************************************************/ -/* endian.h */ -/********************************************************************/ - -#ifndef _ENDIAN_H_ -#define _ENDIAN_H_ 1 - -void endianTest(int *endianness); - -#endif /* end _ENDIAN_H_ */ diff --git a/example/AsProject/Logical/Libraries/_AS/ArEventLog/SG4/ArEventLog.h b/example/AsProject/Logical/Libraries/_AS/ArEventLog/SG4/ArEventLog.h index e390b3f..5dfef7c 100644 --- a/example/AsProject/Logical/Libraries/_AS/ArEventLog/SG4/ArEventLog.h +++ b/example/AsProject/Logical/Libraries/_AS/ArEventLog/SG4/ArEventLog.h @@ -15,85 +15,6 @@ extern "C" #ifndef _BUR_PUBLIC #define _BUR_PUBLIC #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define arEVENTLOG_ADDFORMAT_CUST_MAX 150U - #define arEVENTLOG_ADDFORMAT_CUST_BASE 100U - #define arEVENTLOG_ADDFORMAT_CODED 2U - #define arEVENTLOG_ADDFORMAT_TEXT 1U - #define arEVENTLOG_ADDFORMAT_BINARY 0U - #define arEVENTLOG_PERSISTENCE_PERSIST 2U - #define arEVENTLOG_PERSISTENCE_REMANENT 1U - #define arEVENTLOG_PERSISTENCE_VOLATILE 0U - #define arEVENTLOG_SEVERITY_ERROR 3U - #define arEVENTLOG_SEVERITY_WARNING 2U - #define arEVENTLOG_SEVERITY_INFO 1U - #define arEVENTLOG_SEVERITY_SUCCESS 0U - #define arEVENTLOG_INF_SIZE 1076897555 - #define arEVENTLOG_WRN_ADDDATA_NULL (-2144327918) - #define arEVENTLOG_WRN_FORMAT_INVALID (-2144327919) - #define arEVENTLOG_WRN_NO_EVENTID (-2144327920) - #define arEVENTLOG_ERR_FORMAT_INVALID (-1070586081) - #define arEVENTLOG_ERR_DESCRIPTION_NULL (-1070586082) - #define arEVENTLOG_ERR_NO_DESCRIPTION (-1070586083) - #define arEVENTLOG_ERR_MODULE_EXISTS (-1070586084) - #define arEVENTLOG_ERR_NO_ERRORNUMBER (-1070586085) - #define arEVENTLOG_ERR_ADDDATA_NULL (-1070586086) - #define arEVENTLOG_ERR_LOGBOOK_NOT_FOUND (-1070586087) - #define arEVENTLOG_ERR_EVENTID_INVALID (-1070586088) - #define arEVENTLOG_ERR_IDENT_SYSTEM (-1070586089) - #define arEVENTLOG_ERR_IDENT_INVALID (-1070586090) - #define arEVENTLOG_ERR_PERSISTENCE_INVAL (-1070586091) - #define arEVENTLOG_ERR_SIZE_INVALID (-1070586092) - #define arEVENTLOG_ERR_NAME_INVALID (-1070586093) - #define arEVENTLOG_ERR_INTERNAL (-1070586094) - #define arEVENTLOG_ERR_LOGBOOK_EXISTS (-1070586095) - #define arEVENTLOG_ERR_EXISTING (-1070586095) - #define arEVENTLOG_ERR_RECORDID_INVALID (-1070586096) - #define arEVENTLOG_ERR_PARAMETER (-1070586096) -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST unsigned char arEVENTLOG_ADDFORMAT_CUST_MAX; - _GLOBAL_CONST unsigned char arEVENTLOG_ADDFORMAT_CUST_BASE; - _GLOBAL_CONST unsigned char arEVENTLOG_ADDFORMAT_CODED; - _GLOBAL_CONST unsigned char arEVENTLOG_ADDFORMAT_TEXT; - _GLOBAL_CONST unsigned char arEVENTLOG_ADDFORMAT_BINARY; - _GLOBAL_CONST unsigned char arEVENTLOG_PERSISTENCE_PERSIST; - _GLOBAL_CONST unsigned char arEVENTLOG_PERSISTENCE_REMANENT; - _GLOBAL_CONST unsigned char arEVENTLOG_PERSISTENCE_VOLATILE; - _GLOBAL_CONST unsigned char arEVENTLOG_SEVERITY_ERROR; - _GLOBAL_CONST unsigned char arEVENTLOG_SEVERITY_WARNING; - _GLOBAL_CONST unsigned char arEVENTLOG_SEVERITY_INFO; - _GLOBAL_CONST unsigned char arEVENTLOG_SEVERITY_SUCCESS; - _GLOBAL_CONST signed long arEVENTLOG_INF_SIZE; - _GLOBAL_CONST signed long arEVENTLOG_WRN_ADDDATA_NULL; - _GLOBAL_CONST signed long arEVENTLOG_WRN_FORMAT_INVALID; - _GLOBAL_CONST signed long arEVENTLOG_WRN_NO_EVENTID; - _GLOBAL_CONST signed long arEVENTLOG_ERR_FORMAT_INVALID; - _GLOBAL_CONST signed long arEVENTLOG_ERR_DESCRIPTION_NULL; - _GLOBAL_CONST signed long arEVENTLOG_ERR_NO_DESCRIPTION; - _GLOBAL_CONST signed long arEVENTLOG_ERR_MODULE_EXISTS; - _GLOBAL_CONST signed long arEVENTLOG_ERR_NO_ERRORNUMBER; - _GLOBAL_CONST signed long arEVENTLOG_ERR_ADDDATA_NULL; - _GLOBAL_CONST signed long arEVENTLOG_ERR_LOGBOOK_NOT_FOUND; - _GLOBAL_CONST signed long arEVENTLOG_ERR_EVENTID_INVALID; - _GLOBAL_CONST signed long arEVENTLOG_ERR_IDENT_SYSTEM; - _GLOBAL_CONST signed long arEVENTLOG_ERR_IDENT_INVALID; - _GLOBAL_CONST signed long arEVENTLOG_ERR_PERSISTENCE_INVAL; - _GLOBAL_CONST signed long arEVENTLOG_ERR_SIZE_INVALID; - _GLOBAL_CONST signed long arEVENTLOG_ERR_NAME_INVALID; - _GLOBAL_CONST signed long arEVENTLOG_ERR_INTERNAL; - _GLOBAL_CONST signed long arEVENTLOG_ERR_LOGBOOK_EXISTS; - _GLOBAL_CONST signed long arEVENTLOG_ERR_EXISTING; - _GLOBAL_CONST signed long arEVENTLOG_ERR_RECORDID_INVALID; - _GLOBAL_CONST signed long arEVENTLOG_ERR_PARAMETER; -#endif - - - - /* Datatypes and datatypes of function blocks */ typedef struct ArEventLogTimeStampType { unsigned long sec; @@ -347,6 +268,82 @@ _BUR_PUBLIC plcbit ArEventLogAddDataString(unsigned long Buffer, unsigned long B _BUR_PUBLIC plcbit ArEventLogAddDataQuantity(unsigned long Buffer, unsigned long BufferSize, double Value, signed long UnitID, unsigned long NamespaceURI); +/* Constants */ +#ifdef _REPLACE_CONST + #define arEVENTLOG_ADDFORMAT_CUST_MAX 150U + #define arEVENTLOG_ADDFORMAT_CUST_BASE 100U + #define arEVENTLOG_ADDFORMAT_CODED 2U + #define arEVENTLOG_ADDFORMAT_TEXT 1U + #define arEVENTLOG_ADDFORMAT_BINARY 0U + #define arEVENTLOG_PERSISTENCE_PERSIST 2U + #define arEVENTLOG_PERSISTENCE_REMANENT 1U + #define arEVENTLOG_PERSISTENCE_VOLATILE 0U + #define arEVENTLOG_SEVERITY_ERROR 3U + #define arEVENTLOG_SEVERITY_WARNING 2U + #define arEVENTLOG_SEVERITY_INFO 1U + #define arEVENTLOG_SEVERITY_SUCCESS 0U + #define arEVENTLOG_INF_SIZE 1076897555 + #define arEVENTLOG_WRN_ADDDATA_NULL (-2144327918) + #define arEVENTLOG_WRN_FORMAT_INVALID (-2144327919) + #define arEVENTLOG_WRN_NO_EVENTID (-2144327920) + #define arEVENTLOG_ERR_FORMAT_INVALID (-1070586081) + #define arEVENTLOG_ERR_DESCRIPTION_NULL (-1070586082) + #define arEVENTLOG_ERR_NO_DESCRIPTION (-1070586083) + #define arEVENTLOG_ERR_MODULE_EXISTS (-1070586084) + #define arEVENTLOG_ERR_NO_ERRORNUMBER (-1070586085) + #define arEVENTLOG_ERR_ADDDATA_NULL (-1070586086) + #define arEVENTLOG_ERR_LOGBOOK_NOT_FOUND (-1070586087) + #define arEVENTLOG_ERR_EVENTID_INVALID (-1070586088) + #define arEVENTLOG_ERR_IDENT_SYSTEM (-1070586089) + #define arEVENTLOG_ERR_IDENT_INVALID (-1070586090) + #define arEVENTLOG_ERR_PERSISTENCE_INVAL (-1070586091) + #define arEVENTLOG_ERR_SIZE_INVALID (-1070586092) + #define arEVENTLOG_ERR_NAME_INVALID (-1070586093) + #define arEVENTLOG_ERR_INTERNAL (-1070586094) + #define arEVENTLOG_ERR_LOGBOOK_EXISTS (-1070586095) + #define arEVENTLOG_ERR_EXISTING (-1070586095) + #define arEVENTLOG_ERR_RECORDID_INVALID (-1070586096) + #define arEVENTLOG_ERR_PARAMETER (-1070586096) +#else + _GLOBAL_CONST unsigned char arEVENTLOG_ADDFORMAT_CUST_MAX; + _GLOBAL_CONST unsigned char arEVENTLOG_ADDFORMAT_CUST_BASE; + _GLOBAL_CONST unsigned char arEVENTLOG_ADDFORMAT_CODED; + _GLOBAL_CONST unsigned char arEVENTLOG_ADDFORMAT_TEXT; + _GLOBAL_CONST unsigned char arEVENTLOG_ADDFORMAT_BINARY; + _GLOBAL_CONST unsigned char arEVENTLOG_PERSISTENCE_PERSIST; + _GLOBAL_CONST unsigned char arEVENTLOG_PERSISTENCE_REMANENT; + _GLOBAL_CONST unsigned char arEVENTLOG_PERSISTENCE_VOLATILE; + _GLOBAL_CONST unsigned char arEVENTLOG_SEVERITY_ERROR; + _GLOBAL_CONST unsigned char arEVENTLOG_SEVERITY_WARNING; + _GLOBAL_CONST unsigned char arEVENTLOG_SEVERITY_INFO; + _GLOBAL_CONST unsigned char arEVENTLOG_SEVERITY_SUCCESS; + _GLOBAL_CONST signed long arEVENTLOG_INF_SIZE; + _GLOBAL_CONST signed long arEVENTLOG_WRN_ADDDATA_NULL; + _GLOBAL_CONST signed long arEVENTLOG_WRN_FORMAT_INVALID; + _GLOBAL_CONST signed long arEVENTLOG_WRN_NO_EVENTID; + _GLOBAL_CONST signed long arEVENTLOG_ERR_FORMAT_INVALID; + _GLOBAL_CONST signed long arEVENTLOG_ERR_DESCRIPTION_NULL; + _GLOBAL_CONST signed long arEVENTLOG_ERR_NO_DESCRIPTION; + _GLOBAL_CONST signed long arEVENTLOG_ERR_MODULE_EXISTS; + _GLOBAL_CONST signed long arEVENTLOG_ERR_NO_ERRORNUMBER; + _GLOBAL_CONST signed long arEVENTLOG_ERR_ADDDATA_NULL; + _GLOBAL_CONST signed long arEVENTLOG_ERR_LOGBOOK_NOT_FOUND; + _GLOBAL_CONST signed long arEVENTLOG_ERR_EVENTID_INVALID; + _GLOBAL_CONST signed long arEVENTLOG_ERR_IDENT_SYSTEM; + _GLOBAL_CONST signed long arEVENTLOG_ERR_IDENT_INVALID; + _GLOBAL_CONST signed long arEVENTLOG_ERR_PERSISTENCE_INVAL; + _GLOBAL_CONST signed long arEVENTLOG_ERR_SIZE_INVALID; + _GLOBAL_CONST signed long arEVENTLOG_ERR_NAME_INVALID; + _GLOBAL_CONST signed long arEVENTLOG_ERR_INTERNAL; + _GLOBAL_CONST signed long arEVENTLOG_ERR_LOGBOOK_EXISTS; + _GLOBAL_CONST signed long arEVENTLOG_ERR_EXISTING; + _GLOBAL_CONST signed long arEVENTLOG_ERR_RECORDID_INVALID; + _GLOBAL_CONST signed long arEVENTLOG_ERR_PARAMETER; +#endif + + + + #ifdef __cplusplus }; #endif diff --git a/example/AsProject/Logical/Libraries/_AS/ArEventLog/binary.lby b/example/AsProject/Logical/Libraries/_AS/ArEventLog/binary.lby index 13d5af7..fc19779 100644 --- a/example/AsProject/Logical/Libraries/_AS/ArEventLog/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/ArEventLog/binary.lby @@ -1,12 +1,12 @@ - - - - - ArEventLog.fun - ArEventLog.typ - ArEventLog.var - - - - - \ No newline at end of file + + + + + ArEventLog.fun + ArEventLog.typ + ArEventLog.var + + + + + diff --git a/example/AsProject/Logical/Libraries/_AS/AsARCfg/AsARCfg.fun b/example/AsProject/Logical/Libraries/_AS/AsARCfg/AsARCfg.fun index 58905cf..7fd24b3 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsARCfg/AsARCfg.fun +++ b/example/AsProject/Logical/Libraries/_AS/AsARCfg/AsARCfg.fun @@ -210,25 +210,6 @@ END_FUNCTION_BLOCK END_VAR END_FUNCTION_BLOCK -{REDUND_ERROR} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CfgSetBroadcastAddr (*enters broadcast address into the AR registry for Ethernet device; asynchronous execution*) - VAR_INPUT - enable : BOOL; (*enables execution*) - pDevice : UDINT; (*INA device name given as pointer (syntax: SL.SS.IF)*) - pBroadcastAddr : UDINT; (*broadcast address given as a pointer, valid range "1.0.0.1" - "255.255.255.255"*) - Option : UDINT; (*options: cfgOPTION_VOLATILE, cfgOPTION_NON_VOLATILE*) - END_VAR - - VAR_OUTPUT - status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*) - END_VAR - - VAR - i_state : UINT; (*internal variable*) - i_result : UINT; (*internal variable*) - i_tmp : UDINT; (*internal variable*) - END_VAR -END_FUNCTION_BLOCK - {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CfgGetEthBaudrate (*reads the baud rate from the AR registry for Ethernet device; asynchronous execution*) VAR_INPUT enable : BOOL; (*enables execution*) @@ -413,14 +394,14 @@ END_FUNCTION_BLOCK END_VAR END_FUNCTION_BLOCK -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CfgGetTimeOffset (*returns the configured time offset; asynchronous execution*) +{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CfgGetFTPServerPort (*gets the FTP server port; asynchronous execution*) VAR_INPUT enable : BOOL; (*enables execution*) END_VAR VAR_OUTPUT status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*) - timeoffset : INT; (*configured time offset*) + port : UINT; (*FTP server port*) END_VAR VAR @@ -430,15 +411,15 @@ END_FUNCTION_BLOCK END_VAR END_FUNCTION_BLOCK -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CfgSetTimeOffset (*sets a time offset; asynchronous execution*) +{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CfgSetFTPServerPort (*sets the FTP server port; asynchronous execution*) VAR_INPUT enable : BOOL; (*enables execution*) - timeoffset : INT; (*configured time offset*) - option : UDINT; (*options: cfgOPTION_VOLATILE, cfgOPTION_NON_VOLATILE*) + port : UINT; (*FTP server port*) + option : UDINT; (*options: cfgOPTION_VOLATILE, cfgOPTION_NON_VOLATILE*) END_VAR VAR_OUTPUT - status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*) + status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*) END_VAR VAR @@ -448,15 +429,14 @@ END_FUNCTION_BLOCK END_VAR END_FUNCTION_BLOCK -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CfgSetSntpServer (*starts the SNTP server; asynchronous execution*) +{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CfgGetFTPServerBaseDataPort (*gets the FTP server base data port; asynchronous execution*) VAR_INPUT enable : BOOL; (*enables execution*) - start : UDINT; (*1 Starts the SNTP server*) - option : UDINT; (*Options: cfgOPTION_VOLATILE, cfgOPTION_NON_VOLATILE*) END_VAR VAR_OUTPUT - status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*) + status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*) + port : UINT; (*FTP base data port, if using passive FTP*) END_VAR VAR @@ -466,19 +446,15 @@ END_FUNCTION_BLOCK END_VAR END_FUNCTION_BLOCK -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CfgSetSntpClient (*starts and stops the SNTP client; asynchronous execution*) +{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CfgSetFTPServerBaseDataPort (*sets the FTP server base data port; asynchronous execution*) VAR_INPUT enable : BOOL; (*enables execution*) - run : UDINT; (*0 stop client, 1 start client*) - pServerAddr : UDINT; (*pointer to a string with the IP address of the SNTP server*) - sntpcInterval : UINT; (*interval in minutes that it takes for the SNTP client to synchronize the time with the server*) - rtcInterval : UINT; (*interval in minutes that it takes to synchronize the RTC with the software time during SNTP operation*) + port : UINT; (*FTP base data port, if using passive FTP*) option : UDINT; (*options: cfgOPTION_VOLATILE, cfgOPTION_NON_VOLATILE*) END_VAR VAR_OUTPUT status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*) - syncStatus : USINT; (*0 Client not active, 1 Client already active, but time not received from server, ...*) END_VAR VAR @@ -488,18 +464,14 @@ END_FUNCTION_BLOCK END_VAR END_FUNCTION_BLOCK -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CfgGetSntpcData (*returns the parameters relevant for the SNTP client; asynchronous execution*) +{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CfgGetTimeOffset (*returns the configured time offset; asynchronous execution*) VAR_INPUT enable : BOOL; (*enables execution*) - pServerAddr : UDINT; (*pointer to a long enough string to contain the server address or server name*) - Len : USINT; (*length of the string (pServerAddr)*) END_VAR VAR_OUTPUT status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*) - run : UDINT; (*1 Client active, 0 Client inactive*) - sntpcInterval : UINT; (*interval that it takes for the SNTP client to synchronize the time with the server*) - rtcInterval : UINT; (*interval that it take to synchronize the RTC with the software time during SNTP operation*) + timeoffset : INT; (*configured time offset*) END_VAR VAR @@ -509,14 +481,15 @@ END_FUNCTION_BLOCK END_VAR END_FUNCTION_BLOCK -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CfgGetSntpsData (*returns whether the SNTP server is active; asynchronous execution*) +{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CfgSetTimeOffset (*sets a time offset; asynchronous execution*) VAR_INPUT enable : BOOL; (*enables execution*) + timeoffset : INT; (*configured time offset*) + option : UDINT; (*options: cfgOPTION_VOLATILE, cfgOPTION_NON_VOLATILE*) END_VAR VAR_OUTPUT - status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*) - run : UDINT; (*1 server active, 0 server inactive*) + status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*) END_VAR VAR @@ -1195,6 +1168,28 @@ END_FUNCTION_BLOCK END_VAR END_FUNCTION_BLOCK +{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CfgSetDns (*All-in-one FB to configure and run DNS service with Volatile/Non-Volatile option; asynchronous execution*) + VAR_INPUT + enable : BOOL; (*enables execution*) + mode : UINT; (*cfgOPTION_DNS_ON_CONFIG (1) or cfgOPTION_DNS_ON_DHCP (2)*) + pSuffix : UDINT; (*pointer to a string with the DNS suffix*) + pDnsAddr1 : UDINT; (*First DNS Server address given as pointer, valid range "1.0.0.1" - "247.255.255.255"*) + pDnsAddr2 : UDINT; (*Second DNS Server address given as pointer, valid range "1.0.0.1" - "247.255.255.255"*) + pDnsAddr3 : UDINT; (*Third DNS Server address given as pointer, valid range "1.0.0.1" - "247.255.255.255"*) + option : UDINT; (*options: cfgOPTION_VOLATILE, cfgOPTION_NON_VOLATILE*) + END_VAR + + VAR_OUTPUT + status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*) + END_VAR + + VAR + i_state : UINT; (*internal variable*) + i_result : UINT; (*internal variable*) + i_tmp : UDINT; (*internal variable*) + END_VAR +END_FUNCTION_BLOCK + {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CfgGetDnsMode (*returns whether the DNS service is active and using DHCP; asynchronous execution*) VAR_INPUT enable : BOOL; (*enables execution*) @@ -1215,7 +1210,7 @@ END_FUNCTION_BLOCK {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CfgSetDnsMode (*Activate or deactivate the DNS service, get server address from configuration or from DHCP; asynchronous execution*) VAR_INPUT enable : BOOL; (*enables execution*) - mode : UINT; (*cfgOPTION_DNS_OFF (0) or cfgOPTION_DNS_ON_CONFIG (1) or cfgOPTION_DNS_ON_DHCP (2)*) + mode : UINT; (*cfgOPTION_DNS_ON_CONFIG (1) or cfgOPTION_DNS_ON_DHCP (2)*) END_VAR VAR_OUTPUT @@ -1342,3 +1337,100 @@ END_FUNCTION_BLOCK i_tmp : UDINT; (*internal variable*) END_VAR END_FUNCTION_BLOCK + +{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CfgSetSnmpMode (*Activate or deactivate the SNMP service*) + VAR_INPUT + enable : BOOL; (*enables execution*) + pDevice : UDINT; (*Devicename given as a pointer*) + mode : UINT; (*SNMP mode to be set: cfgSNMP_MODE_DISABLED, cfgSNMP_MODE_READ_ONLY, cfgSNMP_MODE_READ_WRITE, cfgSNMP_MODE_READ_ONLY_SECURE, cfgSNMP_MODE_READ_WRITE_SECURE *) + option : UDINT; (*persistency properties: cfgOPTION_VOLATILE, cfgOPTION_NON_VOLATILE*) + END_VAR + + VAR_OUTPUT + status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*) + END_VAR + + VAR + i_state : UINT; (*internal variable*) + i_result : UINT; (*internal variable*) + i_tmp : UDINT; (*internal variable*) + END_VAR +END_FUNCTION_BLOCK + +{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CfgGetSnmpMode (*Get current state of SNMP service*) + VAR_INPUT + enable : BOOL; (*enables execution*) + pDevice : UDINT; (*Devicename given as a pointer*) + END_VAR + + VAR_OUTPUT + status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*) + mode : UINT; (*currently set SNMP mode: cfgSNMP_MODE_DISABLED, cfgSNMP_MODE_READ_ONLY, cfgSNMP_MODE_READ_WRITE, cfgSNMP_MODE_READ_ONLY_SECURE, cfgSNMP_MODE_READ_WRITE_SECURE*) + END_VAR + + VAR + i_state : UINT; (*internal variable*) + i_result : UINT; (*internal variable*) + i_tmp : UDINT; (*internal variable*) + END_VAR +END_FUNCTION_BLOCK + +{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CfgSetSnmpCredentials (*Sets credentials for SNMP service*) + VAR_INPUT + enable : BOOL; (*enables execution*) + pDevice : UDINT; (*device name given as a pointer*) + pUserName : UDINT; (*user name given as pointer*) + pAuthPassphrase : UDINT; (*authentication passphrase given as pointer*) + pPrivPassphrase : UDINT; (*private passphrase given as pointer*) + option : UDINT; (*persistency properties: cfgOPTION_VOLATILE, cfgOPTION_NON_VOLATILE*) + END_VAR + + VAR_OUTPUT + status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*) + END_VAR + + VAR + i_state : UINT; (*internal variable*) + i_result : UINT; (*internal variable*) + i_tmp : UDINT; (*internal variable*) + END_VAR +END_FUNCTION_BLOCK + +{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CfgSetNetworkInstallMode (*Activate or deactivate the network installation service*) + VAR_INPUT + enable : BOOL; (*enables execution*) + pDevice : UDINT; (*Devicename given as a pointer*) + netInstEnable : BOOL; (*network installation enable or disable*) + netInstTimeout : UDINT; (*network installation timeout [seconds] to wait for a response from the DHCP server, if 0 the default timeout (30s) is used*) + option : UDINT; (*persistency properties: cfgOPTION_VOLATILE, cfgOPTION_NON_VOLATILE*) + END_VAR + + VAR_OUTPUT + status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*) + END_VAR + + VAR + i_state : UINT; (*internal variable*) + i_result : UINT; (*internal variable*) + i_tmp : UDINT; (*internal variable*) + END_VAR +END_FUNCTION_BLOCK + +{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CfgGetNetworkInstallMode (*Get current status of network installation service*) + VAR_INPUT + enable : BOOL; (*enables execution*) + pDevice : UDINT; (*Devicename given as a pointer*) + END_VAR + + VAR_OUTPUT + status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*) + netInstEnabled : BOOL; (*network installation enabled or disabled*) + netInstTimeout : UDINT; (*network installation timeout [seconds] to wait for a response from the DHCP server*) + END_VAR + + VAR + i_state : UINT; (*internal variable*) + i_result : UINT; (*internal variable*) + i_tmp : UDINT; (*internal variable*) + END_VAR +END_FUNCTION_BLOCK diff --git a/example/AsProject/Logical/Libraries/_AS/AsARCfg/AsARCfg.var b/example/AsProject/Logical/Libraries/_AS/AsARCfg/AsARCfg.var index f192b22..1137dbf 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsARCfg/AsARCfg.var +++ b/example/AsProject/Logical/Libraries/_AS/AsARCfg/AsARCfg.var @@ -10,9 +10,6 @@ VAR CONSTANT cfgERR_FTP_SINIT : UINT := 29007; (*initialization error on FTP server*) cfgERR_FTP_SDOWN : UINT := 29008; (*shutdown error on FTP server*) cfgERR_PARAM_NOT_SET : UINT := 29009; (*default gateway not defined*) - cfgERR_SNTP_SERVER : UINT := 29010; (*could not start the SNTP server*) - cfgERR_SNTP_CLIENT : UINT := 29011; (*error starting SNTP client (e.g. client already running)*) - cfgERR_SNTP_INTERVAL : UINT := 29012; (*invalid FBK parameter - values from 1 to 60 are valid*) cfgERR_SYSTEM : UINT := 29013; (*unexpected system error*) cfgERR_TIMEZONE : UINT := 29014; (*invalid timezone specified*) cfgERR_YEAR_INVALID : UINT := 29015; (*invalid year specified*) @@ -36,6 +33,7 @@ VAR CONSTANT cfgERR_NTP_CLIENT : UINT := 29033; (*error starting NTP client*) cfgERR_ROUTE_TABLE : UINT := 29034; (*error updating network routing table*) cfgERR_DST : UINT := 29035; (*could not enable or disable automatic daylight saving*) + cfgERR_PORT_INVALID : UINT := 29036; (*FBK "port" parameter invalid*) cfgETHBAUDRATE_AUTO : UDINT := 0; (*auto-detect*) cfgETHBAUDRATE_10 : UDINT := 10; (*10 MBaud, half-duplex*) @@ -86,5 +84,13 @@ VAR CONSTANT cfgSDM_COLOR_DEFAULT : UDINT := 2147483648; (*sdm default color*) cfgDHCP_OPTION_VENDOR_CLASS_ID : USINT := 60; (*DHCP option vendor class identifier*) + cfgDHCP_OPTION_CLIENT_ID : USINT := 61; (*DHCP option client identifier*) + cfgSNMP_MODE_DISABLED : UINT := 0; (*SNMP disabled*) + cfgSNMP_MODE_READ_ONLY : UINT := 1; (*SNMP read only*) + cfgSNMP_MODE_READ_WRITE : UINT := 2; (*SNMP read/write*) + cfgSNMP_MODE_READ_ONLY_SECURE : UINT := 3; (*secure SNMP read only*) + cfgSNMP_MODE_READ_WRITE_SECURE : UINT := 4; (*secure SNMP read/write*) + + cfgTIMEOUT_WAITFOREVER : UDINT := 16#FFFFFFFF; (*ARNB DHCP server response timeout wait forever*) END_VAR diff --git a/example/AsProject/Logical/Libraries/_AS/AsARCfg/SG4/AsARCfg.h b/example/AsProject/Logical/Libraries/_AS/AsARCfg/SG4/AsARCfg.h index 4000b64..d76db8b 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsARCfg/SG4/AsARCfg.h +++ b/example/AsProject/Logical/Libraries/_AS/AsARCfg/SG4/AsARCfg.h @@ -15,161 +15,6 @@ extern "C" #ifndef _BUR_PUBLIC #define _BUR_PUBLIC #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define cfgDHCP_OPTION_VENDOR_CLASS_ID 60U - #define cfgSDM_COLOR_DEFAULT 2147483648U - #define cfgSTATUS_NTP_INACTIVE 0U - #define cfgSTATUS_NTP_ACTIVE 1U - #define cfgNTP_STOP 0U - #define cfgNTP_START 1U - #define cfgOPTION_DNS_ON_DHCP 2U - #define cfgOPTION_DNS_ON_CONFIG 1U - #define cfgOPTION_DNS_OFF 0U - #define cfgWEB_MODE_ENABLED 1U - #define cfgWEB_MODE_DISABLED 0U - #define cfgWEB_MODE_MIME_ADD 1U - #define cfgWEB_MODE_MIME_DEL 0U - #define cfgWEB_MODE_GOFORM_NO_WRITE 2U - #define cfgWEB_MODE_GOFORM_ENABLE 1U - #define cfgWEB_MODE_GOFORM_DISABLE 0U - #define cfgSTATUS_SDM_DISABLED 2U - #define cfgSTATUS_SDM_ENABLED 1U - #define cfgOPTION_DISABLE_SDM 2U - #define cfgOPTION_ENABLE_SDM 1U - #define cfgOPTION_NON_WORKGROUP 0U - #define cfgOPTION_WORKGROUP 1U - #define cfgOPTION_ENABLE 1U - #define cfgOPTION_DISABLE 0U - #define cfgCONFIGMODE_DHCPCLIENT 1U - #define cfgCONFIGMODE_MANUALLY 0U - #define cfgOPTION_VOLATILE 0U - #define cfgOPTION_NON_VOLATILE 1U - #define cfgETHBAUDRATE_1000FD 1001U - #define cfgETHBAUDRATE_100AUTO 102U - #define cfgETHBAUDRATE_100FD 101U - #define cfgETHBAUDRATE_100 100U - #define cfgETHBAUDRATE_10AUTO 12U - #define cfgETHBAUDRATE_10FD 11U - #define cfgETHBAUDRATE_10 10U - #define cfgETHBAUDRATE_AUTO 0U - #define cfgERR_DST 29035U - #define cfgERR_ROUTE_TABLE 29034U - #define cfgERR_NTP_CLIENT 29033U - #define cfgERR_NTP_SERVER 29032U - #define cfgERR_DHCP_NO_DHCP_IP_OBTAINED 29031U - #define cfgERR_WEBSERV_DISABLED 29030U - #define cfgERR_SDM_DISABLED 29029U - #define cfgERR_FUNCTION_NOT_FOUND 29028U - #define cfgERR_CLEAR_NV_DATA 29027U - #define cfgERR_SDM_FUNCTION_NOT_FOUND 29026U - #define cfgERR_DHCP_CONFIG 29025U - #define cfgERR_LEASE_TIMEOUT 29024U - #define cfgERR_LEASE_EXISTS 29023U - #define cfgERR_LEASES_BUFFER 29022U - #define cfgERR_INTERFACELIST_BUFFER 29021U - #define cfgERR_DHCP_SERVER_STARTED 29020U - #define cfgERR_CIFS_DEFAULTPW_INVALID 29019U - #define cfgERR_INANODE_NUMBER_SET 29018U - #define cfgERR_CIFS_DEFAULTUSER_INVALID 29017U - #define cfgERR_CIFS_DOMAIN_INVALID 29016U - #define cfgERR_YEAR_INVALID 29015U - #define cfgERR_TIMEZONE 29014U - #define cfgERR_SYSTEM 29013U - #define cfgERR_SNTP_INTERVAL 29012U - #define cfgERR_SNTP_CLIENT 29011U - #define cfgERR_SNTP_SERVER 29010U - #define cfgERR_PARAM_NOT_SET 29009U - #define cfgERR_FTP_SDOWN 29008U - #define cfgERR_FTP_SINIT 29007U - #define cfgERR_INANODE_NOT_SUPPORTED 29006U - #define cfgERR_ARREG 29005U - #define cfgERR_SET_NOT_POSSIBLE 29004U - #define cfgERR_VALUE_INVALID 29003U - #define cfgERR_OPTION_INVALID 29002U - #define cfgERR_DEVICE_INVALID 29001U - #define cfgERR_DEVICE_NOT_EXIST 29000U -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST unsigned char cfgDHCP_OPTION_VENDOR_CLASS_ID; - _GLOBAL_CONST unsigned long cfgSDM_COLOR_DEFAULT; - _GLOBAL_CONST unsigned short cfgSTATUS_NTP_INACTIVE; - _GLOBAL_CONST unsigned short cfgSTATUS_NTP_ACTIVE; - _GLOBAL_CONST unsigned short cfgNTP_STOP; - _GLOBAL_CONST unsigned short cfgNTP_START; - _GLOBAL_CONST unsigned char cfgOPTION_DNS_ON_DHCP; - _GLOBAL_CONST unsigned char cfgOPTION_DNS_ON_CONFIG; - _GLOBAL_CONST unsigned char cfgOPTION_DNS_OFF; - _GLOBAL_CONST unsigned short cfgWEB_MODE_ENABLED; - _GLOBAL_CONST unsigned short cfgWEB_MODE_DISABLED; - _GLOBAL_CONST unsigned short cfgWEB_MODE_MIME_ADD; - _GLOBAL_CONST unsigned short cfgWEB_MODE_MIME_DEL; - _GLOBAL_CONST unsigned short cfgWEB_MODE_GOFORM_NO_WRITE; - _GLOBAL_CONST unsigned short cfgWEB_MODE_GOFORM_ENABLE; - _GLOBAL_CONST unsigned short cfgWEB_MODE_GOFORM_DISABLE; - _GLOBAL_CONST unsigned char cfgSTATUS_SDM_DISABLED; - _GLOBAL_CONST unsigned char cfgSTATUS_SDM_ENABLED; - _GLOBAL_CONST unsigned char cfgOPTION_DISABLE_SDM; - _GLOBAL_CONST unsigned char cfgOPTION_ENABLE_SDM; - _GLOBAL_CONST unsigned char cfgOPTION_NON_WORKGROUP; - _GLOBAL_CONST unsigned char cfgOPTION_WORKGROUP; - _GLOBAL_CONST unsigned long cfgOPTION_ENABLE; - _GLOBAL_CONST unsigned long cfgOPTION_DISABLE; - _GLOBAL_CONST unsigned long cfgCONFIGMODE_DHCPCLIENT; - _GLOBAL_CONST unsigned long cfgCONFIGMODE_MANUALLY; - _GLOBAL_CONST unsigned long cfgOPTION_VOLATILE; - _GLOBAL_CONST unsigned long cfgOPTION_NON_VOLATILE; - _GLOBAL_CONST unsigned long cfgETHBAUDRATE_1000FD; - _GLOBAL_CONST unsigned long cfgETHBAUDRATE_100AUTO; - _GLOBAL_CONST unsigned long cfgETHBAUDRATE_100FD; - _GLOBAL_CONST unsigned long cfgETHBAUDRATE_100; - _GLOBAL_CONST unsigned long cfgETHBAUDRATE_10AUTO; - _GLOBAL_CONST unsigned long cfgETHBAUDRATE_10FD; - _GLOBAL_CONST unsigned long cfgETHBAUDRATE_10; - _GLOBAL_CONST unsigned long cfgETHBAUDRATE_AUTO; - _GLOBAL_CONST unsigned short cfgERR_DST; - _GLOBAL_CONST unsigned short cfgERR_ROUTE_TABLE; - _GLOBAL_CONST unsigned short cfgERR_NTP_CLIENT; - _GLOBAL_CONST unsigned short cfgERR_NTP_SERVER; - _GLOBAL_CONST unsigned short cfgERR_DHCP_NO_DHCP_IP_OBTAINED; - _GLOBAL_CONST unsigned short cfgERR_WEBSERV_DISABLED; - _GLOBAL_CONST unsigned short cfgERR_SDM_DISABLED; - _GLOBAL_CONST unsigned short cfgERR_FUNCTION_NOT_FOUND; - _GLOBAL_CONST unsigned short cfgERR_CLEAR_NV_DATA; - _GLOBAL_CONST unsigned short cfgERR_SDM_FUNCTION_NOT_FOUND; - _GLOBAL_CONST unsigned short cfgERR_DHCP_CONFIG; - _GLOBAL_CONST unsigned short cfgERR_LEASE_TIMEOUT; - _GLOBAL_CONST unsigned short cfgERR_LEASE_EXISTS; - _GLOBAL_CONST unsigned short cfgERR_LEASES_BUFFER; - _GLOBAL_CONST unsigned short cfgERR_INTERFACELIST_BUFFER; - _GLOBAL_CONST unsigned short cfgERR_DHCP_SERVER_STARTED; - _GLOBAL_CONST unsigned short cfgERR_CIFS_DEFAULTPW_INVALID; - _GLOBAL_CONST unsigned short cfgERR_INANODE_NUMBER_SET; - _GLOBAL_CONST unsigned short cfgERR_CIFS_DEFAULTUSER_INVALID; - _GLOBAL_CONST unsigned short cfgERR_CIFS_DOMAIN_INVALID; - _GLOBAL_CONST unsigned short cfgERR_YEAR_INVALID; - _GLOBAL_CONST unsigned short cfgERR_TIMEZONE; - _GLOBAL_CONST unsigned short cfgERR_SYSTEM; - _GLOBAL_CONST unsigned short cfgERR_SNTP_INTERVAL; - _GLOBAL_CONST unsigned short cfgERR_SNTP_CLIENT; - _GLOBAL_CONST unsigned short cfgERR_SNTP_SERVER; - _GLOBAL_CONST unsigned short cfgERR_PARAM_NOT_SET; - _GLOBAL_CONST unsigned short cfgERR_FTP_SDOWN; - _GLOBAL_CONST unsigned short cfgERR_FTP_SINIT; - _GLOBAL_CONST unsigned short cfgERR_INANODE_NOT_SUPPORTED; - _GLOBAL_CONST unsigned short cfgERR_ARREG; - _GLOBAL_CONST unsigned short cfgERR_SET_NOT_POSSIBLE; - _GLOBAL_CONST unsigned short cfgERR_VALUE_INVALID; - _GLOBAL_CONST unsigned short cfgERR_OPTION_INVALID; - _GLOBAL_CONST unsigned short cfgERR_DEVICE_INVALID; - _GLOBAL_CONST unsigned short cfgERR_DEVICE_NOT_EXIST; -#endif - - - - /* Datatypes and datatypes of function blocks */ typedef struct cfgLease_typ { plcstring name[9]; @@ -358,22 +203,6 @@ typedef struct CfgGetBroadcastAddr plcbit enable; } CfgGetBroadcastAddr_typ; -typedef struct CfgSetBroadcastAddr -{ - /* VAR_INPUT (analog) */ - unsigned long pDevice; - unsigned long pBroadcastAddr; - unsigned long Option; - /* VAR_OUTPUT (analog) */ - unsigned short status; - /* VAR (analog) */ - unsigned short i_state; - unsigned short i_result; - unsigned long i_tmp; - /* VAR_INPUT (digital) */ - plcbit enable; -} CfgSetBroadcastAddr_typ; - typedef struct CfgGetEthBaudrate { /* VAR_INPUT (analog) */ @@ -528,23 +357,23 @@ typedef struct CfgSetFTPServer plcbit enable; } CfgSetFTPServer_typ; -typedef struct CfgGetTimeOffset +typedef struct CfgGetFTPServerPort { /* VAR_OUTPUT (analog) */ unsigned short status; - signed short timeoffset; + unsigned short port; /* VAR (analog) */ unsigned short i_state; unsigned short i_result; unsigned long i_tmp; /* VAR_INPUT (digital) */ plcbit enable; -} CfgGetTimeOffset_typ; +} CfgGetFTPServerPort_typ; -typedef struct CfgSetTimeOffset +typedef struct CfgSetFTPServerPort { /* VAR_INPUT (analog) */ - signed short timeoffset; + unsigned short port; unsigned long option; /* VAR_OUTPUT (analog) */ unsigned short status; @@ -554,72 +383,63 @@ typedef struct CfgSetTimeOffset unsigned long i_tmp; /* VAR_INPUT (digital) */ plcbit enable; -} CfgSetTimeOffset_typ; +} CfgSetFTPServerPort_typ; -typedef struct CfgSetSntpServer +typedef struct CfgGetFTPServerBaseDataPort { - /* VAR_INPUT (analog) */ - unsigned long start; - unsigned long option; /* VAR_OUTPUT (analog) */ unsigned short status; + unsigned short port; /* VAR (analog) */ unsigned short i_state; unsigned short i_result; unsigned long i_tmp; /* VAR_INPUT (digital) */ plcbit enable; -} CfgSetSntpServer_typ; +} CfgGetFTPServerBaseDataPort_typ; -typedef struct CfgSetSntpClient +typedef struct CfgSetFTPServerBaseDataPort { /* VAR_INPUT (analog) */ - unsigned long run; - unsigned long pServerAddr; - unsigned short sntpcInterval; - unsigned short rtcInterval; + unsigned short port; unsigned long option; /* VAR_OUTPUT (analog) */ unsigned short status; - unsigned char syncStatus; /* VAR (analog) */ unsigned short i_state; unsigned short i_result; unsigned long i_tmp; /* VAR_INPUT (digital) */ plcbit enable; -} CfgSetSntpClient_typ; +} CfgSetFTPServerBaseDataPort_typ; -typedef struct CfgGetSntpcData +typedef struct CfgGetTimeOffset { - /* VAR_INPUT (analog) */ - unsigned long pServerAddr; - unsigned char Len; /* VAR_OUTPUT (analog) */ unsigned short status; - unsigned long run; - unsigned short sntpcInterval; - unsigned short rtcInterval; + signed short timeoffset; /* VAR (analog) */ unsigned short i_state; unsigned short i_result; unsigned long i_tmp; /* VAR_INPUT (digital) */ plcbit enable; -} CfgGetSntpcData_typ; +} CfgGetTimeOffset_typ; -typedef struct CfgGetSntpsData +typedef struct CfgSetTimeOffset { + /* VAR_INPUT (analog) */ + signed short timeoffset; + unsigned long option; /* VAR_OUTPUT (analog) */ unsigned short status; - unsigned long run; /* VAR (analog) */ unsigned short i_state; unsigned short i_result; unsigned long i_tmp; /* VAR_INPUT (digital) */ plcbit enable; -} CfgGetSntpsData_typ; +} CfgSetTimeOffset_typ; typedef struct CfgSetNtpServer { @@ -1175,6 +995,25 @@ typedef struct CfgSetWebServerStatus plcbit enable; } CfgSetWebServerStatus_typ; +typedef struct CfgSetDns +{ + /* VAR_INPUT (analog) */ + unsigned short mode; + unsigned long pSuffix; + unsigned long pDnsAddr1; + unsigned long pDnsAddr2; + unsigned long pDnsAddr3; + unsigned long option; + /* VAR_OUTPUT (analog) */ + unsigned short status; + /* VAR (analog) */ + unsigned short i_state; + unsigned short i_result; + unsigned long i_tmp; + /* VAR_INPUT (digital) */ + plcbit enable; +} CfgSetDns_typ; + typedef struct CfgGetDnsMode { /* VAR_OUTPUT (analog) */ @@ -1298,6 +1137,89 @@ typedef struct CfgRouteDelete plcbit enable; } CfgRouteDelete_typ; +typedef struct CfgSetSnmpMode +{ + /* VAR_INPUT (analog) */ + unsigned long pDevice; + unsigned short mode; + unsigned long option; + /* VAR_OUTPUT (analog) */ + unsigned short status; + /* VAR (analog) */ + unsigned short i_state; + unsigned short i_result; + unsigned long i_tmp; + /* VAR_INPUT (digital) */ + plcbit enable; +} CfgSetSnmpMode_typ; + +typedef struct CfgGetSnmpMode +{ + /* VAR_INPUT (analog) */ + unsigned long pDevice; + /* VAR_OUTPUT (analog) */ + unsigned short status; + unsigned short mode; + /* VAR (analog) */ + unsigned short i_state; + unsigned short i_result; + unsigned long i_tmp; + /* VAR_INPUT (digital) */ + plcbit enable; +} CfgGetSnmpMode_typ; + +typedef struct CfgSetSnmpCredentials +{ + /* VAR_INPUT (analog) */ + unsigned long pDevice; + unsigned long pUserName; + unsigned long pAuthPassphrase; + unsigned long pPrivPassphrase; + unsigned long option; + /* VAR_OUTPUT (analog) */ + unsigned short status; + /* VAR (analog) */ + unsigned short i_state; + unsigned short i_result; + unsigned long i_tmp; + /* VAR_INPUT (digital) */ + plcbit enable; +} CfgSetSnmpCredentials_typ; + +typedef struct CfgSetNetworkInstallMode +{ + /* VAR_INPUT (analog) */ + unsigned long pDevice; + unsigned long netInstTimeout; + unsigned long option; + /* VAR_OUTPUT (analog) */ + unsigned short status; + /* VAR (analog) */ + unsigned short i_state; + unsigned short i_result; + unsigned long i_tmp; + /* VAR_INPUT (digital) */ + plcbit enable; + plcbit netInstEnable; +} CfgSetNetworkInstallMode_typ; + +typedef struct CfgGetNetworkInstallMode +{ + /* VAR_INPUT (analog) */ + unsigned long pDevice; + /* VAR_OUTPUT (analog) */ + unsigned short status; + unsigned long netInstTimeout; + /* VAR (analog) */ + unsigned short i_state; + unsigned short i_result; + unsigned long i_tmp; + /* VAR_INPUT (digital) */ + plcbit enable; + /* VAR_OUTPUT (digital) */ + plcbit netInstEnabled; +} CfgGetNetworkInstallMode_typ; + /* Prototyping of functions and function blocks */ @@ -1312,7 +1234,6 @@ _BUR_PUBLIC void CfgSetClusterIPAddr(struct CfgSetClusterIPAddr* inst); _BUR_PUBLIC void CfgGetDefaultGateway(struct CfgGetDefaultGateway* inst); _BUR_PUBLIC void CfgSetDefaultGateway(struct CfgSetDefaultGateway* inst); _BUR_PUBLIC void CfgGetBroadcastAddr(struct CfgGetBroadcastAddr* inst); -_BUR_PUBLIC void CfgSetBroadcastAddr(struct CfgSetBroadcastAddr* inst); _BUR_PUBLIC void CfgGetEthBaudrate(struct CfgGetEthBaudrate* inst); _BUR_PUBLIC void CfgSetEthBaudrate(struct CfgSetEthBaudrate* inst); _BUR_PUBLIC void CfgGetEthConfigMode(struct CfgGetEthConfigMode* inst); @@ -1323,12 +1244,12 @@ _BUR_PUBLIC void CfgGetHostNameIf(struct CfgGetHostNameIf* inst); _BUR_PUBLIC void CfgSetHostNameIf(struct CfgSetHostNameIf* inst); _BUR_PUBLIC void CfgGetMacAddr(struct CfgGetMacAddr* inst); _BUR_PUBLIC void CfgSetFTPServer(struct CfgSetFTPServer* inst); +_BUR_PUBLIC void CfgGetFTPServerPort(struct CfgGetFTPServerPort* inst); +_BUR_PUBLIC void CfgSetFTPServerPort(struct CfgSetFTPServerPort* inst); +_BUR_PUBLIC void CfgGetFTPServerBaseDataPort(struct CfgGetFTPServerBaseDataPort* inst); +_BUR_PUBLIC void CfgSetFTPServerBaseDataPort(struct CfgSetFTPServerBaseDataPort* inst); _BUR_PUBLIC void CfgGetTimeOffset(struct CfgGetTimeOffset* inst); _BUR_PUBLIC void CfgSetTimeOffset(struct CfgSetTimeOffset* inst); -_BUR_PUBLIC void CfgSetSntpServer(struct CfgSetSntpServer* inst); -_BUR_PUBLIC void CfgSetSntpClient(struct CfgSetSntpClient* inst); -_BUR_PUBLIC void CfgGetSntpcData(struct CfgGetSntpcData* inst); -_BUR_PUBLIC void CfgGetSntpsData(struct CfgGetSntpsData* inst); _BUR_PUBLIC void CfgSetNtpServer(struct CfgSetNtpServer* inst); _BUR_PUBLIC void CfgGetNtpsData(struct CfgGetNtpsData* inst); _BUR_PUBLIC void CfgSetNtpClient(struct CfgSetNtpClient* inst); @@ -1364,6 +1285,7 @@ _BUR_PUBLIC void CfgGetWebAspGoform(struct CfgGetWebAspGoform* inst); _BUR_PUBLIC void CfgSetWebAspGoform(struct CfgSetWebAspGoform* inst); _BUR_PUBLIC void CfgGetWebServerStatus(struct CfgGetWebServerStatus* inst); _BUR_PUBLIC void CfgSetWebServerStatus(struct CfgSetWebServerStatus* inst); +_BUR_PUBLIC void CfgSetDns(struct CfgSetDns* inst); _BUR_PUBLIC void CfgGetDnsMode(struct CfgGetDnsMode* inst); _BUR_PUBLIC void CfgSetDnsMode(struct CfgSetDnsMode* inst); _BUR_PUBLIC void CfgGetDnsSuffix(struct CfgGetDnsSuffix* inst); @@ -1372,9 +1294,176 @@ _BUR_PUBLIC void CfgGetDnsAddress(struct CfgGetDnsAddress* inst); _BUR_PUBLIC void CfgSetDnsAddress(struct CfgSetDnsAddress* inst); _BUR_PUBLIC void CfgRouteAdd(struct CfgRouteAdd* inst); _BUR_PUBLIC void CfgRouteDelete(struct CfgRouteDelete* inst); +_BUR_PUBLIC void CfgSetSnmpMode(struct CfgSetSnmpMode* inst); +_BUR_PUBLIC void CfgGetSnmpMode(struct CfgGetSnmpMode* inst); +_BUR_PUBLIC void CfgSetSnmpCredentials(struct CfgSetSnmpCredentials* inst); +_BUR_PUBLIC void CfgSetNetworkInstallMode(struct CfgSetNetworkInstallMode* inst); +_BUR_PUBLIC void CfgGetNetworkInstallMode(struct CfgGetNetworkInstallMode* inst); _BUR_PUBLIC unsigned short CfgClearNV(void); +/* Constants */ +#ifdef _REPLACE_CONST + #define cfgTIMEOUT_WAITFOREVER 4294967295U + #define cfgSNMP_MODE_READ_WRITE_SECURE 4U + #define cfgSNMP_MODE_READ_ONLY_SECURE 3U + #define cfgSNMP_MODE_READ_WRITE 2U + #define cfgSNMP_MODE_READ_ONLY 1U + #define cfgSNMP_MODE_DISABLED 0U + #define cfgDHCP_OPTION_CLIENT_ID 61U + #define cfgDHCP_OPTION_VENDOR_CLASS_ID 60U + #define cfgSDM_COLOR_DEFAULT 2147483648U + #define cfgSTATUS_NTP_INACTIVE 0U + #define cfgSTATUS_NTP_ACTIVE 1U + #define cfgNTP_STOP 0U + #define cfgNTP_START 1U + #define cfgOPTION_DNS_ON_DHCP 2U + #define cfgOPTION_DNS_ON_CONFIG 1U + #define cfgOPTION_DNS_OFF 0U + #define cfgWEB_MODE_ENABLED 1U + #define cfgWEB_MODE_DISABLED 0U + #define cfgWEB_MODE_MIME_ADD 1U + #define cfgWEB_MODE_MIME_DEL 0U + #define cfgWEB_MODE_GOFORM_NO_WRITE 2U + #define cfgWEB_MODE_GOFORM_ENABLE 1U + #define cfgWEB_MODE_GOFORM_DISABLE 0U + #define cfgSTATUS_SDM_DISABLED 2U + #define cfgSTATUS_SDM_ENABLED 1U + #define cfgOPTION_DISABLE_SDM 2U + #define cfgOPTION_ENABLE_SDM 1U + #define cfgOPTION_NON_WORKGROUP 0U + #define cfgOPTION_WORKGROUP 1U + #define cfgOPTION_ENABLE 1U + #define cfgOPTION_DISABLE 0U + #define cfgCONFIGMODE_DHCPCLIENT 1U + #define cfgCONFIGMODE_MANUALLY 0U + #define cfgOPTION_VOLATILE 0U + #define cfgOPTION_NON_VOLATILE 1U + #define cfgETHBAUDRATE_1000FD 1001U + #define cfgETHBAUDRATE_100AUTO 102U + #define cfgETHBAUDRATE_100FD 101U + #define cfgETHBAUDRATE_100 100U + #define cfgETHBAUDRATE_10AUTO 12U + #define cfgETHBAUDRATE_10FD 11U + #define cfgETHBAUDRATE_10 10U + #define cfgETHBAUDRATE_AUTO 0U + #define cfgERR_PORT_INVALID 29036U + #define cfgERR_DST 29035U + #define cfgERR_ROUTE_TABLE 29034U + #define cfgERR_NTP_CLIENT 29033U + #define cfgERR_NTP_SERVER 29032U + #define cfgERR_DHCP_NO_DHCP_IP_OBTAINED 29031U + #define cfgERR_WEBSERV_DISABLED 29030U + #define cfgERR_SDM_DISABLED 29029U + #define cfgERR_FUNCTION_NOT_FOUND 29028U + #define cfgERR_CLEAR_NV_DATA 29027U + #define cfgERR_SDM_FUNCTION_NOT_FOUND 29026U + #define cfgERR_DHCP_CONFIG 29025U + #define cfgERR_LEASE_TIMEOUT 29024U + #define cfgERR_LEASE_EXISTS 29023U + #define cfgERR_LEASES_BUFFER 29022U + #define cfgERR_INTERFACELIST_BUFFER 29021U + #define cfgERR_DHCP_SERVER_STARTED 29020U + #define cfgERR_CIFS_DEFAULTPW_INVALID 29019U + #define cfgERR_INANODE_NUMBER_SET 29018U + #define cfgERR_CIFS_DEFAULTUSER_INVALID 29017U + #define cfgERR_CIFS_DOMAIN_INVALID 29016U + #define cfgERR_YEAR_INVALID 29015U + #define cfgERR_TIMEZONE 29014U + #define cfgERR_SYSTEM 29013U + #define cfgERR_PARAM_NOT_SET 29009U + #define cfgERR_FTP_SDOWN 29008U + #define cfgERR_FTP_SINIT 29007U + #define cfgERR_INANODE_NOT_SUPPORTED 29006U + #define cfgERR_ARREG 29005U + #define cfgERR_SET_NOT_POSSIBLE 29004U + #define cfgERR_VALUE_INVALID 29003U + #define cfgERR_OPTION_INVALID 29002U + #define cfgERR_DEVICE_INVALID 29001U + #define cfgERR_DEVICE_NOT_EXIST 29000U +#else + _GLOBAL_CONST unsigned long cfgTIMEOUT_WAITFOREVER; + _GLOBAL_CONST unsigned short cfgSNMP_MODE_READ_WRITE_SECURE; + _GLOBAL_CONST unsigned short cfgSNMP_MODE_READ_ONLY_SECURE; + _GLOBAL_CONST unsigned short cfgSNMP_MODE_READ_WRITE; + _GLOBAL_CONST unsigned short cfgSNMP_MODE_READ_ONLY; + _GLOBAL_CONST unsigned short cfgSNMP_MODE_DISABLED; + _GLOBAL_CONST unsigned char cfgDHCP_OPTION_CLIENT_ID; + _GLOBAL_CONST unsigned char cfgDHCP_OPTION_VENDOR_CLASS_ID; + _GLOBAL_CONST unsigned long cfgSDM_COLOR_DEFAULT; + _GLOBAL_CONST unsigned short cfgSTATUS_NTP_INACTIVE; + _GLOBAL_CONST unsigned short cfgSTATUS_NTP_ACTIVE; + _GLOBAL_CONST unsigned short cfgNTP_STOP; + _GLOBAL_CONST unsigned short cfgNTP_START; + _GLOBAL_CONST unsigned char cfgOPTION_DNS_ON_DHCP; + _GLOBAL_CONST unsigned char cfgOPTION_DNS_ON_CONFIG; + _GLOBAL_CONST unsigned char cfgOPTION_DNS_OFF; + _GLOBAL_CONST unsigned short cfgWEB_MODE_ENABLED; + _GLOBAL_CONST unsigned short cfgWEB_MODE_DISABLED; + _GLOBAL_CONST unsigned short cfgWEB_MODE_MIME_ADD; + _GLOBAL_CONST unsigned short cfgWEB_MODE_MIME_DEL; + _GLOBAL_CONST unsigned short cfgWEB_MODE_GOFORM_NO_WRITE; + _GLOBAL_CONST unsigned short cfgWEB_MODE_GOFORM_ENABLE; + _GLOBAL_CONST unsigned short cfgWEB_MODE_GOFORM_DISABLE; + _GLOBAL_CONST unsigned char cfgSTATUS_SDM_DISABLED; + _GLOBAL_CONST unsigned char cfgSTATUS_SDM_ENABLED; + _GLOBAL_CONST unsigned char cfgOPTION_DISABLE_SDM; + _GLOBAL_CONST unsigned char cfgOPTION_ENABLE_SDM; + _GLOBAL_CONST unsigned char cfgOPTION_NON_WORKGROUP; + _GLOBAL_CONST unsigned char cfgOPTION_WORKGROUP; + _GLOBAL_CONST unsigned long cfgOPTION_ENABLE; + _GLOBAL_CONST unsigned long cfgOPTION_DISABLE; + _GLOBAL_CONST unsigned long cfgCONFIGMODE_DHCPCLIENT; + _GLOBAL_CONST unsigned long cfgCONFIGMODE_MANUALLY; + _GLOBAL_CONST unsigned long cfgOPTION_VOLATILE; + _GLOBAL_CONST unsigned long cfgOPTION_NON_VOLATILE; + _GLOBAL_CONST unsigned long cfgETHBAUDRATE_1000FD; + _GLOBAL_CONST unsigned long cfgETHBAUDRATE_100AUTO; + _GLOBAL_CONST unsigned long cfgETHBAUDRATE_100FD; + _GLOBAL_CONST unsigned long cfgETHBAUDRATE_100; + _GLOBAL_CONST unsigned long cfgETHBAUDRATE_10AUTO; + _GLOBAL_CONST unsigned long cfgETHBAUDRATE_10FD; + _GLOBAL_CONST unsigned long cfgETHBAUDRATE_10; + _GLOBAL_CONST unsigned long cfgETHBAUDRATE_AUTO; + _GLOBAL_CONST unsigned short cfgERR_PORT_INVALID; + _GLOBAL_CONST unsigned short cfgERR_DST; + _GLOBAL_CONST unsigned short cfgERR_ROUTE_TABLE; + _GLOBAL_CONST unsigned short cfgERR_NTP_CLIENT; + _GLOBAL_CONST unsigned short cfgERR_NTP_SERVER; + _GLOBAL_CONST unsigned short cfgERR_DHCP_NO_DHCP_IP_OBTAINED; + _GLOBAL_CONST unsigned short cfgERR_WEBSERV_DISABLED; + _GLOBAL_CONST unsigned short cfgERR_SDM_DISABLED; + _GLOBAL_CONST unsigned short cfgERR_FUNCTION_NOT_FOUND; + _GLOBAL_CONST unsigned short cfgERR_CLEAR_NV_DATA; + _GLOBAL_CONST unsigned short cfgERR_SDM_FUNCTION_NOT_FOUND; + _GLOBAL_CONST unsigned short cfgERR_DHCP_CONFIG; + _GLOBAL_CONST unsigned short cfgERR_LEASE_TIMEOUT; + _GLOBAL_CONST unsigned short cfgERR_LEASE_EXISTS; + _GLOBAL_CONST unsigned short cfgERR_LEASES_BUFFER; + _GLOBAL_CONST unsigned short cfgERR_INTERFACELIST_BUFFER; + _GLOBAL_CONST unsigned short cfgERR_DHCP_SERVER_STARTED; + _GLOBAL_CONST unsigned short cfgERR_CIFS_DEFAULTPW_INVALID; + _GLOBAL_CONST unsigned short cfgERR_INANODE_NUMBER_SET; + _GLOBAL_CONST unsigned short cfgERR_CIFS_DEFAULTUSER_INVALID; + _GLOBAL_CONST unsigned short cfgERR_CIFS_DOMAIN_INVALID; + _GLOBAL_CONST unsigned short cfgERR_YEAR_INVALID; + _GLOBAL_CONST unsigned short cfgERR_TIMEZONE; + _GLOBAL_CONST unsigned short cfgERR_SYSTEM; + _GLOBAL_CONST unsigned short cfgERR_PARAM_NOT_SET; + _GLOBAL_CONST unsigned short cfgERR_FTP_SDOWN; + _GLOBAL_CONST unsigned short cfgERR_FTP_SINIT; + _GLOBAL_CONST unsigned short cfgERR_INANODE_NOT_SUPPORTED; + _GLOBAL_CONST unsigned short cfgERR_ARREG; + _GLOBAL_CONST unsigned short cfgERR_SET_NOT_POSSIBLE; + _GLOBAL_CONST unsigned short cfgERR_VALUE_INVALID; + _GLOBAL_CONST unsigned short cfgERR_OPTION_INVALID; + _GLOBAL_CONST unsigned short cfgERR_DEVICE_INVALID; + _GLOBAL_CONST unsigned short cfgERR_DEVICE_NOT_EXIST; +#endif + + + + #ifdef __cplusplus }; #endif diff --git a/example/AsProject/Logical/Libraries/_AS/AsARCfg/binary.lby b/example/AsProject/Logical/Libraries/_AS/AsARCfg/binary.lby index 4bc908a..e296426 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsARCfg/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/AsARCfg/binary.lby @@ -1,12 +1,12 @@ - - - - - AsARCfg.fun - AsARCfg.typ - AsARCfg.var - - - - - \ No newline at end of file + + + + + AsARCfg.fun + AsARCfg.typ + AsARCfg.var + + + + + diff --git a/example/AsProject/Logical/Libraries/_AS/AsArLog/AsArLog.fun b/example/AsProject/Logical/Libraries/_AS/AsArLog/AsArLog.fun deleted file mode 100644 index 9b8af9b..0000000 --- a/example/AsProject/Logical/Libraries/_AS/AsArLog/AsArLog.fun +++ /dev/null @@ -1,124 +0,0 @@ - -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK AsArLogCreate (*creates an AR logger user module; asynchronous execution*) - VAR_INPUT - enable : BOOL; (*enables execution*) - pName : UDINT; (*name of the AR logger user module to be created give as a pointer, e.g. "vclog".*) - len : UDINT; (*length of the log data area*) - memType : UDINT; (*memory type on the target: arlogDRAM, arlogUSRRAM, arlogUSRROM*) - END_VAR - - VAR - intResult : UDINT; (*internal variable*) - intState : UDINT; (*internal variable*) - intRes : UDINT; (*internal variable*) - END_VAR - - VAR_OUTPUT - status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*) - ident : UDINT; (*ident of the AR logger basis module to be generated*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK AsArLogDelete (*deletes an AR logger user module; asynchronous execution*) - VAR_INPUT - enable : BOOL; (*enables execution*) - ident : UDINT; (*ident of the AR logger user module to be deleted*) - END_VAR - - VAR - intResult : UDINT; (*internal variable*) - intState : UDINT; (*internal variable*) - intRes : UDINT; (*internal variable*) - END_VAR - - VAR_OUTPUT - status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK AsArLogWrite (*writes a log entry to a AR logger user module; asynchronous execution*) - VAR_INPUT - enable : BOOL; (*enables execution*) - ident : UDINT; (*ident for the AR logger module to be written (user module or base module)*) - logLevel : UDINT; (*log level of the log entry*) - errornr : UDINT; (*error number of the entry*) - mem : UDINT; (*binary log data given as a pointer*) - len : UDINT; (*length of the binary log data in bytes*) - asciiString : UDINT; (*log-specific zero-terminated ASCII string give as a pointer*) - END_VAR - - VAR - intResult : UDINT; (*internal variable*) - intState : UDINT; (*internal variable*) - intRes : UDINT; (*internal variable*) - intTaskName : ARRAY[0..35] OF USINT; (*internal variable*) - intRtkTime : ARRAY[0..3] OF UDINT; (*internal variable*) - END_VAR - - VAR_OUTPUT - status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK AsArLogRead (*reads a log entry from a AR logger module; asynchronous execution*) - VAR_INPUT - enable : BOOL; (*enables execution*) - ident : UDINT; (*ident for the AR logger module to be read (user module or base module)*) - index : UDINT; (*index of the log entry to be read*) - arlogRead : UDINT; (*specifies read structure (given as a pointer) where the header data for the log entry can be copied*) - memBin : UDINT; (*buffer for binary log data given as a pointer (if NULL, no binary log data is copied)*) - lenBin : UDINT; (*number of binary log data bytes to be read (if NULL, no binary log data is copied)*) - memAscii : UDINT; (*buffer for ASCII string given as a pointer*) - lenAscii : UDINT; (*number of bytes to be read for the ASCII string*) - END_VAR - - VAR - intResult : UDINT; (*internal variable*) - intState : UDINT; (*internal variable*) - intRes : UDINT; (*internal variable*) - END_VAR - - VAR_OUTPUT - status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK AsArLogClear (*deletes or reinitializes the log data in an AR logger user module; asynchronous execution*) - VAR_INPUT - enable : BOOL; (*enables execution*) - ident : UDINT; (*ident of the AR logger user module to be reinitialized*) - END_VAR - - VAR - intResult : UDINT; (*internal variable*) - intState : UDINT; (*internal variable*) - intRes : UDINT; (*internal variable*) - END_VAR - - VAR_OUTPUT - status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK AsArLogGetInfo (*reads information from a self-generated AR logger user module or AR logger base user module*) - VAR_INPUT - enable : BOOL; (*enables execution*) - pName : UDINT; (*name of the AR logger user module (e.g. "vclog") given as a pointer*) - END_VAR - - VAR - intResult : UDINT; (*internal variable*) - intState : UDINT; (*internal variable*) - intRes : UDINT; (*internal variable*) - END_VAR - - VAR_OUTPUT - status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*) - ident : UDINT; (*ident of the AR logger BR module*) - len : UDINT; (*length of the log data area*) - memType : UDINT; (*memory type on the target*) - actualIndex : UDINT; (*current entry index in the specified AR logger BR module*) - FormatVer : UDINT; (*version of de log data format*) - - END_VAR -END_FUNCTION_BLOCK diff --git a/example/AsProject/Logical/Libraries/_AS/AsArLog/AsArLog.typ b/example/AsProject/Logical/Libraries/_AS/AsArLog/AsArLog.typ deleted file mode 100644 index 3b58b4f..0000000 --- a/example/AsProject/Logical/Libraries/_AS/AsArLog/AsArLog.typ +++ /dev/null @@ -1,20 +0,0 @@ - - TYPE - asarlogRead : STRUCT - len : UDINT; (*length of the entire log entry (header + binary log data + ASCII string)*) - lenBin : UDINT; (*length of the binary log data*) - lenAscii : UDINT; (*length of the ASCII log data*) - logLevel : UDINT; (*log level of the log entry*) - errornr : UDINT; (*error number of the entry*) - taskName : ARRAY[0..35] OF USINT; (*task name*) - errYear : UDINT; (*year (date of error)*) - errMonth : UDINT; (*month (date of error)*) - errDay : UDINT; (*day (date of error)*) - errHour : UDINT; (*hour (time of error)*) - errMinute : UDINT; (*minute (time of error)*) - errSecond : UDINT; (*second (time of error)*) - errMilliSec : UDINT; (*millisecond (time of error)*) - errMicroSec : UDINT; (*microsecond (time of error)*) - END_STRUCT; -END_TYPE - diff --git a/example/AsProject/Logical/Libraries/_AS/AsArLog/AsArLog.var b/example/AsProject/Logical/Libraries/_AS/AsArLog/AsArLog.var deleted file mode 100644 index 431a54f..0000000 --- a/example/AsProject/Logical/Libraries/_AS/AsArLog/AsArLog.var +++ /dev/null @@ -1,45 +0,0 @@ - - VAR CONSTANT - arlogDRAM : USINT := 65; (*temporary AR log modules (DRAM)*) - arlogUSRRAM : USINT := 3; (*USERRAM*) - arlogUSRROM : USINT := 2; (*USERROM (USER FLASH)*) - - arlogLEVEL_INFO : UDINT := 1; (*log level INFO*) - arlogLEVEL_WARNING : UDINT := 2; (*log level WARNING*) - arlogLEVEL_FATAL : UDINT := 3; (*log level FATAL*) - - arlogMIN_LOGDATA_SIZE : UINT := 4096; (*minimum log data size of 4 KB*) - - arlogBASE_SYSTEM_LOG_IDENT : UDINT := 0; (*fixed ID for the "$arlogsys" base system module*) - arlogBASE_USER_LOG_IDENT : UDINT := 1; (*fixed ID for the "$arlogusr" base user module*) - arlogBASE_FIELDBUS_LOG_IDENT : UDINT := 2; (*fixed ID for the "fieldbus" logger module*) - arlogBASE_SAFETY_LOG_IDENT : UDINT := 3; (*fixed ID for the "safety" logger module*) - arlogBASE_REDUND_LOG_IDENT : UDINT := 4; (*fixed ID for the "redund" logger module*) - - arlogERR_ILL_NAME : UINT := 31400; (*incorrect or invalid name*) - arlogERR_ILL_MEMTYPE : UINT := 31401; (*incorrect memory type*) - arlogERR_ILL_LOGLEVEL : UINT := 31402; (*invalid log level (only arlogLEVEL_INFO, arlogLEVEL_WARNING, and arlogLEVEL_FATAL valid)*) - arlogERR_ILL_PARAM : UINT := 31403; (*invalid parameters specified*) - arlogERR_ILL_LEN : UINT := 31404; (*incorrect log data length. Must be >= arlogMIN_LOGDATA_SIZE (4096 bytes)*) - arlogERR_EXISTING : UINT := 31405; (*log module already exists*) - arlogERR_CREATE : UINT := 31406; (*general create error (create failed)*) - arlogERR_INSTALL : UINT := 31407; (*install error for AsArLogCreate*) - arlogERR_ACCESS_DENIED : UINT := 31408; (*cannot access the "$arlogsys" and "$arlogusr" base log modules*) - arlogERR_IN_ACCESS : UINT := 31409; (*access denied since other critical FBK simultaneously active*) - arlogERR_INVALID_IDENT : UINT := 31410; (*invalid ident specified*) - arlogERR_DELETE : UINT := 31411; (*general delete error (delete failed)*) - - arlogERR_NOMEMORY : UINT := 31412; (*not enough buffer to copy*) - arlogERR_NOTEXISTING : UINT := 31416; (*AR log module doesn't exist*) - - arlogERR_WRITE : UINT := 31417; (*general write error (write failed)*) - arlogERR_WRITE_CALC_DATA : UINT := 31418; (*error calculating referencing index*) - - arlogERR_READ : UINT := 31419; (*general read error (read failed)*) - arlogERR_READ_BUFFER : UINT := 31420; (*invalid buffer specified*) - arlogERR_INVALID_INDEX : UINT := 31421; (*invalid index (smaller than the reference index and larger than the current index)*) - arlogERR_INVALID_ENTRY : UINT := 31422; (*invalid log entry read*) - arlogERR_READ_BINARY_BUFFER : UINT := 31423; (*buffer length for binary data too small*) - arlogERR_READ_ASCII_BUFFER : UINT := 31424; (*buffer length for ASCII data too small*) - arlogERR_NO_MORE_ENTRY : UINT := 31425; (*FBK still working*) -END_VAR diff --git a/example/AsProject/Logical/Libraries/_AS/AsArLog/SG4/AsArLog.h b/example/AsProject/Logical/Libraries/_AS/AsArLog/SG4/AsArLog.h deleted file mode 100644 index cfcfebc..0000000 --- a/example/AsProject/Logical/Libraries/_AS/AsArLog/SG4/AsArLog.h +++ /dev/null @@ -1,237 +0,0 @@ -/* Automation Studio generated header file */ -/* Do not edit ! */ - -#ifndef _ASARLOG_ -#define _ASARLOG_ -#ifdef __cplusplus -extern "C" -{ -#endif - -#include - -#include - -#ifndef _BUR_PUBLIC -#define _BUR_PUBLIC -#endif -/* Constants */ -#ifdef _REPLACE_CONST - #define arlogERR_NO_MORE_ENTRY 31425U - #define arlogERR_READ_ASCII_BUFFER 31424U - #define arlogERR_READ_BINARY_BUFFER 31423U - #define arlogERR_INVALID_ENTRY 31422U - #define arlogERR_INVALID_INDEX 31421U - #define arlogERR_READ_BUFFER 31420U - #define arlogERR_READ 31419U - #define arlogERR_WRITE_CALC_DATA 31418U - #define arlogERR_WRITE 31417U - #define arlogERR_NOTEXISTING 31416U - #define arlogERR_NOMEMORY 31412U - #define arlogERR_DELETE 31411U - #define arlogERR_INVALID_IDENT 31410U - #define arlogERR_IN_ACCESS 31409U - #define arlogERR_ACCESS_DENIED 31408U - #define arlogERR_INSTALL 31407U - #define arlogERR_CREATE 31406U - #define arlogERR_EXISTING 31405U - #define arlogERR_ILL_LEN 31404U - #define arlogERR_ILL_PARAM 31403U - #define arlogERR_ILL_LOGLEVEL 31402U - #define arlogERR_ILL_MEMTYPE 31401U - #define arlogERR_ILL_NAME 31400U - #define arlogBASE_REDUND_LOG_IDENT 4U - #define arlogBASE_SAFETY_LOG_IDENT 3U - #define arlogBASE_FIELDBUS_LOG_IDENT 2U - #define arlogBASE_USER_LOG_IDENT 1U - #define arlogBASE_SYSTEM_LOG_IDENT 0U - #define arlogMIN_LOGDATA_SIZE 4096U - #define arlogLEVEL_FATAL 3U - #define arlogLEVEL_WARNING 2U - #define arlogLEVEL_INFO 1U - #define arlogUSRROM 2U - #define arlogUSRRAM 3U - #define arlogDRAM 65U -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST unsigned short arlogERR_NO_MORE_ENTRY; - _GLOBAL_CONST unsigned short arlogERR_READ_ASCII_BUFFER; - _GLOBAL_CONST unsigned short arlogERR_READ_BINARY_BUFFER; - _GLOBAL_CONST unsigned short arlogERR_INVALID_ENTRY; - _GLOBAL_CONST unsigned short arlogERR_INVALID_INDEX; - _GLOBAL_CONST unsigned short arlogERR_READ_BUFFER; - _GLOBAL_CONST unsigned short arlogERR_READ; - _GLOBAL_CONST unsigned short arlogERR_WRITE_CALC_DATA; - _GLOBAL_CONST unsigned short arlogERR_WRITE; - _GLOBAL_CONST unsigned short arlogERR_NOTEXISTING; - _GLOBAL_CONST unsigned short arlogERR_NOMEMORY; - _GLOBAL_CONST unsigned short arlogERR_DELETE; - _GLOBAL_CONST unsigned short arlogERR_INVALID_IDENT; - _GLOBAL_CONST unsigned short arlogERR_IN_ACCESS; - _GLOBAL_CONST unsigned short arlogERR_ACCESS_DENIED; - _GLOBAL_CONST unsigned short arlogERR_INSTALL; - _GLOBAL_CONST unsigned short arlogERR_CREATE; - _GLOBAL_CONST unsigned short arlogERR_EXISTING; - _GLOBAL_CONST unsigned short arlogERR_ILL_LEN; - _GLOBAL_CONST unsigned short arlogERR_ILL_PARAM; - _GLOBAL_CONST unsigned short arlogERR_ILL_LOGLEVEL; - _GLOBAL_CONST unsigned short arlogERR_ILL_MEMTYPE; - _GLOBAL_CONST unsigned short arlogERR_ILL_NAME; - _GLOBAL_CONST unsigned long arlogBASE_REDUND_LOG_IDENT; - _GLOBAL_CONST unsigned long arlogBASE_SAFETY_LOG_IDENT; - _GLOBAL_CONST unsigned long arlogBASE_FIELDBUS_LOG_IDENT; - _GLOBAL_CONST unsigned long arlogBASE_USER_LOG_IDENT; - _GLOBAL_CONST unsigned long arlogBASE_SYSTEM_LOG_IDENT; - _GLOBAL_CONST unsigned short arlogMIN_LOGDATA_SIZE; - _GLOBAL_CONST unsigned long arlogLEVEL_FATAL; - _GLOBAL_CONST unsigned long arlogLEVEL_WARNING; - _GLOBAL_CONST unsigned long arlogLEVEL_INFO; - _GLOBAL_CONST unsigned char arlogUSRROM; - _GLOBAL_CONST unsigned char arlogUSRRAM; - _GLOBAL_CONST unsigned char arlogDRAM; -#endif - - - - -/* Datatypes and datatypes of function blocks */ -typedef struct asarlogRead -{ unsigned long len; - unsigned long lenBin; - unsigned long lenAscii; - unsigned long logLevel; - unsigned long errornr; - unsigned char taskName[36]; - unsigned long errYear; - unsigned long errMonth; - unsigned long errDay; - unsigned long errHour; - unsigned long errMinute; - unsigned long errSecond; - unsigned long errMilliSec; - unsigned long errMicroSec; -} asarlogRead; - -typedef struct AsArLogCreate -{ - /* VAR_INPUT (analog) */ - unsigned long pName; - unsigned long len; - unsigned long memType; - /* VAR_OUTPUT (analog) */ - unsigned short status; - unsigned long ident; - /* VAR (analog) */ - unsigned long intResult; - unsigned long intState; - unsigned long intRes; - /* VAR_INPUT (digital) */ - plcbit enable; -} AsArLogCreate_typ; - -typedef struct AsArLogDelete -{ - /* VAR_INPUT (analog) */ - unsigned long ident; - /* VAR_OUTPUT (analog) */ - unsigned short status; - /* VAR (analog) */ - unsigned long intResult; - unsigned long intState; - unsigned long intRes; - /* VAR_INPUT (digital) */ - plcbit enable; -} AsArLogDelete_typ; - -typedef struct AsArLogWrite -{ - /* VAR_INPUT (analog) */ - unsigned long ident; - unsigned long logLevel; - unsigned long errornr; - unsigned long mem; - unsigned long len; - unsigned long asciiString; - /* VAR_OUTPUT (analog) */ - unsigned short status; - /* VAR (analog) */ - unsigned long intResult; - unsigned long intState; - unsigned long intRes; - unsigned char intTaskName[36]; - unsigned long intRtkTime[4]; - /* VAR_INPUT (digital) */ - plcbit enable; -} AsArLogWrite_typ; - -typedef struct AsArLogRead -{ - /* VAR_INPUT (analog) */ - unsigned long ident; - unsigned long index; - unsigned long arlogRead; - unsigned long memBin; - unsigned long lenBin; - unsigned long memAscii; - unsigned long lenAscii; - /* VAR_OUTPUT (analog) */ - unsigned short status; - /* VAR (analog) */ - unsigned long intResult; - unsigned long intState; - unsigned long intRes; - /* VAR_INPUT (digital) */ - plcbit enable; -} AsArLogRead_typ; - -typedef struct AsArLogClear -{ - /* VAR_INPUT (analog) */ - unsigned long ident; - /* VAR_OUTPUT (analog) */ - unsigned short status; - /* VAR (analog) */ - unsigned long intResult; - unsigned long intState; - unsigned long intRes; - /* VAR_INPUT (digital) */ - plcbit enable; -} AsArLogClear_typ; - -typedef struct AsArLogGetInfo -{ - /* VAR_INPUT (analog) */ - unsigned long pName; - /* VAR_OUTPUT (analog) */ - unsigned short status; - unsigned long ident; - unsigned long len; - unsigned long memType; - unsigned long actualIndex; - unsigned long FormatVer; - /* VAR (analog) */ - unsigned long intResult; - unsigned long intState; - unsigned long intRes; - /* VAR_INPUT (digital) */ - plcbit enable; -} AsArLogGetInfo_typ; - - - -/* Prototyping of functions and function blocks */ -_BUR_PUBLIC void AsArLogCreate(struct AsArLogCreate* inst); -_BUR_PUBLIC void AsArLogDelete(struct AsArLogDelete* inst); -_BUR_PUBLIC void AsArLogWrite(struct AsArLogWrite* inst); -_BUR_PUBLIC void AsArLogRead(struct AsArLogRead* inst); -_BUR_PUBLIC void AsArLogClear(struct AsArLogClear* inst); -_BUR_PUBLIC void AsArLogGetInfo(struct AsArLogGetInfo* inst); - - -#ifdef __cplusplus -}; -#endif -#endif /* _ASARLOG_ */ - diff --git a/example/AsProject/Logical/Libraries/_AS/AsArLog/binary.lby b/example/AsProject/Logical/Libraries/_AS/AsArLog/binary.lby deleted file mode 100644 index e95ecab..0000000 --- a/example/AsProject/Logical/Libraries/_AS/AsArLog/binary.lby +++ /dev/null @@ -1,12 +0,0 @@ - - - - - AsArLog.fun - AsArLog.typ - AsArLog.var - - - - - \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/_AS/AsArProf/AsArProf.fun b/example/AsProject/Logical/Libraries/_AS/AsArProf/AsArProf.fun index e69b4b7..33e52f2 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsArProf/AsArProf.fun +++ b/example/AsProject/Logical/Libraries/_AS/AsArProf/AsArProf.fun @@ -162,8 +162,8 @@ END_FUNCTION_BLOCK {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK LogIdleShow (*shows the idle time; asynchronous execution*) VAR_INPUT enable : BOOL; (*enables execution*) - measurementPeriod : UDINT; (*period for measurement in ms range: 100 - 60000*) - measurementLevel : UDINT; (*level of idle measurement range: 1 - 189*) + measurementPeriod : UDINT; (*milliseconds in range (100 - 60000)*) + measurementLevel : UDINT; (*priority level in range (1 - 189)*) END_VAR VAR @@ -173,8 +173,23 @@ END_FUNCTION_BLOCK VAR_OUTPUT status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*) - totalTime : UDINT; (*total time of the measurement [s]*) - idleTime : UDINT; (*idle time during the measurement [s]*) - idleRate : UDINT; (*idle time during the measurement [%]*) + totalTime : UDINT; (*total time of the measurement in microseconds*) + idleTime : UDINT; (*idle time during the measurement in microseconds*) + idleRate : UDINT; (*idle time during the measurement in percent*) END_VAR END_FUNCTION_BLOCK + +{REDUND_OK} FUNCTION CpuGetNumberOfCores : UDINT (*get the number of cores of the CPU*) +END_FUNCTION + +{REDUND_OK} FUNCTION CpuGetLoadByCore : UDINT (*get the load of one CPU core. Range: 0..100*) + VAR_INPUT + core :UDINT; (*the number of the core, starting from 0 *) + END_VAR +END_FUNCTION + +{REDUND_OK} FUNCTION CpuIsCoreReserved : BOOL (*returns true when the core is reserved, and thus can only be used for specific IO tasks*) + VAR_INPUT + core :UDINT; (*the number of the core, starting from 0 *) + END_VAR +END_FUNCTION diff --git a/example/AsProject/Logical/Libraries/_AS/AsArProf/AsArProf.var b/example/AsProject/Logical/Libraries/_AS/AsArProf/AsArProf.var index e8490c6..d24e2d2 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsArProf/AsArProf.var +++ b/example/AsProject/Logical/Libraries/_AS/AsArProf/AsArProf.var @@ -78,6 +78,7 @@ VAR CONSTANT profERR_DATMODREAD : UINT := 31017; (*error read from data module*) profERR_NOTCYCCTX : UINT := 31018; (*error called outside of cyclic context*) profERR_DATMODINVALID : UINT := 31019; (*error invalid data module*) + profERR_VERSION_NOT_SUPPORTED : UINT := 31020; (*error version not supported*) profERR_PARAMETER : UINT := 31050; (*error fub parameter*) END_VAR diff --git a/example/AsProject/Logical/Libraries/_AS/AsArProf/SG4/AsArProf.h b/example/AsProject/Logical/Libraries/_AS/AsArProf/SG4/AsArProf.h index 74a1c8c..918c98f 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsArProf/SG4/AsArProf.h +++ b/example/AsProject/Logical/Libraries/_AS/AsArProf/SG4/AsArProf.h @@ -15,157 +15,6 @@ extern "C" #ifndef _BUR_PUBLIC #define _BUR_PUBLIC #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define profERR_PARAMETER 31050U - #define profERR_DATMODINVALID 31019U - #define profERR_NOTCYCCTX 31018U - #define profERR_DATMODREAD 31017U - #define profERR_STOP 31016U - #define profERR_START 31015U - #define profERR_DATMODSIZE 31014U - #define profERR_ARCHDELETE 31013U - #define profERR_ARCHCREATE 31012U - #define profERR_ARCHEXIST 31011U - #define profERR_NODATMOD 31010U - #define profERR_DATMODINSTALL 31009U - #define profERR_DEFMODREAD 31008U - #define profERR_DEFMODCREATE 31007U - #define profERR_SETUPBUFFER 31006U - #define profERR_CYCGETTAB 31005U - #define profERR_NOMEMORY 31004U - #define profERR_NOTR2R 31003U - #define profERR_NOTRUNNING 31002U - #define profERR_RUNNING 31001U - #define profERR_INACTIVE 31000U - #define profSTATE_R2R_MAN 9U - #define profSTATE_R2R 8U - #define profSTATE_READY 6U - #define profSTATE_RUNNING 5U - #define profSTATE_STOPPED 4U - #define profSTATE_ACTIVE 3U - #define profSTATE_INACTIVE 2U - #define profBKPLEVEL_SHUTDOWN 1U - #define profBKPLEVEL_EXCEPTION 0U - #define profMEMTYPE_USERRAM 3U - #define profMEMTYPE_USERROM 2U - #define profMEMTYPE_DRAM 65U - #define profLOGMOD_STARTUPINST 8U - #define profLOGMOD_NOAUTOSTART 4U - #define profLOGMOD_GETSTACK 2U - #define profLOGMOD_CONTINUOUS 1U - #define profLOGMOD_UNTILFULL 0U - #define profLOGGRP_ALL 4169007119U - #define profLOGGRP_TC 2013265920U - #define profLOGGRP_EXCP 786432U - #define profLOGGRP_SYSTEM 1179651U - #define profLOGGRP_USER 2147483660U - #define profLOGGRP_USEREVENT 2147483648U - #define profLOGGRP_TASKCLASS_CYCLIC 1073741824U - #define profLOGGRP_TASKCLASS_EXC 536870912U - #define profLOGGRP_TASKCLASS_EXITUP 268435456U - #define profLOGGRP_TASKCLASS_INITUP 134217728U - #define profLOGGRP_NMIEVENT 4194304U - #define profLOGGRP_SYSEVENT 2097152U - #define profLOGGRP_LOGGER 1048576U - #define profLOGGRP_PROCESSOR_EXC 524288U - #define profLOGGRP_SYSTEM_EXC 262144U - #define profLOGGRP_OS_TASK 131072U - #define profLOGGRP_LIB_FUNC 8U - #define profLOGGRP_TC_TASK 4U - #define profLOGGRP_IRQ_HANDLER 2U - #define profLOGGRP_TASK_SWITCH 1U - #define profARCHMOD_OPT_NODEL 8U - #define profARCHMOD_OPT_STOP 4U - #define profARCHMOD_OPT_FILE 2U - #define profARCHMOD_OPT_ERROR 1U - #define profUSER_EVENT_STOP 1U - #define profUSER_EVENT_START 0U - #define profUSER_EVENT_MAX 16777215U - #define profIDLE_MEAS_PERIOD_MIN 100U - #define profIDLE_MEAS_PERIOD_MAX 60000U - #define profIDLE_MEAS_LEVEL_3 189U - #define profIDLE_MEAS_LEVEL_2 50U - #define profIDLE_MEAS_LEVEL_1 1U -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST unsigned short profERR_PARAMETER; - _GLOBAL_CONST unsigned short profERR_DATMODINVALID; - _GLOBAL_CONST unsigned short profERR_NOTCYCCTX; - _GLOBAL_CONST unsigned short profERR_DATMODREAD; - _GLOBAL_CONST unsigned short profERR_STOP; - _GLOBAL_CONST unsigned short profERR_START; - _GLOBAL_CONST unsigned short profERR_DATMODSIZE; - _GLOBAL_CONST unsigned short profERR_ARCHDELETE; - _GLOBAL_CONST unsigned short profERR_ARCHCREATE; - _GLOBAL_CONST unsigned short profERR_ARCHEXIST; - _GLOBAL_CONST unsigned short profERR_NODATMOD; - _GLOBAL_CONST unsigned short profERR_DATMODINSTALL; - _GLOBAL_CONST unsigned short profERR_DEFMODREAD; - _GLOBAL_CONST unsigned short profERR_DEFMODCREATE; - _GLOBAL_CONST unsigned short profERR_SETUPBUFFER; - _GLOBAL_CONST unsigned short profERR_CYCGETTAB; - _GLOBAL_CONST unsigned short profERR_NOMEMORY; - _GLOBAL_CONST unsigned short profERR_NOTR2R; - _GLOBAL_CONST unsigned short profERR_NOTRUNNING; - _GLOBAL_CONST unsigned short profERR_RUNNING; - _GLOBAL_CONST unsigned short profERR_INACTIVE; - _GLOBAL_CONST unsigned char profSTATE_R2R_MAN; - _GLOBAL_CONST unsigned char profSTATE_R2R; - _GLOBAL_CONST unsigned char profSTATE_READY; - _GLOBAL_CONST unsigned char profSTATE_RUNNING; - _GLOBAL_CONST unsigned char profSTATE_STOPPED; - _GLOBAL_CONST unsigned char profSTATE_ACTIVE; - _GLOBAL_CONST unsigned char profSTATE_INACTIVE; - _GLOBAL_CONST unsigned long profBKPLEVEL_SHUTDOWN; - _GLOBAL_CONST unsigned long profBKPLEVEL_EXCEPTION; - _GLOBAL_CONST unsigned long profMEMTYPE_USERRAM; - _GLOBAL_CONST unsigned long profMEMTYPE_USERROM; - _GLOBAL_CONST unsigned long profMEMTYPE_DRAM; - _GLOBAL_CONST unsigned long profLOGMOD_STARTUPINST; - _GLOBAL_CONST unsigned long profLOGMOD_NOAUTOSTART; - _GLOBAL_CONST unsigned long profLOGMOD_GETSTACK; - _GLOBAL_CONST unsigned long profLOGMOD_CONTINUOUS; - _GLOBAL_CONST unsigned long profLOGMOD_UNTILFULL; - _GLOBAL_CONST unsigned long profLOGGRP_ALL; - _GLOBAL_CONST unsigned long profLOGGRP_TC; - _GLOBAL_CONST unsigned long profLOGGRP_EXCP; - _GLOBAL_CONST unsigned long profLOGGRP_SYSTEM; - _GLOBAL_CONST unsigned long profLOGGRP_USER; - _GLOBAL_CONST unsigned long profLOGGRP_USEREVENT; - _GLOBAL_CONST unsigned long profLOGGRP_TASKCLASS_CYCLIC; - _GLOBAL_CONST unsigned long profLOGGRP_TASKCLASS_EXC; - _GLOBAL_CONST unsigned long profLOGGRP_TASKCLASS_EXITUP; - _GLOBAL_CONST unsigned long profLOGGRP_TASKCLASS_INITUP; - _GLOBAL_CONST unsigned long profLOGGRP_NMIEVENT; - _GLOBAL_CONST unsigned long profLOGGRP_SYSEVENT; - _GLOBAL_CONST unsigned long profLOGGRP_LOGGER; - _GLOBAL_CONST unsigned long profLOGGRP_PROCESSOR_EXC; - _GLOBAL_CONST unsigned long profLOGGRP_SYSTEM_EXC; - _GLOBAL_CONST unsigned long profLOGGRP_OS_TASK; - _GLOBAL_CONST unsigned long profLOGGRP_LIB_FUNC; - _GLOBAL_CONST unsigned long profLOGGRP_TC_TASK; - _GLOBAL_CONST unsigned long profLOGGRP_IRQ_HANDLER; - _GLOBAL_CONST unsigned long profLOGGRP_TASK_SWITCH; - _GLOBAL_CONST unsigned long profARCHMOD_OPT_NODEL; - _GLOBAL_CONST unsigned long profARCHMOD_OPT_STOP; - _GLOBAL_CONST unsigned long profARCHMOD_OPT_FILE; - _GLOBAL_CONST unsigned long profARCHMOD_OPT_ERROR; - _GLOBAL_CONST unsigned long profUSER_EVENT_STOP; - _GLOBAL_CONST unsigned long profUSER_EVENT_START; - _GLOBAL_CONST unsigned long profUSER_EVENT_MAX; - _GLOBAL_CONST unsigned long profIDLE_MEAS_PERIOD_MIN; - _GLOBAL_CONST unsigned long profIDLE_MEAS_PERIOD_MAX; - _GLOBAL_CONST unsigned long profIDLE_MEAS_LEVEL_3; - _GLOBAL_CONST unsigned long profIDLE_MEAS_LEVEL_2; - _GLOBAL_CONST unsigned long profIDLE_MEAS_LEVEL_1; -#endif - - - - /* Datatypes and datatypes of function blocks */ typedef struct PROFILER_DEFINITION { unsigned long logGroup; @@ -351,6 +200,159 @@ _BUR_PUBLIC void LogStart(struct LogStart* inst); _BUR_PUBLIC void LogStop(struct LogStop* inst); _BUR_PUBLIC void LogEvent(struct LogEvent* inst); _BUR_PUBLIC void LogIdleShow(struct LogIdleShow* inst); +_BUR_PUBLIC unsigned long CpuGetNumberOfCores(void); +_BUR_PUBLIC unsigned long CpuGetLoadByCore(unsigned long core); +_BUR_PUBLIC plcbit CpuIsCoreReserved(unsigned long core); + + +/* Constants */ +#ifdef _REPLACE_CONST + #define profERR_PARAMETER 31050U + #define profERR_VERSION_NOT_SUPPORTED 31020U + #define profERR_DATMODINVALID 31019U + #define profERR_NOTCYCCTX 31018U + #define profERR_DATMODREAD 31017U + #define profERR_STOP 31016U + #define profERR_START 31015U + #define profERR_DATMODSIZE 31014U + #define profERR_ARCHDELETE 31013U + #define profERR_ARCHCREATE 31012U + #define profERR_ARCHEXIST 31011U + #define profERR_NODATMOD 31010U + #define profERR_DATMODINSTALL 31009U + #define profERR_DEFMODREAD 31008U + #define profERR_DEFMODCREATE 31007U + #define profERR_SETUPBUFFER 31006U + #define profERR_CYCGETTAB 31005U + #define profERR_NOMEMORY 31004U + #define profERR_NOTR2R 31003U + #define profERR_NOTRUNNING 31002U + #define profERR_RUNNING 31001U + #define profERR_INACTIVE 31000U + #define profSTATE_R2R_MAN 9U + #define profSTATE_R2R 8U + #define profSTATE_READY 6U + #define profSTATE_RUNNING 5U + #define profSTATE_STOPPED 4U + #define profSTATE_ACTIVE 3U + #define profSTATE_INACTIVE 2U + #define profBKPLEVEL_SHUTDOWN 1U + #define profBKPLEVEL_EXCEPTION 0U + #define profMEMTYPE_USERRAM 3U + #define profMEMTYPE_USERROM 2U + #define profMEMTYPE_DRAM 65U + #define profLOGMOD_STARTUPINST 8U + #define profLOGMOD_NOAUTOSTART 4U + #define profLOGMOD_GETSTACK 2U + #define profLOGMOD_CONTINUOUS 1U + #define profLOGMOD_UNTILFULL 0U + #define profLOGGRP_ALL 4169007119U + #define profLOGGRP_TC 2013265920U + #define profLOGGRP_EXCP 786432U + #define profLOGGRP_SYSTEM 1179651U + #define profLOGGRP_USER 2147483660U + #define profLOGGRP_USEREVENT 2147483648U + #define profLOGGRP_TASKCLASS_CYCLIC 1073741824U + #define profLOGGRP_TASKCLASS_EXC 536870912U + #define profLOGGRP_TASKCLASS_EXITUP 268435456U + #define profLOGGRP_TASKCLASS_INITUP 134217728U + #define profLOGGRP_NMIEVENT 4194304U + #define profLOGGRP_SYSEVENT 2097152U + #define profLOGGRP_LOGGER 1048576U + #define profLOGGRP_PROCESSOR_EXC 524288U + #define profLOGGRP_SYSTEM_EXC 262144U + #define profLOGGRP_OS_TASK 131072U + #define profLOGGRP_LIB_FUNC 8U + #define profLOGGRP_TC_TASK 4U + #define profLOGGRP_IRQ_HANDLER 2U + #define profLOGGRP_TASK_SWITCH 1U + #define profARCHMOD_OPT_NODEL 8U + #define profARCHMOD_OPT_STOP 4U + #define profARCHMOD_OPT_FILE 2U + #define profARCHMOD_OPT_ERROR 1U + #define profUSER_EVENT_STOP 1U + #define profUSER_EVENT_START 0U + #define profUSER_EVENT_MAX 16777215U + #define profIDLE_MEAS_PERIOD_MIN 100U + #define profIDLE_MEAS_PERIOD_MAX 60000U + #define profIDLE_MEAS_LEVEL_3 189U + #define profIDLE_MEAS_LEVEL_2 50U + #define profIDLE_MEAS_LEVEL_1 1U +#else + _GLOBAL_CONST unsigned short profERR_PARAMETER; + _GLOBAL_CONST unsigned short profERR_VERSION_NOT_SUPPORTED; + _GLOBAL_CONST unsigned short profERR_DATMODINVALID; + _GLOBAL_CONST unsigned short profERR_NOTCYCCTX; + _GLOBAL_CONST unsigned short profERR_DATMODREAD; + _GLOBAL_CONST unsigned short profERR_STOP; + _GLOBAL_CONST unsigned short profERR_START; + _GLOBAL_CONST unsigned short profERR_DATMODSIZE; + _GLOBAL_CONST unsigned short profERR_ARCHDELETE; + _GLOBAL_CONST unsigned short profERR_ARCHCREATE; + _GLOBAL_CONST unsigned short profERR_ARCHEXIST; + _GLOBAL_CONST unsigned short profERR_NODATMOD; + _GLOBAL_CONST unsigned short profERR_DATMODINSTALL; + _GLOBAL_CONST unsigned short profERR_DEFMODREAD; + _GLOBAL_CONST unsigned short profERR_DEFMODCREATE; + _GLOBAL_CONST unsigned short profERR_SETUPBUFFER; + _GLOBAL_CONST unsigned short profERR_CYCGETTAB; + _GLOBAL_CONST unsigned short profERR_NOMEMORY; + _GLOBAL_CONST unsigned short profERR_NOTR2R; + _GLOBAL_CONST unsigned short profERR_NOTRUNNING; + _GLOBAL_CONST unsigned short profERR_RUNNING; + _GLOBAL_CONST unsigned short profERR_INACTIVE; + _GLOBAL_CONST unsigned char profSTATE_R2R_MAN; + _GLOBAL_CONST unsigned char profSTATE_R2R; + _GLOBAL_CONST unsigned char profSTATE_READY; + _GLOBAL_CONST unsigned char profSTATE_RUNNING; + _GLOBAL_CONST unsigned char profSTATE_STOPPED; + _GLOBAL_CONST unsigned char profSTATE_ACTIVE; + _GLOBAL_CONST unsigned char profSTATE_INACTIVE; + _GLOBAL_CONST unsigned long profBKPLEVEL_SHUTDOWN; + _GLOBAL_CONST unsigned long profBKPLEVEL_EXCEPTION; + _GLOBAL_CONST unsigned long profMEMTYPE_USERRAM; + _GLOBAL_CONST unsigned long profMEMTYPE_USERROM; + _GLOBAL_CONST unsigned long profMEMTYPE_DRAM; + _GLOBAL_CONST unsigned long profLOGMOD_STARTUPINST; + _GLOBAL_CONST unsigned long profLOGMOD_NOAUTOSTART; + _GLOBAL_CONST unsigned long profLOGMOD_GETSTACK; + _GLOBAL_CONST unsigned long profLOGMOD_CONTINUOUS; + _GLOBAL_CONST unsigned long profLOGMOD_UNTILFULL; + _GLOBAL_CONST unsigned long profLOGGRP_ALL; + _GLOBAL_CONST unsigned long profLOGGRP_TC; + _GLOBAL_CONST unsigned long profLOGGRP_EXCP; + _GLOBAL_CONST unsigned long profLOGGRP_SYSTEM; + _GLOBAL_CONST unsigned long profLOGGRP_USER; + _GLOBAL_CONST unsigned long profLOGGRP_USEREVENT; + _GLOBAL_CONST unsigned long profLOGGRP_TASKCLASS_CYCLIC; + _GLOBAL_CONST unsigned long profLOGGRP_TASKCLASS_EXC; + _GLOBAL_CONST unsigned long profLOGGRP_TASKCLASS_EXITUP; + _GLOBAL_CONST unsigned long profLOGGRP_TASKCLASS_INITUP; + _GLOBAL_CONST unsigned long profLOGGRP_NMIEVENT; + _GLOBAL_CONST unsigned long profLOGGRP_SYSEVENT; + _GLOBAL_CONST unsigned long profLOGGRP_LOGGER; + _GLOBAL_CONST unsigned long profLOGGRP_PROCESSOR_EXC; + _GLOBAL_CONST unsigned long profLOGGRP_SYSTEM_EXC; + _GLOBAL_CONST unsigned long profLOGGRP_OS_TASK; + _GLOBAL_CONST unsigned long profLOGGRP_LIB_FUNC; + _GLOBAL_CONST unsigned long profLOGGRP_TC_TASK; + _GLOBAL_CONST unsigned long profLOGGRP_IRQ_HANDLER; + _GLOBAL_CONST unsigned long profLOGGRP_TASK_SWITCH; + _GLOBAL_CONST unsigned long profARCHMOD_OPT_NODEL; + _GLOBAL_CONST unsigned long profARCHMOD_OPT_STOP; + _GLOBAL_CONST unsigned long profARCHMOD_OPT_FILE; + _GLOBAL_CONST unsigned long profARCHMOD_OPT_ERROR; + _GLOBAL_CONST unsigned long profUSER_EVENT_STOP; + _GLOBAL_CONST unsigned long profUSER_EVENT_START; + _GLOBAL_CONST unsigned long profUSER_EVENT_MAX; + _GLOBAL_CONST unsigned long profIDLE_MEAS_PERIOD_MIN; + _GLOBAL_CONST unsigned long profIDLE_MEAS_PERIOD_MAX; + _GLOBAL_CONST unsigned long profIDLE_MEAS_LEVEL_3; + _GLOBAL_CONST unsigned long profIDLE_MEAS_LEVEL_2; + _GLOBAL_CONST unsigned long profIDLE_MEAS_LEVEL_1; +#endif + + #ifdef __cplusplus diff --git a/example/AsProject/Logical/Libraries/_AS/AsArProf/binary.lby b/example/AsProject/Logical/Libraries/_AS/AsArProf/binary.lby index 2340d8d..8b05418 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsArProf/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/AsArProf/binary.lby @@ -1,12 +1,12 @@ - - - - - AsArProf.fun - AsArProf.typ - AsArProf.var - - - - - \ No newline at end of file + + + + + AsArProf.fun + AsArProf.typ + AsArProf.var + + + + + diff --git a/example/AsProject/Logical/Libraries/_AS/AsBrMath/SG4/AsBrMath.h b/example/AsProject/Logical/Libraries/_AS/AsBrMath/SG4/AsBrMath.h index 9f300f2..bf95730 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsBrMath/SG4/AsBrMath.h +++ b/example/AsProject/Logical/Libraries/_AS/AsBrMath/SG4/AsBrMath.h @@ -13,6 +13,23 @@ extern "C" #ifndef _BUR_PUBLIC #define _BUR_PUBLIC #endif + + + +/* Prototyping of functions and function blocks */ +_BUR_PUBLIC float brmatan2(float y, float x); +_BUR_PUBLIC float brmceil(float x); +_BUR_PUBLIC float brmcosh(float x); +_BUR_PUBLIC float brmfloor(float x); +_BUR_PUBLIC float brmfmod(float x, float y); +_BUR_PUBLIC float brmfrexp(float x, unsigned long pExp); +_BUR_PUBLIC float brmldexp(float x, signed long exp_val); +_BUR_PUBLIC float brmmodf(float x, unsigned long plp); +_BUR_PUBLIC float brmpow(float x, float y); +_BUR_PUBLIC float brmsinh(float x); +_BUR_PUBLIC float brmtanh(float x); + + /* Constants */ #ifdef _REPLACE_CONST #define brmE 2.71828f @@ -38,9 +55,6 @@ extern "C" #define brmSQRT1_2 0.707107f #define brm2_SQRTPI 1.12838f #else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif _GLOBAL_CONST float brmE; _GLOBAL_CONST float brmPI; _GLOBAL_CONST float brmLN2; @@ -68,23 +82,6 @@ extern "C" - - - -/* Prototyping of functions and function blocks */ -_BUR_PUBLIC float brmatan2(float y, float x); -_BUR_PUBLIC float brmceil(float x); -_BUR_PUBLIC float brmcosh(float x); -_BUR_PUBLIC float brmfloor(float x); -_BUR_PUBLIC float brmfmod(float x, float y); -_BUR_PUBLIC float brmfrexp(float x, unsigned long pExp); -_BUR_PUBLIC float brmldexp(float x, signed long exp_val); -_BUR_PUBLIC float brmmodf(float x, unsigned long plp); -_BUR_PUBLIC float brmpow(float x, float y); -_BUR_PUBLIC float brmsinh(float x); -_BUR_PUBLIC float brmtanh(float x); - - #ifdef __cplusplus }; #endif diff --git a/example/AsProject/Logical/Libraries/_AS/AsBrMath/binary.lby b/example/AsProject/Logical/Libraries/_AS/AsBrMath/binary.lby index 8dd4678..6ef56b0 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsBrMath/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/AsBrMath/binary.lby @@ -1,9 +1,9 @@ - - - - - AsBrMath.fun - AsBrMath.typ - AsBrMath.var - - \ No newline at end of file + + + + + AsBrMath.fun + AsBrMath.typ + AsBrMath.var + + diff --git a/example/AsProject/Logical/Libraries/_AS/AsBrStr/binary.lby b/example/AsProject/Logical/Libraries/_AS/AsBrStr/binary.lby index a35ccfa..2090ed1 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsBrStr/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/AsBrStr/binary.lby @@ -1,9 +1,9 @@ - - - - - AsBrStr.fun - AsBrStr.typ - AsBrStr.var - - \ No newline at end of file + + + + + AsBrStr.fun + AsBrStr.typ + AsBrStr.var + + diff --git a/example/AsProject/Logical/Libraries/_AS/AsBrWStr/SG4/AsBrWStr.h b/example/AsProject/Logical/Libraries/_AS/AsBrWStr/SG4/AsBrWStr.h index c5606d2..de8088f 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsBrWStr/SG4/AsBrWStr.h +++ b/example/AsProject/Logical/Libraries/_AS/AsBrWStr/SG4/AsBrWStr.h @@ -13,21 +13,6 @@ extern "C" #ifndef _BUR_PUBLIC #define _BUR_PUBLIC #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define brwU8toUC 0U - #define brwUCtoU8 1U -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST unsigned char brwU8toUC; - _GLOBAL_CONST unsigned char brwUCtoU8; -#endif - - - - @@ -45,6 +30,18 @@ _BUR_PUBLIC unsigned long brwcsrchr(unsigned short* pDestination, unsigned short _BUR_PUBLIC unsigned long brwcschr(unsigned short* pDestination, unsigned short symbol); +/* Constants */ +#ifdef _REPLACE_CONST + #define brwU8toUC 0U + #define brwUCtoU8 1U +#else + _GLOBAL_CONST unsigned char brwU8toUC; + _GLOBAL_CONST unsigned char brwUCtoU8; +#endif + + + + #ifdef __cplusplus }; #endif diff --git a/example/AsProject/Logical/Libraries/_AS/AsBrWStr/binary.lby b/example/AsProject/Logical/Libraries/_AS/AsBrWStr/binary.lby index 9ba0810..de98f4d 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsBrWStr/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/AsBrWStr/binary.lby @@ -1,9 +1,9 @@ - - - - - AsBrWStr.fun - AsBrWStr.typ - AsBrWStr.var - - \ No newline at end of file + + + + + AsBrWStr.fun + AsBrWStr.typ + AsBrWStr.var + + diff --git a/example/AsProject/Logical/Libraries/_AS/AsDb/AsDb.fun b/example/AsProject/Logical/Libraries/_AS/AsDb/AsDb.fun deleted file mode 100644 index fc2597c..0000000 --- a/example/AsProject/Logical/Libraries/_AS/AsDb/AsDb.fun +++ /dev/null @@ -1,193 +0,0 @@ - -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK dbConnect (*connects to an existing database; asynchronous execution*) - VAR_INPUT - enable : BOOL; (*enables execution*) - pServerName : UDINT; (*pointer to IP address or host name of the database server, e.g. "sun.galaxy.one"*) - pUserName : UDINT; (*pointer to the user name*) - pPassword : UDINT; (*pointer to the user password*) - pDatabaseName : UDINT; (*pointer to the name of the database*) - databaseSystem : UDINT; (*database system*) - END_VAR - - VAR_OUTPUT - status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*) - dbError : INT; (*error number of the database*) - connectionIdent : UDINT; (*identifier of the database connection*) - END_VAR - - VAR - _statemachine : UINT; (*internal variable*) - _result : UINT; (*internal variable*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK dbConnectEnc (*connects to an existing database using given encoding; asynchronous execution*) - VAR_INPUT - enable : BOOL; (*enables execution*) - pServerName : UDINT; (*pointer to IP address or host name of the database server, e.g. "sun.galaxy.one"*) - pUserName : UDINT; (*pointer to the user name*) - pPassword : UDINT; (*pointer to the user password*) - pDatabaseName : UDINT; (*pointer to the name of the database*) - databaseSystem : UDINT; (*database system*) - pEncoding : UDINT; (*character encoding*) - END_VAR - - VAR_OUTPUT - status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*) - dbError : INT; (*error number of the database*) - connectionIdent : UDINT; (*identifier of the database connection*) - END_VAR - - VAR - _statemachine : UINT; (*internal variable*) - _result : UINT; (*internal variable*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK dbExecuteSql (*executes an SQL statement; asynchronous execution*) - VAR_INPUT - enable : BOOL; (*enables execution*) - connectionIdent : UDINT; (*identifier of the database connection*) - pSqlStatement : UDINT; (*pointer to the SQL statement*) - END_VAR - - VAR_OUTPUT - status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*) - dbError : INT; (*error number of the database*) - END_VAR - - VAR - _statemachine : UINT; (*internal variable*) - _result : UINT; (*internal variable*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK dbGetAffectedRows (*determines the number of rows affected by an INSERT, UPDATE or DELETE SQL statement; asynchronous execution*) - VAR_INPUT - enable : BOOL; (*enables execution*) - connectionIdent : UDINT; (*identifier of the database connection*) - END_VAR - - VAR_OUTPUT - status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*) - dbError : INT; (*error number of the database*) - affectedRows: UDINT; (*number of affected rows*) - END_VAR - - VAR - _statemachine : UINT; (*internal variable*) - _result : UINT; (*internal variable*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK dbGetColumnCount (*determines the number of columns in the result set of an SELECT SQL statement; asynchronous execution*) - VAR_INPUT - enable : BOOL; (*enables execution*) - connectionIdent : UDINT; (*identifier of the database connection*) - END_VAR - - VAR_OUTPUT - status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*) - dbError : INT; (*error number of the database*) - columnCount : INT; (*number of columns in the result set*) - END_VAR - - VAR - _statemachine : UINT; (*internal variable*) - _result : UINT; (*internal variable*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK dbFetchNextRow (*fetches the next row into the memory; asynchronous execution*) - VAR_INPUT - enable : BOOL; (*enables execution*) - connectionIdent : UDINT; (*identifier of the database connection*) - END_VAR - - VAR_OUTPUT - status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*) - dbError : INT; (*error number of the database*) - END_VAR - - VAR - _statemachine : UINT; (*internal variable*) - _result : UINT; (*internal variable*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK dbGetData (*gets the data of the current row of the given column*) - VAR_INPUT - enable : BOOL; (*enables execution*) - connectionIdent : UDINT; (*identifier of the database connection*) - columnIdx : UDINT; (*the data column index*) - dataType : INT; (*type of the data*) - pData : UDINT; (*pointer to the data buffer*) - dataSize : UDINT; (*size of the data buffer*) - END_VAR - - VAR_OUTPUT - status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*) - dbError : INT; (*error number of the database*) - actDataSize : UDINT; (*size of the written data or needed data size*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK dbDisconnect (*disconnects the connection to the database; asynchronous execution*) - VAR_INPUT - enable : BOOL; (*enables execution*) - connectionIdent : UDINT; (*identifier of the database connection*) - END_VAR - - VAR_OUTPUT - status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*) - dbError : INT; (*error number of the database*) - END_VAR - - VAR - _statemachine : UINT; (*internal variable*) - _result : UINT; (*internal variable*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK dbGetInfo (*gets database information; asynchronous execution*) - VAR_INPUT - enable : BOOL; (*enables execution*) - connectionIdent : UDINT; (*identifier of the database connection*) - infoType : UINT; (*type of information*) - pServerInfo : UDINT; (*pointer to buffer for the database information*) - serverInfoSize : UDINT; (*size of the buffer*) - END_VAR - - VAR_OUTPUT - status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*) - dbError : INT; (*error number of the database*) - actServerInfoSize : UINT; (*current size of database information or needed size*) - END_VAR - - VAR - _statemachine : UINT; (*internal variable*) - _result : UINT; (*internal variable*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK dbGetErrorMessage (*gets the current database error message; asynchronous execution*) - VAR_INPUT - enable : BOOL; (*enables execution*) - connectionIdent : UDINT; (*identifier of the database connection*) - pErrorMessage : UDINT; (*buffer for the database error message*) - errorMessageSize: UDINT; (*size of the buffer*) - END_VAR - - VAR_OUTPUT - status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*) - dbError : INT; (*error number of the database*) - sqlState : ARRAY [0..5] OF USINT;(*five-character SQLSTATE code*) - nativeError : DINT; (*native error code, specific to the data source*) - actErrorMessageSize : INT; (*current size for the error message of the database or necessary size*) - END_VAR - - VAR - _statemachine : UINT; (*internal variable*) - _result : UINT; (*internal variable*) - END_VAR -END_FUNCTION_BLOCK diff --git a/example/AsProject/Logical/Libraries/_AS/AsDb/AsDb.typ b/example/AsProject/Logical/Libraries/_AS/AsDb/AsDb.typ deleted file mode 100644 index 753cd31..0000000 --- a/example/AsProject/Logical/Libraries/_AS/AsDb/AsDb.typ +++ /dev/null @@ -1,3 +0,0 @@ - -TYPE -END_TYPE diff --git a/example/AsProject/Logical/Libraries/_AS/AsDb/AsDb.var b/example/AsProject/Logical/Libraries/_AS/AsDb/AsDb.var deleted file mode 100644 index 5f093e6..0000000 --- a/example/AsProject/Logical/Libraries/_AS/AsDb/AsDb.var +++ /dev/null @@ -1,218 +0,0 @@ - -VAR CONSTANT - DB_SYSTEM_SYBASE : UINT := 1; (*Sybase database*) - DB_SYSTEM_MS_SQL : UINT := 2; (*Microsoft SQL database*) - - DB_DEFAULT_PORT : UINT := 5000; (*default database port*) - - DB_SQL_ERROR : INT := -1; (*SQL error*) - DB_SQL_INVALID_HANDLE : INT := -2; (*invalid SQL database handle*) - DB_SQL_NO_DATA : INT := 100; (*no data available*) - - DB_SQL_CHAR : INT := 1; (*character data type of either fixed length or variable length*) - DB_SQL_NUMERIC : INT := 2; (*numeric data type with fixed precision and scale*) - DB_SQL_DECIMAL : INT := 3; (*numeric data type with fixed precision and scale*) - DB_SQL_BIGINT : INT := -25; (*big integer 8 bytes*) - DB_SQL_INTEGER : INT := 4; (*DINT*) - DB_SQL_SMALLINT : INT := 5; (*INT*) - DB_SQL_TINYINT : INT := -6; (*SINT*) - DB_SQL_REAL : INT := 7; (*REAL*) - DB_SQL_DOUBLE : INT := 8; (*LREAL*) - DB_SQL_DATE : INT := 9; (*date, 6 bytes: yy.mm.dd*) - DB_SQL_TIME : INT := 10; (*time of a day without time zone based on a 24-hour clock, 6 bytes: hh:mm:ss*) - DB_SQL_TIMESTAMP : INT := 11; (*DB_SQL_DATE + TIME 12 bytes: yy.mm.dd hh:mm:ss*) - DB_SQL_GUID : INT := -11; (*16 byte GUID*) - - DB_IT_SQL_ACCESSIBLE_TABLES : UINT := 19; (*SQL_ACCESSIBLE_TABLES*) - DB_IT_SQL_ACTIVE_ENVIRONMENTS : UINT := 116; (*SQL_ACTIVE_ENVIRONMENTS*) - DB_IT_SQL_AGGREGATE_FUNCTIONS : UINT := 169; (*SQL_AGGREGATE_FUNCTIONS*) - DB_IT_SQL_ALTER_DOMAIN : UINT := 117; (*SQL_ALTER_DOMAIN*) - DB_IT_SQL_ALTER_TABLE : UINT := 86; (*SQL_ALTER_TABLE*) - DB_IT_SQL_ASYNC_MODE : UINT := 10021; (*SQL_ASYNC_MODE*) - DB_IT_SQL_BATCH_ROW_COUNT : UINT := 120; (*SQL_BATCH_ROW_COUNT*) - DB_IT_SQL_BATCH_SUPPORT : UINT := 121; (*SQL_BATCH_SUPPORT*) - DB_IT_SQL_BOOKMARK_PERSISTENCE : UINT := 82; (*SQL_BOOKMARK_PERSISTENCE*) - DB_IT_SQL_CATALOG_LOCATION : UINT := 114; (*SQL_CATALOG_LOCATION*) - DB_IT_SQL_CATALOG_NAME : UINT := 10003; (*SQL_CATALOG_NAME*) - DB_IT_SQL_CATALOG_NAME_SEPARATOR : UINT := 41; (*SQL_CATALOG_NAME_SEPARATOR*) - DB_IT_SQL_CATALOG_TERM : UINT := 42; (*SQL_CATALOG_TERM*) - DB_IT_SQL_CATALOG_USAGE : UINT := 92; (*SQL_CATALOG_USAGE*) - DB_IT_SQL_COLUMN_ALIAS : UINT := 87; (*SQL_COLUMN_ALIAS*) - DB_IT_SQL_CONCAT_NULL_BEHAVIOR : UINT := 22; (*SQL_CONCAT_NULL_BEHAVIOR*) - DB_IT_SQL_CONVERT_BINARY : UINT := 54; (*SQL_CONVERT_BINARY*) - DB_IT_SQL_CONVERT_BIT : UINT := 55; (*SQL_CONVERT_BIT*) - DB_IT_SQL_CONVERT_CHAR : UINT := 56; (*SQL_CONVERT_CHAR*) - DB_IT_SQL_CONVERT_DECIMAL : UINT := 58; (*SQL_CONVERT_DECIMAL*) - DB_IT_SQL_CONVERT_FLOAT : UINT := 60; (*SQL_CONVERT_FLOAT*) - DB_IT_SQL_CONVERT_FUNCTIONS : UINT := 48; (*SQL_CONVERT_FUNCTIONS*) - DB_IT_SQL_CONVERT_INTEGER : UINT := 61; (*SQL_CONVERT_INTEGER*) - DB_IT_SQL_CONVERT_LONGVARBINARY : UINT := 71; (*SQL_CONVERT_LONGVARBINARY*) - DB_IT_SQL_CONVERT_LONGVARCHAR : UINT := 62; (*SQL_CONVERT_LONGVARCHAR*) - DB_IT_SQL_CONVERT_NUMERIC : UINT := 63; (*SQL_CONVERT_NUMERIC*) - DB_IT_SQL_CONVERT_REAL : UINT := 64; (*SQL_CONVERT_REAL*) - DB_IT_SQL_CONVERT_SMALLINT : UINT := 65; (*SQL_CONVERT_SMALLINT*) - DB_IT_SQL_CONVERT_TIMESTAMP : UINT := 67; (*SQL_CONVERT_TIMESTAMP*) - DB_IT_SQL_CONVERT_TINYINT : UINT := 68; (*SQL_CONVERT_TINYINT*) - DB_IT_SQL_CONVERT_VARBINARY : UINT := 69; (*SQL_CONVERT_VARBINARY*) - DB_IT_SQL_CONVERT_VARCHAR : UINT := 70; (*SQL_CONVERT_VARCHAR*) - DB_IT_SQL_CONVERT_WCHAR : UINT := 122; (*SQL_CONVERT_WCHAR*) - DB_IT_SQL_CONVERT_WLONGVARCHAR : UINT := 125; (*SQL_CONVERT_WLONGVARCHAR*) - DB_IT_SQL_CONVERT_WVARCHAR : UINT := 126; (*SQL_CONVERT_WVARCHAR*) - DB_IT_SQL_CORRELATION_NAME : UINT := 74; (*SQL_CORRELATION_NAME*) - DB_IT_SQL_CREATE_ASSERTION : UINT := 127; (*SQL_CREATE_ASSERTION*) - DB_IT_SQL_CREATE_CHARACTER_SET : UINT := 128; (*SQL_CREATE_CHARACTER_SET*) - DB_IT_SQL_CREATE_COLLATION : UINT := 129; (*SQL_CREATE_COLLATION*) - DB_IT_SQL_CREATE_DOMAIN : UINT := 130; (*SQL_CREATE_DOMAIN*) - DB_IT_SQL_CREATE_SCHEMA : UINT := 131; (*SQL_CREATE_SCHEMA*) - DB_IT_SQL_CREATE_TABLE : UINT := 132; (*SQL_CREATE_TABLE*) - DB_IT_SQL_CREATE_TRANSLATION : UINT := 133; (*SQL_CREATE_TRANSLATION*) - DB_IT_SQL_CREATE_VIEW : UINT := 134; (*SQL_CREATE_VIEW*) - DB_IT_SQL_CURSOR_COMMIT_BEHAVIOR : UINT := 23; (*SQL_CURSOR_COMMIT_BEHAVIOR*) - DB_IT_SQL_CURSOR_ROLLBACK_BEHAV : UINT := 24; (*SQL_CURSOR_ROLLBACK_BEHAVIOR*) - DB_IT_SQL_CURSOR_SENSITIVITY : UINT := 10001; (*SQL_CURSOR_SENSITIVITY*) - DB_IT_SQL_DATA_SOURCE_NAME : UINT := 2; (*SQL_DATA_SOURCE_NAME*) - DB_IT_SQL_DATA_SOURCE_READ_ONLY : UINT := 25; (*SQL_DATA_SOURCE_READ_ONLY*) - DB_IT_SQL_DATABASE_NAME : UINT := 16; (*SQL_DATABASE_NAME*) - DB_IT_SQL_DATETIME_LITERALS : UINT := 119; (*SQL_DATETIME_LITERALS*) - DB_IT_SQL_DBMS_NAME : UINT := 17; (*SQL_DBMS_NAME*) - DB_IT_SQL_DBMS_VER : UINT := 18; (*SQL_DBMS_VER*) - DB_IT_SQL_DDL_INDEX : UINT := 170; (*SQL_DDL_INDEX*) - DB_IT_SQL_DEFAULT_TXN_ISOLATION : UINT := 26; (*SQL_DEFAULT_TXN_ISOLATION*) - DB_IT_SQL_DESCRIBE_PARAMETER : UINT := 10002; (*SQL_DESCRIBE_PARAMETER*) - DB_IT_SQL_DRIVER_HDBC : UINT := 3; (*SQL_DRIVER_HDBC*) - DB_IT_SQL_DRIVER_HENV : UINT := 4; (*SQL_DRIVER_HENV*) - DB_IT_SQL_DRIVER_HSTMT : UINT := 5; (*SQL_DRIVER_HSTMT*) - DB_IT_SQL_DRIVER_NAME : UINT := 6; (*SQL_DRIVER_NAME*) - DB_IT_SQL_DRIVER_ODBC_VER : UINT := 77; (*SQL_DRIVER_ODBC_VER*) - DB_IT_SQL_DRIVER_VER : UINT := 7; (*SQL_DRIVER_VER*) - DB_IT_SQL_DROP_ASSERTION : UINT := 136; (*SQL_DROP_ASSERTION*) - DB_IT_SQL_DROP_CHARACTER_SET : UINT := 137; (*SQL_DROP_CHARACTER_SET*) - DB_IT_SQL_DROP_COLLATION : UINT := 138; (*SQL_DROP_COLLATION*) - DB_IT_SQL_DROP_DOMAIN : UINT := 139; (*SQL_DROP_DOMAIN*) - DB_IT_SQL_DROP_SCHEMA : UINT := 140; (*SQL_DROP_SCHEMA*) - DB_IT_SQL_DROP_TABLE : UINT := 141; (*SQL_DROP_TABLE*) - DB_IT_SQL_DROP_TRANSLATION : UINT := 142; (*SQL_DROP_TRANSLATION*) - DB_IT_SQL_DROP_VIEW : UINT := 143; (*SQL_DROP_VIEW*) - DB_IT_SQL_DYNAMIC_CURSOR_ATTR1 : UINT := 144; (*SQL_DYNAMIC_CURSOR_ATTRIBUTES1*) - DB_IT_SQL_DYNAMIC_CURSOR_ATTR2 : UINT := 145; (*SQL_DYNAMIC_CURSOR_ATTRIBUTES2*) - DB_IT_SQL_EXPRESSIONS_IN_ORDERBY : UINT := 27; (*SQL_EXPRESSIONS_IN_ORDERBY*) - DB_IT_SQL_FETCH_DIRECTION : UINT := 8; (*SQL_FETCH_DIRECTION*) - DB_IT_SQL_FILE_USAGE : UINT := 84; (*SQL_FILE_USAGE*) - DB_IT_SQL_FORW_ONLY_CURSOR_ATTR1 : UINT := 146; (*SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1*) - DB_IT_SQL_FORW_ONLY_CURSOR_ATTR2 : UINT := 147; (*SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2*) - DB_IT_SQL_GETDATA_EXTENSIONS : UINT := 81; (*SQL_GETDATA_EXTENSIONS*) - DB_IT_SQL_GROUP_BY : UINT := 88; (*SQL_GROUP_BY*) - DB_IT_SQL_IDENTIFIER_CASE : UINT := 28; (*SQL_IDENTIFIER_CASE*) - DB_IT_SQL_IDENTIFIER_QUOTE_CHAR : UINT := 29; (*SQL_IDENTIFIER_QUOTE_CHAR*) - DB_IT_SQL_INDEX_KEYWORDS : UINT := 148; (*SQL_INDEX_KEYWORDS*) - DB_IT_SQL_INFO_SCHEMA_VIEWS : UINT := 149; (*SQL_INFO_SCHEMA_VIEWS*) - DB_IT_SQL_INSERT_STATEMENT : UINT := 172; (*SQL_INSERT_STATEMENT*) - DB_IT_SQL_INTEGRITY : UINT := 73; (*SQL_INTEGRITY*) - DB_IT_SQL_KEYSET_CURSOR_ATTR1 : UINT := 150; (*SQL_KEYSET_CURSOR_ATTRIBUTES1*) - DB_IT_SQL_KEYSET_CURSOR_ATTR2 : UINT := 151; (*SQL_KEYSET_CURSOR_ATTRIBUTES2*) - DB_IT_SQL_KEYWORDS : UINT := 89; (*SQL_KEYWORDS*) - DB_IT_SQL_LIKE_ESCAPE_CLAUSE : UINT := 113; (*SQL_LIKE_ESCAPE_CLAUSE*) - DB_IT_SQL_LOCK_TYPES : UINT := 78; (*SQL_LOCK_TYPES*) - DB_IT_SQL_MAX_ASYNC_CONCUR_STMT : UINT := 10022; (*SQL_MAX_ASYNC_CONCURRENT_STATEMENTS*) - DB_IT_SQL_MAX_BINARY_LITERAL_LEN : UINT := 112; (*SQL_MAX_BINARY_LITERAL_LEN*) - DB_IT_SQL_MAX_CATALOG_NAME_LEN : UINT := 34; (*SQL_MAX_CATALOG_NAME_LEN*) - DB_IT_SQL_MAX_CHAR_LITERAL_LEN : UINT := 108; (*SQL_MAX_CHAR_LITERAL_LEN*) - DB_IT_SQL_MAX_COLUMN_NAME_LEN : UINT := 30; (*SQL_MAX_COLUMN_NAME_LEN*) - DB_IT_SQL_MAX_COLS_IN_GROUP_BY : UINT := 97; (*SQL_MAX_COLUMNS_IN_GROUP_BY*) - DB_IT_SQL_MAX_COLUMNS_IN_INDEX : UINT := 98; (*SQL_MAX_COLUMNS_IN_INDEX*) - DB_IT_SQL_MAX_COLS_IN_ORDER_BY : UINT := 99; (*SQL_MAX_COLUMNS_IN_ORDER_BY*) - DB_IT_SQL_MAX_COLUMNS_IN_SELECT : UINT := 100; (*SQL_MAX_COLUMNS_IN_SELECT*) - DB_IT_SQL_MAX_COLUMNS_IN_TABLE : UINT := 101; (*SQL_MAX_COLUMNS_IN_TABLE*) - DB_IT_SQL_MAX_CONCUR_ACTIVITIES : UINT := 1; (*SQL_MAX_CONCURRENT_ACTIVITIES*) - DB_IT_SQL_MAX_CURSOR_NAME_LEN : UINT := 31; (*SQL_MAX_CURSOR_NAME_LEN*) - DB_IT_SQL_MAX_DRIVER_CONNECTIONS : UINT := 0; (*SQL_MAX_DRIVER_CONNECTIONS*) - DB_IT_SQL_MAX_IDENTIFIER_LEN : UINT := 10005; (*SQL_MAX_IDENTIFIER_LEN*) - DB_IT_SQL_MAX_INDEX_SIZE : UINT := 102; (*SQL_MAX_INDEX_SIZE*) - DB_IT_SQL_MAX_PROCEDURE_NAME_LEN : UINT := 33; (*SQL_MAX_PROCEDURE_NAME_LEN*) - DB_IT_SQL_MAX_ROW_SIZE : UINT := 104; (*SQL_MAX_ROW_SIZE*) - DB_IT_SQL_MAX_ROW_SIZE_INCL_LONG : UINT := 103; (*SQL_MAX_ROW_SIZE_INCLUDES_LONG*) - DB_IT_SQL_MAX_SCHEMA_NAME_LEN : UINT := 32; (*SQL_MAX_SCHEMA_NAME_LEN*) - DB_IT_SQL_MAX_STATEMENT_LEN : UINT := 105; (*SQL_MAX_STATEMENT_LEN*) - DB_IT_SQL_MAX_TABLE_NAME_LEN : UINT := 35; (*SQL_MAX_TABLE_NAME_LEN*) - DB_IT_SQL_MAX_TABLES_IN_SELECT : UINT := 106; (*SQL_MAX_TABLES_IN_SELECT*) - DB_IT_SQL_MAX_USER_NAME_LEN : UINT := 107; (*SQL_MAX_USER_NAME_LEN*) - DB_IT_SQL_MULT_RESULT_SETS : UINT := 36; (*SQL_MULT_RESULT_SETS*) - DB_IT_SQL_MULTIPLE_ACTIVE_TXN : UINT := 37; (*SQL_MULTIPLE_ACTIVE_TXN*) - DB_IT_SQL_NEED_LONG_DATA_LEN : UINT := 111; (*SQL_NEED_LONG_DATA_LEN*) - DB_IT_SQL_NON_NULLABLE_COLUMNS : UINT := 75; (*SQL_NON_NULLABLE_COLUMNS*) - DB_IT_SQL_NULL_COLLATION : UINT := 85; (*SQL_NULL_COLLATION*) - DB_IT_SQL_NUMERIC_FUNCTIONS : UINT := 49; (*SQL_NUMERIC_FUNCTIONS*) - DB_IT_SQL_ODBC_API_CONFORMANCE : UINT := 9; (*SQL_ODBC_API_CONFORMANCE*) - DB_IT_SQL_ODBC_IFC_CONFORMANCE : UINT := 152; (*SQL_ODBC_INTERFACE_CONFORMANCE*) - DB_IT_SQL_ODBC_SAG_CLI_CONFORM : UINT := 12; (*SQL_ODBC_SAG_CLI_CONFORMANCE*) - DB_IT_SQL_ODBC_SQL_CONFORMANCE : UINT := 15; (*SQL_ODBC_SQL_CONFORMANCE*) - DB_IT_SQL_ODBC_VER : UINT := 10; (*SQL_ODBC_VER*) - DB_IT_SQL_OJ_CAPABILITIES : UINT := 115; (*SQL_OJ_CAPABILITIES*) - DB_IT_SQL_ORDER_BY_COLS_IN_SEL : UINT := 90; (*SQL_ORDER_BY_COLUMNS_IN_SELECT*) - DB_IT_SQL_OUTER_JOINS : UINT := 38; (*SQL_OUTER_JOINS*) - DB_IT_SQL_PARAM_ARRAY_ROW_COUNTS : UINT := 153; (*SQL_PARAM_ARRAY_ROW_COUNTS*) - DB_IT_SQL_PARAM_ARRAY_SELECTS : UINT := 154; (*SQL_PARAM_ARRAY_SELECTS*) - DB_IT_SQL_POS_OPERATIONS : UINT := 79; (*SQL_POS_OPERATIONS*) - DB_IT_SQL_POSITIONED_STATEMENTS : UINT := 80; (*SQL_POSITIONED_STATEMENTS*) - DB_IT_SQL_PROCEDURE_TERM : UINT := 40; (*SQL_PROCEDURE_TERM*) - DB_IT_SQL_PROCEDURES : UINT := 21; (*SQL_PROCEDURES*) - DB_IT_SQL_QUOTED_IDENTIFIER_CASE : UINT := 93; (*SQL_QUOTED_IDENTIFIER_CASE*) - DB_IT_SQL_ROW_UPDATES : UINT := 11; (*SQL_ROW_UPDATES*) - DB_IT_SQL_SCHEMA_TERM : UINT := 39; (*SQL_SCHEMA_TERM*) - DB_IT_SQL_SCHEMA_USAGE : UINT := 91; (*SQL_SCHEMA_USAGE*) - DB_IT_SQL_SCROLL_CONCURRENCY : UINT := 43; (*SQL_SCROLL_CONCURRENCY*) - DB_IT_SQL_SCROLL_OPTIONS : UINT := 44; (*SQL_SCROLL_OPTIONS*) - DB_IT_SQL_SEARCH_PATTERN_ESCAPE : UINT := 14; (*SQL_SEARCH_PATTERN_ESCAPE*) - DB_IT_SQL_SERVER_NAME : UINT := 13; (*SQL_SERVER_NAME*) - DB_IT_SQL_SPECIAL_CHARACTERS : UINT := 94; (*SQL_SPECIAL_CHARACTERS*) - DB_IT_SQL_SQL_CONFORMANCE : UINT := 118; (*SQL_SQL_CONFORMANCE*) - DB_IT_SQL_SQL92_DATETIME_FUNCS : UINT := 155; (*SQL_SQL92_DATETIME_FUNCTIONS*) - DB_IT_SQL_SQL92_FK_DELETE_RULE : UINT := 156; (*SQL_SQL92_FOREIGN_KEY_DELETE_RULE*) - DB_IT_SQL_SQL92_FK_UPDATE_RULE : UINT := 157; (*SQL_SQL92_FOREIGN_KEY_UPDATE_RULE*) - DB_IT_SQL_SQL92_GRANT : UINT := 158; (*SQL_SQL92_GRANT*) - DB_IT_SQL_SQL92_NUM_VALUE_FUNCS : UINT := 159; (*SQL_SQL92_NUMERIC_VALUE_FUNCTIONS*) - DB_IT_SQL_SQL92_PREDICATES : UINT := 160; (*SQL_SQL92_PREDICATES*) - DB_IT_SQL_SQL92_REL_JOIN_OPS : UINT := 161; (*SQL_SQL92_RELATIONAL_JOIN_OPERATORS*) - DB_IT_SQL_SQL92_REVOKE : UINT := 162; (*SQL_SQL92_REVOKE*) - DB_IT_SQL_SQL92_ROW_VALUE_CTOR : UINT := 163; (*SQL_SQL92_ROW_VALUE_CONSTRUCTOR*) - DB_IT_SQL_SQL92_STRING_FUNCTIONS : UINT := 164; (*SQL_SQL92_STRING_FUNCTIONS*) - DB_IT_SQL_SQL92_VALUE_EXPR : UINT := 165; (*SQL_SQL92_VALUE_EXPRESSIONS*) - DB_IT_SQL_STD_CLI_CONFORMANCE : UINT := 166; (*SQL_STANDARD_CLI_CONFORMANCE*) - DB_IT_SQL_STATIC_CURSOR_ATTR1 : UINT := 167; (*SQL_STATIC_CURSOR_ATTRIBUTES1*) - DB_IT_SQL_STATIC_CURSOR_ATTR2 : UINT := 168; (*SQL_STATIC_CURSOR_ATTRIBUTES2*) - DB_IT_SQL_STATIC_SENSITIVITY : UINT := 83; (*SQL_STATIC_SENSITIVITY*) - DB_IT_SQL_STRING_FUNCTIONS : UINT := 50; (*SQL_STRING_FUNCTIONS*) - DB_IT_SQL_SUBQUERIES : UINT := 95; (*SQL_SUBQUERIES*) - DB_IT_SQL_SYSTEM_FUNCTIONS : UINT := 51; (*SQL_SYSTEM_FUNCTIONS*) - DB_IT_SQL_TABLE_TERM : UINT := 45; (*SQL_TABLE_TERM*) - DB_IT_SQL_TIMEDATE_ADD_INTERVALS : UINT := 109; (*SQL_TIMEDATE_ADD_INTERVALS*) - DB_IT_SQL_TIMEDATE_DIFF_INTERVAL : UINT := 110; (*SQL_TIMEDATE_DIFF_INTERVALS*) - DB_IT_SQL_TIMEDATE_FUNCTIONS : UINT := 52; (*SQL_TIMEDATE_FUNCTIONS*) - DB_IT_SQL_TXN_CAPABLE : UINT := 46; (*SQL_TXN_CAPABLE*) - DB_IT_SQL_TXN_ISOLATION_OPTION : UINT := 72; (*SQL_TXN_ISOLATION_OPTION*) - DB_IT_SQL_UNION : UINT := 96; (*SQL_UNION*) - DB_IT_SQL_USER_NAME : UINT := 47; (*SQL_USER_NAME*) - DB_IT_SQL_XOPEN_CLI_YEAR : UINT := 10000; (*SQL_XOPEN_CLI_YEAR*) - - dbERR_MEMORY : UINT := 34930; (*memory error*) - dbERR_DATABASE : UINT := 34931; (*database returned an error*) - dbERR_INVALID_HANDLE : UINT := 34932; (*invalid handle specified*) - dbERR_INVALID_COLUMN : UINT := 34933; (*invalid column index specified*) - dbERR_UNSUPPORTED_DATABASE : UINT := 34934; (*unsupported database*) - dbERR_BUFFER_SIZE : UINT := 34935; (*buffer too small*) - dbERR_INVALID_SERVERNAME : UINT := 34936; (*invalid server name*) - dbERR_INVALID_USERNAME : UINT := 34937; (*invalid user name*) - dbERR_INVALID_PASSWORD : UINT := 34938; (*invalid password*) - dbERR_INVALID_DATABASE_NAME : UINT := 34939; (*invalid database name*) - dbERR_INVALID_SQL_STATEMENT : UINT := 34940; (*invalid SQL statement*) - dbERR_SQL_EXECUTE_REQUIRED : UINT := 34941; (*dbExecuteSql() must be called before*) - dbERR_INVALID_DATATYPE : UINT := 34942; (*invalid data type*) - dbERR_NULLPOINTER : UINT := 34943; (*null pointer*) - dbERR_NOT_AVAILABLE : UINT := 34944; (*information not available*) - dbERR_UNSUPPORTED_ENCODING : UINT := 34945; (*unsupported encoding specified*) -END_VAR - -VAR CONSTANT - DB_ENCODING_ISO_8859_1 : STRING[12] := 'ISO-8859-1'; (*ISO-8859-1 encoding*) - DB_ENCODING_UTF_8 : STRING[12] := 'UTF-8'; (*UTF-8 encoding*) -END_VAR diff --git a/example/AsProject/Logical/Libraries/_AS/AsDb/SG4/AsDb.h b/example/AsProject/Logical/Libraries/_AS/AsDb/SG4/AsDb.h deleted file mode 100644 index d39c010..0000000 --- a/example/AsProject/Logical/Libraries/_AS/AsDb/SG4/AsDb.h +++ /dev/null @@ -1,628 +0,0 @@ -/* Automation Studio generated header file */ -/* Do not edit ! */ - -#ifndef _ASDB_ -#define _ASDB_ -#ifdef __cplusplus -extern "C" -{ -#endif - -#include - -#include - -#ifndef _BUR_PUBLIC -#define _BUR_PUBLIC -#endif -/* Constants */ -#ifdef _REPLACE_CONST - #define DB_ENCODING_UTF_8 "UTF-8" - #define DB_ENCODING_ISO_8859_1 "ISO-8859-1" - #define dbERR_UNSUPPORTED_ENCODING 34945U - #define dbERR_NOT_AVAILABLE 34944U - #define dbERR_NULLPOINTER 34943U - #define dbERR_INVALID_DATATYPE 34942U - #define dbERR_SQL_EXECUTE_REQUIRED 34941U - #define dbERR_INVALID_SQL_STATEMENT 34940U - #define dbERR_INVALID_DATABASE_NAME 34939U - #define dbERR_INVALID_PASSWORD 34938U - #define dbERR_INVALID_USERNAME 34937U - #define dbERR_INVALID_SERVERNAME 34936U - #define dbERR_BUFFER_SIZE 34935U - #define dbERR_UNSUPPORTED_DATABASE 34934U - #define dbERR_INVALID_COLUMN 34933U - #define dbERR_INVALID_HANDLE 34932U - #define dbERR_DATABASE 34931U - #define dbERR_MEMORY 34930U - #define DB_IT_SQL_XOPEN_CLI_YEAR 10000U - #define DB_IT_SQL_USER_NAME 47U - #define DB_IT_SQL_UNION 96U - #define DB_IT_SQL_TXN_ISOLATION_OPTION 72U - #define DB_IT_SQL_TXN_CAPABLE 46U - #define DB_IT_SQL_TIMEDATE_FUNCTIONS 52U - #define DB_IT_SQL_TIMEDATE_DIFF_INTERVAL 110U - #define DB_IT_SQL_TIMEDATE_ADD_INTERVALS 109U - #define DB_IT_SQL_TABLE_TERM 45U - #define DB_IT_SQL_SYSTEM_FUNCTIONS 51U - #define DB_IT_SQL_SUBQUERIES 95U - #define DB_IT_SQL_STRING_FUNCTIONS 50U - #define DB_IT_SQL_STATIC_SENSITIVITY 83U - #define DB_IT_SQL_STATIC_CURSOR_ATTR2 168U - #define DB_IT_SQL_STATIC_CURSOR_ATTR1 167U - #define DB_IT_SQL_STD_CLI_CONFORMANCE 166U - #define DB_IT_SQL_SQL92_VALUE_EXPR 165U - #define DB_IT_SQL_SQL92_STRING_FUNCTIONS 164U - #define DB_IT_SQL_SQL92_ROW_VALUE_CTOR 163U - #define DB_IT_SQL_SQL92_REVOKE 162U - #define DB_IT_SQL_SQL92_REL_JOIN_OPS 161U - #define DB_IT_SQL_SQL92_PREDICATES 160U - #define DB_IT_SQL_SQL92_NUM_VALUE_FUNCS 159U - #define DB_IT_SQL_SQL92_GRANT 158U - #define DB_IT_SQL_SQL92_FK_UPDATE_RULE 157U - #define DB_IT_SQL_SQL92_FK_DELETE_RULE 156U - #define DB_IT_SQL_SQL92_DATETIME_FUNCS 155U - #define DB_IT_SQL_SQL_CONFORMANCE 118U - #define DB_IT_SQL_SPECIAL_CHARACTERS 94U - #define DB_IT_SQL_SERVER_NAME 13U - #define DB_IT_SQL_SEARCH_PATTERN_ESCAPE 14U - #define DB_IT_SQL_SCROLL_OPTIONS 44U - #define DB_IT_SQL_SCROLL_CONCURRENCY 43U - #define DB_IT_SQL_SCHEMA_USAGE 91U - #define DB_IT_SQL_SCHEMA_TERM 39U - #define DB_IT_SQL_ROW_UPDATES 11U - #define DB_IT_SQL_QUOTED_IDENTIFIER_CASE 93U - #define DB_IT_SQL_PROCEDURES 21U - #define DB_IT_SQL_PROCEDURE_TERM 40U - #define DB_IT_SQL_POSITIONED_STATEMENTS 80U - #define DB_IT_SQL_POS_OPERATIONS 79U - #define DB_IT_SQL_PARAM_ARRAY_SELECTS 154U - #define DB_IT_SQL_PARAM_ARRAY_ROW_COUNTS 153U - #define DB_IT_SQL_OUTER_JOINS 38U - #define DB_IT_SQL_ORDER_BY_COLS_IN_SEL 90U - #define DB_IT_SQL_OJ_CAPABILITIES 115U - #define DB_IT_SQL_ODBC_VER 10U - #define DB_IT_SQL_ODBC_SQL_CONFORMANCE 15U - #define DB_IT_SQL_ODBC_SAG_CLI_CONFORM 12U - #define DB_IT_SQL_ODBC_IFC_CONFORMANCE 152U - #define DB_IT_SQL_ODBC_API_CONFORMANCE 9U - #define DB_IT_SQL_NUMERIC_FUNCTIONS 49U - #define DB_IT_SQL_NULL_COLLATION 85U - #define DB_IT_SQL_NON_NULLABLE_COLUMNS 75U - #define DB_IT_SQL_NEED_LONG_DATA_LEN 111U - #define DB_IT_SQL_MULTIPLE_ACTIVE_TXN 37U - #define DB_IT_SQL_MULT_RESULT_SETS 36U - #define DB_IT_SQL_MAX_USER_NAME_LEN 107U - #define DB_IT_SQL_MAX_TABLES_IN_SELECT 106U - #define DB_IT_SQL_MAX_TABLE_NAME_LEN 35U - #define DB_IT_SQL_MAX_STATEMENT_LEN 105U - #define DB_IT_SQL_MAX_SCHEMA_NAME_LEN 32U - #define DB_IT_SQL_MAX_ROW_SIZE_INCL_LONG 103U - #define DB_IT_SQL_MAX_ROW_SIZE 104U - #define DB_IT_SQL_MAX_PROCEDURE_NAME_LEN 33U - #define DB_IT_SQL_MAX_INDEX_SIZE 102U - #define DB_IT_SQL_MAX_IDENTIFIER_LEN 10005U - #define DB_IT_SQL_MAX_DRIVER_CONNECTIONS 0U - #define DB_IT_SQL_MAX_CURSOR_NAME_LEN 31U - #define DB_IT_SQL_MAX_CONCUR_ACTIVITIES 1U - #define DB_IT_SQL_MAX_COLUMNS_IN_TABLE 101U - #define DB_IT_SQL_MAX_COLUMNS_IN_SELECT 100U - #define DB_IT_SQL_MAX_COLS_IN_ORDER_BY 99U - #define DB_IT_SQL_MAX_COLUMNS_IN_INDEX 98U - #define DB_IT_SQL_MAX_COLS_IN_GROUP_BY 97U - #define DB_IT_SQL_MAX_COLUMN_NAME_LEN 30U - #define DB_IT_SQL_MAX_CHAR_LITERAL_LEN 108U - #define DB_IT_SQL_MAX_CATALOG_NAME_LEN 34U - #define DB_IT_SQL_MAX_BINARY_LITERAL_LEN 112U - #define DB_IT_SQL_MAX_ASYNC_CONCUR_STMT 10022U - #define DB_IT_SQL_LOCK_TYPES 78U - #define DB_IT_SQL_LIKE_ESCAPE_CLAUSE 113U - #define DB_IT_SQL_KEYWORDS 89U - #define DB_IT_SQL_KEYSET_CURSOR_ATTR2 151U - #define DB_IT_SQL_KEYSET_CURSOR_ATTR1 150U - #define DB_IT_SQL_INTEGRITY 73U - #define DB_IT_SQL_INSERT_STATEMENT 172U - #define DB_IT_SQL_INFO_SCHEMA_VIEWS 149U - #define DB_IT_SQL_INDEX_KEYWORDS 148U - #define DB_IT_SQL_IDENTIFIER_QUOTE_CHAR 29U - #define DB_IT_SQL_IDENTIFIER_CASE 28U - #define DB_IT_SQL_GROUP_BY 88U - #define DB_IT_SQL_GETDATA_EXTENSIONS 81U - #define DB_IT_SQL_FORW_ONLY_CURSOR_ATTR2 147U - #define DB_IT_SQL_FORW_ONLY_CURSOR_ATTR1 146U - #define DB_IT_SQL_FILE_USAGE 84U - #define DB_IT_SQL_FETCH_DIRECTION 8U - #define DB_IT_SQL_EXPRESSIONS_IN_ORDERBY 27U - #define DB_IT_SQL_DYNAMIC_CURSOR_ATTR2 145U - #define DB_IT_SQL_DYNAMIC_CURSOR_ATTR1 144U - #define DB_IT_SQL_DROP_VIEW 143U - #define DB_IT_SQL_DROP_TRANSLATION 142U - #define DB_IT_SQL_DROP_TABLE 141U - #define DB_IT_SQL_DROP_SCHEMA 140U - #define DB_IT_SQL_DROP_DOMAIN 139U - #define DB_IT_SQL_DROP_COLLATION 138U - #define DB_IT_SQL_DROP_CHARACTER_SET 137U - #define DB_IT_SQL_DROP_ASSERTION 136U - #define DB_IT_SQL_DRIVER_VER 7U - #define DB_IT_SQL_DRIVER_ODBC_VER 77U - #define DB_IT_SQL_DRIVER_NAME 6U - #define DB_IT_SQL_DRIVER_HSTMT 5U - #define DB_IT_SQL_DRIVER_HENV 4U - #define DB_IT_SQL_DRIVER_HDBC 3U - #define DB_IT_SQL_DESCRIBE_PARAMETER 10002U - #define DB_IT_SQL_DEFAULT_TXN_ISOLATION 26U - #define DB_IT_SQL_DDL_INDEX 170U - #define DB_IT_SQL_DBMS_VER 18U - #define DB_IT_SQL_DBMS_NAME 17U - #define DB_IT_SQL_DATETIME_LITERALS 119U - #define DB_IT_SQL_DATABASE_NAME 16U - #define DB_IT_SQL_DATA_SOURCE_READ_ONLY 25U - #define DB_IT_SQL_DATA_SOURCE_NAME 2U - #define DB_IT_SQL_CURSOR_SENSITIVITY 10001U - #define DB_IT_SQL_CURSOR_ROLLBACK_BEHAV 24U - #define DB_IT_SQL_CURSOR_COMMIT_BEHAVIOR 23U - #define DB_IT_SQL_CREATE_VIEW 134U - #define DB_IT_SQL_CREATE_TRANSLATION 133U - #define DB_IT_SQL_CREATE_TABLE 132U - #define DB_IT_SQL_CREATE_SCHEMA 131U - #define DB_IT_SQL_CREATE_DOMAIN 130U - #define DB_IT_SQL_CREATE_COLLATION 129U - #define DB_IT_SQL_CREATE_CHARACTER_SET 128U - #define DB_IT_SQL_CREATE_ASSERTION 127U - #define DB_IT_SQL_CORRELATION_NAME 74U - #define DB_IT_SQL_CONVERT_WVARCHAR 126U - #define DB_IT_SQL_CONVERT_WLONGVARCHAR 125U - #define DB_IT_SQL_CONVERT_WCHAR 122U - #define DB_IT_SQL_CONVERT_VARCHAR 70U - #define DB_IT_SQL_CONVERT_VARBINARY 69U - #define DB_IT_SQL_CONVERT_TINYINT 68U - #define DB_IT_SQL_CONVERT_TIMESTAMP 67U - #define DB_IT_SQL_CONVERT_SMALLINT 65U - #define DB_IT_SQL_CONVERT_REAL 64U - #define DB_IT_SQL_CONVERT_NUMERIC 63U - #define DB_IT_SQL_CONVERT_LONGVARCHAR 62U - #define DB_IT_SQL_CONVERT_LONGVARBINARY 71U - #define DB_IT_SQL_CONVERT_INTEGER 61U - #define DB_IT_SQL_CONVERT_FUNCTIONS 48U - #define DB_IT_SQL_CONVERT_FLOAT 60U - #define DB_IT_SQL_CONVERT_DECIMAL 58U - #define DB_IT_SQL_CONVERT_CHAR 56U - #define DB_IT_SQL_CONVERT_BIT 55U - #define DB_IT_SQL_CONVERT_BINARY 54U - #define DB_IT_SQL_CONCAT_NULL_BEHAVIOR 22U - #define DB_IT_SQL_COLUMN_ALIAS 87U - #define DB_IT_SQL_CATALOG_USAGE 92U - #define DB_IT_SQL_CATALOG_TERM 42U - #define DB_IT_SQL_CATALOG_NAME_SEPARATOR 41U - #define DB_IT_SQL_CATALOG_NAME 10003U - #define DB_IT_SQL_CATALOG_LOCATION 114U - #define DB_IT_SQL_BOOKMARK_PERSISTENCE 82U - #define DB_IT_SQL_BATCH_SUPPORT 121U - #define DB_IT_SQL_BATCH_ROW_COUNT 120U - #define DB_IT_SQL_ASYNC_MODE 10021U - #define DB_IT_SQL_ALTER_TABLE 86U - #define DB_IT_SQL_ALTER_DOMAIN 117U - #define DB_IT_SQL_AGGREGATE_FUNCTIONS 169U - #define DB_IT_SQL_ACTIVE_ENVIRONMENTS 116U - #define DB_IT_SQL_ACCESSIBLE_TABLES 19U - #define DB_SQL_GUID (-11) - #define DB_SQL_TIMESTAMP 11 - #define DB_SQL_TIME 10 - #define DB_SQL_DATE 9 - #define DB_SQL_DOUBLE 8 - #define DB_SQL_REAL 7 - #define DB_SQL_TINYINT (-6) - #define DB_SQL_SMALLINT 5 - #define DB_SQL_INTEGER 4 - #define DB_SQL_BIGINT (-25) - #define DB_SQL_DECIMAL 3 - #define DB_SQL_NUMERIC 2 - #define DB_SQL_CHAR 1 - #define DB_SQL_NO_DATA 100 - #define DB_SQL_INVALID_HANDLE (-2) - #define DB_SQL_ERROR (-1) - #define DB_DEFAULT_PORT 5000U - #define DB_SYSTEM_MS_SQL 2U - #define DB_SYSTEM_SYBASE 1U -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST plcstring DB_ENCODING_UTF_8[13]; - _GLOBAL_CONST plcstring DB_ENCODING_ISO_8859_1[13]; - _GLOBAL_CONST unsigned short dbERR_UNSUPPORTED_ENCODING; - _GLOBAL_CONST unsigned short dbERR_NOT_AVAILABLE; - _GLOBAL_CONST unsigned short dbERR_NULLPOINTER; - _GLOBAL_CONST unsigned short dbERR_INVALID_DATATYPE; - _GLOBAL_CONST unsigned short dbERR_SQL_EXECUTE_REQUIRED; - _GLOBAL_CONST unsigned short dbERR_INVALID_SQL_STATEMENT; - _GLOBAL_CONST unsigned short dbERR_INVALID_DATABASE_NAME; - _GLOBAL_CONST unsigned short dbERR_INVALID_PASSWORD; - _GLOBAL_CONST unsigned short dbERR_INVALID_USERNAME; - _GLOBAL_CONST unsigned short dbERR_INVALID_SERVERNAME; - _GLOBAL_CONST unsigned short dbERR_BUFFER_SIZE; - _GLOBAL_CONST unsigned short dbERR_UNSUPPORTED_DATABASE; - _GLOBAL_CONST unsigned short dbERR_INVALID_COLUMN; - _GLOBAL_CONST unsigned short dbERR_INVALID_HANDLE; - _GLOBAL_CONST unsigned short dbERR_DATABASE; - _GLOBAL_CONST unsigned short dbERR_MEMORY; - _GLOBAL_CONST unsigned short DB_IT_SQL_XOPEN_CLI_YEAR; - _GLOBAL_CONST unsigned short DB_IT_SQL_USER_NAME; - _GLOBAL_CONST unsigned short DB_IT_SQL_UNION; - _GLOBAL_CONST unsigned short DB_IT_SQL_TXN_ISOLATION_OPTION; - _GLOBAL_CONST unsigned short DB_IT_SQL_TXN_CAPABLE; - _GLOBAL_CONST unsigned short DB_IT_SQL_TIMEDATE_FUNCTIONS; - _GLOBAL_CONST unsigned short DB_IT_SQL_TIMEDATE_DIFF_INTERVAL; - _GLOBAL_CONST unsigned short DB_IT_SQL_TIMEDATE_ADD_INTERVALS; - _GLOBAL_CONST unsigned short DB_IT_SQL_TABLE_TERM; - _GLOBAL_CONST unsigned short DB_IT_SQL_SYSTEM_FUNCTIONS; - _GLOBAL_CONST unsigned short DB_IT_SQL_SUBQUERIES; - _GLOBAL_CONST unsigned short DB_IT_SQL_STRING_FUNCTIONS; - _GLOBAL_CONST unsigned short DB_IT_SQL_STATIC_SENSITIVITY; - _GLOBAL_CONST unsigned short DB_IT_SQL_STATIC_CURSOR_ATTR2; - _GLOBAL_CONST unsigned short DB_IT_SQL_STATIC_CURSOR_ATTR1; - _GLOBAL_CONST unsigned short DB_IT_SQL_STD_CLI_CONFORMANCE; - _GLOBAL_CONST unsigned short DB_IT_SQL_SQL92_VALUE_EXPR; - _GLOBAL_CONST unsigned short DB_IT_SQL_SQL92_STRING_FUNCTIONS; - _GLOBAL_CONST unsigned short DB_IT_SQL_SQL92_ROW_VALUE_CTOR; - _GLOBAL_CONST unsigned short DB_IT_SQL_SQL92_REVOKE; - _GLOBAL_CONST unsigned short DB_IT_SQL_SQL92_REL_JOIN_OPS; - _GLOBAL_CONST unsigned short DB_IT_SQL_SQL92_PREDICATES; - _GLOBAL_CONST unsigned short DB_IT_SQL_SQL92_NUM_VALUE_FUNCS; - _GLOBAL_CONST unsigned short DB_IT_SQL_SQL92_GRANT; - _GLOBAL_CONST unsigned short DB_IT_SQL_SQL92_FK_UPDATE_RULE; - _GLOBAL_CONST unsigned short DB_IT_SQL_SQL92_FK_DELETE_RULE; - _GLOBAL_CONST unsigned short DB_IT_SQL_SQL92_DATETIME_FUNCS; - _GLOBAL_CONST unsigned short DB_IT_SQL_SQL_CONFORMANCE; - _GLOBAL_CONST unsigned short DB_IT_SQL_SPECIAL_CHARACTERS; - _GLOBAL_CONST unsigned short DB_IT_SQL_SERVER_NAME; - _GLOBAL_CONST unsigned short DB_IT_SQL_SEARCH_PATTERN_ESCAPE; - _GLOBAL_CONST unsigned short DB_IT_SQL_SCROLL_OPTIONS; - _GLOBAL_CONST unsigned short DB_IT_SQL_SCROLL_CONCURRENCY; - _GLOBAL_CONST unsigned short DB_IT_SQL_SCHEMA_USAGE; - _GLOBAL_CONST unsigned short DB_IT_SQL_SCHEMA_TERM; - _GLOBAL_CONST unsigned short DB_IT_SQL_ROW_UPDATES; - _GLOBAL_CONST unsigned short DB_IT_SQL_QUOTED_IDENTIFIER_CASE; - _GLOBAL_CONST unsigned short DB_IT_SQL_PROCEDURES; - _GLOBAL_CONST unsigned short DB_IT_SQL_PROCEDURE_TERM; - _GLOBAL_CONST unsigned short DB_IT_SQL_POSITIONED_STATEMENTS; - _GLOBAL_CONST unsigned short DB_IT_SQL_POS_OPERATIONS; - _GLOBAL_CONST unsigned short DB_IT_SQL_PARAM_ARRAY_SELECTS; - _GLOBAL_CONST unsigned short DB_IT_SQL_PARAM_ARRAY_ROW_COUNTS; - _GLOBAL_CONST unsigned short DB_IT_SQL_OUTER_JOINS; - _GLOBAL_CONST unsigned short DB_IT_SQL_ORDER_BY_COLS_IN_SEL; - _GLOBAL_CONST unsigned short DB_IT_SQL_OJ_CAPABILITIES; - _GLOBAL_CONST unsigned short DB_IT_SQL_ODBC_VER; - _GLOBAL_CONST unsigned short DB_IT_SQL_ODBC_SQL_CONFORMANCE; - _GLOBAL_CONST unsigned short DB_IT_SQL_ODBC_SAG_CLI_CONFORM; - _GLOBAL_CONST unsigned short DB_IT_SQL_ODBC_IFC_CONFORMANCE; - _GLOBAL_CONST unsigned short DB_IT_SQL_ODBC_API_CONFORMANCE; - _GLOBAL_CONST unsigned short DB_IT_SQL_NUMERIC_FUNCTIONS; - _GLOBAL_CONST unsigned short DB_IT_SQL_NULL_COLLATION; - _GLOBAL_CONST unsigned short DB_IT_SQL_NON_NULLABLE_COLUMNS; - _GLOBAL_CONST unsigned short DB_IT_SQL_NEED_LONG_DATA_LEN; - _GLOBAL_CONST unsigned short DB_IT_SQL_MULTIPLE_ACTIVE_TXN; - _GLOBAL_CONST unsigned short DB_IT_SQL_MULT_RESULT_SETS; - _GLOBAL_CONST unsigned short DB_IT_SQL_MAX_USER_NAME_LEN; - _GLOBAL_CONST unsigned short DB_IT_SQL_MAX_TABLES_IN_SELECT; - _GLOBAL_CONST unsigned short DB_IT_SQL_MAX_TABLE_NAME_LEN; - _GLOBAL_CONST unsigned short DB_IT_SQL_MAX_STATEMENT_LEN; - _GLOBAL_CONST unsigned short DB_IT_SQL_MAX_SCHEMA_NAME_LEN; - _GLOBAL_CONST unsigned short DB_IT_SQL_MAX_ROW_SIZE_INCL_LONG; - _GLOBAL_CONST unsigned short DB_IT_SQL_MAX_ROW_SIZE; - _GLOBAL_CONST unsigned short DB_IT_SQL_MAX_PROCEDURE_NAME_LEN; - _GLOBAL_CONST unsigned short DB_IT_SQL_MAX_INDEX_SIZE; - _GLOBAL_CONST unsigned short DB_IT_SQL_MAX_IDENTIFIER_LEN; - _GLOBAL_CONST unsigned short DB_IT_SQL_MAX_DRIVER_CONNECTIONS; - _GLOBAL_CONST unsigned short DB_IT_SQL_MAX_CURSOR_NAME_LEN; - _GLOBAL_CONST unsigned short DB_IT_SQL_MAX_CONCUR_ACTIVITIES; - _GLOBAL_CONST unsigned short DB_IT_SQL_MAX_COLUMNS_IN_TABLE; - _GLOBAL_CONST unsigned short DB_IT_SQL_MAX_COLUMNS_IN_SELECT; - _GLOBAL_CONST unsigned short DB_IT_SQL_MAX_COLS_IN_ORDER_BY; - _GLOBAL_CONST unsigned short DB_IT_SQL_MAX_COLUMNS_IN_INDEX; - _GLOBAL_CONST unsigned short DB_IT_SQL_MAX_COLS_IN_GROUP_BY; - _GLOBAL_CONST unsigned short DB_IT_SQL_MAX_COLUMN_NAME_LEN; - _GLOBAL_CONST unsigned short DB_IT_SQL_MAX_CHAR_LITERAL_LEN; - _GLOBAL_CONST unsigned short DB_IT_SQL_MAX_CATALOG_NAME_LEN; - _GLOBAL_CONST unsigned short DB_IT_SQL_MAX_BINARY_LITERAL_LEN; - _GLOBAL_CONST unsigned short DB_IT_SQL_MAX_ASYNC_CONCUR_STMT; - _GLOBAL_CONST unsigned short DB_IT_SQL_LOCK_TYPES; - _GLOBAL_CONST unsigned short DB_IT_SQL_LIKE_ESCAPE_CLAUSE; - _GLOBAL_CONST unsigned short DB_IT_SQL_KEYWORDS; - _GLOBAL_CONST unsigned short DB_IT_SQL_KEYSET_CURSOR_ATTR2; - _GLOBAL_CONST unsigned short DB_IT_SQL_KEYSET_CURSOR_ATTR1; - _GLOBAL_CONST unsigned short DB_IT_SQL_INTEGRITY; - _GLOBAL_CONST unsigned short DB_IT_SQL_INSERT_STATEMENT; - _GLOBAL_CONST unsigned short DB_IT_SQL_INFO_SCHEMA_VIEWS; - _GLOBAL_CONST unsigned short DB_IT_SQL_INDEX_KEYWORDS; - _GLOBAL_CONST unsigned short DB_IT_SQL_IDENTIFIER_QUOTE_CHAR; - _GLOBAL_CONST unsigned short DB_IT_SQL_IDENTIFIER_CASE; - _GLOBAL_CONST unsigned short DB_IT_SQL_GROUP_BY; - _GLOBAL_CONST unsigned short DB_IT_SQL_GETDATA_EXTENSIONS; - _GLOBAL_CONST unsigned short DB_IT_SQL_FORW_ONLY_CURSOR_ATTR2; - _GLOBAL_CONST unsigned short DB_IT_SQL_FORW_ONLY_CURSOR_ATTR1; - _GLOBAL_CONST unsigned short DB_IT_SQL_FILE_USAGE; - _GLOBAL_CONST unsigned short DB_IT_SQL_FETCH_DIRECTION; - _GLOBAL_CONST unsigned short DB_IT_SQL_EXPRESSIONS_IN_ORDERBY; - _GLOBAL_CONST unsigned short DB_IT_SQL_DYNAMIC_CURSOR_ATTR2; - _GLOBAL_CONST unsigned short DB_IT_SQL_DYNAMIC_CURSOR_ATTR1; - _GLOBAL_CONST unsigned short DB_IT_SQL_DROP_VIEW; - _GLOBAL_CONST unsigned short DB_IT_SQL_DROP_TRANSLATION; - _GLOBAL_CONST unsigned short DB_IT_SQL_DROP_TABLE; - _GLOBAL_CONST unsigned short DB_IT_SQL_DROP_SCHEMA; - _GLOBAL_CONST unsigned short DB_IT_SQL_DROP_DOMAIN; - _GLOBAL_CONST unsigned short DB_IT_SQL_DROP_COLLATION; - _GLOBAL_CONST unsigned short DB_IT_SQL_DROP_CHARACTER_SET; - _GLOBAL_CONST unsigned short DB_IT_SQL_DROP_ASSERTION; - _GLOBAL_CONST unsigned short DB_IT_SQL_DRIVER_VER; - _GLOBAL_CONST unsigned short DB_IT_SQL_DRIVER_ODBC_VER; - _GLOBAL_CONST unsigned short DB_IT_SQL_DRIVER_NAME; - _GLOBAL_CONST unsigned short DB_IT_SQL_DRIVER_HSTMT; - _GLOBAL_CONST unsigned short DB_IT_SQL_DRIVER_HENV; - _GLOBAL_CONST unsigned short DB_IT_SQL_DRIVER_HDBC; - _GLOBAL_CONST unsigned short DB_IT_SQL_DESCRIBE_PARAMETER; - _GLOBAL_CONST unsigned short DB_IT_SQL_DEFAULT_TXN_ISOLATION; - _GLOBAL_CONST unsigned short DB_IT_SQL_DDL_INDEX; - _GLOBAL_CONST unsigned short DB_IT_SQL_DBMS_VER; - _GLOBAL_CONST unsigned short DB_IT_SQL_DBMS_NAME; - _GLOBAL_CONST unsigned short DB_IT_SQL_DATETIME_LITERALS; - _GLOBAL_CONST unsigned short DB_IT_SQL_DATABASE_NAME; - _GLOBAL_CONST unsigned short DB_IT_SQL_DATA_SOURCE_READ_ONLY; - _GLOBAL_CONST unsigned short DB_IT_SQL_DATA_SOURCE_NAME; - _GLOBAL_CONST unsigned short DB_IT_SQL_CURSOR_SENSITIVITY; - _GLOBAL_CONST unsigned short DB_IT_SQL_CURSOR_ROLLBACK_BEHAV; - _GLOBAL_CONST unsigned short DB_IT_SQL_CURSOR_COMMIT_BEHAVIOR; - _GLOBAL_CONST unsigned short DB_IT_SQL_CREATE_VIEW; - _GLOBAL_CONST unsigned short DB_IT_SQL_CREATE_TRANSLATION; - _GLOBAL_CONST unsigned short DB_IT_SQL_CREATE_TABLE; - _GLOBAL_CONST unsigned short DB_IT_SQL_CREATE_SCHEMA; - _GLOBAL_CONST unsigned short DB_IT_SQL_CREATE_DOMAIN; - _GLOBAL_CONST unsigned short DB_IT_SQL_CREATE_COLLATION; - _GLOBAL_CONST unsigned short DB_IT_SQL_CREATE_CHARACTER_SET; - _GLOBAL_CONST unsigned short DB_IT_SQL_CREATE_ASSERTION; - _GLOBAL_CONST unsigned short DB_IT_SQL_CORRELATION_NAME; - _GLOBAL_CONST unsigned short DB_IT_SQL_CONVERT_WVARCHAR; - _GLOBAL_CONST unsigned short DB_IT_SQL_CONVERT_WLONGVARCHAR; - _GLOBAL_CONST unsigned short DB_IT_SQL_CONVERT_WCHAR; - _GLOBAL_CONST unsigned short DB_IT_SQL_CONVERT_VARCHAR; - _GLOBAL_CONST unsigned short DB_IT_SQL_CONVERT_VARBINARY; - _GLOBAL_CONST unsigned short DB_IT_SQL_CONVERT_TINYINT; - _GLOBAL_CONST unsigned short DB_IT_SQL_CONVERT_TIMESTAMP; - _GLOBAL_CONST unsigned short DB_IT_SQL_CONVERT_SMALLINT; - _GLOBAL_CONST unsigned short DB_IT_SQL_CONVERT_REAL; - _GLOBAL_CONST unsigned short DB_IT_SQL_CONVERT_NUMERIC; - _GLOBAL_CONST unsigned short DB_IT_SQL_CONVERT_LONGVARCHAR; - _GLOBAL_CONST unsigned short DB_IT_SQL_CONVERT_LONGVARBINARY; - _GLOBAL_CONST unsigned short DB_IT_SQL_CONVERT_INTEGER; - _GLOBAL_CONST unsigned short DB_IT_SQL_CONVERT_FUNCTIONS; - _GLOBAL_CONST unsigned short DB_IT_SQL_CONVERT_FLOAT; - _GLOBAL_CONST unsigned short DB_IT_SQL_CONVERT_DECIMAL; - _GLOBAL_CONST unsigned short DB_IT_SQL_CONVERT_CHAR; - _GLOBAL_CONST unsigned short DB_IT_SQL_CONVERT_BIT; - _GLOBAL_CONST unsigned short DB_IT_SQL_CONVERT_BINARY; - _GLOBAL_CONST unsigned short DB_IT_SQL_CONCAT_NULL_BEHAVIOR; - _GLOBAL_CONST unsigned short DB_IT_SQL_COLUMN_ALIAS; - _GLOBAL_CONST unsigned short DB_IT_SQL_CATALOG_USAGE; - _GLOBAL_CONST unsigned short DB_IT_SQL_CATALOG_TERM; - _GLOBAL_CONST unsigned short DB_IT_SQL_CATALOG_NAME_SEPARATOR; - _GLOBAL_CONST unsigned short DB_IT_SQL_CATALOG_NAME; - _GLOBAL_CONST unsigned short DB_IT_SQL_CATALOG_LOCATION; - _GLOBAL_CONST unsigned short DB_IT_SQL_BOOKMARK_PERSISTENCE; - _GLOBAL_CONST unsigned short DB_IT_SQL_BATCH_SUPPORT; - _GLOBAL_CONST unsigned short DB_IT_SQL_BATCH_ROW_COUNT; - _GLOBAL_CONST unsigned short DB_IT_SQL_ASYNC_MODE; - _GLOBAL_CONST unsigned short DB_IT_SQL_ALTER_TABLE; - _GLOBAL_CONST unsigned short DB_IT_SQL_ALTER_DOMAIN; - _GLOBAL_CONST unsigned short DB_IT_SQL_AGGREGATE_FUNCTIONS; - _GLOBAL_CONST unsigned short DB_IT_SQL_ACTIVE_ENVIRONMENTS; - _GLOBAL_CONST unsigned short DB_IT_SQL_ACCESSIBLE_TABLES; - _GLOBAL_CONST signed short DB_SQL_GUID; - _GLOBAL_CONST signed short DB_SQL_TIMESTAMP; - _GLOBAL_CONST signed short DB_SQL_TIME; - _GLOBAL_CONST signed short DB_SQL_DATE; - _GLOBAL_CONST signed short DB_SQL_DOUBLE; - _GLOBAL_CONST signed short DB_SQL_REAL; - _GLOBAL_CONST signed short DB_SQL_TINYINT; - _GLOBAL_CONST signed short DB_SQL_SMALLINT; - _GLOBAL_CONST signed short DB_SQL_INTEGER; - _GLOBAL_CONST signed short DB_SQL_BIGINT; - _GLOBAL_CONST signed short DB_SQL_DECIMAL; - _GLOBAL_CONST signed short DB_SQL_NUMERIC; - _GLOBAL_CONST signed short DB_SQL_CHAR; - _GLOBAL_CONST signed short DB_SQL_NO_DATA; - _GLOBAL_CONST signed short DB_SQL_INVALID_HANDLE; - _GLOBAL_CONST signed short DB_SQL_ERROR; - _GLOBAL_CONST unsigned short DB_DEFAULT_PORT; - _GLOBAL_CONST unsigned short DB_SYSTEM_MS_SQL; - _GLOBAL_CONST unsigned short DB_SYSTEM_SYBASE; -#endif - - - - -/* Datatypes and datatypes of function blocks */ -typedef struct dbConnect -{ - /* VAR_INPUT (analog) */ - unsigned long pServerName; - unsigned long pUserName; - unsigned long pPassword; - unsigned long pDatabaseName; - unsigned long databaseSystem; - /* VAR_OUTPUT (analog) */ - unsigned short status; - signed short dbError; - unsigned long connectionIdent; - /* VAR (analog) */ - unsigned short _statemachine; - unsigned short _result; - /* VAR_INPUT (digital) */ - plcbit enable; -} dbConnect_typ; - -typedef struct dbConnectEnc -{ - /* VAR_INPUT (analog) */ - unsigned long pServerName; - unsigned long pUserName; - unsigned long pPassword; - unsigned long pDatabaseName; - unsigned long databaseSystem; - unsigned long pEncoding; - /* VAR_OUTPUT (analog) */ - unsigned short status; - signed short dbError; - unsigned long connectionIdent; - /* VAR (analog) */ - unsigned short _statemachine; - unsigned short _result; - /* VAR_INPUT (digital) */ - plcbit enable; -} dbConnectEnc_typ; - -typedef struct dbExecuteSql -{ - /* VAR_INPUT (analog) */ - unsigned long connectionIdent; - unsigned long pSqlStatement; - /* VAR_OUTPUT (analog) */ - unsigned short status; - signed short dbError; - /* VAR (analog) */ - unsigned short _statemachine; - unsigned short _result; - /* VAR_INPUT (digital) */ - plcbit enable; -} dbExecuteSql_typ; - -typedef struct dbGetAffectedRows -{ - /* VAR_INPUT (analog) */ - unsigned long connectionIdent; - /* VAR_OUTPUT (analog) */ - unsigned short status; - signed short dbError; - unsigned long affectedRows; - /* VAR (analog) */ - unsigned short _statemachine; - unsigned short _result; - /* VAR_INPUT (digital) */ - plcbit enable; -} dbGetAffectedRows_typ; - -typedef struct dbGetColumnCount -{ - /* VAR_INPUT (analog) */ - unsigned long connectionIdent; - /* VAR_OUTPUT (analog) */ - unsigned short status; - signed short dbError; - signed short columnCount; - /* VAR (analog) */ - unsigned short _statemachine; - unsigned short _result; - /* VAR_INPUT (digital) */ - plcbit enable; -} dbGetColumnCount_typ; - -typedef struct dbFetchNextRow -{ - /* VAR_INPUT (analog) */ - unsigned long connectionIdent; - /* VAR_OUTPUT (analog) */ - unsigned short status; - signed short dbError; - /* VAR (analog) */ - unsigned short _statemachine; - unsigned short _result; - /* VAR_INPUT (digital) */ - plcbit enable; -} dbFetchNextRow_typ; - -typedef struct dbGetData -{ - /* VAR_INPUT (analog) */ - unsigned long connectionIdent; - unsigned long columnIdx; - signed short dataType; - unsigned long pData; - unsigned long dataSize; - /* VAR_OUTPUT (analog) */ - unsigned short status; - signed short dbError; - unsigned long actDataSize; - /* VAR_INPUT (digital) */ - plcbit enable; -} dbGetData_typ; - -typedef struct dbDisconnect -{ - /* VAR_INPUT (analog) */ - unsigned long connectionIdent; - /* VAR_OUTPUT (analog) */ - unsigned short status; - signed short dbError; - /* VAR (analog) */ - unsigned short _statemachine; - unsigned short _result; - /* VAR_INPUT (digital) */ - plcbit enable; -} dbDisconnect_typ; - -typedef struct dbGetInfo -{ - /* VAR_INPUT (analog) */ - unsigned long connectionIdent; - unsigned short infoType; - unsigned long pServerInfo; - unsigned long serverInfoSize; - /* VAR_OUTPUT (analog) */ - unsigned short status; - signed short dbError; - unsigned short actServerInfoSize; - /* VAR (analog) */ - unsigned short _statemachine; - unsigned short _result; - /* VAR_INPUT (digital) */ - plcbit enable; -} dbGetInfo_typ; - -typedef struct dbGetErrorMessage -{ - /* VAR_INPUT (analog) */ - unsigned long connectionIdent; - unsigned long pErrorMessage; - unsigned long errorMessageSize; - /* VAR_OUTPUT (analog) */ - unsigned short status; - signed short dbError; - unsigned char sqlState[6]; - signed long nativeError; - signed short actErrorMessageSize; - /* VAR (analog) */ - unsigned short _statemachine; - unsigned short _result; - /* VAR_INPUT (digital) */ - plcbit enable; -} dbGetErrorMessage_typ; - - - -/* Prototyping of functions and function blocks */ -_BUR_PUBLIC void dbConnect(struct dbConnect* inst); -_BUR_PUBLIC void dbConnectEnc(struct dbConnectEnc* inst); -_BUR_PUBLIC void dbExecuteSql(struct dbExecuteSql* inst); -_BUR_PUBLIC void dbGetAffectedRows(struct dbGetAffectedRows* inst); -_BUR_PUBLIC void dbGetColumnCount(struct dbGetColumnCount* inst); -_BUR_PUBLIC void dbFetchNextRow(struct dbFetchNextRow* inst); -_BUR_PUBLIC void dbGetData(struct dbGetData* inst); -_BUR_PUBLIC void dbDisconnect(struct dbDisconnect* inst); -_BUR_PUBLIC void dbGetInfo(struct dbGetInfo* inst); -_BUR_PUBLIC void dbGetErrorMessage(struct dbGetErrorMessage* inst); - - -#ifdef __cplusplus -}; -#endif -#endif /* _ASDB_ */ - diff --git a/example/AsProject/Logical/Libraries/_AS/AsDb/binary.lby b/example/AsProject/Logical/Libraries/_AS/AsDb/binary.lby deleted file mode 100644 index 169426c..0000000 --- a/example/AsProject/Logical/Libraries/_AS/AsDb/binary.lby +++ /dev/null @@ -1,12 +0,0 @@ - - - - - AsDb.fun - AsDb.typ - AsDb.var - - - - - \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/_AS/AsEPL/SG4/AsEPL.h b/example/AsProject/Logical/Libraries/_AS/AsEPL/SG4/AsEPL.h index 8b53e79..9508119 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsEPL/SG4/AsEPL.h +++ b/example/AsProject/Logical/Libraries/_AS/AsEPL/SG4/AsEPL.h @@ -15,41 +15,6 @@ extern "C" #ifndef _BUR_PUBLIC #define _BUR_PUBLIC #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define ERR_ASEPL_NOT_IMPLEMENTED 31399U - #define ERR_ASEPL_NILPOINTER 31392U - #define ERR_ASEPL_SUBINDEX_DOESNOTEXIST 31349U - #define ERR_ASEPL_INDEX_DOESNOTEXIST 31348U - #define ERR_ASEPL_SUBINDEX_EXISTS 31347U - #define ERR_ASEPL_INDEX_EXISTS 31346U - #define ERR_ASEPL_PARAM_OUTOFRANGE 31345U - #define ERR_ASEPL_ACCESS_FAILED 31344U - #define ERR_ASEPL_CN_ONLY 31343U - #define ERR_ASEPL_MN_ONLY 31342U - #define ERR_ASEPL_WRONG_DEVICE 31341U - #define ERR_ASEPL_BASE 31340U -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST unsigned short ERR_ASEPL_NOT_IMPLEMENTED; - _GLOBAL_CONST unsigned short ERR_ASEPL_NILPOINTER; - _GLOBAL_CONST unsigned short ERR_ASEPL_SUBINDEX_DOESNOTEXIST; - _GLOBAL_CONST unsigned short ERR_ASEPL_INDEX_DOESNOTEXIST; - _GLOBAL_CONST unsigned short ERR_ASEPL_SUBINDEX_EXISTS; - _GLOBAL_CONST unsigned short ERR_ASEPL_INDEX_EXISTS; - _GLOBAL_CONST unsigned short ERR_ASEPL_PARAM_OUTOFRANGE; - _GLOBAL_CONST unsigned short ERR_ASEPL_ACCESS_FAILED; - _GLOBAL_CONST unsigned short ERR_ASEPL_CN_ONLY; - _GLOBAL_CONST unsigned short ERR_ASEPL_MN_ONLY; - _GLOBAL_CONST unsigned short ERR_ASEPL_WRONG_DEVICE; - _GLOBAL_CONST unsigned short ERR_ASEPL_BASE; -#endif - - - - /* Datatypes and datatypes of function blocks */ typedef struct EPL_I_TYPE { unsigned long init; @@ -68,7 +33,7 @@ typedef struct EPL_I_TYPE typedef struct EplSDORead { /* VAR_INPUT (analog) */ - plcstring (*pDevice); + plcstring *pDevice; unsigned char node; unsigned short index; unsigned char subindex; @@ -87,7 +52,7 @@ typedef struct EplSDORead typedef struct EplSDOWrite { /* VAR_INPUT (analog) */ - plcstring (*pDevice); + plcstring *pDevice; unsigned char node; unsigned short index; unsigned char subindex; @@ -105,7 +70,7 @@ typedef struct EplSDOWrite typedef struct EplGetLocalNodeID { /* VAR_INPUT (analog) */ - plcstring (*pDevice); + plcstring *pDevice; /* VAR_OUTPUT (analog) */ unsigned short status; unsigned char nodeid; @@ -116,7 +81,7 @@ typedef struct EplGetLocalNodeID typedef struct EplCreateObject { /* VAR_INPUT (analog) */ - plcstring (*pDevice); + plcstring *pDevice; unsigned short index; unsigned char subindex; unsigned long datalen; @@ -129,7 +94,7 @@ typedef struct EplCreateObject typedef struct EplDeleteObject { /* VAR_INPUT (analog) */ - plcstring (*pDevice); + plcstring *pDevice; unsigned short index; unsigned char subindex; /* VAR_OUTPUT (analog) */ @@ -148,6 +113,38 @@ _BUR_PUBLIC void EplCreateObject(struct EplCreateObject* inst); _BUR_PUBLIC void EplDeleteObject(struct EplDeleteObject* inst); +/* Constants */ +#ifdef _REPLACE_CONST + #define ERR_ASEPL_NOT_IMPLEMENTED 31399U + #define ERR_ASEPL_NILPOINTER 31392U + #define ERR_ASEPL_SUBINDEX_DOESNOTEXIST 31349U + #define ERR_ASEPL_INDEX_DOESNOTEXIST 31348U + #define ERR_ASEPL_SUBINDEX_EXISTS 31347U + #define ERR_ASEPL_INDEX_EXISTS 31346U + #define ERR_ASEPL_PARAM_OUTOFRANGE 31345U + #define ERR_ASEPL_ACCESS_FAILED 31344U + #define ERR_ASEPL_CN_ONLY 31343U + #define ERR_ASEPL_MN_ONLY 31342U + #define ERR_ASEPL_WRONG_DEVICE 31341U + #define ERR_ASEPL_BASE 31340U +#else + _GLOBAL_CONST unsigned short ERR_ASEPL_NOT_IMPLEMENTED; + _GLOBAL_CONST unsigned short ERR_ASEPL_NILPOINTER; + _GLOBAL_CONST unsigned short ERR_ASEPL_SUBINDEX_DOESNOTEXIST; + _GLOBAL_CONST unsigned short ERR_ASEPL_INDEX_DOESNOTEXIST; + _GLOBAL_CONST unsigned short ERR_ASEPL_SUBINDEX_EXISTS; + _GLOBAL_CONST unsigned short ERR_ASEPL_INDEX_EXISTS; + _GLOBAL_CONST unsigned short ERR_ASEPL_PARAM_OUTOFRANGE; + _GLOBAL_CONST unsigned short ERR_ASEPL_ACCESS_FAILED; + _GLOBAL_CONST unsigned short ERR_ASEPL_CN_ONLY; + _GLOBAL_CONST unsigned short ERR_ASEPL_MN_ONLY; + _GLOBAL_CONST unsigned short ERR_ASEPL_WRONG_DEVICE; + _GLOBAL_CONST unsigned short ERR_ASEPL_BASE; +#endif + + + + #ifdef __cplusplus }; #endif diff --git a/example/AsProject/Logical/Libraries/_AS/AsEPL/binary.lby b/example/AsProject/Logical/Libraries/_AS/AsEPL/binary.lby index 8f85282..04c1a79 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsEPL/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/AsEPL/binary.lby @@ -1,12 +1,12 @@ - - - - - AsEPL.fun - AsEPL.typ - AsEPL.var - - - - - \ No newline at end of file + + + + + AsEPL.fun + AsEPL.typ + AsEPL.var + + + + + diff --git a/example/AsProject/Logical/Libraries/_AS/AsGuard/SG4/AsGuard.h b/example/AsProject/Logical/Libraries/_AS/AsGuard/SG4/AsGuard.h index 81482d0..e638e6f 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsGuard/SG4/AsGuard.h +++ b/example/AsProject/Logical/Libraries/_AS/AsGuard/SG4/AsGuard.h @@ -15,79 +15,6 @@ extern "C" #ifndef _BUR_PUBLIC #define _BUR_PUBLIC #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define guardCUSTOMER_OP_TIME_COUNTER 2U - #define guardGENERAL_OP_TIME_COUNTER 1U - #define guardREGISTER_IF_AVAILABLE 2U - #define guardREGISTER_ALWAYS 1U - #define guardLIC_REACT_SERVICE 8U - #define guardLIC_REACT_BOOT_SERVICE 4U - #define guardLIC_REACT_BLINK_CPU_LED 2U - #define guardLIC_REACT_LOGBOOK 1U - #define guardLIC_REACT_NONE 0U - #define guardBR_FIRMCODE 101652U - #define guardERR_ALREADY_STARTED 37323U - #define guardERR_LICENSE_STATUS_UNKNOWN 37322U - #define guardERR_DATA_SIZE 37321U - #define guardERR_UNAVAILABLE 37317U - #define guardERR_INVALID_PARAM 37316U - #define guardERR_CONTEXT_SIZE 37315U - #define guardERR_DONGLE_NOT_FOUND 37314U - #define guardERR_TASK 37313U - #define guardERR_LIC_NOT_INITIALIZED 37312U - #define guardERR_FILE_NOT_FOUND 37311U - #define guardERR_EXECUTE_UPDATE 37310U - #define guardERR_CREATE_CONTEXT_FILE 37309U - #define guardERR_CREATE_UPDATE_CONTEXT 37308U - #define guardERR_SERVICE_VIOLATION 37307U - #define guardERR_VIOLATION 37306U - #define guardERR_ACCESS 37305U - #define guardERR_NOT_STARTED 37304U - #define guardERR_MEMORY 37303U - #define guardERR_BUFFERSIZE 37302U - #define guardERR_GENERAL 37301U - #define guardERR_NULLPOINTER 37300U -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST unsigned long guardCUSTOMER_OP_TIME_COUNTER; - _GLOBAL_CONST unsigned long guardGENERAL_OP_TIME_COUNTER; - _GLOBAL_CONST plcdword guardREGISTER_IF_AVAILABLE; - _GLOBAL_CONST plcdword guardREGISTER_ALWAYS; - _GLOBAL_CONST plcdword guardLIC_REACT_SERVICE; - _GLOBAL_CONST plcdword guardLIC_REACT_BOOT_SERVICE; - _GLOBAL_CONST plcdword guardLIC_REACT_BLINK_CPU_LED; - _GLOBAL_CONST plcdword guardLIC_REACT_LOGBOOK; - _GLOBAL_CONST plcdword guardLIC_REACT_NONE; - _GLOBAL_CONST unsigned long guardBR_FIRMCODE; - _GLOBAL_CONST unsigned short guardERR_ALREADY_STARTED; - _GLOBAL_CONST unsigned short guardERR_LICENSE_STATUS_UNKNOWN; - _GLOBAL_CONST unsigned short guardERR_DATA_SIZE; - _GLOBAL_CONST unsigned short guardERR_UNAVAILABLE; - _GLOBAL_CONST unsigned short guardERR_INVALID_PARAM; - _GLOBAL_CONST unsigned short guardERR_CONTEXT_SIZE; - _GLOBAL_CONST unsigned short guardERR_DONGLE_NOT_FOUND; - _GLOBAL_CONST unsigned short guardERR_TASK; - _GLOBAL_CONST unsigned short guardERR_LIC_NOT_INITIALIZED; - _GLOBAL_CONST unsigned short guardERR_FILE_NOT_FOUND; - _GLOBAL_CONST unsigned short guardERR_EXECUTE_UPDATE; - _GLOBAL_CONST unsigned short guardERR_CREATE_CONTEXT_FILE; - _GLOBAL_CONST unsigned short guardERR_CREATE_UPDATE_CONTEXT; - _GLOBAL_CONST unsigned short guardERR_SERVICE_VIOLATION; - _GLOBAL_CONST unsigned short guardERR_VIOLATION; - _GLOBAL_CONST unsigned short guardERR_ACCESS; - _GLOBAL_CONST unsigned short guardERR_NOT_STARTED; - _GLOBAL_CONST unsigned short guardERR_MEMORY; - _GLOBAL_CONST unsigned short guardERR_BUFFERSIZE; - _GLOBAL_CONST unsigned short guardERR_GENERAL; - _GLOBAL_CONST unsigned short guardERR_NULLPOINTER; -#endif - - - - /* Datatypes and datatypes of function blocks */ typedef struct dongleInfo_t { unsigned short boxMask; @@ -361,6 +288,76 @@ _BUR_PUBLIC void guardGetDongleLicenses(struct guardGetDongleLicenses* inst); _BUR_PUBLIC void guardGetNeededLicenses(struct guardGetNeededLicenses* inst); +/* Constants */ +#ifdef _REPLACE_CONST + #define guardCUSTOMER_OP_TIME_COUNTER 2U + #define guardGENERAL_OP_TIME_COUNTER 1U + #define guardREGISTER_IF_AVAILABLE 2U + #define guardREGISTER_ALWAYS 1U + #define guardLIC_REACT_SERVICE 8U + #define guardLIC_REACT_BOOT_SERVICE 4U + #define guardLIC_REACT_BLINK_CPU_LED 2U + #define guardLIC_REACT_LOGBOOK 1U + #define guardLIC_REACT_NONE 0U + #define guardBR_FIRMCODE 101652U + #define guardERR_ALREADY_STARTED 37323U + #define guardERR_LICENSE_STATUS_UNKNOWN 37322U + #define guardERR_DATA_SIZE 37321U + #define guardERR_UNAVAILABLE 37317U + #define guardERR_INVALID_PARAM 37316U + #define guardERR_CONTEXT_SIZE 37315U + #define guardERR_DONGLE_NOT_FOUND 37314U + #define guardERR_TASK 37313U + #define guardERR_LIC_NOT_INITIALIZED 37312U + #define guardERR_FILE_NOT_FOUND 37311U + #define guardERR_EXECUTE_UPDATE 37310U + #define guardERR_CREATE_CONTEXT_FILE 37309U + #define guardERR_CREATE_UPDATE_CONTEXT 37308U + #define guardERR_SERVICE_VIOLATION 37307U + #define guardERR_VIOLATION 37306U + #define guardERR_ACCESS 37305U + #define guardERR_NOT_STARTED 37304U + #define guardERR_MEMORY 37303U + #define guardERR_BUFFERSIZE 37302U + #define guardERR_GENERAL 37301U + #define guardERR_NULLPOINTER 37300U +#else + _GLOBAL_CONST unsigned long guardCUSTOMER_OP_TIME_COUNTER; + _GLOBAL_CONST unsigned long guardGENERAL_OP_TIME_COUNTER; + _GLOBAL_CONST plcdword guardREGISTER_IF_AVAILABLE; + _GLOBAL_CONST plcdword guardREGISTER_ALWAYS; + _GLOBAL_CONST plcdword guardLIC_REACT_SERVICE; + _GLOBAL_CONST plcdword guardLIC_REACT_BOOT_SERVICE; + _GLOBAL_CONST plcdword guardLIC_REACT_BLINK_CPU_LED; + _GLOBAL_CONST plcdword guardLIC_REACT_LOGBOOK; + _GLOBAL_CONST plcdword guardLIC_REACT_NONE; + _GLOBAL_CONST unsigned long guardBR_FIRMCODE; + _GLOBAL_CONST unsigned short guardERR_ALREADY_STARTED; + _GLOBAL_CONST unsigned short guardERR_LICENSE_STATUS_UNKNOWN; + _GLOBAL_CONST unsigned short guardERR_DATA_SIZE; + _GLOBAL_CONST unsigned short guardERR_UNAVAILABLE; + _GLOBAL_CONST unsigned short guardERR_INVALID_PARAM; + _GLOBAL_CONST unsigned short guardERR_CONTEXT_SIZE; + _GLOBAL_CONST unsigned short guardERR_DONGLE_NOT_FOUND; + _GLOBAL_CONST unsigned short guardERR_TASK; + _GLOBAL_CONST unsigned short guardERR_LIC_NOT_INITIALIZED; + _GLOBAL_CONST unsigned short guardERR_FILE_NOT_FOUND; + _GLOBAL_CONST unsigned short guardERR_EXECUTE_UPDATE; + _GLOBAL_CONST unsigned short guardERR_CREATE_CONTEXT_FILE; + _GLOBAL_CONST unsigned short guardERR_CREATE_UPDATE_CONTEXT; + _GLOBAL_CONST unsigned short guardERR_SERVICE_VIOLATION; + _GLOBAL_CONST unsigned short guardERR_VIOLATION; + _GLOBAL_CONST unsigned short guardERR_ACCESS; + _GLOBAL_CONST unsigned short guardERR_NOT_STARTED; + _GLOBAL_CONST unsigned short guardERR_MEMORY; + _GLOBAL_CONST unsigned short guardERR_BUFFERSIZE; + _GLOBAL_CONST unsigned short guardERR_GENERAL; + _GLOBAL_CONST unsigned short guardERR_NULLPOINTER; +#endif + + + + #ifdef __cplusplus }; #endif diff --git a/example/AsProject/Logical/Libraries/_AS/AsGuard/binary.lby b/example/AsProject/Logical/Libraries/_AS/AsGuard/binary.lby index f59d7c4..39006ac 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsGuard/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/AsGuard/binary.lby @@ -1,12 +1,12 @@ - - - - - AsGuard.fun - AsGuard.typ - AsGuard.var - - - - - \ No newline at end of file + + + + + AsGuard.fun + AsGuard.typ + AsGuard.var + + + + + diff --git a/example/AsProject/Logical/Libraries/_AS/AsHttp/AsHttp.fun b/example/AsProject/Logical/Libraries/_AS/AsHttp/AsHttp.fun index b3bd81c..c5be106 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsHttp/AsHttp.fun +++ b/example/AsProject/Logical/Libraries/_AS/AsHttp/AsHttp.fun @@ -150,6 +150,46 @@ END_FUNCTION_BLOCK END_VAR END_FUNCTION_BLOCK +{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK httpsClientMcs (*sends and recieves HTTPs messages using MCS (web requests); asynchronous execution*) + VAR_INPUT + enable : BOOL; (*enables execution; asynchronous execution*) + send : BOOL; (*sends request data on positive edge*) + abort : BOOL; (*disconnects and resets client state on positive edge*) + option : UDINT; (*options, e.g protocol version (HTTP1.0 / 1.1)*) + mcsStore : AsHttpMcsType; (*Managed Certificate Store Struct*) + pHost : UDINT; (*host name or ip of server to connect to given as a pointer*) + hostPort : UINT; (*port number of server to connect to*) + method : UDINT; (*request method see httpMETHOD_XXX*) + pUri : UDINT; (*request uri given as a pointer, e.g. "/index.html" or "/hello.cgi?name=myName"*) + pRequestHeader : UDINT; (*pointer to httpRequestHeader_t, optional*) + pRequestData : UDINT; (*pointer to request data, typically string data*) + requestDataLen : UDINT; (*length of request data*) + pResponseHeader : UDINT; (*pointer to httpResponseHeader_t, optional*) + pResponseData : UDINT; (*pointer to response data buffer, typically string data*) + responseDataSize : UDINT; (*size of response data buffer*) + pStatistics : UDINT; (*pointer to httpStatistics_t, optional*) + pStruct : UDINT; (*reserve*) + END_VAR + VAR_OUTPUT + status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, +0xXXXX = see help*) + tcpStatus : UINT; (*status of the tls connection (tcp and tls)*) + httpStatus : UINT; (*status code of response, e.g. 200 for "OK", 404 for "Not Found"*) + responseDataLen : UDINT; (*length of response (bytes)*) + phase : UINT; (*current phase of request response handling of the webservice, see httpPHASE_XXX*) + END_VAR + VAR + _i_state : UDINT; (*internal variable*) + _i_result : UINT; (*internal variable*) + _ident : UDINT; (*internal variable*) + _oldEnable : UDINT; (*internal variable*) + _oldAbort : UDINT; (*internal variable*) + _oldSend : UDINT; (*internal variable*) + _state : UDINT; (*internal variable*) + _internal : UDINT; (*internal variable*) + END_VAR +END_FUNCTION_BLOCK + {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK httpUtf8ToString (*converts a UTF8 string in string with respect to given code page mapping*) VAR_INPUT enable : BOOL; (*enables execution*) diff --git a/example/AsProject/Logical/Libraries/_AS/AsHttp/AsHttp.typ b/example/AsProject/Logical/Libraries/_AS/AsHttp/AsHttp.typ index 0902f16..f9f1235 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsHttp/AsHttp.typ +++ b/example/AsProject/Logical/Libraries/_AS/AsHttp/AsHttp.typ @@ -37,4 +37,15 @@ TYPE errorCounter : UDINT; (*counts errors, e.g. connection errors, aborts *) lastError : UDINT; (*error number, if any*) END_STRUCT; + + AsHttpCipherVersionEnum : + ( + asHTTP_TLS_1_3 := 2 (*TLS 1.3*) (**) (*#PAR*) + ); + + AsHttpMcsType : STRUCT + name : STRING[255]; (*Managed Certificate Store name*) + tlsVersion : AsHttpCipherVersionEnum; (*TLS version*) + trustListValidation : BOOL; (*Enables/disables trust list validation*) + END_STRUCT; END_TYPE diff --git a/example/AsProject/Logical/Libraries/_AS/AsHttp/AsHttp.var b/example/AsProject/Logical/Libraries/_AS/AsHttp/AsHttp.var index 975316e..6e35e9c 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsHttp/AsHttp.var +++ b/example/AsProject/Logical/Libraries/_AS/AsHttp/AsHttp.var @@ -18,6 +18,7 @@ VAR CONSTANT httpERR_ILLEGAL_CHARACTERS : UINT := 35566; (*source contains characters, that couldn't be transformd*) httpERR_SSL_HANDSHAKE_FAILED : UINT := 35567; (*client handshake failed*) httpERR_INVALID_SSL_CONFIG : UINT := 35568; (*Could not open ssl configuration*) + httpERR_INVALID_MCS_CONFIG : UINT := 35569; (*invalid MCS configuration given*) httpERR_SYSTEM : UINT := 35579; (*general error, see help*) httpMETHOD_GET : UINT := 1; (*request method GET, additional request parameters are part of the URL*) httpMETHOD_POST : UINT := 2; (*request method POST, request contains a message body*) diff --git a/example/AsProject/Logical/Libraries/_AS/AsHttp/SG4/AsHttp.h b/example/AsProject/Logical/Libraries/_AS/AsHttp/SG4/AsHttp.h index 6049eae..931b25a 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsHttp/SG4/AsHttp.h +++ b/example/AsProject/Logical/Libraries/_AS/AsHttp/SG4/AsHttp.h @@ -15,88 +15,11 @@ extern "C" #ifndef _BUR_PUBLIC #define _BUR_PUBLIC #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define httpPHASE_WAITING 4U - #define httpPHASE_RECEIVED 3U - #define httpPHASE_RECEIVING 2U - #define httpPHASE_SENDING 1U - #define httpPHASE_NOT_CONNECTED 0U - #define httpOPTION_SERVICE_TYPE_LEAF 8U - #define httpOPTION_SERVICE_TYPE_EXT 6U - #define httpOPTION_SERVICE_TYPE_NAME 2U - #define httpOPTION_SERVICE_TYPE_ROOT 4U - #define httpOPTION_HTTP_11 1U - #define httpOPTION_HTTP_10 0U - #define httpMETHOD_DELETE 4U - #define httpMETHOD_PUT 3U - #define httpMETHOD_POST 2U - #define httpMETHOD_GET 1U - #define httpERR_SYSTEM 35579U - #define httpERR_INVALID_SSL_CONFIG 35568U - #define httpERR_SSL_HANDSHAKE_FAILED 35567U - #define httpERR_ILLEGAL_CHARACTERS 35566U - #define httpERR_NOT_FOUND 35565U - #define httpERR_CLIENT_TCP_DISCONNECTED 35564U - #define httpERR_CLIENT_TCP_INVALID_HOST 35563U - #define httpERR_CLIENT_TCP_CONN_FAILED 35562U - #define httpERR_CLIENT_TCP_CONN_CLOSED 35561U - #define httpERR_CLIENT_NO_MORE_IDENTS 35560U - #define httpERR_CLIENT_ERR_SOCKET_CREATE 35559U - #define httpERR_SERVICE_LINK_FAILED 35558U - #define httpERR_SERVICE_NO_WEBSERVER 35557U - #define httpERR_METHOD_UNSUPPORTED 35556U - #define httpERR_NO_DATA 35555U - #define httpERR_INVALID_PARAM 35554U - #define httpERR_HEADER_SIZE_USERLINE 35553U - #define httpERR_HEADER_SIZE_RAW 35552U - #define httpERR_DATA_SIZE 35551U - #define httpERR_BUFFER_SIZE 35550U -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST unsigned short httpPHASE_WAITING; - _GLOBAL_CONST unsigned short httpPHASE_RECEIVED; - _GLOBAL_CONST unsigned short httpPHASE_RECEIVING; - _GLOBAL_CONST unsigned short httpPHASE_SENDING; - _GLOBAL_CONST unsigned short httpPHASE_NOT_CONNECTED; - _GLOBAL_CONST unsigned short httpOPTION_SERVICE_TYPE_LEAF; - _GLOBAL_CONST unsigned short httpOPTION_SERVICE_TYPE_EXT; - _GLOBAL_CONST unsigned short httpOPTION_SERVICE_TYPE_NAME; - _GLOBAL_CONST unsigned short httpOPTION_SERVICE_TYPE_ROOT; - _GLOBAL_CONST unsigned short httpOPTION_HTTP_11; - _GLOBAL_CONST unsigned short httpOPTION_HTTP_10; - _GLOBAL_CONST unsigned short httpMETHOD_DELETE; - _GLOBAL_CONST unsigned short httpMETHOD_PUT; - _GLOBAL_CONST unsigned short httpMETHOD_POST; - _GLOBAL_CONST unsigned short httpMETHOD_GET; - _GLOBAL_CONST unsigned short httpERR_SYSTEM; - _GLOBAL_CONST unsigned short httpERR_INVALID_SSL_CONFIG; - _GLOBAL_CONST unsigned short httpERR_SSL_HANDSHAKE_FAILED; - _GLOBAL_CONST unsigned short httpERR_ILLEGAL_CHARACTERS; - _GLOBAL_CONST unsigned short httpERR_NOT_FOUND; - _GLOBAL_CONST unsigned short httpERR_CLIENT_TCP_DISCONNECTED; - _GLOBAL_CONST unsigned short httpERR_CLIENT_TCP_INVALID_HOST; - _GLOBAL_CONST unsigned short httpERR_CLIENT_TCP_CONN_FAILED; - _GLOBAL_CONST unsigned short httpERR_CLIENT_TCP_CONN_CLOSED; - _GLOBAL_CONST unsigned short httpERR_CLIENT_NO_MORE_IDENTS; - _GLOBAL_CONST unsigned short httpERR_CLIENT_ERR_SOCKET_CREATE; - _GLOBAL_CONST unsigned short httpERR_SERVICE_LINK_FAILED; - _GLOBAL_CONST unsigned short httpERR_SERVICE_NO_WEBSERVER; - _GLOBAL_CONST unsigned short httpERR_METHOD_UNSUPPORTED; - _GLOBAL_CONST unsigned short httpERR_NO_DATA; - _GLOBAL_CONST unsigned short httpERR_INVALID_PARAM; - _GLOBAL_CONST unsigned short httpERR_HEADER_SIZE_USERLINE; - _GLOBAL_CONST unsigned short httpERR_HEADER_SIZE_RAW; - _GLOBAL_CONST unsigned short httpERR_DATA_SIZE; - _GLOBAL_CONST unsigned short httpERR_BUFFER_SIZE; -#endif - - - - /* Datatypes and datatypes of function blocks */ +typedef enum AsHttpCipherVersionEnum +{ asHTTP_TLS_1_3 = 2 +} AsHttpCipherVersionEnum; + typedef struct httpHeaderLine_t { plcstring name[51]; plcstring value[81]; @@ -139,6 +62,12 @@ typedef struct httpStatistics_t unsigned long lastError; } httpStatistics_t; +typedef struct AsHttpMcsType +{ plcstring name[256]; + enum AsHttpCipherVersionEnum tlsVersion; + plcbit trustListValidation; +} AsHttpMcsType; + typedef struct httpService { /* VAR_INPUT (analog) */ @@ -284,6 +213,44 @@ typedef struct httpsClient plcbit abort; } httpsClient_typ; +typedef struct httpsClientMcs +{ + /* VAR_INPUT (analog) */ + unsigned long option; + struct AsHttpMcsType mcsStore; + unsigned long pHost; + unsigned short hostPort; + unsigned long method; + unsigned long pUri; + unsigned long pRequestHeader; + unsigned long pRequestData; + unsigned long requestDataLen; + unsigned long pResponseHeader; + unsigned long pResponseData; + unsigned long responseDataSize; + unsigned long pStatistics; + unsigned long pStruct; + /* VAR_OUTPUT (analog) */ + unsigned short status; + unsigned short tcpStatus; + unsigned short httpStatus; + unsigned long responseDataLen; + unsigned short phase; + /* VAR (analog) */ + unsigned long _i_state; + unsigned short _i_result; + unsigned long _ident; + unsigned long _oldEnable; + unsigned long _oldAbort; + unsigned long _oldSend; + unsigned long _state; + unsigned long _internal; + /* VAR_INPUT (digital) */ + plcbit enable; + plcbit send; + plcbit abort; +} httpsClientMcs_typ; + typedef struct httpUtf8ToString { /* VAR_INPUT (analog) */ @@ -488,6 +455,7 @@ _BUR_PUBLIC void httpService(struct httpService* inst); _BUR_PUBLIC void httpClient(struct httpClient* inst); _BUR_PUBLIC void httpsService(struct httpsService* inst); _BUR_PUBLIC void httpsClient(struct httpsClient* inst); +_BUR_PUBLIC void httpsClientMcs(struct httpsClientMcs* inst); _BUR_PUBLIC void httpUtf8ToString(struct httpUtf8ToString* inst); _BUR_PUBLIC void httpStringToUtf8(struct httpStringToUtf8* inst); _BUR_PUBLIC void httpUtf8ToWString(struct httpUtf8ToWString* inst); @@ -504,6 +472,86 @@ _BUR_PUBLIC void httpSetMultipartMessage(struct httpSetMultipartMessage* inst); _BUR_PUBLIC void httpGetMultipartMessage(struct httpGetMultipartMessage* inst); +/* Constants */ +#ifdef _REPLACE_CONST + #define httpPHASE_WAITING 4U + #define httpPHASE_RECEIVED 3U + #define httpPHASE_RECEIVING 2U + #define httpPHASE_SENDING 1U + #define httpPHASE_NOT_CONNECTED 0U + #define httpOPTION_SERVICE_TYPE_LEAF 8U + #define httpOPTION_SERVICE_TYPE_EXT 6U + #define httpOPTION_SERVICE_TYPE_NAME 2U + #define httpOPTION_SERVICE_TYPE_ROOT 4U + #define httpOPTION_HTTP_11 1U + #define httpOPTION_HTTP_10 0U + #define httpMETHOD_DELETE 4U + #define httpMETHOD_PUT 3U + #define httpMETHOD_POST 2U + #define httpMETHOD_GET 1U + #define httpERR_SYSTEM 35579U + #define httpERR_INVALID_MCS_CONFIG 35569U + #define httpERR_INVALID_SSL_CONFIG 35568U + #define httpERR_SSL_HANDSHAKE_FAILED 35567U + #define httpERR_ILLEGAL_CHARACTERS 35566U + #define httpERR_NOT_FOUND 35565U + #define httpERR_CLIENT_TCP_DISCONNECTED 35564U + #define httpERR_CLIENT_TCP_INVALID_HOST 35563U + #define httpERR_CLIENT_TCP_CONN_FAILED 35562U + #define httpERR_CLIENT_TCP_CONN_CLOSED 35561U + #define httpERR_CLIENT_NO_MORE_IDENTS 35560U + #define httpERR_CLIENT_ERR_SOCKET_CREATE 35559U + #define httpERR_SERVICE_LINK_FAILED 35558U + #define httpERR_SERVICE_NO_WEBSERVER 35557U + #define httpERR_METHOD_UNSUPPORTED 35556U + #define httpERR_NO_DATA 35555U + #define httpERR_INVALID_PARAM 35554U + #define httpERR_HEADER_SIZE_USERLINE 35553U + #define httpERR_HEADER_SIZE_RAW 35552U + #define httpERR_DATA_SIZE 35551U + #define httpERR_BUFFER_SIZE 35550U +#else + _GLOBAL_CONST unsigned short httpPHASE_WAITING; + _GLOBAL_CONST unsigned short httpPHASE_RECEIVED; + _GLOBAL_CONST unsigned short httpPHASE_RECEIVING; + _GLOBAL_CONST unsigned short httpPHASE_SENDING; + _GLOBAL_CONST unsigned short httpPHASE_NOT_CONNECTED; + _GLOBAL_CONST unsigned short httpOPTION_SERVICE_TYPE_LEAF; + _GLOBAL_CONST unsigned short httpOPTION_SERVICE_TYPE_EXT; + _GLOBAL_CONST unsigned short httpOPTION_SERVICE_TYPE_NAME; + _GLOBAL_CONST unsigned short httpOPTION_SERVICE_TYPE_ROOT; + _GLOBAL_CONST unsigned short httpOPTION_HTTP_11; + _GLOBAL_CONST unsigned short httpOPTION_HTTP_10; + _GLOBAL_CONST unsigned short httpMETHOD_DELETE; + _GLOBAL_CONST unsigned short httpMETHOD_PUT; + _GLOBAL_CONST unsigned short httpMETHOD_POST; + _GLOBAL_CONST unsigned short httpMETHOD_GET; + _GLOBAL_CONST unsigned short httpERR_SYSTEM; + _GLOBAL_CONST unsigned short httpERR_INVALID_MCS_CONFIG; + _GLOBAL_CONST unsigned short httpERR_INVALID_SSL_CONFIG; + _GLOBAL_CONST unsigned short httpERR_SSL_HANDSHAKE_FAILED; + _GLOBAL_CONST unsigned short httpERR_ILLEGAL_CHARACTERS; + _GLOBAL_CONST unsigned short httpERR_NOT_FOUND; + _GLOBAL_CONST unsigned short httpERR_CLIENT_TCP_DISCONNECTED; + _GLOBAL_CONST unsigned short httpERR_CLIENT_TCP_INVALID_HOST; + _GLOBAL_CONST unsigned short httpERR_CLIENT_TCP_CONN_FAILED; + _GLOBAL_CONST unsigned short httpERR_CLIENT_TCP_CONN_CLOSED; + _GLOBAL_CONST unsigned short httpERR_CLIENT_NO_MORE_IDENTS; + _GLOBAL_CONST unsigned short httpERR_CLIENT_ERR_SOCKET_CREATE; + _GLOBAL_CONST unsigned short httpERR_SERVICE_LINK_FAILED; + _GLOBAL_CONST unsigned short httpERR_SERVICE_NO_WEBSERVER; + _GLOBAL_CONST unsigned short httpERR_METHOD_UNSUPPORTED; + _GLOBAL_CONST unsigned short httpERR_NO_DATA; + _GLOBAL_CONST unsigned short httpERR_INVALID_PARAM; + _GLOBAL_CONST unsigned short httpERR_HEADER_SIZE_USERLINE; + _GLOBAL_CONST unsigned short httpERR_HEADER_SIZE_RAW; + _GLOBAL_CONST unsigned short httpERR_DATA_SIZE; + _GLOBAL_CONST unsigned short httpERR_BUFFER_SIZE; +#endif + + + + #ifdef __cplusplus }; #endif diff --git a/example/AsProject/Logical/Libraries/_AS/AsHttp/binary.lby b/example/AsProject/Logical/Libraries/_AS/AsHttp/binary.lby index 0417f98..1e7c1a3 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsHttp/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/AsHttp/binary.lby @@ -1,12 +1,12 @@ - - - - - AsHttp.fun - AsHttp.typ - AsHttp.var - - - - - \ No newline at end of file + + + + + AsHttp.fun + AsHttp.typ + AsHttp.var + + + + + diff --git a/example/AsProject/Logical/Libraries/_AS/AsIO/AsIO.var b/example/AsProject/Logical/Libraries/_AS/AsIO/AsIO.var index dcd5f87..3ed493b 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsIO/AsIO.var +++ b/example/AsProject/Logical/Libraries/_AS/AsIO/AsIO.var @@ -3,18 +3,21 @@ VAR CONSTANT asioERR_INTERNAL : UINT := 30150; (*internal error*) asioERR_NOSUCH_DP : UINT := 30151; (*data point with specified name not found*) - asio_VALID_FLAG : USINT := 1; (*bit0 is always set*) - asio_P_ACT_FLAG : USINT := 2; (*bit1 = 1 data source active, bit1 = 0 data source inactive*) - asio_F_ACT_FLAG : USINT := 4; (*bit2 = 1 force active, bit2 = 0 force inactive*) - asio_UNRES_LINK_FLAG : USINT := 8; (*AsPVInfo: bit3=0 the PV link is established , AsIODPStatus: bit3=0 all PV links are established*) + asio_VALID_FLAG : USINT := 1; (*bit 0 is always set*) + asio_P_ACT_FLAG : USINT := 2; (*bit 1 = 1 data source active, bit1 = 0 data source inactive*) + asio_F_ACT_FLAG : USINT := 4; (*bit 2 = 1 force active, bit2 = 0 force inactive*) + asio_UNRES_LINK_FLAG : USINT := 8; (*AsPVInfo: bit 3 = 0 the PV link is established , AsIODPStatus: bit3=0 all PV links are established*) asio_IO_INPUT_FLAG : USINT := 16; (*the data point is an I/O input channel*) asio_IO_OUTPUT_FLAG : USINT := 32; (*the data point is an I/O output channel*) asio_IO_SIMULATION_FLAG : USINT := 64; (*the data point is simulated*) - asio_UNRES_IO_FLAG : USINT :=128; (*IO-Link unresolved*) - + asio_UNRES_IO_FLAG : USINT := 128; (*IO-Link unresolved*) - asio_TYPE_MISMATCH : USINT := 16; (*AsPVInfo:Type Mismatch*) - asio_PV_NOT_FOUND : USINT := 32; (*AsPVInfo:PV not found*) - asio_INVERTED_FLAG : USINT := 64; (*AsPVInfo:the PV link is inverted*) + asio_TYPE_MISMATCH : USINT := 16; (*AsPVInfo: Type Mismatch*) + asio_PV_NOT_FOUND : USINT := 32; (*AsPVInfo: PV not found*) + asio_INVERTED_FLAG : USINT := 64; (*AsPVInfo: The PV link is inverted*) + + asio_UNRES_FLAG : UDINT := 256; (*AsIOFListDP: Search for missing I/O or missing PV connections*) + asio_IO_INPUT_OR_OUTPUT_FLAG : UDINT := 512; (*AsIOFListDP: If set, search for an I/O data point(input or output). If not set, search for a PV-PV mapping.*) + asio_DIAGNOSTICS_DATAPOINT_FLAG : UDINT := 1024; (*AsIOFListDP: If set, search for internal diagnostics data points*) END_VAR diff --git a/example/AsProject/Logical/Libraries/_AS/AsIO/SG4/AsIO.h b/example/AsProject/Logical/Libraries/_AS/AsIO/SG4/AsIO.h index 9d79a81..6bc64f3 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsIO/SG4/AsIO.h +++ b/example/AsProject/Logical/Libraries/_AS/AsIO/SG4/AsIO.h @@ -15,43 +15,6 @@ extern "C" #ifndef _BUR_PUBLIC #define _BUR_PUBLIC #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define asio_INVERTED_FLAG 64U - #define asio_PV_NOT_FOUND 32U - #define asio_TYPE_MISMATCH 16U - #define asio_UNRES_IO_FLAG 128U - #define asio_IO_SIMULATION_FLAG 64U - #define asio_IO_OUTPUT_FLAG 32U - #define asio_IO_INPUT_FLAG 16U - #define asio_UNRES_LINK_FLAG 8U - #define asio_F_ACT_FLAG 4U - #define asio_P_ACT_FLAG 2U - #define asio_VALID_FLAG 1U - #define asioERR_NOSUCH_DP 30151U - #define asioERR_INTERNAL 30150U -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST unsigned char asio_INVERTED_FLAG; - _GLOBAL_CONST unsigned char asio_PV_NOT_FOUND; - _GLOBAL_CONST unsigned char asio_TYPE_MISMATCH; - _GLOBAL_CONST unsigned char asio_UNRES_IO_FLAG; - _GLOBAL_CONST unsigned char asio_IO_SIMULATION_FLAG; - _GLOBAL_CONST unsigned char asio_IO_OUTPUT_FLAG; - _GLOBAL_CONST unsigned char asio_IO_INPUT_FLAG; - _GLOBAL_CONST unsigned char asio_UNRES_LINK_FLAG; - _GLOBAL_CONST unsigned char asio_F_ACT_FLAG; - _GLOBAL_CONST unsigned char asio_P_ACT_FLAG; - _GLOBAL_CONST unsigned char asio_VALID_FLAG; - _GLOBAL_CONST unsigned short asioERR_NOSUCH_DP; - _GLOBAL_CONST unsigned short asioERR_INTERNAL; -#endif - - - - /* Datatypes and datatypes of function blocks */ typedef struct AsIODPStatus { @@ -194,6 +157,46 @@ _BUR_PUBLIC void AsIOListDP(struct AsIOListDP* inst); _BUR_PUBLIC void AsIOPVInfo(struct AsIOPVInfo* inst); +/* Constants */ +#ifdef _REPLACE_CONST + #define asio_DIAGNOSTICS_DATAPOINT_FLAG 1024U + #define asio_IO_INPUT_OR_OUTPUT_FLAG 512U + #define asio_UNRES_FLAG 256U + #define asio_INVERTED_FLAG 64U + #define asio_PV_NOT_FOUND 32U + #define asio_TYPE_MISMATCH 16U + #define asio_UNRES_IO_FLAG 128U + #define asio_IO_SIMULATION_FLAG 64U + #define asio_IO_OUTPUT_FLAG 32U + #define asio_IO_INPUT_FLAG 16U + #define asio_UNRES_LINK_FLAG 8U + #define asio_F_ACT_FLAG 4U + #define asio_P_ACT_FLAG 2U + #define asio_VALID_FLAG 1U + #define asioERR_NOSUCH_DP 30151U + #define asioERR_INTERNAL 30150U +#else + _GLOBAL_CONST unsigned long asio_DIAGNOSTICS_DATAPOINT_FLAG; + _GLOBAL_CONST unsigned long asio_IO_INPUT_OR_OUTPUT_FLAG; + _GLOBAL_CONST unsigned long asio_UNRES_FLAG; + _GLOBAL_CONST unsigned char asio_INVERTED_FLAG; + _GLOBAL_CONST unsigned char asio_PV_NOT_FOUND; + _GLOBAL_CONST unsigned char asio_TYPE_MISMATCH; + _GLOBAL_CONST unsigned char asio_UNRES_IO_FLAG; + _GLOBAL_CONST unsigned char asio_IO_SIMULATION_FLAG; + _GLOBAL_CONST unsigned char asio_IO_OUTPUT_FLAG; + _GLOBAL_CONST unsigned char asio_IO_INPUT_FLAG; + _GLOBAL_CONST unsigned char asio_UNRES_LINK_FLAG; + _GLOBAL_CONST unsigned char asio_F_ACT_FLAG; + _GLOBAL_CONST unsigned char asio_P_ACT_FLAG; + _GLOBAL_CONST unsigned char asio_VALID_FLAG; + _GLOBAL_CONST unsigned short asioERR_NOSUCH_DP; + _GLOBAL_CONST unsigned short asioERR_INTERNAL; +#endif + + + + #ifdef __cplusplus }; #endif diff --git a/example/AsProject/Logical/Libraries/_AS/AsIO/binary.lby b/example/AsProject/Logical/Libraries/_AS/AsIO/binary.lby index 3b35d41..6dcc0a2 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsIO/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/AsIO/binary.lby @@ -1,12 +1,12 @@ - - - - - AsIO.fun - AsIO.typ - AsIO.var - - - - - \ No newline at end of file + + + + + AsIO.fun + AsIO.typ + AsIO.var + + + + + diff --git a/example/AsProject/Logical/Libraries/_AS/AsIOAcc/AsIOAcc.fun b/example/AsProject/Logical/Libraries/_AS/AsIOAcc/AsIOAcc.fun index d1f19c9..673f478 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsIOAcc/AsIOAcc.fun +++ b/example/AsProject/Logical/Libraries/_AS/AsIOAcc/AsIOAcc.fun @@ -29,42 +29,3 @@ END_FUNCTION_BLOCK END_VAR END_FUNCTION_BLOCK -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK AsIOAccReadReg (*reads noncyclical register (SGC only); asynchronous execution*) - VAR_INPUT - enable : BOOL; (*enables execution*) - nodeNr : USINT; (*node number of x2x module*) - registerNr : UINT; (*register number*) - size : USINT; (*register size*) - END_VAR - - VAR_OUTPUT - status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*) - value : UDINT; (*regsiter value*) - END_VAR - - VAR - i_state : UINT; (*internal variable*) - i_result : UINT; (*internal variable*) - i_tmp : UDINT; (*internal variable*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK AsIOAccWriteReg (*writes noncyclical register (SGC only); asynchronous execution*) - VAR_INPUT - enable : BOOL; (*enables execution*) - nodeNr : USINT; (*node number of x2x module*) - registerNr : UINT; (*register number*) - size : USINT; (*register size*) - value : UDINT; (*new register value*) - END_VAR - - VAR_OUTPUT - status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*) - END_VAR - - VAR - i_state : UINT; (*internal variable*) - i_result : UINT; (*internal variable*) - i_tmp : UDINT; (*internal variable*) - END_VAR -END_FUNCTION_BLOCK diff --git a/example/AsProject/Logical/Libraries/_AS/AsIOAcc/SG4/AsIOAcc.h b/example/AsProject/Logical/Libraries/_AS/AsIOAcc/SG4/AsIOAcc.h index f5f325d..9cb82d6 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsIOAcc/SG4/AsIOAcc.h +++ b/example/AsProject/Logical/Libraries/_AS/AsIOAcc/SG4/AsIOAcc.h @@ -15,31 +15,6 @@ extern "C" #ifndef _BUR_PUBLIC #define _BUR_PUBLIC #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define ioacERR_ACCESS 30196U - #define ioacERR_PARAMETER 30195U - #define ioacERR_NOTSUPPORTED 30194U - #define ioacERR_TIMEOUT 30193U - #define ioacERR_CHANNEL 30192U - #define ioacERR_DEVICE 30191U - #define ioacERR_INTERNAL 30190U -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST unsigned short ioacERR_ACCESS; - _GLOBAL_CONST unsigned short ioacERR_PARAMETER; - _GLOBAL_CONST unsigned short ioacERR_NOTSUPPORTED; - _GLOBAL_CONST unsigned short ioacERR_TIMEOUT; - _GLOBAL_CONST unsigned short ioacERR_CHANNEL; - _GLOBAL_CONST unsigned short ioacERR_DEVICE; - _GLOBAL_CONST unsigned short ioacERR_INTERNAL; -#endif - - - - /* Datatypes and datatypes of function blocks */ typedef struct IOAC_I_TYPE { unsigned short StateMan; @@ -82,47 +57,33 @@ typedef struct AsIOAccWrite plcbit enable; } AsIOAccWrite_typ; -typedef struct AsIOAccReadReg -{ - /* VAR_INPUT (analog) */ - unsigned char nodeNr; - unsigned short registerNr; - unsigned char size; - /* VAR_OUTPUT (analog) */ - unsigned short status; - unsigned long value; - /* VAR (analog) */ - unsigned short i_state; - unsigned short i_result; - unsigned long i_tmp; - /* VAR_INPUT (digital) */ - plcbit enable; -} AsIOAccReadReg_typ; - -typedef struct AsIOAccWriteReg -{ - /* VAR_INPUT (analog) */ - unsigned char nodeNr; - unsigned short registerNr; - unsigned char size; - unsigned long value; - /* VAR_OUTPUT (analog) */ - unsigned short status; - /* VAR (analog) */ - unsigned short i_state; - unsigned short i_result; - unsigned long i_tmp; - /* VAR_INPUT (digital) */ - plcbit enable; -} AsIOAccWriteReg_typ; - /* Prototyping of functions and function blocks */ _BUR_PUBLIC void AsIOAccRead(struct AsIOAccRead* inst); _BUR_PUBLIC void AsIOAccWrite(struct AsIOAccWrite* inst); -_BUR_PUBLIC void AsIOAccReadReg(struct AsIOAccReadReg* inst); -_BUR_PUBLIC void AsIOAccWriteReg(struct AsIOAccWriteReg* inst); + + +/* Constants */ +#ifdef _REPLACE_CONST + #define ioacERR_ACCESS 30196U + #define ioacERR_PARAMETER 30195U + #define ioacERR_NOTSUPPORTED 30194U + #define ioacERR_TIMEOUT 30193U + #define ioacERR_CHANNEL 30192U + #define ioacERR_DEVICE 30191U + #define ioacERR_INTERNAL 30190U +#else + _GLOBAL_CONST unsigned short ioacERR_ACCESS; + _GLOBAL_CONST unsigned short ioacERR_PARAMETER; + _GLOBAL_CONST unsigned short ioacERR_NOTSUPPORTED; + _GLOBAL_CONST unsigned short ioacERR_TIMEOUT; + _GLOBAL_CONST unsigned short ioacERR_CHANNEL; + _GLOBAL_CONST unsigned short ioacERR_DEVICE; + _GLOBAL_CONST unsigned short ioacERR_INTERNAL; +#endif + + #ifdef __cplusplus diff --git a/example/AsProject/Logical/Libraries/_AS/AsIOAcc/binary.lby b/example/AsProject/Logical/Libraries/_AS/AsIOAcc/binary.lby index 0e83428..ad93c6d 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsIOAcc/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/AsIOAcc/binary.lby @@ -1,12 +1,12 @@ - - - - - AsIOAcc.fun - AsIOAcc.typ - AsIOAcc.var - - - - - \ No newline at end of file + + + + + AsIOAcc.fun + AsIOAcc.typ + AsIOAcc.var + + + + + diff --git a/example/AsProject/Logical/Libraries/_AS/AsIODiag/AsIODiag.var b/example/AsProject/Logical/Libraries/_AS/AsIODiag/AsIODiag.var index 43e80e8..7781636 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsIODiag/AsIODiag.var +++ b/example/AsProject/Logical/Libraries/_AS/AsIODiag/AsIODiag.var @@ -30,4 +30,18 @@ VAR CONSTANT asdiagPLUGGED : UDINT := 1; (*information about inserted modules*) asdiagCONFIGURED : UDINT := 2; (*information about configured modules*) asdiagALL : UDINT := 3; (*information about inserted and configured modules*) + +(* family code of the inserted module. from obsolete FB HWInfo(), BRSystem library *) + br2010 : USINT := 0; (*series recognition*) + br2005 : USINT := 1; (*series recognition*) + br2003 : USINT := 2; (*series recognition*) + brLOGIGSCANNER : USINT := 3; (*series recognition*) + brAUTOMATION_RUNTIME : USINT := 4; (*series recognition*) + brPOWERPANEL : USINT := 5; (*series recognition*) + brPANEL : USINT := 6; (*series recognition*) + brADDON : USINT := 7; (*series recognition*) + brC300 : USINT := 8; (*series recognition*) + brC200 : USINT := 9; (*series recognition*) + brX2X : USINT := 10; (*series recognition*) + brNO_FAMILY : USINT := 255; (*series recognition*) END_VAR diff --git a/example/AsProject/Logical/Libraries/_AS/AsIODiag/SG4/AsIODiag.h b/example/AsProject/Logical/Libraries/_AS/AsIODiag/SG4/AsIODiag.h index 1257290..b935e45 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsIODiag/SG4/AsIODiag.h +++ b/example/AsProject/Logical/Libraries/_AS/AsIODiag/SG4/AsIODiag.h @@ -15,63 +15,6 @@ extern "C" #ifndef _BUR_PUBLIC #define _BUR_PUBLIC #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define asdiagALL 3U - #define asdiagCONFIGURED 2U - #define asdiagPLUGGED 1U - #define asdiagHARDWARE_DEVICE_TAG 1007U - #define asdiagHARDWARE_MODULE_NAME 1006U - #define asdiagCONFIG_BUS 1005U - #define asdiagPLUGGED_BUS 1004U - #define asdiagCONFIG_MODULE 1003U - #define asdiagPLUGGED_MODULE 1002U - #define asdiagPATH 1001U - #define asdiagSERIAL_NUMBER 8U - #define asdiagCONFIG_USETYPE 7U - #define asdiagPLUGGED_USETYPE 6U - #define asdiagCONFIG_FAMILY 5U - #define asdiagPLUGGED_FAMILY 4U - #define asdiagCONFIG_MODNO 3U - #define asdiagPLUGGED_MODNO 2U - #define asdiagMODUL_STATE 1U - #define asdiagERR_INFOKIND 30805U - #define asdiagERR_INFOCODE 30804U - #define asdiagERR_INDEX 30803U - #define asdiagERR_IDENT 30802U - #define asdiagERR_NOMEM 30801U -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST unsigned long asdiagALL; - _GLOBAL_CONST unsigned long asdiagCONFIGURED; - _GLOBAL_CONST unsigned long asdiagPLUGGED; - _GLOBAL_CONST unsigned long asdiagHARDWARE_DEVICE_TAG; - _GLOBAL_CONST unsigned long asdiagHARDWARE_MODULE_NAME; - _GLOBAL_CONST unsigned long asdiagCONFIG_BUS; - _GLOBAL_CONST unsigned long asdiagPLUGGED_BUS; - _GLOBAL_CONST unsigned long asdiagCONFIG_MODULE; - _GLOBAL_CONST unsigned long asdiagPLUGGED_MODULE; - _GLOBAL_CONST unsigned long asdiagPATH; - _GLOBAL_CONST unsigned long asdiagSERIAL_NUMBER; - _GLOBAL_CONST unsigned long asdiagCONFIG_USETYPE; - _GLOBAL_CONST unsigned long asdiagPLUGGED_USETYPE; - _GLOBAL_CONST unsigned long asdiagCONFIG_FAMILY; - _GLOBAL_CONST unsigned long asdiagPLUGGED_FAMILY; - _GLOBAL_CONST unsigned long asdiagCONFIG_MODNO; - _GLOBAL_CONST unsigned long asdiagPLUGGED_MODNO; - _GLOBAL_CONST unsigned long asdiagMODUL_STATE; - _GLOBAL_CONST unsigned short asdiagERR_INFOKIND; - _GLOBAL_CONST unsigned short asdiagERR_INFOCODE; - _GLOBAL_CONST unsigned short asdiagERR_INDEX; - _GLOBAL_CONST unsigned short asdiagERR_IDENT; - _GLOBAL_CONST unsigned short asdiagERR_NOMEM; -#endif - - - - /* Datatypes and datatypes of function blocks */ typedef struct DiagCreateInfo { @@ -142,6 +85,84 @@ _BUR_PUBLIC plcbit DiagCpuIsSimulated(void); _BUR_PUBLIC plcbit DiagCpuIsARsim(void); +/* Constants */ +#ifdef _REPLACE_CONST + #define brNO_FAMILY 255U + #define brX2X 10U + #define brC200 9U + #define brC300 8U + #define brADDON 7U + #define brPANEL 6U + #define brPOWERPANEL 5U + #define brAUTOMATION_RUNTIME 4U + #define brLOGIGSCANNER 3U + #define br2003 2U + #define br2005 1U + #define br2010 0U + #define asdiagALL 3U + #define asdiagCONFIGURED 2U + #define asdiagPLUGGED 1U + #define asdiagHARDWARE_DEVICE_TAG 1007U + #define asdiagHARDWARE_MODULE_NAME 1006U + #define asdiagCONFIG_BUS 1005U + #define asdiagPLUGGED_BUS 1004U + #define asdiagCONFIG_MODULE 1003U + #define asdiagPLUGGED_MODULE 1002U + #define asdiagPATH 1001U + #define asdiagSERIAL_NUMBER 8U + #define asdiagCONFIG_USETYPE 7U + #define asdiagPLUGGED_USETYPE 6U + #define asdiagCONFIG_FAMILY 5U + #define asdiagPLUGGED_FAMILY 4U + #define asdiagCONFIG_MODNO 3U + #define asdiagPLUGGED_MODNO 2U + #define asdiagMODUL_STATE 1U + #define asdiagERR_INFOKIND 30805U + #define asdiagERR_INFOCODE 30804U + #define asdiagERR_INDEX 30803U + #define asdiagERR_IDENT 30802U + #define asdiagERR_NOMEM 30801U +#else + _GLOBAL_CONST unsigned char brNO_FAMILY; + _GLOBAL_CONST unsigned char brX2X; + _GLOBAL_CONST unsigned char brC200; + _GLOBAL_CONST unsigned char brC300; + _GLOBAL_CONST unsigned char brADDON; + _GLOBAL_CONST unsigned char brPANEL; + _GLOBAL_CONST unsigned char brPOWERPANEL; + _GLOBAL_CONST unsigned char brAUTOMATION_RUNTIME; + _GLOBAL_CONST unsigned char brLOGIGSCANNER; + _GLOBAL_CONST unsigned char br2003; + _GLOBAL_CONST unsigned char br2005; + _GLOBAL_CONST unsigned char br2010; + _GLOBAL_CONST unsigned long asdiagALL; + _GLOBAL_CONST unsigned long asdiagCONFIGURED; + _GLOBAL_CONST unsigned long asdiagPLUGGED; + _GLOBAL_CONST unsigned long asdiagHARDWARE_DEVICE_TAG; + _GLOBAL_CONST unsigned long asdiagHARDWARE_MODULE_NAME; + _GLOBAL_CONST unsigned long asdiagCONFIG_BUS; + _GLOBAL_CONST unsigned long asdiagPLUGGED_BUS; + _GLOBAL_CONST unsigned long asdiagCONFIG_MODULE; + _GLOBAL_CONST unsigned long asdiagPLUGGED_MODULE; + _GLOBAL_CONST unsigned long asdiagPATH; + _GLOBAL_CONST unsigned long asdiagSERIAL_NUMBER; + _GLOBAL_CONST unsigned long asdiagCONFIG_USETYPE; + _GLOBAL_CONST unsigned long asdiagPLUGGED_USETYPE; + _GLOBAL_CONST unsigned long asdiagCONFIG_FAMILY; + _GLOBAL_CONST unsigned long asdiagPLUGGED_FAMILY; + _GLOBAL_CONST unsigned long asdiagCONFIG_MODNO; + _GLOBAL_CONST unsigned long asdiagPLUGGED_MODNO; + _GLOBAL_CONST unsigned long asdiagMODUL_STATE; + _GLOBAL_CONST unsigned short asdiagERR_INFOKIND; + _GLOBAL_CONST unsigned short asdiagERR_INFOCODE; + _GLOBAL_CONST unsigned short asdiagERR_INDEX; + _GLOBAL_CONST unsigned short asdiagERR_IDENT; + _GLOBAL_CONST unsigned short asdiagERR_NOMEM; +#endif + + + + #ifdef __cplusplus }; #endif diff --git a/example/AsProject/Logical/Libraries/_AS/AsIODiag/binary.lby b/example/AsProject/Logical/Libraries/_AS/AsIODiag/binary.lby index 80c16fe..b18a822 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsIODiag/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/AsIODiag/binary.lby @@ -1,12 +1,12 @@ - - - - - AsIODiag.fun - AsIODiag.typ - AsIODiag.var - - - - - \ No newline at end of file + + + + + AsIODiag.fun + AsIODiag.typ + AsIODiag.var + + + + + diff --git a/example/AsProject/Logical/Libraries/_AS/AsIOTime/binary.lby b/example/AsProject/Logical/Libraries/_AS/AsIOTime/binary.lby index b7288cc..8c04ee1 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsIOTime/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/AsIOTime/binary.lby @@ -1,9 +1,9 @@ - - - - - AsIOTime.fun - AsIOTime.typ - AsIOTime.var - - \ No newline at end of file + + + + + AsIOTime.fun + AsIOTime.typ + AsIOTime.var + + diff --git a/example/AsProject/Logical/Libraries/_AS/AsMem/SG4/AsMem.h b/example/AsProject/Logical/Libraries/_AS/AsMem/SG4/AsMem.h index 70a523b..5bac6ae 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsMem/SG4/AsMem.h +++ b/example/AsProject/Logical/Libraries/_AS/AsMem/SG4/AsMem.h @@ -15,27 +15,6 @@ extern "C" #ifndef _BUR_PUBLIC #define _BUR_PUBLIC #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define asmemERR_FREE 30503U - #define asmemERR_INFO 30504U - #define asmemERR_NOMEM 30502U - #define asmemERR_CREATE 30500U - #define asmemERR_DESTROY 30501U -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST unsigned short asmemERR_FREE; - _GLOBAL_CONST unsigned short asmemERR_INFO; - _GLOBAL_CONST unsigned short asmemERR_NOMEM; - _GLOBAL_CONST unsigned short asmemERR_CREATE; - _GLOBAL_CONST unsigned short asmemERR_DESTROY; -#endif - - - - /* Datatypes and datatypes of function blocks */ typedef struct AsMemPartCreate { @@ -130,6 +109,24 @@ _BUR_PUBLIC void AsMemPartFree(struct AsMemPartFree* inst); _BUR_PUBLIC void AsMemPartInfo(struct AsMemPartInfo* inst); +/* Constants */ +#ifdef _REPLACE_CONST + #define asmemERR_FREE 30503U + #define asmemERR_INFO 30504U + #define asmemERR_NOMEM 30502U + #define asmemERR_CREATE 30500U + #define asmemERR_DESTROY 30501U +#else + _GLOBAL_CONST unsigned short asmemERR_FREE; + _GLOBAL_CONST unsigned short asmemERR_INFO; + _GLOBAL_CONST unsigned short asmemERR_NOMEM; + _GLOBAL_CONST unsigned short asmemERR_CREATE; + _GLOBAL_CONST unsigned short asmemERR_DESTROY; +#endif + + + + #ifdef __cplusplus }; #endif diff --git a/example/AsProject/Logical/Libraries/_AS/AsMem/binary.lby b/example/AsProject/Logical/Libraries/_AS/AsMem/binary.lby index f14616b..fe009fe 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsMem/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/AsMem/binary.lby @@ -1,12 +1,12 @@ - - - - - AsMem.fun - AsMem.typ - AsMem.var - - - - - \ No newline at end of file + + + + + AsMem.fun + AsMem.typ + AsMem.var + + + + + diff --git a/example/AsProject/Logical/Libraries/_AS/AsSafety/AsSafety.fun b/example/AsProject/Logical/Libraries/_AS/AsSafety/AsSafety.fun deleted file mode 100644 index f9c17ef..0000000 --- a/example/AsProject/Logical/Libraries/_AS/AsSafety/AsSafety.fun +++ /dev/null @@ -1,303 +0,0 @@ - -{REDUND_ERROR} FUNCTION_BLOCK safeRemoteControl (*Remote Control Function Block*) - VAR_INPUT - SafeLOGICID : UINT; (*SafeLOGIC ID*) - Execute : BOOL; (*execution*) - pCommandData : UDINT; (*pointer to command data*) - END_VAR - VAR_OUTPUT - Done : BOOL; (*execution done*) - Busy : BOOL; (*execution busy*) - Error : BOOL; (*execution error*) - StatusID : UINT; (*execution status: ERR_OK, ERR_FUB_BUSY, 0xXXXX = see help*) - SafeLOGICStatus : RemoteControlStatusTypeV1; (*SafeLOGIC status*) - END_VAR - VAR - i_state : UINT; (*internal variable*) - i_result : UINT; (*internal variable*) - i_tmp : UDINT; (*internal variable*) - i_handle : UDINT; (*internal variable*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_ERROR} FUNCTION_BLOCK safeRemoteControl_V2 (*Remote Control Function Block*) - VAR_INPUT - SafeLOGICID : UINT; (*SafeLOGIC ID*) - Execute : BOOL; (*execution*) - pCommandData : UDINT; (*pointer to command data*) - END_VAR - VAR_OUTPUT - Done : BOOL; (*execution done*) - Busy : BOOL; (*execution busy*) - Error : BOOL; (*execution error*) - StatusID : UINT; (*execution status: ERR_OK, ERR_FUB_BUSY, 0xXXXX = see help*) - SafeLOGICStatus : RemoteControlStatusTypeV2; (*SafeLOGIC status*) - END_VAR - VAR - Internal : AsSafetyInternalType; (*internal variable*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_ERROR} FUNCTION_BLOCK safeDownloadApplication (*Download Application Function Block*) - VAR_INPUT - SafeLOGICID : UINT; (*SafeLOGIC ID*) - Execute : BOOL; (*execution*) - pCommandData : UDINT; (*pointer to command data*) - END_VAR - VAR_OUTPUT - Done : BOOL; (*execution done*) - Busy : BOOL; (*execution busy*) - Error : BOOL; (*execution error*) - StatusID : UINT; (*execution status: ERR_OK, ERR_FUB_BUSY, 0xXXXX = see help*) - UnlockRequired : BOOL; (*unlock required*) - ApplicationCRC : UDINT; (*application CRC*) - END_VAR - VAR - i_state : UINT; (*internal variable*) - i_result : UINT; (*internal variable*) - i_tmp : UDINT; (*internal variable*) - i_handle : UDINT; (*internal variable*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_ERROR} FUNCTION_BLOCK safeDownloadApplication_V2 (*Download Application Function Block*) - VAR_INPUT - SafeLOGICID : UINT; (*SafeLOGIC ID*) - Execute : BOOL; (*execution*) - pCommandData : UDINT; (*pointer to command data*) - END_VAR - VAR_OUTPUT - Done : BOOL; (*execution done*) - Busy : BOOL; (*execution busy*) - Error : BOOL; (*execution error*) - StatusID : UINT; (*execution status: ERR_OK, ERR_FUB_BUSY, 0xXXXX = see help*) - UnlockRequired : BOOL; (*unlock required*) - ApplicationCRC : UDINT; (*application CRC*) - END_VAR - VAR - Internal : AsSafetyInternalType; (*internal variable*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_ERROR} FUNCTION_BLOCK safeDownloadData (*Download Data Function Block*) - VAR_INPUT - SafeLOGICID : UINT; (*SafeLOGIC ID*) - Execute : BOOL; (*execution*) - Type : UINT; (*type of data: safeDATA_TYPE_MAOP, safeDATA_TYPE_EXTMAOP,... *) - pCommandData : UDINT; (*pointer to command data*) - END_VAR - VAR_OUTPUT - Done : BOOL; (*execution done*) - Busy : BOOL; (*execution busy*) - Error : BOOL; (*execution error*) - StatusID : UINT; (*execution status: ERR_OK, ERR_FUB_BUSY, 0xXXXX = see help*) - UnlockRequired : BOOL; (*unlock required*) - Timestamp : UDINT; (*timestamp from data*) - END_VAR - VAR - i_state : UINT; (*internal variable*) - i_result : UINT; (*internal variable*) - i_tmp : UDINT; (*internal variable*) - i_handle : UDINT; (*internal variable*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_ERROR} FUNCTION_BLOCK safeDownloadData_V2 (*Download Data Function Block*) - VAR_INPUT - SafeLOGICID : UINT; (*SafeLOGIC ID*) - Execute : BOOL; (*execution*) - Type : UINT; (*type of data: safeDATA_TYPE_MAOP, safeDATA_TYPE_EXTMAOP,... *) - pCommandData : UDINT; (*pointer to command data*) - END_VAR - VAR_OUTPUT - Done : BOOL; (*execution done*) - Busy : BOOL; (*execution busy*) - Error : BOOL; (*execution error*) - StatusID : UINT; (*execution status: ERR_OK, ERR_FUB_BUSY, 0xXXXX = see help*) - UnlockRequired : BOOL; (*unlock required*) - Timestamp : UDINT; (*timestamp from data*) - END_VAR - VAR - Internal : AsSafetyInternalType; (*internal variable*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_ERROR} FUNCTION_BLOCK safeConfigurationOnTarget (*Configuration On Target Function Block*) - VAR_INPUT - SafeLOGICID : UINT; (*SafeLOGIC ID*) - Execute : BOOL; (*execution*) - Type : UINT; (*type of data: safeDATA_TYPE_MAOP, safeDATA_TYPE_EXTMAOP,...*) - pCommandData : UDINT; (*pointer to command data*) - END_VAR - VAR_OUTPUT - Done : BOOL; (*execution done*) - Busy : BOOL; (*execution busy*) - Error : BOOL; (*execution error*) - StatusID : UINT; (*execution status: ERR_OK, ERR_FUB_BUSY, 0xXXXX = see help*) - Timestamp : UDINT; (*timestamp of data*) - END_VAR - VAR - i_state : UINT; (*internal variable*) - i_result : UINT; (*internal variable*) - i_tmp : UDINT; (*internal variable*) - i_handle : UDINT; (*internal variable*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_ERROR} FUNCTION_BLOCK safeConfigurationOnTarget_V2 (*Configuration On Target Function Block*) - VAR_INPUT - SafeLOGICID : UINT; (*SafeLOGIC ID*) - Execute : BOOL; (*execution*) - Type : UINT; (*type of data: safeDATA_TYPE_MAOP, safeDATA_TYPE_EXTMAOP,...*) - pCommandData : UDINT; (*pointer to command data*) - END_VAR - VAR_OUTPUT - Done : BOOL; (*execution done*) - Busy : BOOL; (*execution busy*) - Error : BOOL; (*execution error*) - StatusID : UINT; (*execution status: ERR_OK, ERR_FUB_BUSY, 0xXXXX = see help*) - Timestamp : UDINT; (*timestamp of data*) - END_VAR - VAR - Internal : AsSafetyInternalType; (*internal variable*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_ERROR} FUNCTION safeLibraryVersion : UINT (*returns the actual library version*) -END_FUNCTION - -{REDUND_ERROR} FUNCTION_BLOCK safeDownloadFile (*Download File Function Block*) - VAR_INPUT - SafeLOGICID : UINT; (*SafeLOGIC ID*) - Execute : BOOL; (*execution*) - pCommandData : UDINT; (*pointer to command data*) - END_VAR - VAR_OUTPUT - Done : BOOL; (*execution done*) - Busy : BOOL; (*execution busy*) - Error : BOOL; (*execution error*) - StatusID : UINT; (*execution status: ERR_OK, ERR_FUB_BUSY, 0xXXXX = see help*) - UnlockRequired : BOOL; (*unlock required*) - Timestamp : UDINT; (*timestamp from data*) - END_VAR - VAR - Internal : AsSafetyInternalType; (*internal variable*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_ERROR} FUNCTION_BLOCK safeCheckTable (*Check Table Function Block*) - VAR_INPUT - Execute : BOOL; (*execution*) - InstNr : USINT; (*instance number*) - pUser : UDINT; (*user name*) - Timestamp : UDINT; (*timestamp*) - TableType : USINT; (*table type*) - EntryCnt : UDINT; (*number of entries*) - pTableHeader : UDINT; (*table header input*) - pTableData : UDINT; (*table data input*) - pTableHeaderOut : UDINT; (*table header output buffer*) - pTableDataOut : UDINT; (*table data output buffer*) - pFileDataOut : UDINT; (*file data output buffer*) - AckData : USINT; (*1 .. acknowledge table data, 2 .. NOT acknowledge table data, abort FUB*) - END_VAR - VAR_OUTPUT - Done : BOOL; (*execution done*) - Busy : BOOL; (*execution busy*) - Error : BOOL; (*execution error*) - StatusID : UINT; (*execution status: ERR_OK, ERR_FUB_BUSY, 0xXXXX = see help*) - CheckErrorCode : UDINT; (*table check error code*) - CheckErrorLine : UDINT; (*table check error line*) - CheckErrorColumn : UDINT; (*table check error column*) - pCrcOut : UDINT; (*returns pointer to CRC data*) - CrcCntOut : UDINT; (*returns number of CRCs*) - END_VAR - VAR - i_step : UINT; (*internal*) - i_tmp : UDINT; (*internal*) - i_clean : BOOL; (*internal*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_ERROR} FUNCTION_BLOCK safeFileInfo (*File Info Function Block*) - VAR_INPUT - SafeLOGICID : UINT; (*SafeLOGIC ID*) - Execute : BOOL; (*execution*) - Type : UINT; (*type of data: safeDATA_TYPE_MAOP, safeDATA_TYPE_EXTMAOP,...*) - pCommandData : UDINT; (*pointer to command data*) - END_VAR - VAR_OUTPUT - Done : BOOL; (*execution done*) - Busy : BOOL; (*execution busy*) - Error : BOOL; (*execution error*) - StatusID : UINT; (*execution status: ERR_OK, ERR_FUB_BUSY, 0xXXXX = see help*) - END_VAR - VAR - Internal : AsSafetyInternalType; (*internal variable*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_ERROR} FUNCTION safeGetTableLength : UDINT (*Function returns size of table data*) - VAR_INPUT - TableType : USINT; (*table type*) - EntryCnt : UDINT; (*number of entries*) - pTableHeader : UDINT; (*pointer to table header*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION_BLOCK safeGetDataLength (*Function Block returns size of download file*) - VAR_INPUT - Execute : BOOL; (*execution*) - Type : UINT; (*type of data: safeDATA_TYPE_MAOP, safeDATA_TYPE_EXTMAOP,... *) - pCommandData : UDINT; (*pointer to command data*) - END_VAR - VAR_OUTPUT - Done : BOOL; (*execution done*) - Busy : BOOL; (*execution busy*) - Error : BOOL; (*execution error*) - StatusID : UINT; (*execution status: ERR_OK, ERR_FUB_BUSY, 0xXXXX = see help*) - Length : UDINT; (*calculated length of download file*) - END_VAR - VAR - Internal : AsSafetyInternalType; (*internal variable*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_ERROR} FUNCTION_BLOCK safeCreateData (*Create Data Function Block*) - VAR_INPUT - SafeLOGICID : UINT; (*SafeLOGIC ID*) - Execute : BOOL; (*execution*) - Type : UINT; (*type of data: safeDATA_TYPE_MAOP, safeDATA_TYPE_EXTMAOP,... *) - pCommandData : UDINT; (*pointer to command data*) - FileDataOutLen : UDINT; (*size of buffer for file data*) - pFileDataOut : UDINT; (*pointer to memory buffer for file data*) - END_VAR - VAR_OUTPUT - Done : BOOL; (*execution done*) - Busy : BOOL; (*execution busy*) - Error : BOOL; (*execution error*) - StatusID : UINT; (*execution status: ERR_OK, ERR_FUB_BUSY, 0xXXXX = see help*) - UnlockRequired : BOOL; (*unlock required*) - Timestamp : UDINT; (*timestamp from data*) - END_VAR - VAR - Internal : AsSafetyInternalType; (*internal variable*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_ERROR} FUNCTION_BLOCK safeLogicInfo (*Remote Control Function Block*) - VAR_INPUT - SafeLOGICID : UINT; (*SafeLOGIC ID*) - Execute : BOOL; (*execution*) - Type : UINT; (*type of data: safeINFO_TYPE_PWD_INFO, safeINFO_TYPE_PWD_CHK, safeINFO_TYPE_UDID_INFO*) - pCommandData : UDINT; (*pointer to command data*) - END_VAR - VAR_OUTPUT - Done : BOOL; (*execution done*) - Busy : BOOL; (*execution busy*) - Error : BOOL; (*execution error*) - StatusID : UINT; (*execution status: ERR_OK, ERR_FUB_BUSY, 0xXXXX = see help*) - END_VAR - VAR - Internal : AsSafetyInternalType; (*internal variable*) - END_VAR -END_FUNCTION_BLOCK diff --git a/example/AsProject/Logical/Libraries/_AS/AsSafety/AsSafety.typ b/example/AsProject/Logical/Libraries/_AS/AsSafety/AsSafety.typ deleted file mode 100644 index 5196768..0000000 --- a/example/AsProject/Logical/Libraries/_AS/AsSafety/AsSafety.typ +++ /dev/null @@ -1,610 +0,0 @@ -(******************************************************************** - * COPYRIGHT -- Bernecker + Rainer - ******************************************************************** - * Library: AsSafety - * File: AsSafety.typ - * Author: B&R - * Created: May 25, 2012 - ******************************************************************** - * Data types of library AsSafety - ********************************************************************) - -TYPE - FileReferenceType : STRUCT (*file reference*) - Device : STRING[80]; (*pointer to the device name*) - File : STRING[80]; (*pointer to the file name*) - END_STRUCT; - AsSafetyInternalType : STRUCT (*internal data type*) - Clean : BOOL; - State : UINT; - Result : UINT; - Tmp : UDINT; - pThis : UDINT; - pFcn : UDINT; - END_STRUCT; - SourceLocalDataTypeV1 : STRUCT (*local data source type*) - pFileData : UDINT; (*pointer to data buffer*) - FileLength : UDINT; (*data length*) - END_STRUCT; - SourceLocalFileTypeV1 : STRUCT (*local file source*) - SourceFile : FileReferenceType; (*path to local file*) - END_STRUCT; - DataSourceTypeV1 : STRUCT (*source data type*) - Type : UINT; (*0 .. file upload from safeLOGIC, 1 .. local data buffer, 2 .. local file*) - LocalData : SourceLocalDataTypeV1; (*arguments for local data*) - LocalFile : SourceLocalFileTypeV1; (*arguments for local file*) - END_STRUCT; - InfoCmdPwdInfoTypeV1 : STRUCT (*password info data from SafeLOGIC command structure*) - Version : UINT; (*used version*) - PasswordSet : BOOL; (*0 .. no password set, 1 .. password is set*) - END_STRUCT; - InfoCmdPwdChkTypeV1 : STRUCT (*password check data from SafeLOGIC command structure*) - Version : UINT; (*used version*) - Password : STRING[16]; (*password for check*) - PasswordEqual : BOOL; (*0 .. no password set, 1 .. password is set*) - END_STRUCT; - ConfigurationAddParaTypeV2 : STRUCT (*additional parameter data from SafeLOGIC*) - SADR : UINT; (*safety address*) - ID : USINT; (*id*) - pParaData : UDINT; (*pointer to additional parameter data*) - Length : UDINT; (*size of parameter buffer*) - LengthOut : UDINT; (*length of parameter*) - CRC : UDINT; (*CRC*) - Timestamp : UDINT; (*timestamp*) - END_STRUCT; - ConfigurationAddParaTypeV1 : STRUCT (*additional parameter data from SafeLOGIC*) - SADR : UINT; (*safety address*) - ID : USINT; (*id*) - pParaData : UDINT; (*pointer to additional parameter data*) - Length : UDINT; (*size of parameter buffer*) - CRC : UDINT; (*CRC*) - Timestamp : UDINT; (*timestamp*) - END_STRUCT; - ConfigurationBitOptionsTypeV1 : STRUCT (*bit machine options*) - BitData : ARRAY[0..63]OF USINT; (*bit array*) - END_STRUCT; - ConfigurationCmdAddParaTypeV2 : STRUCT (*additional parameter data from SafeLOGIC command structure*) - Version : UINT; (*input data: used version*) - Password : STRING[16]; (*input data: password*) - pParaDataOutput : UDINT; (*input data: pointer to list of type ConfigurationAddParaTypeV2*) - NumberParaSetsOutput : UINT; (*input data: number of available entries in pParaDataOutput*) - NumberParaSetsOutputOut : UINT; (*return value: number of returned entries*) - pBackupFile : UDINT; (*input data: 0 .. no backup, otherwise pointer to struct of type FileReferenceType *) - pXmlOutputFile : UDINT; (*input data: 0 .. don't create XML output data, otherwise pointer to struct of type FileReferenceType*) - END_STRUCT; - ConfigurationCmdAddParaTypeV1 : STRUCT (*additional parameter data from SafeLOGIC command structure*) - Version : UINT; (*input data: used version*) - Password : STRING[16]; (*input data: password*) - pParaDataOutput : UDINT; (*return value: pointer to list of type ConfigurationAddParaTypeV1*) - NumberParaSetsOutput : UINT; (*return value: number of returned entries*) - END_STRUCT; - ConfigurationCmdExtMaOpTypeV2 : STRUCT (*extended machine options from SafeLOGIC command structure*) - Version : UINT; (*input data: safeVERSION_R110*) - Password : STRING[16]; (*input data: password*) - pIntDataOutput : UDINT; (*input data: pointer to list of type ConfigurationIntOptionsTypeV1*) - NumberIntOutput : UINT; (*input data: number of available entries in INT buffer*) - NumberIntOutputOut : UINT; (*return value: number of returned INT data entries*) - pUintDataOutput : UDINT; (*input data: pointer to list of type ConfigurationUintOptionsTypeV1*) - NumberUintOutput : UINT; (*input data: number of available entries in UINT buffer*) - NumberUintOutputOut : UINT; (*return value: number of returned UINT data entries*) - pDintDataOutput : UDINT; (*input data: pointer to list of type ConfigurationDintOptionsTypeV1*) - NumberDintOutput : UINT; (*input data: number of available DINT data entries*) - NumberDintOutputOut : UINT; (*return value: number of returned DINT data entries*) - pUdintDataOutput : UDINT; (*input data: pointer to list of type ConfigurationUdintOptionsTypeV1*) - NumberUdintOutput : UINT; (*input data: number of available UDINT data entries*) - NumberUdintOutputOut : UINT; (*return value: number of returned UDINT data entries*) - pBackupFile : UDINT; (*input data: 0 .. no backup, otherwise pointer to struct of type FileReferenceType *) - pXmlOutputFile : UDINT; (*input data: 0 .. don't create XML output data, otherwise pointer to struct of type FileReferenceType*) - END_STRUCT; - ConfigurationCmdExtMaOpTypeV1 : STRUCT (*extended machine options from SafeLOGIC command structure*) - Version : UINT; (*input data: safeVERSION_R107*) - Password : STRING[16]; (*input data: password*) - pIntDataOutput : UDINT; (*return value: pointer to list of type ConfigurationIntOptionsTypeV1*) - NumberIntOutput : UINT; (*return value: number of returned INT data entries*) - pUintDataOutput : UDINT; (*return value: pointer to list of type ConfigurationUintOptionsTypeV1*) - NumberUintOutput : UINT; (*return value: number of returned UINT data entries*) - pDintDataOutput : UDINT; (*return value: pointer to list of type ConfigurationDintOptionsTypeV1*) - NumberDintOutput : UINT; (*return value: number of returned DINT data entries*) - pUdintDataOutput : UDINT; (*return value: pointer to list of type ConfigurationUdintOptionsTypeV1*) - NumberUdintOutput : UINT; (*return value: number of returned UDINT data entries*) - END_STRUCT; - ConfigurationCmdMaOpTypeV2 : STRUCT (*machine options from SafeLOGIC command structure Version 2*) - Version : UINT; (*input data: safeVERSION_R110*) - Password : STRING[16]; (*input data: password*) - pDeviceListOutput : UDINT; (*input data: pointer to device list buffer of type ConfigurationDeviceTypeV1*) - NumberDevicesOutput : UINT; (*input data: number of available device entries in devices list buffer*) - NumberDevicesOutputOut : UINT; (*return value: number of returned device entries*) - pMachineOptionsOutput : UDINT; (*input data: pointer to bit machine options of type ConfigurationBitOptionsTypeV1*) - pModuleFlagsOutput : UDINT; (*input data: pointer to module flags of type ConfigurationModuleFlagsTypeV1*) - pBackupFile : UDINT; (*input data: 0 .. no backup, otherwise pointer to struct of type FileReferenceType *) - pXmlOutputFile : UDINT; (*input data: 0 .. don't create XML output data, otherwise pointer to struct of type FileReferenceType*) - END_STRUCT; - ConfigurationCmdMaOpTypeV1 : STRUCT (*machine options from SafeLOGIC command structure Version 1*) - Version : UINT; (*input data: safeVERSION_R107*) - Password : STRING[16]; (*input data: password*) - pDeviceListOutput : UDINT; (*return value: pointer to device list of type ConfigurationDeviceTypeV1*) - NumberDevicesOutput : UINT; (*return value: number of returned entries*) - pMachineOptionsOutput : UDINT; (*return value: pointer to bit machine options of type ConfigurationBitOptionsTypeV1*) - pModuleFlagsOutput : UDINT; (*return value: pointer to module flags of type ConfigurationModuleFlagsTypeV1*) - END_STRUCT; - ConfigurationCmdTableTypeV2 : STRUCT (*table data from SafeLOGIC command structure*) - Version : UINT; (*input data: safeVERSION_R110*) - Password : STRING[16]; (*input data: password*) - pTableDataOutput : UDINT; (*input data: pointer to list of type ConfigurationTableTypeV1*) - NumberTablesOutput : UINT; (*input data: number of available entries in pTableDataOutput*) - NumberTablesOutputOut : UINT; (*return value: number of returned table entries*) - pBackupFile : UDINT; (*input data: 0 .. no backup, otherwise pointer to struct of type FileReferenceType *) - pXmlOutputFile : UDINT; (*input data: 0 .. don't create XML output data, otherwise pointer to struct of type FileReferenceType*) - END_STRUCT; - ConfigurationCmdTableTypeV1 : STRUCT (*table data from SafeLOGIC command structure*) - Version : UINT; (*input data: safeVERSION_R107*) - Password : STRING[16]; (*input data: password*) - pTableDataOutput : UDINT; (*return value: pointer to list of type ConfigurationTableTypeV1*) - NumberTablesOutput : UINT; (*return value: number of returned table entries*) - END_STRUCT; - FileInfoCmdTypeV1 : STRUCT (*file info command structure*) - Version : UINT; (*used version*) - DataSource : DataSourceTypeV1; (*data source*) - Timestamp : UDINT; (*timestamp*) - pCrcs : UDINT; (*buffer for CRCs*) - NumberOfCrcs : UINT; (*size of CRC buffer*) - NumberOfCrcsOut : UINT; (*number of CRCs*) - END_STRUCT; - ConfigurationDeviceTypeV1 : STRUCT (*safety device from SafeLOGIC*) - SADR : UINT; (*safety address*) - UDID : ARRAY[0..5]OF USINT; (*UDID*) - END_STRUCT; - ConfigurationDintOptionsTypeV1 : STRUCT (*DINT machine options*) - ID : UINT; (*id*) - Value : DINT; (*value*) - END_STRUCT; - ConfigurationIntOptionsTypeV1 : STRUCT (*INT machine options*) - ID : UINT; (*id*) - Value : INT; (*value*) - END_STRUCT; - ConfigurationModuleFlagsTypeV1 : STRUCT (*module flags*) - Optional : ARRAY[0..127]OF USINT; (*optional*) - Startup : ARRAY[0..127]OF USINT; (*startup*) - NotPresent : ARRAY[0..127]OF USINT; (*not present*) - END_STRUCT; - ConfigurationTableTypeV2 : STRUCT (*table data for command struct V1*) - ID : UINT; (*table id*) - Type : USINT; (*table type*) - NumberOfCRCs : UINT; (*input data: number of available entries in pCRCData*) - NumberOfCRCsOut : UINT; (*return value: number of returned CRC entries*) - pCRCData : UDINT; (*input data: pointer to table CRC buffer*) - END_STRUCT; - ConfigurationTableTypeV1 : STRUCT (*table data for command struct V2*) - ID : UINT; (*table id*) - Type : USINT; (*table type*) - NumberOfCRCs : UINT; (*return value: number of returned CRCs*) - pCRCData : UDINT; (*return value: pointer to table CRC buffer*) - END_STRUCT; - ConfigurationUdintOptionsTypeV1 : STRUCT (*UDINT machine options*) - ID : UINT; (*id*) - Value : UDINT; (*value*) - END_STRUCT; - ConfigurationUintOptionsTypeV1 : STRUCT (*UINT machine options*) - ID : UINT; (*id*) - Value : UINT; (*value*) - END_STRUCT; - DownloadAcknExtMaOpTypeV1 : STRUCT (*acknowledge extended machine options structure*) - AcknIntOptions : ARRAY[0..63]OF BOOL; (*acknowledge INT*) - AcknUintOptions : ARRAY[0..63]OF BOOL; (*acknowledge UINT*) - AcknDintOptions : ARRAY[0..63]OF BOOL; (*acknowledge DINT*) - AcknUdintOptions : ARRAY[0..63]OF BOOL; (*acknowledge UDINT*) - END_STRUCT; - DownloadAcknMaOpTypeV1 : STRUCT (*acknowledge bit machine options structure*) - AcknBitOptions : ARRAY[0..63]OF USINT; (*acknowledge bit*) - END_STRUCT; - DownloadAcknAddParaTypeV1 : STRUCT (*acknowledge bit additional parameter*) - AcknBitAddPara : ARRAY[0..63]OF USINT; (*acknowledge bit*) - END_STRUCT; - DownloadCmdAddParaTypeV2 : STRUCT (*additional paramater command structure*) - Version : UINT; (*input data: used version*) - Password : STRING[16]; (*input data: password*) - UDID_Low : UDINT; (*input data: UDID low*) - UDID_High : UINT; (*input data: UDID high*) - Unlock : USINT; (*input data: unlock data*) - pParaListInput : UDINT; (*input data: pointer to additional parameter input data list of type DownloadAddParaTypeV1*) - NumberParaSetsInput : UINT; (*input data: number of input parameter entries in pParaListInput*) - pParaDataOutput : UDINT; (*input data: pointer to list of type ConfigurationAddParaTypeV2*) - NumberParaSetsOutput : UINT; (*input data: number of available entries in pParaDataOutput*) - NumberParaSetsOutputOut : UINT; (*return value: number of returned entries*) - pBackupFile : UDINT; (*input data: 0 .. no backup, otherwise pointer to struct of type FileReferenceType *) - pXmlOutputFile : UDINT; (*input data: 0 .. don't create XML output data, otherwise pointer to struct of type FileReferenceType*) - END_STRUCT; - DownloadCmdAddParaTypeV1 : STRUCT (*additional paramater command structure*) - Version : UINT; (*input data: used version*) - Password : STRING[16]; (*input data: password*) - UDID_Low : UDINT; (*input data: UDID low*) - UDID_High : UINT; (*input data: UDID high*) - Unlock : USINT; (*input data: unlock data*) - pParaListInput : UDINT; (*input data: pointer to additional parameter input data list of type DownloadAddParaTypeV1*) - NumberParaSetsInput : UINT; (*input data: number of input parameter entries in pParaListInput*) - pParaDataOutput : UDINT; (*return value: pointer to list of type ConfigurationAddParaTypeV1*) - NumberParaSetsOutput : UINT; (*return value: number of returned entries*) - END_STRUCT; - DownloadCmdApplicationTypeV1 : STRUCT (*application command structure*) - Version : UINT; (*used version*) - Password : STRING[16]; (*password*) - UDID_Low : UDINT; (*UDID low*) - UDID_High : UINT; (*UDID high*) - ApplicationID : UINT; (*application id*) - Device : STRING[80]; (*device for file*) - File : STRING[80]; (*file name*) - Unlock : USINT; (*unlock application*) - END_STRUCT; - DownloadCmdExtMaOpTypeV2 : STRUCT (*extended machine options command structure*) - Version : UINT; (*input data: safeVERSION_R110*) - Password : STRING[16]; (*input data: password*) - UDID_Low : UDINT; (*input data: UDID low*) - UDID_High : UINT; (*input data: UDID high*) - Unlock : USINT; (*input data: unlock data*) - pIntDataInput : UDINT; (*input data: pointer to INT input data list from type ConfigurationIntOptionsTypeV1*) - NumberIntInput : UINT; (*input data: number of INT input entries in pIntDataInput*) - pUintDataInput : UDINT; (*input data: pointer to UINT input data list from type ConfigurationUintOptionsTypeV1*) - NumberUintInput : UINT; (*input data: number of UINT input entries in pUintDataInput*) - pDintDataInput : UDINT; (*input data: pointer to DINT input data list from type ConfigurationDintOptionsTypeV1*) - NumberDintInput : UINT; (*input data: number of DINT input entries in pDintDataInput*) - pUdintDataInput : UDINT; (*input data: pointer to UDINT input data list from type ConfigurationUdintOptionsTypeV1*) - NumberUdintInput : UINT; (*input data: number of UDINT input entries in pUdintDataInput*) - pAcknMachineOptions : UDINT; (*input data: pointer to acknowledge information of type DownloadAcknMaOpTypeV1*) - pIntDataOutput : UDINT; (*input data: pointer to list of type ConfigurationIntOptionsTypeV1*) - NumberIntOutput : UINT; (*input data: number of available entries in INT buffer*) - NumberIntOutputOut : UINT; (*return value: number of returned INT data entries*) - pUintDataOutput : UDINT; (*input data: pointer to list of type ConfigurationUintOptionsTypeV1*) - NumberUintOutput : UINT; (*input data: number of available entries in UINT buffer*) - NumberUintOutputOut : UINT; (*return value: number of returned UINT data entries*) - pDintDataOutput : UDINT; (*input data: pointer to list of type ConfigurationDintOptionsTypeV1*) - NumberDintOutput : UINT; (*input data: number of available DINT data entries*) - NumberDintOutputOut : UINT; (*return value: number of returned DINT data entries*) - pUdintDataOutput : UDINT; (*input data: pointer to list of type ConfigurationUdintOptionsTypeV1*) - NumberUdintOutput : UINT; (*input data: number of available UDINT data entries*) - NumberUdintOutputOut : UINT; (*number of UDINT channels from SafeLOGIC*) - pBackupFile : UDINT; (*input data: 0 .. no backup, otherwise pointer to struct of type FileReferenceType *) - pXmlOutputFile : UDINT; (*input data: 0 .. don't create XML output data, otherwise pointer to struct of type FileReferenceType*) - END_STRUCT; - DownloadCmdExtMaOpTypeV1 : STRUCT (*return value: number of returned UDINT data entries*) - Version : UINT; (*input data: safeVERSION_R107*) - Password : STRING[16]; (*input data: password*) - UDID_Low : UDINT; (*input data: UDID low*) - UDID_High : UINT; (*input data: UDID high*) - Unlock : USINT; (*input data: unlock data*) - pIntDataInput : UDINT; (*input data: pointer to INT input data list from type ConfigurationIntOptionsTypeV1*) - NumberIntInput : UINT; (*input data: number of INT input entries in pIntDataInput*) - pUintDataInput : UDINT; (*input data: pointer to UINT input data list from type ConfigurationUintOptionsTypeV1*) - NumberUintInput : UINT; (*input data: number of UINT input entries in pUintDataInput*) - pDintDataInput : UDINT; (*input data: pointer to DINT input data list from type ConfigurationDintOptionsTypeV1*) - NumberDintInput : UINT; (*input data: number of DINT input entries in pDintDataInput*) - pUdintDataInput : UDINT; (*input data: pointer to UDINT input data list from type ConfigurationUdintOptionsTypeV1*) - NumberUdintInput : UINT; (*input data: number of UDINT input entries in pUdintDataInput*) - pAcknMachineOptions : UDINT; (*input data: pointer to acknowledge information of type DownloadAcknMaOpTypeV1*) - pIntDataOutput : UDINT; (*return value: pointer to list of type ConfigurationIntOptionsTypeV1*) - NumberIntOutput : UINT; (*return value: number of returned INT data entries*) - pUintDataOutput : UDINT; (*return value: pointer to list of type ConfigurationUintOptionsTypeV1*) - NumberUintOutput : UINT; (*return value: number of returned UINT data entries*) - pDintDataOutput : UDINT; (*return value: pointer to list of type ConfigurationDintOptionsTypeV1*) - NumberDintOutput : UINT; (*return value: number of returned DINT data entries*) - pUdintDataOutput : UDINT; (*return value: pointer to list of type ConfigurationUdintOptionsTypeV1*) - NumberUdintOutput : UINT; (*return value: number of returned UDINT data entries*) - END_STRUCT; - DownloadCmdMaOpTypeV2 : STRUCT (*machine options command structure*) - Version : UINT; (*input data: safeVERSION_R110*) - Password : STRING[16]; (*input data: password*) - UDID_Low : UDINT; (*input data: UDID low from SafeLOGIC*) - UDID_High : UINT; (*input data: UDID high from SafeLOGIC*) - Unlock : USINT; (*input data: unlock data*) - pDeviceListInput : UDINT; (*input data: pointer to input device list of type DownloadDeviceTypeV1*) - NumberDevicesInput : UINT; (*input data: number of input devices*) - pMachineOptionsInput : UDINT; (*input data: pointer to input bit machine options of type ConfigurationBitOptionsTypeV1*) - pModuleFlagsInput : UDINT; (*input data: pointer to input module flags of type ConfigurationModuleFlagsTypeV1*) - pAcknMachineOptions : UDINT; (*input data: pointer to acknowledge information of type DownloadAcknMaOpTypeV1*) - pDeviceListOutput : UDINT; (*input data: pointer to device list buffer of type ConfigurationDeviceTypeV1*) - NumberDevicesOutput : UINT; (*input data: number of available device entries in devices list buffer*) - NumberDevicesOutputOut : UINT; (*return value: number of returned device entries*) - pMachineOptionsOutput : UDINT; (*input data: pointer to bit machine options of type ConfigurationBitOptionsTypeV1*) - pModuleFlagsOutput : UDINT; (*input data: pointer to module flags of type ConfigurationModuleFlagsTypeV1*) - pBackupFile : UDINT; (*input data: 0 .. no backup, otherwise pointer to struct of type FileReferenceType *) - pXmlOutputFile : UDINT; (*input data: 0 .. don't create XML output data, otherwise pointer to struct of type FileReferenceType*) - END_STRUCT; - DownloadCmdMaOpTypeV1 : STRUCT (*machine options command structure*) - Version : UINT; (*input data: safeVERSION_R107*) - Password : STRING[16]; (*input data: password*) - UDID_Low : UDINT; (*input data: UDID low from SafeLOGIC*) - UDID_High : UINT; (*input data: UDID high from SafeLOGIC*) - Unlock : USINT; (*input data: unlock data*) - pDeviceListInput : UDINT; (*input data: pointer to input device list of type DownloadDeviceTypeV1*) - NumberDevicesInput : UINT; (*input data: number of input devices*) - pMachineOptionsInput : UDINT; (*input data: pointer to input bit machine options of type ConfigurationBitOptionsTypeV1*) - pModuleFlagsInput : UDINT; (*input data: pointer to input module flags of type ConfigurationModuleFlagsTypeV1*) - pAcknMachineOptions : UDINT; (*input data: pointer to acknowledge information of type DownloadAcknMaOpTypeV1*) - pDeviceListOutput : UDINT; (*return value: pointer to device list of type ConfigurationDeviceTypeV1*) - NumberDevicesOutput : UINT; (*return value: number of returned entries*) - pMachineOptionsOutput : UDINT; (*return value: pointer to bit machine options of type ConfigurationBitOptionsTypeV1*) - pModuleFlagsOutput : UDINT; (*return value: pointer to module flags of type ConfigurationModuleFlagsTypeV1*) - END_STRUCT; - DownloadCmdTableTypeV2 : STRUCT (*table command structure*) - Version : UINT; (*input data: safeVERSION_R110*) - Password : STRING[16]; (*input data: password*) - UDID_Low : UDINT; (*input data: UDID low*) - UDID_High : UINT; (*input data: UDID high*) - Unlock : USINT; (*input data: unlock data*) - pTableDataInput : UDINT; (*input data: pointer to input table data list of type DownloadTableTypeV2*) - NumberTablesInput : UINT; (*input data: number of input entries in pTableDataInput*) - pTableDataOutput : UDINT; (*input data: pointer to list of type ConfigurationTableTypeV1*) - NumberTablesOutput : UINT; (*input data: number of available entries in pTableDataOutput*) - NumberTablesOutputOut : UINT; (*return value: number of returned table entries*) - pBackupFile : UDINT; (*input data: 0 .. no backup, otherwise pointer to struct of type FileReferenceType *) - pXmlOutputFile : UDINT; (*input data: 0 .. don't create XML output data, otherwise pointer to struct of type FileReferenceType*) - END_STRUCT; - DownloadCmdTableTypeV1 : STRUCT (*table command structure*) - Version : UINT; (*input data: safeVERSION_R107*) - Password : STRING[16]; (*input data: password*) - UDID_Low : UDINT; (*input data: UDID low*) - UDID_High : UINT; (*input data: UDID high*) - Unlock : USINT; (*input data: unlock data*) - pTableDataInput : UDINT; (*input data: pointer to input table data list of type DownloadTableTypeV1*) - NumberTablesInput : UINT; (*input data: number of input entries in pTableDataInput*) - pTableDataOutput : UDINT; (*return value: pointer to list of type ConfigurationTableTypeV1*) - NumberTablesOutput : UINT; (*return value: number of returned table entries*) - END_STRUCT; - DownloadCmdFileTypeV1 : STRUCT (*file command structure*) - Version : UINT; (*used version*) - Password : STRING[16]; (*password*) - UDID_Low : UDINT; (*UDID low*) - UDID_High : UINT; (*UDID high*) - Unlock : USINT; (*unlock data*) - DataSource : DataSourceTypeV1; (*local data or local file available, file upload from safeLOGIC not available*) - pCrcs : UDINT; (*pointer to CRC data buffer*) - NumberOfCrcs : UINT; (*size of CRC data Buffer*) - NumberOfCrcsOut : UINT; (*number of CRCs*) - END_STRUCT; - DownloadAddParaTypeV1 : STRUCT (*additional parameter data*) - SADR : UINT; (*safety address*) - ID : USINT; (*id*) - pParaData : UDINT; (*pointer to additional parameter data*) - Length : UDINT; (*length*) - pAcknAddPara : UDINT; (*pointer to acknowledge information*) - END_STRUCT; - DownloadDeviceTypeV1 : STRUCT (*safety device*) - SADR : UINT; (*safety address*) - UDID_Low : UDINT; (*UDID low*) - UDID_High : UINT; (*UDID high*) - END_STRUCT; - DownloadTableTypeV1 : STRUCT (*table data*) - Device : STRING[80]; (*device for file*) - File : STRING[80]; (*file name*) - END_STRUCT; - DownloadTableTypeV2 : STRUCT (*table data*) - Type : UINT; (*safeTABLE_FILE_TYPE .. use Device / File, safeTABLE_DATA_TYPE .. use pData / DataLen*) - Device : STRING[80]; (*device for file*) - File : STRING[80]; (*file name*) - pData : UDINT; (*pointer to table data *) - DataLen : UDINT; (*length of table data*) - END_STRUCT; - RemoteControlCmdTypeV1 : STRUCT (*remote control command structure*) - Version : UINT; (*used version*) - Command : UINT; (*command*) - Number : UINT; (*actual number*) - Data : UINT; (*data*) - Password : STRING[16]; (*password*) - NewPassword : STRING[16]; (*new password*) - END_STRUCT; - RemoteControlStatusTypeV1 : STRUCT (*remote control status from SafeLOGIC*) - Command : UINT; (*last received command*) - Number : UINT; (*running number of last received command*) - Status : UINT; (*status of command*) - State : UINT; (*state of the last ENTER command*) - EnterData : UINT; (*last received ENTER command that was correct executed*) - EnterNumber : UINT; (*running number of the last received ENTER command*) - EnterExecuteStatus : UINT; (*state of the last received ENTER command*) - SafeOSState : USINT; (*status of the safety application*) - SafeKEYChanged : USINT; (*SafeKEY has been exchanged*) - LedTestActive : USINT; (*LED test active*) - Scanning : USINT; (*module scan active*) - openSAFETYstate : USINT; (*status of openSAFETY stack*) - FailSafe : USINT; (*Fail-Safe status*) - NumberOfMissingModules : UINT; (*number of missing modules*) - NumberOfUDIDMismatches : UINT; (*number of mismatched modules*) - NumberOfDifferentFirmware : UINT; (*number of modules with different firmware*) - SADR : ARRAY[0..100]OF UINT; (*safety address array*) - MissingModules : ARRAY[0..15]OF USINT; (*missing modules array*) - UDIDMismatches : ARRAY[0..15]OF USINT; (*udid mismatch array*) - DifferentFirmware : ARRAY[0..15]OF USINT; (*different firmware array*) - END_STRUCT; - RemoteControlStatusTypeV2 : STRUCT (*remote control status from SafeLOGIC*) - Command : UINT; (*last received command*) - Number : UINT; (*running number of last received command*) - Status : UINT; (*status of command*) - State : UINT; (*state of the last ENTER command*) - EnterData : UINT; (*last received ENTER command that was correct executed*) - EnterNumber : UINT; (*running number of the last received ENTER command*) - EnterExecuteStatus : UINT; (*state of the last received ENTER command*) - SafeOSState : USINT; (*status of the safety application*) - SafeKEYChanged : USINT; (*SafeKEY has been exchanged*) - LedTestActive : USINT; (*LED test active*) - Scanning : USINT; (*module scan active*) - openSAFETYstate : USINT; (*status of openSAFETY stack*) - FailSafe : USINT; (*Fail-Safe status*) - NumberOfMissingModules : UINT; (*number of missing modules*) - NumberOfUDIDMismatches : UINT; (*number of mismatched modules*) - NumberOfDifferentFirmware : UINT; (*number of modules with different firmware*) - SADR : ARRAY[0..299]OF UINT; (*safety address array*) - MissingModules : ARRAY[0..39]OF USINT; (*missing modules array*) - UDIDMismatches : ARRAY[0..39]OF USINT; (*udid mismatch array*) - DifferentFirmware : ARRAY[0..39]OF USINT; (*different firmware array*) - NumberOfConfiguredModules : UINT; (*number of configured modules*) - SetupModeActive : USINT; (*setup mode active*) - ProjectPresent : USINT; (*project present*) - PasswordSet : USINT; (*password set*) - IsSL81xx : USINT; (*SCM is part of SL81xx*) - IsSCMar : USINT; (*SCM is part of SCMar*) - SetupModeSupported : USINT; (*setup mode is supported*) - END_STRUCT; - TableHeaderATypeV1 : STRUCT (*header struct for table type A version 1*) - xTol : DINT; - yTol : DINT; - END_STRUCT; - TableEntryATypeV1 : STRUCT (*entry struct for table type A version 1*) - xVal : DINT; - yVal : DINT; - resVal : USINT; - END_STRUCT; - TableEntryBTypeV1 : STRUCT (*entry struct for table type B version 1*) - xVal : DINT; - yVal : DINT; - zVal : DINT; - resVal : DINT; - END_STRUCT; - TableEntryCTypeV1 : STRUCT (*entry struct for table type C version 1*) - Zone : UINT; - Position : UINT; - Dimension : UINT; - END_STRUCT; - TableHeaderDTypeV1 : STRUCT (*header struct for table type A version 1*) - Surveillance : BYTE; - END_STRUCT; - TableEntryDTypeV1 : STRUCT (*entry struct for table type D version 1*) - Object : UINT; - Type : UINT; - MinimumBeam : UINT; - MaximumBeam : UINT; - Dimension : UINT; - DimensionTolerance : UINT; - END_STRUCT; - TableHeaderDTypeV2 : STRUCT (*header struct for table type D version 2*) - Surveillance : BYTE; - END_STRUCT; - TableEntryDTypeV2 : STRUCT (*entry struct for table type D version 2*) - Object : UINT; - MinimumBeam : UINT; - MaximumBeam : UINT; - Dimension : UINT; - DimensionTolerance : UINT; - END_STRUCT; - TableHeaderETypeV1 : STRUCT (*header struct for table type E version 1*) - xDim : INT; - yDim : INT; - END_STRUCT; - TableEntryETypeV1 : STRUCT (*entry struct for table type D version 1*) - Entry : DINT; - END_STRUCT; - TableEntrySTypeV1 : STRUCT (*entry struct for table type S version 1*) - LinkTargetObjectID : DINT; - LinkTargetAxisType : DINT; - LinkSourceObjectID : DINT; - LinkSourceAxisType : DINT; - LinkFactorNum : DINT; - LinkFactorDenom : DINT; - END_STRUCT; - TableHeaderTTypeV1 : STRUCT (*header struct for table type T version 1*) - NumberOfActiveAxes : DINT; (*number of active axes*) - END_STRUCT; - TableEntryTTypeV1 : STRUCT (*entry struct for table type T version 1*) - KinObjID : DINT; - KinObjType : DINT; - KinObjTransX : DINT; - KinObjTransY : DINT; - KinObjTransZ : DINT; - KinObjRotAngle1 : DINT; - KinObjRotAngle2 : DINT; - KinObjRotAngle3 : DINT; - KinObjRotaryAxisDecRamp : DINT; - KinObjRotaryAxisMaxAcc : DINT; - KinObjLinearAxisDecRamp : DINT; - KinObjLinearAxisMaxAcc : DINT; - END_STRUCT; - TableHeaderTTypeV2 : STRUCT (*header struct for table type T version 2*) - NumberOfTableObjects : UINT; - VersionNumber : UINT; - NumberOfActiveAxes : DINT; - END_STRUCT; - TableEntryTTypeV2 : STRUCT (*entry struct for table type T version 2*) - KinObjID : DINT; - KinObjType : DINT; - KinObjTransX : DINT; - KinObjTransY : DINT; - KinObjTransZ : DINT; - KinObjRotAngle1 : DINT; - KinObjRotAngle2 : DINT; - KinObjRotAngle3 : DINT; - KinObjRotaryAxisDecRamp : DINT; - KinObjRotaryAxisMaxAcc : DINT; - KinObjLinearAxisDecRamp : DINT; - KinObjLinearAxisMaxAcc : DINT; - KinObjActivateWireFrameModel : DINT; - KinObjDistanceToBndElements : DINT; - END_STRUCT; - TableHeaderTTypeV3 : STRUCT (*header struct for table type T version 3*) - NumberOfTableObjects : UINT; - VersionNumber : UINT; - NumberOfActiveAxes : DINT; - END_STRUCT; - TableEntryTTypeV3 : STRUCT (*entry struct for table type T version 3*) - KinObjID : DINT; - KinObjType : DINT; - KinObjTransX : DINT; - KinObjTransY : DINT; - KinObjTransZ : DINT; - KinObjRotAngle1 : DINT; - KinObjRotAngle2 : DINT; - KinObjRotAngle3 : DINT; - KinObjRotaryAxisDecRamp : DINT; - KinObjRotaryAxisMaxAcc : DINT; - KinObjLinearAxisDecRamp : DINT; - KinObjLinearAxisMaxAcc : DINT; - KinObjActivateWireFrameModel : DINT; - KinObjDistanceToBndElements : DINT; - END_STRUCT; - TableHeaderTTypeV4 : STRUCT (*header struct for table type T version 4*) - NumberOfTableObjects : UINT; - VersionNumber : UINT; - NumberOfActiveAxes : DINT; - ParallelConfiguration : DINT; - END_STRUCT; - TableEntryTTypeV4 : STRUCT (*entry struct for table type T version 4*) - KinObjID : DINT; - KinObjType : DINT; - KinObjTransX : DINT; - KinObjTransY : DINT; - KinObjTransZ : DINT; - KinObjRotAngle1 : DINT; - KinObjRotAngle2 : DINT; - KinObjRotAngle3 : DINT; - KinObjRotaryAxisDecRamp : DINT; - KinObjRotaryAxisMaxAcc : DINT; - KinObjLinearAxisDecRamp : DINT; - KinObjLinearAxisMaxAcc : DINT; - KinObjActivateWireFrameModel : DINT; - KinObjDistanceToBndElements : DINT; - END_STRUCT; - TableEntryUTypeV1 : STRUCT (*entry struct for table type U version 1*) - SpaceID : DINT; - SpaceType : DINT; - SpaceTransX : DINT; - SpaceTransY : DINT; - SpaceTransZ : DINT; - SpaceRotAngle1 : DINT; - SpaceRotAngle2 : DINT; - SpaceRotAngle3 : DINT; - SpaceDimensionX : DINT; - SpaceDimensionY : DINT; - SpaceDimensionZ : DINT; - END_STRUCT; - TableEntryVTypeV1 : STRUCT (*entry struct for table type V version 1*) - SpaceID : DINT; - SpaceType : DINT; - KinObjID : DINT; - KinObjJointAxisType : DINT; - SpaceMaxLimit : DINT; - SpaceMinLimit : DINT; - END_STRUCT; - TableEntryWTypeV1 : STRUCT (* entry struct for table type W version 1*) - OrientID : DINT; - OrientType : DINT; - OrientTransX_RotAngle1 : DINT; - OrientTransY_RotAngle2 : DINT; - OrientTransZ_RotAngle3 : DINT; - END_STRUCT; -END_TYPE diff --git a/example/AsProject/Logical/Libraries/_AS/AsSafety/AsSafety.var b/example/AsProject/Logical/Libraries/_AS/AsSafety/AsSafety.var deleted file mode 100644 index e046dc4..0000000 --- a/example/AsProject/Logical/Libraries/_AS/AsSafety/AsSafety.var +++ /dev/null @@ -1,87 +0,0 @@ -VAR CONSTANT - safeVERSION_R107 : UINT := 16#107; (*safety release version - 1.7*) - safeVERSION_R110 : UINT := 16#110; (*safety release version - 1.10*) - safeDATA_TYPE_MAOP : UINT := 16#100; (*download type for machine options *) - safeDATA_TYPE_EXTMAOP : UINT := 16#200; (*download type for extended machine options *) - safeDATA_TYPE_TABLE : UINT := 16#300; (*download type for table objects *) - safeDATA_TYPE_ADDPARA : UINT := 16#400; (*download type for additional parameter*) - safeDATA_TYPE_APPLICATION : UINT := 16#1200; (*type for restore*) - safeINFO_TYPE_PWD_INFO : UINT := 1; (*SL info type for password info*) - safeINFO_TYPE_PWD_CHK : UINT := 2; (*SL info type for password check*) - safeTABLE_FILE_TYPE : UINT := 16#0000; (*reference to table file*) - safeTABLE_DATA_TYPE : UINT := 16#0001; (*pointer to table data*) - safeSRC_TYPE_UPLOAD_FILE : UINT := 0; (*file upload from SafeLOGIC*) - safeSRC_TYPE_LOCAL_DATA : UINT := 1; (*local data from memory buffer*) - safeSRC_TYPE_LOCAL_FILE : UINT := 2; (*local data from file*) - safeCMD_ENTER : UINT := 16#100; (*enter command*) - safeCMD_STATUS : UINT := 16#200; (*status command*) - safeCMD_STATUS_SL : UINT := 16#0000; (*read back status*) - safeCMD_N_UDID_ACKN : UINT := 16#20; (*acknowledge N modules*) - safeCMD_4_UDID_ACKN : UINT := 16#30; (*acknowledge 4 modules*) - safeCMD_3_UDID_ACKN : UINT := 16#40; (*acknowledge 3 modules*) - safeCMD_2_UDID_ACKN : UINT := 16#50; (*acknowledge 2 modules*) - safeCMD_1_UDID_ACKN : UINT := 16#60; (*acknowledge 1 module*) - safeCMD_FW_ACKN : UINT := 16#100; (*acknowledge firmware*) - safeCMD_SK_XCHG : UINT := 16#200; (*acknowledge SafeKEY*) - safeCMD_TEST : UINT := 16#1000; (*LED test*) - safeCMD_SCAN : UINT := 16#2000; (*scan*) - safeCMD_SK_PW : UINT := 16#5000; (*change password*) - safeCMD_SK_FORMAT : UINT := 16#6000; (*format SafeKEY*) - safeCMD_RESET : UINT := 16#7000; (*reset SafeLOGIC*) - safeCMD_CLEAR_DATA : UINT := 16#8000; (*clear additonal downloaded data*) - safeCMD_SETUP_MODE_ACT : UINT := 16#9000; (*activate setup mode*) - safeCMD_SETUP_MODE_DEACT : UINT := 16#9100; (*deactivate setup mode*) - safeCMD_VERSION_INFO : UINT := 16#F000; (*remote version info*) - safeRET_NO_TIMESTAMP : UDINT := 16#FFFFFFFF; (*no timestamp available*) - safeERR_VERSION : UINT := 36100; (*error wrong version for command structure*) - safeERR_PW_LENGTH : UINT := 36101; (*error wrong password length*) - safeERR_UDID : UINT := 36102; (*error no UDID*) - safeERR_ALLOC_MEM : UINT := 36103; (*error allocating memory*) - safeERR_INTERNAL_ERROR : UINT := 36104; (*internal error*) - safeERR_TIMEOUT : UINT := 36105; (*error connection timeout*) - safeERR_RC_CMD : UINT := 36106; (*error wrong command*) - safeERR_RC_ENTER_DATA : UINT := 36107; (*error wrong data for ENTER command*) - safeERR_RC_ENTER_PW : UINT := 36108; (*error no password for command*) - safeERR_RC_ENTER_SK_PW : UINT := 36109; (*error no new password for command*) - safeERR_RC_STATUS_DATA : UINT := 36110; (*error wrong data for STATUS command*) - safeERR_RC_DATA_LENGTH : UINT := 36111; (*error worng length for status data*) - safeERR_DL_NO_PASSWORD : UINT := 36112; (*error no password for download*) - safeERR_DL_PROTOCOL : UINT := 36113; (*error protocol version for download*) - safeERR_DL_FILE_OPEN : UINT := 36114; (*error file open*) - safeERR_DL_FILE_INVALID : UINT := 36115; (*error file invalid*) - safeERR_DL_FILE_TOO_BIG : UINT := 36116; (*error file too big*) - safeERR_DL_WRITE : UINT := 36117; (*error write*) - safeERR_DL_STREAM : UINT := 36118; (*error stream*) - safeERR_DL_CHECKSUM : UINT := 36119; (*error checksum*) - safeERR_DL_UDID : UINT := 36120; (*error UDID doesn't match*) - safeERR_DL_WRONG_FILE_SIZE : UINT := 36121; (*error wrong file size*) - safeERR_DL_NO_RIGHTS_TO_WRITE : UINT := 36122; (*error wrong password*) - safeERR_DL_UNLOCK_FILE_INFO : UINT := 36123; (*error file info*) - safeERR_DL_UNLOCK_READ : UINT := 36124; (*error unlock read*) - safeERR_DL_UNLOCK_WRITE : UINT := 36125; (*error unlock write*) - safeERR_DL_STATIC_UNLOCK : UINT := 36126; (*error static unlock*) - safeERR_DL_COMPARE_FAILED : UINT := 36127; (*error data compare failed*) - safeERR_DLDATA_TYPE_ERR : UINT := 36128; (*error data type for download*) - safeERR_DLDATA_ERR_DATA : UINT := 36129; (*error data for download*) - safeERR_COT_TYPE_ERR : UINT := 36130; (*error data type for upload*) - safeERR_COT_READING_FILE : UINT := 36131; (*error reading file*) - safeERR_BUFFER_NULL : UINT := 36132; (*required input buffer is NULL*) - safeERR_BUFFER_TOO_SMALL : UINT := 36133; (*required input buffer is too small*) - safeERR_FILE_EMPTY : UINT := 36134; (*file is empty or does not exist on SL/SLX*) - safeERR_FI_TYPE_ERR : UINT := 36135; (*error data type for getting file info*) - safeERR_SLINFO_TYPE_ERR : UINT := 36136; (*error data type for SL info*) - safeERR_SLINFO_RET_ERR : UINT := 36137; (*remote command returns error*) - safeERR_COT_PWD_ERR : UINT := 36138; (*wrong password for configuration on target command*) - safeERR_TC_INV_TABTYPE : UINT := 36180; (*invalid table type*) - safeERR_TC_INV_INST : UINT := 36181; (*invalid table instance*) - safeERR_TC_INV_INPUT_PTR : UINT := 36182; (*invalid input pointer*) - safeERR_TC_INV_TAB_LEN : UINT := 36183; (*invalid table length*) - safeERR_TC_INV_USER : UINT := 36184; (*invalid user name*) - safeERR_TC_TYPE_CPY_FCT : UINT := 36185; (*no copy function for table type*) - safeWRN_TC_WAIT_FOR_ACK : UINT := 36191; (*wait for acknowledge of tables*) - safeERR_TC_CHECK_FAILED : UINT := 36186; (*table check failed*) - safeERR_TC_EXTRACT_FAILED : UINT := 36187; (*extraction of output table data failed*) - safeERR_TC_LOCK_FAILED : UINT := 36188; (*table lock failed*) - safeERR_TC_ACK_SET : UINT := 36189; (*AckData is already set*) - safeERR_TC_INVALID_STEP : UINT := 36190; (*invalid step in table check*) -END_VAR diff --git a/example/AsProject/Logical/Libraries/_AS/AsSafety/SG4/AsSafety.h b/example/AsProject/Logical/Libraries/_AS/AsSafety/SG4/AsSafety.h deleted file mode 100644 index 1e59547..0000000 --- a/example/AsProject/Logical/Libraries/_AS/AsSafety/SG4/AsSafety.h +++ /dev/null @@ -1,1189 +0,0 @@ -/* Automation Studio generated header file */ -/* Do not edit ! */ - -#ifndef _ASSAFETY_ -#define _ASSAFETY_ -#ifdef __cplusplus -extern "C" -{ -#endif - -#include - -#include -#include -#include -#include -#include -#include - -#ifndef _BUR_PUBLIC -#define _BUR_PUBLIC -#endif -/* Constants */ -#ifdef _REPLACE_CONST - #define safeERR_TC_INVALID_STEP 36190U - #define safeERR_TC_ACK_SET 36189U - #define safeERR_TC_LOCK_FAILED 36188U - #define safeERR_TC_EXTRACT_FAILED 36187U - #define safeERR_TC_CHECK_FAILED 36186U - #define safeWRN_TC_WAIT_FOR_ACK 36191U - #define safeERR_TC_TYPE_CPY_FCT 36185U - #define safeERR_TC_INV_USER 36184U - #define safeERR_TC_INV_TAB_LEN 36183U - #define safeERR_TC_INV_INPUT_PTR 36182U - #define safeERR_TC_INV_INST 36181U - #define safeERR_TC_INV_TABTYPE 36180U - #define safeERR_COT_PWD_ERR 36138U - #define safeERR_SLINFO_RET_ERR 36137U - #define safeERR_SLINFO_TYPE_ERR 36136U - #define safeERR_FI_TYPE_ERR 36135U - #define safeERR_FILE_EMPTY 36134U - #define safeERR_BUFFER_TOO_SMALL 36133U - #define safeERR_BUFFER_NULL 36132U - #define safeERR_COT_READING_FILE 36131U - #define safeERR_COT_TYPE_ERR 36130U - #define safeERR_DLDATA_ERR_DATA 36129U - #define safeERR_DLDATA_TYPE_ERR 36128U - #define safeERR_DL_COMPARE_FAILED 36127U - #define safeERR_DL_STATIC_UNLOCK 36126U - #define safeERR_DL_UNLOCK_WRITE 36125U - #define safeERR_DL_UNLOCK_READ 36124U - #define safeERR_DL_UNLOCK_FILE_INFO 36123U - #define safeERR_DL_NO_RIGHTS_TO_WRITE 36122U - #define safeERR_DL_WRONG_FILE_SIZE 36121U - #define safeERR_DL_UDID 36120U - #define safeERR_DL_CHECKSUM 36119U - #define safeERR_DL_STREAM 36118U - #define safeERR_DL_WRITE 36117U - #define safeERR_DL_FILE_TOO_BIG 36116U - #define safeERR_DL_FILE_INVALID 36115U - #define safeERR_DL_FILE_OPEN 36114U - #define safeERR_DL_PROTOCOL 36113U - #define safeERR_DL_NO_PASSWORD 36112U - #define safeERR_RC_DATA_LENGTH 36111U - #define safeERR_RC_STATUS_DATA 36110U - #define safeERR_RC_ENTER_SK_PW 36109U - #define safeERR_RC_ENTER_PW 36108U - #define safeERR_RC_ENTER_DATA 36107U - #define safeERR_RC_CMD 36106U - #define safeERR_TIMEOUT 36105U - #define safeERR_INTERNAL_ERROR 36104U - #define safeERR_ALLOC_MEM 36103U - #define safeERR_UDID 36102U - #define safeERR_PW_LENGTH 36101U - #define safeERR_VERSION 36100U - #define safeRET_NO_TIMESTAMP 4294967295U - #define safeCMD_VERSION_INFO 61440U - #define safeCMD_SETUP_MODE_DEACT 37120U - #define safeCMD_SETUP_MODE_ACT 36864U - #define safeCMD_CLEAR_DATA 32768U - #define safeCMD_RESET 28672U - #define safeCMD_SK_FORMAT 24576U - #define safeCMD_SK_PW 20480U - #define safeCMD_SCAN 8192U - #define safeCMD_TEST 4096U - #define safeCMD_SK_XCHG 512U - #define safeCMD_FW_ACKN 256U - #define safeCMD_1_UDID_ACKN 96U - #define safeCMD_2_UDID_ACKN 80U - #define safeCMD_3_UDID_ACKN 64U - #define safeCMD_4_UDID_ACKN 48U - #define safeCMD_N_UDID_ACKN 32U - #define safeCMD_STATUS_SL 0U - #define safeCMD_STATUS 512U - #define safeCMD_ENTER 256U - #define safeSRC_TYPE_LOCAL_FILE 2U - #define safeSRC_TYPE_LOCAL_DATA 1U - #define safeSRC_TYPE_UPLOAD_FILE 0U - #define safeTABLE_DATA_TYPE 1U - #define safeTABLE_FILE_TYPE 0U - #define safeINFO_TYPE_PWD_CHK 2U - #define safeINFO_TYPE_PWD_INFO 1U - #define safeDATA_TYPE_APPLICATION 4608U - #define safeDATA_TYPE_ADDPARA 1024U - #define safeDATA_TYPE_TABLE 768U - #define safeDATA_TYPE_EXTMAOP 512U - #define safeDATA_TYPE_MAOP 256U - #define safeVERSION_R110 272U - #define safeVERSION_R107 263U -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST unsigned short safeERR_TC_INVALID_STEP; - _GLOBAL_CONST unsigned short safeERR_TC_ACK_SET; - _GLOBAL_CONST unsigned short safeERR_TC_LOCK_FAILED; - _GLOBAL_CONST unsigned short safeERR_TC_EXTRACT_FAILED; - _GLOBAL_CONST unsigned short safeERR_TC_CHECK_FAILED; - _GLOBAL_CONST unsigned short safeWRN_TC_WAIT_FOR_ACK; - _GLOBAL_CONST unsigned short safeERR_TC_TYPE_CPY_FCT; - _GLOBAL_CONST unsigned short safeERR_TC_INV_USER; - _GLOBAL_CONST unsigned short safeERR_TC_INV_TAB_LEN; - _GLOBAL_CONST unsigned short safeERR_TC_INV_INPUT_PTR; - _GLOBAL_CONST unsigned short safeERR_TC_INV_INST; - _GLOBAL_CONST unsigned short safeERR_TC_INV_TABTYPE; - _GLOBAL_CONST unsigned short safeERR_COT_PWD_ERR; - _GLOBAL_CONST unsigned short safeERR_SLINFO_RET_ERR; - _GLOBAL_CONST unsigned short safeERR_SLINFO_TYPE_ERR; - _GLOBAL_CONST unsigned short safeERR_FI_TYPE_ERR; - _GLOBAL_CONST unsigned short safeERR_FILE_EMPTY; - _GLOBAL_CONST unsigned short safeERR_BUFFER_TOO_SMALL; - _GLOBAL_CONST unsigned short safeERR_BUFFER_NULL; - _GLOBAL_CONST unsigned short safeERR_COT_READING_FILE; - _GLOBAL_CONST unsigned short safeERR_COT_TYPE_ERR; - _GLOBAL_CONST unsigned short safeERR_DLDATA_ERR_DATA; - _GLOBAL_CONST unsigned short safeERR_DLDATA_TYPE_ERR; - _GLOBAL_CONST unsigned short safeERR_DL_COMPARE_FAILED; - _GLOBAL_CONST unsigned short safeERR_DL_STATIC_UNLOCK; - _GLOBAL_CONST unsigned short safeERR_DL_UNLOCK_WRITE; - _GLOBAL_CONST unsigned short safeERR_DL_UNLOCK_READ; - _GLOBAL_CONST unsigned short safeERR_DL_UNLOCK_FILE_INFO; - _GLOBAL_CONST unsigned short safeERR_DL_NO_RIGHTS_TO_WRITE; - _GLOBAL_CONST unsigned short safeERR_DL_WRONG_FILE_SIZE; - _GLOBAL_CONST unsigned short safeERR_DL_UDID; - _GLOBAL_CONST unsigned short safeERR_DL_CHECKSUM; - _GLOBAL_CONST unsigned short safeERR_DL_STREAM; - _GLOBAL_CONST unsigned short safeERR_DL_WRITE; - _GLOBAL_CONST unsigned short safeERR_DL_FILE_TOO_BIG; - _GLOBAL_CONST unsigned short safeERR_DL_FILE_INVALID; - _GLOBAL_CONST unsigned short safeERR_DL_FILE_OPEN; - _GLOBAL_CONST unsigned short safeERR_DL_PROTOCOL; - _GLOBAL_CONST unsigned short safeERR_DL_NO_PASSWORD; - _GLOBAL_CONST unsigned short safeERR_RC_DATA_LENGTH; - _GLOBAL_CONST unsigned short safeERR_RC_STATUS_DATA; - _GLOBAL_CONST unsigned short safeERR_RC_ENTER_SK_PW; - _GLOBAL_CONST unsigned short safeERR_RC_ENTER_PW; - _GLOBAL_CONST unsigned short safeERR_RC_ENTER_DATA; - _GLOBAL_CONST unsigned short safeERR_RC_CMD; - _GLOBAL_CONST unsigned short safeERR_TIMEOUT; - _GLOBAL_CONST unsigned short safeERR_INTERNAL_ERROR; - _GLOBAL_CONST unsigned short safeERR_ALLOC_MEM; - _GLOBAL_CONST unsigned short safeERR_UDID; - _GLOBAL_CONST unsigned short safeERR_PW_LENGTH; - _GLOBAL_CONST unsigned short safeERR_VERSION; - _GLOBAL_CONST unsigned long safeRET_NO_TIMESTAMP; - _GLOBAL_CONST unsigned short safeCMD_VERSION_INFO; - _GLOBAL_CONST unsigned short safeCMD_SETUP_MODE_DEACT; - _GLOBAL_CONST unsigned short safeCMD_SETUP_MODE_ACT; - _GLOBAL_CONST unsigned short safeCMD_CLEAR_DATA; - _GLOBAL_CONST unsigned short safeCMD_RESET; - _GLOBAL_CONST unsigned short safeCMD_SK_FORMAT; - _GLOBAL_CONST unsigned short safeCMD_SK_PW; - _GLOBAL_CONST unsigned short safeCMD_SCAN; - _GLOBAL_CONST unsigned short safeCMD_TEST; - _GLOBAL_CONST unsigned short safeCMD_SK_XCHG; - _GLOBAL_CONST unsigned short safeCMD_FW_ACKN; - _GLOBAL_CONST unsigned short safeCMD_1_UDID_ACKN; - _GLOBAL_CONST unsigned short safeCMD_2_UDID_ACKN; - _GLOBAL_CONST unsigned short safeCMD_3_UDID_ACKN; - _GLOBAL_CONST unsigned short safeCMD_4_UDID_ACKN; - _GLOBAL_CONST unsigned short safeCMD_N_UDID_ACKN; - _GLOBAL_CONST unsigned short safeCMD_STATUS_SL; - _GLOBAL_CONST unsigned short safeCMD_STATUS; - _GLOBAL_CONST unsigned short safeCMD_ENTER; - _GLOBAL_CONST unsigned short safeSRC_TYPE_LOCAL_FILE; - _GLOBAL_CONST unsigned short safeSRC_TYPE_LOCAL_DATA; - _GLOBAL_CONST unsigned short safeSRC_TYPE_UPLOAD_FILE; - _GLOBAL_CONST unsigned short safeTABLE_DATA_TYPE; - _GLOBAL_CONST unsigned short safeTABLE_FILE_TYPE; - _GLOBAL_CONST unsigned short safeINFO_TYPE_PWD_CHK; - _GLOBAL_CONST unsigned short safeINFO_TYPE_PWD_INFO; - _GLOBAL_CONST unsigned short safeDATA_TYPE_APPLICATION; - _GLOBAL_CONST unsigned short safeDATA_TYPE_ADDPARA; - _GLOBAL_CONST unsigned short safeDATA_TYPE_TABLE; - _GLOBAL_CONST unsigned short safeDATA_TYPE_EXTMAOP; - _GLOBAL_CONST unsigned short safeDATA_TYPE_MAOP; - _GLOBAL_CONST unsigned short safeVERSION_R110; - _GLOBAL_CONST unsigned short safeVERSION_R107; -#endif - - - - -/* Datatypes and datatypes of function blocks */ -typedef struct FileReferenceType -{ plcstring Device[81]; - plcstring File[81]; -} FileReferenceType; - -typedef struct AsSafetyInternalType -{ plcbit Clean; - unsigned short State; - unsigned short Result; - unsigned long Tmp; - unsigned long pThis; - unsigned long pFcn; -} AsSafetyInternalType; - -typedef struct SourceLocalDataTypeV1 -{ unsigned long pFileData; - unsigned long FileLength; -} SourceLocalDataTypeV1; - -typedef struct SourceLocalFileTypeV1 -{ struct FileReferenceType SourceFile; -} SourceLocalFileTypeV1; - -typedef struct DataSourceTypeV1 -{ unsigned short Type; - struct SourceLocalDataTypeV1 LocalData; - struct SourceLocalFileTypeV1 LocalFile; -} DataSourceTypeV1; - -typedef struct InfoCmdPwdInfoTypeV1 -{ unsigned short Version; - plcbit PasswordSet; -} InfoCmdPwdInfoTypeV1; - -typedef struct InfoCmdPwdChkTypeV1 -{ unsigned short Version; - plcstring Password[17]; - plcbit PasswordEqual; -} InfoCmdPwdChkTypeV1; - -typedef struct ConfigurationAddParaTypeV2 -{ unsigned short SADR; - unsigned char ID; - unsigned long pParaData; - unsigned long Length; - unsigned long LengthOut; - unsigned long CRC; - unsigned long Timestamp; -} ConfigurationAddParaTypeV2; - -typedef struct ConfigurationAddParaTypeV1 -{ unsigned short SADR; - unsigned char ID; - unsigned long pParaData; - unsigned long Length; - unsigned long CRC; - unsigned long Timestamp; -} ConfigurationAddParaTypeV1; - -typedef struct ConfigurationBitOptionsTypeV1 -{ unsigned char BitData[64]; -} ConfigurationBitOptionsTypeV1; - -typedef struct ConfigurationCmdAddParaTypeV2 -{ unsigned short Version; - plcstring Password[17]; - unsigned long pParaDataOutput; - unsigned short NumberParaSetsOutput; - unsigned short NumberParaSetsOutputOut; - unsigned long pBackupFile; - unsigned long pXmlOutputFile; -} ConfigurationCmdAddParaTypeV2; - -typedef struct ConfigurationCmdAddParaTypeV1 -{ unsigned short Version; - plcstring Password[17]; - unsigned long pParaDataOutput; - unsigned short NumberParaSetsOutput; -} ConfigurationCmdAddParaTypeV1; - -typedef struct ConfigurationCmdExtMaOpTypeV2 -{ unsigned short Version; - plcstring Password[17]; - unsigned long pIntDataOutput; - unsigned short NumberIntOutput; - unsigned short NumberIntOutputOut; - unsigned long pUintDataOutput; - unsigned short NumberUintOutput; - unsigned short NumberUintOutputOut; - unsigned long pDintDataOutput; - unsigned short NumberDintOutput; - unsigned short NumberDintOutputOut; - unsigned long pUdintDataOutput; - unsigned short NumberUdintOutput; - unsigned short NumberUdintOutputOut; - unsigned long pBackupFile; - unsigned long pXmlOutputFile; -} ConfigurationCmdExtMaOpTypeV2; - -typedef struct ConfigurationCmdExtMaOpTypeV1 -{ unsigned short Version; - plcstring Password[17]; - unsigned long pIntDataOutput; - unsigned short NumberIntOutput; - unsigned long pUintDataOutput; - unsigned short NumberUintOutput; - unsigned long pDintDataOutput; - unsigned short NumberDintOutput; - unsigned long pUdintDataOutput; - unsigned short NumberUdintOutput; -} ConfigurationCmdExtMaOpTypeV1; - -typedef struct ConfigurationCmdMaOpTypeV2 -{ unsigned short Version; - plcstring Password[17]; - unsigned long pDeviceListOutput; - unsigned short NumberDevicesOutput; - unsigned short NumberDevicesOutputOut; - unsigned long pMachineOptionsOutput; - unsigned long pModuleFlagsOutput; - unsigned long pBackupFile; - unsigned long pXmlOutputFile; -} ConfigurationCmdMaOpTypeV2; - -typedef struct ConfigurationCmdMaOpTypeV1 -{ unsigned short Version; - plcstring Password[17]; - unsigned long pDeviceListOutput; - unsigned short NumberDevicesOutput; - unsigned long pMachineOptionsOutput; - unsigned long pModuleFlagsOutput; -} ConfigurationCmdMaOpTypeV1; - -typedef struct ConfigurationCmdTableTypeV2 -{ unsigned short Version; - plcstring Password[17]; - unsigned long pTableDataOutput; - unsigned short NumberTablesOutput; - unsigned short NumberTablesOutputOut; - unsigned long pBackupFile; - unsigned long pXmlOutputFile; -} ConfigurationCmdTableTypeV2; - -typedef struct ConfigurationCmdTableTypeV1 -{ unsigned short Version; - plcstring Password[17]; - unsigned long pTableDataOutput; - unsigned short NumberTablesOutput; -} ConfigurationCmdTableTypeV1; - -typedef struct FileInfoCmdTypeV1 -{ unsigned short Version; - struct DataSourceTypeV1 DataSource; - unsigned long Timestamp; - unsigned long pCrcs; - unsigned short NumberOfCrcs; - unsigned short NumberOfCrcsOut; -} FileInfoCmdTypeV1; - -typedef struct ConfigurationDeviceTypeV1 -{ unsigned short SADR; - unsigned char UDID[6]; -} ConfigurationDeviceTypeV1; - -typedef struct ConfigurationDintOptionsTypeV1 -{ unsigned short ID; - signed long Value; -} ConfigurationDintOptionsTypeV1; - -typedef struct ConfigurationIntOptionsTypeV1 -{ unsigned short ID; - signed short Value; -} ConfigurationIntOptionsTypeV1; - -typedef struct ConfigurationModuleFlagsTypeV1 -{ unsigned char Optional[128]; - unsigned char Startup[128]; - unsigned char NotPresent[128]; -} ConfigurationModuleFlagsTypeV1; - -typedef struct ConfigurationTableTypeV2 -{ unsigned short ID; - unsigned char Type; - unsigned short NumberOfCRCs; - unsigned short NumberOfCRCsOut; - unsigned long pCRCData; -} ConfigurationTableTypeV2; - -typedef struct ConfigurationTableTypeV1 -{ unsigned short ID; - unsigned char Type; - unsigned short NumberOfCRCs; - unsigned long pCRCData; -} ConfigurationTableTypeV1; - -typedef struct ConfigurationUdintOptionsTypeV1 -{ unsigned short ID; - unsigned long Value; -} ConfigurationUdintOptionsTypeV1; - -typedef struct ConfigurationUintOptionsTypeV1 -{ unsigned short ID; - unsigned short Value; -} ConfigurationUintOptionsTypeV1; - -typedef struct DownloadAcknExtMaOpTypeV1 -{ plcbit AcknIntOptions[64]; - plcbit AcknUintOptions[64]; - plcbit AcknDintOptions[64]; - plcbit AcknUdintOptions[64]; -} DownloadAcknExtMaOpTypeV1; - -typedef struct DownloadAcknMaOpTypeV1 -{ unsigned char AcknBitOptions[64]; -} DownloadAcknMaOpTypeV1; - -typedef struct DownloadAcknAddParaTypeV1 -{ unsigned char AcknBitAddPara[64]; -} DownloadAcknAddParaTypeV1; - -typedef struct DownloadCmdAddParaTypeV2 -{ unsigned short Version; - plcstring Password[17]; - unsigned long UDID_Low; - unsigned short UDID_High; - unsigned char Unlock; - unsigned long pParaListInput; - unsigned short NumberParaSetsInput; - unsigned long pParaDataOutput; - unsigned short NumberParaSetsOutput; - unsigned short NumberParaSetsOutputOut; - unsigned long pBackupFile; - unsigned long pXmlOutputFile; -} DownloadCmdAddParaTypeV2; - -typedef struct DownloadCmdAddParaTypeV1 -{ unsigned short Version; - plcstring Password[17]; - unsigned long UDID_Low; - unsigned short UDID_High; - unsigned char Unlock; - unsigned long pParaListInput; - unsigned short NumberParaSetsInput; - unsigned long pParaDataOutput; - unsigned short NumberParaSetsOutput; -} DownloadCmdAddParaTypeV1; - -typedef struct DownloadCmdApplicationTypeV1 -{ unsigned short Version; - plcstring Password[17]; - unsigned long UDID_Low; - unsigned short UDID_High; - unsigned short ApplicationID; - plcstring Device[81]; - plcstring File[81]; - unsigned char Unlock; -} DownloadCmdApplicationTypeV1; - -typedef struct DownloadCmdExtMaOpTypeV2 -{ unsigned short Version; - plcstring Password[17]; - unsigned long UDID_Low; - unsigned short UDID_High; - unsigned char Unlock; - unsigned long pIntDataInput; - unsigned short NumberIntInput; - unsigned long pUintDataInput; - unsigned short NumberUintInput; - unsigned long pDintDataInput; - unsigned short NumberDintInput; - unsigned long pUdintDataInput; - unsigned short NumberUdintInput; - unsigned long pAcknMachineOptions; - unsigned long pIntDataOutput; - unsigned short NumberIntOutput; - unsigned short NumberIntOutputOut; - unsigned long pUintDataOutput; - unsigned short NumberUintOutput; - unsigned short NumberUintOutputOut; - unsigned long pDintDataOutput; - unsigned short NumberDintOutput; - unsigned short NumberDintOutputOut; - unsigned long pUdintDataOutput; - unsigned short NumberUdintOutput; - unsigned short NumberUdintOutputOut; - unsigned long pBackupFile; - unsigned long pXmlOutputFile; -} DownloadCmdExtMaOpTypeV2; - -typedef struct DownloadCmdExtMaOpTypeV1 -{ unsigned short Version; - plcstring Password[17]; - unsigned long UDID_Low; - unsigned short UDID_High; - unsigned char Unlock; - unsigned long pIntDataInput; - unsigned short NumberIntInput; - unsigned long pUintDataInput; - unsigned short NumberUintInput; - unsigned long pDintDataInput; - unsigned short NumberDintInput; - unsigned long pUdintDataInput; - unsigned short NumberUdintInput; - unsigned long pAcknMachineOptions; - unsigned long pIntDataOutput; - unsigned short NumberIntOutput; - unsigned long pUintDataOutput; - unsigned short NumberUintOutput; - unsigned long pDintDataOutput; - unsigned short NumberDintOutput; - unsigned long pUdintDataOutput; - unsigned short NumberUdintOutput; -} DownloadCmdExtMaOpTypeV1; - -typedef struct DownloadCmdMaOpTypeV2 -{ unsigned short Version; - plcstring Password[17]; - unsigned long UDID_Low; - unsigned short UDID_High; - unsigned char Unlock; - unsigned long pDeviceListInput; - unsigned short NumberDevicesInput; - unsigned long pMachineOptionsInput; - unsigned long pModuleFlagsInput; - unsigned long pAcknMachineOptions; - unsigned long pDeviceListOutput; - unsigned short NumberDevicesOutput; - unsigned short NumberDevicesOutputOut; - unsigned long pMachineOptionsOutput; - unsigned long pModuleFlagsOutput; - unsigned long pBackupFile; - unsigned long pXmlOutputFile; -} DownloadCmdMaOpTypeV2; - -typedef struct DownloadCmdMaOpTypeV1 -{ unsigned short Version; - plcstring Password[17]; - unsigned long UDID_Low; - unsigned short UDID_High; - unsigned char Unlock; - unsigned long pDeviceListInput; - unsigned short NumberDevicesInput; - unsigned long pMachineOptionsInput; - unsigned long pModuleFlagsInput; - unsigned long pAcknMachineOptions; - unsigned long pDeviceListOutput; - unsigned short NumberDevicesOutput; - unsigned long pMachineOptionsOutput; - unsigned long pModuleFlagsOutput; -} DownloadCmdMaOpTypeV1; - -typedef struct DownloadCmdTableTypeV2 -{ unsigned short Version; - plcstring Password[17]; - unsigned long UDID_Low; - unsigned short UDID_High; - unsigned char Unlock; - unsigned long pTableDataInput; - unsigned short NumberTablesInput; - unsigned long pTableDataOutput; - unsigned short NumberTablesOutput; - unsigned short NumberTablesOutputOut; - unsigned long pBackupFile; - unsigned long pXmlOutputFile; -} DownloadCmdTableTypeV2; - -typedef struct DownloadCmdTableTypeV1 -{ unsigned short Version; - plcstring Password[17]; - unsigned long UDID_Low; - unsigned short UDID_High; - unsigned char Unlock; - unsigned long pTableDataInput; - unsigned short NumberTablesInput; - unsigned long pTableDataOutput; - unsigned short NumberTablesOutput; -} DownloadCmdTableTypeV1; - -typedef struct DownloadCmdFileTypeV1 -{ unsigned short Version; - plcstring Password[17]; - unsigned long UDID_Low; - unsigned short UDID_High; - unsigned char Unlock; - struct DataSourceTypeV1 DataSource; - unsigned long pCrcs; - unsigned short NumberOfCrcs; - unsigned short NumberOfCrcsOut; -} DownloadCmdFileTypeV1; - -typedef struct DownloadAddParaTypeV1 -{ unsigned short SADR; - unsigned char ID; - unsigned long pParaData; - unsigned long Length; - unsigned long pAcknAddPara; -} DownloadAddParaTypeV1; - -typedef struct DownloadDeviceTypeV1 -{ unsigned short SADR; - unsigned long UDID_Low; - unsigned short UDID_High; -} DownloadDeviceTypeV1; - -typedef struct DownloadTableTypeV1 -{ plcstring Device[81]; - plcstring File[81]; -} DownloadTableTypeV1; - -typedef struct DownloadTableTypeV2 -{ unsigned short Type; - plcstring Device[81]; - plcstring File[81]; - unsigned long pData; - unsigned long DataLen; -} DownloadTableTypeV2; - -typedef struct RemoteControlCmdTypeV1 -{ unsigned short Version; - unsigned short Command; - unsigned short Number; - unsigned short Data; - plcstring Password[17]; - plcstring NewPassword[17]; -} RemoteControlCmdTypeV1; - -typedef struct RemoteControlStatusTypeV1 -{ unsigned short Command; - unsigned short Number; - unsigned short Status; - unsigned short State; - unsigned short EnterData; - unsigned short EnterNumber; - unsigned short EnterExecuteStatus; - unsigned char SafeOSState; - unsigned char SafeKEYChanged; - unsigned char LedTestActive; - unsigned char Scanning; - unsigned char openSAFETYstate; - unsigned char FailSafe; - unsigned short NumberOfMissingModules; - unsigned short NumberOfUDIDMismatches; - unsigned short NumberOfDifferentFirmware; - unsigned short SADR[101]; - unsigned char MissingModules[16]; - unsigned char UDIDMismatches[16]; - unsigned char DifferentFirmware[16]; -} RemoteControlStatusTypeV1; - -typedef struct RemoteControlStatusTypeV2 -{ unsigned short Command; - unsigned short Number; - unsigned short Status; - unsigned short State; - unsigned short EnterData; - unsigned short EnterNumber; - unsigned short EnterExecuteStatus; - unsigned char SafeOSState; - unsigned char SafeKEYChanged; - unsigned char LedTestActive; - unsigned char Scanning; - unsigned char openSAFETYstate; - unsigned char FailSafe; - unsigned short NumberOfMissingModules; - unsigned short NumberOfUDIDMismatches; - unsigned short NumberOfDifferentFirmware; - unsigned short SADR[300]; - unsigned char MissingModules[40]; - unsigned char UDIDMismatches[40]; - unsigned char DifferentFirmware[40]; - unsigned short NumberOfConfiguredModules; - unsigned char SetupModeActive; - unsigned char ProjectPresent; - unsigned char PasswordSet; - unsigned char IsSL81xx; - unsigned char IsSCMar; - unsigned char SetupModeSupported; -} RemoteControlStatusTypeV2; - -typedef struct TableHeaderATypeV1 -{ signed long xTol; - signed long yTol; -} TableHeaderATypeV1; - -typedef struct TableEntryATypeV1 -{ signed long xVal; - signed long yVal; - unsigned char resVal; -} TableEntryATypeV1; - -typedef struct TableEntryBTypeV1 -{ signed long xVal; - signed long yVal; - signed long zVal; - signed long resVal; -} TableEntryBTypeV1; - -typedef struct TableEntryCTypeV1 -{ unsigned short Zone; - unsigned short Position; - unsigned short Dimension; -} TableEntryCTypeV1; - -typedef struct TableHeaderDTypeV1 -{ plcbyte Surveillance; -} TableHeaderDTypeV1; - -typedef struct TableEntryDTypeV1 -{ unsigned short Object; - unsigned short Type; - unsigned short MinimumBeam; - unsigned short MaximumBeam; - unsigned short Dimension; - unsigned short DimensionTolerance; -} TableEntryDTypeV1; - -typedef struct TableHeaderDTypeV2 -{ plcbyte Surveillance; -} TableHeaderDTypeV2; - -typedef struct TableEntryDTypeV2 -{ unsigned short Object; - unsigned short MinimumBeam; - unsigned short MaximumBeam; - unsigned short Dimension; - unsigned short DimensionTolerance; -} TableEntryDTypeV2; - -typedef struct TableHeaderETypeV1 -{ signed short xDim; - signed short yDim; -} TableHeaderETypeV1; - -typedef struct TableEntryETypeV1 -{ signed long Entry; -} TableEntryETypeV1; - -typedef struct TableEntrySTypeV1 -{ signed long LinkTargetObjectID; - signed long LinkTargetAxisType; - signed long LinkSourceObjectID; - signed long LinkSourceAxisType; - signed long LinkFactorNum; - signed long LinkFactorDenom; -} TableEntrySTypeV1; - -typedef struct TableHeaderTTypeV1 -{ signed long NumberOfActiveAxes; -} TableHeaderTTypeV1; - -typedef struct TableEntryTTypeV1 -{ signed long KinObjID; - signed long KinObjType; - signed long KinObjTransX; - signed long KinObjTransY; - signed long KinObjTransZ; - signed long KinObjRotAngle1; - signed long KinObjRotAngle2; - signed long KinObjRotAngle3; - signed long KinObjRotaryAxisDecRamp; - signed long KinObjRotaryAxisMaxAcc; - signed long KinObjLinearAxisDecRamp; - signed long KinObjLinearAxisMaxAcc; -} TableEntryTTypeV1; - -typedef struct TableHeaderTTypeV2 -{ unsigned short NumberOfTableObjects; - unsigned short VersionNumber; - signed long NumberOfActiveAxes; -} TableHeaderTTypeV2; - -typedef struct TableEntryTTypeV2 -{ signed long KinObjID; - signed long KinObjType; - signed long KinObjTransX; - signed long KinObjTransY; - signed long KinObjTransZ; - signed long KinObjRotAngle1; - signed long KinObjRotAngle2; - signed long KinObjRotAngle3; - signed long KinObjRotaryAxisDecRamp; - signed long KinObjRotaryAxisMaxAcc; - signed long KinObjLinearAxisDecRamp; - signed long KinObjLinearAxisMaxAcc; - signed long KinObjActivateWireFrameModel; - signed long KinObjDistanceToBndElements; -} TableEntryTTypeV2; - -typedef struct TableHeaderTTypeV3 -{ unsigned short NumberOfTableObjects; - unsigned short VersionNumber; - signed long NumberOfActiveAxes; -} TableHeaderTTypeV3; - -typedef struct TableEntryTTypeV3 -{ signed long KinObjID; - signed long KinObjType; - signed long KinObjTransX; - signed long KinObjTransY; - signed long KinObjTransZ; - signed long KinObjRotAngle1; - signed long KinObjRotAngle2; - signed long KinObjRotAngle3; - signed long KinObjRotaryAxisDecRamp; - signed long KinObjRotaryAxisMaxAcc; - signed long KinObjLinearAxisDecRamp; - signed long KinObjLinearAxisMaxAcc; - signed long KinObjActivateWireFrameModel; - signed long KinObjDistanceToBndElements; -} TableEntryTTypeV3; - -typedef struct TableHeaderTTypeV4 -{ unsigned short NumberOfTableObjects; - unsigned short VersionNumber; - signed long NumberOfActiveAxes; - signed long ParallelConfiguration; -} TableHeaderTTypeV4; - -typedef struct TableEntryTTypeV4 -{ signed long KinObjID; - signed long KinObjType; - signed long KinObjTransX; - signed long KinObjTransY; - signed long KinObjTransZ; - signed long KinObjRotAngle1; - signed long KinObjRotAngle2; - signed long KinObjRotAngle3; - signed long KinObjRotaryAxisDecRamp; - signed long KinObjRotaryAxisMaxAcc; - signed long KinObjLinearAxisDecRamp; - signed long KinObjLinearAxisMaxAcc; - signed long KinObjActivateWireFrameModel; - signed long KinObjDistanceToBndElements; -} TableEntryTTypeV4; - -typedef struct TableEntryUTypeV1 -{ signed long SpaceID; - signed long SpaceType; - signed long SpaceTransX; - signed long SpaceTransY; - signed long SpaceTransZ; - signed long SpaceRotAngle1; - signed long SpaceRotAngle2; - signed long SpaceRotAngle3; - signed long SpaceDimensionX; - signed long SpaceDimensionY; - signed long SpaceDimensionZ; -} TableEntryUTypeV1; - -typedef struct TableEntryVTypeV1 -{ signed long SpaceID; - signed long SpaceType; - signed long KinObjID; - signed long KinObjJointAxisType; - signed long SpaceMaxLimit; - signed long SpaceMinLimit; -} TableEntryVTypeV1; - -typedef struct TableEntryWTypeV1 -{ signed long OrientID; - signed long OrientType; - signed long OrientTransX_RotAngle1; - signed long OrientTransY_RotAngle2; - signed long OrientTransZ_RotAngle3; -} TableEntryWTypeV1; - -typedef struct safeRemoteControl -{ - /* VAR_INPUT (analog) */ - unsigned short SafeLOGICID; - unsigned long pCommandData; - /* VAR_OUTPUT (analog) */ - unsigned short StatusID; - struct RemoteControlStatusTypeV1 SafeLOGICStatus; - /* VAR (analog) */ - unsigned short i_state; - unsigned short i_result; - unsigned long i_tmp; - unsigned long i_handle; - /* VAR_INPUT (digital) */ - plcbit Execute; - /* VAR_OUTPUT (digital) */ - plcbit Done; - plcbit Busy; - plcbit Error; -} safeRemoteControl_typ; - -typedef struct safeRemoteControl_V2 -{ - /* VAR_INPUT (analog) */ - unsigned short SafeLOGICID; - unsigned long pCommandData; - /* VAR_OUTPUT (analog) */ - unsigned short StatusID; - struct RemoteControlStatusTypeV2 SafeLOGICStatus; - /* VAR (analog) */ - struct AsSafetyInternalType Internal; - /* VAR_INPUT (digital) */ - plcbit Execute; - /* VAR_OUTPUT (digital) */ - plcbit Done; - plcbit Busy; - plcbit Error; -} safeRemoteControl_V2_typ; - -typedef struct safeDownloadApplication -{ - /* VAR_INPUT (analog) */ - unsigned short SafeLOGICID; - unsigned long pCommandData; - /* VAR_OUTPUT (analog) */ - unsigned short StatusID; - unsigned long ApplicationCRC; - /* VAR (analog) */ - unsigned short i_state; - unsigned short i_result; - unsigned long i_tmp; - unsigned long i_handle; - /* VAR_INPUT (digital) */ - plcbit Execute; - /* VAR_OUTPUT (digital) */ - plcbit Done; - plcbit Busy; - plcbit Error; - plcbit UnlockRequired; -} safeDownloadApplication_typ; - -typedef struct safeDownloadApplication_V2 -{ - /* VAR_INPUT (analog) */ - unsigned short SafeLOGICID; - unsigned long pCommandData; - /* VAR_OUTPUT (analog) */ - unsigned short StatusID; - unsigned long ApplicationCRC; - /* VAR (analog) */ - struct AsSafetyInternalType Internal; - /* VAR_INPUT (digital) */ - plcbit Execute; - /* VAR_OUTPUT (digital) */ - plcbit Done; - plcbit Busy; - plcbit Error; - plcbit UnlockRequired; -} safeDownloadApplication_V2_typ; - -typedef struct safeDownloadData -{ - /* VAR_INPUT (analog) */ - unsigned short SafeLOGICID; - unsigned short Type; - unsigned long pCommandData; - /* VAR_OUTPUT (analog) */ - unsigned short StatusID; - unsigned long Timestamp; - /* VAR (analog) */ - unsigned short i_state; - unsigned short i_result; - unsigned long i_tmp; - unsigned long i_handle; - /* VAR_INPUT (digital) */ - plcbit Execute; - /* VAR_OUTPUT (digital) */ - plcbit Done; - plcbit Busy; - plcbit Error; - plcbit UnlockRequired; -} safeDownloadData_typ; - -typedef struct safeDownloadData_V2 -{ - /* VAR_INPUT (analog) */ - unsigned short SafeLOGICID; - unsigned short Type; - unsigned long pCommandData; - /* VAR_OUTPUT (analog) */ - unsigned short StatusID; - unsigned long Timestamp; - /* VAR (analog) */ - struct AsSafetyInternalType Internal; - /* VAR_INPUT (digital) */ - plcbit Execute; - /* VAR_OUTPUT (digital) */ - plcbit Done; - plcbit Busy; - plcbit Error; - plcbit UnlockRequired; -} safeDownloadData_V2_typ; - -typedef struct safeConfigurationOnTarget -{ - /* VAR_INPUT (analog) */ - unsigned short SafeLOGICID; - unsigned short Type; - unsigned long pCommandData; - /* VAR_OUTPUT (analog) */ - unsigned short StatusID; - unsigned long Timestamp; - /* VAR (analog) */ - unsigned short i_state; - unsigned short i_result; - unsigned long i_tmp; - unsigned long i_handle; - /* VAR_INPUT (digital) */ - plcbit Execute; - /* VAR_OUTPUT (digital) */ - plcbit Done; - plcbit Busy; - plcbit Error; -} safeConfigurationOnTarget_typ; - -typedef struct safeConfigurationOnTarget_V2 -{ - /* VAR_INPUT (analog) */ - unsigned short SafeLOGICID; - unsigned short Type; - unsigned long pCommandData; - /* VAR_OUTPUT (analog) */ - unsigned short StatusID; - unsigned long Timestamp; - /* VAR (analog) */ - struct AsSafetyInternalType Internal; - /* VAR_INPUT (digital) */ - plcbit Execute; - /* VAR_OUTPUT (digital) */ - plcbit Done; - plcbit Busy; - plcbit Error; -} safeConfigurationOnTarget_V2_typ; - -typedef struct safeDownloadFile -{ - /* VAR_INPUT (analog) */ - unsigned short SafeLOGICID; - unsigned long pCommandData; - /* VAR_OUTPUT (analog) */ - unsigned short StatusID; - unsigned long Timestamp; - /* VAR (analog) */ - struct AsSafetyInternalType Internal; - /* VAR_INPUT (digital) */ - plcbit Execute; - /* VAR_OUTPUT (digital) */ - plcbit Done; - plcbit Busy; - plcbit Error; - plcbit UnlockRequired; -} safeDownloadFile_typ; - -typedef struct safeCheckTable -{ - /* VAR_INPUT (analog) */ - unsigned char InstNr; - unsigned long pUser; - unsigned long Timestamp; - unsigned char TableType; - unsigned long EntryCnt; - unsigned long pTableHeader; - unsigned long pTableData; - unsigned long pTableHeaderOut; - unsigned long pTableDataOut; - unsigned long pFileDataOut; - unsigned char AckData; - /* VAR_OUTPUT (analog) */ - unsigned short StatusID; - unsigned long CheckErrorCode; - unsigned long CheckErrorLine; - unsigned long CheckErrorColumn; - unsigned long pCrcOut; - unsigned long CrcCntOut; - /* VAR (analog) */ - unsigned short i_step; - unsigned long i_tmp; - /* VAR_INPUT (digital) */ - plcbit Execute; - /* VAR_OUTPUT (digital) */ - plcbit Done; - plcbit Busy; - plcbit Error; - /* VAR (digital) */ - plcbit i_clean; -} safeCheckTable_typ; - -typedef struct safeFileInfo -{ - /* VAR_INPUT (analog) */ - unsigned short SafeLOGICID; - unsigned short Type; - unsigned long pCommandData; - /* VAR_OUTPUT (analog) */ - unsigned short StatusID; - /* VAR (analog) */ - struct AsSafetyInternalType Internal; - /* VAR_INPUT (digital) */ - plcbit Execute; - /* VAR_OUTPUT (digital) */ - plcbit Done; - plcbit Busy; - plcbit Error; -} safeFileInfo_typ; - -typedef struct safeGetDataLength -{ - /* VAR_INPUT (analog) */ - unsigned short Type; - unsigned long pCommandData; - /* VAR_OUTPUT (analog) */ - unsigned short StatusID; - unsigned long Length; - /* VAR (analog) */ - struct AsSafetyInternalType Internal; - /* VAR_INPUT (digital) */ - plcbit Execute; - /* VAR_OUTPUT (digital) */ - plcbit Done; - plcbit Busy; - plcbit Error; -} safeGetDataLength_typ; - -typedef struct safeCreateData -{ - /* VAR_INPUT (analog) */ - unsigned short SafeLOGICID; - unsigned short Type; - unsigned long pCommandData; - unsigned long FileDataOutLen; - unsigned long pFileDataOut; - /* VAR_OUTPUT (analog) */ - unsigned short StatusID; - unsigned long Timestamp; - /* VAR (analog) */ - struct AsSafetyInternalType Internal; - /* VAR_INPUT (digital) */ - plcbit Execute; - /* VAR_OUTPUT (digital) */ - plcbit Done; - plcbit Busy; - plcbit Error; - plcbit UnlockRequired; -} safeCreateData_typ; - -typedef struct safeLogicInfo -{ - /* VAR_INPUT (analog) */ - unsigned short SafeLOGICID; - unsigned short Type; - unsigned long pCommandData; - /* VAR_OUTPUT (analog) */ - unsigned short StatusID; - /* VAR (analog) */ - struct AsSafetyInternalType Internal; - /* VAR_INPUT (digital) */ - plcbit Execute; - /* VAR_OUTPUT (digital) */ - plcbit Done; - plcbit Busy; - plcbit Error; -} safeLogicInfo_typ; - - - -/* Prototyping of functions and function blocks */ -_BUR_PUBLIC void safeRemoteControl(struct safeRemoteControl* inst); -_BUR_PUBLIC void safeRemoteControl_V2(struct safeRemoteControl_V2* inst); -_BUR_PUBLIC void safeDownloadApplication(struct safeDownloadApplication* inst); -_BUR_PUBLIC void safeDownloadApplication_V2(struct safeDownloadApplication_V2* inst); -_BUR_PUBLIC void safeDownloadData(struct safeDownloadData* inst); -_BUR_PUBLIC void safeDownloadData_V2(struct safeDownloadData_V2* inst); -_BUR_PUBLIC void safeConfigurationOnTarget(struct safeConfigurationOnTarget* inst); -_BUR_PUBLIC void safeConfigurationOnTarget_V2(struct safeConfigurationOnTarget_V2* inst); -_BUR_PUBLIC void safeDownloadFile(struct safeDownloadFile* inst); -_BUR_PUBLIC void safeCheckTable(struct safeCheckTable* inst); -_BUR_PUBLIC void safeFileInfo(struct safeFileInfo* inst); -_BUR_PUBLIC void safeGetDataLength(struct safeGetDataLength* inst); -_BUR_PUBLIC void safeCreateData(struct safeCreateData* inst); -_BUR_PUBLIC void safeLogicInfo(struct safeLogicInfo* inst); -_BUR_PUBLIC unsigned short safeLibraryVersion(void); -_BUR_PUBLIC unsigned long safeGetTableLength(unsigned char TableType, unsigned long EntryCnt, unsigned long pTableHeader); - - -#ifdef __cplusplus -}; -#endif -#endif /* _ASSAFETY_ */ - diff --git a/example/AsProject/Logical/Libraries/_AS/AsSafety/binary.lby b/example/AsProject/Logical/Libraries/_AS/AsSafety/binary.lby deleted file mode 100644 index 2672bbb..0000000 --- a/example/AsProject/Logical/Libraries/_AS/AsSafety/binary.lby +++ /dev/null @@ -1,16 +0,0 @@ - - - - - AsSafety.fun - AsSafety.typ - AsSafety.var - - - - - - - - - \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/_AS/AsSem/SG4/AsSem.h b/example/AsProject/Logical/Libraries/_AS/AsSem/SG4/AsSem.h index c140c24..7890f05 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsSem/SG4/AsSem.h +++ b/example/AsProject/Logical/Libraries/_AS/AsSem/SG4/AsSem.h @@ -15,27 +15,6 @@ extern "C" #ifndef _BUR_PUBLIC #define _BUR_PUBLIC #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define semERR_ALREADY_FREE 33324U - #define semERR_NOT_FREE 33323U - #define semERR_NOT_EXIST 33322U - #define semERR_DELETE 33321U - #define semERR_CREATE 33320U -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST unsigned short semERR_ALREADY_FREE; - _GLOBAL_CONST unsigned short semERR_NOT_FREE; - _GLOBAL_CONST unsigned short semERR_NOT_EXIST; - _GLOBAL_CONST unsigned short semERR_DELETE; - _GLOBAL_CONST unsigned short semERR_CREATE; -#endif - - - - /* Datatypes and datatypes of function blocks */ typedef struct SemCreate { @@ -89,6 +68,24 @@ _BUR_PUBLIC unsigned short SemAcquire(unsigned long ident); _BUR_PUBLIC unsigned short SemRelease(unsigned long ident); +/* Constants */ +#ifdef _REPLACE_CONST + #define semERR_ALREADY_FREE 33324U + #define semERR_NOT_FREE 33323U + #define semERR_NOT_EXIST 33322U + #define semERR_DELETE 33321U + #define semERR_CREATE 33320U +#else + _GLOBAL_CONST unsigned short semERR_ALREADY_FREE; + _GLOBAL_CONST unsigned short semERR_NOT_FREE; + _GLOBAL_CONST unsigned short semERR_NOT_EXIST; + _GLOBAL_CONST unsigned short semERR_DELETE; + _GLOBAL_CONST unsigned short semERR_CREATE; +#endif + + + + #ifdef __cplusplus }; #endif diff --git a/example/AsProject/Logical/Libraries/_AS/AsSem/binary.lby b/example/AsProject/Logical/Libraries/_AS/AsSem/binary.lby index 44afefb..28f912c 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsSem/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/AsSem/binary.lby @@ -1,12 +1,12 @@ - - - - - AsSem.fun - AsSem.typ - AsSem.var - - - - - \ No newline at end of file + + + + + AsSem.fun + AsSem.typ + AsSem.var + + + + + diff --git a/example/AsProject/Logical/Libraries/_AS/AsTCP/AsTCP.fun b/example/AsProject/Logical/Libraries/_AS/AsTCP/AsTCP.fun index c636037..f21b7ab 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsTCP/AsTCP.fun +++ b/example/AsProject/Logical/Libraries/_AS/AsTCP/AsTCP.fun @@ -40,6 +40,27 @@ END_FUNCTION_BLOCK END_VAR END_FUNCTION_BLOCK +{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK TcpOpenMcs (*opens a TCP socket using MCS; asynchronous execution*) + VAR_INPUT + enable : BOOL; (*enables execution*) + pIfAddr : UDINT; (*pointer to the interface address*) + port : UINT; (*port number of the socket*) + mcsStore : AsTcpMcsType; (*Managed Certificate Store Struct*) + options : UDINT; (*options that can be set during opening*) + END_VAR + + VAR_OUTPUT + status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*) + ident : UDINT; (*identifier for use with TcpServer, TcpClient, TcpSend, TcpRecv, TcpClose and TcpIoctl*) + END_VAR + + VAR + i_state : UINT; (*internal variable*) + i_result : UINT; (*internal variable*) + i_tmp : UDINT; (*internal variable*) + END_VAR +END_FUNCTION_BLOCK + {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK TcpServer (*starts a TCP server; asynchronous execution*) VAR_INPUT enable : BOOL; (*enables execution*) diff --git a/example/AsProject/Logical/Libraries/_AS/AsTCP/AsTCP.typ b/example/AsProject/Logical/Libraries/_AS/AsTCP/AsTCP.typ index 4d63819..c0e8a6e 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsTCP/AsTCP.typ +++ b/example/AsProject/Logical/Libraries/_AS/AsTCP/AsTCP.typ @@ -9,4 +9,15 @@ TYPE pPort : UDINT; (*pointer where to store the portnumber*) pIpAddr : UDINT; (*pointer where to store the socket ip address*) END_STRUCT; + + AsTcpCipherVersionEnum : + ( + asTCP_TLS_1_3 := 2 (*TLS 1.3*) (**) (*#PAR*) + ); + + AsTcpMcsType : STRUCT + name : STRING[255]; (*Managed Certificate Store name*) + tlsVersion : AsTcpCipherVersionEnum; (*TLS version*) + trustListValidation : BOOL; (*Enables/disables trust list validation*) + END_STRUCT; END_TYPE diff --git a/example/AsProject/Logical/Libraries/_AS/AsTCP/AsTCP.var b/example/AsProject/Logical/Libraries/_AS/AsTCP/AsTCP.var index 71b3f70..2c712ac 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsTCP/AsTCP.var +++ b/example/AsProject/Logical/Libraries/_AS/AsTCP/AsTCP.var @@ -19,7 +19,8 @@ VAR CONSTANT tcpERR_SOCKET_BIND : UINT := 32651; (*bind socket failed*) tcpERR_SOCKET_LISTEN : UINT := 32652; (*listen socket failed*) tcpERR_SOCKET_ACCEPT : UINT := 32653; (*accept socket failed*) - + + tcpERR_INVALID_MCS_CONFIG : UINT := 32696; (*invalid MCS configuration given*) tcpERR_INVALID_SSL_CONFIG : UINT := 32697; (*invalid SSL configuration given*) tcpERR_SSL_HANDSHAKE_FAILED : UINT := 32698; (*SSL handshake failed*) diff --git a/example/AsProject/Logical/Libraries/_AS/AsTCP/SG4/AsTCP.h b/example/AsProject/Logical/Libraries/_AS/AsTCP/SG4/AsTCP.h index 0025004..d4edc61 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsTCP/SG4/AsTCP.h +++ b/example/AsProject/Logical/Libraries/_AS/AsTCP/SG4/AsTCP.h @@ -15,120 +15,11 @@ extern "C" #ifndef _BUR_PUBLIC #define _BUR_PUBLIC #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define tcpINVALID_IDENT 0U - #define tcpSHUT_WR 2U - #define tcpSHUT_RD 1U - #define tcpOPT_REUSEADDR 1U - #define tcpMSG_DONTROUTE 4U - #define tcpMSG_PEEK 2U - #define tcpMSG_OOB 1U - #define tcpID_MAX_GET 3002U - #define tcpID_LIST_GET 3001U - #define tcpTCP_KEEPINTVL_GET 2008U - #define tcpTCP_KEEPINTVL_SET 2007U - #define tcpTCP_KEEPIDLE_GET 2006U - #define tcpTCP_KEEPIDLE_SET 2005U - #define tcpTCP_KEEPCNT_GET 2004U - #define tcpTCP_KEEPCNT_SET 2003U - #define tcpTCP_NODELAY_GET 2002U - #define tcpTCP_NODELAY_SET 2001U - #define tcpSO_NOWAITING_GET 1013U - #define tcpSO_NOWAITING_SET 1012U - #define tcpSO_ADDRESS_GET 1011U - #define tcpSO_OOBINLINE_GET 1010U - #define tcpSO_OOBINLINE_SET 1009U - #define tcpSO_RCVBUF_GET 1008U - #define tcpSO_RCVBUF_SET 1007U - #define tcpSO_SNDBUF_GET 1006U - #define tcpSO_SNDBUF_SET 1005U - #define tcpSO_KEEPALIVE_GET 1004U - #define tcpSO_KEEPALIVE_SET 1003U - #define tcpSO_LINGER_GET 1002U - #define tcpSO_LINGER_SET 1001U - #define tcpERR_SYSTEM 32699U - #define tcpERR_SSL_HANDSHAKE_FAILED 32698U - #define tcpERR_INVALID_SSL_CONFIG 32697U - #define tcpERR_SOCKET_ACCEPT 32653U - #define tcpERR_SOCKET_LISTEN 32652U - #define tcpERR_SOCKET_BIND 32651U - #define tcpERR_SOCKET_CREATE 32650U - #define tcpERR_NOCLIENT 32613U - #define tcpERR_INTERFACE 32612U - #define tcpERR_NO_OOBDATA 32611U - #define tcpERR_ALREADY_CONNECTED 32610U - #define tcpERR_NOT_CONNECTED 32609U - #define tcpERR_INVALID 32608U - #define tcpERR_WOULDBLOCK 32607U - #define tcpERR_SENTLEN 32606U - #define tcpERR_NO_DATA 32605U - #define tcpERR_INVALID_IOCTL 32604U - #define tcpERR_PARAMETER 32603U - #define tcpERR_ALREADY_EXIST 32602U - #define tcpERR_NOMORE_IDENTS 32601U - #define tcpERR_INVALID_IDENT 32600U -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST unsigned long tcpINVALID_IDENT; - _GLOBAL_CONST unsigned long tcpSHUT_WR; - _GLOBAL_CONST unsigned long tcpSHUT_RD; - _GLOBAL_CONST unsigned long tcpOPT_REUSEADDR; - _GLOBAL_CONST unsigned long tcpMSG_DONTROUTE; - _GLOBAL_CONST unsigned long tcpMSG_PEEK; - _GLOBAL_CONST unsigned long tcpMSG_OOB; - _GLOBAL_CONST unsigned long tcpID_MAX_GET; - _GLOBAL_CONST unsigned long tcpID_LIST_GET; - _GLOBAL_CONST unsigned long tcpTCP_KEEPINTVL_GET; - _GLOBAL_CONST unsigned long tcpTCP_KEEPINTVL_SET; - _GLOBAL_CONST unsigned long tcpTCP_KEEPIDLE_GET; - _GLOBAL_CONST unsigned long tcpTCP_KEEPIDLE_SET; - _GLOBAL_CONST unsigned long tcpTCP_KEEPCNT_GET; - _GLOBAL_CONST unsigned long tcpTCP_KEEPCNT_SET; - _GLOBAL_CONST unsigned long tcpTCP_NODELAY_GET; - _GLOBAL_CONST unsigned long tcpTCP_NODELAY_SET; - _GLOBAL_CONST unsigned long tcpSO_NOWAITING_GET; - _GLOBAL_CONST unsigned long tcpSO_NOWAITING_SET; - _GLOBAL_CONST unsigned long tcpSO_ADDRESS_GET; - _GLOBAL_CONST unsigned long tcpSO_OOBINLINE_GET; - _GLOBAL_CONST unsigned long tcpSO_OOBINLINE_SET; - _GLOBAL_CONST unsigned long tcpSO_RCVBUF_GET; - _GLOBAL_CONST unsigned long tcpSO_RCVBUF_SET; - _GLOBAL_CONST unsigned long tcpSO_SNDBUF_GET; - _GLOBAL_CONST unsigned long tcpSO_SNDBUF_SET; - _GLOBAL_CONST unsigned long tcpSO_KEEPALIVE_GET; - _GLOBAL_CONST unsigned long tcpSO_KEEPALIVE_SET; - _GLOBAL_CONST unsigned long tcpSO_LINGER_GET; - _GLOBAL_CONST unsigned long tcpSO_LINGER_SET; - _GLOBAL_CONST unsigned short tcpERR_SYSTEM; - _GLOBAL_CONST unsigned short tcpERR_SSL_HANDSHAKE_FAILED; - _GLOBAL_CONST unsigned short tcpERR_INVALID_SSL_CONFIG; - _GLOBAL_CONST unsigned short tcpERR_SOCKET_ACCEPT; - _GLOBAL_CONST unsigned short tcpERR_SOCKET_LISTEN; - _GLOBAL_CONST unsigned short tcpERR_SOCKET_BIND; - _GLOBAL_CONST unsigned short tcpERR_SOCKET_CREATE; - _GLOBAL_CONST unsigned short tcpERR_NOCLIENT; - _GLOBAL_CONST unsigned short tcpERR_INTERFACE; - _GLOBAL_CONST unsigned short tcpERR_NO_OOBDATA; - _GLOBAL_CONST unsigned short tcpERR_ALREADY_CONNECTED; - _GLOBAL_CONST unsigned short tcpERR_NOT_CONNECTED; - _GLOBAL_CONST unsigned short tcpERR_INVALID; - _GLOBAL_CONST unsigned short tcpERR_WOULDBLOCK; - _GLOBAL_CONST unsigned short tcpERR_SENTLEN; - _GLOBAL_CONST unsigned short tcpERR_NO_DATA; - _GLOBAL_CONST unsigned short tcpERR_INVALID_IOCTL; - _GLOBAL_CONST unsigned short tcpERR_PARAMETER; - _GLOBAL_CONST unsigned short tcpERR_ALREADY_EXIST; - _GLOBAL_CONST unsigned short tcpERR_NOMORE_IDENTS; - _GLOBAL_CONST unsigned short tcpERR_INVALID_IDENT; -#endif - - - - /* Datatypes and datatypes of function blocks */ +typedef enum AsTcpCipherVersionEnum +{ asTCP_TLS_1_3 = 2 +} AsTcpCipherVersionEnum; + typedef struct tcpLINGER_typ { unsigned long lOnOff; unsigned long lLinger; @@ -139,6 +30,12 @@ typedef struct tcpSO_ADDRESS_typ unsigned long pIpAddr; } tcpSO_ADDRESS_typ; +typedef struct AsTcpMcsType +{ plcstring name[256]; + enum AsTcpCipherVersionEnum tlsVersion; + plcbit trustListValidation; +} AsTcpMcsType; + typedef struct TcpOpen { /* VAR_INPUT (analog) */ @@ -174,6 +71,24 @@ typedef struct TcpOpenSsl plcbit enable; } TcpOpenSsl_typ; +typedef struct TcpOpenMcs +{ + /* VAR_INPUT (analog) */ + unsigned long pIfAddr; + unsigned short port; + struct AsTcpMcsType mcsStore; + unsigned long options; + /* VAR_OUTPUT (analog) */ + unsigned short status; + unsigned long ident; + /* VAR (analog) */ + unsigned short i_state; + unsigned short i_result; + unsigned long i_tmp; + /* VAR_INPUT (digital) */ + plcbit enable; +} TcpOpenMcs_typ; + typedef struct TcpServer { /* VAR_INPUT (analog) */ @@ -282,6 +197,7 @@ typedef struct TcpIoctl /* Prototyping of functions and function blocks */ _BUR_PUBLIC void TcpOpen(struct TcpOpen* inst); _BUR_PUBLIC void TcpOpenSsl(struct TcpOpenSsl* inst); +_BUR_PUBLIC void TcpOpenMcs(struct TcpOpenMcs* inst); _BUR_PUBLIC void TcpServer(struct TcpServer* inst); _BUR_PUBLIC void TcpClient(struct TcpClient* inst); _BUR_PUBLIC void TcpClose(struct TcpClose* inst); @@ -290,6 +206,118 @@ _BUR_PUBLIC void TcpRecv(struct TcpRecv* inst); _BUR_PUBLIC void TcpIoctl(struct TcpIoctl* inst); +/* Constants */ +#ifdef _REPLACE_CONST + #define tcpINVALID_IDENT 0U + #define tcpSHUT_WR 2U + #define tcpSHUT_RD 1U + #define tcpOPT_REUSEADDR 1U + #define tcpMSG_DONTROUTE 4U + #define tcpMSG_PEEK 2U + #define tcpMSG_OOB 1U + #define tcpID_MAX_GET 3002U + #define tcpID_LIST_GET 3001U + #define tcpTCP_KEEPINTVL_GET 2008U + #define tcpTCP_KEEPINTVL_SET 2007U + #define tcpTCP_KEEPIDLE_GET 2006U + #define tcpTCP_KEEPIDLE_SET 2005U + #define tcpTCP_KEEPCNT_GET 2004U + #define tcpTCP_KEEPCNT_SET 2003U + #define tcpTCP_NODELAY_GET 2002U + #define tcpTCP_NODELAY_SET 2001U + #define tcpSO_NOWAITING_GET 1013U + #define tcpSO_NOWAITING_SET 1012U + #define tcpSO_ADDRESS_GET 1011U + #define tcpSO_OOBINLINE_GET 1010U + #define tcpSO_OOBINLINE_SET 1009U + #define tcpSO_RCVBUF_GET 1008U + #define tcpSO_RCVBUF_SET 1007U + #define tcpSO_SNDBUF_GET 1006U + #define tcpSO_SNDBUF_SET 1005U + #define tcpSO_KEEPALIVE_GET 1004U + #define tcpSO_KEEPALIVE_SET 1003U + #define tcpSO_LINGER_GET 1002U + #define tcpSO_LINGER_SET 1001U + #define tcpERR_SYSTEM 32699U + #define tcpERR_SSL_HANDSHAKE_FAILED 32698U + #define tcpERR_INVALID_SSL_CONFIG 32697U + #define tcpERR_INVALID_MCS_CONFIG 32696U + #define tcpERR_SOCKET_ACCEPT 32653U + #define tcpERR_SOCKET_LISTEN 32652U + #define tcpERR_SOCKET_BIND 32651U + #define tcpERR_SOCKET_CREATE 32650U + #define tcpERR_NOCLIENT 32613U + #define tcpERR_INTERFACE 32612U + #define tcpERR_NO_OOBDATA 32611U + #define tcpERR_ALREADY_CONNECTED 32610U + #define tcpERR_NOT_CONNECTED 32609U + #define tcpERR_INVALID 32608U + #define tcpERR_WOULDBLOCK 32607U + #define tcpERR_SENTLEN 32606U + #define tcpERR_NO_DATA 32605U + #define tcpERR_INVALID_IOCTL 32604U + #define tcpERR_PARAMETER 32603U + #define tcpERR_ALREADY_EXIST 32602U + #define tcpERR_NOMORE_IDENTS 32601U + #define tcpERR_INVALID_IDENT 32600U +#else + _GLOBAL_CONST unsigned long tcpINVALID_IDENT; + _GLOBAL_CONST unsigned long tcpSHUT_WR; + _GLOBAL_CONST unsigned long tcpSHUT_RD; + _GLOBAL_CONST unsigned long tcpOPT_REUSEADDR; + _GLOBAL_CONST unsigned long tcpMSG_DONTROUTE; + _GLOBAL_CONST unsigned long tcpMSG_PEEK; + _GLOBAL_CONST unsigned long tcpMSG_OOB; + _GLOBAL_CONST unsigned long tcpID_MAX_GET; + _GLOBAL_CONST unsigned long tcpID_LIST_GET; + _GLOBAL_CONST unsigned long tcpTCP_KEEPINTVL_GET; + _GLOBAL_CONST unsigned long tcpTCP_KEEPINTVL_SET; + _GLOBAL_CONST unsigned long tcpTCP_KEEPIDLE_GET; + _GLOBAL_CONST unsigned long tcpTCP_KEEPIDLE_SET; + _GLOBAL_CONST unsigned long tcpTCP_KEEPCNT_GET; + _GLOBAL_CONST unsigned long tcpTCP_KEEPCNT_SET; + _GLOBAL_CONST unsigned long tcpTCP_NODELAY_GET; + _GLOBAL_CONST unsigned long tcpTCP_NODELAY_SET; + _GLOBAL_CONST unsigned long tcpSO_NOWAITING_GET; + _GLOBAL_CONST unsigned long tcpSO_NOWAITING_SET; + _GLOBAL_CONST unsigned long tcpSO_ADDRESS_GET; + _GLOBAL_CONST unsigned long tcpSO_OOBINLINE_GET; + _GLOBAL_CONST unsigned long tcpSO_OOBINLINE_SET; + _GLOBAL_CONST unsigned long tcpSO_RCVBUF_GET; + _GLOBAL_CONST unsigned long tcpSO_RCVBUF_SET; + _GLOBAL_CONST unsigned long tcpSO_SNDBUF_GET; + _GLOBAL_CONST unsigned long tcpSO_SNDBUF_SET; + _GLOBAL_CONST unsigned long tcpSO_KEEPALIVE_GET; + _GLOBAL_CONST unsigned long tcpSO_KEEPALIVE_SET; + _GLOBAL_CONST unsigned long tcpSO_LINGER_GET; + _GLOBAL_CONST unsigned long tcpSO_LINGER_SET; + _GLOBAL_CONST unsigned short tcpERR_SYSTEM; + _GLOBAL_CONST unsigned short tcpERR_SSL_HANDSHAKE_FAILED; + _GLOBAL_CONST unsigned short tcpERR_INVALID_SSL_CONFIG; + _GLOBAL_CONST unsigned short tcpERR_INVALID_MCS_CONFIG; + _GLOBAL_CONST unsigned short tcpERR_SOCKET_ACCEPT; + _GLOBAL_CONST unsigned short tcpERR_SOCKET_LISTEN; + _GLOBAL_CONST unsigned short tcpERR_SOCKET_BIND; + _GLOBAL_CONST unsigned short tcpERR_SOCKET_CREATE; + _GLOBAL_CONST unsigned short tcpERR_NOCLIENT; + _GLOBAL_CONST unsigned short tcpERR_INTERFACE; + _GLOBAL_CONST unsigned short tcpERR_NO_OOBDATA; + _GLOBAL_CONST unsigned short tcpERR_ALREADY_CONNECTED; + _GLOBAL_CONST unsigned short tcpERR_NOT_CONNECTED; + _GLOBAL_CONST unsigned short tcpERR_INVALID; + _GLOBAL_CONST unsigned short tcpERR_WOULDBLOCK; + _GLOBAL_CONST unsigned short tcpERR_SENTLEN; + _GLOBAL_CONST unsigned short tcpERR_NO_DATA; + _GLOBAL_CONST unsigned short tcpERR_INVALID_IOCTL; + _GLOBAL_CONST unsigned short tcpERR_PARAMETER; + _GLOBAL_CONST unsigned short tcpERR_ALREADY_EXIST; + _GLOBAL_CONST unsigned short tcpERR_NOMORE_IDENTS; + _GLOBAL_CONST unsigned short tcpERR_INVALID_IDENT; +#endif + + + + #ifdef __cplusplus }; #endif diff --git a/example/AsProject/Logical/Libraries/_AS/AsTCP/binary.lby b/example/AsProject/Logical/Libraries/_AS/AsTCP/binary.lby index 5ed485a..47b43b1 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsTCP/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/AsTCP/binary.lby @@ -1,12 +1,12 @@ - - - - - AsTCP.fun - AsTCP.typ - AsTCP.var - - - - - \ No newline at end of file + + + + + AsTCP.fun + AsTCP.typ + AsTCP.var + + + + + diff --git a/example/AsProject/Logical/Libraries/_AS/AsUDP/SG4/AsUDP.h b/example/AsProject/Logical/Libraries/_AS/AsUDP/SG4/AsUDP.h index 6c13ec3..e93de11 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsUDP/SG4/AsUDP.h +++ b/example/AsProject/Logical/Libraries/_AS/AsUDP/SG4/AsUDP.h @@ -15,115 +15,6 @@ extern "C" #ifndef _BUR_PUBLIC #define _BUR_PUBLIC #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define udpINVALID_IDENT 0U - #define udpIP_TOS_MINCOST 2U - #define udpIP_TOS_RELIABILITY 4U - #define udpIP_TOS_THROUGHPUT 8U - #define udpIP_TOS_LOWDELAY 16U - #define udpOPT_BROADCAST 4U - #define udpOPT_REUSEPORT 2U - #define udpOPT_REUSEADDR 1U - #define udpMSG_DONTROUTE 2U - #define udpMSG_PEEK 1U - #define udpID_MAX_GET 3002U - #define udpID_LIST_GET 3001U - #define udpIP_TTL_GET 2012U - #define udpIP_TTL_SET 2011U - #define udpIP_TOS_GET 2010U - #define udpIP_TOS_SET 2009U - #define udpIP_MULTICAST_LOOP_GET 2008U - #define udpIP_MULTICAST_LOOP_SET 2007U - #define udpIP_MULTICAST_TTL_GET 2006U - #define udpIP_MULTICAST_TTL_SET 2005U - #define udpIP_MULTICAST_IF_GET 2004U - #define udpIP_MULTICAST_IF_SET 2003U - #define udpIP_DROP_MEMBERSHIP 2002U - #define udpIP_ADD_MEMBERSHIP 2001U - #define udpSO_BINDTODEVICE 1008U - #define udpSO_ADDRESS_GET 1007U - #define udpSO_RCVBUF_GET 1006U - #define udpSO_RCVBUF_SET 1005U - #define udpSO_SNDBUF_GET 1004U - #define udpSO_SNDBUF_SET 1003U - #define udpSO_BROADCAST_GET 1002U - #define udpSO_BROADCAST_SET 1001U - #define udpERR_SYSTEM 32599U - #define udpERR_SOCKET_CONNECT 32552U - #define udpERR_SOCKET_BIND 32551U - #define udpERR_SOCKET_CREATE 32550U - #define udpERR_FIREWALL 32512U - #define udpERR_INTERFACE 32511U - #define udpERR_UNREACHABLE 32510U - #define udpERR_ACCESS 32509U - #define udpERR_CONNREFUSED 32508U - #define udpERR_WOULDBLOCK 32507U - #define udpERR_SENTLEN 32506U - #define udpERR_NO_DATA 32505U - #define udpERR_INVALID_IOCTL 32504U - #define udpERR_PARAMETER 32503U - #define udpERR_ALREADY_EXIST 32502U - #define udpERR_NOMORE_IDENTS 32501U - #define udpERR_INVALID_IDENT 32500U -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST unsigned long udpINVALID_IDENT; - _GLOBAL_CONST unsigned long udpIP_TOS_MINCOST; - _GLOBAL_CONST unsigned long udpIP_TOS_RELIABILITY; - _GLOBAL_CONST unsigned long udpIP_TOS_THROUGHPUT; - _GLOBAL_CONST unsigned long udpIP_TOS_LOWDELAY; - _GLOBAL_CONST unsigned long udpOPT_BROADCAST; - _GLOBAL_CONST unsigned long udpOPT_REUSEPORT; - _GLOBAL_CONST unsigned long udpOPT_REUSEADDR; - _GLOBAL_CONST unsigned long udpMSG_DONTROUTE; - _GLOBAL_CONST unsigned long udpMSG_PEEK; - _GLOBAL_CONST unsigned long udpID_MAX_GET; - _GLOBAL_CONST unsigned long udpID_LIST_GET; - _GLOBAL_CONST unsigned long udpIP_TTL_GET; - _GLOBAL_CONST unsigned long udpIP_TTL_SET; - _GLOBAL_CONST unsigned long udpIP_TOS_GET; - _GLOBAL_CONST unsigned long udpIP_TOS_SET; - _GLOBAL_CONST unsigned long udpIP_MULTICAST_LOOP_GET; - _GLOBAL_CONST unsigned long udpIP_MULTICAST_LOOP_SET; - _GLOBAL_CONST unsigned long udpIP_MULTICAST_TTL_GET; - _GLOBAL_CONST unsigned long udpIP_MULTICAST_TTL_SET; - _GLOBAL_CONST unsigned long udpIP_MULTICAST_IF_GET; - _GLOBAL_CONST unsigned long udpIP_MULTICAST_IF_SET; - _GLOBAL_CONST unsigned long udpIP_DROP_MEMBERSHIP; - _GLOBAL_CONST unsigned long udpIP_ADD_MEMBERSHIP; - _GLOBAL_CONST unsigned long udpSO_BINDTODEVICE; - _GLOBAL_CONST unsigned long udpSO_ADDRESS_GET; - _GLOBAL_CONST unsigned long udpSO_RCVBUF_GET; - _GLOBAL_CONST unsigned long udpSO_RCVBUF_SET; - _GLOBAL_CONST unsigned long udpSO_SNDBUF_GET; - _GLOBAL_CONST unsigned long udpSO_SNDBUF_SET; - _GLOBAL_CONST unsigned long udpSO_BROADCAST_GET; - _GLOBAL_CONST unsigned long udpSO_BROADCAST_SET; - _GLOBAL_CONST unsigned short udpERR_SYSTEM; - _GLOBAL_CONST unsigned short udpERR_SOCKET_CONNECT; - _GLOBAL_CONST unsigned short udpERR_SOCKET_BIND; - _GLOBAL_CONST unsigned short udpERR_SOCKET_CREATE; - _GLOBAL_CONST unsigned short udpERR_FIREWALL; - _GLOBAL_CONST unsigned short udpERR_INTERFACE; - _GLOBAL_CONST unsigned short udpERR_UNREACHABLE; - _GLOBAL_CONST unsigned short udpERR_ACCESS; - _GLOBAL_CONST unsigned short udpERR_CONNREFUSED; - _GLOBAL_CONST unsigned short udpERR_WOULDBLOCK; - _GLOBAL_CONST unsigned short udpERR_SENTLEN; - _GLOBAL_CONST unsigned short udpERR_NO_DATA; - _GLOBAL_CONST unsigned short udpERR_INVALID_IOCTL; - _GLOBAL_CONST unsigned short udpERR_PARAMETER; - _GLOBAL_CONST unsigned short udpERR_ALREADY_EXIST; - _GLOBAL_CONST unsigned short udpERR_NOMORE_IDENTS; - _GLOBAL_CONST unsigned short udpERR_INVALID_IDENT; -#endif - - - - /* Datatypes and datatypes of function blocks */ typedef struct udpIP_MREQ_typ { unsigned long pMcastAddr; @@ -266,6 +157,112 @@ _BUR_PUBLIC void UdpRecv(struct UdpRecv* inst); _BUR_PUBLIC void UdpIoctl(struct UdpIoctl* inst); +/* Constants */ +#ifdef _REPLACE_CONST + #define udpINVALID_IDENT 0U + #define udpIP_TOS_MINCOST 2U + #define udpIP_TOS_RELIABILITY 4U + #define udpIP_TOS_THROUGHPUT 8U + #define udpIP_TOS_LOWDELAY 16U + #define udpOPT_BROADCAST 4U + #define udpOPT_REUSEPORT 2U + #define udpOPT_REUSEADDR 1U + #define udpMSG_DONTROUTE 2U + #define udpMSG_PEEK 1U + #define udpID_MAX_GET 3002U + #define udpID_LIST_GET 3001U + #define udpIP_TTL_GET 2012U + #define udpIP_TTL_SET 2011U + #define udpIP_TOS_GET 2010U + #define udpIP_TOS_SET 2009U + #define udpIP_MULTICAST_LOOP_GET 2008U + #define udpIP_MULTICAST_LOOP_SET 2007U + #define udpIP_MULTICAST_TTL_GET 2006U + #define udpIP_MULTICAST_TTL_SET 2005U + #define udpIP_MULTICAST_IF_GET 2004U + #define udpIP_MULTICAST_IF_SET 2003U + #define udpIP_DROP_MEMBERSHIP 2002U + #define udpIP_ADD_MEMBERSHIP 2001U + #define udpSO_BINDTODEVICE 1008U + #define udpSO_ADDRESS_GET 1007U + #define udpSO_RCVBUF_GET 1006U + #define udpSO_RCVBUF_SET 1005U + #define udpSO_SNDBUF_GET 1004U + #define udpSO_SNDBUF_SET 1003U + #define udpSO_BROADCAST_GET 1002U + #define udpSO_BROADCAST_SET 1001U + #define udpERR_SYSTEM 32599U + #define udpERR_SOCKET_CONNECT 32552U + #define udpERR_SOCKET_BIND 32551U + #define udpERR_SOCKET_CREATE 32550U + #define udpERR_FIREWALL 32512U + #define udpERR_INTERFACE 32511U + #define udpERR_UNREACHABLE 32510U + #define udpERR_ACCESS 32509U + #define udpERR_CONNREFUSED 32508U + #define udpERR_WOULDBLOCK 32507U + #define udpERR_SENTLEN 32506U + #define udpERR_NO_DATA 32505U + #define udpERR_INVALID_IOCTL 32504U + #define udpERR_PARAMETER 32503U + #define udpERR_ALREADY_EXIST 32502U + #define udpERR_NOMORE_IDENTS 32501U + #define udpERR_INVALID_IDENT 32500U +#else + _GLOBAL_CONST unsigned long udpINVALID_IDENT; + _GLOBAL_CONST unsigned long udpIP_TOS_MINCOST; + _GLOBAL_CONST unsigned long udpIP_TOS_RELIABILITY; + _GLOBAL_CONST unsigned long udpIP_TOS_THROUGHPUT; + _GLOBAL_CONST unsigned long udpIP_TOS_LOWDELAY; + _GLOBAL_CONST unsigned long udpOPT_BROADCAST; + _GLOBAL_CONST unsigned long udpOPT_REUSEPORT; + _GLOBAL_CONST unsigned long udpOPT_REUSEADDR; + _GLOBAL_CONST unsigned long udpMSG_DONTROUTE; + _GLOBAL_CONST unsigned long udpMSG_PEEK; + _GLOBAL_CONST unsigned long udpID_MAX_GET; + _GLOBAL_CONST unsigned long udpID_LIST_GET; + _GLOBAL_CONST unsigned long udpIP_TTL_GET; + _GLOBAL_CONST unsigned long udpIP_TTL_SET; + _GLOBAL_CONST unsigned long udpIP_TOS_GET; + _GLOBAL_CONST unsigned long udpIP_TOS_SET; + _GLOBAL_CONST unsigned long udpIP_MULTICAST_LOOP_GET; + _GLOBAL_CONST unsigned long udpIP_MULTICAST_LOOP_SET; + _GLOBAL_CONST unsigned long udpIP_MULTICAST_TTL_GET; + _GLOBAL_CONST unsigned long udpIP_MULTICAST_TTL_SET; + _GLOBAL_CONST unsigned long udpIP_MULTICAST_IF_GET; + _GLOBAL_CONST unsigned long udpIP_MULTICAST_IF_SET; + _GLOBAL_CONST unsigned long udpIP_DROP_MEMBERSHIP; + _GLOBAL_CONST unsigned long udpIP_ADD_MEMBERSHIP; + _GLOBAL_CONST unsigned long udpSO_BINDTODEVICE; + _GLOBAL_CONST unsigned long udpSO_ADDRESS_GET; + _GLOBAL_CONST unsigned long udpSO_RCVBUF_GET; + _GLOBAL_CONST unsigned long udpSO_RCVBUF_SET; + _GLOBAL_CONST unsigned long udpSO_SNDBUF_GET; + _GLOBAL_CONST unsigned long udpSO_SNDBUF_SET; + _GLOBAL_CONST unsigned long udpSO_BROADCAST_GET; + _GLOBAL_CONST unsigned long udpSO_BROADCAST_SET; + _GLOBAL_CONST unsigned short udpERR_SYSTEM; + _GLOBAL_CONST unsigned short udpERR_SOCKET_CONNECT; + _GLOBAL_CONST unsigned short udpERR_SOCKET_BIND; + _GLOBAL_CONST unsigned short udpERR_SOCKET_CREATE; + _GLOBAL_CONST unsigned short udpERR_FIREWALL; + _GLOBAL_CONST unsigned short udpERR_INTERFACE; + _GLOBAL_CONST unsigned short udpERR_UNREACHABLE; + _GLOBAL_CONST unsigned short udpERR_ACCESS; + _GLOBAL_CONST unsigned short udpERR_CONNREFUSED; + _GLOBAL_CONST unsigned short udpERR_WOULDBLOCK; + _GLOBAL_CONST unsigned short udpERR_SENTLEN; + _GLOBAL_CONST unsigned short udpERR_NO_DATA; + _GLOBAL_CONST unsigned short udpERR_INVALID_IOCTL; + _GLOBAL_CONST unsigned short udpERR_PARAMETER; + _GLOBAL_CONST unsigned short udpERR_ALREADY_EXIST; + _GLOBAL_CONST unsigned short udpERR_NOMORE_IDENTS; + _GLOBAL_CONST unsigned short udpERR_INVALID_IDENT; +#endif + + + + #ifdef __cplusplus }; #endif diff --git a/example/AsProject/Logical/Libraries/_AS/AsUDP/binary.lby b/example/AsProject/Logical/Libraries/_AS/AsUDP/binary.lby index 34535d6..4cd9413 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsUDP/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/AsUDP/binary.lby @@ -1,12 +1,12 @@ - - - - - AsUDP.fun - AsUDP.typ - AsUDP.var - - - - - \ No newline at end of file + + + + + AsUDP.fun + AsUDP.typ + AsUDP.var + + + + + diff --git a/example/AsProject/Logical/Libraries/_AS/AsUSB/AsUSB.typ b/example/AsProject/Logical/Libraries/_AS/AsUSB/AsUSB.typ index 06ea767..1413570 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsUSB/AsUSB.typ +++ b/example/AsProject/Logical/Libraries/_AS/AsUSB/AsUSB.typ @@ -1,13 +1,13 @@ TYPE usbNode_typ : STRUCT (* statistics *) - interfaceClass : UINT; (* Interface Class des USB Gertes *) - interfaceSubClass : UINT; (* Interface SubClass des USB Gertes *) - interfaceProtocol : UINT; (* Interface Protocol des USB Gertes *) - vendorId : UINT; (* Device Vendor ID *) - productId : UINT; (* Device Product ID *) + interfaceClass : UINT; (* interface class of USB device *) + interfaceSubClass : UINT; (* interface subclass of USB device *) + interfaceProtocol : UINT; (* interface protocol of USB device *) + vendorId : UINT; (* device Vendor ID *) + productId : UINT; (* device Product ID *) bcdDevice : UINT; (* USB device release version binary coded decimal *) - ifName : STRING[127]; (* USB IF Name *) + ifName : STRING[127]; (* USB interface name *) END_STRUCT; END_TYPE diff --git a/example/AsProject/Logical/Libraries/_AS/AsUSB/AsUSB.var b/example/AsProject/Logical/Libraries/_AS/AsUSB/AsUSB.var index 4a06519..cd9a918 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsUSB/AsUSB.var +++ b/example/AsProject/Logical/Libraries/_AS/AsUSB/AsUSB.var @@ -14,13 +14,13 @@ VAR CONSTANT asusb_DEVICENAMELENGTH : USINT := 128; - asusb_USB_RT_DEVICE : USINT := 0; (* Requesttype for device *) - asusb_USB_RT_INTERFACE : USINT := 1; (* Requesttype for interface *) - asusb_USB_RT_ENDPOINT : USINT := 2; (* Requesttype for endpoint *) + asusb_USB_RT_DEVICE : USINT := 0; (* Request type for device *) + asusb_USB_RT_INTERFACE : USINT := 1; (* Request type for interface *) + asusb_USB_RT_ENDPOINT : USINT := 2; (* Request type for endpoint *) - asusb_USB_RT_STANDARD : USINT := 0; (* Requesttype standard *) - asusb_USB_RT_CLASS : USINT := 32; (* Requesttype class-specific *) - asusb_USB_RT_VENDOR : USINT := 64; (* Requesttype vendor-specific *) + asusb_USB_RT_STANDARD : USINT := 0; (* Request type standard *) + asusb_USB_RT_CLASS : USINT := 32; (* Request type class-specific *) + asusb_USB_RT_VENDOR : USINT := 64; (* Request type vendor-specific *) asusb_USB_DESCR_DEVICE : USINT := 1; (* Specifies the DEVICE descriptor *) asusb_USB_DESCR_CONFIG : USINT := 2; (* Specifies the CONFIGURATION descriptor *) @@ -30,8 +30,8 @@ VAR CONSTANT asusb_USB_UNICODE_ENGLISH : UINT := 1033; (* languageId unicode english *) - asusbERR_USB_NOTFOUND : UINT := 32900; (* Es wurde kein USB Gert gefunden keine USB Gerte angesteckt *) - asusbERR_BUFSIZE : UINT := 32901; (* Die bergebene Speicherlnge ist zu klein Greren Speicher reservieren *) - asusbERR_NULLPOINTER : UINT := 32902; (* pBuffer ist nicht gesetzt pBuffer setzen *) + asusbERR_USB_NOTFOUND : UINT := 32900; (* No USB device found *) + asusbERR_BUFSIZE : UINT := 32901; (* Buffer is too small to fit requested data *) + asusbERR_NULLPOINTER : UINT := 32902; (* Null pointer value is passed as input parameter *) END_VAR diff --git a/example/AsProject/Logical/Libraries/_AS/AsUSB/SG4/AsUSB.h b/example/AsProject/Logical/Libraries/_AS/AsUSB/SG4/AsUSB.h index 73a7b0a..0124ade 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsUSB/SG4/AsUSB.h +++ b/example/AsProject/Logical/Libraries/_AS/AsUSB/SG4/AsUSB.h @@ -15,69 +15,6 @@ extern "C" #ifndef _BUR_PUBLIC #define _BUR_PUBLIC #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define asusbERR_NULLPOINTER 32902U - #define asusbERR_BUFSIZE 32901U - #define asusbERR_USB_NOTFOUND 32900U - #define asusb_USB_UNICODE_ENGLISH 1033U - #define asusb_USB_DESCR_ENDPOINT 5U - #define asusb_USB_DESCR_INTERFACE 4U - #define asusb_USB_DESCR_STRING 3U - #define asusb_USB_DESCR_CONFIG 2U - #define asusb_USB_DESCR_DEVICE 1U - #define asusb_USB_RT_VENDOR 64U - #define asusb_USB_RT_CLASS 32U - #define asusb_USB_RT_STANDARD 0U - #define asusb_USB_RT_ENDPOINT 2U - #define asusb_USB_RT_INTERFACE 1U - #define asusb_USB_RT_DEVICE 0U - #define asusb_DEVICENAMELENGTH 128U - #define asusb_SUBCLASS_SCSI_COMMAND_SET 6U - #define asusb_SUBCLASS_UFI_COMMAND_SET 4U - #define asusb_SUBCLASS_HID_BOOT 1U - #define asusb_SUBCLASS_PRINTER 1U - #define asusb_CLASS_VENDOR_SPECIFIC 255U - #define asusb_CLASS_HUB 9U - #define asusb_CLASS_MASS_STORAGE 8U - #define asusb_CLASS_PRINTER 7U - #define asusb_CLASS_HID 3U - #define asusb_CLASS_CDC 2U -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST unsigned short asusbERR_NULLPOINTER; - _GLOBAL_CONST unsigned short asusbERR_BUFSIZE; - _GLOBAL_CONST unsigned short asusbERR_USB_NOTFOUND; - _GLOBAL_CONST unsigned short asusb_USB_UNICODE_ENGLISH; - _GLOBAL_CONST unsigned char asusb_USB_DESCR_ENDPOINT; - _GLOBAL_CONST unsigned char asusb_USB_DESCR_INTERFACE; - _GLOBAL_CONST unsigned char asusb_USB_DESCR_STRING; - _GLOBAL_CONST unsigned char asusb_USB_DESCR_CONFIG; - _GLOBAL_CONST unsigned char asusb_USB_DESCR_DEVICE; - _GLOBAL_CONST unsigned char asusb_USB_RT_VENDOR; - _GLOBAL_CONST unsigned char asusb_USB_RT_CLASS; - _GLOBAL_CONST unsigned char asusb_USB_RT_STANDARD; - _GLOBAL_CONST unsigned char asusb_USB_RT_ENDPOINT; - _GLOBAL_CONST unsigned char asusb_USB_RT_INTERFACE; - _GLOBAL_CONST unsigned char asusb_USB_RT_DEVICE; - _GLOBAL_CONST unsigned char asusb_DEVICENAMELENGTH; - _GLOBAL_CONST unsigned char asusb_SUBCLASS_SCSI_COMMAND_SET; - _GLOBAL_CONST unsigned char asusb_SUBCLASS_UFI_COMMAND_SET; - _GLOBAL_CONST unsigned char asusb_SUBCLASS_HID_BOOT; - _GLOBAL_CONST unsigned char asusb_SUBCLASS_PRINTER; - _GLOBAL_CONST unsigned char asusb_CLASS_VENDOR_SPECIFIC; - _GLOBAL_CONST unsigned char asusb_CLASS_HUB; - _GLOBAL_CONST unsigned char asusb_CLASS_MASS_STORAGE; - _GLOBAL_CONST unsigned char asusb_CLASS_PRINTER; - _GLOBAL_CONST unsigned char asusb_CLASS_HID; - _GLOBAL_CONST unsigned char asusb_CLASS_CDC; -#endif - - - - /* Datatypes and datatypes of function blocks */ typedef struct usbNode_typ { unsigned short interfaceClass; @@ -226,6 +163,66 @@ _BUR_PUBLIC void UsbDescriptorGet(struct UsbDescriptorGet* inst); _BUR_PUBLIC void UsbMsDeviceReady(struct UsbMsDeviceReady* inst); +/* Constants */ +#ifdef _REPLACE_CONST + #define asusbERR_NULLPOINTER 32902U + #define asusbERR_BUFSIZE 32901U + #define asusbERR_USB_NOTFOUND 32900U + #define asusb_USB_UNICODE_ENGLISH 1033U + #define asusb_USB_DESCR_ENDPOINT 5U + #define asusb_USB_DESCR_INTERFACE 4U + #define asusb_USB_DESCR_STRING 3U + #define asusb_USB_DESCR_CONFIG 2U + #define asusb_USB_DESCR_DEVICE 1U + #define asusb_USB_RT_VENDOR 64U + #define asusb_USB_RT_CLASS 32U + #define asusb_USB_RT_STANDARD 0U + #define asusb_USB_RT_ENDPOINT 2U + #define asusb_USB_RT_INTERFACE 1U + #define asusb_USB_RT_DEVICE 0U + #define asusb_DEVICENAMELENGTH 128U + #define asusb_SUBCLASS_SCSI_COMMAND_SET 6U + #define asusb_SUBCLASS_UFI_COMMAND_SET 4U + #define asusb_SUBCLASS_HID_BOOT 1U + #define asusb_SUBCLASS_PRINTER 1U + #define asusb_CLASS_VENDOR_SPECIFIC 255U + #define asusb_CLASS_HUB 9U + #define asusb_CLASS_MASS_STORAGE 8U + #define asusb_CLASS_PRINTER 7U + #define asusb_CLASS_HID 3U + #define asusb_CLASS_CDC 2U +#else + _GLOBAL_CONST unsigned short asusbERR_NULLPOINTER; + _GLOBAL_CONST unsigned short asusbERR_BUFSIZE; + _GLOBAL_CONST unsigned short asusbERR_USB_NOTFOUND; + _GLOBAL_CONST unsigned short asusb_USB_UNICODE_ENGLISH; + _GLOBAL_CONST unsigned char asusb_USB_DESCR_ENDPOINT; + _GLOBAL_CONST unsigned char asusb_USB_DESCR_INTERFACE; + _GLOBAL_CONST unsigned char asusb_USB_DESCR_STRING; + _GLOBAL_CONST unsigned char asusb_USB_DESCR_CONFIG; + _GLOBAL_CONST unsigned char asusb_USB_DESCR_DEVICE; + _GLOBAL_CONST unsigned char asusb_USB_RT_VENDOR; + _GLOBAL_CONST unsigned char asusb_USB_RT_CLASS; + _GLOBAL_CONST unsigned char asusb_USB_RT_STANDARD; + _GLOBAL_CONST unsigned char asusb_USB_RT_ENDPOINT; + _GLOBAL_CONST unsigned char asusb_USB_RT_INTERFACE; + _GLOBAL_CONST unsigned char asusb_USB_RT_DEVICE; + _GLOBAL_CONST unsigned char asusb_DEVICENAMELENGTH; + _GLOBAL_CONST unsigned char asusb_SUBCLASS_SCSI_COMMAND_SET; + _GLOBAL_CONST unsigned char asusb_SUBCLASS_UFI_COMMAND_SET; + _GLOBAL_CONST unsigned char asusb_SUBCLASS_HID_BOOT; + _GLOBAL_CONST unsigned char asusb_SUBCLASS_PRINTER; + _GLOBAL_CONST unsigned char asusb_CLASS_VENDOR_SPECIFIC; + _GLOBAL_CONST unsigned char asusb_CLASS_HUB; + _GLOBAL_CONST unsigned char asusb_CLASS_MASS_STORAGE; + _GLOBAL_CONST unsigned char asusb_CLASS_PRINTER; + _GLOBAL_CONST unsigned char asusb_CLASS_HID; + _GLOBAL_CONST unsigned char asusb_CLASS_CDC; +#endif + + + + #ifdef __cplusplus }; #endif diff --git a/example/AsProject/Logical/Libraries/_AS/AsUSB/binary.lby b/example/AsProject/Logical/Libraries/_AS/AsUSB/binary.lby index af4b7e4..6b62de5 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsUSB/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/AsUSB/binary.lby @@ -1,12 +1,12 @@ - - - - - AsUSB.fun - AsUSB.typ - AsUSB.var - - - - - \ No newline at end of file + + + + + AsUSB.fun + AsUSB.typ + AsUSB.var + + + + + diff --git a/example/AsProject/Logical/Libraries/_AS/AsXml/SG4/AsXml.h b/example/AsProject/Logical/Libraries/_AS/AsXml/SG4/AsXml.h index 2bc0d1f..3d1ff31 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsXml/SG4/AsXml.h +++ b/example/AsProject/Logical/Libraries/_AS/AsXml/SG4/AsXml.h @@ -10,68 +10,11 @@ extern "C" #include +#include + #ifndef _BUR_PUBLIC #define _BUR_PUBLIC #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define xmlNODE_TYPE_ENDELEMENT 15U - #define xmlNODE_TYPE_SIGN_WHITESPACE 14U - #define xmlNODE_TYPE_WHITESPACE 13U - #define xmlNODE_TYPE_COMMENT 8U - #define xmlNODE_TYPE_PI 7U - #define xmlNODE_TYPE_CDATA 4U - #define xmlNODE_TYPE_TEXT 3U - #define xmlNODE_TYPE_ELEMENT 1U - #define xmlERR_DOCUMENT_NOT_OPEN 33825U - #define xmlERR_UNSUPPORTED_ENCODING 33824U - #define xmlERR_CONVERT_TEXT 33823U - #define xmlERR_CONVERT 33822U - #define xmlERR_INVALID_POSITION 33821U - #define xmlERR_NO_ELEMENT_OPEN 33820U - #define xmlERR_INVALID_IDENT 33819U - #define xmlERR_XML_DATA_INVALID 33818U - #define xmlERR_NO_ATTRIBUTES 33817U - #define xmlERR_INVALID_ATTRIBUTE_INDEX 33816U - #define xmlERR_VALUE_BUFFER_TOO_SMALL 33815U - #define xmlERR_NAME_BUFFER_TOO_SMALL 33814U - #define xmlERR_NO_FURTHER_XML_NODE 33813U - #define xmlERR_GENERAL 33812U - #define xmlERR_INVALID_PARAMETER 33811U - #define xmlERR_MEMORY 33810U -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST unsigned short xmlNODE_TYPE_ENDELEMENT; - _GLOBAL_CONST unsigned short xmlNODE_TYPE_SIGN_WHITESPACE; - _GLOBAL_CONST unsigned short xmlNODE_TYPE_WHITESPACE; - _GLOBAL_CONST unsigned short xmlNODE_TYPE_COMMENT; - _GLOBAL_CONST unsigned short xmlNODE_TYPE_PI; - _GLOBAL_CONST unsigned short xmlNODE_TYPE_CDATA; - _GLOBAL_CONST unsigned short xmlNODE_TYPE_TEXT; - _GLOBAL_CONST unsigned short xmlNODE_TYPE_ELEMENT; - _GLOBAL_CONST unsigned short xmlERR_DOCUMENT_NOT_OPEN; - _GLOBAL_CONST unsigned short xmlERR_UNSUPPORTED_ENCODING; - _GLOBAL_CONST unsigned short xmlERR_CONVERT_TEXT; - _GLOBAL_CONST unsigned short xmlERR_CONVERT; - _GLOBAL_CONST unsigned short xmlERR_INVALID_POSITION; - _GLOBAL_CONST unsigned short xmlERR_NO_ELEMENT_OPEN; - _GLOBAL_CONST unsigned short xmlERR_INVALID_IDENT; - _GLOBAL_CONST unsigned short xmlERR_XML_DATA_INVALID; - _GLOBAL_CONST unsigned short xmlERR_NO_ATTRIBUTES; - _GLOBAL_CONST unsigned short xmlERR_INVALID_ATTRIBUTE_INDEX; - _GLOBAL_CONST unsigned short xmlERR_VALUE_BUFFER_TOO_SMALL; - _GLOBAL_CONST unsigned short xmlERR_NAME_BUFFER_TOO_SMALL; - _GLOBAL_CONST unsigned short xmlERR_NO_FURTHER_XML_NODE; - _GLOBAL_CONST unsigned short xmlERR_GENERAL; - _GLOBAL_CONST unsigned short xmlERR_INVALID_PARAMETER; - _GLOBAL_CONST unsigned short xmlERR_MEMORY; -#endif - - - - /* Datatypes and datatypes of function blocks */ typedef struct xmlCreateMemoryReader { @@ -342,6 +285,62 @@ _BUR_PUBLIC void xmlWriteCDataEx(struct xmlWriteCDataEx* inst); _BUR_PUBLIC void xmlWritePI(struct xmlWritePI* inst); +/* Constants */ +#ifdef _REPLACE_CONST + #define xmlNODE_TYPE_ENDELEMENT 15U + #define xmlNODE_TYPE_SIGN_WHITESPACE 14U + #define xmlNODE_TYPE_WHITESPACE 13U + #define xmlNODE_TYPE_COMMENT 8U + #define xmlNODE_TYPE_PI 7U + #define xmlNODE_TYPE_CDATA 4U + #define xmlNODE_TYPE_TEXT 3U + #define xmlNODE_TYPE_ELEMENT 1U + #define xmlERR_DOCUMENT_NOT_OPEN 33825U + #define xmlERR_UNSUPPORTED_ENCODING 33824U + #define xmlERR_CONVERT_TEXT 33823U + #define xmlERR_CONVERT 33822U + #define xmlERR_INVALID_POSITION 33821U + #define xmlERR_NO_ELEMENT_OPEN 33820U + #define xmlERR_INVALID_IDENT 33819U + #define xmlERR_XML_DATA_INVALID 33818U + #define xmlERR_NO_ATTRIBUTES 33817U + #define xmlERR_INVALID_ATTRIBUTE_INDEX 33816U + #define xmlERR_VALUE_BUFFER_TOO_SMALL 33815U + #define xmlERR_NAME_BUFFER_TOO_SMALL 33814U + #define xmlERR_NO_FURTHER_XML_NODE 33813U + #define xmlERR_GENERAL 33812U + #define xmlERR_INVALID_PARAMETER 33811U + #define xmlERR_MEMORY 33810U +#else + _GLOBAL_CONST unsigned short xmlNODE_TYPE_ENDELEMENT; + _GLOBAL_CONST unsigned short xmlNODE_TYPE_SIGN_WHITESPACE; + _GLOBAL_CONST unsigned short xmlNODE_TYPE_WHITESPACE; + _GLOBAL_CONST unsigned short xmlNODE_TYPE_COMMENT; + _GLOBAL_CONST unsigned short xmlNODE_TYPE_PI; + _GLOBAL_CONST unsigned short xmlNODE_TYPE_CDATA; + _GLOBAL_CONST unsigned short xmlNODE_TYPE_TEXT; + _GLOBAL_CONST unsigned short xmlNODE_TYPE_ELEMENT; + _GLOBAL_CONST unsigned short xmlERR_DOCUMENT_NOT_OPEN; + _GLOBAL_CONST unsigned short xmlERR_UNSUPPORTED_ENCODING; + _GLOBAL_CONST unsigned short xmlERR_CONVERT_TEXT; + _GLOBAL_CONST unsigned short xmlERR_CONVERT; + _GLOBAL_CONST unsigned short xmlERR_INVALID_POSITION; + _GLOBAL_CONST unsigned short xmlERR_NO_ELEMENT_OPEN; + _GLOBAL_CONST unsigned short xmlERR_INVALID_IDENT; + _GLOBAL_CONST unsigned short xmlERR_XML_DATA_INVALID; + _GLOBAL_CONST unsigned short xmlERR_NO_ATTRIBUTES; + _GLOBAL_CONST unsigned short xmlERR_INVALID_ATTRIBUTE_INDEX; + _GLOBAL_CONST unsigned short xmlERR_VALUE_BUFFER_TOO_SMALL; + _GLOBAL_CONST unsigned short xmlERR_NAME_BUFFER_TOO_SMALL; + _GLOBAL_CONST unsigned short xmlERR_NO_FURTHER_XML_NODE; + _GLOBAL_CONST unsigned short xmlERR_GENERAL; + _GLOBAL_CONST unsigned short xmlERR_INVALID_PARAMETER; + _GLOBAL_CONST unsigned short xmlERR_MEMORY; +#endif + + + + #ifdef __cplusplus }; #endif diff --git a/example/AsProject/Logical/Libraries/_AS/AsXml/binary.lby b/example/AsProject/Logical/Libraries/_AS/AsXml/binary.lby index 2378c69..65fcf2c 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsXml/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/AsXml/binary.lby @@ -1,9 +1,12 @@ - - - - - AsXml.fun - AsXml.typ - AsXml.var - - \ No newline at end of file + + + + + AsXml.fun + AsXml.typ + AsXml.var + + + + + diff --git a/example/AsProject/Logical/Libraries/_AS/AsZip/SG4/AsZip.h b/example/AsProject/Logical/Libraries/_AS/AsZip/SG4/AsZip.h index 62b4e1e..c8bd46c 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsZip/SG4/AsZip.h +++ b/example/AsProject/Logical/Libraries/_AS/AsZip/SG4/AsZip.h @@ -15,31 +15,6 @@ extern "C" #ifndef _BUR_PUBLIC #define _BUR_PUBLIC #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define zipERR_FILE_WRITE_ERROR 38066U - #define zipERR_FILE_NOT_FOUND 38065U - #define zipERR_SPACE 38064U - #define zipERR_INTERNAL_ERROR 38063U - #define zipERR_UNSUPPORTED_EXTENSION 38062U - #define zipERR_INVALID_DEVICE 38061U - #define zipERR_NULLPOINTER 38060U -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST unsigned short zipERR_FILE_WRITE_ERROR; - _GLOBAL_CONST unsigned short zipERR_FILE_NOT_FOUND; - _GLOBAL_CONST unsigned short zipERR_SPACE; - _GLOBAL_CONST unsigned short zipERR_INTERNAL_ERROR; - _GLOBAL_CONST unsigned short zipERR_UNSUPPORTED_EXTENSION; - _GLOBAL_CONST unsigned short zipERR_INVALID_DEVICE; - _GLOBAL_CONST unsigned short zipERR_NULLPOINTER; -#endif - - - - /* Datatypes and datatypes of function blocks */ typedef struct zipArchive { @@ -82,6 +57,28 @@ _BUR_PUBLIC void zipArchive(struct zipArchive* inst); _BUR_PUBLIC void zipExtract(struct zipExtract* inst); +/* Constants */ +#ifdef _REPLACE_CONST + #define zipERR_FILE_WRITE_ERROR 38066U + #define zipERR_FILE_NOT_FOUND 38065U + #define zipERR_SPACE 38064U + #define zipERR_INTERNAL_ERROR 38063U + #define zipERR_UNSUPPORTED_EXTENSION 38062U + #define zipERR_INVALID_DEVICE 38061U + #define zipERR_NULLPOINTER 38060U +#else + _GLOBAL_CONST unsigned short zipERR_FILE_WRITE_ERROR; + _GLOBAL_CONST unsigned short zipERR_FILE_NOT_FOUND; + _GLOBAL_CONST unsigned short zipERR_SPACE; + _GLOBAL_CONST unsigned short zipERR_INTERNAL_ERROR; + _GLOBAL_CONST unsigned short zipERR_UNSUPPORTED_EXTENSION; + _GLOBAL_CONST unsigned short zipERR_INVALID_DEVICE; + _GLOBAL_CONST unsigned short zipERR_NULLPOINTER; +#endif + + + + #ifdef __cplusplus }; #endif diff --git a/example/AsProject/Logical/Libraries/_AS/AsZip/binary.lby b/example/AsProject/Logical/Libraries/_AS/AsZip/binary.lby index df8602b..13c8a7c 100644 --- a/example/AsProject/Logical/Libraries/_AS/AsZip/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/AsZip/binary.lby @@ -1,12 +1,12 @@ - - - - - AsZip.fun - AsZip.typ - AsZip.var - - - - - \ No newline at end of file + + + + + AsZip.fun + AsZip.typ + AsZip.var + + + + + diff --git a/example/AsProject/Logical/Libraries/_AS/Convert/Convert.fun b/example/AsProject/Logical/Libraries/_AS/Convert/Convert.fun deleted file mode 100644 index 0b8be2c..0000000 --- a/example/AsProject/Logical/Libraries/_AS/Convert/Convert.fun +++ /dev/null @@ -1,531 +0,0 @@ - -{REDUND_OK} FUNCTION swapDT : DATE_AND_TIME (*swaps the byte order of a DATE_AND_TIME value*) - VAR_INPUT - IN :DATE_AND_TIME; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION swapTIME : TIME (*swaps the byte order of a TIME value*) - VAR_INPUT - IN :TIME; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION swapREAL : REAL (*swaps the byte order of a REAL value*) - VAR_INPUT - IN :REAL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION swapLREAL : LREAL (*swaps the byte order of a LREAL value*) - VAR_INPUT - IN :LREAL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION swapUDINT : UDINT (*swaps the byte order of an UDINT value*) - VAR_INPUT - IN :UDINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION swapDINT : DINT (*swaps the byte order of a DINT value*) - VAR_INPUT - IN :DINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION swapUINT : UINT (*swaps the byte order of an UINT value*) - VAR_INPUT - IN :UINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION swapINT : INT (*swaps the byte order of a INT value*) - VAR_INPUT - IN :INT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION N_TO_HDT : DATE_AND_TIME (*converts a DATE_AND_TIME value from network (big endian) to host byte order*) - VAR_INPUT - IN :DATE_AND_TIME; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION N_TO_HTIME : TIME (*converts a TIME value from network (big endian) to host byte order*) - VAR_INPUT - IN :TIME; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION N_TO_HREAL : REAL (*converts a REAL value from network (big endian) to host byte order*) - VAR_INPUT - IN :REAL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION N_TO_HLREAL : LREAL (*converts a LREAL value from network (big endian) to host byte order*) - VAR_INPUT - IN :LREAL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION N_TO_HUDINT : UDINT (*converts a UDINT value from network (big endian) to host byte order*) - VAR_INPUT - IN :UDINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION N_TO_HDINT : DINT (*converts a DINT value from network (big endian) to host byte order*) - VAR_INPUT - IN :DINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION N_TO_HUINT : UINT (*converts a UINT value from network (big endian) to host byte order*) - VAR_INPUT - IN :UINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION N_TO_HINT : INT (*converts an INT value from network (big endian) to host byte order*) - VAR_INPUT - IN :INT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION H_TO_NDT : DATE_AND_TIME (*converts a DATE_AND_TIME value from host to network byte order (big endian)*) - VAR_INPUT - IN :DATE_AND_TIME; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION H_TO_NTIME : TIME (*converts a TIME value from host to network byte order (big endian)*) - VAR_INPUT - IN :TIME; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION H_TO_NREAL : REAL (*converts a REAL value from host to network byte order (big endian)*) - VAR_INPUT - IN :REAL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION H_TO_NLREAL : LREAL (*converts a LREAL value from host to network byte order (big endian)*) - VAR_INPUT - IN :LREAL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION H_TO_NUDINT : UDINT (*converts a UDINT value from host to network byte order (big endian)*) - VAR_INPUT - IN :UDINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION H_TO_NDINT : DINT (*converts a DINT value from host to network byte order (big endian)*) - VAR_INPUT - IN :DINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION H_TO_NUINT : UINT (*converts a UINT value from host to network byte order (big endian)*) - VAR_INPUT - IN :UINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION H_TO_NINT : INT (*converts an INT value from host to network byte order (big endian)*) - VAR_INPUT - IN :INT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION DT_TO_UDINT : UDINT (*converts a DATE_AND_TIME (32 bit date in seconds) value to a UDINT value (32 bits unsigned)*) - VAR_INPUT - IN :DATE_AND_TIME; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION DT_TO_DINT : DINT (*converts a DATE_AND_TIME (32 bit date in seconds) value to a DINT value (32 bits signed)*) - VAR_INPUT - IN :DATE_AND_TIME; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION DT_TO_BOOL : BOOL (*converts a DATE_AND_TIME value (32 bit date in seconds) to a BOOL value (1 bit)*) - VAR_INPUT - IN :DATE_AND_TIME; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION TIME_TO_DINT : DINT (*converts a TIME value (32 bit time in milliseconds) to a DINT value (32 bits signed)*) - VAR_INPUT - IN :TIME; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION TIME_TO_UDINT : UDINT (*converts a TIME value (32 bit time in milliseconds) to a UDINT value (32 bits unsigned)*) - VAR_INPUT - IN :TIME; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION TIME_TO_BOOL : BOOL (*converts a TIME value (32 bit time in milliseconds) to a BOOL value (1 bit)*) - VAR_INPUT - IN :TIME; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION BOOL_TO_SINT : SINT (*converts a BOOL value (1 bit) to a SINT value (8 bits signed)*) - VAR_INPUT - IN :BOOL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION SINT_TO_INT : INT (*converts a SINT value (8 bits signed) to an INT value (16 bits signed)*) - VAR_INPUT - IN :SINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION SINT_TO_LREAL : LREAL (*converts a SINT value (8 bits signed) to a LREAL value (64 bit floating point number)*) - VAR_INPUT - IN :SINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION SINT_TO_REAL : REAL (*converts a SINT value (8 bits signed) to a REAL value (32 bit floating point number)*) - VAR_INPUT - IN :SINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION SINT_TO_UDINT : UDINT (*converts a SINT value (8 bits signed) to a UDINT value (32 bits unsigned)*) - VAR_INPUT - IN :SINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION SINT_TO_UINT : UINT (*converts a SINT value (8 bits signed) to a UINT value (16 bits unsigned)*) - VAR_INPUT - IN :SINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION SINT_TO_USINT : USINT (*converts a SINT value (8 bits signed) to a USINT value (8 bits unsigned)*) - VAR_INPUT - IN :SINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION SINT_TO_DINT : DINT (*converts a SINT value (8 bits signed) to a DINT value (32 bits signed)*) - VAR_INPUT - IN :SINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION SINT_TO_BOOL : BOOL (*converts a SINT value (8 bits signed) to a BOOL value (1 bit)*) - VAR_INPUT - IN :SINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION BOOL_TO_DT : DATE_AND_TIME (*converts a BOOL value (1 bit) to a DATE_AND_TIME value (32 bit date in seconds)*) - VAR_INPUT - IN :BOOL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION BOOL_TO_TIME : TIME (*converts a BOOL value (1 bit) to a TIME value (32 bit time in milliseconds)*) - VAR_INPUT - IN :BOOL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION BOOL_TO_REAL : REAL (*converts a BOOL value (1 bit) to a REAL value (32 bit floating point number)*) - VAR_INPUT - IN :BOOL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION BOOL_TO_UDINT : UDINT (*converts a BOOL value (1 bit) to a UDINT value (32 bits unsigned)*) - VAR_INPUT - IN :BOOL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION BOOL_TO_UINT : UINT (*converts a BOOL value (1 bit) to a UINT value (16 bits unsigned)*) - VAR_INPUT - IN :BOOL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION BOOL_TO_USINT : USINT (*converts a BOOL value (1 bit) to a USINT value (8 bits unsigned)*) - VAR_INPUT - IN :BOOL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION BOOL_TO_DINT : DINT (*converts a BOOL value (1 bit) to a DINT value (32 bits signed)*) - VAR_INPUT - IN :BOOL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION BOOL_TO_INT : INT (*converts a BOOL value (1 bit) to an INT value (16 bits signed)*) - VAR_INPUT - IN :BOOL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION INT_TO_LREAL : LREAL (*converts an INT value (16 bits signed) to a LREAL value (64 bit floating point number)*) - VAR_INPUT - IN :INT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION INT_TO_REAL : REAL (*converts an INT value (16 bits signed) to a REAL value (32 bit floating point number)*) - VAR_INPUT - IN :INT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION INT_TO_UDINT : UDINT (*converts an INT value (16 bits signed) to a UDINT value (32 bits unsigned)*) - VAR_INPUT - IN :INT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION INT_TO_UINT : UINT (*converts an INT value (16 bits signed) to a UINT value (16 bits unsigned)*) - VAR_INPUT - IN :INT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION INT_TO_USINT : USINT (*converts an INT value (16 bits signed) to a USINT value (8 bits unsigned)*) - VAR_INPUT - IN :INT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION INT_TO_DINT : DINT (*converts an INT value (16 bits signed) to a DINT value (32 bits signed)*) - VAR_INPUT - IN :INT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION INT_TO_SINT : SINT (*converts an INT value (16 bits signed) to a SINT value (8 bits signed)*) - VAR_INPUT - IN :INT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION INT_TO_BOOL : BOOL (*converts an INT value (16 bits signed) to a BOOL value (1 bit)*) - VAR_INPUT - IN :INT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION DINT_TO_DT : DATE_AND_TIME (*converts a DINT value (32 bits signed) to a DATE_AND_TIME value (32 bit date in seconds)*) - VAR_INPUT - IN :DINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION DINT_TO_TIME : TIME (*converts a DINT value (32 bits signed) to a TIME value (32 bit time in milliseconds)*) - VAR_INPUT - IN :DINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION DINT_TO_LREAL : LREAL (*converts a DINT value (32 bits signed) to a LREAL value (64 bit floating point number)*) - VAR_INPUT - IN :DINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION DINT_TO_REAL : REAL (*converts a DINT value (32 bits signed) to a REAL value (32 bit floating point number)*) - VAR_INPUT - IN :DINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION DINT_TO_UDINT : UDINT (*converts a DINT value (32 bits signed) to a UDINT value (32 bits unsigned)*) - VAR_INPUT - IN :DINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION DINT_TO_UINT : UINT (*converts a DINT value (32 bits signed) to a UINT value (16 bits unsigned)*) - VAR_INPUT - IN :DINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION DINT_TO_USINT : USINT (*converts a DINT value (32 bits signed) to a USINT value (8 bits unsigned)*) - VAR_INPUT - IN :DINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION DINT_TO_INT : INT (*converts a DINT value (32 bits signed) to an INT value (16 bits signed)*) - VAR_INPUT - IN :DINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION DINT_TO_SINT : SINT (*converts a DINT value (32 bits signed) to a SINT value (8 bits signed)*) - VAR_INPUT - IN :DINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION DINT_TO_BOOL : BOOL (*converts a DINT value (32 bits signed) to a BOOL value (1 bit)*) - VAR_INPUT - IN :DINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION USINT_TO_BOOL : BOOL (*converts a USINT value (8 bits unsigned) to a BOOL value (1 bit)*) - VAR_INPUT - IN :USINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION USINT_TO_LREAL : LREAL (*converts a USINT value (8 bits unsigned) to a LREAL value (64 bit floating point number)*) - VAR_INPUT - IN :USINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION USINT_TO_REAL : REAL (*converts a USINT value (8 bits unsigned) to a REAL value (32 bit floating point number)*) - VAR_INPUT - IN :USINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION USINT_TO_UDINT : UDINT (*converts a USINT value (8 bits unsigned) to a UDINT value (32 bits unsigned)*) - VAR_INPUT - IN :USINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION USINT_TO_UINT : UINT (*converts a USINT value (8 bits unsigned) to a UINT value (16 bits unsigned)*) - VAR_INPUT - IN :USINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION USINT_TO_DINT : DINT (*converts a USINT value (8 bits unsigned) to a DINT value (32 bits signed)*) - VAR_INPUT - IN :USINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION USINT_TO_INT : INT (*converts a USINT value (8 bits unsigned) to an INT value (16 bits signed)*) - VAR_INPUT - IN :USINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION USINT_TO_SINT : SINT (*converts a USINT value (8 bits unsigned) to a SINT value (8 bits signed)*) - VAR_INPUT - IN :USINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION UDINT_TO_DT : DATE_AND_TIME (*converts a UDINT value (32 bits unsigned) to a DATE_AND_TIME value (32 bit date in seconds)*) - VAR_INPUT - IN :UDINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION UDINT_TO_TIME : TIME (*converts a UDINT value (32 bits unsigned) to a TIME value (32 bit time in milliseconds)*) - VAR_INPUT - IN :UDINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION UDINT_TO_LREAL : LREAL (*converts a UDINT value (32 bits unsigned) to a LREAL value (64 bit floating point number)*) - VAR_INPUT - IN :UDINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION UDINT_TO_REAL : REAL (*converts a UDINT value (32 bits unsigned) to a REAL value (32 bit floating point number)*) - VAR_INPUT - IN :UDINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION UDINT_TO_UINT : UINT (*converts a UDINT value (32 bits unsigned) to a UINT value (16 bits unsigned)*) - VAR_INPUT - IN :UDINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION UDINT_TO_USINT : USINT (*converts a UDINT value (32 bits unsigned) to a USINT value (8 bits unsigned)*) - VAR_INPUT - IN :UDINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION UDINT_TO_DINT : DINT (*converts a UDINT value (32 bits unsigned) to a DINT value (32 bits signed)*) - VAR_INPUT - IN :UDINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION UDINT_TO_INT : INT (*converts a UDINT value (32 bits unsigned) to an INT value (16 bits signed)*) - VAR_INPUT - IN :UDINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION UDINT_TO_SINT : SINT (*converts a UDINT value (32 bits unsigned) to a SINT value (8 bits signed)*) - VAR_INPUT - IN :UDINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION UDINT_TO_BOOL : BOOL (*converts a UDINT value (32 bits unsigned) to a BOOL value (1 bit)*) - VAR_INPUT - IN :UDINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION UINT_TO_BOOL : BOOL (*converts a UINT value (16 bits unsigned) to a BOOL value (1 bit)*) - VAR_INPUT - IN :UINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION UINT_TO_LREAL : LREAL (*converts a UINT value (16 bits unsigned) to a LREAL value (64 bit floating point number)*) - VAR_INPUT - IN :UINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION UINT_TO_REAL : REAL (*converts a UINT value (16 bits unsigned) to a REAL value (32 bit floating point number)*) - VAR_INPUT - IN :UINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION UINT_TO_UDINT : UDINT (*converts a UINT value (16 bits unsigned) to a UDINT value (32 bits unsigned)*) - VAR_INPUT - IN :UINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION UINT_TO_USINT : USINT (*converts a UINT value (16 bits unsigned) to a USINT value (8 bits unsigned)*) - VAR_INPUT - IN :UINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION UINT_TO_DINT : DINT (*converts a UINT value (16 bits unsigned) to a DINT value (32 bits signed)*) - VAR_INPUT - IN :UINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION UINT_TO_INT : INT (*converts a UINT value (16 bits unsigned) to an INT value (16 bits signed)*) - VAR_INPUT - IN :UINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION UINT_TO_SINT : SINT (*converts a UINT value (16 bits unsigned) to a SINT value (8 bits signed)*) - VAR_INPUT - IN :UINT; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION REAL_TO_LREAL : LREAL (*converts a REAL value (32 bit floating point number) to a LREAL value (64 bit floating point number)*) - VAR_INPUT - IN :REAL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION REAL_TO_UDINT : UDINT (*converts a REAL value (32 bit floating point number) to a UDINT value (32 bits unsigned)*) - VAR_INPUT - IN :REAL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION REAL_TO_UINT : UINT (*converts a REAL value (32 bit floating point number) to a UINT value (16 bits unsigned)*) - VAR_INPUT - IN :REAL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION REAL_TO_USINT : USINT (*converts a REAL value (32 bit floating point number) to a USINT value (8 bits unsigned)*) - VAR_INPUT - IN :REAL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION REAL_TO_DINT : DINT (*converts a REAL value (32 bit floating point number) to a DINT value (32 bits signed)*) - VAR_INPUT - IN :REAL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION REAL_TO_INT : INT (*converts a REAL value (32 bit floating point number) to an INT value (16 bits signed)*) - VAR_INPUT - IN :REAL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION REAL_TO_SINT : SINT (*converts a REAL value (32 bit floating point number) to a SINT value (8 bits signed)*) - VAR_INPUT - IN :REAL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION REAL_TO_BOOL : BOOL (*converts a REAL value (32 bit floating point number) to a BOOL value (1 bit)*) - VAR_INPUT - IN :REAL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION LREAL_TO_REAL : REAL (*converts a LREAL value (64 bit floating point number) to a REAL value (32 bit floating point number)*) - VAR_INPUT - IN :LREAL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION LREAL_TO_UDINT : UDINT (*converts a LREAL value (64 bit floating point number) to a UDINT value (32 bits unsigned)*) - VAR_INPUT - IN :LREAL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION LREAL_TO_UINT : UINT (*converts a LREAL value (64 bit floating point number) to a UINT value (16 bits unsigned)*) - VAR_INPUT - IN :LREAL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION LREAL_TO_USINT : USINT (*converts a LREAL value (64 bit floating point number) to a USINT value (8 bits unsigned)*) - VAR_INPUT - IN :LREAL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION LREAL_TO_DINT : DINT (*converts a LREAL value (64 bit floating point number) to a DINT value (32 bits signed)*) - VAR_INPUT - IN :LREAL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION LREAL_TO_INT : INT (*converts a LREAL value (64 bit floating point number) to an INT value (16 bits signed)*) - VAR_INPUT - IN :LREAL; (*input value*) - END_VAR -END_FUNCTION -{REDUND_OK} FUNCTION LREAL_TO_SINT : SINT (*converts a LREAL value (64 bit floating point number) to a SINT value (8 bits signed)*) - VAR_INPUT - IN :LREAL; (*input value*) - END_VAR -END_FUNCTION diff --git a/example/AsProject/Logical/Libraries/_AS/Convert/Convert.typ b/example/AsProject/Logical/Libraries/_AS/Convert/Convert.typ deleted file mode 100644 index fbd30fd..0000000 --- a/example/AsProject/Logical/Libraries/_AS/Convert/Convert.typ +++ /dev/null @@ -1,4 +0,0 @@ - -TYPE - -END_TYPE diff --git a/example/AsProject/Logical/Libraries/_AS/Convert/Convert.var b/example/AsProject/Logical/Libraries/_AS/Convert/Convert.var deleted file mode 100644 index def8c87..0000000 --- a/example/AsProject/Logical/Libraries/_AS/Convert/Convert.var +++ /dev/null @@ -1,4 +0,0 @@ - -VAR CONSTANT - -END_VAR diff --git a/example/AsProject/Logical/Libraries/_AS/Convert/SG3/Convert.h b/example/AsProject/Logical/Libraries/_AS/Convert/SG3/Convert.h deleted file mode 100644 index 3910d38..0000000 --- a/example/AsProject/Logical/Libraries/_AS/Convert/SG3/Convert.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Automation Studio Generated Header File, Format Version 1.00 */ -/* do not change */ -#ifndef CONVERT_H_ -#define CONVERT_H_ -#ifdef __cplusplus -extern "C" { -#endif - - -#include - - - -/* Constants */ - - -/* Datatypes */ - - -/* Datatypes of function blocks */ - - -/* Prototyping of functions and function blocks */ -signed short H_TO_NINT(signed short IN); -unsigned short H_TO_NUINT(unsigned short IN); -signed long H_TO_NDINT(signed long IN); -unsigned long H_TO_NUDINT(unsigned long IN); -float H_TO_NREAL(float IN); -plctime H_TO_NTIME(plctime IN); -DATE_AND_TIME H_TO_NDT(DATE_AND_TIME IN); -signed short N_TO_HINT(signed short IN); -unsigned short N_TO_HUINT(unsigned short IN); -signed long N_TO_HDINT(signed long IN); -unsigned long N_TO_HUDINT(unsigned long IN); -float N_TO_HREAL(float IN); -plctime N_TO_HTIME(plctime IN); -DATE_AND_TIME N_TO_HDT(DATE_AND_TIME IN); -signed short swapINT(signed short IN); -unsigned short swapUINT(unsigned short IN); -signed long swapDINT(signed long IN); -unsigned long swapUDINT(unsigned long IN); -float swapREAL(float IN); - - -#ifdef __cplusplus -}; -#endif -#endif /* CONVERT_H_ */ - diff --git a/example/AsProject/Logical/Libraries/_AS/Convert/SG4/Convert.h b/example/AsProject/Logical/Libraries/_AS/Convert/SG4/Convert.h deleted file mode 100644 index 356984f..0000000 --- a/example/AsProject/Logical/Libraries/_AS/Convert/SG4/Convert.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Automation Studio generated header file */ -/* Do not edit ! */ - -#ifndef CONVERT_H_ -#define CONVERT_H_ -#ifdef __cplusplus -extern "C" -{ -#endif - -#include - -#ifndef _BUR_PUBLIC -#define _BUR_PUBLIC -#endif -/* Constants */ - - - - -/* Datatypes and datatypes of function blocks */ - - -/* Prototyping of functions and function blocks */ -_BUR_PUBLIC signed short H_TO_NINT(signed short IN); -_BUR_PUBLIC unsigned short H_TO_NUINT(unsigned short IN); -_BUR_PUBLIC signed long H_TO_NDINT(signed long IN); -_BUR_PUBLIC unsigned long H_TO_NUDINT(unsigned long IN); -_BUR_PUBLIC float H_TO_NREAL(float IN); -_BUR_PUBLIC double H_TO_NLREAL(double IN); -_BUR_PUBLIC plctime H_TO_NTIME(plctime IN); -_BUR_PUBLIC DATE_AND_TIME H_TO_NDT(DATE_AND_TIME IN); -_BUR_PUBLIC signed short N_TO_HINT(signed short IN); -_BUR_PUBLIC unsigned short N_TO_HUINT(unsigned short IN); -_BUR_PUBLIC signed long N_TO_HDINT(signed long IN); -_BUR_PUBLIC unsigned long N_TO_HUDINT(unsigned long IN); -_BUR_PUBLIC float N_TO_HREAL(float IN); -_BUR_PUBLIC double N_TO_HLREAL(double IN); -_BUR_PUBLIC plctime N_TO_HTIME(plctime IN); -_BUR_PUBLIC DATE_AND_TIME N_TO_HDT(DATE_AND_TIME IN); -_BUR_PUBLIC signed short swapINT(signed short IN); -_BUR_PUBLIC unsigned short swapUINT(unsigned short IN); -_BUR_PUBLIC signed long swapDINT(signed long IN); -_BUR_PUBLIC unsigned long swapUDINT(unsigned long IN); -_BUR_PUBLIC plcdt swapDT(plcdt IN); -_BUR_PUBLIC plctime swapTIME(plctime IN); -_BUR_PUBLIC float swapREAL(float IN); -_BUR_PUBLIC double swapLREAL(double IN); - - -#ifdef __cplusplus -}; -#endif -#endif /* CONVERT_H_ */ - diff --git a/example/AsProject/Logical/Libraries/_AS/Convert/SGC/Convert.h b/example/AsProject/Logical/Libraries/_AS/Convert/SGC/Convert.h deleted file mode 100644 index 3910d38..0000000 --- a/example/AsProject/Logical/Libraries/_AS/Convert/SGC/Convert.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Automation Studio Generated Header File, Format Version 1.00 */ -/* do not change */ -#ifndef CONVERT_H_ -#define CONVERT_H_ -#ifdef __cplusplus -extern "C" { -#endif - - -#include - - - -/* Constants */ - - -/* Datatypes */ - - -/* Datatypes of function blocks */ - - -/* Prototyping of functions and function blocks */ -signed short H_TO_NINT(signed short IN); -unsigned short H_TO_NUINT(unsigned short IN); -signed long H_TO_NDINT(signed long IN); -unsigned long H_TO_NUDINT(unsigned long IN); -float H_TO_NREAL(float IN); -plctime H_TO_NTIME(plctime IN); -DATE_AND_TIME H_TO_NDT(DATE_AND_TIME IN); -signed short N_TO_HINT(signed short IN); -unsigned short N_TO_HUINT(unsigned short IN); -signed long N_TO_HDINT(signed long IN); -unsigned long N_TO_HUDINT(unsigned long IN); -float N_TO_HREAL(float IN); -plctime N_TO_HTIME(plctime IN); -DATE_AND_TIME N_TO_HDT(DATE_AND_TIME IN); -signed short swapINT(signed short IN); -unsigned short swapUINT(unsigned short IN); -signed long swapDINT(signed long IN); -unsigned long swapUDINT(unsigned long IN); -float swapREAL(float IN); - - -#ifdef __cplusplus -}; -#endif -#endif /* CONVERT_H_ */ - diff --git a/example/AsProject/Logical/Libraries/_AS/Convert/binary.lby b/example/AsProject/Logical/Libraries/_AS/Convert/binary.lby deleted file mode 100644 index fbf5832..0000000 --- a/example/AsProject/Logical/Libraries/_AS/Convert/binary.lby +++ /dev/null @@ -1,9 +0,0 @@ - - - - - Convert.fun - Convert.typ - Convert.var - - \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/_AS/DataObj/SG4/DataObj.h b/example/AsProject/Logical/Libraries/_AS/DataObj/SG4/DataObj.h index eb14bc6..8e4fd5a 100644 --- a/example/AsProject/Logical/Libraries/_AS/DataObj/SG4/DataObj.h +++ b/example/AsProject/Logical/Libraries/_AS/DataObj/SG4/DataObj.h @@ -15,65 +15,6 @@ extern "C" #ifndef _BUR_PUBLIC #define _BUR_PUBLIC #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define doTEMP 65U - #define doFIXRAM 5U - #define doMEMCARD 4U - #define doUSRRAM 3U - #define doUSRROM 2U - #define doNO_CS 1U - #define doSYSROM 0U - #define doERR_MODULDELETE_SYSROM 20615U - #define doERR_BURNINGOBJECT 20614U - #define doERR_ILLSTATE 20611U - #define doERR_NOMEMORY 20603U - #define doERR_BRINSTALL 20604U - #define doERR_DUPOBJECT 20601U - #define doERR_ILLOBJECT 20605U - #define doERR_WRONGTIME 20610U - #define doERR_ILLMEMTYPE 20602U - #define doERR_ILLOBJTYPE 20606U - #define doERR_WRONGOFFSET 20607U - #define doERR_ILLPARAMETER 20600U - #define doERR_STARTHANDLER 20612U - #define doERR_ILLEGALLENGTH 20608U - #define doERR_MODULNOTFOUND 20609U - #define doERR_CHECKSUM_WARNING 20630U - #define doERR_TOOLONG_MODULNAME 20613U -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST unsigned char doTEMP; - _GLOBAL_CONST unsigned char doFIXRAM; - _GLOBAL_CONST unsigned char doMEMCARD; - _GLOBAL_CONST unsigned char doUSRRAM; - _GLOBAL_CONST unsigned char doUSRROM; - _GLOBAL_CONST unsigned char doNO_CS; - _GLOBAL_CONST unsigned char doSYSROM; - _GLOBAL_CONST unsigned short doERR_MODULDELETE_SYSROM; - _GLOBAL_CONST unsigned short doERR_BURNINGOBJECT; - _GLOBAL_CONST unsigned short doERR_ILLSTATE; - _GLOBAL_CONST unsigned short doERR_NOMEMORY; - _GLOBAL_CONST unsigned short doERR_BRINSTALL; - _GLOBAL_CONST unsigned short doERR_DUPOBJECT; - _GLOBAL_CONST unsigned short doERR_ILLOBJECT; - _GLOBAL_CONST unsigned short doERR_WRONGTIME; - _GLOBAL_CONST unsigned short doERR_ILLMEMTYPE; - _GLOBAL_CONST unsigned short doERR_ILLOBJTYPE; - _GLOBAL_CONST unsigned short doERR_WRONGOFFSET; - _GLOBAL_CONST unsigned short doERR_ILLPARAMETER; - _GLOBAL_CONST unsigned short doERR_STARTHANDLER; - _GLOBAL_CONST unsigned short doERR_ILLEGALLENGTH; - _GLOBAL_CONST unsigned short doERR_MODULNOTFOUND; - _GLOBAL_CONST unsigned short doERR_CHECKSUM_WARNING; - _GLOBAL_CONST unsigned short doERR_TOOLONG_MODULNAME; -#endif - - - - /* Datatypes and datatypes of function blocks */ typedef struct DatObjCreate { @@ -243,6 +184,62 @@ _BUR_PUBLIC void DatObjAttach(struct DatObjAttach* inst); _BUR_PUBLIC void DatObjDetach(struct DatObjDetach* inst); +/* Constants */ +#ifdef _REPLACE_CONST + #define doTEMP 65U + #define doFIXRAM 5U + #define doMEMCARD 4U + #define doUSRRAM 3U + #define doUSRROM 2U + #define doNO_CS 1U + #define doSYSROM 0U + #define doERR_MODULDELETE_SYSROM 20615U + #define doERR_BURNINGOBJECT 20614U + #define doERR_ILLSTATE 20611U + #define doERR_NOMEMORY 20603U + #define doERR_BRINSTALL 20604U + #define doERR_DUPOBJECT 20601U + #define doERR_ILLOBJECT 20605U + #define doERR_WRONGTIME 20610U + #define doERR_ILLMEMTYPE 20602U + #define doERR_ILLOBJTYPE 20606U + #define doERR_WRONGOFFSET 20607U + #define doERR_ILLPARAMETER 20600U + #define doERR_STARTHANDLER 20612U + #define doERR_ILLEGALLENGTH 20608U + #define doERR_MODULNOTFOUND 20609U + #define doERR_CHECKSUM_WARNING 20630U + #define doERR_TOOLONG_MODULNAME 20613U +#else + _GLOBAL_CONST unsigned char doTEMP; + _GLOBAL_CONST unsigned char doFIXRAM; + _GLOBAL_CONST unsigned char doMEMCARD; + _GLOBAL_CONST unsigned char doUSRRAM; + _GLOBAL_CONST unsigned char doUSRROM; + _GLOBAL_CONST unsigned char doNO_CS; + _GLOBAL_CONST unsigned char doSYSROM; + _GLOBAL_CONST unsigned short doERR_MODULDELETE_SYSROM; + _GLOBAL_CONST unsigned short doERR_BURNINGOBJECT; + _GLOBAL_CONST unsigned short doERR_ILLSTATE; + _GLOBAL_CONST unsigned short doERR_NOMEMORY; + _GLOBAL_CONST unsigned short doERR_BRINSTALL; + _GLOBAL_CONST unsigned short doERR_DUPOBJECT; + _GLOBAL_CONST unsigned short doERR_ILLOBJECT; + _GLOBAL_CONST unsigned short doERR_WRONGTIME; + _GLOBAL_CONST unsigned short doERR_ILLMEMTYPE; + _GLOBAL_CONST unsigned short doERR_ILLOBJTYPE; + _GLOBAL_CONST unsigned short doERR_WRONGOFFSET; + _GLOBAL_CONST unsigned short doERR_ILLPARAMETER; + _GLOBAL_CONST unsigned short doERR_STARTHANDLER; + _GLOBAL_CONST unsigned short doERR_ILLEGALLENGTH; + _GLOBAL_CONST unsigned short doERR_MODULNOTFOUND; + _GLOBAL_CONST unsigned short doERR_CHECKSUM_WARNING; + _GLOBAL_CONST unsigned short doERR_TOOLONG_MODULNAME; +#endif + + + + #ifdef __cplusplus }; #endif diff --git a/example/AsProject/Logical/Libraries/_AS/DataObj/binary.lby b/example/AsProject/Logical/Libraries/_AS/DataObj/binary.lby index b96c924..a39dae4 100644 --- a/example/AsProject/Logical/Libraries/_AS/DataObj/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/DataObj/binary.lby @@ -1,12 +1,12 @@ - - - - - DataObj.fun - DataObj.typ - DataObj.var - - - - - \ No newline at end of file + + + + + DataObj.fun + DataObj.typ + DataObj.var + + + + + diff --git a/example/AsProject/Logical/Libraries/_AS/FileIO/FileIO.var b/example/AsProject/Logical/Libraries/_AS/FileIO/FileIO.var index 09c96ad..8b251f1 100644 --- a/example/AsProject/Logical/Libraries/_AS/FileIO/FileIO.var +++ b/example/AsProject/Logical/Libraries/_AS/FileIO/FileIO.var @@ -38,7 +38,7 @@ VAR CONSTANT fiERR_COM_FILE_CLOSE : UINT := 20715; (*error file close*) fiERR_COM_FILE_READ : UINT := 20716; (*error file read*) fiERR_COM_FILE_WRITE : UINT := 20717; (*error file write*) - fiERR_COM_FILE_IOCTL : UINT := 20718; (*error fiel ioctl*) + fiERR_COM_FILE_IOCTL : UINT := 20718; (*error file ioctl*) fiERR_DATA : UINT := 20719; (*error data*) fiERR_ASYNC_MANAGER : UINT := 20720; (*error asynchron manager*) fiERR_FILE_NOT_OPENED : UINT := 20721; (*error file not opened*) @@ -57,7 +57,8 @@ VAR CONSTANT fiERR_NETIO_USER : UINT := 20734; (*error user or password*) fiERR_INVALID_NBYTES : UINT := 20735; (*error invalid number of bytes*) fiERR_NETIO_PARAMETERS : UINT := 20736; (*error invalid parameters to establish a connection*) - + fiERR_NETIO_INIT : UINT := 20737; (*error network file system initialization failed*) + fiERR_INIT : UINT := 20796; (*error init*) fiERR_DEVICE_DRIVER : UINT := 20797; (*error device driver*) fiERR_DEVICE_MANAGER : UINT := 20798; (*error device manager*) diff --git a/example/AsProject/Logical/Libraries/_AS/FileIO/SG4/FileIO.h b/example/AsProject/Logical/Libraries/_AS/FileIO/SG4/FileIO.h index 13a7bae..b4bb045 100644 --- a/example/AsProject/Logical/Libraries/_AS/FileIO/SG4/FileIO.h +++ b/example/AsProject/Logical/Libraries/_AS/FileIO/SG4/FileIO.h @@ -15,165 +15,6 @@ extern "C" #ifndef _BUR_PUBLIC #define _BUR_PUBLIC #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define SET_RECURSIVE 1U - #define FILE_RW 2U - #define FILE_W 1U - #define FILE_R 0U - #define FILE_OW_ONCE 3U - #define FILE_OW_DETMEM 2U - #define FILE_DETMEM 1U - #define FILE_ONCE 0U - #define FILE_FILE 0U - #define FILE_DIR 1U - #define FILE_ALL 2U - #define DIR_OW 1U - #define ATTR_VOL_LABEL 8U - #define ATTR_SYSTEM 4U - #define ATTR_RDONLY 1U - #define ATTR_HIDDEN 2U - #define ATTR_DIRECTORY 16U - #define ATTR_ARCHIVE 32U - #define fiERR_SYSTEM 20799U - #define fiERR_DEVICE_MANAGER 20798U - #define fiERR_DEVICE_DRIVER 20797U - #define fiERR_INIT 20796U - #define fiERR_NETIO_PARAMETERS 20736U - #define fiERR_INVALID_NBYTES 20735U - #define fiERR_NETIO_USER 20734U - #define fiERR_NETIO_PORT 20733U - #define fiERR_NETIO_IP_UNEQUAL 20732U - #define fiERR_DEVICE_INVALID_HANDLE 20731U - #define fiERR_DEVICE_ALREADY_EXIST 20730U - #define fiERR_PARAMETER 20729U - #define fiERR_DIR_INVALID_HANDLE 20728U - #define fiERR_NOT_ENOUGH_FREEMEM 20727U - #define fiERR_DETMEMINFO 20726U - #define fiERR_DIR_ALREADY_EXIST 20725U - #define fiERR_DIR_NOT_EMPTY 20724U - #define fiERR_DIR_NOT_EXIST 20723U - #define fiERR_INVALID_DIRECTORY 20722U - #define fiERR_FILE_NOT_OPENED 20721U - #define fiERR_ASYNC_MANAGER 20720U - #define fiERR_DATA 20719U - #define fiERR_COM_FILE_IOCTL 20718U - #define fiERR_COM_FILE_WRITE 20717U - #define fiERR_COM_FILE_READ 20716U - #define fiERR_COM_FILE_CLOSE 20715U - #define fiERR_COM_FILE_OPEN 20714U - #define fiERR_LESS_VIRTUAL_MEMORY 20713U - #define fiERR_FILE 20712U - #define fiERR_SEEK 20711U - #define fiERR_SPACE 20710U - #define fiERR_FILE_DEVICE 20709U - #define fiERR_FILE_NOT_FOUND 20708U - #define fiERR_MODE 20707U - #define fiERR_ACCESS 20706U - #define fiERR_EXIST 20705U - #define fiERR_INVALID_TYP 20704U - #define fiERR_NOT_SUPPORTED 20703U - #define fiERR_NO_MORE_ENTRIES 20702U - #define fiERR_DATA_SIZE 20701U - #define fiERR_INVALID_PATH 20700U - #define fiTruncate 1U - #define fiBOTH 2U - #define fiDIRECTORY 1U - #define fiFILE 0U - #define fiREAD_WRITE 2U - #define fiWRITE_ONLY 1U - #define fiREAD_ONLY 0U - #define fiOVERWRITE 2U - #define fiRECURSIVE 1U - #define fiATTR_VOL_LABEL 8U - #define fiATTR_SYSTEM 4U - #define fiATTR_RDONLY 1U - #define fiATTR_HIDDEN 2U - #define fiATTR_DIRECTORY 16U - #define fiATTR_ARCHIVE 32U -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST unsigned char SET_RECURSIVE; - _GLOBAL_CONST unsigned char FILE_RW; - _GLOBAL_CONST unsigned char FILE_W; - _GLOBAL_CONST unsigned char FILE_R; - _GLOBAL_CONST unsigned char FILE_OW_ONCE; - _GLOBAL_CONST unsigned char FILE_OW_DETMEM; - _GLOBAL_CONST unsigned char FILE_DETMEM; - _GLOBAL_CONST unsigned char FILE_ONCE; - _GLOBAL_CONST unsigned char FILE_FILE; - _GLOBAL_CONST unsigned char FILE_DIR; - _GLOBAL_CONST unsigned char FILE_ALL; - _GLOBAL_CONST unsigned char DIR_OW; - _GLOBAL_CONST unsigned char ATTR_VOL_LABEL; - _GLOBAL_CONST unsigned char ATTR_SYSTEM; - _GLOBAL_CONST unsigned char ATTR_RDONLY; - _GLOBAL_CONST unsigned char ATTR_HIDDEN; - _GLOBAL_CONST unsigned char ATTR_DIRECTORY; - _GLOBAL_CONST unsigned char ATTR_ARCHIVE; - _GLOBAL_CONST unsigned short fiERR_SYSTEM; - _GLOBAL_CONST unsigned short fiERR_DEVICE_MANAGER; - _GLOBAL_CONST unsigned short fiERR_DEVICE_DRIVER; - _GLOBAL_CONST unsigned short fiERR_INIT; - _GLOBAL_CONST unsigned short fiERR_NETIO_PARAMETERS; - _GLOBAL_CONST unsigned short fiERR_INVALID_NBYTES; - _GLOBAL_CONST unsigned short fiERR_NETIO_USER; - _GLOBAL_CONST unsigned short fiERR_NETIO_PORT; - _GLOBAL_CONST unsigned short fiERR_NETIO_IP_UNEQUAL; - _GLOBAL_CONST unsigned short fiERR_DEVICE_INVALID_HANDLE; - _GLOBAL_CONST unsigned short fiERR_DEVICE_ALREADY_EXIST; - _GLOBAL_CONST unsigned short fiERR_PARAMETER; - _GLOBAL_CONST unsigned short fiERR_DIR_INVALID_HANDLE; - _GLOBAL_CONST unsigned short fiERR_NOT_ENOUGH_FREEMEM; - _GLOBAL_CONST unsigned short fiERR_DETMEMINFO; - _GLOBAL_CONST unsigned short fiERR_DIR_ALREADY_EXIST; - _GLOBAL_CONST unsigned short fiERR_DIR_NOT_EMPTY; - _GLOBAL_CONST unsigned short fiERR_DIR_NOT_EXIST; - _GLOBAL_CONST unsigned short fiERR_INVALID_DIRECTORY; - _GLOBAL_CONST unsigned short fiERR_FILE_NOT_OPENED; - _GLOBAL_CONST unsigned short fiERR_ASYNC_MANAGER; - _GLOBAL_CONST unsigned short fiERR_DATA; - _GLOBAL_CONST unsigned short fiERR_COM_FILE_IOCTL; - _GLOBAL_CONST unsigned short fiERR_COM_FILE_WRITE; - _GLOBAL_CONST unsigned short fiERR_COM_FILE_READ; - _GLOBAL_CONST unsigned short fiERR_COM_FILE_CLOSE; - _GLOBAL_CONST unsigned short fiERR_COM_FILE_OPEN; - _GLOBAL_CONST unsigned short fiERR_LESS_VIRTUAL_MEMORY; - _GLOBAL_CONST unsigned short fiERR_FILE; - _GLOBAL_CONST unsigned short fiERR_SEEK; - _GLOBAL_CONST unsigned short fiERR_SPACE; - _GLOBAL_CONST unsigned short fiERR_FILE_DEVICE; - _GLOBAL_CONST unsigned short fiERR_FILE_NOT_FOUND; - _GLOBAL_CONST unsigned short fiERR_MODE; - _GLOBAL_CONST unsigned short fiERR_ACCESS; - _GLOBAL_CONST unsigned short fiERR_EXIST; - _GLOBAL_CONST unsigned short fiERR_INVALID_TYP; - _GLOBAL_CONST unsigned short fiERR_NOT_SUPPORTED; - _GLOBAL_CONST unsigned short fiERR_NO_MORE_ENTRIES; - _GLOBAL_CONST unsigned short fiERR_DATA_SIZE; - _GLOBAL_CONST unsigned short fiERR_INVALID_PATH; - _GLOBAL_CONST unsigned long fiTruncate; - _GLOBAL_CONST unsigned char fiBOTH; - _GLOBAL_CONST unsigned char fiDIRECTORY; - _GLOBAL_CONST unsigned char fiFILE; - _GLOBAL_CONST unsigned char fiREAD_WRITE; - _GLOBAL_CONST unsigned char fiWRITE_ONLY; - _GLOBAL_CONST unsigned char fiREAD_ONLY; - _GLOBAL_CONST unsigned char fiOVERWRITE; - _GLOBAL_CONST unsigned char fiRECURSIVE; - _GLOBAL_CONST unsigned char fiATTR_VOL_LABEL; - _GLOBAL_CONST unsigned char fiATTR_SYSTEM; - _GLOBAL_CONST unsigned char fiATTR_RDONLY; - _GLOBAL_CONST unsigned char fiATTR_HIDDEN; - _GLOBAL_CONST unsigned char fiATTR_DIRECTORY; - _GLOBAL_CONST unsigned char fiATTR_ARCHIVE; -#endif - - - - /* Datatypes and datatypes of function blocks */ typedef struct fiDIR_READ_DATA { unsigned char Filename[260]; @@ -703,6 +544,164 @@ _BUR_PUBLIC void GetVolumeSerialNo(struct GetVolumeSerialNo* inst); _BUR_PUBLIC unsigned short FileIoGetSysError(void); +/* Constants */ +#ifdef _REPLACE_CONST + #define SET_RECURSIVE 1U + #define FILE_RW 2U + #define FILE_W 1U + #define FILE_R 0U + #define FILE_OW_ONCE 3U + #define FILE_OW_DETMEM 2U + #define FILE_DETMEM 1U + #define FILE_ONCE 0U + #define FILE_FILE 0U + #define FILE_DIR 1U + #define FILE_ALL 2U + #define DIR_OW 1U + #define ATTR_VOL_LABEL 8U + #define ATTR_SYSTEM 4U + #define ATTR_RDONLY 1U + #define ATTR_HIDDEN 2U + #define ATTR_DIRECTORY 16U + #define ATTR_ARCHIVE 32U + #define fiERR_SYSTEM 20799U + #define fiERR_DEVICE_MANAGER 20798U + #define fiERR_DEVICE_DRIVER 20797U + #define fiERR_INIT 20796U + #define fiERR_NETIO_INIT 20737U + #define fiERR_NETIO_PARAMETERS 20736U + #define fiERR_INVALID_NBYTES 20735U + #define fiERR_NETIO_USER 20734U + #define fiERR_NETIO_PORT 20733U + #define fiERR_NETIO_IP_UNEQUAL 20732U + #define fiERR_DEVICE_INVALID_HANDLE 20731U + #define fiERR_DEVICE_ALREADY_EXIST 20730U + #define fiERR_PARAMETER 20729U + #define fiERR_DIR_INVALID_HANDLE 20728U + #define fiERR_NOT_ENOUGH_FREEMEM 20727U + #define fiERR_DETMEMINFO 20726U + #define fiERR_DIR_ALREADY_EXIST 20725U + #define fiERR_DIR_NOT_EMPTY 20724U + #define fiERR_DIR_NOT_EXIST 20723U + #define fiERR_INVALID_DIRECTORY 20722U + #define fiERR_FILE_NOT_OPENED 20721U + #define fiERR_ASYNC_MANAGER 20720U + #define fiERR_DATA 20719U + #define fiERR_COM_FILE_IOCTL 20718U + #define fiERR_COM_FILE_WRITE 20717U + #define fiERR_COM_FILE_READ 20716U + #define fiERR_COM_FILE_CLOSE 20715U + #define fiERR_COM_FILE_OPEN 20714U + #define fiERR_LESS_VIRTUAL_MEMORY 20713U + #define fiERR_FILE 20712U + #define fiERR_SEEK 20711U + #define fiERR_SPACE 20710U + #define fiERR_FILE_DEVICE 20709U + #define fiERR_FILE_NOT_FOUND 20708U + #define fiERR_MODE 20707U + #define fiERR_ACCESS 20706U + #define fiERR_EXIST 20705U + #define fiERR_INVALID_TYP 20704U + #define fiERR_NOT_SUPPORTED 20703U + #define fiERR_NO_MORE_ENTRIES 20702U + #define fiERR_DATA_SIZE 20701U + #define fiERR_INVALID_PATH 20700U + #define fiTruncate 1U + #define fiBOTH 2U + #define fiDIRECTORY 1U + #define fiFILE 0U + #define fiREAD_WRITE 2U + #define fiWRITE_ONLY 1U + #define fiREAD_ONLY 0U + #define fiOVERWRITE 2U + #define fiRECURSIVE 1U + #define fiATTR_VOL_LABEL 8U + #define fiATTR_SYSTEM 4U + #define fiATTR_RDONLY 1U + #define fiATTR_HIDDEN 2U + #define fiATTR_DIRECTORY 16U + #define fiATTR_ARCHIVE 32U +#else + _GLOBAL_CONST unsigned char SET_RECURSIVE; + _GLOBAL_CONST unsigned char FILE_RW; + _GLOBAL_CONST unsigned char FILE_W; + _GLOBAL_CONST unsigned char FILE_R; + _GLOBAL_CONST unsigned char FILE_OW_ONCE; + _GLOBAL_CONST unsigned char FILE_OW_DETMEM; + _GLOBAL_CONST unsigned char FILE_DETMEM; + _GLOBAL_CONST unsigned char FILE_ONCE; + _GLOBAL_CONST unsigned char FILE_FILE; + _GLOBAL_CONST unsigned char FILE_DIR; + _GLOBAL_CONST unsigned char FILE_ALL; + _GLOBAL_CONST unsigned char DIR_OW; + _GLOBAL_CONST unsigned char ATTR_VOL_LABEL; + _GLOBAL_CONST unsigned char ATTR_SYSTEM; + _GLOBAL_CONST unsigned char ATTR_RDONLY; + _GLOBAL_CONST unsigned char ATTR_HIDDEN; + _GLOBAL_CONST unsigned char ATTR_DIRECTORY; + _GLOBAL_CONST unsigned char ATTR_ARCHIVE; + _GLOBAL_CONST unsigned short fiERR_SYSTEM; + _GLOBAL_CONST unsigned short fiERR_DEVICE_MANAGER; + _GLOBAL_CONST unsigned short fiERR_DEVICE_DRIVER; + _GLOBAL_CONST unsigned short fiERR_INIT; + _GLOBAL_CONST unsigned short fiERR_NETIO_INIT; + _GLOBAL_CONST unsigned short fiERR_NETIO_PARAMETERS; + _GLOBAL_CONST unsigned short fiERR_INVALID_NBYTES; + _GLOBAL_CONST unsigned short fiERR_NETIO_USER; + _GLOBAL_CONST unsigned short fiERR_NETIO_PORT; + _GLOBAL_CONST unsigned short fiERR_NETIO_IP_UNEQUAL; + _GLOBAL_CONST unsigned short fiERR_DEVICE_INVALID_HANDLE; + _GLOBAL_CONST unsigned short fiERR_DEVICE_ALREADY_EXIST; + _GLOBAL_CONST unsigned short fiERR_PARAMETER; + _GLOBAL_CONST unsigned short fiERR_DIR_INVALID_HANDLE; + _GLOBAL_CONST unsigned short fiERR_NOT_ENOUGH_FREEMEM; + _GLOBAL_CONST unsigned short fiERR_DETMEMINFO; + _GLOBAL_CONST unsigned short fiERR_DIR_ALREADY_EXIST; + _GLOBAL_CONST unsigned short fiERR_DIR_NOT_EMPTY; + _GLOBAL_CONST unsigned short fiERR_DIR_NOT_EXIST; + _GLOBAL_CONST unsigned short fiERR_INVALID_DIRECTORY; + _GLOBAL_CONST unsigned short fiERR_FILE_NOT_OPENED; + _GLOBAL_CONST unsigned short fiERR_ASYNC_MANAGER; + _GLOBAL_CONST unsigned short fiERR_DATA; + _GLOBAL_CONST unsigned short fiERR_COM_FILE_IOCTL; + _GLOBAL_CONST unsigned short fiERR_COM_FILE_WRITE; + _GLOBAL_CONST unsigned short fiERR_COM_FILE_READ; + _GLOBAL_CONST unsigned short fiERR_COM_FILE_CLOSE; + _GLOBAL_CONST unsigned short fiERR_COM_FILE_OPEN; + _GLOBAL_CONST unsigned short fiERR_LESS_VIRTUAL_MEMORY; + _GLOBAL_CONST unsigned short fiERR_FILE; + _GLOBAL_CONST unsigned short fiERR_SEEK; + _GLOBAL_CONST unsigned short fiERR_SPACE; + _GLOBAL_CONST unsigned short fiERR_FILE_DEVICE; + _GLOBAL_CONST unsigned short fiERR_FILE_NOT_FOUND; + _GLOBAL_CONST unsigned short fiERR_MODE; + _GLOBAL_CONST unsigned short fiERR_ACCESS; + _GLOBAL_CONST unsigned short fiERR_EXIST; + _GLOBAL_CONST unsigned short fiERR_INVALID_TYP; + _GLOBAL_CONST unsigned short fiERR_NOT_SUPPORTED; + _GLOBAL_CONST unsigned short fiERR_NO_MORE_ENTRIES; + _GLOBAL_CONST unsigned short fiERR_DATA_SIZE; + _GLOBAL_CONST unsigned short fiERR_INVALID_PATH; + _GLOBAL_CONST unsigned long fiTruncate; + _GLOBAL_CONST unsigned char fiBOTH; + _GLOBAL_CONST unsigned char fiDIRECTORY; + _GLOBAL_CONST unsigned char fiFILE; + _GLOBAL_CONST unsigned char fiREAD_WRITE; + _GLOBAL_CONST unsigned char fiWRITE_ONLY; + _GLOBAL_CONST unsigned char fiREAD_ONLY; + _GLOBAL_CONST unsigned char fiOVERWRITE; + _GLOBAL_CONST unsigned char fiRECURSIVE; + _GLOBAL_CONST unsigned char fiATTR_VOL_LABEL; + _GLOBAL_CONST unsigned char fiATTR_SYSTEM; + _GLOBAL_CONST unsigned char fiATTR_RDONLY; + _GLOBAL_CONST unsigned char fiATTR_HIDDEN; + _GLOBAL_CONST unsigned char fiATTR_DIRECTORY; + _GLOBAL_CONST unsigned char fiATTR_ARCHIVE; +#endif + + + + #ifdef __cplusplus }; #endif diff --git a/example/AsProject/Logical/Libraries/_AS/FileIO/binary.lby b/example/AsProject/Logical/Libraries/_AS/FileIO/binary.lby index f4c8e0a..755ebf2 100644 --- a/example/AsProject/Logical/Libraries/_AS/FileIO/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/FileIO/binary.lby @@ -1,12 +1,12 @@ - - - - - FileIO.fun - FileIO.typ - FileIO.var - - - - - \ No newline at end of file + + + + + FileIO.fun + FileIO.typ + FileIO.var + + + + + diff --git a/example/AsProject/Logical/Libraries/_AS/LoopConR/Binary.lby b/example/AsProject/Logical/Libraries/_AS/LoopConR/Binary.lby index 76c98a5..fc24af3 100644 --- a/example/AsProject/Logical/Libraries/_AS/LoopConR/Binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/LoopConR/Binary.lby @@ -1,6 +1,6 @@  - + LoopConR.var LoopConR.typ diff --git a/example/AsProject/Logical/Libraries/_AS/LoopConR/SG3/LoopConR.h b/example/AsProject/Logical/Libraries/_AS/LoopConR/SG3/LoopConR.h deleted file mode 100644 index e88fcf4..0000000 --- a/example/AsProject/Logical/Libraries/_AS/LoopConR/SG3/LoopConR.h +++ /dev/null @@ -1,1677 +0,0 @@ -/* Automation Studio generated header file */ -/* Do not edit ! */ -/* LoopConR 4.10.2 */ - -#ifndef _LOOPCONR_ -#define _LOOPCONR_ -#ifdef __cplusplus -extern "C" -{ -#endif -#ifndef _LoopConR_VERSION -#define _LoopConR_VERSION 4.10.2 -#endif - -#include - -#ifndef _BUR_PUBLIC -#define _BUR_PUBLIC -#endif -#ifdef _SG4 - #include "sys_lib.h" - #include "brsystem.h" -#endif -#ifdef _SG3 - #include "sys_lib.h" - #include "brsystem.h" -#endif -#ifdef _SGC - #include "sys_lib.h" - #include "brsystem.h" -#endif - -/* Constants */ -#ifdef _REPLACE_CONST - #define LCRPID_TUNE_REQU_PER_5 500000U - #define LCRSLIMPID_REQU_PER_5 500000U - #define LCRSLIMPID_REQU_PER_4 400000U - #define LCRPID_TUNE_REQU_PER_4 400000U - #define LCRPID_TUNE_REQU_PER_3 300000U - #define LCRSLIMPID_REQU_PER_3 300000U - #define LCRTEMP_STEP_ERROR 65535U - #define LCR_ERR_DISABLED 65534U - #define LCR_ERR_PT2O_TF_NEG_ZERO 33154U - #define LCR_ERR_PT2O_D_NEG 33153U - #define LCR_ERR_LCRTEMPTune_DT_IGNORED 33152U - #define LCR_ERR_LCRTEMPPID_INVALID_MODE 33151U - #define LCR_ERR_LCRTEMPTune_INVALID_MODE 33150U - #define LCR_WARN_PT2O_TF_TS 33102U - #define LCR_WARN_LCRTEMPTune_ASYNC 33101U - #define LCR_WARN_LCRTEMPTune_DT_HIGH 33100U - #define LCR_ERR_SCHEDULE_N 31574U - #define LCR_ERR_SCHEDULE_P 31573U - #define LCR_ERR_LCRTEMPPID_NO_TALT 31572U - #define LCR_ERR_LCRTEMPPID_TKNICK 31571U - #define LCR_ERR_LCRTEMPTune_TASKTIME_0 31570U - #define LCR_ERR_LCRTEMPPID_ILLEGALMODE 31569U - #define LCR_ERR_LCRTEMPPID_WR_PTR 31568U - #define LCR_ERR_LCRTEMPPID_WR_PARA 31567U - #define LCR_ERR_LCRTEMPTune_WR_TSET 31567U - #define LCR_ERR_LCRTEMPTune_WR_PTR 31566U - #define LCR_ERR_LCRPIDTune_MAXMIN 31564U - #define LCR_ERR_POINTER 31563U - #define LCR_ERR_LCRDBLPID_DX_DT 31562U - #define LCR_ERR_LCRDBLPID_WX_LOW 31561U - #define LCR_ERR_LCRPIDTune_CONTROL_VAR 31560U - #define LCR_ERR_LCRPIDTune_INVALID_REQU 31559U - #define LCR_ERR_LCRPID_PAR_FBKMODE 31558U - #define LCR_ERR_LCRPID_PAR_DYMAX 31557U - #define LCR_ERR_LCRPID_PAR_DMODE 31556U - #define LCR_ERR_LCRPID_PARADAT 31554U - #define LCR_ERR_LCRPID_MODE 31553U - #define LCR_ERR_LCRPID_IDENT 31552U - #define LCR_ERR_LCRMovAvgFlt_BASE 31551U - #define LCR_ERR_LCRIntegrate_TN 31550U - #define LCRPID_TUNE_REQU_OSC_3 30000U - #define LCRSLIMPID_REQU_OSC_3 30000U - #define LCRPID_TUNE_REQU_OSC_2 20000U - #define LCRSLIMPID_REQU_OSC_2 20000U - #define LCR_ERR_LCRTT_TT_NEG 12048U - #define LCR_ERR_LCRPT12_T2_NEG 12047U - #define LCR_ERR_LCRPT12_T1_NEG 12046U - #define LCR_ERR_LCRCurveByPoints_TABLE 12045U - #define LCR_ERR_LCRPID_PAR_DEADBAND 12044U - #define LCR_ERR_LCRPID_PAR_WX_MAXMIN 12043U - #define LCR_ERR_LCRPID_PAR_DEADBAND_MODE 12042U - #define LCR_ERR_LCRPIDTune_W_CHANGED 12041U - #define LCR_ERR_LCRPIDTune_TIMEOUT 12040U - #define LCR_ERR_LCRPIDTune_PARAMETER 12039U - #define LCR_ERR_LCRPIDTune_ABORT 12038U - #define LCR_ERR_MAXMIN 12037U - #define LCR_ERR_LCRContinServo_TIMPULSE 12036U - #define LCR_ERR_LCRContinServo_TCHANGE 12035U - #define LCR_ERR_LCRRamp_DYUP_DYDOWN 12034U - #define LCR_ERR_LCRPWM_TPERIOD 12033U - #define LCR_ERR_LCRPWM_TPULSE 12033U - #define LCR_ERR_LCRPWM_TMINPULSE 12032U - #define LCR_ERR_LCRPT1_T 12031U - #define LCR_ERR_LCRPID_PAR_TV 12030U - #define LCR_ERR_LCRPID_PAR_TN 12029U - #define LCR_ERR_LCRPID_PAR_TF 12028U - #define LCR_ERR_LCRPID_PAR_KW 12027U - #define LCR_ERR_LCRPID_PAR_KP 12026U - #define LCR_ERROR 12025U - #define LCR_ERR_LCRPID_PAR_KFBK 12025U - #define LCR_WARN_LCRTEMPPID_WR_PARA 12024U - #define LCR_WARN_LCRTEMPTune_WR_BASE 12023U - #define LCR_WARN_LCRTEMPTune_WR_PARA 12022U - #define LCR_WARN_LCRTEMPTune_HEAT_TP 12021U - #define LCR_WARN_LCRDBLPID_TUNE_CHANGE 12019U - #define LCR_WARN_LCRTT_MEM 12018U - #define LCR_WARN_LCRTT_TT_INT 12017U - #define LCR_WARN_LCRTT_TT_TS 12016U - #define LCR_WARN_LCRTT_TT_ZERO 12015U - #define LCR_WARN_LCRPT12_T2_INT 12014U - #define LCR_WARN_LCRPT12_T2_TS 12013U - #define LCR_WARN_LCRPT12_T2_ZERO 12012U - #define LCR_WARN_LCRPT12_T1_INT 12011U - #define LCR_WARN_LCRPT12_T1_TS 12010U - #define LCR_WARN_LCRPID_YMAN_LIMIT 12009U - #define LCR_WARN_LCRPID_A_LIMIT 12008U - #define LCR_WARN_Tx_DT 12007U - #define LCR_WARN_LCRPT12_T1_ZERO 12005U - #define LCR_WARN_LCRPIDTune_CYCLETIME 12004U - #define LCR_WARN_LCRPID_YFBK_LIMIT 12003U - #define LCR_WARN_LCRPID_I_MINLIMIT 12002U - #define LCR_WARN_LCRPID_I_MAXLIMIT 12001U - #define LCRSLIMPID_REQU_OSC_1 10000U - #define LCRPID_TUNE_REQU_OSC_1 10000U - #define LCRSLIMPID_REQU_CHR_REF_OS 5000U - #define LCRPID_TUNE_REQU_CHR_REF_OS 5000U - #define LCRSLIMPID_REQU_CHR_REF_AP 4000U - #define LCRPID_TUNE_REQU_CHR_REF_AP 4000U - #define LCRPID_TUNE_REQU_ZN_DIST 3000U - #define LCRSLIMPID_REQU_ZN_DIST 3000U - #define LCRPID_TUNE_REQU_CHR_DIST_OS 2000U - #define LCRSLIMPID_REQU_CHR_DIST_OS 2000U - #define LCRPID_TUNE_REQU_CHR_DIST_AP 1000U - #define LCRSLIMPID_REQU_CHR_DIST_AP 1000U - #define LCRSLIMPID_REQU_P 300U - #define LCRPID_TUNE_REQU_P 300U - #define LCRSLIMPID_REQU_PI 200U - #define LCRPID_TUNE_REQU_PI 200U - #define LCRTEMP_STEP_DONE 130U - #define LCRTEMP_STEP_PID_DONE 125U - #define LCRTEMP_STEP_PID_DONE_COOLONLY 122U - #define LCRTEMP_STEP_COOL 120U - #define LCRPID_TUNE_ADDINFO_OSC_PERIOD 111U - #define LCRTEMP_STEP_START_COOL 110U - #define LCRTEMP_STEP_WAIT_COOLONLY 105U - #define LCRPID_MODE_FREEZE_JOLTFREE 105U - #define LCRPID_MODE_CLOSE_JOLTFREE 104U - #define LCRPID_MODE_OPEN_JOLTFREE 103U - #define LCRPID_MODE_MAN_JOLTFREE 102U - #define LCRTEMP_STEP_WAIT_COOL 100U - #define LCRPID_TUNE_REQU_PID 100U - #define LCRSLIMPID_REQU_PID 100U - #define LCRTEMP_STEP_PID_COOL 90U - #define LCRTEMP_STEP_PID 80U - #define LCRTEMP_STEP_FREE 70U - #define LCRTEMP_STEP_START_FREE 60U - #define LCRTEMP_STEP_WAIT_FREE 50U - #define LCRPID_TUNE_STATE_FINISHED 50U - #define LCRPID_TUNE_STATE_RESET_CNTL 49U - #define LCRPID_TUNE_STATE_CALC_PARA 45U - #define LCRTEMP_STEP_PID_FREE 40U - #define LCRTEMP_STEP_HEAT 30U - #define LCRPID_TUNE_STATE_STEP_WAITEQ2 22U - #define LCRPID_TUNE_STATE_STEP_MAXGRAD 21U - #define LCRSLIMPID_REQU_DIR_NEG 20U - #define LCRTEMP_STEP_START_HEAT 20U - #define LCRPID_TUNE_STATE_STEP_WAITEQ1 20U - #define LCRPID_TUNE_REQU_DIR_NEG 20U - #define LCRPID_TUNE_STATE_OSC_CNTLPAR 19U - #define LCRPID_TUNE_STATE_OSC_PERFORM_2 13U - #define LCRPID_TUNE_STATE_OSC_PERFORM_1 12U - #define LCRPID_TUNE_STATE_OSC_SEQ_CNTL 11U - #define LCRTEMP_STEP_WAIT_HEAT 10U - #define LCRSLIMPID_REQU_DIR_POS 10U - #define LCRPID_TUNE_STATE_OSCILLATE 10U - #define LCRPID_TUNE_REQU_DIR_POS 10U - #define LCRDBLPID_MODE_TUNE_Y2 9U - #define LCRDBLPID_MODE_TUNE_Y1 8U - #define LCRDBLPID_MODE_TUNE_6 7U - #define LCRDBLPID_MODE_TUNE_4 6U - #define LCRPID_FBK_MODE_SET_YI 5U - #define LCRPID_MODE_FREEZE 5U - #define LCRTEMP_STEP_WAIT 5U - #define LCRSLIMPID_REQU_WRITE_PARAS 4U - #define LCRPID_MODE_CLOSE 4U - #define LCRPID_FBK_MODE_LIMIT_YI 4U - #define LCRDBLPID_TSTATE_ERROR 4U - #define LCRPID_FBK_MODE_EXT_SELECTOR 3U - #define LCRSLIMPID_REQU_READ_PARAS 3U - #define LCRDBLPID_TSTATE_FINISHED 3U - #define LCRPID_MODE_OPEN 3U - #define LCRPID_TUNE_REQU_STEPRESPONSE 2U - #define LCRPID_FBK_MODE_EXTERN 2U - #define LCRPID_MODE_MAN 2U - #define LCRSLIMPID_REQU_STEPRESPONSE 2U - #define LCRPID_D_MODE_E 2U - #define LCRDBLPID_TSTATE_Y2 2U - #define LCRTEMPPID_MODE_MAN 2U - #define LCRPID_DEADBAND_MODE_STANDARD_I 2U - #define LCRSLIMPID_REQU_OSCILLATE 1U - #define LCRTEMP_COOL 1U - #define LCRTEMP_PT2 1U - #define LCRTEMP_HYST_MODE_JOLTFREE 1U - #define LCRTEMPPID_MODE_AUTO 1U - #define LCRPID_TUNE_REQU_OSCILLATE 1U - #define LCRDBLPID_TSTATE_Y1 1U - #define LCRPID_FBK_MODE_INTERN 1U - #define LCRPID_DEADBAND_MODE_STANDARD 1U - #define LCRPID_D_MODE_X 1U - #define LCRPID_MODE_AUTO 1U - #define LCRTEMPTune_MODE_EXP 1U - #define LCRPID_TUNE_REQU_OFF 0U - #define LCRDBLPID_TSTATE_OFF 0U - #define LCRTEMPTune_MODE_DEF 0U - #define LCRTEMP_PT1 0U - #define LCRSLIMPID_REQU_OFF 0U - #define LCRPID_TUNE_STATE_READY 0U - #define LCRPID_MODE_OFF 0U - #define LCRTEMP_HEAT 0U - #define LCRPID_DEADBAND_MODE_ZERO 0U -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_PER_5; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_PER_5; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_PER_4; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_PER_4; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_PER_3; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_PER_3; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_ERROR; - _GLOBAL_CONST unsigned short LCR_ERR_DISABLED; - _GLOBAL_CONST unsigned short LCR_ERR_PT2O_TF_NEG_ZERO; - _GLOBAL_CONST unsigned short LCR_ERR_PT2O_D_NEG; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPTune_DT_IGNORED; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPPID_INVALID_MODE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPTune_INVALID_MODE; - _GLOBAL_CONST unsigned short LCR_WARN_PT2O_TF_TS; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTEMPTune_ASYNC; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTEMPTune_DT_HIGH; - _GLOBAL_CONST unsigned short LCR_ERR_SCHEDULE_N; - _GLOBAL_CONST unsigned short LCR_ERR_SCHEDULE_P; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPPID_NO_TALT; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPPID_TKNICK; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPTune_TASKTIME_0; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPPID_ILLEGALMODE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPPID_WR_PTR; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPPID_WR_PARA; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPTune_WR_TSET; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPTune_WR_PTR; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPIDTune_MAXMIN; - _GLOBAL_CONST unsigned short LCR_ERR_POINTER; - _GLOBAL_CONST unsigned short LCR_ERR_LCRDBLPID_DX_DT; - _GLOBAL_CONST unsigned short LCR_ERR_LCRDBLPID_WX_LOW; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPIDTune_CONTROL_VAR; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPIDTune_INVALID_REQU; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_FBKMODE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_DYMAX; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_DMODE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PARADAT; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_MODE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_IDENT; - _GLOBAL_CONST unsigned short LCR_ERR_LCRMovAvgFlt_BASE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRIntegrate_TN; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_OSC_3; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_OSC_3; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_OSC_2; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_OSC_2; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTT_TT_NEG; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPT12_T2_NEG; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPT12_T1_NEG; - _GLOBAL_CONST unsigned short LCR_ERR_LCRCurveByPoints_TABLE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_DEADBAND; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_WX_MAXMIN; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_DEADBAND_MODE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPIDTune_W_CHANGED; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPIDTune_TIMEOUT; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPIDTune_PARAMETER; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPIDTune_ABORT; - _GLOBAL_CONST unsigned short LCR_ERR_MAXMIN; - _GLOBAL_CONST unsigned short LCR_ERR_LCRContinServo_TIMPULSE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRContinServo_TCHANGE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRRamp_DYUP_DYDOWN; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPWM_TPERIOD; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPWM_TPULSE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPWM_TMINPULSE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPT1_T; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_TV; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_TN; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_TF; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_KW; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_KP; - _GLOBAL_CONST unsigned short LCR_ERROR; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_KFBK; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTEMPPID_WR_PARA; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTEMPTune_WR_BASE; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTEMPTune_WR_PARA; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTEMPTune_HEAT_TP; - _GLOBAL_CONST unsigned short LCR_WARN_LCRDBLPID_TUNE_CHANGE; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTT_MEM; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTT_TT_INT; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTT_TT_TS; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTT_TT_ZERO; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPT12_T2_INT; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPT12_T2_TS; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPT12_T2_ZERO; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPT12_T1_INT; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPT12_T1_TS; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPID_YMAN_LIMIT; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPID_A_LIMIT; - _GLOBAL_CONST unsigned short LCR_WARN_Tx_DT; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPT12_T1_ZERO; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPIDTune_CYCLETIME; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPID_YFBK_LIMIT; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPID_I_MINLIMIT; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPID_I_MAXLIMIT; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_OSC_1; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_OSC_1; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_CHR_REF_OS; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_CHR_REF_OS; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_CHR_REF_AP; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_CHR_REF_AP; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_ZN_DIST; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_ZN_DIST; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_CHR_DIST_OS; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_CHR_DIST_OS; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_CHR_DIST_AP; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_CHR_DIST_AP; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_P; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_P; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_PI; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_PI; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_DONE; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_PID_DONE; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_PID_DONE_COOLONLY; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_COOL; - _GLOBAL_CONST unsigned short LCRPID_TUNE_ADDINFO_OSC_PERIOD; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_START_COOL; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_WAIT_COOLONLY; - _GLOBAL_CONST unsigned char LCRPID_MODE_FREEZE_JOLTFREE; - _GLOBAL_CONST unsigned char LCRPID_MODE_CLOSE_JOLTFREE; - _GLOBAL_CONST unsigned char LCRPID_MODE_OPEN_JOLTFREE; - _GLOBAL_CONST unsigned char LCRPID_MODE_MAN_JOLTFREE; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_WAIT_COOL; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_PID; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_PID; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_PID_COOL; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_PID; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_FREE; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_START_FREE; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_WAIT_FREE; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_FINISHED; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_RESET_CNTL; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_CALC_PARA; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_PID_FREE; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_HEAT; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_STEP_WAITEQ2; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_STEP_MAXGRAD; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_DIR_NEG; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_START_HEAT; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_STEP_WAITEQ1; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_DIR_NEG; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_OSC_CNTLPAR; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_OSC_PERFORM_2; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_OSC_PERFORM_1; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_OSC_SEQ_CNTL; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_WAIT_HEAT; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_DIR_POS; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_OSCILLATE; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_DIR_POS; - _GLOBAL_CONST unsigned char LCRDBLPID_MODE_TUNE_Y2; - _GLOBAL_CONST unsigned char LCRDBLPID_MODE_TUNE_Y1; - _GLOBAL_CONST unsigned char LCRDBLPID_MODE_TUNE_6; - _GLOBAL_CONST unsigned char LCRDBLPID_MODE_TUNE_4; - _GLOBAL_CONST unsigned char LCRPID_FBK_MODE_SET_YI; - _GLOBAL_CONST unsigned char LCRPID_MODE_FREEZE; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_WAIT; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_WRITE_PARAS; - _GLOBAL_CONST unsigned char LCRPID_MODE_CLOSE; - _GLOBAL_CONST unsigned char LCRPID_FBK_MODE_LIMIT_YI; - _GLOBAL_CONST unsigned char LCRDBLPID_TSTATE_ERROR; - _GLOBAL_CONST unsigned char LCRPID_FBK_MODE_EXT_SELECTOR; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_READ_PARAS; - _GLOBAL_CONST unsigned char LCRDBLPID_TSTATE_FINISHED; - _GLOBAL_CONST unsigned char LCRPID_MODE_OPEN; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_STEPRESPONSE; - _GLOBAL_CONST unsigned char LCRPID_FBK_MODE_EXTERN; - _GLOBAL_CONST unsigned char LCRPID_MODE_MAN; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_STEPRESPONSE; - _GLOBAL_CONST unsigned char LCRPID_D_MODE_E; - _GLOBAL_CONST unsigned char LCRDBLPID_TSTATE_Y2; - _GLOBAL_CONST unsigned long LCRTEMPPID_MODE_MAN; - _GLOBAL_CONST unsigned char LCRPID_DEADBAND_MODE_STANDARD_I; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_OSCILLATE; - _GLOBAL_CONST unsigned char LCRTEMP_COOL; - _GLOBAL_CONST unsigned char LCRTEMP_PT2; - _GLOBAL_CONST unsigned char LCRTEMP_HYST_MODE_JOLTFREE; - _GLOBAL_CONST unsigned long LCRTEMPPID_MODE_AUTO; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_OSCILLATE; - _GLOBAL_CONST unsigned char LCRDBLPID_TSTATE_Y1; - _GLOBAL_CONST unsigned char LCRPID_FBK_MODE_INTERN; - _GLOBAL_CONST unsigned char LCRPID_DEADBAND_MODE_STANDARD; - _GLOBAL_CONST unsigned char LCRPID_D_MODE_X; - _GLOBAL_CONST unsigned char LCRPID_MODE_AUTO; - _GLOBAL_CONST unsigned long LCRTEMPTune_MODE_EXP; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_OFF; - _GLOBAL_CONST unsigned char LCRDBLPID_TSTATE_OFF; - _GLOBAL_CONST unsigned long LCRTEMPTune_MODE_DEF; - _GLOBAL_CONST unsigned char LCRTEMP_PT1; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_OFF; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_READY; - _GLOBAL_CONST unsigned char LCRPID_MODE_OFF; - _GLOBAL_CONST unsigned char LCRTEMP_HEAT; - _GLOBAL_CONST unsigned char LCRPID_DEADBAND_MODE_ZERO; -#endif - - - - -/* Datatypes and datatypes of function blocks */ -typedef struct lcrCurveByPoints_TabEntry_type -{ float x; - float y; -} lcrCurveByPoints_TabEntry_type; - -typedef struct lcrdblpid_par_typ -{ float Y_max; - float Y_min; - signed short K_fact; - float Kp; - float Tn; - float Tv; -} lcrdblpid_par_typ; - -typedef struct lcrpid_tune_osc_options_typ -{ float osc_minAmplitude; - float Q_min; -} lcrpid_tune_osc_options_typ; - -typedef struct lcrpid_tune_step_options_typ -{ float eqDeltaX; - float eqDeltaWX; - float eqDeltat; - float evalDeltaX; - unsigned short evalNfilter; - unsigned short exitNotMaxdXCount; - float exitdXRatio; -} lcrpid_tune_step_options_typ; - -typedef struct lcrdblpid_tune_typ -{ signed short P1_manualAdjust; - signed short I1_manualAdjust; - signed short D1_manualAdjust; - signed short P2_manualAdjust; - signed short I2_manualAdjust; - signed short D2_manualAdjust; - float X_min; - float X_max; - float X0; - float de_min; - float Y0; - float Y1step; - float Y2step; - unsigned long tuneY1_opt; - unsigned long tuneY2_opt; - unsigned char tune_first; - float hyst; - float measDelta; - struct lcrpid_tune_osc_options_typ osc_opt; - struct lcrpid_tune_step_options_typ step_opt; -} lcrdblpid_tune_typ; - -typedef struct lcrpid_internal_typ -{ unsigned short size; - plcbit valid; - float WX_max; - float WX_min; - plcbit invert; - float deadband; - unsigned char deadband_mode; - float dY_max; - float Kp; - float Kp_Tn; - float Tv_Tf; - float Tf_reciproc; - float Kw; - float Kfbk_Kp; - float Kfbk_Kp_max; - unsigned char fbk_mode; - unsigned char d_mode; - unsigned char force_mode; - float Y_force; - float W; - float X; - unsigned char pid_init; - signed long Yp1; - signed long Yp2; - signed long dYi1; - signed long dYi2; - signed long Yi1; - signed long Yi2; - float dt_Tf; - signed long a11; - signed long a12; - signed long a21; - signed long a22; - signed long Yd1; - signed long Yd2; - signed long Ytotal1; - signed long Ytotal2; - signed long Ylim1; - signed long Ylim2; - signed long Y1; - signed long Y2; - float deltaY_fbk; - float e_fbk; -} lcrpid_internal_typ; - -typedef struct lcrpid_procPar_typ -{ unsigned short size; - plcbit valid; - plcbit stepResp_valid; - float stepResp_v; - float stepResp_t_u; - float stepResp_t_g; - plcbit osc_valid; - float osc_amplitudeRatio; - float osc_tPeriod; - plcbit force_params; - float Kp; - float Kp_tune; - float Tn; - float Tn_tune; - float Tv; - float Tv_tune; -} lcrpid_procPar_typ; - -typedef struct lcrpid_old_typ -{ struct lcrpid_procPar_typ processPar; - signed short P_manualAdjust; - signed short I_manualAdjust; - signed short D_manualAdjust; - float Y_min; - float Y_max; - float dY_max; - float Tf_Tv; - float Kw; - float Kfbk; - float deadband; - float W; - unsigned long request; - unsigned char fbk_mode; - unsigned char d_mode; - plcbit invert; - plcbit enable; -} lcrpid_old_typ; - -typedef struct lcrpid_osc_val_typ -{ float X; - float t; -} lcrpid_osc_val_typ; - -typedef struct lcrpid_osc_per_typ -{ struct lcrpid_osc_val_typ max; - struct lcrpid_osc_val_typ min; -} lcrpid_osc_per_typ; - -typedef struct lcrpid_tune_addpar_typ -{ float t_max_tune; - float WX_min; - float WX_max; - float dY_max; - float Tf_Tv; - float Kw; - float Kfbk; - unsigned char fbk_mode; - unsigned char d_mode; - float deadband; - unsigned char deadband_mode; - plcbit invert; -} lcrpid_tune_addpar_typ; - -typedef struct lcrpid_tune_osc_typ -{ struct lcrpid_tune_osc_options_typ options; - unsigned short oscPhase; - signed char dir; - plcbit enHi; - plcbit enLo; - float Y_hi; - float Y_lo; - unsigned short i_maxPeriod; - unsigned short i_period; - float X_ampl; - float X_avg; - float X_min_avg; - float X_max_avg; - float Y_avg; - float deltaY; - float t_Ylohi[5]; - float t_Yhilo[5]; - float Q_act; - float a_wx; - float amplitudeRatio; - float Ku; - float tPeriod; - struct lcrpid_osc_per_typ period[5]; -} lcrpid_tune_osc_typ; - -typedef struct lcrpid_tune_step_typ -{ struct lcrpid_tune_step_options_typ options; - float Y0; - float Y1; - float t_jump; - float W; - float X0; - float Xmax; - float Xmin; - float Xfiltered; - plcbit deltaXok; - plcbit deltaWXok; - float eqTime; - signed char dir; - float deltaX; - float X1; - float t1; - plcbit t1set; - float dX_dt; - float dX_dt_max; - float XmaxGrad; - float maxX1; - float maxX2; - float maxt1; - float maxt2; - float tmaxGrad; - float gainFactor; - float deadTime; - float riseTime; - unsigned short notMaxCount; - float gradientRatio; -} lcrpid_tune_step_typ; - -typedef struct lcrpt2o_Internal_typ -{ signed long Ts; - unsigned long Ts_dbl_1; - unsigned long Ts_dbl_2; - float V_old; - float D_old; - float Tf_old; - unsigned char Set_y_old; - unsigned char Set_y_2; - unsigned long x1_dbl_1; - unsigned long x1_dbl_2; - unsigned long x2_dbl_1; - unsigned long x2_dbl_2; - unsigned long Sqrt_D_1_dbl_1; - unsigned long Sqrt_D_1_dbl_2; - unsigned long Ts_Tf_dbl_1; - unsigned long Ts_Tf_dbl_2; - unsigned long Exp_D_Ts_Tf_dbl_1; - unsigned long Exp_D_Ts_Tf_dbl_2; - unsigned long a0_dbl_1; - unsigned long a0_dbl_2; - unsigned long a1_dbl_1; - unsigned long a1_dbl_2; - unsigned long b0_dbl_1; - unsigned long b0_dbl_2; - unsigned long b1_dbl_1; - unsigned long b1_dbl_2; - unsigned long Bootkey; -} lcrpt2o_Internal_typ; - -typedef struct LCRPWM -{ - /* VAR_INPUT (analog) */ - float x; - float max_value; - float min_value; - float t_min_pulse; - float t_period; - /* VAR_OUTPUT (analog) */ - unsigned short status; - float t_on; - float t_off; - /* VAR (analog) */ - signed long cnt_terron_1; - signed long cnt_terron_2; - signed long cnt_terroff_1; - signed long cnt_terroff_2; - signed long cnt_t_pulse_1; - signed long cnt_t_pulse_2; - unsigned long store1; - unsigned long store2; - unsigned long timeCnt; - struct SysInfo sysinfo_inst; - /* VAR_INPUT (digital) */ - plcbit enable; - /* VAR_OUTPUT (digital) */ - plcbit pulse; - /* VAR (digital) */ - plcbit corr; -} LCRPWM_typ; - -typedef struct lcrschedule_add_typ -{ float periodTime; - float onTime; - float t_on_intern; - float bcOnTime; - unsigned short sortIndex; - struct LCRPWM fbkPWM; - plcbit flagDelay; -} lcrschedule_add_typ; - -typedef struct lcrschedule_par_typ -{ float P; - float X; - plcbit pulse; - float Pout; - plcbit lim; - struct lcrschedule_add_typ Internal; -} lcrschedule_par_typ; - -typedef struct lcrslimpid_par_typ -{ float Y_max; - float Y_min; - float Kp; - float Tn; - float Tv; - float Kfbk; -} lcrslimpid_par_typ; - -typedef struct lcrtemp_add_typ -{ float mem01; - float mem02; - float mem10; - float mem20; - float exp_mem; - float cnt01; - float cnt02; - float cnt10; - float cnt20; - float cnt03; - float cnt30; - float cnt00; - float t_ignore_dT_heat; - float t_ignore_dT_free; - float t_ignore_dT_cool; - float yMin; - float yMax; - unsigned long reserved3; - unsigned long reserved4; - plcbit reserved5; - plcbit reserved6; -} lcrtemp_add_typ; - -typedef struct lcrtemp_pid_internal_typ -{ plcbit enable_cooling; - plcbit disable_heating; - float hyst; - float delay; - float Kw; - float Kfbk; - float Kp_h; - float Tn_h; - float Tv_h; - float Kp_c; - float Tn_c; - float Tv_c; - float dynGeneral; - float dynHeat; - float dynCool; - float mem01; - float mem02; - float mem10; - float mem20; - float exp_mem; - float yMin; - float yMax; -} lcrtemp_pid_internal_typ; - -typedef struct lcrtemp_pid_opt_typ -{ float Kp_h; - float Tn_h; - float Tv_h; - float Tf_h; - float Kp_c; - float Tn_c; - float Tv_c; - float Tf_c; - float dynGeneral; - float dynHeat; - float dynCool; -} lcrtemp_pid_opt_typ; - -typedef struct lcrtemp_pid_set_typ -{ float hyst; - unsigned char hyst_mode; - float delay; - float Kw; - float Kfbk; -} lcrtemp_pid_set_typ; - -typedef struct lcrtemp_tune_set_typ -{ unsigned long mode; - float Temp_amb; - float dRatio_heat; - float cnt_tp_heat; - float delta_T_heat; - float dT_min_heat; - float dRatio_free; - float cnt_tp_free; - float delta_T_free; - float dT_min_free; - float dRatio_cool; - float cnt_tp_cool; - float delta_T_cool; - float dT_min_cool; - float delta_T_sync_heat; - float delta_dT_sync_heat; - float cnt_wait_heat; - float delta_T_sync_free; - float delta_dT_sync_free; - float cnt_wait_free; - float delta_T_sync_cool; - float delta_dT_sync_cool; - float cnt_wait_cool; - float filter_base_T; - float delta_T_sync_stop; - float Y_heat_tune; -} lcrtemp_tune_set_typ; - -typedef struct lcrtemp_set_typ -{ plcbit enable_cooling; - plcbit disable_heating; - struct lcrtemp_pid_opt_typ PIDpara; - struct lcrtemp_tune_set_typ TuneSet; - struct lcrtemp_pid_set_typ PIDSet; - struct lcrtemp_add_typ Internal; -} lcrtemp_set_typ; - -typedef struct lcrtemp_tune_internal_typ -{ plcbit cool_tuning; - plcbit disable_heating; - unsigned long mode; - float Temp_amb; - float dRatio_heat; - float cnt_tp_heat; - float delta_T_heat; - float dT_min_heat; - float dRatio_free; - float cnt_tp_free; - float delta_T_free; - float dT_min_free; - float dRatio_cool; - float cnt_tp_cool; - float delta_T_cool; - float dT_min_cool; - float delta_T_sync_heat; - float delta_dT_sync_heat; - float cnt_wait_heat; - float delta_T_sync_free; - float delta_dT_sync_free; - float cnt_wait_free; - float delta_T_sync_cool; - float delta_dT_sync_cool; - float cnt_wait_cool; - float filter_base_T; - float t_ignore_dT_heat; - float t_ignore_dT_free; - float t_ignore_dT_cool; - float delta_T_sync_stop; -} lcrtemp_tune_internal_typ; - -typedef struct LCRScal -{ - /* VAR_INPUT (analog) */ - float x; - float x1; - float y1; - float x2; - float y2; - /* VAR_OUTPUT (analog) */ - float y; -} LCRScal_typ; - -typedef struct LCRPID -{ - /* VAR_INPUT (analog) */ - unsigned long ident; - float W; - float X; - float Y_max; - float Y_min; - float A; - float Y_man; - float Y_fbk; - unsigned char mode; - /* VAR_OUTPUT (analog) */ - unsigned short status; - float e; - float Y; - float Yp; - float Yi; - float Yd; - /* VAR (analog) */ - float Yi_set; - float Yi_min; - float Yi_max; - float Yi_minInternal; - float Yi_maxInternal; - float Tv_Tf_old; - float e_old; - unsigned short deadband_state; - struct SysInfo sysinfo_inst; - struct LCRScal scal_inst; - unsigned long store1; - unsigned long store2; - unsigned long timeCnt; - unsigned short musecs_old; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit hold_I; - /* VAR (digital) */ - plcbit Set_Yi; - plcbit force_Yi; - plcbit joltFreeDoneLowerLim; - plcbit joltFreeDoneUpperLim; - plcbit enable_old; -} LCRPID_typ; - -typedef struct LCRCurveByPoints -{ - /* VAR_INPUT (analog) */ - float x; - unsigned short NoOfPoints; - struct lcrCurveByPoints_TabEntry_type* ptr_table; - /* VAR_OUTPUT (analog) */ - unsigned short status; - float y; - /* VAR (analog) */ - signed short i_tab; - unsigned short iterations; - struct LCRScal scal1; -} LCRCurveByPoints_typ; - -typedef struct LCRPIDpara -{ - /* VAR_INPUT (analog) */ - float WX_max; - float WX_min; - float deadband; - unsigned char deadband_mode; - float dY_max; - float Kp; - float Tn; - float Tv; - float Tf; - float Kw; - float Kfbk; - unsigned char fbk_mode; - unsigned char d_mode; - /* VAR_OUTPUT (analog) */ - unsigned short status; - unsigned long ident; - /* VAR (analog) */ - struct lcrpid_internal_typ internal_data; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit enter; - plcbit invert; -} LCRPIDpara_typ; - -typedef struct LCRContinServo -{ - /* VAR_INPUT (analog) */ - float x; - float max_value; - float min_value; - float t_impulse; - float t_change_up; - float t_change_down; - /* VAR_OUTPUT (analog) */ - unsigned short status; - float hysteresis_up; - float hysteresis_down; - /* VAR (analog) */ - unsigned short counter_state; - unsigned long bootkey_old; - unsigned long systicks_old; - unsigned short musecs_old; - signed long t_cnt_1; - signed long t_cnt_2; - signed long y_dbl_1; - signed long y_dbl_2; - struct SysInfo sysInfo_inst; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit ref; - /* VAR_OUTPUT (digital) */ - plcbit up; - plcbit down; - plcbit refOk; - /* VAR (digital) */ - plcbit enable_old; - plcbit ref_old; -} LCRContinServo_typ; - -typedef struct LCRPT1 -{ - /* VAR_INPUT (analog) */ - float x; - float t; - float y_set; - /* VAR_OUTPUT (analog) */ - unsigned short status; - float y; - /* VAR (analog) */ - unsigned short counter_state; - unsigned long bootkey_old; - unsigned long systicks_old; - unsigned short musecs_old; - signed long y_dbl_1; - signed long y_dbl_2; - struct SysInfo sysinfo_inst; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit set; -} LCRPT1_typ; - -typedef struct LCRRamp -{ - /* VAR_INPUT (analog) */ - float x; - float dy_up; - float dy_down; - float y_max; - float y_min; - float y_set; - /* VAR_OUTPUT (analog) */ - unsigned short status; - float y; - /* VAR (analog) */ - signed long y_dbl_1; - signed long y_dbl_2; - unsigned long timestore1; - unsigned long timestore2; - unsigned long getDtForceOff; - struct SysInfo sysinfo_inst; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit set; - /* VAR_OUTPUT (digital) */ - plcbit x_reached; - plcbit max_limit; - plcbit min_limit; -} LCRRamp_typ; - -typedef struct LCRIntegrate -{ - /* VAR_INPUT (analog) */ - float x; - float tn; - float y_max; - float y_min; - float y_set; - /* VAR_OUTPUT (analog) */ - unsigned short status; - float y; - /* VAR (analog) */ - unsigned short counter_state; - unsigned long bootkey_old; - unsigned long systicks_old; - unsigned short musecs_old; - signed long y_dbl_1; - signed long y_dbl_2; - struct SysInfo sysinfo_inst; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit set; - /* VAR_OUTPUT (digital) */ - plcbit max_limit; - plcbit min_limit; -} LCRIntegrate_typ; - -typedef struct LCRLimit -{ - /* VAR_INPUT (analog) */ - float in; - signed long max_value; - signed long min_value; - /* VAR_OUTPUT (analog) */ - unsigned short status; - signed long out; - /* VAR_OUTPUT (digital) */ - plcbit max_limit; - plcbit min_limit; -} LCRLimit_typ; - -typedef struct LCRLimScal -{ - /* VAR_INPUT (analog) */ - float x; - float x1; - float y1; - float x2; - float y2; - /* VAR_OUTPUT (analog) */ - float y; -} LCRLimScal_typ; - -typedef struct LCRMovAvgFlt -{ - /* VAR_INPUT (analog) */ - float x; - unsigned short base; - /* VAR_OUTPUT (analog) */ - unsigned short status; - float y; - /* VAR (analog) */ - signed long sum_old_dbl_1; - signed long sum_old_dbl_2; - unsigned long p_xold; - unsigned short i_xold; - unsigned short base_old; - unsigned long bootkey_old; - /* VAR_INPUT (digital) */ - plcbit enable; - /* VAR (digital) */ - plcbit enable_old; -} LCRMovAvgFlt_typ; - -typedef struct LCRTimeBasedOnOff -{ - /* VAR_INPUT (analog) */ - float x; - float max_value; - float min_value; - float timpulse; - float tchange_up; - float tchange_down; - /* VAR_OUTPUT (analog) */ - unsigned short status; - float hysteresis_up; - float hysteresis_down; - /* VAR (analog) */ - unsigned short counter_state; - unsigned long bootkey_old; - unsigned long systicks_old; - unsigned short musecs_old; - signed long t_cnt_1; - signed long t_cnt_2; - signed long y_dbl_1; - signed long y_dbl_2; - struct SysInfo sysInfo_inst; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit ref; - /* VAR_OUTPUT (digital) */ - plcbit up; - plcbit down; - plcbit refOk; - /* VAR (digital) */ - plcbit enable_old; - plcbit ref_old; -} LCRTimeBasedOnOff_typ; - -typedef struct LCRDifferentiate -{ - /* VAR_INPUT (analog) */ - float x; - float tv; - float tf; - /* VAR_OUTPUT (analog) */ - unsigned short status; - float y; - /* VAR (analog) */ - unsigned long store1; - unsigned long store2; - unsigned long timeCnt; - unsigned short counter_state; - unsigned long bootkey_old; - unsigned long systicks_old; - unsigned short musecs_old; - struct SysInfo sysinfo_inst; - signed long a11; - signed long a12; - signed long a21; - signed long a22; - /* VAR_INPUT (digital) */ - plcbit enable; -} LCRDifferentiate_typ; - -typedef struct LCRPIDTune -{ - /* VAR_INPUT (analog) */ - float Y_min; - float Y_max; - float Y0; - float Y1; - float X0; - float X_min; - float X_max; - signed short P_manualAdjust; - signed short I_manualAdjust; - signed short D_manualAdjust; - unsigned long request; - struct lcrpid_tune_addpar_typ* pAddPar; - struct lcrpid_tune_osc_options_typ* pOptions_osc; - struct lcrpid_tune_step_options_typ* pOptions_step; - /* VAR_OUTPUT (analog) */ - unsigned short status; - unsigned short addInfo; - unsigned long ident; - unsigned short state; - /* VAR (analog) */ - float t_autotune; - unsigned short status_tmp; - unsigned short counter_state; - unsigned long bootkey_old; - unsigned long systicks_old; - unsigned short musecs_old; - float e; - float e_minAmp; - float e_old_up; - float e_old_down; - float e_old; - struct SysInfo sysinfo_inst; - struct LCRMovAvgFlt MovAvgFlt_inst; - struct lcrpid_old_typ old; - struct lcrpid_procPar_typ processPar; - struct lcrpid_internal_typ internal_data; - struct lcrpid_tune_addpar_typ addPar; - struct lcrpid_tune_osc_typ oscillation; - struct lcrpid_tune_step_typ stepresponse; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit okToStep; - /* VAR_OUTPUT (digital) */ - plcbit rdyToStep; - /* VAR (digital) */ - plcbit curveDown; - plcbit curveUp; -} LCRPIDTune_typ; - -typedef struct LCRSlimPID -{ - /* VAR_INPUT (analog) */ - float W; - float X; - unsigned long request; - struct lcrslimpid_par_typ* pPar; - /* VAR_OUTPUT (analog) */ - float e; - float Y; - unsigned short status; - unsigned short addInfo; - /* VAR (analog) */ - struct LCRMovAvgFlt MovAvgFlt_inst; - struct LCRPIDTune PIDTune_inst; - struct LCRPID PID_inst; - unsigned long requ_old; - /* VAR_INPUT (digital) */ - plcbit enable; - /* VAR (digital) */ - plcbit enable_old; -} LCRSlimPID_typ; - -typedef struct LCRPFM -{ - /* VAR_INPUT (analog) */ - float x; - float max_value; - float min_value; - float t_pulse; - float t_pause; - /* VAR_OUTPUT (analog) */ - unsigned short status; - /* VAR (analog) */ - float area; - float area_c; - float range; - float last; - float tpls; - unsigned short counter_state; - unsigned long bootkey_old; - unsigned long systicks_old; - unsigned short musecs_old; - struct SysInfo sysinfo_inst; - /* VAR_INPUT (digital) */ - plcbit enable; - /* VAR_OUTPUT (digital) */ - plcbit pulse; - /* VAR (digital) */ - plcbit enable_old; -} LCRPFM_typ; - -typedef struct LCRTt -{ - /* VAR_INPUT (analog) */ - signed long Tt; - float x; - float y_set; - /* VAR_OUTPUT (analog) */ - float y; - unsigned short status; - /* VAR (analog) */ - signed long Ts; - signed long Tt_Max; - float* pRingBuf; - float* pBuf_OutIn; - unsigned char set_old; - unsigned char Set_y; - unsigned long Bootkey; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit set; - /* VAR (digital) */ - plcbit enable_old; -} LCRTt_typ; - -typedef struct LCRPT2 -{ - /* VAR_INPUT (analog) */ - float V; - float T1; - float T2; - float x; - float y_set; - unsigned char set; - /* VAR_OUTPUT (analog) */ - float y; - unsigned short status; - /* VAR (analog) */ - unsigned long x1_dbl_1; - unsigned long x1_dbl_2; - unsigned long x2_dbl_1; - unsigned long x2_dbl_2; - signed long Ts; - unsigned long Ts_dbl_1; - unsigned long Ts_dbl_2; - unsigned char set_old; - unsigned char Set_y; - unsigned long Bootkey; - /* VAR_INPUT (digital) */ - plcbit enable; -} LCRPT2_typ; - -typedef struct LCRSimModExt -{ - /* VAR_INPUT (analog) */ - signed long Tt_h; - signed long Tt_c; - float k_h; - float k_c; - float PT2_T1; - float PT2_T2; - float Temp_amb; - float Temp_c; - float Alpha_h; - float Alpha_c; - /* VAR_OUTPUT (analog) */ - float y; - unsigned short status; - /* VAR (analog) */ - struct LCRTt Tt_heat; - struct LCRTt Tt_cool; - float k_h_intern; - float k_c_intern; - struct LCRPT2 PT2; - float y_c; - float y_end; - float y_h; - unsigned long Bootkey; - /* VAR_INPUT (digital) */ - plcbit enable; - /* VAR (digital) */ - plcbit enable_old; -} LCRSimModExt_typ; - -typedef struct LCRPT1e -{ - /* VAR_INPUT (analog) */ - float V; - float T1; - float x; - float y_set; - unsigned char set; - /* VAR_OUTPUT (analog) */ - float y; - unsigned short status; - /* VAR (analog) */ - unsigned long x1_dbl_1; - unsigned long x1_dbl_2; - signed long Ts; - unsigned long Ts_dbl_1; - unsigned long Ts_dbl_2; - unsigned char set_old; - unsigned char Set_y; - unsigned long Bootkey; - /* VAR_INPUT (digital) */ - plcbit enable; -} LCRPT1e_typ; - -typedef struct LCRDblActPID -{ - /* VAR_INPUT (analog) */ - float W; - float X; - float Y_man; - unsigned char mode; - struct lcrdblpid_par_typ* pPar1; - struct lcrdblpid_par_typ* pPar2; - struct lcrpid_tune_addpar_typ* pAddPar; - struct lcrdblpid_tune_typ* pOpt; - /* VAR_OUTPUT (analog) */ - float e; - float Y1; - float Y2; - unsigned short status; - unsigned char tuneState; - /* VAR (analog) */ - struct LCRPID pid; - struct LCRPIDTune tune; - struct SysInfo sysinfo_inst; - float gradient; - float Y_avg; - unsigned long tcnt_1; - unsigned long tcnt_2; - float Tmeas; - float y_lim_old; - float p_fact; - unsigned long bootkey_old; - unsigned long systicks_old; - unsigned short musecs_old; - unsigned char use_par; - unsigned char meas; - unsigned char mode_old; - unsigned char tune_step; - unsigned char tune_grad; - unsigned char tune_2nd; - unsigned char invert; - unsigned char counter_state; - unsigned char mode_int; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit hold_I; - plcbit okToStep; - /* VAR_OUTPUT (digital) */ - plcbit rdyToStep; - /* VAR (digital) */ - plcbit enable_old; -} LCRDblActPID_typ; - -typedef struct LCRMinMax -{ - /* VAR_INPUT (analog) */ - float in; - /* VAR_OUTPUT (analog) */ - float out_min; - float out_max; - /* VAR_INPUT (digital) */ - plcbit reset; -} LCRMinMax_typ; - -typedef struct LCRTempPID -{ - /* VAR_INPUT (analog) */ - float Temp_set; - float Temp; - float Y_man; - unsigned long mode; - struct lcrtemp_set_typ* pSettings; - /* VAR_OUTPUT (analog) */ - float y_heat; - float y_cool; - unsigned short status; - /* VAR (analog) */ - struct LCRPID pid; - struct LCRPIDpara pid_para; - float Temp_set_delay; - float Temp_set_int; - float TempSetOld; - float delayCnt; - signed char stateOld; - signed char state; - float a; - struct SysInfo sysinfo_inst; - unsigned char para_check_done; - struct lcrtemp_pid_internal_typ internal_para; - float dbl_dt; - float tAlt; - float altTime; - float tKnick; - float fAlt; - float a_alt; - float a_e; - float a_internal; - float Temp_set_int_old1; - float Temp_set_int_old2; - float Temp_set_int_old3; - unsigned long mode_old; - unsigned long timestore1; - unsigned long timestore2; - float yManInternal; - unsigned long timeCnt; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit update; - /* VAR (digital) */ - plcbit delayFlag; - plcbit enable_old; - plcbit altActive; - plcbit err_flag; -} LCRTempPID_typ; - -typedef struct LCRPT2o -{ - /* VAR_INPUT (analog) */ - float V; - float D; - float Tf; - float u; - unsigned char Set_y; - float y_set; - /* VAR_OUTPUT (analog) */ - float y; - unsigned short status; - /* VAR (analog) */ - struct lcrpt2o_Internal_typ Internal; - /* VAR_INPUT (digital) */ - plcbit enable; -} LCRPT2o_typ; - -typedef struct LCRTempTune -{ - /* VAR_INPUT (analog) */ - float Temp_set; - float Temp; - struct lcrtemp_set_typ* pSettings; - /* VAR_OUTPUT (analog) */ - float y_heat; - float y_cool; - unsigned short status; - /* VAR (analog) */ - struct LCRPID pid; - struct LCRPIDpara pid_para; - struct LCRDifferentiate DT2; - struct LCRPT2o pt2; - float Temp_flt; - unsigned short step; - float t; - float Temp_start; - float mem00; - float cnt02; - float cnt33; - float cnt20; - float pem01; - float pem33; - float pem10; - float pem02; - float pem44; - float pem20; - float tol01; - float tol10; - float tol02; - float tol20; - float tol22; - float Temp_old; - float delta_Temp; - unsigned long tcnt_1; - unsigned long tcnt_2; - unsigned long tcnt_dT_1; - unsigned long tcnt_dT_2; - struct SysInfo sysinfo_inst; - float Temp_set_internal; - float timecounter; - struct lcrtemp_tune_internal_typ internal_para; - float dbl_dt; - unsigned long call_counter; - unsigned long store1; - unsigned long store2; - unsigned long timeCnt; - float timer2; - unsigned short waitCounter; - float Y_heat_tune_intern; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit start; - plcbit okToHeat; - plcbit okToFree; - plcbit okToFreeEnd; - plcbit okToCool; - plcbit okToCoolEnd; - /* VAR_OUTPUT (digital) */ - plcbit rdyToHeat; - plcbit rdyToFree; - plcbit rdyToFreeEnd; - plcbit rdyToCool; - plcbit rdyToCoolEnd; - plcbit done; - plcbit busy; - /* VAR (digital) */ - plcbit enable_old; -} LCRTempTune_typ; - -typedef struct LCRSchedulePWM -{ - /* VAR_INPUT (analog) */ - float Pmax; - unsigned short n; - unsigned long pPar; - float min_value; - float max_value; - float t_min_pulse; - float t_period; - /* VAR_OUTPUT (analog) */ - unsigned short status; - /* VAR (analog) */ - struct SysInfo sysinfo_inst; - unsigned long store1; - unsigned long store2; - unsigned long timeCnt; - unsigned short numberUnits; - unsigned short limFact; - float Pact; - float Pman; - float intern0[6]; - struct lcrschedule_par_typ* in; - /* VAR_INPUT (digital) */ - plcbit enable; - /* VAR (digital) */ - plcbit enable_old; - plcbit cmd_delay; - plcbit err_flag; - plcbit limAll; -} LCRSchedulePWM_typ; - - - -/* Prototyping of functions and function blocks */ -_BUR_PUBLIC void LCRPID(struct LCRPID* inst); -_BUR_PUBLIC void LCRScal(struct LCRScal* inst); -_BUR_PUBLIC void LCRCurveByPoints(struct LCRCurveByPoints* inst); -_BUR_PUBLIC void LCRPIDpara(struct LCRPIDpara* inst); -_BUR_PUBLIC void LCRContinServo(struct LCRContinServo* inst); -_BUR_PUBLIC void LCRPT1(struct LCRPT1* inst); -_BUR_PUBLIC void LCRRamp(struct LCRRamp* inst); -_BUR_PUBLIC void LCRIntegrate(struct LCRIntegrate* inst); -_BUR_PUBLIC void LCRLimit(struct LCRLimit* inst); -_BUR_PUBLIC void LCRLimScal(struct LCRLimScal* inst); -_BUR_PUBLIC void LCRPWM(struct LCRPWM* inst); -_BUR_PUBLIC void LCRMovAvgFlt(struct LCRMovAvgFlt* inst); -_BUR_PUBLIC void LCRTimeBasedOnOff(struct LCRTimeBasedOnOff* inst); -_BUR_PUBLIC void LCRDifferentiate(struct LCRDifferentiate* inst); -_BUR_PUBLIC void LCRSlimPID(struct LCRSlimPID* inst); -_BUR_PUBLIC void LCRPIDTune(struct LCRPIDTune* inst); -_BUR_PUBLIC void LCRPFM(struct LCRPFM* inst); -_BUR_PUBLIC void LCRSimModExt(struct LCRSimModExt* inst); -_BUR_PUBLIC void LCRTt(struct LCRTt* inst); -_BUR_PUBLIC void LCRPT2(struct LCRPT2* inst); -_BUR_PUBLIC void LCRPT1e(struct LCRPT1e* inst); -_BUR_PUBLIC void LCRDblActPID(struct LCRDblActPID* inst); -_BUR_PUBLIC void LCRMinMax(struct LCRMinMax* inst); -_BUR_PUBLIC void LCRTempPID(struct LCRTempPID* inst); -_BUR_PUBLIC void LCRTempTune(struct LCRTempTune* inst); -_BUR_PUBLIC void LCRPT2o(struct LCRPT2o* inst); -_BUR_PUBLIC void LCRSchedulePWM(struct LCRSchedulePWM* inst); - - -#ifdef __cplusplus -}; -#endif -#endif /* _LOOPCONR_ */ - diff --git a/example/AsProject/Logical/Libraries/_AS/LoopConR/SG4/Arm/LoopConR.br b/example/AsProject/Logical/Libraries/_AS/LoopConR/SG4/Arm/LoopConR.br index 04fe924..a6bc319 100644 Binary files a/example/AsProject/Logical/Libraries/_AS/LoopConR/SG4/Arm/LoopConR.br and b/example/AsProject/Logical/Libraries/_AS/LoopConR/SG4/Arm/LoopConR.br differ diff --git a/example/AsProject/Logical/Libraries/_AS/LoopConR/SG4/Arm/libLoopConR.a b/example/AsProject/Logical/Libraries/_AS/LoopConR/SG4/Arm/libLoopConR.a index d1881dc..50b0406 100644 Binary files a/example/AsProject/Logical/Libraries/_AS/LoopConR/SG4/Arm/libLoopConR.a and b/example/AsProject/Logical/Libraries/_AS/LoopConR/SG4/Arm/libLoopConR.a differ diff --git a/example/AsProject/Logical/Libraries/_AS/LoopConR/SG4/LoopConR.br b/example/AsProject/Logical/Libraries/_AS/LoopConR/SG4/LoopConR.br index d5f3c10..a1a99aa 100644 Binary files a/example/AsProject/Logical/Libraries/_AS/LoopConR/SG4/LoopConR.br and b/example/AsProject/Logical/Libraries/_AS/LoopConR/SG4/LoopConR.br differ diff --git a/example/AsProject/Logical/Libraries/_AS/LoopConR/SG4/LoopConR.h b/example/AsProject/Logical/Libraries/_AS/LoopConR/SG4/LoopConR.h index e88fcf4..fb5c987 100644 --- a/example/AsProject/Logical/Libraries/_AS/LoopConR/SG4/LoopConR.h +++ b/example/AsProject/Logical/Libraries/_AS/LoopConR/SG4/LoopConR.h @@ -1,6 +1,6 @@ /* Automation Studio generated header file */ /* Do not edit ! */ -/* LoopConR 4.10.2 */ +/* LoopConR 6.0.0 */ #ifndef _LOOPCONR_ #define _LOOPCONR_ @@ -9,7 +9,7 @@ extern "C" { #endif #ifndef _LoopConR_VERSION -#define _LoopConR_VERSION 4.10.2 +#define _LoopConR_VERSION 6.0.0 #endif #include @@ -17,408 +17,18 @@ extern "C" #ifndef _BUR_PUBLIC #define _BUR_PUBLIC #endif -#ifdef _SG4 +#ifdef _SG3 #include "sys_lib.h" #include "brsystem.h" #endif -#ifdef _SG3 +#ifdef _SG4 #include "sys_lib.h" #include "brsystem.h" #endif #ifdef _SGC #include "sys_lib.h" #include "brsystem.h" -#endif - -/* Constants */ -#ifdef _REPLACE_CONST - #define LCRPID_TUNE_REQU_PER_5 500000U - #define LCRSLIMPID_REQU_PER_5 500000U - #define LCRSLIMPID_REQU_PER_4 400000U - #define LCRPID_TUNE_REQU_PER_4 400000U - #define LCRPID_TUNE_REQU_PER_3 300000U - #define LCRSLIMPID_REQU_PER_3 300000U - #define LCRTEMP_STEP_ERROR 65535U - #define LCR_ERR_DISABLED 65534U - #define LCR_ERR_PT2O_TF_NEG_ZERO 33154U - #define LCR_ERR_PT2O_D_NEG 33153U - #define LCR_ERR_LCRTEMPTune_DT_IGNORED 33152U - #define LCR_ERR_LCRTEMPPID_INVALID_MODE 33151U - #define LCR_ERR_LCRTEMPTune_INVALID_MODE 33150U - #define LCR_WARN_PT2O_TF_TS 33102U - #define LCR_WARN_LCRTEMPTune_ASYNC 33101U - #define LCR_WARN_LCRTEMPTune_DT_HIGH 33100U - #define LCR_ERR_SCHEDULE_N 31574U - #define LCR_ERR_SCHEDULE_P 31573U - #define LCR_ERR_LCRTEMPPID_NO_TALT 31572U - #define LCR_ERR_LCRTEMPPID_TKNICK 31571U - #define LCR_ERR_LCRTEMPTune_TASKTIME_0 31570U - #define LCR_ERR_LCRTEMPPID_ILLEGALMODE 31569U - #define LCR_ERR_LCRTEMPPID_WR_PTR 31568U - #define LCR_ERR_LCRTEMPPID_WR_PARA 31567U - #define LCR_ERR_LCRTEMPTune_WR_TSET 31567U - #define LCR_ERR_LCRTEMPTune_WR_PTR 31566U - #define LCR_ERR_LCRPIDTune_MAXMIN 31564U - #define LCR_ERR_POINTER 31563U - #define LCR_ERR_LCRDBLPID_DX_DT 31562U - #define LCR_ERR_LCRDBLPID_WX_LOW 31561U - #define LCR_ERR_LCRPIDTune_CONTROL_VAR 31560U - #define LCR_ERR_LCRPIDTune_INVALID_REQU 31559U - #define LCR_ERR_LCRPID_PAR_FBKMODE 31558U - #define LCR_ERR_LCRPID_PAR_DYMAX 31557U - #define LCR_ERR_LCRPID_PAR_DMODE 31556U - #define LCR_ERR_LCRPID_PARADAT 31554U - #define LCR_ERR_LCRPID_MODE 31553U - #define LCR_ERR_LCRPID_IDENT 31552U - #define LCR_ERR_LCRMovAvgFlt_BASE 31551U - #define LCR_ERR_LCRIntegrate_TN 31550U - #define LCRPID_TUNE_REQU_OSC_3 30000U - #define LCRSLIMPID_REQU_OSC_3 30000U - #define LCRPID_TUNE_REQU_OSC_2 20000U - #define LCRSLIMPID_REQU_OSC_2 20000U - #define LCR_ERR_LCRTT_TT_NEG 12048U - #define LCR_ERR_LCRPT12_T2_NEG 12047U - #define LCR_ERR_LCRPT12_T1_NEG 12046U - #define LCR_ERR_LCRCurveByPoints_TABLE 12045U - #define LCR_ERR_LCRPID_PAR_DEADBAND 12044U - #define LCR_ERR_LCRPID_PAR_WX_MAXMIN 12043U - #define LCR_ERR_LCRPID_PAR_DEADBAND_MODE 12042U - #define LCR_ERR_LCRPIDTune_W_CHANGED 12041U - #define LCR_ERR_LCRPIDTune_TIMEOUT 12040U - #define LCR_ERR_LCRPIDTune_PARAMETER 12039U - #define LCR_ERR_LCRPIDTune_ABORT 12038U - #define LCR_ERR_MAXMIN 12037U - #define LCR_ERR_LCRContinServo_TIMPULSE 12036U - #define LCR_ERR_LCRContinServo_TCHANGE 12035U - #define LCR_ERR_LCRRamp_DYUP_DYDOWN 12034U - #define LCR_ERR_LCRPWM_TPERIOD 12033U - #define LCR_ERR_LCRPWM_TPULSE 12033U - #define LCR_ERR_LCRPWM_TMINPULSE 12032U - #define LCR_ERR_LCRPT1_T 12031U - #define LCR_ERR_LCRPID_PAR_TV 12030U - #define LCR_ERR_LCRPID_PAR_TN 12029U - #define LCR_ERR_LCRPID_PAR_TF 12028U - #define LCR_ERR_LCRPID_PAR_KW 12027U - #define LCR_ERR_LCRPID_PAR_KP 12026U - #define LCR_ERROR 12025U - #define LCR_ERR_LCRPID_PAR_KFBK 12025U - #define LCR_WARN_LCRTEMPPID_WR_PARA 12024U - #define LCR_WARN_LCRTEMPTune_WR_BASE 12023U - #define LCR_WARN_LCRTEMPTune_WR_PARA 12022U - #define LCR_WARN_LCRTEMPTune_HEAT_TP 12021U - #define LCR_WARN_LCRDBLPID_TUNE_CHANGE 12019U - #define LCR_WARN_LCRTT_MEM 12018U - #define LCR_WARN_LCRTT_TT_INT 12017U - #define LCR_WARN_LCRTT_TT_TS 12016U - #define LCR_WARN_LCRTT_TT_ZERO 12015U - #define LCR_WARN_LCRPT12_T2_INT 12014U - #define LCR_WARN_LCRPT12_T2_TS 12013U - #define LCR_WARN_LCRPT12_T2_ZERO 12012U - #define LCR_WARN_LCRPT12_T1_INT 12011U - #define LCR_WARN_LCRPT12_T1_TS 12010U - #define LCR_WARN_LCRPID_YMAN_LIMIT 12009U - #define LCR_WARN_LCRPID_A_LIMIT 12008U - #define LCR_WARN_Tx_DT 12007U - #define LCR_WARN_LCRPT12_T1_ZERO 12005U - #define LCR_WARN_LCRPIDTune_CYCLETIME 12004U - #define LCR_WARN_LCRPID_YFBK_LIMIT 12003U - #define LCR_WARN_LCRPID_I_MINLIMIT 12002U - #define LCR_WARN_LCRPID_I_MAXLIMIT 12001U - #define LCRSLIMPID_REQU_OSC_1 10000U - #define LCRPID_TUNE_REQU_OSC_1 10000U - #define LCRSLIMPID_REQU_CHR_REF_OS 5000U - #define LCRPID_TUNE_REQU_CHR_REF_OS 5000U - #define LCRSLIMPID_REQU_CHR_REF_AP 4000U - #define LCRPID_TUNE_REQU_CHR_REF_AP 4000U - #define LCRPID_TUNE_REQU_ZN_DIST 3000U - #define LCRSLIMPID_REQU_ZN_DIST 3000U - #define LCRPID_TUNE_REQU_CHR_DIST_OS 2000U - #define LCRSLIMPID_REQU_CHR_DIST_OS 2000U - #define LCRPID_TUNE_REQU_CHR_DIST_AP 1000U - #define LCRSLIMPID_REQU_CHR_DIST_AP 1000U - #define LCRSLIMPID_REQU_P 300U - #define LCRPID_TUNE_REQU_P 300U - #define LCRSLIMPID_REQU_PI 200U - #define LCRPID_TUNE_REQU_PI 200U - #define LCRTEMP_STEP_DONE 130U - #define LCRTEMP_STEP_PID_DONE 125U - #define LCRTEMP_STEP_PID_DONE_COOLONLY 122U - #define LCRTEMP_STEP_COOL 120U - #define LCRPID_TUNE_ADDINFO_OSC_PERIOD 111U - #define LCRTEMP_STEP_START_COOL 110U - #define LCRTEMP_STEP_WAIT_COOLONLY 105U - #define LCRPID_MODE_FREEZE_JOLTFREE 105U - #define LCRPID_MODE_CLOSE_JOLTFREE 104U - #define LCRPID_MODE_OPEN_JOLTFREE 103U - #define LCRPID_MODE_MAN_JOLTFREE 102U - #define LCRTEMP_STEP_WAIT_COOL 100U - #define LCRPID_TUNE_REQU_PID 100U - #define LCRSLIMPID_REQU_PID 100U - #define LCRTEMP_STEP_PID_COOL 90U - #define LCRTEMP_STEP_PID 80U - #define LCRTEMP_STEP_FREE 70U - #define LCRTEMP_STEP_START_FREE 60U - #define LCRTEMP_STEP_WAIT_FREE 50U - #define LCRPID_TUNE_STATE_FINISHED 50U - #define LCRPID_TUNE_STATE_RESET_CNTL 49U - #define LCRPID_TUNE_STATE_CALC_PARA 45U - #define LCRTEMP_STEP_PID_FREE 40U - #define LCRTEMP_STEP_HEAT 30U - #define LCRPID_TUNE_STATE_STEP_WAITEQ2 22U - #define LCRPID_TUNE_STATE_STEP_MAXGRAD 21U - #define LCRSLIMPID_REQU_DIR_NEG 20U - #define LCRTEMP_STEP_START_HEAT 20U - #define LCRPID_TUNE_STATE_STEP_WAITEQ1 20U - #define LCRPID_TUNE_REQU_DIR_NEG 20U - #define LCRPID_TUNE_STATE_OSC_CNTLPAR 19U - #define LCRPID_TUNE_STATE_OSC_PERFORM_2 13U - #define LCRPID_TUNE_STATE_OSC_PERFORM_1 12U - #define LCRPID_TUNE_STATE_OSC_SEQ_CNTL 11U - #define LCRTEMP_STEP_WAIT_HEAT 10U - #define LCRSLIMPID_REQU_DIR_POS 10U - #define LCRPID_TUNE_STATE_OSCILLATE 10U - #define LCRPID_TUNE_REQU_DIR_POS 10U - #define LCRDBLPID_MODE_TUNE_Y2 9U - #define LCRDBLPID_MODE_TUNE_Y1 8U - #define LCRDBLPID_MODE_TUNE_6 7U - #define LCRDBLPID_MODE_TUNE_4 6U - #define LCRPID_FBK_MODE_SET_YI 5U - #define LCRPID_MODE_FREEZE 5U - #define LCRTEMP_STEP_WAIT 5U - #define LCRSLIMPID_REQU_WRITE_PARAS 4U - #define LCRPID_MODE_CLOSE 4U - #define LCRPID_FBK_MODE_LIMIT_YI 4U - #define LCRDBLPID_TSTATE_ERROR 4U - #define LCRPID_FBK_MODE_EXT_SELECTOR 3U - #define LCRSLIMPID_REQU_READ_PARAS 3U - #define LCRDBLPID_TSTATE_FINISHED 3U - #define LCRPID_MODE_OPEN 3U - #define LCRPID_TUNE_REQU_STEPRESPONSE 2U - #define LCRPID_FBK_MODE_EXTERN 2U - #define LCRPID_MODE_MAN 2U - #define LCRSLIMPID_REQU_STEPRESPONSE 2U - #define LCRPID_D_MODE_E 2U - #define LCRDBLPID_TSTATE_Y2 2U - #define LCRTEMPPID_MODE_MAN 2U - #define LCRPID_DEADBAND_MODE_STANDARD_I 2U - #define LCRSLIMPID_REQU_OSCILLATE 1U - #define LCRTEMP_COOL 1U - #define LCRTEMP_PT2 1U - #define LCRTEMP_HYST_MODE_JOLTFREE 1U - #define LCRTEMPPID_MODE_AUTO 1U - #define LCRPID_TUNE_REQU_OSCILLATE 1U - #define LCRDBLPID_TSTATE_Y1 1U - #define LCRPID_FBK_MODE_INTERN 1U - #define LCRPID_DEADBAND_MODE_STANDARD 1U - #define LCRPID_D_MODE_X 1U - #define LCRPID_MODE_AUTO 1U - #define LCRTEMPTune_MODE_EXP 1U - #define LCRPID_TUNE_REQU_OFF 0U - #define LCRDBLPID_TSTATE_OFF 0U - #define LCRTEMPTune_MODE_DEF 0U - #define LCRTEMP_PT1 0U - #define LCRSLIMPID_REQU_OFF 0U - #define LCRPID_TUNE_STATE_READY 0U - #define LCRPID_MODE_OFF 0U - #define LCRTEMP_HEAT 0U - #define LCRPID_DEADBAND_MODE_ZERO 0U -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_PER_5; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_PER_5; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_PER_4; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_PER_4; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_PER_3; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_PER_3; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_ERROR; - _GLOBAL_CONST unsigned short LCR_ERR_DISABLED; - _GLOBAL_CONST unsigned short LCR_ERR_PT2O_TF_NEG_ZERO; - _GLOBAL_CONST unsigned short LCR_ERR_PT2O_D_NEG; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPTune_DT_IGNORED; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPPID_INVALID_MODE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPTune_INVALID_MODE; - _GLOBAL_CONST unsigned short LCR_WARN_PT2O_TF_TS; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTEMPTune_ASYNC; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTEMPTune_DT_HIGH; - _GLOBAL_CONST unsigned short LCR_ERR_SCHEDULE_N; - _GLOBAL_CONST unsigned short LCR_ERR_SCHEDULE_P; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPPID_NO_TALT; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPPID_TKNICK; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPTune_TASKTIME_0; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPPID_ILLEGALMODE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPPID_WR_PTR; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPPID_WR_PARA; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPTune_WR_TSET; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPTune_WR_PTR; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPIDTune_MAXMIN; - _GLOBAL_CONST unsigned short LCR_ERR_POINTER; - _GLOBAL_CONST unsigned short LCR_ERR_LCRDBLPID_DX_DT; - _GLOBAL_CONST unsigned short LCR_ERR_LCRDBLPID_WX_LOW; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPIDTune_CONTROL_VAR; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPIDTune_INVALID_REQU; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_FBKMODE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_DYMAX; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_DMODE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PARADAT; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_MODE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_IDENT; - _GLOBAL_CONST unsigned short LCR_ERR_LCRMovAvgFlt_BASE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRIntegrate_TN; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_OSC_3; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_OSC_3; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_OSC_2; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_OSC_2; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTT_TT_NEG; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPT12_T2_NEG; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPT12_T1_NEG; - _GLOBAL_CONST unsigned short LCR_ERR_LCRCurveByPoints_TABLE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_DEADBAND; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_WX_MAXMIN; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_DEADBAND_MODE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPIDTune_W_CHANGED; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPIDTune_TIMEOUT; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPIDTune_PARAMETER; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPIDTune_ABORT; - _GLOBAL_CONST unsigned short LCR_ERR_MAXMIN; - _GLOBAL_CONST unsigned short LCR_ERR_LCRContinServo_TIMPULSE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRContinServo_TCHANGE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRRamp_DYUP_DYDOWN; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPWM_TPERIOD; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPWM_TPULSE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPWM_TMINPULSE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPT1_T; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_TV; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_TN; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_TF; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_KW; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_KP; - _GLOBAL_CONST unsigned short LCR_ERROR; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_KFBK; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTEMPPID_WR_PARA; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTEMPTune_WR_BASE; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTEMPTune_WR_PARA; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTEMPTune_HEAT_TP; - _GLOBAL_CONST unsigned short LCR_WARN_LCRDBLPID_TUNE_CHANGE; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTT_MEM; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTT_TT_INT; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTT_TT_TS; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTT_TT_ZERO; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPT12_T2_INT; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPT12_T2_TS; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPT12_T2_ZERO; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPT12_T1_INT; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPT12_T1_TS; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPID_YMAN_LIMIT; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPID_A_LIMIT; - _GLOBAL_CONST unsigned short LCR_WARN_Tx_DT; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPT12_T1_ZERO; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPIDTune_CYCLETIME; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPID_YFBK_LIMIT; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPID_I_MINLIMIT; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPID_I_MAXLIMIT; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_OSC_1; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_OSC_1; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_CHR_REF_OS; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_CHR_REF_OS; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_CHR_REF_AP; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_CHR_REF_AP; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_ZN_DIST; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_ZN_DIST; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_CHR_DIST_OS; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_CHR_DIST_OS; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_CHR_DIST_AP; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_CHR_DIST_AP; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_P; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_P; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_PI; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_PI; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_DONE; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_PID_DONE; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_PID_DONE_COOLONLY; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_COOL; - _GLOBAL_CONST unsigned short LCRPID_TUNE_ADDINFO_OSC_PERIOD; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_START_COOL; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_WAIT_COOLONLY; - _GLOBAL_CONST unsigned char LCRPID_MODE_FREEZE_JOLTFREE; - _GLOBAL_CONST unsigned char LCRPID_MODE_CLOSE_JOLTFREE; - _GLOBAL_CONST unsigned char LCRPID_MODE_OPEN_JOLTFREE; - _GLOBAL_CONST unsigned char LCRPID_MODE_MAN_JOLTFREE; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_WAIT_COOL; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_PID; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_PID; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_PID_COOL; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_PID; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_FREE; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_START_FREE; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_WAIT_FREE; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_FINISHED; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_RESET_CNTL; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_CALC_PARA; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_PID_FREE; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_HEAT; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_STEP_WAITEQ2; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_STEP_MAXGRAD; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_DIR_NEG; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_START_HEAT; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_STEP_WAITEQ1; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_DIR_NEG; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_OSC_CNTLPAR; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_OSC_PERFORM_2; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_OSC_PERFORM_1; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_OSC_SEQ_CNTL; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_WAIT_HEAT; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_DIR_POS; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_OSCILLATE; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_DIR_POS; - _GLOBAL_CONST unsigned char LCRDBLPID_MODE_TUNE_Y2; - _GLOBAL_CONST unsigned char LCRDBLPID_MODE_TUNE_Y1; - _GLOBAL_CONST unsigned char LCRDBLPID_MODE_TUNE_6; - _GLOBAL_CONST unsigned char LCRDBLPID_MODE_TUNE_4; - _GLOBAL_CONST unsigned char LCRPID_FBK_MODE_SET_YI; - _GLOBAL_CONST unsigned char LCRPID_MODE_FREEZE; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_WAIT; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_WRITE_PARAS; - _GLOBAL_CONST unsigned char LCRPID_MODE_CLOSE; - _GLOBAL_CONST unsigned char LCRPID_FBK_MODE_LIMIT_YI; - _GLOBAL_CONST unsigned char LCRDBLPID_TSTATE_ERROR; - _GLOBAL_CONST unsigned char LCRPID_FBK_MODE_EXT_SELECTOR; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_READ_PARAS; - _GLOBAL_CONST unsigned char LCRDBLPID_TSTATE_FINISHED; - _GLOBAL_CONST unsigned char LCRPID_MODE_OPEN; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_STEPRESPONSE; - _GLOBAL_CONST unsigned char LCRPID_FBK_MODE_EXTERN; - _GLOBAL_CONST unsigned char LCRPID_MODE_MAN; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_STEPRESPONSE; - _GLOBAL_CONST unsigned char LCRPID_D_MODE_E; - _GLOBAL_CONST unsigned char LCRDBLPID_TSTATE_Y2; - _GLOBAL_CONST unsigned long LCRTEMPPID_MODE_MAN; - _GLOBAL_CONST unsigned char LCRPID_DEADBAND_MODE_STANDARD_I; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_OSCILLATE; - _GLOBAL_CONST unsigned char LCRTEMP_COOL; - _GLOBAL_CONST unsigned char LCRTEMP_PT2; - _GLOBAL_CONST unsigned char LCRTEMP_HYST_MODE_JOLTFREE; - _GLOBAL_CONST unsigned long LCRTEMPPID_MODE_AUTO; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_OSCILLATE; - _GLOBAL_CONST unsigned char LCRDBLPID_TSTATE_Y1; - _GLOBAL_CONST unsigned char LCRPID_FBK_MODE_INTERN; - _GLOBAL_CONST unsigned char LCRPID_DEADBAND_MODE_STANDARD; - _GLOBAL_CONST unsigned char LCRPID_D_MODE_X; - _GLOBAL_CONST unsigned char LCRPID_MODE_AUTO; - _GLOBAL_CONST unsigned long LCRTEMPTune_MODE_EXP; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_OFF; - _GLOBAL_CONST unsigned char LCRDBLPID_TSTATE_OFF; - _GLOBAL_CONST unsigned long LCRTEMPTune_MODE_DEF; - _GLOBAL_CONST unsigned char LCRTEMP_PT1; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_OFF; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_READY; - _GLOBAL_CONST unsigned char LCRPID_MODE_OFF; - _GLOBAL_CONST unsigned char LCRTEMP_HEAT; - _GLOBAL_CONST unsigned char LCRPID_DEADBAND_MODE_ZERO; -#endif - - +#endif /* Datatypes and datatypes of function blocks */ @@ -1670,6 +1280,394 @@ _BUR_PUBLIC void LCRPT2o(struct LCRPT2o* inst); _BUR_PUBLIC void LCRSchedulePWM(struct LCRSchedulePWM* inst); +/* Constants */ +#ifdef _REPLACE_CONST + #define LCRPID_TUNE_REQU_PER_5 500000U + #define LCRSLIMPID_REQU_PER_5 500000U + #define LCRSLIMPID_REQU_PER_4 400000U + #define LCRPID_TUNE_REQU_PER_4 400000U + #define LCRPID_TUNE_REQU_PER_3 300000U + #define LCRSLIMPID_REQU_PER_3 300000U + #define LCRTEMP_STEP_ERROR 65535U + #define LCR_ERR_DISABLED 65534U + #define LCR_ERR_PT2O_TF_NEG_ZERO 33154U + #define LCR_ERR_PT2O_D_NEG 33153U + #define LCR_ERR_LCRTEMPTune_DT_IGNORED 33152U + #define LCR_ERR_LCRTEMPPID_INVALID_MODE 33151U + #define LCR_ERR_LCRTEMPTune_INVALID_MODE 33150U + #define LCR_WARN_PT2O_TF_TS 33102U + #define LCR_WARN_LCRTEMPTune_ASYNC 33101U + #define LCR_WARN_LCRTEMPTune_DT_HIGH 33100U + #define LCR_ERR_SCHEDULE_N 31574U + #define LCR_ERR_SCHEDULE_P 31573U + #define LCR_ERR_LCRTEMPPID_NO_TALT 31572U + #define LCR_ERR_LCRTEMPPID_TKNICK 31571U + #define LCR_ERR_LCRTEMPTune_TASKTIME_0 31570U + #define LCR_ERR_LCRTEMPPID_ILLEGALMODE 31569U + #define LCR_ERR_LCRTEMPPID_WR_PTR 31568U + #define LCR_ERR_LCRTEMPPID_WR_PARA 31567U + #define LCR_ERR_LCRTEMPTune_WR_TSET 31567U + #define LCR_ERR_LCRTEMPTune_WR_PTR 31566U + #define LCR_ERR_LCRPIDTune_MAXMIN 31564U + #define LCR_ERR_POINTER 31563U + #define LCR_ERR_LCRDBLPID_DX_DT 31562U + #define LCR_ERR_LCRDBLPID_WX_LOW 31561U + #define LCR_ERR_LCRPIDTune_CONTROL_VAR 31560U + #define LCR_ERR_LCRPIDTune_INVALID_REQU 31559U + #define LCR_ERR_LCRPID_PAR_FBKMODE 31558U + #define LCR_ERR_LCRPID_PAR_DYMAX 31557U + #define LCR_ERR_LCRPID_PAR_DMODE 31556U + #define LCR_ERR_LCRPID_PARADAT 31554U + #define LCR_ERR_LCRPID_MODE 31553U + #define LCR_ERR_LCRPID_IDENT 31552U + #define LCR_ERR_LCRMovAvgFlt_BASE 31551U + #define LCR_ERR_LCRIntegrate_TN 31550U + #define LCRPID_TUNE_REQU_OSC_3 30000U + #define LCRSLIMPID_REQU_OSC_3 30000U + #define LCRPID_TUNE_REQU_OSC_2 20000U + #define LCRSLIMPID_REQU_OSC_2 20000U + #define LCR_ERR_LCRTT_TT_NEG 12048U + #define LCR_ERR_LCRPT12_T2_NEG 12047U + #define LCR_ERR_LCRPT12_T1_NEG 12046U + #define LCR_ERR_LCRCurveByPoints_TABLE 12045U + #define LCR_ERR_LCRPID_PAR_DEADBAND 12044U + #define LCR_ERR_LCRPID_PAR_WX_MAXMIN 12043U + #define LCR_ERR_LCRPID_PAR_DEADBAND_MODE 12042U + #define LCR_ERR_LCRPIDTune_W_CHANGED 12041U + #define LCR_ERR_LCRPIDTune_TIMEOUT 12040U + #define LCR_ERR_LCRPIDTune_PARAMETER 12039U + #define LCR_ERR_LCRPIDTune_ABORT 12038U + #define LCR_ERR_MAXMIN 12037U + #define LCR_ERR_LCRContinServo_TIMPULSE 12036U + #define LCR_ERR_LCRContinServo_TCHANGE 12035U + #define LCR_ERR_LCRRamp_DYUP_DYDOWN 12034U + #define LCR_ERR_LCRPWM_TPERIOD 12033U + #define LCR_ERR_LCRPWM_TPULSE 12033U + #define LCR_ERR_LCRPWM_TMINPULSE 12032U + #define LCR_ERR_LCRPT1_T 12031U + #define LCR_ERR_LCRPID_PAR_TV 12030U + #define LCR_ERR_LCRPID_PAR_TN 12029U + #define LCR_ERR_LCRPID_PAR_TF 12028U + #define LCR_ERR_LCRPID_PAR_KW 12027U + #define LCR_ERR_LCRPID_PAR_KP 12026U + #define LCR_ERROR 12025U + #define LCR_ERR_LCRPID_PAR_KFBK 12025U + #define LCR_WARN_LCRTEMPPID_WR_PARA 12024U + #define LCR_WARN_LCRTEMPTune_WR_BASE 12023U + #define LCR_WARN_LCRTEMPTune_WR_PARA 12022U + #define LCR_WARN_LCRTEMPTune_HEAT_TP 12021U + #define LCR_WARN_LCRDBLPID_TUNE_CHANGE 12019U + #define LCR_WARN_LCRTT_MEM 12018U + #define LCR_WARN_LCRTT_TT_INT 12017U + #define LCR_WARN_LCRTT_TT_TS 12016U + #define LCR_WARN_LCRTT_TT_ZERO 12015U + #define LCR_WARN_LCRPT12_T2_INT 12014U + #define LCR_WARN_LCRPT12_T2_TS 12013U + #define LCR_WARN_LCRPT12_T2_ZERO 12012U + #define LCR_WARN_LCRPT12_T1_INT 12011U + #define LCR_WARN_LCRPT12_T1_TS 12010U + #define LCR_WARN_LCRPID_YMAN_LIMIT 12009U + #define LCR_WARN_LCRPID_A_LIMIT 12008U + #define LCR_WARN_Tx_DT 12007U + #define LCR_WARN_LCRPT12_T1_ZERO 12005U + #define LCR_WARN_LCRPIDTune_CYCLETIME 12004U + #define LCR_WARN_LCRPID_YFBK_LIMIT 12003U + #define LCR_WARN_LCRPID_I_MINLIMIT 12002U + #define LCR_WARN_LCRPID_I_MAXLIMIT 12001U + #define LCRSLIMPID_REQU_OSC_1 10000U + #define LCRPID_TUNE_REQU_OSC_1 10000U + #define LCRSLIMPID_REQU_CHR_REF_OS 5000U + #define LCRPID_TUNE_REQU_CHR_REF_OS 5000U + #define LCRSLIMPID_REQU_CHR_REF_AP 4000U + #define LCRPID_TUNE_REQU_CHR_REF_AP 4000U + #define LCRPID_TUNE_REQU_ZN_DIST 3000U + #define LCRSLIMPID_REQU_ZN_DIST 3000U + #define LCRPID_TUNE_REQU_CHR_DIST_OS 2000U + #define LCRSLIMPID_REQU_CHR_DIST_OS 2000U + #define LCRPID_TUNE_REQU_CHR_DIST_AP 1000U + #define LCRSLIMPID_REQU_CHR_DIST_AP 1000U + #define LCRSLIMPID_REQU_P 300U + #define LCRPID_TUNE_REQU_P 300U + #define LCRSLIMPID_REQU_PI 200U + #define LCRPID_TUNE_REQU_PI 200U + #define LCRTEMP_STEP_DONE 130U + #define LCRTEMP_STEP_PID_DONE 125U + #define LCRTEMP_STEP_PID_DONE_COOLONLY 122U + #define LCRTEMP_STEP_COOL 120U + #define LCRPID_TUNE_ADDINFO_OSC_PERIOD 111U + #define LCRTEMP_STEP_START_COOL 110U + #define LCRTEMP_STEP_WAIT_COOLONLY 105U + #define LCRPID_MODE_FREEZE_JOLTFREE 105U + #define LCRPID_MODE_CLOSE_JOLTFREE 104U + #define LCRPID_MODE_OPEN_JOLTFREE 103U + #define LCRPID_MODE_MAN_JOLTFREE 102U + #define LCRTEMP_STEP_WAIT_COOL 100U + #define LCRPID_TUNE_REQU_PID 100U + #define LCRSLIMPID_REQU_PID 100U + #define LCRTEMP_STEP_PID_COOL 90U + #define LCRTEMP_STEP_PID 80U + #define LCRTEMP_STEP_FREE 70U + #define LCRTEMP_STEP_START_FREE 60U + #define LCRTEMP_STEP_WAIT_FREE 50U + #define LCRPID_TUNE_STATE_FINISHED 50U + #define LCRPID_TUNE_STATE_RESET_CNTL 49U + #define LCRPID_TUNE_STATE_CALC_PARA 45U + #define LCRTEMP_STEP_PID_FREE 40U + #define LCRTEMP_STEP_HEAT 30U + #define LCRPID_TUNE_STATE_STEP_WAITEQ2 22U + #define LCRPID_TUNE_STATE_STEP_MAXGRAD 21U + #define LCRSLIMPID_REQU_DIR_NEG 20U + #define LCRTEMP_STEP_START_HEAT 20U + #define LCRPID_TUNE_STATE_STEP_WAITEQ1 20U + #define LCRPID_TUNE_REQU_DIR_NEG 20U + #define LCRPID_TUNE_STATE_OSC_CNTLPAR 19U + #define LCRPID_TUNE_STATE_OSC_PERFORM_2 13U + #define LCRPID_TUNE_STATE_OSC_PERFORM_1 12U + #define LCRPID_TUNE_STATE_OSC_SEQ_CNTL 11U + #define LCRTEMP_STEP_WAIT_HEAT 10U + #define LCRSLIMPID_REQU_DIR_POS 10U + #define LCRPID_TUNE_STATE_OSCILLATE 10U + #define LCRPID_TUNE_REQU_DIR_POS 10U + #define LCRDBLPID_MODE_TUNE_Y2 9U + #define LCRDBLPID_MODE_TUNE_Y1 8U + #define LCRDBLPID_MODE_TUNE_6 7U + #define LCRDBLPID_MODE_TUNE_4 6U + #define LCRPID_FBK_MODE_SET_YI 5U + #define LCRPID_MODE_FREEZE 5U + #define LCRTEMP_STEP_WAIT 5U + #define LCRSLIMPID_REQU_WRITE_PARAS 4U + #define LCRPID_MODE_CLOSE 4U + #define LCRPID_FBK_MODE_LIMIT_YI 4U + #define LCRDBLPID_TSTATE_ERROR 4U + #define LCRPID_FBK_MODE_EXT_SELECTOR 3U + #define LCRSLIMPID_REQU_READ_PARAS 3U + #define LCRDBLPID_TSTATE_FINISHED 3U + #define LCRPID_MODE_OPEN 3U + #define LCRPID_TUNE_REQU_STEPRESPONSE 2U + #define LCRPID_FBK_MODE_EXTERN 2U + #define LCRPID_MODE_MAN 2U + #define LCRSLIMPID_REQU_STEPRESPONSE 2U + #define LCRPID_D_MODE_E 2U + #define LCRDBLPID_TSTATE_Y2 2U + #define LCRTEMPPID_MODE_MAN 2U + #define LCRPID_DEADBAND_MODE_STANDARD_I 2U + #define LCRSLIMPID_REQU_OSCILLATE 1U + #define LCRTEMP_COOL 1U + #define LCRTEMP_PT2 1U + #define LCRTEMP_HYST_MODE_JOLTFREE 1U + #define LCRTEMPPID_MODE_AUTO 1U + #define LCRPID_TUNE_REQU_OSCILLATE 1U + #define LCRDBLPID_TSTATE_Y1 1U + #define LCRPID_FBK_MODE_INTERN 1U + #define LCRPID_DEADBAND_MODE_STANDARD 1U + #define LCRPID_D_MODE_X 1U + #define LCRPID_MODE_AUTO 1U + #define LCRTEMPTune_MODE_EXP 1U + #define LCRPID_TUNE_REQU_OFF 0U + #define LCRDBLPID_TSTATE_OFF 0U + #define LCRTEMPTune_MODE_DEF 0U + #define LCRTEMP_PT1 0U + #define LCRSLIMPID_REQU_OFF 0U + #define LCRPID_TUNE_STATE_READY 0U + #define LCRPID_MODE_OFF 0U + #define LCRTEMP_HEAT 0U + #define LCRPID_DEADBAND_MODE_ZERO 0U +#else + _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_PER_5; + _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_PER_5; + _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_PER_4; + _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_PER_4; + _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_PER_3; + _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_PER_3; + _GLOBAL_CONST unsigned short LCRTEMP_STEP_ERROR; + _GLOBAL_CONST unsigned short LCR_ERR_DISABLED; + _GLOBAL_CONST unsigned short LCR_ERR_PT2O_TF_NEG_ZERO; + _GLOBAL_CONST unsigned short LCR_ERR_PT2O_D_NEG; + _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPTune_DT_IGNORED; + _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPPID_INVALID_MODE; + _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPTune_INVALID_MODE; + _GLOBAL_CONST unsigned short LCR_WARN_PT2O_TF_TS; + _GLOBAL_CONST unsigned short LCR_WARN_LCRTEMPTune_ASYNC; + _GLOBAL_CONST unsigned short LCR_WARN_LCRTEMPTune_DT_HIGH; + _GLOBAL_CONST unsigned short LCR_ERR_SCHEDULE_N; + _GLOBAL_CONST unsigned short LCR_ERR_SCHEDULE_P; + _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPPID_NO_TALT; + _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPPID_TKNICK; + _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPTune_TASKTIME_0; + _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPPID_ILLEGALMODE; + _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPPID_WR_PTR; + _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPPID_WR_PARA; + _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPTune_WR_TSET; + _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPTune_WR_PTR; + _GLOBAL_CONST unsigned short LCR_ERR_LCRPIDTune_MAXMIN; + _GLOBAL_CONST unsigned short LCR_ERR_POINTER; + _GLOBAL_CONST unsigned short LCR_ERR_LCRDBLPID_DX_DT; + _GLOBAL_CONST unsigned short LCR_ERR_LCRDBLPID_WX_LOW; + _GLOBAL_CONST unsigned short LCR_ERR_LCRPIDTune_CONTROL_VAR; + _GLOBAL_CONST unsigned short LCR_ERR_LCRPIDTune_INVALID_REQU; + _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_FBKMODE; + _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_DYMAX; + _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_DMODE; + _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PARADAT; + _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_MODE; + _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_IDENT; + _GLOBAL_CONST unsigned short LCR_ERR_LCRMovAvgFlt_BASE; + _GLOBAL_CONST unsigned short LCR_ERR_LCRIntegrate_TN; + _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_OSC_3; + _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_OSC_3; + _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_OSC_2; + _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_OSC_2; + _GLOBAL_CONST unsigned short LCR_ERR_LCRTT_TT_NEG; + _GLOBAL_CONST unsigned short LCR_ERR_LCRPT12_T2_NEG; + _GLOBAL_CONST unsigned short LCR_ERR_LCRPT12_T1_NEG; + _GLOBAL_CONST unsigned short LCR_ERR_LCRCurveByPoints_TABLE; + _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_DEADBAND; + _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_WX_MAXMIN; + _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_DEADBAND_MODE; + _GLOBAL_CONST unsigned short LCR_ERR_LCRPIDTune_W_CHANGED; + _GLOBAL_CONST unsigned short LCR_ERR_LCRPIDTune_TIMEOUT; + _GLOBAL_CONST unsigned short LCR_ERR_LCRPIDTune_PARAMETER; + _GLOBAL_CONST unsigned short LCR_ERR_LCRPIDTune_ABORT; + _GLOBAL_CONST unsigned short LCR_ERR_MAXMIN; + _GLOBAL_CONST unsigned short LCR_ERR_LCRContinServo_TIMPULSE; + _GLOBAL_CONST unsigned short LCR_ERR_LCRContinServo_TCHANGE; + _GLOBAL_CONST unsigned short LCR_ERR_LCRRamp_DYUP_DYDOWN; + _GLOBAL_CONST unsigned short LCR_ERR_LCRPWM_TPERIOD; + _GLOBAL_CONST unsigned short LCR_ERR_LCRPWM_TPULSE; + _GLOBAL_CONST unsigned short LCR_ERR_LCRPWM_TMINPULSE; + _GLOBAL_CONST unsigned short LCR_ERR_LCRPT1_T; + _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_TV; + _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_TN; + _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_TF; + _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_KW; + _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_KP; + _GLOBAL_CONST unsigned short LCR_ERROR; + _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_KFBK; + _GLOBAL_CONST unsigned short LCR_WARN_LCRTEMPPID_WR_PARA; + _GLOBAL_CONST unsigned short LCR_WARN_LCRTEMPTune_WR_BASE; + _GLOBAL_CONST unsigned short LCR_WARN_LCRTEMPTune_WR_PARA; + _GLOBAL_CONST unsigned short LCR_WARN_LCRTEMPTune_HEAT_TP; + _GLOBAL_CONST unsigned short LCR_WARN_LCRDBLPID_TUNE_CHANGE; + _GLOBAL_CONST unsigned short LCR_WARN_LCRTT_MEM; + _GLOBAL_CONST unsigned short LCR_WARN_LCRTT_TT_INT; + _GLOBAL_CONST unsigned short LCR_WARN_LCRTT_TT_TS; + _GLOBAL_CONST unsigned short LCR_WARN_LCRTT_TT_ZERO; + _GLOBAL_CONST unsigned short LCR_WARN_LCRPT12_T2_INT; + _GLOBAL_CONST unsigned short LCR_WARN_LCRPT12_T2_TS; + _GLOBAL_CONST unsigned short LCR_WARN_LCRPT12_T2_ZERO; + _GLOBAL_CONST unsigned short LCR_WARN_LCRPT12_T1_INT; + _GLOBAL_CONST unsigned short LCR_WARN_LCRPT12_T1_TS; + _GLOBAL_CONST unsigned short LCR_WARN_LCRPID_YMAN_LIMIT; + _GLOBAL_CONST unsigned short LCR_WARN_LCRPID_A_LIMIT; + _GLOBAL_CONST unsigned short LCR_WARN_Tx_DT; + _GLOBAL_CONST unsigned short LCR_WARN_LCRPT12_T1_ZERO; + _GLOBAL_CONST unsigned short LCR_WARN_LCRPIDTune_CYCLETIME; + _GLOBAL_CONST unsigned short LCR_WARN_LCRPID_YFBK_LIMIT; + _GLOBAL_CONST unsigned short LCR_WARN_LCRPID_I_MINLIMIT; + _GLOBAL_CONST unsigned short LCR_WARN_LCRPID_I_MAXLIMIT; + _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_OSC_1; + _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_OSC_1; + _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_CHR_REF_OS; + _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_CHR_REF_OS; + _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_CHR_REF_AP; + _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_CHR_REF_AP; + _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_ZN_DIST; + _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_ZN_DIST; + _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_CHR_DIST_OS; + _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_CHR_DIST_OS; + _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_CHR_DIST_AP; + _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_CHR_DIST_AP; + _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_P; + _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_P; + _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_PI; + _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_PI; + _GLOBAL_CONST unsigned short LCRTEMP_STEP_DONE; + _GLOBAL_CONST unsigned short LCRTEMP_STEP_PID_DONE; + _GLOBAL_CONST unsigned short LCRTEMP_STEP_PID_DONE_COOLONLY; + _GLOBAL_CONST unsigned short LCRTEMP_STEP_COOL; + _GLOBAL_CONST unsigned short LCRPID_TUNE_ADDINFO_OSC_PERIOD; + _GLOBAL_CONST unsigned short LCRTEMP_STEP_START_COOL; + _GLOBAL_CONST unsigned short LCRTEMP_STEP_WAIT_COOLONLY; + _GLOBAL_CONST unsigned char LCRPID_MODE_FREEZE_JOLTFREE; + _GLOBAL_CONST unsigned char LCRPID_MODE_CLOSE_JOLTFREE; + _GLOBAL_CONST unsigned char LCRPID_MODE_OPEN_JOLTFREE; + _GLOBAL_CONST unsigned char LCRPID_MODE_MAN_JOLTFREE; + _GLOBAL_CONST unsigned short LCRTEMP_STEP_WAIT_COOL; + _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_PID; + _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_PID; + _GLOBAL_CONST unsigned short LCRTEMP_STEP_PID_COOL; + _GLOBAL_CONST unsigned short LCRTEMP_STEP_PID; + _GLOBAL_CONST unsigned short LCRTEMP_STEP_FREE; + _GLOBAL_CONST unsigned short LCRTEMP_STEP_START_FREE; + _GLOBAL_CONST unsigned short LCRTEMP_STEP_WAIT_FREE; + _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_FINISHED; + _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_RESET_CNTL; + _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_CALC_PARA; + _GLOBAL_CONST unsigned short LCRTEMP_STEP_PID_FREE; + _GLOBAL_CONST unsigned short LCRTEMP_STEP_HEAT; + _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_STEP_WAITEQ2; + _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_STEP_MAXGRAD; + _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_DIR_NEG; + _GLOBAL_CONST unsigned short LCRTEMP_STEP_START_HEAT; + _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_STEP_WAITEQ1; + _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_DIR_NEG; + _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_OSC_CNTLPAR; + _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_OSC_PERFORM_2; + _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_OSC_PERFORM_1; + _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_OSC_SEQ_CNTL; + _GLOBAL_CONST unsigned short LCRTEMP_STEP_WAIT_HEAT; + _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_DIR_POS; + _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_OSCILLATE; + _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_DIR_POS; + _GLOBAL_CONST unsigned char LCRDBLPID_MODE_TUNE_Y2; + _GLOBAL_CONST unsigned char LCRDBLPID_MODE_TUNE_Y1; + _GLOBAL_CONST unsigned char LCRDBLPID_MODE_TUNE_6; + _GLOBAL_CONST unsigned char LCRDBLPID_MODE_TUNE_4; + _GLOBAL_CONST unsigned char LCRPID_FBK_MODE_SET_YI; + _GLOBAL_CONST unsigned char LCRPID_MODE_FREEZE; + _GLOBAL_CONST unsigned short LCRTEMP_STEP_WAIT; + _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_WRITE_PARAS; + _GLOBAL_CONST unsigned char LCRPID_MODE_CLOSE; + _GLOBAL_CONST unsigned char LCRPID_FBK_MODE_LIMIT_YI; + _GLOBAL_CONST unsigned char LCRDBLPID_TSTATE_ERROR; + _GLOBAL_CONST unsigned char LCRPID_FBK_MODE_EXT_SELECTOR; + _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_READ_PARAS; + _GLOBAL_CONST unsigned char LCRDBLPID_TSTATE_FINISHED; + _GLOBAL_CONST unsigned char LCRPID_MODE_OPEN; + _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_STEPRESPONSE; + _GLOBAL_CONST unsigned char LCRPID_FBK_MODE_EXTERN; + _GLOBAL_CONST unsigned char LCRPID_MODE_MAN; + _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_STEPRESPONSE; + _GLOBAL_CONST unsigned char LCRPID_D_MODE_E; + _GLOBAL_CONST unsigned char LCRDBLPID_TSTATE_Y2; + _GLOBAL_CONST unsigned long LCRTEMPPID_MODE_MAN; + _GLOBAL_CONST unsigned char LCRPID_DEADBAND_MODE_STANDARD_I; + _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_OSCILLATE; + _GLOBAL_CONST unsigned char LCRTEMP_COOL; + _GLOBAL_CONST unsigned char LCRTEMP_PT2; + _GLOBAL_CONST unsigned char LCRTEMP_HYST_MODE_JOLTFREE; + _GLOBAL_CONST unsigned long LCRTEMPPID_MODE_AUTO; + _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_OSCILLATE; + _GLOBAL_CONST unsigned char LCRDBLPID_TSTATE_Y1; + _GLOBAL_CONST unsigned char LCRPID_FBK_MODE_INTERN; + _GLOBAL_CONST unsigned char LCRPID_DEADBAND_MODE_STANDARD; + _GLOBAL_CONST unsigned char LCRPID_D_MODE_X; + _GLOBAL_CONST unsigned char LCRPID_MODE_AUTO; + _GLOBAL_CONST unsigned long LCRTEMPTune_MODE_EXP; + _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_OFF; + _GLOBAL_CONST unsigned char LCRDBLPID_TSTATE_OFF; + _GLOBAL_CONST unsigned long LCRTEMPTune_MODE_DEF; + _GLOBAL_CONST unsigned char LCRTEMP_PT1; + _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_OFF; + _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_READY; + _GLOBAL_CONST unsigned char LCRPID_MODE_OFF; + _GLOBAL_CONST unsigned char LCRTEMP_HEAT; + _GLOBAL_CONST unsigned char LCRPID_DEADBAND_MODE_ZERO; +#endif + + + + #ifdef __cplusplus }; #endif diff --git a/example/AsProject/Logical/Libraries/_AS/LoopConR/SG4/libLoopConR.a b/example/AsProject/Logical/Libraries/_AS/LoopConR/SG4/libLoopConR.a index 20ece35..953c709 100644 Binary files a/example/AsProject/Logical/Libraries/_AS/LoopConR/SG4/libLoopConR.a and b/example/AsProject/Logical/Libraries/_AS/LoopConR/SG4/libLoopConR.a differ diff --git a/example/AsProject/Logical/Libraries/_AS/LoopConR/SGC/LoopConR.h b/example/AsProject/Logical/Libraries/_AS/LoopConR/SGC/LoopConR.h deleted file mode 100644 index e88fcf4..0000000 --- a/example/AsProject/Logical/Libraries/_AS/LoopConR/SGC/LoopConR.h +++ /dev/null @@ -1,1677 +0,0 @@ -/* Automation Studio generated header file */ -/* Do not edit ! */ -/* LoopConR 4.10.2 */ - -#ifndef _LOOPCONR_ -#define _LOOPCONR_ -#ifdef __cplusplus -extern "C" -{ -#endif -#ifndef _LoopConR_VERSION -#define _LoopConR_VERSION 4.10.2 -#endif - -#include - -#ifndef _BUR_PUBLIC -#define _BUR_PUBLIC -#endif -#ifdef _SG4 - #include "sys_lib.h" - #include "brsystem.h" -#endif -#ifdef _SG3 - #include "sys_lib.h" - #include "brsystem.h" -#endif -#ifdef _SGC - #include "sys_lib.h" - #include "brsystem.h" -#endif - -/* Constants */ -#ifdef _REPLACE_CONST - #define LCRPID_TUNE_REQU_PER_5 500000U - #define LCRSLIMPID_REQU_PER_5 500000U - #define LCRSLIMPID_REQU_PER_4 400000U - #define LCRPID_TUNE_REQU_PER_4 400000U - #define LCRPID_TUNE_REQU_PER_3 300000U - #define LCRSLIMPID_REQU_PER_3 300000U - #define LCRTEMP_STEP_ERROR 65535U - #define LCR_ERR_DISABLED 65534U - #define LCR_ERR_PT2O_TF_NEG_ZERO 33154U - #define LCR_ERR_PT2O_D_NEG 33153U - #define LCR_ERR_LCRTEMPTune_DT_IGNORED 33152U - #define LCR_ERR_LCRTEMPPID_INVALID_MODE 33151U - #define LCR_ERR_LCRTEMPTune_INVALID_MODE 33150U - #define LCR_WARN_PT2O_TF_TS 33102U - #define LCR_WARN_LCRTEMPTune_ASYNC 33101U - #define LCR_WARN_LCRTEMPTune_DT_HIGH 33100U - #define LCR_ERR_SCHEDULE_N 31574U - #define LCR_ERR_SCHEDULE_P 31573U - #define LCR_ERR_LCRTEMPPID_NO_TALT 31572U - #define LCR_ERR_LCRTEMPPID_TKNICK 31571U - #define LCR_ERR_LCRTEMPTune_TASKTIME_0 31570U - #define LCR_ERR_LCRTEMPPID_ILLEGALMODE 31569U - #define LCR_ERR_LCRTEMPPID_WR_PTR 31568U - #define LCR_ERR_LCRTEMPPID_WR_PARA 31567U - #define LCR_ERR_LCRTEMPTune_WR_TSET 31567U - #define LCR_ERR_LCRTEMPTune_WR_PTR 31566U - #define LCR_ERR_LCRPIDTune_MAXMIN 31564U - #define LCR_ERR_POINTER 31563U - #define LCR_ERR_LCRDBLPID_DX_DT 31562U - #define LCR_ERR_LCRDBLPID_WX_LOW 31561U - #define LCR_ERR_LCRPIDTune_CONTROL_VAR 31560U - #define LCR_ERR_LCRPIDTune_INVALID_REQU 31559U - #define LCR_ERR_LCRPID_PAR_FBKMODE 31558U - #define LCR_ERR_LCRPID_PAR_DYMAX 31557U - #define LCR_ERR_LCRPID_PAR_DMODE 31556U - #define LCR_ERR_LCRPID_PARADAT 31554U - #define LCR_ERR_LCRPID_MODE 31553U - #define LCR_ERR_LCRPID_IDENT 31552U - #define LCR_ERR_LCRMovAvgFlt_BASE 31551U - #define LCR_ERR_LCRIntegrate_TN 31550U - #define LCRPID_TUNE_REQU_OSC_3 30000U - #define LCRSLIMPID_REQU_OSC_3 30000U - #define LCRPID_TUNE_REQU_OSC_2 20000U - #define LCRSLIMPID_REQU_OSC_2 20000U - #define LCR_ERR_LCRTT_TT_NEG 12048U - #define LCR_ERR_LCRPT12_T2_NEG 12047U - #define LCR_ERR_LCRPT12_T1_NEG 12046U - #define LCR_ERR_LCRCurveByPoints_TABLE 12045U - #define LCR_ERR_LCRPID_PAR_DEADBAND 12044U - #define LCR_ERR_LCRPID_PAR_WX_MAXMIN 12043U - #define LCR_ERR_LCRPID_PAR_DEADBAND_MODE 12042U - #define LCR_ERR_LCRPIDTune_W_CHANGED 12041U - #define LCR_ERR_LCRPIDTune_TIMEOUT 12040U - #define LCR_ERR_LCRPIDTune_PARAMETER 12039U - #define LCR_ERR_LCRPIDTune_ABORT 12038U - #define LCR_ERR_MAXMIN 12037U - #define LCR_ERR_LCRContinServo_TIMPULSE 12036U - #define LCR_ERR_LCRContinServo_TCHANGE 12035U - #define LCR_ERR_LCRRamp_DYUP_DYDOWN 12034U - #define LCR_ERR_LCRPWM_TPERIOD 12033U - #define LCR_ERR_LCRPWM_TPULSE 12033U - #define LCR_ERR_LCRPWM_TMINPULSE 12032U - #define LCR_ERR_LCRPT1_T 12031U - #define LCR_ERR_LCRPID_PAR_TV 12030U - #define LCR_ERR_LCRPID_PAR_TN 12029U - #define LCR_ERR_LCRPID_PAR_TF 12028U - #define LCR_ERR_LCRPID_PAR_KW 12027U - #define LCR_ERR_LCRPID_PAR_KP 12026U - #define LCR_ERROR 12025U - #define LCR_ERR_LCRPID_PAR_KFBK 12025U - #define LCR_WARN_LCRTEMPPID_WR_PARA 12024U - #define LCR_WARN_LCRTEMPTune_WR_BASE 12023U - #define LCR_WARN_LCRTEMPTune_WR_PARA 12022U - #define LCR_WARN_LCRTEMPTune_HEAT_TP 12021U - #define LCR_WARN_LCRDBLPID_TUNE_CHANGE 12019U - #define LCR_WARN_LCRTT_MEM 12018U - #define LCR_WARN_LCRTT_TT_INT 12017U - #define LCR_WARN_LCRTT_TT_TS 12016U - #define LCR_WARN_LCRTT_TT_ZERO 12015U - #define LCR_WARN_LCRPT12_T2_INT 12014U - #define LCR_WARN_LCRPT12_T2_TS 12013U - #define LCR_WARN_LCRPT12_T2_ZERO 12012U - #define LCR_WARN_LCRPT12_T1_INT 12011U - #define LCR_WARN_LCRPT12_T1_TS 12010U - #define LCR_WARN_LCRPID_YMAN_LIMIT 12009U - #define LCR_WARN_LCRPID_A_LIMIT 12008U - #define LCR_WARN_Tx_DT 12007U - #define LCR_WARN_LCRPT12_T1_ZERO 12005U - #define LCR_WARN_LCRPIDTune_CYCLETIME 12004U - #define LCR_WARN_LCRPID_YFBK_LIMIT 12003U - #define LCR_WARN_LCRPID_I_MINLIMIT 12002U - #define LCR_WARN_LCRPID_I_MAXLIMIT 12001U - #define LCRSLIMPID_REQU_OSC_1 10000U - #define LCRPID_TUNE_REQU_OSC_1 10000U - #define LCRSLIMPID_REQU_CHR_REF_OS 5000U - #define LCRPID_TUNE_REQU_CHR_REF_OS 5000U - #define LCRSLIMPID_REQU_CHR_REF_AP 4000U - #define LCRPID_TUNE_REQU_CHR_REF_AP 4000U - #define LCRPID_TUNE_REQU_ZN_DIST 3000U - #define LCRSLIMPID_REQU_ZN_DIST 3000U - #define LCRPID_TUNE_REQU_CHR_DIST_OS 2000U - #define LCRSLIMPID_REQU_CHR_DIST_OS 2000U - #define LCRPID_TUNE_REQU_CHR_DIST_AP 1000U - #define LCRSLIMPID_REQU_CHR_DIST_AP 1000U - #define LCRSLIMPID_REQU_P 300U - #define LCRPID_TUNE_REQU_P 300U - #define LCRSLIMPID_REQU_PI 200U - #define LCRPID_TUNE_REQU_PI 200U - #define LCRTEMP_STEP_DONE 130U - #define LCRTEMP_STEP_PID_DONE 125U - #define LCRTEMP_STEP_PID_DONE_COOLONLY 122U - #define LCRTEMP_STEP_COOL 120U - #define LCRPID_TUNE_ADDINFO_OSC_PERIOD 111U - #define LCRTEMP_STEP_START_COOL 110U - #define LCRTEMP_STEP_WAIT_COOLONLY 105U - #define LCRPID_MODE_FREEZE_JOLTFREE 105U - #define LCRPID_MODE_CLOSE_JOLTFREE 104U - #define LCRPID_MODE_OPEN_JOLTFREE 103U - #define LCRPID_MODE_MAN_JOLTFREE 102U - #define LCRTEMP_STEP_WAIT_COOL 100U - #define LCRPID_TUNE_REQU_PID 100U - #define LCRSLIMPID_REQU_PID 100U - #define LCRTEMP_STEP_PID_COOL 90U - #define LCRTEMP_STEP_PID 80U - #define LCRTEMP_STEP_FREE 70U - #define LCRTEMP_STEP_START_FREE 60U - #define LCRTEMP_STEP_WAIT_FREE 50U - #define LCRPID_TUNE_STATE_FINISHED 50U - #define LCRPID_TUNE_STATE_RESET_CNTL 49U - #define LCRPID_TUNE_STATE_CALC_PARA 45U - #define LCRTEMP_STEP_PID_FREE 40U - #define LCRTEMP_STEP_HEAT 30U - #define LCRPID_TUNE_STATE_STEP_WAITEQ2 22U - #define LCRPID_TUNE_STATE_STEP_MAXGRAD 21U - #define LCRSLIMPID_REQU_DIR_NEG 20U - #define LCRTEMP_STEP_START_HEAT 20U - #define LCRPID_TUNE_STATE_STEP_WAITEQ1 20U - #define LCRPID_TUNE_REQU_DIR_NEG 20U - #define LCRPID_TUNE_STATE_OSC_CNTLPAR 19U - #define LCRPID_TUNE_STATE_OSC_PERFORM_2 13U - #define LCRPID_TUNE_STATE_OSC_PERFORM_1 12U - #define LCRPID_TUNE_STATE_OSC_SEQ_CNTL 11U - #define LCRTEMP_STEP_WAIT_HEAT 10U - #define LCRSLIMPID_REQU_DIR_POS 10U - #define LCRPID_TUNE_STATE_OSCILLATE 10U - #define LCRPID_TUNE_REQU_DIR_POS 10U - #define LCRDBLPID_MODE_TUNE_Y2 9U - #define LCRDBLPID_MODE_TUNE_Y1 8U - #define LCRDBLPID_MODE_TUNE_6 7U - #define LCRDBLPID_MODE_TUNE_4 6U - #define LCRPID_FBK_MODE_SET_YI 5U - #define LCRPID_MODE_FREEZE 5U - #define LCRTEMP_STEP_WAIT 5U - #define LCRSLIMPID_REQU_WRITE_PARAS 4U - #define LCRPID_MODE_CLOSE 4U - #define LCRPID_FBK_MODE_LIMIT_YI 4U - #define LCRDBLPID_TSTATE_ERROR 4U - #define LCRPID_FBK_MODE_EXT_SELECTOR 3U - #define LCRSLIMPID_REQU_READ_PARAS 3U - #define LCRDBLPID_TSTATE_FINISHED 3U - #define LCRPID_MODE_OPEN 3U - #define LCRPID_TUNE_REQU_STEPRESPONSE 2U - #define LCRPID_FBK_MODE_EXTERN 2U - #define LCRPID_MODE_MAN 2U - #define LCRSLIMPID_REQU_STEPRESPONSE 2U - #define LCRPID_D_MODE_E 2U - #define LCRDBLPID_TSTATE_Y2 2U - #define LCRTEMPPID_MODE_MAN 2U - #define LCRPID_DEADBAND_MODE_STANDARD_I 2U - #define LCRSLIMPID_REQU_OSCILLATE 1U - #define LCRTEMP_COOL 1U - #define LCRTEMP_PT2 1U - #define LCRTEMP_HYST_MODE_JOLTFREE 1U - #define LCRTEMPPID_MODE_AUTO 1U - #define LCRPID_TUNE_REQU_OSCILLATE 1U - #define LCRDBLPID_TSTATE_Y1 1U - #define LCRPID_FBK_MODE_INTERN 1U - #define LCRPID_DEADBAND_MODE_STANDARD 1U - #define LCRPID_D_MODE_X 1U - #define LCRPID_MODE_AUTO 1U - #define LCRTEMPTune_MODE_EXP 1U - #define LCRPID_TUNE_REQU_OFF 0U - #define LCRDBLPID_TSTATE_OFF 0U - #define LCRTEMPTune_MODE_DEF 0U - #define LCRTEMP_PT1 0U - #define LCRSLIMPID_REQU_OFF 0U - #define LCRPID_TUNE_STATE_READY 0U - #define LCRPID_MODE_OFF 0U - #define LCRTEMP_HEAT 0U - #define LCRPID_DEADBAND_MODE_ZERO 0U -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_PER_5; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_PER_5; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_PER_4; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_PER_4; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_PER_3; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_PER_3; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_ERROR; - _GLOBAL_CONST unsigned short LCR_ERR_DISABLED; - _GLOBAL_CONST unsigned short LCR_ERR_PT2O_TF_NEG_ZERO; - _GLOBAL_CONST unsigned short LCR_ERR_PT2O_D_NEG; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPTune_DT_IGNORED; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPPID_INVALID_MODE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPTune_INVALID_MODE; - _GLOBAL_CONST unsigned short LCR_WARN_PT2O_TF_TS; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTEMPTune_ASYNC; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTEMPTune_DT_HIGH; - _GLOBAL_CONST unsigned short LCR_ERR_SCHEDULE_N; - _GLOBAL_CONST unsigned short LCR_ERR_SCHEDULE_P; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPPID_NO_TALT; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPPID_TKNICK; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPTune_TASKTIME_0; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPPID_ILLEGALMODE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPPID_WR_PTR; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPPID_WR_PARA; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPTune_WR_TSET; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTEMPTune_WR_PTR; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPIDTune_MAXMIN; - _GLOBAL_CONST unsigned short LCR_ERR_POINTER; - _GLOBAL_CONST unsigned short LCR_ERR_LCRDBLPID_DX_DT; - _GLOBAL_CONST unsigned short LCR_ERR_LCRDBLPID_WX_LOW; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPIDTune_CONTROL_VAR; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPIDTune_INVALID_REQU; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_FBKMODE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_DYMAX; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_DMODE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PARADAT; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_MODE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_IDENT; - _GLOBAL_CONST unsigned short LCR_ERR_LCRMovAvgFlt_BASE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRIntegrate_TN; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_OSC_3; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_OSC_3; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_OSC_2; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_OSC_2; - _GLOBAL_CONST unsigned short LCR_ERR_LCRTT_TT_NEG; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPT12_T2_NEG; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPT12_T1_NEG; - _GLOBAL_CONST unsigned short LCR_ERR_LCRCurveByPoints_TABLE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_DEADBAND; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_WX_MAXMIN; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_DEADBAND_MODE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPIDTune_W_CHANGED; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPIDTune_TIMEOUT; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPIDTune_PARAMETER; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPIDTune_ABORT; - _GLOBAL_CONST unsigned short LCR_ERR_MAXMIN; - _GLOBAL_CONST unsigned short LCR_ERR_LCRContinServo_TIMPULSE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRContinServo_TCHANGE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRRamp_DYUP_DYDOWN; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPWM_TPERIOD; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPWM_TPULSE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPWM_TMINPULSE; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPT1_T; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_TV; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_TN; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_TF; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_KW; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_KP; - _GLOBAL_CONST unsigned short LCR_ERROR; - _GLOBAL_CONST unsigned short LCR_ERR_LCRPID_PAR_KFBK; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTEMPPID_WR_PARA; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTEMPTune_WR_BASE; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTEMPTune_WR_PARA; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTEMPTune_HEAT_TP; - _GLOBAL_CONST unsigned short LCR_WARN_LCRDBLPID_TUNE_CHANGE; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTT_MEM; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTT_TT_INT; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTT_TT_TS; - _GLOBAL_CONST unsigned short LCR_WARN_LCRTT_TT_ZERO; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPT12_T2_INT; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPT12_T2_TS; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPT12_T2_ZERO; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPT12_T1_INT; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPT12_T1_TS; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPID_YMAN_LIMIT; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPID_A_LIMIT; - _GLOBAL_CONST unsigned short LCR_WARN_Tx_DT; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPT12_T1_ZERO; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPIDTune_CYCLETIME; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPID_YFBK_LIMIT; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPID_I_MINLIMIT; - _GLOBAL_CONST unsigned short LCR_WARN_LCRPID_I_MAXLIMIT; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_OSC_1; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_OSC_1; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_CHR_REF_OS; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_CHR_REF_OS; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_CHR_REF_AP; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_CHR_REF_AP; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_ZN_DIST; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_ZN_DIST; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_CHR_DIST_OS; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_CHR_DIST_OS; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_CHR_DIST_AP; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_CHR_DIST_AP; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_P; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_P; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_PI; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_PI; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_DONE; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_PID_DONE; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_PID_DONE_COOLONLY; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_COOL; - _GLOBAL_CONST unsigned short LCRPID_TUNE_ADDINFO_OSC_PERIOD; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_START_COOL; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_WAIT_COOLONLY; - _GLOBAL_CONST unsigned char LCRPID_MODE_FREEZE_JOLTFREE; - _GLOBAL_CONST unsigned char LCRPID_MODE_CLOSE_JOLTFREE; - _GLOBAL_CONST unsigned char LCRPID_MODE_OPEN_JOLTFREE; - _GLOBAL_CONST unsigned char LCRPID_MODE_MAN_JOLTFREE; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_WAIT_COOL; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_PID; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_PID; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_PID_COOL; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_PID; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_FREE; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_START_FREE; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_WAIT_FREE; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_FINISHED; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_RESET_CNTL; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_CALC_PARA; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_PID_FREE; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_HEAT; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_STEP_WAITEQ2; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_STEP_MAXGRAD; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_DIR_NEG; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_START_HEAT; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_STEP_WAITEQ1; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_DIR_NEG; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_OSC_CNTLPAR; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_OSC_PERFORM_2; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_OSC_PERFORM_1; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_OSC_SEQ_CNTL; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_WAIT_HEAT; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_DIR_POS; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_OSCILLATE; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_DIR_POS; - _GLOBAL_CONST unsigned char LCRDBLPID_MODE_TUNE_Y2; - _GLOBAL_CONST unsigned char LCRDBLPID_MODE_TUNE_Y1; - _GLOBAL_CONST unsigned char LCRDBLPID_MODE_TUNE_6; - _GLOBAL_CONST unsigned char LCRDBLPID_MODE_TUNE_4; - _GLOBAL_CONST unsigned char LCRPID_FBK_MODE_SET_YI; - _GLOBAL_CONST unsigned char LCRPID_MODE_FREEZE; - _GLOBAL_CONST unsigned short LCRTEMP_STEP_WAIT; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_WRITE_PARAS; - _GLOBAL_CONST unsigned char LCRPID_MODE_CLOSE; - _GLOBAL_CONST unsigned char LCRPID_FBK_MODE_LIMIT_YI; - _GLOBAL_CONST unsigned char LCRDBLPID_TSTATE_ERROR; - _GLOBAL_CONST unsigned char LCRPID_FBK_MODE_EXT_SELECTOR; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_READ_PARAS; - _GLOBAL_CONST unsigned char LCRDBLPID_TSTATE_FINISHED; - _GLOBAL_CONST unsigned char LCRPID_MODE_OPEN; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_STEPRESPONSE; - _GLOBAL_CONST unsigned char LCRPID_FBK_MODE_EXTERN; - _GLOBAL_CONST unsigned char LCRPID_MODE_MAN; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_STEPRESPONSE; - _GLOBAL_CONST unsigned char LCRPID_D_MODE_E; - _GLOBAL_CONST unsigned char LCRDBLPID_TSTATE_Y2; - _GLOBAL_CONST unsigned long LCRTEMPPID_MODE_MAN; - _GLOBAL_CONST unsigned char LCRPID_DEADBAND_MODE_STANDARD_I; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_OSCILLATE; - _GLOBAL_CONST unsigned char LCRTEMP_COOL; - _GLOBAL_CONST unsigned char LCRTEMP_PT2; - _GLOBAL_CONST unsigned char LCRTEMP_HYST_MODE_JOLTFREE; - _GLOBAL_CONST unsigned long LCRTEMPPID_MODE_AUTO; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_OSCILLATE; - _GLOBAL_CONST unsigned char LCRDBLPID_TSTATE_Y1; - _GLOBAL_CONST unsigned char LCRPID_FBK_MODE_INTERN; - _GLOBAL_CONST unsigned char LCRPID_DEADBAND_MODE_STANDARD; - _GLOBAL_CONST unsigned char LCRPID_D_MODE_X; - _GLOBAL_CONST unsigned char LCRPID_MODE_AUTO; - _GLOBAL_CONST unsigned long LCRTEMPTune_MODE_EXP; - _GLOBAL_CONST unsigned long LCRPID_TUNE_REQU_OFF; - _GLOBAL_CONST unsigned char LCRDBLPID_TSTATE_OFF; - _GLOBAL_CONST unsigned long LCRTEMPTune_MODE_DEF; - _GLOBAL_CONST unsigned char LCRTEMP_PT1; - _GLOBAL_CONST unsigned long LCRSLIMPID_REQU_OFF; - _GLOBAL_CONST unsigned short LCRPID_TUNE_STATE_READY; - _GLOBAL_CONST unsigned char LCRPID_MODE_OFF; - _GLOBAL_CONST unsigned char LCRTEMP_HEAT; - _GLOBAL_CONST unsigned char LCRPID_DEADBAND_MODE_ZERO; -#endif - - - - -/* Datatypes and datatypes of function blocks */ -typedef struct lcrCurveByPoints_TabEntry_type -{ float x; - float y; -} lcrCurveByPoints_TabEntry_type; - -typedef struct lcrdblpid_par_typ -{ float Y_max; - float Y_min; - signed short K_fact; - float Kp; - float Tn; - float Tv; -} lcrdblpid_par_typ; - -typedef struct lcrpid_tune_osc_options_typ -{ float osc_minAmplitude; - float Q_min; -} lcrpid_tune_osc_options_typ; - -typedef struct lcrpid_tune_step_options_typ -{ float eqDeltaX; - float eqDeltaWX; - float eqDeltat; - float evalDeltaX; - unsigned short evalNfilter; - unsigned short exitNotMaxdXCount; - float exitdXRatio; -} lcrpid_tune_step_options_typ; - -typedef struct lcrdblpid_tune_typ -{ signed short P1_manualAdjust; - signed short I1_manualAdjust; - signed short D1_manualAdjust; - signed short P2_manualAdjust; - signed short I2_manualAdjust; - signed short D2_manualAdjust; - float X_min; - float X_max; - float X0; - float de_min; - float Y0; - float Y1step; - float Y2step; - unsigned long tuneY1_opt; - unsigned long tuneY2_opt; - unsigned char tune_first; - float hyst; - float measDelta; - struct lcrpid_tune_osc_options_typ osc_opt; - struct lcrpid_tune_step_options_typ step_opt; -} lcrdblpid_tune_typ; - -typedef struct lcrpid_internal_typ -{ unsigned short size; - plcbit valid; - float WX_max; - float WX_min; - plcbit invert; - float deadband; - unsigned char deadband_mode; - float dY_max; - float Kp; - float Kp_Tn; - float Tv_Tf; - float Tf_reciproc; - float Kw; - float Kfbk_Kp; - float Kfbk_Kp_max; - unsigned char fbk_mode; - unsigned char d_mode; - unsigned char force_mode; - float Y_force; - float W; - float X; - unsigned char pid_init; - signed long Yp1; - signed long Yp2; - signed long dYi1; - signed long dYi2; - signed long Yi1; - signed long Yi2; - float dt_Tf; - signed long a11; - signed long a12; - signed long a21; - signed long a22; - signed long Yd1; - signed long Yd2; - signed long Ytotal1; - signed long Ytotal2; - signed long Ylim1; - signed long Ylim2; - signed long Y1; - signed long Y2; - float deltaY_fbk; - float e_fbk; -} lcrpid_internal_typ; - -typedef struct lcrpid_procPar_typ -{ unsigned short size; - plcbit valid; - plcbit stepResp_valid; - float stepResp_v; - float stepResp_t_u; - float stepResp_t_g; - plcbit osc_valid; - float osc_amplitudeRatio; - float osc_tPeriod; - plcbit force_params; - float Kp; - float Kp_tune; - float Tn; - float Tn_tune; - float Tv; - float Tv_tune; -} lcrpid_procPar_typ; - -typedef struct lcrpid_old_typ -{ struct lcrpid_procPar_typ processPar; - signed short P_manualAdjust; - signed short I_manualAdjust; - signed short D_manualAdjust; - float Y_min; - float Y_max; - float dY_max; - float Tf_Tv; - float Kw; - float Kfbk; - float deadband; - float W; - unsigned long request; - unsigned char fbk_mode; - unsigned char d_mode; - plcbit invert; - plcbit enable; -} lcrpid_old_typ; - -typedef struct lcrpid_osc_val_typ -{ float X; - float t; -} lcrpid_osc_val_typ; - -typedef struct lcrpid_osc_per_typ -{ struct lcrpid_osc_val_typ max; - struct lcrpid_osc_val_typ min; -} lcrpid_osc_per_typ; - -typedef struct lcrpid_tune_addpar_typ -{ float t_max_tune; - float WX_min; - float WX_max; - float dY_max; - float Tf_Tv; - float Kw; - float Kfbk; - unsigned char fbk_mode; - unsigned char d_mode; - float deadband; - unsigned char deadband_mode; - plcbit invert; -} lcrpid_tune_addpar_typ; - -typedef struct lcrpid_tune_osc_typ -{ struct lcrpid_tune_osc_options_typ options; - unsigned short oscPhase; - signed char dir; - plcbit enHi; - plcbit enLo; - float Y_hi; - float Y_lo; - unsigned short i_maxPeriod; - unsigned short i_period; - float X_ampl; - float X_avg; - float X_min_avg; - float X_max_avg; - float Y_avg; - float deltaY; - float t_Ylohi[5]; - float t_Yhilo[5]; - float Q_act; - float a_wx; - float amplitudeRatio; - float Ku; - float tPeriod; - struct lcrpid_osc_per_typ period[5]; -} lcrpid_tune_osc_typ; - -typedef struct lcrpid_tune_step_typ -{ struct lcrpid_tune_step_options_typ options; - float Y0; - float Y1; - float t_jump; - float W; - float X0; - float Xmax; - float Xmin; - float Xfiltered; - plcbit deltaXok; - plcbit deltaWXok; - float eqTime; - signed char dir; - float deltaX; - float X1; - float t1; - plcbit t1set; - float dX_dt; - float dX_dt_max; - float XmaxGrad; - float maxX1; - float maxX2; - float maxt1; - float maxt2; - float tmaxGrad; - float gainFactor; - float deadTime; - float riseTime; - unsigned short notMaxCount; - float gradientRatio; -} lcrpid_tune_step_typ; - -typedef struct lcrpt2o_Internal_typ -{ signed long Ts; - unsigned long Ts_dbl_1; - unsigned long Ts_dbl_2; - float V_old; - float D_old; - float Tf_old; - unsigned char Set_y_old; - unsigned char Set_y_2; - unsigned long x1_dbl_1; - unsigned long x1_dbl_2; - unsigned long x2_dbl_1; - unsigned long x2_dbl_2; - unsigned long Sqrt_D_1_dbl_1; - unsigned long Sqrt_D_1_dbl_2; - unsigned long Ts_Tf_dbl_1; - unsigned long Ts_Tf_dbl_2; - unsigned long Exp_D_Ts_Tf_dbl_1; - unsigned long Exp_D_Ts_Tf_dbl_2; - unsigned long a0_dbl_1; - unsigned long a0_dbl_2; - unsigned long a1_dbl_1; - unsigned long a1_dbl_2; - unsigned long b0_dbl_1; - unsigned long b0_dbl_2; - unsigned long b1_dbl_1; - unsigned long b1_dbl_2; - unsigned long Bootkey; -} lcrpt2o_Internal_typ; - -typedef struct LCRPWM -{ - /* VAR_INPUT (analog) */ - float x; - float max_value; - float min_value; - float t_min_pulse; - float t_period; - /* VAR_OUTPUT (analog) */ - unsigned short status; - float t_on; - float t_off; - /* VAR (analog) */ - signed long cnt_terron_1; - signed long cnt_terron_2; - signed long cnt_terroff_1; - signed long cnt_terroff_2; - signed long cnt_t_pulse_1; - signed long cnt_t_pulse_2; - unsigned long store1; - unsigned long store2; - unsigned long timeCnt; - struct SysInfo sysinfo_inst; - /* VAR_INPUT (digital) */ - plcbit enable; - /* VAR_OUTPUT (digital) */ - plcbit pulse; - /* VAR (digital) */ - plcbit corr; -} LCRPWM_typ; - -typedef struct lcrschedule_add_typ -{ float periodTime; - float onTime; - float t_on_intern; - float bcOnTime; - unsigned short sortIndex; - struct LCRPWM fbkPWM; - plcbit flagDelay; -} lcrschedule_add_typ; - -typedef struct lcrschedule_par_typ -{ float P; - float X; - plcbit pulse; - float Pout; - plcbit lim; - struct lcrschedule_add_typ Internal; -} lcrschedule_par_typ; - -typedef struct lcrslimpid_par_typ -{ float Y_max; - float Y_min; - float Kp; - float Tn; - float Tv; - float Kfbk; -} lcrslimpid_par_typ; - -typedef struct lcrtemp_add_typ -{ float mem01; - float mem02; - float mem10; - float mem20; - float exp_mem; - float cnt01; - float cnt02; - float cnt10; - float cnt20; - float cnt03; - float cnt30; - float cnt00; - float t_ignore_dT_heat; - float t_ignore_dT_free; - float t_ignore_dT_cool; - float yMin; - float yMax; - unsigned long reserved3; - unsigned long reserved4; - plcbit reserved5; - plcbit reserved6; -} lcrtemp_add_typ; - -typedef struct lcrtemp_pid_internal_typ -{ plcbit enable_cooling; - plcbit disable_heating; - float hyst; - float delay; - float Kw; - float Kfbk; - float Kp_h; - float Tn_h; - float Tv_h; - float Kp_c; - float Tn_c; - float Tv_c; - float dynGeneral; - float dynHeat; - float dynCool; - float mem01; - float mem02; - float mem10; - float mem20; - float exp_mem; - float yMin; - float yMax; -} lcrtemp_pid_internal_typ; - -typedef struct lcrtemp_pid_opt_typ -{ float Kp_h; - float Tn_h; - float Tv_h; - float Tf_h; - float Kp_c; - float Tn_c; - float Tv_c; - float Tf_c; - float dynGeneral; - float dynHeat; - float dynCool; -} lcrtemp_pid_opt_typ; - -typedef struct lcrtemp_pid_set_typ -{ float hyst; - unsigned char hyst_mode; - float delay; - float Kw; - float Kfbk; -} lcrtemp_pid_set_typ; - -typedef struct lcrtemp_tune_set_typ -{ unsigned long mode; - float Temp_amb; - float dRatio_heat; - float cnt_tp_heat; - float delta_T_heat; - float dT_min_heat; - float dRatio_free; - float cnt_tp_free; - float delta_T_free; - float dT_min_free; - float dRatio_cool; - float cnt_tp_cool; - float delta_T_cool; - float dT_min_cool; - float delta_T_sync_heat; - float delta_dT_sync_heat; - float cnt_wait_heat; - float delta_T_sync_free; - float delta_dT_sync_free; - float cnt_wait_free; - float delta_T_sync_cool; - float delta_dT_sync_cool; - float cnt_wait_cool; - float filter_base_T; - float delta_T_sync_stop; - float Y_heat_tune; -} lcrtemp_tune_set_typ; - -typedef struct lcrtemp_set_typ -{ plcbit enable_cooling; - plcbit disable_heating; - struct lcrtemp_pid_opt_typ PIDpara; - struct lcrtemp_tune_set_typ TuneSet; - struct lcrtemp_pid_set_typ PIDSet; - struct lcrtemp_add_typ Internal; -} lcrtemp_set_typ; - -typedef struct lcrtemp_tune_internal_typ -{ plcbit cool_tuning; - plcbit disable_heating; - unsigned long mode; - float Temp_amb; - float dRatio_heat; - float cnt_tp_heat; - float delta_T_heat; - float dT_min_heat; - float dRatio_free; - float cnt_tp_free; - float delta_T_free; - float dT_min_free; - float dRatio_cool; - float cnt_tp_cool; - float delta_T_cool; - float dT_min_cool; - float delta_T_sync_heat; - float delta_dT_sync_heat; - float cnt_wait_heat; - float delta_T_sync_free; - float delta_dT_sync_free; - float cnt_wait_free; - float delta_T_sync_cool; - float delta_dT_sync_cool; - float cnt_wait_cool; - float filter_base_T; - float t_ignore_dT_heat; - float t_ignore_dT_free; - float t_ignore_dT_cool; - float delta_T_sync_stop; -} lcrtemp_tune_internal_typ; - -typedef struct LCRScal -{ - /* VAR_INPUT (analog) */ - float x; - float x1; - float y1; - float x2; - float y2; - /* VAR_OUTPUT (analog) */ - float y; -} LCRScal_typ; - -typedef struct LCRPID -{ - /* VAR_INPUT (analog) */ - unsigned long ident; - float W; - float X; - float Y_max; - float Y_min; - float A; - float Y_man; - float Y_fbk; - unsigned char mode; - /* VAR_OUTPUT (analog) */ - unsigned short status; - float e; - float Y; - float Yp; - float Yi; - float Yd; - /* VAR (analog) */ - float Yi_set; - float Yi_min; - float Yi_max; - float Yi_minInternal; - float Yi_maxInternal; - float Tv_Tf_old; - float e_old; - unsigned short deadband_state; - struct SysInfo sysinfo_inst; - struct LCRScal scal_inst; - unsigned long store1; - unsigned long store2; - unsigned long timeCnt; - unsigned short musecs_old; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit hold_I; - /* VAR (digital) */ - plcbit Set_Yi; - plcbit force_Yi; - plcbit joltFreeDoneLowerLim; - plcbit joltFreeDoneUpperLim; - plcbit enable_old; -} LCRPID_typ; - -typedef struct LCRCurveByPoints -{ - /* VAR_INPUT (analog) */ - float x; - unsigned short NoOfPoints; - struct lcrCurveByPoints_TabEntry_type* ptr_table; - /* VAR_OUTPUT (analog) */ - unsigned short status; - float y; - /* VAR (analog) */ - signed short i_tab; - unsigned short iterations; - struct LCRScal scal1; -} LCRCurveByPoints_typ; - -typedef struct LCRPIDpara -{ - /* VAR_INPUT (analog) */ - float WX_max; - float WX_min; - float deadband; - unsigned char deadband_mode; - float dY_max; - float Kp; - float Tn; - float Tv; - float Tf; - float Kw; - float Kfbk; - unsigned char fbk_mode; - unsigned char d_mode; - /* VAR_OUTPUT (analog) */ - unsigned short status; - unsigned long ident; - /* VAR (analog) */ - struct lcrpid_internal_typ internal_data; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit enter; - plcbit invert; -} LCRPIDpara_typ; - -typedef struct LCRContinServo -{ - /* VAR_INPUT (analog) */ - float x; - float max_value; - float min_value; - float t_impulse; - float t_change_up; - float t_change_down; - /* VAR_OUTPUT (analog) */ - unsigned short status; - float hysteresis_up; - float hysteresis_down; - /* VAR (analog) */ - unsigned short counter_state; - unsigned long bootkey_old; - unsigned long systicks_old; - unsigned short musecs_old; - signed long t_cnt_1; - signed long t_cnt_2; - signed long y_dbl_1; - signed long y_dbl_2; - struct SysInfo sysInfo_inst; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit ref; - /* VAR_OUTPUT (digital) */ - plcbit up; - plcbit down; - plcbit refOk; - /* VAR (digital) */ - plcbit enable_old; - plcbit ref_old; -} LCRContinServo_typ; - -typedef struct LCRPT1 -{ - /* VAR_INPUT (analog) */ - float x; - float t; - float y_set; - /* VAR_OUTPUT (analog) */ - unsigned short status; - float y; - /* VAR (analog) */ - unsigned short counter_state; - unsigned long bootkey_old; - unsigned long systicks_old; - unsigned short musecs_old; - signed long y_dbl_1; - signed long y_dbl_2; - struct SysInfo sysinfo_inst; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit set; -} LCRPT1_typ; - -typedef struct LCRRamp -{ - /* VAR_INPUT (analog) */ - float x; - float dy_up; - float dy_down; - float y_max; - float y_min; - float y_set; - /* VAR_OUTPUT (analog) */ - unsigned short status; - float y; - /* VAR (analog) */ - signed long y_dbl_1; - signed long y_dbl_2; - unsigned long timestore1; - unsigned long timestore2; - unsigned long getDtForceOff; - struct SysInfo sysinfo_inst; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit set; - /* VAR_OUTPUT (digital) */ - plcbit x_reached; - plcbit max_limit; - plcbit min_limit; -} LCRRamp_typ; - -typedef struct LCRIntegrate -{ - /* VAR_INPUT (analog) */ - float x; - float tn; - float y_max; - float y_min; - float y_set; - /* VAR_OUTPUT (analog) */ - unsigned short status; - float y; - /* VAR (analog) */ - unsigned short counter_state; - unsigned long bootkey_old; - unsigned long systicks_old; - unsigned short musecs_old; - signed long y_dbl_1; - signed long y_dbl_2; - struct SysInfo sysinfo_inst; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit set; - /* VAR_OUTPUT (digital) */ - plcbit max_limit; - plcbit min_limit; -} LCRIntegrate_typ; - -typedef struct LCRLimit -{ - /* VAR_INPUT (analog) */ - float in; - signed long max_value; - signed long min_value; - /* VAR_OUTPUT (analog) */ - unsigned short status; - signed long out; - /* VAR_OUTPUT (digital) */ - plcbit max_limit; - plcbit min_limit; -} LCRLimit_typ; - -typedef struct LCRLimScal -{ - /* VAR_INPUT (analog) */ - float x; - float x1; - float y1; - float x2; - float y2; - /* VAR_OUTPUT (analog) */ - float y; -} LCRLimScal_typ; - -typedef struct LCRMovAvgFlt -{ - /* VAR_INPUT (analog) */ - float x; - unsigned short base; - /* VAR_OUTPUT (analog) */ - unsigned short status; - float y; - /* VAR (analog) */ - signed long sum_old_dbl_1; - signed long sum_old_dbl_2; - unsigned long p_xold; - unsigned short i_xold; - unsigned short base_old; - unsigned long bootkey_old; - /* VAR_INPUT (digital) */ - plcbit enable; - /* VAR (digital) */ - plcbit enable_old; -} LCRMovAvgFlt_typ; - -typedef struct LCRTimeBasedOnOff -{ - /* VAR_INPUT (analog) */ - float x; - float max_value; - float min_value; - float timpulse; - float tchange_up; - float tchange_down; - /* VAR_OUTPUT (analog) */ - unsigned short status; - float hysteresis_up; - float hysteresis_down; - /* VAR (analog) */ - unsigned short counter_state; - unsigned long bootkey_old; - unsigned long systicks_old; - unsigned short musecs_old; - signed long t_cnt_1; - signed long t_cnt_2; - signed long y_dbl_1; - signed long y_dbl_2; - struct SysInfo sysInfo_inst; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit ref; - /* VAR_OUTPUT (digital) */ - plcbit up; - plcbit down; - plcbit refOk; - /* VAR (digital) */ - plcbit enable_old; - plcbit ref_old; -} LCRTimeBasedOnOff_typ; - -typedef struct LCRDifferentiate -{ - /* VAR_INPUT (analog) */ - float x; - float tv; - float tf; - /* VAR_OUTPUT (analog) */ - unsigned short status; - float y; - /* VAR (analog) */ - unsigned long store1; - unsigned long store2; - unsigned long timeCnt; - unsigned short counter_state; - unsigned long bootkey_old; - unsigned long systicks_old; - unsigned short musecs_old; - struct SysInfo sysinfo_inst; - signed long a11; - signed long a12; - signed long a21; - signed long a22; - /* VAR_INPUT (digital) */ - plcbit enable; -} LCRDifferentiate_typ; - -typedef struct LCRPIDTune -{ - /* VAR_INPUT (analog) */ - float Y_min; - float Y_max; - float Y0; - float Y1; - float X0; - float X_min; - float X_max; - signed short P_manualAdjust; - signed short I_manualAdjust; - signed short D_manualAdjust; - unsigned long request; - struct lcrpid_tune_addpar_typ* pAddPar; - struct lcrpid_tune_osc_options_typ* pOptions_osc; - struct lcrpid_tune_step_options_typ* pOptions_step; - /* VAR_OUTPUT (analog) */ - unsigned short status; - unsigned short addInfo; - unsigned long ident; - unsigned short state; - /* VAR (analog) */ - float t_autotune; - unsigned short status_tmp; - unsigned short counter_state; - unsigned long bootkey_old; - unsigned long systicks_old; - unsigned short musecs_old; - float e; - float e_minAmp; - float e_old_up; - float e_old_down; - float e_old; - struct SysInfo sysinfo_inst; - struct LCRMovAvgFlt MovAvgFlt_inst; - struct lcrpid_old_typ old; - struct lcrpid_procPar_typ processPar; - struct lcrpid_internal_typ internal_data; - struct lcrpid_tune_addpar_typ addPar; - struct lcrpid_tune_osc_typ oscillation; - struct lcrpid_tune_step_typ stepresponse; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit okToStep; - /* VAR_OUTPUT (digital) */ - plcbit rdyToStep; - /* VAR (digital) */ - plcbit curveDown; - plcbit curveUp; -} LCRPIDTune_typ; - -typedef struct LCRSlimPID -{ - /* VAR_INPUT (analog) */ - float W; - float X; - unsigned long request; - struct lcrslimpid_par_typ* pPar; - /* VAR_OUTPUT (analog) */ - float e; - float Y; - unsigned short status; - unsigned short addInfo; - /* VAR (analog) */ - struct LCRMovAvgFlt MovAvgFlt_inst; - struct LCRPIDTune PIDTune_inst; - struct LCRPID PID_inst; - unsigned long requ_old; - /* VAR_INPUT (digital) */ - plcbit enable; - /* VAR (digital) */ - plcbit enable_old; -} LCRSlimPID_typ; - -typedef struct LCRPFM -{ - /* VAR_INPUT (analog) */ - float x; - float max_value; - float min_value; - float t_pulse; - float t_pause; - /* VAR_OUTPUT (analog) */ - unsigned short status; - /* VAR (analog) */ - float area; - float area_c; - float range; - float last; - float tpls; - unsigned short counter_state; - unsigned long bootkey_old; - unsigned long systicks_old; - unsigned short musecs_old; - struct SysInfo sysinfo_inst; - /* VAR_INPUT (digital) */ - plcbit enable; - /* VAR_OUTPUT (digital) */ - plcbit pulse; - /* VAR (digital) */ - plcbit enable_old; -} LCRPFM_typ; - -typedef struct LCRTt -{ - /* VAR_INPUT (analog) */ - signed long Tt; - float x; - float y_set; - /* VAR_OUTPUT (analog) */ - float y; - unsigned short status; - /* VAR (analog) */ - signed long Ts; - signed long Tt_Max; - float* pRingBuf; - float* pBuf_OutIn; - unsigned char set_old; - unsigned char Set_y; - unsigned long Bootkey; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit set; - /* VAR (digital) */ - plcbit enable_old; -} LCRTt_typ; - -typedef struct LCRPT2 -{ - /* VAR_INPUT (analog) */ - float V; - float T1; - float T2; - float x; - float y_set; - unsigned char set; - /* VAR_OUTPUT (analog) */ - float y; - unsigned short status; - /* VAR (analog) */ - unsigned long x1_dbl_1; - unsigned long x1_dbl_2; - unsigned long x2_dbl_1; - unsigned long x2_dbl_2; - signed long Ts; - unsigned long Ts_dbl_1; - unsigned long Ts_dbl_2; - unsigned char set_old; - unsigned char Set_y; - unsigned long Bootkey; - /* VAR_INPUT (digital) */ - plcbit enable; -} LCRPT2_typ; - -typedef struct LCRSimModExt -{ - /* VAR_INPUT (analog) */ - signed long Tt_h; - signed long Tt_c; - float k_h; - float k_c; - float PT2_T1; - float PT2_T2; - float Temp_amb; - float Temp_c; - float Alpha_h; - float Alpha_c; - /* VAR_OUTPUT (analog) */ - float y; - unsigned short status; - /* VAR (analog) */ - struct LCRTt Tt_heat; - struct LCRTt Tt_cool; - float k_h_intern; - float k_c_intern; - struct LCRPT2 PT2; - float y_c; - float y_end; - float y_h; - unsigned long Bootkey; - /* VAR_INPUT (digital) */ - plcbit enable; - /* VAR (digital) */ - plcbit enable_old; -} LCRSimModExt_typ; - -typedef struct LCRPT1e -{ - /* VAR_INPUT (analog) */ - float V; - float T1; - float x; - float y_set; - unsigned char set; - /* VAR_OUTPUT (analog) */ - float y; - unsigned short status; - /* VAR (analog) */ - unsigned long x1_dbl_1; - unsigned long x1_dbl_2; - signed long Ts; - unsigned long Ts_dbl_1; - unsigned long Ts_dbl_2; - unsigned char set_old; - unsigned char Set_y; - unsigned long Bootkey; - /* VAR_INPUT (digital) */ - plcbit enable; -} LCRPT1e_typ; - -typedef struct LCRDblActPID -{ - /* VAR_INPUT (analog) */ - float W; - float X; - float Y_man; - unsigned char mode; - struct lcrdblpid_par_typ* pPar1; - struct lcrdblpid_par_typ* pPar2; - struct lcrpid_tune_addpar_typ* pAddPar; - struct lcrdblpid_tune_typ* pOpt; - /* VAR_OUTPUT (analog) */ - float e; - float Y1; - float Y2; - unsigned short status; - unsigned char tuneState; - /* VAR (analog) */ - struct LCRPID pid; - struct LCRPIDTune tune; - struct SysInfo sysinfo_inst; - float gradient; - float Y_avg; - unsigned long tcnt_1; - unsigned long tcnt_2; - float Tmeas; - float y_lim_old; - float p_fact; - unsigned long bootkey_old; - unsigned long systicks_old; - unsigned short musecs_old; - unsigned char use_par; - unsigned char meas; - unsigned char mode_old; - unsigned char tune_step; - unsigned char tune_grad; - unsigned char tune_2nd; - unsigned char invert; - unsigned char counter_state; - unsigned char mode_int; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit hold_I; - plcbit okToStep; - /* VAR_OUTPUT (digital) */ - plcbit rdyToStep; - /* VAR (digital) */ - plcbit enable_old; -} LCRDblActPID_typ; - -typedef struct LCRMinMax -{ - /* VAR_INPUT (analog) */ - float in; - /* VAR_OUTPUT (analog) */ - float out_min; - float out_max; - /* VAR_INPUT (digital) */ - plcbit reset; -} LCRMinMax_typ; - -typedef struct LCRTempPID -{ - /* VAR_INPUT (analog) */ - float Temp_set; - float Temp; - float Y_man; - unsigned long mode; - struct lcrtemp_set_typ* pSettings; - /* VAR_OUTPUT (analog) */ - float y_heat; - float y_cool; - unsigned short status; - /* VAR (analog) */ - struct LCRPID pid; - struct LCRPIDpara pid_para; - float Temp_set_delay; - float Temp_set_int; - float TempSetOld; - float delayCnt; - signed char stateOld; - signed char state; - float a; - struct SysInfo sysinfo_inst; - unsigned char para_check_done; - struct lcrtemp_pid_internal_typ internal_para; - float dbl_dt; - float tAlt; - float altTime; - float tKnick; - float fAlt; - float a_alt; - float a_e; - float a_internal; - float Temp_set_int_old1; - float Temp_set_int_old2; - float Temp_set_int_old3; - unsigned long mode_old; - unsigned long timestore1; - unsigned long timestore2; - float yManInternal; - unsigned long timeCnt; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit update; - /* VAR (digital) */ - plcbit delayFlag; - plcbit enable_old; - plcbit altActive; - plcbit err_flag; -} LCRTempPID_typ; - -typedef struct LCRPT2o -{ - /* VAR_INPUT (analog) */ - float V; - float D; - float Tf; - float u; - unsigned char Set_y; - float y_set; - /* VAR_OUTPUT (analog) */ - float y; - unsigned short status; - /* VAR (analog) */ - struct lcrpt2o_Internal_typ Internal; - /* VAR_INPUT (digital) */ - plcbit enable; -} LCRPT2o_typ; - -typedef struct LCRTempTune -{ - /* VAR_INPUT (analog) */ - float Temp_set; - float Temp; - struct lcrtemp_set_typ* pSettings; - /* VAR_OUTPUT (analog) */ - float y_heat; - float y_cool; - unsigned short status; - /* VAR (analog) */ - struct LCRPID pid; - struct LCRPIDpara pid_para; - struct LCRDifferentiate DT2; - struct LCRPT2o pt2; - float Temp_flt; - unsigned short step; - float t; - float Temp_start; - float mem00; - float cnt02; - float cnt33; - float cnt20; - float pem01; - float pem33; - float pem10; - float pem02; - float pem44; - float pem20; - float tol01; - float tol10; - float tol02; - float tol20; - float tol22; - float Temp_old; - float delta_Temp; - unsigned long tcnt_1; - unsigned long tcnt_2; - unsigned long tcnt_dT_1; - unsigned long tcnt_dT_2; - struct SysInfo sysinfo_inst; - float Temp_set_internal; - float timecounter; - struct lcrtemp_tune_internal_typ internal_para; - float dbl_dt; - unsigned long call_counter; - unsigned long store1; - unsigned long store2; - unsigned long timeCnt; - float timer2; - unsigned short waitCounter; - float Y_heat_tune_intern; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit start; - plcbit okToHeat; - plcbit okToFree; - plcbit okToFreeEnd; - plcbit okToCool; - plcbit okToCoolEnd; - /* VAR_OUTPUT (digital) */ - plcbit rdyToHeat; - plcbit rdyToFree; - plcbit rdyToFreeEnd; - plcbit rdyToCool; - plcbit rdyToCoolEnd; - plcbit done; - plcbit busy; - /* VAR (digital) */ - plcbit enable_old; -} LCRTempTune_typ; - -typedef struct LCRSchedulePWM -{ - /* VAR_INPUT (analog) */ - float Pmax; - unsigned short n; - unsigned long pPar; - float min_value; - float max_value; - float t_min_pulse; - float t_period; - /* VAR_OUTPUT (analog) */ - unsigned short status; - /* VAR (analog) */ - struct SysInfo sysinfo_inst; - unsigned long store1; - unsigned long store2; - unsigned long timeCnt; - unsigned short numberUnits; - unsigned short limFact; - float Pact; - float Pman; - float intern0[6]; - struct lcrschedule_par_typ* in; - /* VAR_INPUT (digital) */ - plcbit enable; - /* VAR (digital) */ - plcbit enable_old; - plcbit cmd_delay; - plcbit err_flag; - plcbit limAll; -} LCRSchedulePWM_typ; - - - -/* Prototyping of functions and function blocks */ -_BUR_PUBLIC void LCRPID(struct LCRPID* inst); -_BUR_PUBLIC void LCRScal(struct LCRScal* inst); -_BUR_PUBLIC void LCRCurveByPoints(struct LCRCurveByPoints* inst); -_BUR_PUBLIC void LCRPIDpara(struct LCRPIDpara* inst); -_BUR_PUBLIC void LCRContinServo(struct LCRContinServo* inst); -_BUR_PUBLIC void LCRPT1(struct LCRPT1* inst); -_BUR_PUBLIC void LCRRamp(struct LCRRamp* inst); -_BUR_PUBLIC void LCRIntegrate(struct LCRIntegrate* inst); -_BUR_PUBLIC void LCRLimit(struct LCRLimit* inst); -_BUR_PUBLIC void LCRLimScal(struct LCRLimScal* inst); -_BUR_PUBLIC void LCRPWM(struct LCRPWM* inst); -_BUR_PUBLIC void LCRMovAvgFlt(struct LCRMovAvgFlt* inst); -_BUR_PUBLIC void LCRTimeBasedOnOff(struct LCRTimeBasedOnOff* inst); -_BUR_PUBLIC void LCRDifferentiate(struct LCRDifferentiate* inst); -_BUR_PUBLIC void LCRSlimPID(struct LCRSlimPID* inst); -_BUR_PUBLIC void LCRPIDTune(struct LCRPIDTune* inst); -_BUR_PUBLIC void LCRPFM(struct LCRPFM* inst); -_BUR_PUBLIC void LCRSimModExt(struct LCRSimModExt* inst); -_BUR_PUBLIC void LCRTt(struct LCRTt* inst); -_BUR_PUBLIC void LCRPT2(struct LCRPT2* inst); -_BUR_PUBLIC void LCRPT1e(struct LCRPT1e* inst); -_BUR_PUBLIC void LCRDblActPID(struct LCRDblActPID* inst); -_BUR_PUBLIC void LCRMinMax(struct LCRMinMax* inst); -_BUR_PUBLIC void LCRTempPID(struct LCRTempPID* inst); -_BUR_PUBLIC void LCRTempTune(struct LCRTempTune* inst); -_BUR_PUBLIC void LCRPT2o(struct LCRPT2o* inst); -_BUR_PUBLIC void LCRSchedulePWM(struct LCRSchedulePWM* inst); - - -#ifdef __cplusplus -}; -#endif -#endif /* _LOOPCONR_ */ - diff --git a/example/AsProject/Logical/Libraries/_AS/MTBasics/Binary.lby b/example/AsProject/Logical/Libraries/_AS/MTBasics/Binary.lby new file mode 100644 index 0000000..685f24f --- /dev/null +++ b/example/AsProject/Logical/Libraries/_AS/MTBasics/Binary.lby @@ -0,0 +1,14 @@ + + + + + MTBasics.fun + MTBasics.typ + MTBasics.var + + + + + + + \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/_AS/MTBasics/MTBasics.fun b/example/AsProject/Logical/Libraries/_AS/MTBasics/MTBasics.fun new file mode 100644 index 0000000..0cca77e --- /dev/null +++ b/example/AsProject/Logical/Libraries/_AS/MTBasics/MTBasics.fun @@ -0,0 +1,369 @@ + +{REDUND_OK} FUNCTION_BLOCK MTBasicsDT1 (*First-order derivative action element.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *) + VAR_INPUT + Enable : BOOL; (*Enables/Disables the function block.*) + Gain : REAL; (*Gain factor.*) + TimeConstant : REAL; (*Time constant. Unit: [s]. Valid value range: TimeConstant >= 0.*) + Update : BOOL; (*Updates the parameters listed above on a rising edge.*) + In : REAL; (*Input value.*) + END_VAR + VAR_OUTPUT + Busy : BOOL; (*Function block is busy.*) + Active : BOOL; (*Function block is active.*) + Error : BOOL; (*Indicates an error.*) + StatusID : DINT; (*Status information.*) + UpdateDone : BOOL; (*Update is done.*) + Out : REAL; (*Output value.*) + SystemReference : {REDUND_UNREPLICABLE} UDINT; (*System reference.*) + END_VAR + VAR + Internal : MTBasicsDT1InternalType; (*Data for internal use.*) + END_VAR +END_FUNCTION_BLOCK + +{REDUND_OK} FUNCTION_BLOCK MTBasicsDT2 (*Second-order derivative action element.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *) + VAR_INPUT + Enable : BOOL; (*Enables/Disables the function block.*) + Gain : REAL; (*Gain factor.*) + TimeConstant1 : REAL; (*Time constant. Unit: [s]. Valid value range: TimeConstant1 >= 0.*) + TimeConstant2 : REAL; (*Time constant. Unit: [s]. Valid value range: TimeConstant2 >= 0.*) + Update : BOOL; (*Updates the parameters listed above on a rising edge.*) + In : REAL; (*Input value.*) + END_VAR + VAR_OUTPUT + Busy : BOOL; (*Function block is busy.*) + Active : BOOL; (*Function block is active.*) + Error : BOOL; (*Indicates an error.*) + StatusID : DINT; (*Status information.*) + UpdateDone : BOOL; (*Update is done.*) + Out : REAL; (*Output value.*) + SystemReference : {REDUND_UNREPLICABLE} UDINT; (*System reference.*) + END_VAR + VAR + Internal : MTBasicsDT2InternalType; (*Data for internal use.*) + END_VAR +END_FUNCTION_BLOCK + +{REDUND_OK} FUNCTION_BLOCK MTBasicsIntegrator (*Integrator.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *) + VAR_INPUT + Enable : BOOL; (*Enables/Disables the function block.*) + Gain : REAL; (*Gain factor. Valid value range: Gain >= 0.*) + Update : BOOL; (*Updates the parameters listed above on a rising edge.*) + In : REAL; (*Input value.*) + OutPresetValue : REAL; (*Preset value for Out output.*) + SetOut : BOOL; (*Sets Out to OutPresetValue on rising edge.*) + HoldOut : BOOL; (*Freezes the function block.*) + END_VAR + VAR_OUTPUT + Busy : BOOL; (*Function block is busy.*) + Active : BOOL; (*Function block is active.*) + Error : BOOL; (*Indicates an error.*) + StatusID : DINT; (*Status information.*) + UpdateDone : BOOL; (*Update is done.*) + Out : REAL; (*Output value.*) + SystemReference : {REDUND_UNREPLICABLE} UDINT; (*System reference.*) + END_VAR + VAR + Internal : MTBasicsIntegratorInternalType; (*Data for internal use.*) + END_VAR +END_FUNCTION_BLOCK + +{REDUND_OK} FUNCTION_BLOCK MTBasicsLevelController (*Level controller.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *) + VAR_INPUT + Enable : BOOL; (*Enables/Disables the function block.*) + Parameter : MTBasicsLevelCtrlParType; (*3-step controller parameters.*) + Update : BOOL; (*Updates the parameters listed above on a rising edge.*) + In : REAL; (*Input value.*) + END_VAR + VAR_OUTPUT + Active : BOOL; (*Function block is active.*) + Error : BOOL; (*Indicates an error.*) + StatusID : DINT; (*Status information.*) + UpdateDone : BOOL; (*Update is done.*) + Out : REAL; (*Output value.*) + END_VAR + VAR + Internal : MTBasicsLevelCtrlInternalType; (*Data for internal use.*) + END_VAR +END_FUNCTION_BLOCK + +{REDUND_OK} FUNCTION_BLOCK MTBasicsLimiter (*Limiter.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *) + VAR_INPUT + Enable : BOOL; (*Enables/Disables the function block.*) + MinOut : REAL; (*Lower output variable limit. Valid value range: MinOut < MaxOut.*) + MaxOut : REAL; (*Upper output variable limit. Valid value range: MaxOut > MinOut.*) + MaxPosSlewRate : REAL; (*Maximum output variable ramp for ramp-up. Unit: [1/s]. Valid value range: MaxPosSlewRate >= 0.*) + MaxNegSlewRate : REAL; (*Maximum output variable ramp for the ramp-down. Unit: [1/s]. Valid value range: MaxNegSlewRate >= 0.*) + Update : BOOL; (*Updates the parameters listed above on a rising edge.*) + In : REAL; (*Input value.*) + OutPresetValue : REAL; (*Preset value for Out output.*) + SetOut : BOOL; (*Sets Out to OutPresetValue on rising edge.*) + END_VAR + VAR_OUTPUT + Active : BOOL; (*Function block is active.*) + Error : BOOL; (*Indicates an error.*) + StatusID : DINT; (*Status information.*) + UpdateDone : BOOL; (*Update is done.*) + Out : REAL; (*Output value.*) + END_VAR + VAR + Internal : MTBasicsLimiterInternalType; (*Data for internal use.*) + END_VAR +END_FUNCTION_BLOCK + +{REDUND_OK} FUNCTION_BLOCK MTBasicsOscillationTuning (*Oscillation tuning for PID.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *) + VAR_INPUT + Enable : BOOL; (*Enables/Disables the function block.*) + SetValue : REAL; (*Reference variable (setpoint).*) + MinOut : REAL; (*Lower manipulated variable limit. Valid value range: MinOut < MaxOut.*) + MaxOut : REAL; (*Upper manipulated variable limit. Valid value range: MaxOut > MinOut.*) + Invert : BOOL; (*Inverts the direction of the controller.*) + Update : BOOL; (*Updates the parameters listed above on a rising edge.*) + ActValue : REAL; (*Actual measured value.*) + Start : BOOL; (*Starts the tuning (on positive edge).*) + END_VAR + VAR_OUTPUT + Active : BOOL; (*Function block is active.*) + Error : BOOL; (*Indicates an error.*) + StatusID : DINT; (*Status information.*) + UpdateDone : BOOL; (*Update is done.*) + Out : REAL; (*Output value (manipulated variable). Value range: MinOut <= Out <= MaxOut.*) + TuningActive : BOOL; (*Tuning is active.*) + TuningDone : BOOL; (*Tuning completed.*) + Quality : REAL; (*Quality of the oscillation tuning. Unit: [%]. Value range: 0 (low) ... 100 (high).*) + PIDParameters : MTPIDParametersType; (*PID parameters.*) + END_VAR + VAR + Internal : MTBasicsOscTuningInternalType; (*Data for internal use.*) + END_VAR +END_FUNCTION_BLOCK + +{REDUND_OK} FUNCTION_BLOCK MTBasicsPFM (*Pulse frequency modulator.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *) + VAR_INPUT + Enable : BOOL; (*Enables/Disables the function block.*) + PulseWidth : REAL; (*Pulse width at the output. Unit: [s]. Valid value range: PulseWidth >= task cycle time.*) + MinPause : REAL; (*Minimum pause between the pulses at the output. Unit: [s]. Valid value range: MinPause >= task cycle time.*) + Update : BOOL; (*Updates the parameters listed above on a rising edge.*) + DutyCycle : REAL; (*Input value.*) + END_VAR + VAR_OUTPUT + Active : BOOL; (*Function block is active.*) + Error : BOOL; (*Indicates an error.*) + StatusID : DINT; (*Status information.*) + UpdateDone : BOOL; (*Update is done.*) + Out : BOOL; (*Output value.*) + END_VAR + VAR + Internal : MTBasicsPFMInternalType; (*Data for internal use.*) + END_VAR +END_FUNCTION_BLOCK + +{REDUND_OK} FUNCTION_BLOCK MTBasicsPID (*PID controller.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *) + VAR_INPUT + Enable : BOOL; (*Enables/Disables the function block.*) + PIDParameters : MTPIDParametersType; (*PID parameters.*) + MinOut : REAL; (*Lower manipulated variable limit (lower modulation limit of the subsequent actuator).*) + MaxOut : REAL; (*Upper manipulated variable limit (upper modulation limit of the subsequent actuator).*) + Invert : BOOL; (*Reverses the effective direction of the controller.*) + Update : BOOL; (*Updates the parameters listed above on a rising edge.*) + SetValue : REAL; (*Set value (reference variable).*) + ActValue : REAL; (*Actual value (controlled variable).*) + IntegrationPartPresetValue : REAL; (*Preset value for the integral component IntegrationPart.*) + SetIntegrationPart : BOOL; (*A positive edge on SetIntegrationPart sets the integral component IntegrationPart of the PID controller to IntegrationPartPresetValue.*) + HoldOut : BOOL; (*Freezes the function block.*) + TrackingValue : REAL; (*Manipulated variable for manual mode.*) + EnableTracking : BOOL; (*Enables manual mode.*) + HoldIntegration : MTPIDIntegrationEnum; (*The integral component is kept depending on the direction.*) + END_VAR + VAR_OUTPUT + Busy : BOOL; (*Function block is busy.*) + Active : BOOL; (*Function block is active.*) + Error : BOOL; (*Indicates an error.*) + StatusID : DINT; (*Status information.*) + UpdateDone : BOOL; (*Update is done.*) + Out : REAL; (*Controller output. Value range: MinOut <= Out <= MaxOut.*) + ControlError : REAL; (*Control error.*) + ProportionalPart : REAL; (*Proportional component.*) + IntegrationPart : REAL; (*Integral component.*) + DerivativePart : REAL; (*Derivative component.*) + TrackingActive : BOOL; (*Tracking is active.*) + IntegrationStatus : MTPIDIntegrationEnum; (*Information about the current state of the integral component.*) + SystemReference : {REDUND_UNREPLICABLE} UDINT; (*System reference.*) + END_VAR + VAR + Internal : MTBasicsPIDInternalType; (*Data for internal use.*) + END_VAR +END_FUNCTION_BLOCK + +{REDUND_OK} FUNCTION_BLOCK MTBasicsPT1 (*First-order delay element.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *) + VAR_INPUT + Enable : BOOL; (*Enables/Disables the function block.*) + Gain : REAL; (*Gain factor.*) + TimeConstant : REAL; (*Time constant. Unit: [s]. Valid value range: TimeConstant >= 0.*) + Update : BOOL; (*Updates the parameters listed above on a rising edge.*) + In : REAL; (*Input value.*) + OutPresetValue : REAL; (*Preset value for Out output.*) + SetOut : BOOL; (*Sets Out to OutPresetValue on rising edge.*) + END_VAR + VAR_OUTPUT + Busy : BOOL; (*Function block is busy.*) + Active : BOOL; (*Function block is active.*) + Error : BOOL; (*Indicates an error.*) + StatusID : DINT; (*Status information.*) + UpdateDone : BOOL; (*Update is done.*) + Out : REAL; (*Output value.*) + SystemReference : {REDUND_UNREPLICABLE} UDINT; (*System reference.*) + END_VAR + VAR + Internal : MTBasicsPT1InternalType; (*Data for internal use.*) + END_VAR +END_FUNCTION_BLOCK + +{REDUND_OK} FUNCTION_BLOCK MTBasicsPT2 (*Second-order delay element.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *) + VAR_INPUT + Enable : BOOL; (*Enables/Disables the function block.*) + Gain : REAL; (*Gain.*) + TimeConstant1 : REAL; (*Time constant. Unit: [s]. Valid value range: TimeConstant1 >= 0.*) + TimeConstant2 : REAL; (*Time constant. Unit: [s]. Valid value range: TimeConstant2 >= 0.*) + Update : BOOL; (*Updates the parameters listed above on a rising edge.*) + In : REAL; (*Input value.*) + OutPresetValue : REAL; (*Preset value for Out output.*) + SetOut : BOOL; (*Sets Out to OutPresetValue on rising edge.*) + END_VAR + VAR_OUTPUT + Busy : BOOL; (*Function block is busy.*) + Active : BOOL; (*Function block is active.*) + Error : BOOL; (*Indicates an error.*) + StatusID : DINT; (*Status information.*) + UpdateDone : BOOL; (*Update is done.*) + Out : REAL; (*Output value.*) + SystemReference : {REDUND_UNREPLICABLE} UDINT; (*System reference.*) + END_VAR + VAR + Internal : MTBasicsPT2InternalType; (*Data for internal use.*) + END_VAR +END_FUNCTION_BLOCK + +{REDUND_OK} FUNCTION_BLOCK MTBasicsPWM (*Pulse width modulator.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *) + VAR_INPUT + Enable : BOOL; (*Enables/Disables the function block.*) + Mode : MTBasicsPWMModeEnum; (*Pulse mode.*) + MinPulseWidth : REAL; (*Minimum duration of the output actuator pulses and pauses. Unit: [s]. Valid value range: MinPulseWidth < Period.*) + Period : REAL; (*Period for the output actuator pulses. Unit: [s]. Valid value range: Period > task cycle time.*) + Update : BOOL; (*Updates the parameters listed above on a rising edge.*) + DutyCycle : REAL; (*Input value. Unit: [%]. Valid value range: 0 <= DutyCycle <= 100.*) + END_VAR + VAR_OUTPUT + Active : BOOL; (*Function block is active.*) + Error : BOOL; (*Indicates an error.*) + StatusID : DINT; (*Status information.*) + UpdateDone : BOOL; (*Update is done.*) + Out : BOOL; (*Output value.*) + END_VAR + VAR + Internal : MTBasicsPWMInternalType; (*Data for internal use.*) + END_VAR +END_FUNCTION_BLOCK + +{REDUND_CONTEXT} FUNCTION_BLOCK MTBasicsPWMSchedule (*Multiple pulse width modulator.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *) + VAR_INPUT + Enable : BOOL; (*Enables/Disables the function block.*) + Period : REAL; (*Period for the output actuator pulses. Unit: [s]. Permitted range of values: Period > Task cycle time.*) + MinPulseWidth : REAL; (*Minimum duration of the pulses. Unit: [s]. Permitted range of values: Task cycle time <= MinPulseWidth < Period.*) + MinPause : REAL; (*Minimum duration of the pauses. Unit: [s]. Permitted range of values: Task cycle time <= MinPause < Period.*) + Mode : MTBasicsPWMScheduleModeEnum; (*Pulse mode.*) + Update : BOOL; (*Updates the parameters listed above on a rising edge.*) + NumberOfInputs : UINT; (*Number of input signals. Permitted range of values: 0 < NumberOfInputs <= 500.*) + DutyCycle : {REDUND_UNREPLICABLE} UDINT; (*Address of an array of data type REAL with the duty cycles. Unit of the values of the array: [%]. Permitted range of values for the values of the assigned array: 0 <= DutyCycle[i] <= 100.*) + ZonePower : {REDUND_UNREPLICABLE} UDINT; (*Address of an array of data type REAL with the power of the zones. Unit of the values of the array: [kW]. Permitted range of values for the values of the assigned array: ZonePower[i] > 0.*) + MaxAveragePower : REAL; (*Maximum allowed average power of all zones per period. Unit: [kW]. Permitted range of values: MaxAveragePower > 0.*) + EnablePowerLimitation : BOOL; (*The power limitation is active as long as this input is set.*) + END_VAR + VAR_OUTPUT + Active : BOOL; (*Function block is active.*) + Error : BOOL; (*Indicates an error.*) + StatusID : DINT; (*Status information.*) + UpdateDone : BOOL; (*Update is done.*) + PulseWave : {REDUND_UNREPLICABLE} UDINT; (*Address of an array of data type BOOL with the pulses.*) + LimitedDutyCycle : {REDUND_UNREPLICABLE} UDINT; (*Address of an array of data type REAL with the limited duty cycles. Unit of the values of the array: [%].*) + OutputPower : REAL; (*Average power of all zones per period. Unit: [kW].*) + RequiredPower : REAL; (*Required power of all zones per period. Unit: [kW].*) + PowerLimitationActive : BOOL; (*The power limitation is active.*) + InLimitation : BOOL; (*The power of each zone is limited.*) + END_VAR + VAR + Internal : MTBasicsPWMScheduleInternalType; (*Data for internal use.*) + END_VAR +END_FUNCTION_BLOCK + +{REDUND_OK} FUNCTION_BLOCK MTBasicsStepTuning (*Step tuning for PID.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *) + VAR_INPUT + Enable : BOOL; (*Enables/Disables the function block.*) + SystemSettlingTime : REAL; (*System settling time.*) + MaxTuningTime : REAL; (*Maximum tuning time*) + MinActValue : REAL; (*Minimum value of the controlled variable.*) + MaxActValue : REAL; (*Maximum value of the controlled variable.*) + Update : BOOL; (*Updates the parameters listed above on a rising edge.*) + ActValue : REAL; (*Actual measured value.*) + StepHeight : REAL; (*Height of step to be applied.*) + Start : BOOL; (*Starts the tuning (on positive edge).*) + END_VAR + VAR_OUTPUT + Active : BOOL; (*Function block is active.*) + Error : BOOL; (*Indicates an error.*) + StatusID : DINT; (*Status information.*) + UpdateDone : BOOL; (*Update is done.*) + Out : REAL; (*Output value (manipulated variable). Value range: MinOut <= Out <= MaxOut.*) + TuningActive : BOOL; (*Tuning is active.*) + TuningDone : BOOL; (*Tuning completed.*) + PIDParameters : MTPIDParametersType; (*PID parameters.*) + Quality : REAL; (*Quality of the step tuning. Unit: [%]. Value range: 0 (low) ... 100 (high).*) + TuningState : MTBasicsStepTuningStateEnum; (*Current state of the tuning procedure.*) + END_VAR + VAR + Internal : MTBasicsStepTuningInternalType; (*Data for internal use.*) + END_VAR +END_FUNCTION_BLOCK + +{REDUND_CONTEXT} FUNCTION_BLOCK MTBasicsTimeDelay (*Delay element.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *) + VAR_INPUT + Enable : BOOL; (*Enables/Disables the function block.*) + DelayTime : REAL; (*Delay time. Unit: [s]. Valid value range: 0 <= DelayTime <= "10000 task cycle time".*) + In : REAL; (*Input value.*) + InitialValue : REAL; (*Initial value for Out output.*) + END_VAR + VAR_OUTPUT + Active : BOOL; (*Function block is active.*) + Error : BOOL; (*Indicates an error.*) + StatusID : DINT; (*Status information.*) + Out : REAL; (*Output value.*) + END_VAR + VAR + Internal : MTBasicsTimeDelayInternalType; (*Data for internal use.*) + END_VAR +END_FUNCTION_BLOCK + +{REDUND_OK} FUNCTION_BLOCK MTBasicsTransferFcn (*This function block implements a general continuous transfer function G(s). Optional it is possible to implement a discrete transfer function G(z) with DiscreteSampleTime > 0.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *) + VAR_INPUT + Enable : BOOL; (*Enable function block.*) (* *) (*#PAR#*) + Numerator : ARRAY[0..5] OF REAL; (*Coefficients of numerator [b0, b1, b2, ... bn].*) (* *) (*#PAR#*) + Denominator : ARRAY[0..5] OF REAL; (*Coefficients of denominator [a0, a1, a2, ... an].*) (* *) (*#PAR#*) + Mode : MTBasicsTransferFcnModeEnum; (*Mode for transfer function: mtBASICS_CONTINUOUS_TRANSFER_FCN ... continuous transfer fcn; mtBASICS_DISCRETE_TRANSFER_FCN ... discrete transfer function.*) (* *) (*#PAR#OPT#*) + Update : BOOL; (*Parameters update trigger.*) (* *) (*#PAR#*) + In : REAL; (*Input variable.*) (* *) (*#CYC#*) + OutPresetValue : REAL; (*Preset value for Out.*) (* *) (*#CMD#OPT#*) + SetOut : BOOL; (*Sets Out to OutPresetValue on rising edge.*) (* *) (*#CMD#OPT#*) + END_VAR + VAR_OUTPUT + Busy : BOOL; (*Function block is working.*) (* *) (*#PAR#*) + Active : BOOL; (*Function block is active.*) (* *) (*#PAR#*) + Error : BOOL; (*Indicates an error.*) (* *) (*#PAR#*) + StatusID : DINT; (*Status information.*) (* *) (*#PAR#*) + UpdateDone : BOOL; (*Update is sucessful.*) (* *) (*#PAR#*) + Out : REAL; (*Output variable.*) (* *) (*#CYC#*) + SystemReference : {REDUND_UNREPLICABLE} UDINT; (*System reference.*) (* *) (*#CMD#OPT#*) + END_VAR + VAR + Internal : MTBasicsTransferFcnInternalType; (*Data for internal use.*) + END_VAR +END_FUNCTION_BLOCK diff --git a/example/AsProject/Logical/Libraries/_AS/MTBasics/MTBasics.typ b/example/AsProject/Logical/Libraries/_AS/MTBasics/MTBasics.typ new file mode 100644 index 0000000..a346f92 --- /dev/null +++ b/example/AsProject/Logical/Libraries/_AS/MTBasics/MTBasics.typ @@ -0,0 +1,380 @@ + +TYPE + MTBasicsDT1InternalType : STRUCT (*Internal variables of function block MTBasicsDT1.*) + CycleTime : REAL; (*Task cycle time. Unit: [s].*) + ParametersValid : BOOL; (*Data for internal use.*) + Gain : REAL; (*Data for internal use.*) + TimeConstant : REAL; (*Data for internal use.*) + Numerator : ARRAY[0..1]OF LREAL; (*Data for internal use.*) + Denominator : ARRAY[0..1]OF LREAL; (*Data for internal use.*) + BVector : ARRAY[0..1]OF LREAL; (*Data for internal use.*) + AVector : ARRAY[0..1]OF LREAL; (*Data for internal use.*) + XVector : ARRAY[0..1]OF LREAL; (*Data for internal use.*) + PresetOK : BOOL; (*Data for internal use.*) + PresetCoefficients : LREAL; (*Data for internal use.*) + InOld : REAL; (*Data for internal use.*) + UpdateOld : BOOL; (*Data for internal use.*) + EnableOld : BOOL; (*Data for internal use.*) + EnableDone : BOOL; (*Data for internal use.*) + DisabledBusy : BOOL; (*Data for internal use.*) + CounterOld : UDINT; (*Data for internal use.*) + SysRefParaNew : BOOL; (*Data for internal use.*) + SystemReference : MTTransferFcnType; (*Data for internal use.*) + END_STRUCT; + MTBasicsDT2InternalType : STRUCT (*Internal variables of function block MTBasicsDT2.*) + CycleTime : REAL; (*Task cycle time. Unit: [s].*) + ParametersValid : BOOL; (*Data for internal use.*) + Gain : REAL; (*Data for internal use.*) + TimeConstant1 : REAL; (*Data for internal use.*) + TimeConstant2 : REAL; (*Data for internal use.*) + Numerator : ARRAY[0..2]OF LREAL; (*Data for internal use.*) + Denominator : ARRAY[0..2]OF LREAL; (*Data for internal use.*) + BVector : ARRAY[0..2]OF LREAL; (*Data for internal use.*) + AVector : ARRAY[0..2]OF LREAL; (*Data for internal use.*) + XVector : ARRAY[0..1]OF LREAL; (*Data for internal use.*) + PresetOK : BOOL; (*Data for internal use.*) + PresetCoefficients : LREAL; (*Data for internal use.*) + InOld : REAL; (*Data for internal use.*) + UpdateOld : BOOL; (*Data for internal use.*) + EnableOld : BOOL; (*Data for internal use.*) + EnableDone : BOOL; (*Data for internal use.*) + DisabledBusy : BOOL; (*Data for internal use.*) + CounterOld : UDINT; (*Data for internal use.*) + SysRefParaNew : BOOL; (*Data for internal use.*) + SystemReference : MTTransferFcnType; (*Data for internal use.*) + END_STRUCT; + MTBasicsIntegratorInternalType : STRUCT (*Internal variables of function block MTBasicsIntegrator.*) + CycleTime : REAL; (*Task cycle time. Unit: [s].*) + ParametersValid : BOOL; (*Data for internal use.*) + Gain : REAL; (*Data for internal use.*) + BVector : ARRAY[0..1]OF LREAL; (*Data for internal use.*) + AVector : ARRAY[0..1]OF LREAL; (*Data for internal use.*) + XVector : LREAL; (*Data for internal use.*) + OutPresetValue : REAL; (*Data for internal use.*) + SetOutOld : BOOL; (*Data for internal use.*) + UpdateOld : BOOL; (*Data for internal use.*) + EnableOld : BOOL; (*Data for internal use.*) + EnableDone : BOOL; (*Data for internal use.*) + DisabledBusy : BOOL; (*Data for internal use.*) + CounterOld : UDINT; (*Data for internal use.*) + SysRefParaNew : BOOL; (*Data for internal use.*) + SystemReference : MTTransferFcnType; (*Data for internal use.*) + END_STRUCT; + MTBasicsLevelCtrlInternalType : STRUCT (*Internal variables of function block MTBasicsLevelController.*) + CycleTime : REAL; (*Task cycle time. Unit: [s].*) + ParametersValid : BOOL; (*Data for internal use.*) + Parameter : MTBasicsLevelCtrlParType; (*Data for internal use.*) + State : USINT; (*Data for internal use.*) + UpdateOld : BOOL; (*Data for internal use.*) + EnableOld : BOOL; (*Data for internal use.*) + END_STRUCT; + MTBasicsLevelCtrlParType : STRUCT (*Level controller parameters.*) + OutputValue1 : REAL; (*1st Output value.*) + OutputValue2 : REAL; (*2nd Output value.*) + OutputValue3 : REAL; (*3rd Output value.*) + ThresholdLevel1 : REAL; (*Threshold level from OutputValue2 to OutputValue1.*) + ThresholdLevel2 : REAL; (*Threshold level from OutputValue1 to OutputValue2.*) + ThresholdLevel3 : REAL; (*Threshold level from OutputValue3 to OutputValue2.*) + ThresholdLevel4 : REAL; (*Threshold level from OutputValue2 to OutputValue3.*) + END_STRUCT; + MTBasicsLimiterInternalType : STRUCT (*Internal variables of function block MTBasicsLimiter.*) + CycleTime : REAL; (*Task cycle time. Unit: [s].*) + ParametersValid : BOOL; (*Data for internal use.*) + MaxOut : REAL; (*Data for internal use.*) + MinOut : REAL; (*Data for internal use.*) + MaxPosSlewRate : REAL; (*Data for internal use.*) + MaxNegSlewRate : REAL; (*Data for internal use.*) + Out : REAL; (*Data for internal use.*) + OutOld : REAL; (*Data for internal use.*) + UpperOutLimit : REAL; (*Data for internal use.*) + LowerOutLimit : REAL; (*Data for internal use.*) + SetOutOld : BOOL; (*Data for internal use.*) + UpdateOld : BOOL; (*Data for internal use.*) + EnableOld : BOOL; (*Data for internal use.*) + END_STRUCT; + MTBasicsOscTuningInternalType : STRUCT (*Internal variables of function block MTBasicsOscillationTuning.*) + CycleTime : REAL; (*Task cycle time. Unit: [s].*) + ParametersValid : BOOL; (*Data for internal use.*) + State : USINT; (*State of tuning.*) + CriticalGain : REAL; (*Critical gain.*) + OscillationPeriod : REAL; (*Period of oscillation.*) + NumberOfOscillations : USINT; (*Number of osscilations.*) + NumberOfPhases : USINT; (*Number of current tuning phase.*) + MaxRelayOut : REAL; (*Lower limit for output during tuning.*) + MinRelayOut : REAL; (*Upper limit for output during tuning.*) + SetValue : REAL; (*Data for internal use.*) + AverageOutValue : REAL; (*Data for internal use.*) + MaxActValueTime : ARRAY[0..3]OF REAL; (*Data for internal use.*) + MinActValueTime : ARRAY[0..3]OF REAL; (*Data for internal use.*) + MaxActValue : ARRAY[0..3]OF REAL; (*Data for internal use.*) + MinActValue : ARRAY[0..3]OF REAL; (*Data for internal use.*) + TuningTime : REAL; (*Data for internal use.*) + StartingActValue : REAL; (*Data for internal use.*) + ControlError : REAL; (*Data for internal use.*) + ActValueAverageAmplitude : REAL; (*Data for internal use.*) + AverageActValue : REAL; (*Data for internal use.*) + AverageMaxActValue : REAL; (*Data for internal use.*) + AverageMinActValue : REAL; (*Data for internal use.*) + AmplitudeRatio : REAL; (*Data for internal use.*) + DeltaOut : REAL; (*Data for internal use.*) + EffectiveDirection : SINT; (*Data for internal use.*) + StartOld : BOOL; (*Data for internal use.*) + MinOscillationAmplitude : REAL; (*Data for internal use.*) + MinOut : REAL; (*Data for internal use.*) + MaxOut : REAL; (*Data for internal use.*) + TemporaryQuality : REAL; (*Data for internal use.*) + TemporaryDerivativeTime : REAL; (*Data for internal use.*) + TemporaryIntegrationTime : REAL; (*Data for internal use.*) + TemporaryGain : REAL; (*Data for internal use.*) + Update : BOOL; (*Data for internal use.*) + UpdateOld : BOOL; (*Data for internal use.*) + EnableOld : BOOL; (*Data for internal use.*) + AverageOutValueSum : REAL; (*Data for internal use.*) + AverageTime : LREAL; (*Data for internal use.*) + END_STRUCT; + MTBasicsPFMInternalType : STRUCT (*Internal variables of function block MTBasicsPFM.*) + CycleTime : REAL; (*Task cycle time. Unit: [s].*) + ParametersValid : BOOL; (*Data for internal use.*) + PulseWidth : REAL; (*Data for internal use.*) + In : REAL; (*Data for internal use.*) + OnTime : REAL; (*Data for internal use.*) + OffTime : REAL; (*Data for internal use.*) + PeriodCounter : REAL; (*Data for internal use.*) + MinPause : REAL; (*Data for internal use.*) + UpdateOld : BOOL; (*Data for internal use.*) + EnableOld : BOOL; (*Data for internal use.*) + END_STRUCT; + MTBasicsPIDInternalType : STRUCT (*Internal variables of function block MTBasicsPID.*) + CycleTime : REAL; (*Task cycle time. Unit: [s].*) + ParametersValid : BOOL; (*Data for internal use.*) + PIDParameters : MTPIDParametersType; (*Data for internal use.*) + MinOut : REAL; (*Data for internal use.*) + MaxOut : REAL; (*Data for internal use.*) + Invert : BOOL; (*Data for internal use.*) + ControlError : REAL; (*Data for internal use.*) + ControlErrorOld : REAL; (*Data for internal use.*) + Out : REAL; (*Data for internal use.*) + HoldIntegration : MTPIDIntegrationEnum; (*Data for internal use.*) + IntegrationPartPresetValue : REAL; (*Data for internal use.*) + SetIntegrationPart : BOOL; (*Data for internal use.*) + SetIntegrationPartOld : BOOL; (*Data for internal use.*) + EnableTrackingOld : BOOL; (*Data for internal use.*) + PID_StatusID : DINT; (*Data for internal use.*) + UpdateOld : BOOL; (*Data for internal use.*) + EnableOld : BOOL; (*Data for internal use.*) + EnableDone : BOOL; (*Data for internal use.*) + DisabledBusy : BOOL; (*Data for internal use.*) + CounterOld : UDINT; (*Data for internal use.*) + SysRefParaNew : BOOL; (*Data for internal use.*) + SystemReference : MTTransferFcnType; (*Data for internal use.*) + PIDParametersLREAL : MTBasicsPIDParametersType; (*Data for internal use.*) + PIDOutput : LREAL; (*Data for internal use.*) + ProportionalPart : LREAL; (*Data for internal use.*) + IntegrationPart : LREAL; (*Data for internal use.*) + DerivativePart : LREAL; (*Data for internal use.*) + END_STRUCT; + MTBasicsPT1InternalType : STRUCT (*Internal variables of function block MTBasicsPT1.*) + CycleTime : REAL; (*Task cycle time. Unit: [s].*) + ParametersValid : BOOL; (*Data for internal use.*) + Gain : REAL; (*Data for internal use.*) + TimeConstant : REAL; (*Data for internal use.*) + Numerator : ARRAY[0..1]OF LREAL; (*Data for internal use.*) + Denominator : ARRAY[0..1]OF LREAL; (*Data for internal use.*) + BVector : ARRAY[0..1]OF LREAL; (*Data for internal use.*) + AVector : ARRAY[0..1]OF LREAL; (*Data for internal use.*) + XVector : ARRAY[0..1]OF LREAL; (*Data for internal use.*) + OutPresetValue : REAL; (*Data for internal use.*) + PresetCoefficients : LREAL; (*Data for internal use.*) + PresetOK : BOOL; (*Data for internal use.*) + SetOutOld : BOOL; (*Data for internal use.*) + UpdateOld : BOOL; (*Data for internal use.*) + EnableOld : BOOL; (*Data for internal use.*) + EnableDone : BOOL; (*Data for internal use.*) + DisabledBusy : BOOL; (*Data for internal use.*) + CounterOld : UDINT; (*Data for internal use.*) + SysRefParaNew : BOOL; (*Data for internal use.*) + SystemReference : MTTransferFcnType; (*Data for internal use.*) + END_STRUCT; + MTBasicsPT2InternalType : STRUCT (*Internal variables of function block MTBasicsPT2.*) + CycleTime : REAL; (*Task cycle time. Unit: [s].*) + ParametersValid : BOOL; (*Data for internal use.*) + Gain : REAL; (*Data for internal use.*) + TimeConstant1 : REAL; (*Data for internal use.*) + TimeConstant2 : REAL; (*Data for internal use.*) + Numerator : ARRAY[0..2]OF LREAL; (*Data for internal use.*) + Denominator : ARRAY[0..2]OF LREAL; (*Data for internal use.*) + BVector : ARRAY[0..2]OF LREAL; (*Data for internal use.*) + AVector : ARRAY[0..2]OF LREAL; (*Data for internal use.*) + XVector : ARRAY[0..1]OF LREAL; (*Data for internal use.*) + OutPresetValue : REAL; (*Data for internal use.*) + PresetCoefficients : LREAL; (*Data for internal use.*) + PresetOK : BOOL; (*Data for internal use.*) + SetOutOld : BOOL; (*Data for internal use.*) + UpdateOld : BOOL; (*Data for internal use.*) + EnableOld : BOOL; (*Data for internal use.*) + EnableDone : BOOL; (*Data for internal use.*) + DisabledBusy : BOOL; (*Data for internal use.*) + CounterOld : UDINT; (*Data for internal use.*) + SysRefParaNew : BOOL; (*Data for internal use.*) + SystemReference : MTTransferFcnType; (*Data for internal use.*) + END_STRUCT; + MTBasicsPWMInternalType : STRUCT (*Internal variables of function block MTBasicsPWM.*) + CycleTime : REAL; (*Task cycle time. Unit: [s].*) + ParametersValid : BOOL; (*Data for internal use.*) + Mode : MTBasicsPWMModeEnum; (*Data for internal use.*) + MinPulseWidth : REAL; (*Data for internal use.*) + Period : REAL; (*Data for internal use.*) + In : REAL; (*Data for internal use.*) + OnTime : REAL; (*Data for internal use.*) + OffTime : REAL; (*Data for internal use.*) + PeriodCounter : REAL; (*Data for internal use.*) + OnTimeCounter : REAL; (*Data for internal use.*) + UpdateOld : BOOL; (*Data for internal use.*) + EnableOld : BOOL; (*Data for internal use.*) + END_STRUCT; + MTBasicsPWMModeEnum : + ( (*Pulse mode.*) + mtBASICS_PULSE_BEGINNING := 0, (*Pulse at the beginning of a period.*) + mtBASICS_PULSE_MIDDLE := 1 (*Pulse in the middle of a period.*) + ); + MTBasicsPWMScheduleBufferPtrType : STRUCT (*Buffer pointers of the PWMSchedule.*) + OnTime1 : REAL; (*Data for internal use.*) + OnTime2 : REAL; (*Data for internal use.*) + OffTime1 : REAL; (*Data for internal use.*) + OffTime2 : REAL; (*Data for internal use.*) + END_STRUCT; + MTBasicsPWMScheduleBufferType : STRUCT (*Buffer parameters of the PWMSchedule.*) + ActIndex : UINT; (*Data for internal use.*) + NrOfBufferElements : UINT; (*Data for internal use.*) + TimePar : REFERENCE TO MTBasicsPWMScheduleBufferPtrType; (*Data for internal use.*) + DutyCycle : REFERENCE TO REAL; (*Data for internal use.*) + ZonePower : REFERENCE TO REAL; (*Data for internal use.*) + Out : REFERENCE TO BOOL; (*Data for internal use.*) + END_STRUCT; + MTBasicsPWMScheduleInternalType : STRUCT (*Internal variables of function block MTBasicsPWM.*) + CycleTime : REAL; (*Task cycle time. Unit: [s].*) + Period : REAL; (*Data for internal use.*) + MinPulseWidth : REAL; (*Data for internal use.*) + MinPause : REAL; (*Data for internal use.*) + MaxAveragePower : REAL; (*Data for internal use.*) + FreeDutyCycle : REAL; (*Data for internal use.*) + PeriodCounter : REAL; (*Data for internal use.*) + OutputPower : REAL; (*Data for internal use.*) + RequiredPower : REAL; (*Data for internal use.*) + LimitationFactor : REAL; (*Data for internal use.*) + EnablePowerLimitationOld : {REDUND_UNREPLICABLE} BOOL; (*Data for internal use.*) + EnableOld : {REDUND_UNREPLICABLE} BOOL; (*Data for internal use.*) + UpdateOld : BOOL; (*Data for internal use.*) + EnableParametersValid : BOOL; (*Data for internal use.*) + PowerParValid : BOOL; (*Data for internal use.*) + ParametersValid : BOOL; (*Data for internal use.*) + Mode : MTBasicsPWMScheduleModeEnum; (*Data for internal use.*) + Buffer : MTBasicsPWMScheduleBufferType; (*Data for internal use.*) + END_STRUCT; + MTBasicsPWMScheduleModeEnum : + ( (*PWMSchedule mode.*) + mtBASICS_SHIFT_PULSE := 0, (*Shifts the entire pulse within a period.*) + mtBASICS_SPLIT_PULSE := 1 (*Splits up the pulse within a period.*) + ); + MTBasicsStepTuningBufElemType : STRUCT (*Buffer element of MTBasicsStepTuning.*) + TimeIndex : UDINT; (*Data for internal use.*) + In : LREAL; (*Data for internal use.*) + IntIn : LREAL; (*Data for internal use.*) + IntTimeIn : LREAL; (*Data for internal use.*) + IntTime2In : LREAL; (*Data for internal use.*) + Int2In : LREAL; (*Data for internal use.*) + Int3In : LREAL; (*Data for internal use.*) + TSum : LREAL; (*Data for internal use.*) + dTSum : LREAL; (*Data for internal use.*) + d2TSum : LREAL; (*Data for internal use.*) + dyACD : LREAL; (*Data for internal use.*) + d2yACD : LREAL; (*Data for internal use.*) + d3yACD : LREAL; (*Data for internal use.*) + DiffIn : LREAL; (*Data for internal use.*) + Diff2In : LREAL; (*Data for internal use.*) + END_STRUCT; + MTBasicsStepTuningInternalType : STRUCT (*Internal variables of function block MTBasicsStepTuning.*) + CycleTime : REAL; (*Task cycle time. Unit: [s].*) + ParametersValid : BOOL; (*Data for internal use.*) + MinActValue : REAL; (*Data for internal use.*) + MaxActValue : REAL; (*Data for internal use.*) + MaxTuningTime : REAL; (*Data for internal use.*) + StepHeight : REAL; (*Data for internal use.*) + State : MTBasicsStepTuningStateEnum; (*Data for internal use.*) + TuningTime : REAL; (*Data for internal use.*) + Area : REAL; (*Data for internal use.*) + StartActValue : REAL; (*Data for internal use.*) + SumTime : REAL; (*Data for internal use.*) + PlantGain : REAL; (*Data for internal use.*) + LQError : REAL; (*Data for internal use.*) + LQOutput : ARRAY[0..1]OF REAL; (*Data for internal use.*) + LQParameterVector : ARRAY[0..2]OF REAL; (*Data for internal use.*) + ActValueOld : REAL; (*Data for internal use.*) + SystemSettlingTime : REAL; (*Data for internal use.*) + SettlingIndex : UINT; (*Data for internal use.*) + NumberOfSettlingValues : UINT; (*Data for internal use.*) + NoiseDeadBand : REAL; (*Data for internal use.*) + StartOld : BOOL; (*Data for internal use.*) + UpdateOld : BOOL; (*Data for internal use.*) + EnableOld : BOOL; (*Data for internal use.*) + Slope : REAL; (*Data for internal use.*) + END_STRUCT; + MTBasicsStepTuningStateEnum : + ( (*Tuning state.*) + mtBASICS_STATE_READY := 1, (*The function block waits for a rising edge of Start.*) + mtBASICS_STATE_SETTLING := 2, (*It is checked, if the system is in an idle state.*) + mtBASICS_STATE_STEP := 3, (*The output Out is set to the value StepHeight.*) + mtBASICS_STATE_CALCULATE_PID := 4 (*PID parameters are calculated.*) + ); + MTBasicsTimeDelayFcnParaType : STRUCT (*Internal variables for time delay function parameters.*) + DelayCounter : UDINT; (*Data for internal use.*) + ActBufferIndex : UDINT; (*Data for internal use.*) + ActBufferElements : UDINT; (*Data for internal use.*) + OldBufferElements : UDINT; (*Data for internal use.*) + DelayTimeAct : REAL; (*Data for internal use.*) + BufferPointer : REFERENCE TO REAL; (*Data for internal use.*) + END_STRUCT; + MTBasicsTimeDelayInternalType : STRUCT (*Internal variables of function block MTBasicsTimeDelay.*) + CycleTime : REAL; (*Task cycle time. Unit: [s].*) + DelayTime : REAL; (*Data for internal use.*) + ParametersValid : BOOL; (*Data for internal use.*) + InitialValue : REAL; (*Data for internal use.*) + EnableOld : BOOL; (*Data for internal use.*) + TimeDelayFcnPara : {REDUND_UNREPLICABLE} MTBasicsTimeDelayFcnParaType; (*Data for internal use.*) + END_STRUCT; + MTBasicsTransferFcnModeEnum : + ( (*Transfer function mode.*) + mtBASICS_CONTINUOUS_TRANSFER_FCN := 0, (*Continuous transfer function.*) + mtBASICS_DISCRETE_TRANSFER_FCN := 1 (*Discrete transfer function. Sample time = cycle time.*) + ); + MTBasicsTransferFcnInternalType : STRUCT (*Internal variables of function block MTBasicsTransferFcn.*) + CycleTime : REAL; (*Task cycle time. Unit: [s].*) + UpdateOld : BOOL; (*Data for internal use.*) + EnableOld : BOOL; (*Data for internal use.*) + EnableDone : BOOL; (*Data for internal use.*) + DisabledBusy : USINT; (*Data for internal use.*) + ParametersValid : BOOL; (*Data for internal use.*) + Numerator : ARRAY[0..5]OF LREAL; (*Data for internal use.*) + Denominator : ARRAY[0..5]OF LREAL; (*Data for internal use.*) + Mode : MTBasicsTransferFcnModeEnum; (*Data for internal use.*) + SysRefParaNew : BOOL; (*Data for internal use.*) + CounterOld : UDINT; (*Data for internal use.*) + Order : USINT; (*Data for internal use.*) + PresetOK : BOOL; (*Data for internal use.*) + PresetCoefficients : LREAL; (*Data for internal use.*) + BVector : ARRAY[0..5]OF LREAL; (*Data for internal use.*) + AVector : ARRAY[0..5]OF LREAL; (*Data for internal use.*) + XVector : ARRAY[0..4]OF LREAL; (*Data for internal use.*) + OutPresetValue : REAL; (*Data for internal use.*) + SetOut : BOOL; (*Data for internal use.*) + SetOutOld : BOOL; (*Data for internal use.*) + nTmp : USINT; (*Data for internal use.*) + SystemReference : MTTransferFcnType; (*Data for internal use.*) + END_STRUCT; + MTBasicsPIDParametersType : STRUCT (*PID parameters type.*) + Gain : LREAL; (*Proportional gain. Permitted range of values: Gain> 0.*) + IntegrationTime : LREAL; (*Integral action time of the integral component. Unit: [s]. Permitted range of values: IntegrationTime = 0s or IntegrationTime >= task cycle time*) + DerivativeTime : LREAL; (*Derivative time (derivative action time) of the derivative component. Unit: [s]. Permitted range of values: DerivativeTime >= 0s.*) + FilterTime : LREAL; (*Filter time constant of the derivative component. Unit: [s]. Permitted range of values: FilterTime >= 0s.*) + END_STRUCT; +END_TYPE diff --git a/example/AsProject/Logical/Libraries/_AS/MTBasics/MTBasics.var b/example/AsProject/Logical/Libraries/_AS/MTBasics/MTBasics.var new file mode 100644 index 0000000..f66bb71 --- /dev/null +++ b/example/AsProject/Logical/Libraries/_AS/MTBasics/MTBasics.var @@ -0,0 +1,66 @@ +(*Error*) +VAR CONSTANT + mtBCD_ERR_TIME_CONSTANT1_INVALID : DINT := -1058012139; (*Chosen first time constant is invalid.*) + mtBCD_ERR_TIME_CONSTANT2_INVALID : DINT := -1058012138; (*Chosen second time constant is invalid.*) + mtBCD_ERR_THRESHOLD_NOT_DEFINED : DINT := -1058012137; (*Chosen values for the threshold levels are invalid.*) + mtBCD_ERR_THRESHOLD_INVALID : DINT := -1058012136; (*One of the values for the threshold levels is invalid.*) + mtBCD_ERR_OUT_VALUE_NOT_DEFINED : DINT := -1058012135; (*Chosen output values are invalid.*) + mtBCD_ERR_OUTPUT_LIMIT_INVALID : DINT := -1058012134; (*Chosen limitations for output are invalid.*) + mtBCD_ERR_MAX_POS_SLEW_RATE_NEG : DINT := -1058012133; (*Chosen slew rate for positive direction is invalid.*) + mtBCD_ERR_MAX_NEG_SLEW_RATE_NEG : DINT := -1058012132; (*Chosen slew rate for negative direction is invalid.*) + mtBCD_ERR_PULSE_WIDTH_LOW : DINT := -1058012131; (*Chosen pulse width is too low.*) + mtBCD_ERR_MIN_PAUSE_LOW : DINT := -1058012130; (*The selected minimum pause duration is too low.*) + mtBCD_ERR_MIN_PULSE_HIGH : DINT := -1058012124; (*The selected minimum pulse duration is too high.*) + mtBCD_ERR_MIN_PULSE_LOW : DINT := -1058012123; (*The selected minimum pulse duration is too low.*) + mtBCD_ERR_PERIOD_LOW : DINT := -1058012122; (*The selected period duration is too low.*) + mtBCD_ERR_NUMBER_OF_INPUTS : DINT := -1058012121; (*The selected number of inputs is invalid.*) + mtBCD_ERR_SAMPLING_INVALID : DINT := -1058012118; (*The period of the generated oscillation is invalid. *) + mtBCD_ERR_SETTLING_TIME_INVALID : DINT := -1058012117; (*Chosen duration, in which the settling of the system is detected, is invalid.*) + mtBCD_ERR_TUNING_TIME_INVALID : DINT := -1058012116; (*Chosen maximum tuning time is invalid.*) + mtBCD_ERR_ACT_VALUE_NOT_STABLE : DINT := -1058012115; (*The system is not in a settled operating point.*) + mtBCD_ERR_RANGE_INVALID : DINT := -1058012114; (*Chosen limitations for the input are invalid.*) + mtBCD_ERR_TUNING_INVALID : DINT := -1058012113; (*Tuning was not successful.*) + mtBCD_ERR_MIN_PAUSE_HIGH : DINT := -1058012112; (*The selected minimum pause duration is too high.*) + mtBCD_ERR_MODE_INVALID : DINT := -1058012111; (*The selected mode is invalid.*) + mtBCD_ERR_NULL_PTR : DINT := -1058012110; (*Null pointer passed to the input.*) + mtBCD_ERR_DENOM_COEFF_INVALID : DINT := -1058012109; (*Error: Denominator coefficient Denominator[Order] is 0.*) + mtBCD_ERR_TF_ORDER_NOT_MINIMAL : DINT := -1058012108; (*Error: Order of transfer function not minimal.*) + mtBCD_ERR_NON_REALIZABLE_TF : DINT := -1058012106; (*Error: The transfer function is not realizable.*) +END_VAR +(*Warning*) +VAR CONSTANT + mtBCD_WRN_TIME_CONSTANT1_INVALID : DINT := -2131753963; (*Chosen first time constant is invalid.*) + mtBCD_WRN_TIME_CONSTANT2_INVALID : DINT := -2131753962; (*Chosen second time constant is invalid.*) + mtBCD_WRN_THRESHOLD_NOT_DEFINED : DINT := -2131753961; (*Chosen values for the threshold levels are invalid.*) + mtBCD_WRN_THRESHOLD_INVALID : DINT := -2131753960; (*One of the values for the threshold levels is invalid.*) + mtBCD_WRN_OUT_VALUE_NOT_DEFINED : DINT := -2131753959; (*Chosen output values are invalid.*) + mtBCD_WRN_OUTPUT_LIMIT_INVALID : DINT := -2131753958; (*Chosen limitations for output are invalid.*) + mtBCD_WRN_MAX_POS_SLEW_RATE_NEG : DINT := -2131753957; (*Chosen slew rate for positive direction is invalid.*) + mtBCD_WRN_MAX_NEG_SLEW_RATE_NEG : DINT := -2131753956; (*Chosen slew rate for negative direction is invalid.*) + mtBCD_WRN_PULSE_WIDTH_LOW : DINT := -2131753955; (*Chosen pulse width is too low.*) + mtBCD_WRN_MIN_PAUSE_LOW : DINT := -2131753954; (*The selected minimum pause duration is too low.*) + mtBCD_WRN_GAIN_ZERO : DINT := -2131753953; (*Chosen gain is zero.*) + mtBCD_WRN_MAX_AVG_POWER_INVALID : DINT := -2131753952; (*The selected maximum allowed average power is invalid.*) + mtBCD_WRN_ZONE_POWER_INVALID : DINT := -2131753951; (*The selected power of a zone is invalid.*) + mtBCD_WRN_NULL_PTR : DINT := -2131753950; (*Null pointer passed to the input.*) + mtBCD_WRN_FILTER_TIME_LOW : DINT := -2131753948; (*Chosen filter time is invalid.*) + mtBCD_WRN_MIN_PULSE_HIGH : DINT := -2131753946; (*The selected minimum pulse duration is too high.*) + mtBCD_WRN_MIN_PULSE_LOW : DINT := -2131753945; (*The selected minimum pulse duration is too low.*) + mtBCD_WRN_PERIOD_LOW : DINT := -2131753944; (*The selected period duration is too low.*) + mtBCD_WRN_SETTLING_TIME_INVALID : DINT := -2131753941; (*Chosen duration, in which the settling of the system is detected, is invalid.*) + mtBCD_WRN_TUNING_TIME_INVALID : DINT := -2131753940; (*Chosen maximum tuning time is invalid.*) + mtBCD_WRN_STEP_HEIGHT_INVALID : DINT := -2131753939; (*Chosen step height is zero.*) + mtBCD_WRN_RANGE_INVALID : DINT := -2131753938; (*Chosen limitations for the input are invalid.*) + mtBCD_WRN_MIN_PAUSE_HIGH : DINT := -2131753937; (*The selected minimum pause duration is too high.*) + mtBCD_WRN_MODE_INVALID : DINT := -2131753936; (*The selected mode is invalid.*) + mtBCD_WRN_DENOM_COEFF_INVALID : DINT := -2131753933; (*Warning: Denominator coefficients are zero. Retaining the last valid configuration.*) + mtBCD_WRN_TF_ORDER_NOT_MINIMAL : DINT := -2131753932; (*Warning: Order is not minimal. Retaining the last valid configuration.*) + mtBCD_WRN_TF_PRESET_INVALID : DINT := -2131753931; (*Warning: The preset output value is invalid.*) + mtBCD_WRN_NON_REALIZABLE_TF : DINT := -2131753930; (*Warning: The transfer function is not realizable.*) +END_VAR +(*Information*) +VAR CONSTANT + mtBCD_INF_TIME_CONSTANT1_ZERO : DINT := 1089471509; (*Operating as P element or PT1 / DT1 element since TimeConstant1 = 0.*) + mtBCD_INF_TIME_CONSTANT2_ZERO : DINT := 1089471510; (*Operating as P element or PT1 / DT1 element since TimeConstant2 = 0.*) + mtBCD_INF_TUNING_ABORTED_BY_USER : DINT := 1089471511; (*Tuning aborted by user.*) +END_VAR diff --git a/example/AsProject/Logical/Libraries/_AS/MTBasics/SG4/ARM/MTBasics.br b/example/AsProject/Logical/Libraries/_AS/MTBasics/SG4/ARM/MTBasics.br new file mode 100644 index 0000000..553055b Binary files /dev/null and b/example/AsProject/Logical/Libraries/_AS/MTBasics/SG4/ARM/MTBasics.br differ diff --git a/example/AsProject/Logical/Libraries/_AS/MTBasics/SG4/ARM/libMTBasics.a b/example/AsProject/Logical/Libraries/_AS/MTBasics/SG4/ARM/libMTBasics.a new file mode 100644 index 0000000..36f0a5c Binary files /dev/null and b/example/AsProject/Logical/Libraries/_AS/MTBasics/SG4/ARM/libMTBasics.a differ diff --git a/example/AsProject/Logical/Libraries/_AS/MTBasics/SG4/IA32/MTBasics.br b/example/AsProject/Logical/Libraries/_AS/MTBasics/SG4/IA32/MTBasics.br new file mode 100644 index 0000000..81b611b Binary files /dev/null and b/example/AsProject/Logical/Libraries/_AS/MTBasics/SG4/IA32/MTBasics.br differ diff --git a/example/AsProject/Logical/Libraries/_AS/MTBasics/SG4/IA32/libMTBasics.a b/example/AsProject/Logical/Libraries/_AS/MTBasics/SG4/IA32/libMTBasics.a new file mode 100644 index 0000000..77c1f15 Binary files /dev/null and b/example/AsProject/Logical/Libraries/_AS/MTBasics/SG4/IA32/libMTBasics.a differ diff --git a/example/AsProject/Logical/Libraries/_AS/MTBasics/SG4/MTBasics.h b/example/AsProject/Logical/Libraries/_AS/MTBasics/SG4/MTBasics.h new file mode 100644 index 0000000..fcb825f --- /dev/null +++ b/example/AsProject/Logical/Libraries/_AS/MTBasics/SG4/MTBasics.h @@ -0,0 +1,954 @@ +/* Automation Studio generated header file */ +/* Do not edit ! */ +/* MTBasics 6.4.0 */ + +#ifndef _MTBASICS_ +#define _MTBASICS_ +#ifdef __cplusplus +extern "C" +{ +#endif +#ifndef _MTBasics_VERSION +#define _MTBasics_VERSION 6.4.0 +#endif + +#include + +#ifndef _BUR_PUBLIC +#define _BUR_PUBLIC +#endif +#ifdef _SG3 + #include "MTTypes.h" + #include "sys_lib.h" + #include "brsystem.h" +#endif + +#ifdef _SG4 + #include "MTTypes.h" + #include "sys_lib.h" + #include "brsystem.h" +#endif + +#ifdef _SGC + #include "MTTypes.h" + #include "sys_lib.h" + #include "brsystem.h" +#endif + + + +/* Datatypes and datatypes of function blocks */ +typedef enum MTBasicsPWMModeEnum +{ mtBASICS_PULSE_BEGINNING = 0, + mtBASICS_PULSE_MIDDLE = 1 +} MTBasicsPWMModeEnum; + +typedef enum MTBasicsPWMScheduleModeEnum +{ mtBASICS_SHIFT_PULSE = 0, + mtBASICS_SPLIT_PULSE = 1 +} MTBasicsPWMScheduleModeEnum; + +typedef enum MTBasicsStepTuningStateEnum +{ mtBASICS_STATE_READY = 1, + mtBASICS_STATE_SETTLING = 2, + mtBASICS_STATE_STEP = 3, + mtBASICS_STATE_CALCULATE_PID = 4 +} MTBasicsStepTuningStateEnum; + +typedef enum MTBasicsTransferFcnModeEnum +{ mtBASICS_CONTINUOUS_TRANSFER_FCN = 0, + mtBASICS_DISCRETE_TRANSFER_FCN = 1 +} MTBasicsTransferFcnModeEnum; + +typedef struct MTBasicsDT1InternalType +{ float CycleTime; + plcbit ParametersValid; + float Gain; + float TimeConstant; + double Numerator[2]; + double Denominator[2]; + double BVector[2]; + double AVector[2]; + double XVector[2]; + plcbit PresetOK; + double PresetCoefficients; + float InOld; + plcbit UpdateOld; + plcbit EnableOld; + plcbit EnableDone; + plcbit DisabledBusy; + unsigned long CounterOld; + plcbit SysRefParaNew; + struct MTTransferFcnType SystemReference; +} MTBasicsDT1InternalType; + +typedef struct MTBasicsDT2InternalType +{ float CycleTime; + plcbit ParametersValid; + float Gain; + float TimeConstant1; + float TimeConstant2; + double Numerator[3]; + double Denominator[3]; + double BVector[3]; + double AVector[3]; + double XVector[2]; + plcbit PresetOK; + double PresetCoefficients; + float InOld; + plcbit UpdateOld; + plcbit EnableOld; + plcbit EnableDone; + plcbit DisabledBusy; + unsigned long CounterOld; + plcbit SysRefParaNew; + struct MTTransferFcnType SystemReference; +} MTBasicsDT2InternalType; + +typedef struct MTBasicsIntegratorInternalType +{ float CycleTime; + plcbit ParametersValid; + float Gain; + double BVector[2]; + double AVector[2]; + double XVector; + float OutPresetValue; + plcbit SetOutOld; + plcbit UpdateOld; + plcbit EnableOld; + plcbit EnableDone; + plcbit DisabledBusy; + unsigned long CounterOld; + plcbit SysRefParaNew; + struct MTTransferFcnType SystemReference; +} MTBasicsIntegratorInternalType; + +typedef struct MTBasicsLevelCtrlParType +{ float OutputValue1; + float OutputValue2; + float OutputValue3; + float ThresholdLevel1; + float ThresholdLevel2; + float ThresholdLevel3; + float ThresholdLevel4; +} MTBasicsLevelCtrlParType; + +typedef struct MTBasicsLevelCtrlInternalType +{ float CycleTime; + plcbit ParametersValid; + struct MTBasicsLevelCtrlParType Parameter; + unsigned char State; + plcbit UpdateOld; + plcbit EnableOld; +} MTBasicsLevelCtrlInternalType; + +typedef struct MTBasicsLimiterInternalType +{ float CycleTime; + plcbit ParametersValid; + float MaxOut; + float MinOut; + float MaxPosSlewRate; + float MaxNegSlewRate; + float Out; + float OutOld; + float UpperOutLimit; + float LowerOutLimit; + plcbit SetOutOld; + plcbit UpdateOld; + plcbit EnableOld; +} MTBasicsLimiterInternalType; + +typedef struct MTBasicsOscTuningInternalType +{ float CycleTime; + plcbit ParametersValid; + unsigned char State; + float CriticalGain; + float OscillationPeriod; + unsigned char NumberOfOscillations; + unsigned char NumberOfPhases; + float MaxRelayOut; + float MinRelayOut; + float SetValue; + float AverageOutValue; + float MaxActValueTime[4]; + float MinActValueTime[4]; + float MaxActValue[4]; + float MinActValue[4]; + float TuningTime; + float StartingActValue; + float ControlError; + float ActValueAverageAmplitude; + float AverageActValue; + float AverageMaxActValue; + float AverageMinActValue; + float AmplitudeRatio; + float DeltaOut; + signed char EffectiveDirection; + plcbit StartOld; + float MinOscillationAmplitude; + float MinOut; + float MaxOut; + float TemporaryQuality; + float TemporaryDerivativeTime; + float TemporaryIntegrationTime; + float TemporaryGain; + plcbit Update; + plcbit UpdateOld; + plcbit EnableOld; + float AverageOutValueSum; + double AverageTime; +} MTBasicsOscTuningInternalType; + +typedef struct MTBasicsPFMInternalType +{ float CycleTime; + plcbit ParametersValid; + float PulseWidth; + float In; + float OnTime; + float OffTime; + float PeriodCounter; + float MinPause; + plcbit UpdateOld; + plcbit EnableOld; +} MTBasicsPFMInternalType; + +typedef struct MTBasicsPIDParametersType +{ double Gain; + double IntegrationTime; + double DerivativeTime; + double FilterTime; +} MTBasicsPIDParametersType; + +typedef struct MTBasicsPIDInternalType +{ float CycleTime; + plcbit ParametersValid; + struct MTPIDParametersType PIDParameters; + float MinOut; + float MaxOut; + plcbit Invert; + float ControlError; + float ControlErrorOld; + float Out; + MTPIDIntegrationEnum HoldIntegration; + float IntegrationPartPresetValue; + plcbit SetIntegrationPart; + plcbit SetIntegrationPartOld; + plcbit EnableTrackingOld; + signed long PID_StatusID; + plcbit UpdateOld; + plcbit EnableOld; + plcbit EnableDone; + plcbit DisabledBusy; + unsigned long CounterOld; + plcbit SysRefParaNew; + struct MTTransferFcnType SystemReference; + struct MTBasicsPIDParametersType PIDParametersLREAL; + double PIDOutput; + double ProportionalPart; + double IntegrationPart; + double DerivativePart; +} MTBasicsPIDInternalType; + +typedef struct MTBasicsPT1InternalType +{ float CycleTime; + plcbit ParametersValid; + float Gain; + float TimeConstant; + double Numerator[2]; + double Denominator[2]; + double BVector[2]; + double AVector[2]; + double XVector[2]; + float OutPresetValue; + double PresetCoefficients; + plcbit PresetOK; + plcbit SetOutOld; + plcbit UpdateOld; + plcbit EnableOld; + plcbit EnableDone; + plcbit DisabledBusy; + unsigned long CounterOld; + plcbit SysRefParaNew; + struct MTTransferFcnType SystemReference; +} MTBasicsPT1InternalType; + +typedef struct MTBasicsPT2InternalType +{ float CycleTime; + plcbit ParametersValid; + float Gain; + float TimeConstant1; + float TimeConstant2; + double Numerator[3]; + double Denominator[3]; + double BVector[3]; + double AVector[3]; + double XVector[2]; + float OutPresetValue; + double PresetCoefficients; + plcbit PresetOK; + plcbit SetOutOld; + plcbit UpdateOld; + plcbit EnableOld; + plcbit EnableDone; + plcbit DisabledBusy; + unsigned long CounterOld; + plcbit SysRefParaNew; + struct MTTransferFcnType SystemReference; +} MTBasicsPT2InternalType; + +typedef struct MTBasicsPWMInternalType +{ float CycleTime; + plcbit ParametersValid; + enum MTBasicsPWMModeEnum Mode; + float MinPulseWidth; + float Period; + float In; + float OnTime; + float OffTime; + float PeriodCounter; + float OnTimeCounter; + plcbit UpdateOld; + plcbit EnableOld; +} MTBasicsPWMInternalType; + +typedef struct MTBasicsPWMScheduleBufferPtrType +{ float OnTime1; + float OnTime2; + float OffTime1; + float OffTime2; +} MTBasicsPWMScheduleBufferPtrType; + +typedef struct MTBasicsPWMScheduleBufferType +{ unsigned short ActIndex; + unsigned short NrOfBufferElements; + struct MTBasicsPWMScheduleBufferPtrType* TimePar; + float* DutyCycle; + float* ZonePower; + plcbit* Out; +} MTBasicsPWMScheduleBufferType; + +typedef struct MTBasicsPWMScheduleInternalType +{ float CycleTime; + float Period; + float MinPulseWidth; + float MinPause; + float MaxAveragePower; + float FreeDutyCycle; + float PeriodCounter; + float OutputPower; + float RequiredPower; + float LimitationFactor; + plcbit EnablePowerLimitationOld; + plcbit EnableOld; + plcbit UpdateOld; + plcbit EnableParametersValid; + plcbit PowerParValid; + plcbit ParametersValid; + enum MTBasicsPWMScheduleModeEnum Mode; + struct MTBasicsPWMScheduleBufferType Buffer; +} MTBasicsPWMScheduleInternalType; + +typedef struct MTBasicsStepTuningBufElemType +{ unsigned long TimeIndex; + double In; + double IntIn; + double IntTimeIn; + double IntTime2In; + double Int2In; + double Int3In; + double TSum; + double dTSum; + double d2TSum; + double dyACD; + double d2yACD; + double d3yACD; + double DiffIn; + double Diff2In; +} MTBasicsStepTuningBufElemType; + +typedef struct MTBasicsStepTuningInternalType +{ float CycleTime; + plcbit ParametersValid; + float MinActValue; + float MaxActValue; + float MaxTuningTime; + float StepHeight; + enum MTBasicsStepTuningStateEnum State; + float TuningTime; + float Area; + float StartActValue; + float SumTime; + float PlantGain; + float LQError; + float LQOutput[2]; + float LQParameterVector[3]; + float ActValueOld; + float SystemSettlingTime; + unsigned short SettlingIndex; + unsigned short NumberOfSettlingValues; + float NoiseDeadBand; + plcbit StartOld; + plcbit UpdateOld; + plcbit EnableOld; + float Slope; +} MTBasicsStepTuningInternalType; + +typedef struct MTBasicsTimeDelayFcnParaType +{ unsigned long DelayCounter; + unsigned long ActBufferIndex; + unsigned long ActBufferElements; + unsigned long OldBufferElements; + float DelayTimeAct; + float* BufferPointer; +} MTBasicsTimeDelayFcnParaType; + +typedef struct MTBasicsTimeDelayInternalType +{ float CycleTime; + float DelayTime; + plcbit ParametersValid; + float InitialValue; + plcbit EnableOld; + struct MTBasicsTimeDelayFcnParaType TimeDelayFcnPara; +} MTBasicsTimeDelayInternalType; + +typedef struct MTBasicsTransferFcnInternalType +{ float CycleTime; + plcbit UpdateOld; + plcbit EnableOld; + plcbit EnableDone; + unsigned char DisabledBusy; + plcbit ParametersValid; + double Numerator[6]; + double Denominator[6]; + enum MTBasicsTransferFcnModeEnum Mode; + plcbit SysRefParaNew; + unsigned long CounterOld; + unsigned char Order; + plcbit PresetOK; + double PresetCoefficients; + double BVector[6]; + double AVector[6]; + double XVector[5]; + float OutPresetValue; + plcbit SetOut; + plcbit SetOutOld; + unsigned char nTmp; + struct MTTransferFcnType SystemReference; +} MTBasicsTransferFcnInternalType; + +typedef struct MTBasicsDT1 +{ + /* VAR_INPUT (analog) */ + float Gain; + float TimeConstant; + float In; + /* VAR_OUTPUT (analog) */ + signed long StatusID; + float Out; + unsigned long SystemReference; + /* VAR (analog) */ + struct MTBasicsDT1InternalType Internal; + /* VAR_INPUT (digital) */ + plcbit Enable; + plcbit Update; + /* VAR_OUTPUT (digital) */ + plcbit Busy; + plcbit Active; + plcbit Error; + plcbit UpdateDone; +} MTBasicsDT1_typ; + +typedef struct MTBasicsDT2 +{ + /* VAR_INPUT (analog) */ + float Gain; + float TimeConstant1; + float TimeConstant2; + float In; + /* VAR_OUTPUT (analog) */ + signed long StatusID; + float Out; + unsigned long SystemReference; + /* VAR (analog) */ + struct MTBasicsDT2InternalType Internal; + /* VAR_INPUT (digital) */ + plcbit Enable; + plcbit Update; + /* VAR_OUTPUT (digital) */ + plcbit Busy; + plcbit Active; + plcbit Error; + plcbit UpdateDone; +} MTBasicsDT2_typ; + +typedef struct MTBasicsIntegrator +{ + /* VAR_INPUT (analog) */ + float Gain; + float In; + float OutPresetValue; + /* VAR_OUTPUT (analog) */ + signed long StatusID; + float Out; + unsigned long SystemReference; + /* VAR (analog) */ + struct MTBasicsIntegratorInternalType Internal; + /* VAR_INPUT (digital) */ + plcbit Enable; + plcbit Update; + plcbit SetOut; + plcbit HoldOut; + /* VAR_OUTPUT (digital) */ + plcbit Busy; + plcbit Active; + plcbit Error; + plcbit UpdateDone; +} MTBasicsIntegrator_typ; + +typedef struct MTBasicsLevelController +{ + /* VAR_INPUT (analog) */ + struct MTBasicsLevelCtrlParType Parameter; + float In; + /* VAR_OUTPUT (analog) */ + signed long StatusID; + float Out; + /* VAR (analog) */ + struct MTBasicsLevelCtrlInternalType Internal; + /* VAR_INPUT (digital) */ + plcbit Enable; + plcbit Update; + /* VAR_OUTPUT (digital) */ + plcbit Active; + plcbit Error; + plcbit UpdateDone; +} MTBasicsLevelController_typ; + +typedef struct MTBasicsLimiter +{ + /* VAR_INPUT (analog) */ + float MinOut; + float MaxOut; + float MaxPosSlewRate; + float MaxNegSlewRate; + float In; + float OutPresetValue; + /* VAR_OUTPUT (analog) */ + signed long StatusID; + float Out; + /* VAR (analog) */ + struct MTBasicsLimiterInternalType Internal; + /* VAR_INPUT (digital) */ + plcbit Enable; + plcbit Update; + plcbit SetOut; + /* VAR_OUTPUT (digital) */ + plcbit Active; + plcbit Error; + plcbit UpdateDone; +} MTBasicsLimiter_typ; + +typedef struct MTBasicsOscillationTuning +{ + /* VAR_INPUT (analog) */ + float SetValue; + float MinOut; + float MaxOut; + float ActValue; + /* VAR_OUTPUT (analog) */ + signed long StatusID; + float Out; + float Quality; + struct MTPIDParametersType PIDParameters; + /* VAR (analog) */ + struct MTBasicsOscTuningInternalType Internal; + /* VAR_INPUT (digital) */ + plcbit Enable; + plcbit Invert; + plcbit Update; + plcbit Start; + /* VAR_OUTPUT (digital) */ + plcbit Active; + plcbit Error; + plcbit UpdateDone; + plcbit TuningActive; + plcbit TuningDone; +} MTBasicsOscillationTuning_typ; + +typedef struct MTBasicsPFM +{ + /* VAR_INPUT (analog) */ + float PulseWidth; + float MinPause; + float DutyCycle; + /* VAR_OUTPUT (analog) */ + signed long StatusID; + /* VAR (analog) */ + struct MTBasicsPFMInternalType Internal; + /* VAR_INPUT (digital) */ + plcbit Enable; + plcbit Update; + /* VAR_OUTPUT (digital) */ + plcbit Active; + plcbit Error; + plcbit UpdateDone; + plcbit Out; +} MTBasicsPFM_typ; + +typedef struct MTBasicsPID +{ + /* VAR_INPUT (analog) */ + struct MTPIDParametersType PIDParameters; + float MinOut; + float MaxOut; + float SetValue; + float ActValue; + float IntegrationPartPresetValue; + float TrackingValue; + MTPIDIntegrationEnum HoldIntegration; + /* VAR_OUTPUT (analog) */ + signed long StatusID; + float Out; + float ControlError; + float ProportionalPart; + float IntegrationPart; + float DerivativePart; + MTPIDIntegrationEnum IntegrationStatus; + unsigned long SystemReference; + /* VAR (analog) */ + struct MTBasicsPIDInternalType Internal; + /* VAR_INPUT (digital) */ + plcbit Enable; + plcbit Invert; + plcbit Update; + plcbit SetIntegrationPart; + plcbit HoldOut; + plcbit EnableTracking; + /* VAR_OUTPUT (digital) */ + plcbit Busy; + plcbit Active; + plcbit Error; + plcbit UpdateDone; + plcbit TrackingActive; +} MTBasicsPID_typ; + +typedef struct MTBasicsPT1 +{ + /* VAR_INPUT (analog) */ + float Gain; + float TimeConstant; + float In; + float OutPresetValue; + /* VAR_OUTPUT (analog) */ + signed long StatusID; + float Out; + unsigned long SystemReference; + /* VAR (analog) */ + struct MTBasicsPT1InternalType Internal; + /* VAR_INPUT (digital) */ + plcbit Enable; + plcbit Update; + plcbit SetOut; + /* VAR_OUTPUT (digital) */ + plcbit Busy; + plcbit Active; + plcbit Error; + plcbit UpdateDone; +} MTBasicsPT1_typ; + +typedef struct MTBasicsPT2 +{ + /* VAR_INPUT (analog) */ + float Gain; + float TimeConstant1; + float TimeConstant2; + float In; + float OutPresetValue; + /* VAR_OUTPUT (analog) */ + signed long StatusID; + float Out; + unsigned long SystemReference; + /* VAR (analog) */ + struct MTBasicsPT2InternalType Internal; + /* VAR_INPUT (digital) */ + plcbit Enable; + plcbit Update; + plcbit SetOut; + /* VAR_OUTPUT (digital) */ + plcbit Busy; + plcbit Active; + plcbit Error; + plcbit UpdateDone; +} MTBasicsPT2_typ; + +typedef struct MTBasicsPWM +{ + /* VAR_INPUT (analog) */ + enum MTBasicsPWMModeEnum Mode; + float MinPulseWidth; + float Period; + float DutyCycle; + /* VAR_OUTPUT (analog) */ + signed long StatusID; + /* VAR (analog) */ + struct MTBasicsPWMInternalType Internal; + /* VAR_INPUT (digital) */ + plcbit Enable; + plcbit Update; + /* VAR_OUTPUT (digital) */ + plcbit Active; + plcbit Error; + plcbit UpdateDone; + plcbit Out; +} MTBasicsPWM_typ; + +typedef struct MTBasicsPWMSchedule +{ + /* VAR_INPUT (analog) */ + float Period; + float MinPulseWidth; + float MinPause; + enum MTBasicsPWMScheduleModeEnum Mode; + unsigned short NumberOfInputs; + unsigned long DutyCycle; + unsigned long ZonePower; + float MaxAveragePower; + /* VAR_OUTPUT (analog) */ + signed long StatusID; + unsigned long PulseWave; + unsigned long LimitedDutyCycle; + float OutputPower; + float RequiredPower; + /* VAR (analog) */ + struct MTBasicsPWMScheduleInternalType Internal; + /* VAR_INPUT (digital) */ + plcbit Enable; + plcbit Update; + plcbit EnablePowerLimitation; + /* VAR_OUTPUT (digital) */ + plcbit Active; + plcbit Error; + plcbit UpdateDone; + plcbit PowerLimitationActive; + plcbit InLimitation; +} MTBasicsPWMSchedule_typ; + +typedef struct MTBasicsStepTuning +{ + /* VAR_INPUT (analog) */ + float SystemSettlingTime; + float MaxTuningTime; + float MinActValue; + float MaxActValue; + float ActValue; + float StepHeight; + /* VAR_OUTPUT (analog) */ + signed long StatusID; + float Out; + struct MTPIDParametersType PIDParameters; + float Quality; + enum MTBasicsStepTuningStateEnum TuningState; + /* VAR (analog) */ + struct MTBasicsStepTuningInternalType Internal; + /* VAR_INPUT (digital) */ + plcbit Enable; + plcbit Update; + plcbit Start; + /* VAR_OUTPUT (digital) */ + plcbit Active; + plcbit Error; + plcbit UpdateDone; + plcbit TuningActive; + plcbit TuningDone; +} MTBasicsStepTuning_typ; + +typedef struct MTBasicsTimeDelay +{ + /* VAR_INPUT (analog) */ + float DelayTime; + float In; + float InitialValue; + /* VAR_OUTPUT (analog) */ + signed long StatusID; + float Out; + /* VAR (analog) */ + struct MTBasicsTimeDelayInternalType Internal; + /* VAR_INPUT (digital) */ + plcbit Enable; + /* VAR_OUTPUT (digital) */ + plcbit Active; + plcbit Error; +} MTBasicsTimeDelay_typ; + +typedef struct MTBasicsTransferFcn +{ + /* VAR_INPUT (analog) */ + float Numerator[6]; + float Denominator[6]; + enum MTBasicsTransferFcnModeEnum Mode; + float In; + float OutPresetValue; + /* VAR_OUTPUT (analog) */ + signed long StatusID; + float Out; + unsigned long SystemReference; + /* VAR (analog) */ + struct MTBasicsTransferFcnInternalType Internal; + /* VAR_INPUT (digital) */ + plcbit Enable; + plcbit Update; + plcbit SetOut; + /* VAR_OUTPUT (digital) */ + plcbit Busy; + plcbit Active; + plcbit Error; + plcbit UpdateDone; +} MTBasicsTransferFcn_typ; + + + +/* Prototyping of functions and function blocks */ +_BUR_PUBLIC void MTBasicsDT1(struct MTBasicsDT1* inst); +_BUR_PUBLIC void MTBasicsDT2(struct MTBasicsDT2* inst); +_BUR_PUBLIC void MTBasicsIntegrator(struct MTBasicsIntegrator* inst); +_BUR_PUBLIC void MTBasicsLevelController(struct MTBasicsLevelController* inst); +_BUR_PUBLIC void MTBasicsLimiter(struct MTBasicsLimiter* inst); +_BUR_PUBLIC void MTBasicsOscillationTuning(struct MTBasicsOscillationTuning* inst); +_BUR_PUBLIC void MTBasicsPFM(struct MTBasicsPFM* inst); +_BUR_PUBLIC void MTBasicsPID(struct MTBasicsPID* inst); +_BUR_PUBLIC void MTBasicsPT1(struct MTBasicsPT1* inst); +_BUR_PUBLIC void MTBasicsPT2(struct MTBasicsPT2* inst); +_BUR_PUBLIC void MTBasicsPWM(struct MTBasicsPWM* inst); +_BUR_PUBLIC void MTBasicsPWMSchedule(struct MTBasicsPWMSchedule* inst); +_BUR_PUBLIC void MTBasicsStepTuning(struct MTBasicsStepTuning* inst); +_BUR_PUBLIC void MTBasicsTimeDelay(struct MTBasicsTimeDelay* inst); +_BUR_PUBLIC void MTBasicsTransferFcn(struct MTBasicsTransferFcn* inst); + + +/* Constants */ +#ifdef _REPLACE_CONST + #define mtBCD_INF_TUNING_ABORTED_BY_USER 1089471511 + #define mtBCD_INF_TIME_CONSTANT2_ZERO 1089471510 + #define mtBCD_INF_TIME_CONSTANT1_ZERO 1089471509 + #define mtBCD_WRN_NON_REALIZABLE_TF (-2131753930) + #define mtBCD_WRN_TF_PRESET_INVALID (-2131753931) + #define mtBCD_WRN_TF_ORDER_NOT_MINIMAL (-2131753932) + #define mtBCD_WRN_DENOM_COEFF_INVALID (-2131753933) + #define mtBCD_WRN_MODE_INVALID (-2131753936) + #define mtBCD_WRN_MIN_PAUSE_HIGH (-2131753937) + #define mtBCD_WRN_RANGE_INVALID (-2131753938) + #define mtBCD_WRN_STEP_HEIGHT_INVALID (-2131753939) + #define mtBCD_WRN_TUNING_TIME_INVALID (-2131753940) + #define mtBCD_WRN_SETTLING_TIME_INVALID (-2131753941) + #define mtBCD_WRN_PERIOD_LOW (-2131753944) + #define mtBCD_WRN_MIN_PULSE_LOW (-2131753945) + #define mtBCD_WRN_MIN_PULSE_HIGH (-2131753946) + #define mtBCD_WRN_FILTER_TIME_LOW (-2131753948) + #define mtBCD_WRN_NULL_PTR (-2131753950) + #define mtBCD_WRN_ZONE_POWER_INVALID (-2131753951) + #define mtBCD_WRN_MAX_AVG_POWER_INVALID (-2131753952) + #define mtBCD_WRN_GAIN_ZERO (-2131753953) + #define mtBCD_WRN_MIN_PAUSE_LOW (-2131753954) + #define mtBCD_WRN_PULSE_WIDTH_LOW (-2131753955) + #define mtBCD_WRN_MAX_NEG_SLEW_RATE_NEG (-2131753956) + #define mtBCD_WRN_MAX_POS_SLEW_RATE_NEG (-2131753957) + #define mtBCD_WRN_OUTPUT_LIMIT_INVALID (-2131753958) + #define mtBCD_WRN_OUT_VALUE_NOT_DEFINED (-2131753959) + #define mtBCD_WRN_THRESHOLD_INVALID (-2131753960) + #define mtBCD_WRN_THRESHOLD_NOT_DEFINED (-2131753961) + #define mtBCD_WRN_TIME_CONSTANT2_INVALID (-2131753962) + #define mtBCD_WRN_TIME_CONSTANT1_INVALID (-2131753963) + #define mtBCD_ERR_NON_REALIZABLE_TF (-1058012106) + #define mtBCD_ERR_TF_ORDER_NOT_MINIMAL (-1058012108) + #define mtBCD_ERR_DENOM_COEFF_INVALID (-1058012109) + #define mtBCD_ERR_NULL_PTR (-1058012110) + #define mtBCD_ERR_MODE_INVALID (-1058012111) + #define mtBCD_ERR_MIN_PAUSE_HIGH (-1058012112) + #define mtBCD_ERR_TUNING_INVALID (-1058012113) + #define mtBCD_ERR_RANGE_INVALID (-1058012114) + #define mtBCD_ERR_ACT_VALUE_NOT_STABLE (-1058012115) + #define mtBCD_ERR_TUNING_TIME_INVALID (-1058012116) + #define mtBCD_ERR_SETTLING_TIME_INVALID (-1058012117) + #define mtBCD_ERR_SAMPLING_INVALID (-1058012118) + #define mtBCD_ERR_NUMBER_OF_INPUTS (-1058012121) + #define mtBCD_ERR_PERIOD_LOW (-1058012122) + #define mtBCD_ERR_MIN_PULSE_LOW (-1058012123) + #define mtBCD_ERR_MIN_PULSE_HIGH (-1058012124) + #define mtBCD_ERR_MIN_PAUSE_LOW (-1058012130) + #define mtBCD_ERR_PULSE_WIDTH_LOW (-1058012131) + #define mtBCD_ERR_MAX_NEG_SLEW_RATE_NEG (-1058012132) + #define mtBCD_ERR_MAX_POS_SLEW_RATE_NEG (-1058012133) + #define mtBCD_ERR_OUTPUT_LIMIT_INVALID (-1058012134) + #define mtBCD_ERR_OUT_VALUE_NOT_DEFINED (-1058012135) + #define mtBCD_ERR_THRESHOLD_INVALID (-1058012136) + #define mtBCD_ERR_THRESHOLD_NOT_DEFINED (-1058012137) + #define mtBCD_ERR_TIME_CONSTANT2_INVALID (-1058012138) + #define mtBCD_ERR_TIME_CONSTANT1_INVALID (-1058012139) +#else + _GLOBAL_CONST signed long mtBCD_INF_TUNING_ABORTED_BY_USER; + _GLOBAL_CONST signed long mtBCD_INF_TIME_CONSTANT2_ZERO; + _GLOBAL_CONST signed long mtBCD_INF_TIME_CONSTANT1_ZERO; + _GLOBAL_CONST signed long mtBCD_WRN_NON_REALIZABLE_TF; + _GLOBAL_CONST signed long mtBCD_WRN_TF_PRESET_INVALID; + _GLOBAL_CONST signed long mtBCD_WRN_TF_ORDER_NOT_MINIMAL; + _GLOBAL_CONST signed long mtBCD_WRN_DENOM_COEFF_INVALID; + _GLOBAL_CONST signed long mtBCD_WRN_MODE_INVALID; + _GLOBAL_CONST signed long mtBCD_WRN_MIN_PAUSE_HIGH; + _GLOBAL_CONST signed long mtBCD_WRN_RANGE_INVALID; + _GLOBAL_CONST signed long mtBCD_WRN_STEP_HEIGHT_INVALID; + _GLOBAL_CONST signed long mtBCD_WRN_TUNING_TIME_INVALID; + _GLOBAL_CONST signed long mtBCD_WRN_SETTLING_TIME_INVALID; + _GLOBAL_CONST signed long mtBCD_WRN_PERIOD_LOW; + _GLOBAL_CONST signed long mtBCD_WRN_MIN_PULSE_LOW; + _GLOBAL_CONST signed long mtBCD_WRN_MIN_PULSE_HIGH; + _GLOBAL_CONST signed long mtBCD_WRN_FILTER_TIME_LOW; + _GLOBAL_CONST signed long mtBCD_WRN_NULL_PTR; + _GLOBAL_CONST signed long mtBCD_WRN_ZONE_POWER_INVALID; + _GLOBAL_CONST signed long mtBCD_WRN_MAX_AVG_POWER_INVALID; + _GLOBAL_CONST signed long mtBCD_WRN_GAIN_ZERO; + _GLOBAL_CONST signed long mtBCD_WRN_MIN_PAUSE_LOW; + _GLOBAL_CONST signed long mtBCD_WRN_PULSE_WIDTH_LOW; + _GLOBAL_CONST signed long mtBCD_WRN_MAX_NEG_SLEW_RATE_NEG; + _GLOBAL_CONST signed long mtBCD_WRN_MAX_POS_SLEW_RATE_NEG; + _GLOBAL_CONST signed long mtBCD_WRN_OUTPUT_LIMIT_INVALID; + _GLOBAL_CONST signed long mtBCD_WRN_OUT_VALUE_NOT_DEFINED; + _GLOBAL_CONST signed long mtBCD_WRN_THRESHOLD_INVALID; + _GLOBAL_CONST signed long mtBCD_WRN_THRESHOLD_NOT_DEFINED; + _GLOBAL_CONST signed long mtBCD_WRN_TIME_CONSTANT2_INVALID; + _GLOBAL_CONST signed long mtBCD_WRN_TIME_CONSTANT1_INVALID; + _GLOBAL_CONST signed long mtBCD_ERR_NON_REALIZABLE_TF; + _GLOBAL_CONST signed long mtBCD_ERR_TF_ORDER_NOT_MINIMAL; + _GLOBAL_CONST signed long mtBCD_ERR_DENOM_COEFF_INVALID; + _GLOBAL_CONST signed long mtBCD_ERR_NULL_PTR; + _GLOBAL_CONST signed long mtBCD_ERR_MODE_INVALID; + _GLOBAL_CONST signed long mtBCD_ERR_MIN_PAUSE_HIGH; + _GLOBAL_CONST signed long mtBCD_ERR_TUNING_INVALID; + _GLOBAL_CONST signed long mtBCD_ERR_RANGE_INVALID; + _GLOBAL_CONST signed long mtBCD_ERR_ACT_VALUE_NOT_STABLE; + _GLOBAL_CONST signed long mtBCD_ERR_TUNING_TIME_INVALID; + _GLOBAL_CONST signed long mtBCD_ERR_SETTLING_TIME_INVALID; + _GLOBAL_CONST signed long mtBCD_ERR_SAMPLING_INVALID; + _GLOBAL_CONST signed long mtBCD_ERR_NUMBER_OF_INPUTS; + _GLOBAL_CONST signed long mtBCD_ERR_PERIOD_LOW; + _GLOBAL_CONST signed long mtBCD_ERR_MIN_PULSE_LOW; + _GLOBAL_CONST signed long mtBCD_ERR_MIN_PULSE_HIGH; + _GLOBAL_CONST signed long mtBCD_ERR_MIN_PAUSE_LOW; + _GLOBAL_CONST signed long mtBCD_ERR_PULSE_WIDTH_LOW; + _GLOBAL_CONST signed long mtBCD_ERR_MAX_NEG_SLEW_RATE_NEG; + _GLOBAL_CONST signed long mtBCD_ERR_MAX_POS_SLEW_RATE_NEG; + _GLOBAL_CONST signed long mtBCD_ERR_OUTPUT_LIMIT_INVALID; + _GLOBAL_CONST signed long mtBCD_ERR_OUT_VALUE_NOT_DEFINED; + _GLOBAL_CONST signed long mtBCD_ERR_THRESHOLD_INVALID; + _GLOBAL_CONST signed long mtBCD_ERR_THRESHOLD_NOT_DEFINED; + _GLOBAL_CONST signed long mtBCD_ERR_TIME_CONSTANT2_INVALID; + _GLOBAL_CONST signed long mtBCD_ERR_TIME_CONSTANT1_INVALID; +#endif + + + + +#ifdef __cplusplus +}; +#endif +#endif /* _MTBASICS_ */ + diff --git a/example/AsProject/Logical/Libraries/_AS/MTLookUp/Binary.lby b/example/AsProject/Logical/Libraries/_AS/MTLookUp/Binary.lby new file mode 100644 index 0000000..dc0cce4 --- /dev/null +++ b/example/AsProject/Logical/Libraries/_AS/MTLookUp/Binary.lby @@ -0,0 +1,13 @@ + + + + + MTLookUp.fun + MTLookUp.typ + MTLookUp.var + + + + + + \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/_AS/MTLookUp/MTLookUp.fun b/example/AsProject/Logical/Libraries/_AS/MTLookUp/MTLookUp.fun index da05499..217ba0f 100644 --- a/example/AsProject/Logical/Libraries/_AS/MTLookUp/MTLookUp.fun +++ b/example/AsProject/Logical/Libraries/_AS/MTLookUp/MTLookUp.fun @@ -27,7 +27,7 @@ END_FUNCTION_BLOCK NodeVectorX : ARRAY[0..19] OF REAL; (*Lookup table points on the X-Axis*) NodeVectorY : ARRAY[0..19] OF REAL; (*Lookup table points on the Y-Axis*) FcnValues : ARRAY[0..19,0..19] OF REAL; (*Lookup table points on the Z-Axis*) - NumberOfNodesX : USINT; (*Number of nodes from the node vector that are used to define the 2D-function 'f(x,y)'. Valid value range: 21> NumberOfNodesX > 1.*) + NumberOfNodesX : USINT; (*Number of nodes from the node vector that are used to define the 2D-function 'f(x,y)'. Valid value range: 21 > NumberOfNodesX > 1.*) NumberOfNodesY : USINT; (*Number of nodes from the node vector that are used to define the 2D-function 'f(x,y)'. Valid value range: 21 > NumberOfNodesY > 1.*) Update : BOOL; (*Changes to NumberOfNodesX, NumberOfNodesY and the node vector listed above only go into effect at the positive edge of Update.*) InX : REAL; (*x-coordinate of 'f(x,y)'. Valid value range: X1 <= x <= Xj.*) diff --git a/example/AsProject/Logical/Libraries/_AS/MTLookUp/SG4/ARM/MTLookUp.br b/example/AsProject/Logical/Libraries/_AS/MTLookUp/SG4/ARM/MTLookUp.br index a886c8d..c3a620c 100644 Binary files a/example/AsProject/Logical/Libraries/_AS/MTLookUp/SG4/ARM/MTLookUp.br and b/example/AsProject/Logical/Libraries/_AS/MTLookUp/SG4/ARM/MTLookUp.br differ diff --git a/example/AsProject/Logical/Libraries/_AS/MTLookUp/SG4/ARM/libMTLookUp.a b/example/AsProject/Logical/Libraries/_AS/MTLookUp/SG4/ARM/libMTLookUp.a index 2becbc0..ce8560a 100644 Binary files a/example/AsProject/Logical/Libraries/_AS/MTLookUp/SG4/ARM/libMTLookUp.a and b/example/AsProject/Logical/Libraries/_AS/MTLookUp/SG4/ARM/libMTLookUp.a differ diff --git a/example/AsProject/Logical/Libraries/_AS/MTLookUp/SG4/IA32/MTLookUp.br b/example/AsProject/Logical/Libraries/_AS/MTLookUp/SG4/IA32/MTLookUp.br index d77a46e..821c9be 100644 Binary files a/example/AsProject/Logical/Libraries/_AS/MTLookUp/SG4/IA32/MTLookUp.br and b/example/AsProject/Logical/Libraries/_AS/MTLookUp/SG4/IA32/MTLookUp.br differ diff --git a/example/AsProject/Logical/Libraries/_AS/MTLookUp/SG4/IA32/libMTLookUp.a b/example/AsProject/Logical/Libraries/_AS/MTLookUp/SG4/IA32/libMTLookUp.a index 3c33aae..e602bb4 100644 Binary files a/example/AsProject/Logical/Libraries/_AS/MTLookUp/SG4/IA32/libMTLookUp.a and b/example/AsProject/Logical/Libraries/_AS/MTLookUp/SG4/IA32/libMTLookUp.a differ diff --git a/example/AsProject/Logical/Libraries/_AS/MTLookUp/SG4/MTLookUp.h b/example/AsProject/Logical/Libraries/_AS/MTLookUp/SG4/MTLookUp.h index cf3d289..539d22b 100644 --- a/example/AsProject/Logical/Libraries/_AS/MTLookUp/SG4/MTLookUp.h +++ b/example/AsProject/Logical/Libraries/_AS/MTLookUp/SG4/MTLookUp.h @@ -1,5 +1,6 @@ /* Automation Studio generated header file */ /* Do not edit ! */ +/* MTLookUp 6.4.0 */ #ifndef _MTLOOKUP_ #define _MTLOOKUP_ @@ -7,51 +8,29 @@ extern "C" { #endif +#ifndef _MTLookUp_VERSION +#define _MTLookUp_VERSION 6.4.0 +#endif #include -#include -#include - #ifndef _BUR_PUBLIC #define _BUR_PUBLIC #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define mtBCD_WRN_LOOKUP_MEM_ALLOC (-2131754002) - #define mtBCD_WRN_LOOKUP_MODE_INVALID (-2131754003) - #define mtBCD_WRN_NODES_Y_INVALID (-2131754004) - #define mtBCD_WRN_NODES_X_INVALID (-2131754005) - #define mtBCD_WRN_YVAL_NOT_SORTED (-2131754006) - #define mtBCD_WRN_XVAL_NOT_SORTED (-2131754007) - #define mtBCD_WRN_NODES_INVALID (-2131754008) - #define mtBCD_ERR_LOOKUP_MEM_ALLOC (-1058012178) - #define mtBCD_ERR_LOOKUP_MODE_INVALID (-1058012179) - #define mtBCD_ERR_NODES_Y_INVALID (-1058012180) - #define mtBCD_ERR_NODES_X_INVALID (-1058012181) - #define mtBCD_ERR_YVAL_NOT_SORTED (-1058012182) - #define mtBCD_ERR_XVAL_NOT_SORTED (-1058012183) - #define mtBCD_ERR_NODES_INVALID (-1058012184) -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST signed long mtBCD_WRN_LOOKUP_MEM_ALLOC; - _GLOBAL_CONST signed long mtBCD_WRN_LOOKUP_MODE_INVALID; - _GLOBAL_CONST signed long mtBCD_WRN_NODES_Y_INVALID; - _GLOBAL_CONST signed long mtBCD_WRN_NODES_X_INVALID; - _GLOBAL_CONST signed long mtBCD_WRN_YVAL_NOT_SORTED; - _GLOBAL_CONST signed long mtBCD_WRN_XVAL_NOT_SORTED; - _GLOBAL_CONST signed long mtBCD_WRN_NODES_INVALID; - _GLOBAL_CONST signed long mtBCD_ERR_LOOKUP_MEM_ALLOC; - _GLOBAL_CONST signed long mtBCD_ERR_LOOKUP_MODE_INVALID; - _GLOBAL_CONST signed long mtBCD_ERR_NODES_Y_INVALID; - _GLOBAL_CONST signed long mtBCD_ERR_NODES_X_INVALID; - _GLOBAL_CONST signed long mtBCD_ERR_YVAL_NOT_SORTED; - _GLOBAL_CONST signed long mtBCD_ERR_XVAL_NOT_SORTED; - _GLOBAL_CONST signed long mtBCD_ERR_NODES_INVALID; +#ifdef _SG3 + #include "sys_lib.h" + #include "brsystem.h" #endif +#ifdef _SG4 + #include "sys_lib.h" + #include "brsystem.h" +#endif + +#ifdef _SGC + #include "sys_lib.h" + #include "brsystem.h" +#endif @@ -61,13 +40,6 @@ typedef enum MTLookUpModeEnum mtLOOKUP_LINEAR_EXTRAPOLATION = 1 } MTLookUpModeEnum; -typedef struct MTLookUpInternalNode2DType -{ float XValues; - float YValues; - float FcnValues; - float k[2]; -} MTLookUpInternalNode2DType; - typedef struct MTLookUpTable2DInternalType { float CycleTime; plcbit ParametersValid; @@ -84,6 +56,13 @@ typedef struct MTLookUpTable2DInternalType struct MTLookUpInternalNode2DType* Nodes; } MTLookUpTable2DInternalType; +typedef struct MTLookUpInternalNode2DType +{ float XValues; + float YValues; + float FcnValues; + float k[2]; +} MTLookUpInternalNode2DType; + typedef struct MTLookUpInternalNodeType { float XValues; float FcnValues; @@ -157,6 +136,42 @@ _BUR_PUBLIC void MTLookUpTable(struct MTLookUpTable* inst); _BUR_PUBLIC void MTLookUpTable2D(struct MTLookUpTable2D* inst); +/* Constants */ +#ifdef _REPLACE_CONST + #define mtBCD_WRN_LOOKUP_MEM_ALLOC (-2131754002) + #define mtBCD_WRN_LOOKUP_MODE_INVALID (-2131754003) + #define mtBCD_WRN_NODES_Y_INVALID (-2131754004) + #define mtBCD_WRN_NODES_X_INVALID (-2131754005) + #define mtBCD_WRN_YVAL_NOT_SORTED (-2131754006) + #define mtBCD_WRN_XVAL_NOT_SORTED (-2131754007) + #define mtBCD_WRN_NODES_INVALID (-2131754008) + #define mtBCD_ERR_LOOKUP_MEM_ALLOC (-1058012178) + #define mtBCD_ERR_LOOKUP_MODE_INVALID (-1058012179) + #define mtBCD_ERR_NODES_Y_INVALID (-1058012180) + #define mtBCD_ERR_NODES_X_INVALID (-1058012181) + #define mtBCD_ERR_YVAL_NOT_SORTED (-1058012182) + #define mtBCD_ERR_XVAL_NOT_SORTED (-1058012183) + #define mtBCD_ERR_NODES_INVALID (-1058012184) +#else + _GLOBAL_CONST signed long mtBCD_WRN_LOOKUP_MEM_ALLOC; + _GLOBAL_CONST signed long mtBCD_WRN_LOOKUP_MODE_INVALID; + _GLOBAL_CONST signed long mtBCD_WRN_NODES_Y_INVALID; + _GLOBAL_CONST signed long mtBCD_WRN_NODES_X_INVALID; + _GLOBAL_CONST signed long mtBCD_WRN_YVAL_NOT_SORTED; + _GLOBAL_CONST signed long mtBCD_WRN_XVAL_NOT_SORTED; + _GLOBAL_CONST signed long mtBCD_WRN_NODES_INVALID; + _GLOBAL_CONST signed long mtBCD_ERR_LOOKUP_MEM_ALLOC; + _GLOBAL_CONST signed long mtBCD_ERR_LOOKUP_MODE_INVALID; + _GLOBAL_CONST signed long mtBCD_ERR_NODES_Y_INVALID; + _GLOBAL_CONST signed long mtBCD_ERR_NODES_X_INVALID; + _GLOBAL_CONST signed long mtBCD_ERR_YVAL_NOT_SORTED; + _GLOBAL_CONST signed long mtBCD_ERR_XVAL_NOT_SORTED; + _GLOBAL_CONST signed long mtBCD_ERR_NODES_INVALID; +#endif + + + + #ifdef __cplusplus }; #endif diff --git a/example/AsProject/Logical/Libraries/_AS/MTLookUp/binary.lby b/example/AsProject/Logical/Libraries/_AS/MTLookUp/binary.lby deleted file mode 100644 index 3edecab..0000000 --- a/example/AsProject/Logical/Libraries/_AS/MTLookUp/binary.lby +++ /dev/null @@ -1,13 +0,0 @@ - - - - - MTLookUp.fun - MTLookUp.typ - MTLookUp.var - - - - - - \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/_AS/MTTypes/MTTypes.fun b/example/AsProject/Logical/Libraries/_AS/MTTypes/MTTypes.fun deleted file mode 100644 index e69de29..0000000 diff --git a/example/AsProject/Logical/Libraries/_AS/MTTypes/SG4/ARM/MTTypes.br b/example/AsProject/Logical/Libraries/_AS/MTTypes/SG4/ARM/MTTypes.br index 5521be7..171af41 100644 Binary files a/example/AsProject/Logical/Libraries/_AS/MTTypes/SG4/ARM/MTTypes.br and b/example/AsProject/Logical/Libraries/_AS/MTTypes/SG4/ARM/MTTypes.br differ diff --git a/example/AsProject/Logical/Libraries/_AS/MTTypes/SG4/ARM/libMTTypes.a b/example/AsProject/Logical/Libraries/_AS/MTTypes/SG4/ARM/libMTTypes.a index 83913c1..5b3916f 100644 Binary files a/example/AsProject/Logical/Libraries/_AS/MTTypes/SG4/ARM/libMTTypes.a and b/example/AsProject/Logical/Libraries/_AS/MTTypes/SG4/ARM/libMTTypes.a differ diff --git a/example/AsProject/Logical/Libraries/_AS/MTTypes/SG4/IA32/MTTypes.br b/example/AsProject/Logical/Libraries/_AS/MTTypes/SG4/IA32/MTTypes.br index 58957fa..d47de1e 100644 Binary files a/example/AsProject/Logical/Libraries/_AS/MTTypes/SG4/IA32/MTTypes.br and b/example/AsProject/Logical/Libraries/_AS/MTTypes/SG4/IA32/MTTypes.br differ diff --git a/example/AsProject/Logical/Libraries/_AS/MTTypes/SG4/IA32/libMTTypes.a b/example/AsProject/Logical/Libraries/_AS/MTTypes/SG4/IA32/libMTTypes.a index 270fd07..ef9f990 100644 Binary files a/example/AsProject/Logical/Libraries/_AS/MTTypes/SG4/IA32/libMTTypes.a and b/example/AsProject/Logical/Libraries/_AS/MTTypes/SG4/IA32/libMTTypes.a differ diff --git a/example/AsProject/Logical/Libraries/_AS/MTTypes/SG4/MTTypes.h b/example/AsProject/Logical/Libraries/_AS/MTTypes/SG4/MTTypes.h index e189f76..57c849a 100644 --- a/example/AsProject/Logical/Libraries/_AS/MTTypes/SG4/MTTypes.h +++ b/example/AsProject/Logical/Libraries/_AS/MTTypes/SG4/MTTypes.h @@ -1,5 +1,6 @@ /* Automation Studio generated header file */ /* Do not edit ! */ +/* MTTypes 6.0.0 */ #ifndef _MTTYPES_ #define _MTTYPES_ @@ -7,61 +8,15 @@ extern "C" { #endif +#ifndef _MTTypes_VERSION +#define _MTTypes_VERSION 6.0.0 +#endif #include #ifndef _BUR_PUBLIC #define _BUR_PUBLIC #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define mtGNR_WRN_DELAY_TIME_TOO_HIGH (-2131754999) - #define mtGNR_WRN_DELAY_TIME_NEGATIVE (-2131755000) - #define mtGNR_WRN_OUTPUT_LIMIT_INVALID (-2131755001) - #define mtGNR_WRN_FILTER_TIME_NEGATIVE (-2131755002) - #define mtGNR_WRN_DERIVATIVE_TIME_NEG (-2131755003) - #define mtGNR_WRN_INTEGRATION_TIME_NEG (-2131755004) - #define mtGNR_WRN_GAIN_NEGATIVE (-2131755005) - #define mtGNR_WRN_MEM_ALLOC_FAILED (-2131755006) - #define mtGNR_WRN_OTHER_FB_USES_SYSREF (-2131755007) - #define mtGNR_ERR_DELAY_TIME_TOO_HIGH (-1058013172) - #define mtGNR_ERR_OUTPUT_LIMIT_INVALID (-1058013173) - #define mtGNR_ERR_DELAY_TIME_HIGH (-1058013174) - #define mtGNR_ERR_DELAY_TIME_NEGATIVE (-1058013175) - #define mtGNR_ERR_FILTER_TIME_NEGATIVE (-1058013176) - #define mtGNR_ERR_DERIVATIVE_TIME_NEG (-1058013177) - #define mtGNR_ERR_INTEGRATION_TIME_NEG (-1058013178) - #define mtGNR_ERR_GAIN_NEGATIVE (-1058013179) - #define mtGNR_ERR_SAMPLE_TIME_INVALID (-1058013180) - #define mtGNR_ERR_MEM_ALLOC_FAILED (-1058013181) -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST signed long mtGNR_WRN_DELAY_TIME_TOO_HIGH; - _GLOBAL_CONST signed long mtGNR_WRN_DELAY_TIME_NEGATIVE; - _GLOBAL_CONST signed long mtGNR_WRN_OUTPUT_LIMIT_INVALID; - _GLOBAL_CONST signed long mtGNR_WRN_FILTER_TIME_NEGATIVE; - _GLOBAL_CONST signed long mtGNR_WRN_DERIVATIVE_TIME_NEG; - _GLOBAL_CONST signed long mtGNR_WRN_INTEGRATION_TIME_NEG; - _GLOBAL_CONST signed long mtGNR_WRN_GAIN_NEGATIVE; - _GLOBAL_CONST signed long mtGNR_WRN_MEM_ALLOC_FAILED; - _GLOBAL_CONST signed long mtGNR_WRN_OTHER_FB_USES_SYSREF; - _GLOBAL_CONST signed long mtGNR_ERR_DELAY_TIME_TOO_HIGH; - _GLOBAL_CONST signed long mtGNR_ERR_OUTPUT_LIMIT_INVALID; - _GLOBAL_CONST signed long mtGNR_ERR_DELAY_TIME_HIGH; - _GLOBAL_CONST signed long mtGNR_ERR_DELAY_TIME_NEGATIVE; - _GLOBAL_CONST signed long mtGNR_ERR_FILTER_TIME_NEGATIVE; - _GLOBAL_CONST signed long mtGNR_ERR_DERIVATIVE_TIME_NEG; - _GLOBAL_CONST signed long mtGNR_ERR_INTEGRATION_TIME_NEG; - _GLOBAL_CONST signed long mtGNR_ERR_GAIN_NEGATIVE; - _GLOBAL_CONST signed long mtGNR_ERR_SAMPLE_TIME_INVALID; - _GLOBAL_CONST signed long mtGNR_ERR_MEM_ALLOC_FAILED; -#endif - - - - /* Datatypes and datatypes of function blocks */ typedef enum MTPIDIntegrationEnum { mtINTEGRATION_FREE = 0, @@ -134,6 +89,52 @@ typedef struct MTTransferFcnType +/* Constants */ +#ifdef _REPLACE_CONST + #define mtGNR_WRN_DELAY_TIME_TOO_HIGH (-2131754999) + #define mtGNR_WRN_DELAY_TIME_NEGATIVE (-2131755000) + #define mtGNR_WRN_OUTPUT_LIMIT_INVALID (-2131755001) + #define mtGNR_WRN_FILTER_TIME_NEGATIVE (-2131755002) + #define mtGNR_WRN_DERIVATIVE_TIME_NEG (-2131755003) + #define mtGNR_WRN_INTEGRATION_TIME_NEG (-2131755004) + #define mtGNR_WRN_GAIN_NEGATIVE (-2131755005) + #define mtGNR_WRN_MEM_ALLOC_FAILED (-2131755006) + #define mtGNR_WRN_OTHER_FB_USES_SYSREF (-2131755007) + #define mtGNR_ERR_DELAY_TIME_TOO_HIGH (-1058013172) + #define mtGNR_ERR_OUTPUT_LIMIT_INVALID (-1058013173) + #define mtGNR_ERR_DELAY_TIME_HIGH (-1058013174) + #define mtGNR_ERR_DELAY_TIME_NEGATIVE (-1058013175) + #define mtGNR_ERR_FILTER_TIME_NEGATIVE (-1058013176) + #define mtGNR_ERR_DERIVATIVE_TIME_NEG (-1058013177) + #define mtGNR_ERR_INTEGRATION_TIME_NEG (-1058013178) + #define mtGNR_ERR_GAIN_NEGATIVE (-1058013179) + #define mtGNR_ERR_SAMPLE_TIME_INVALID (-1058013180) + #define mtGNR_ERR_MEM_ALLOC_FAILED (-1058013181) +#else + _GLOBAL_CONST signed long mtGNR_WRN_DELAY_TIME_TOO_HIGH; + _GLOBAL_CONST signed long mtGNR_WRN_DELAY_TIME_NEGATIVE; + _GLOBAL_CONST signed long mtGNR_WRN_OUTPUT_LIMIT_INVALID; + _GLOBAL_CONST signed long mtGNR_WRN_FILTER_TIME_NEGATIVE; + _GLOBAL_CONST signed long mtGNR_WRN_DERIVATIVE_TIME_NEG; + _GLOBAL_CONST signed long mtGNR_WRN_INTEGRATION_TIME_NEG; + _GLOBAL_CONST signed long mtGNR_WRN_GAIN_NEGATIVE; + _GLOBAL_CONST signed long mtGNR_WRN_MEM_ALLOC_FAILED; + _GLOBAL_CONST signed long mtGNR_WRN_OTHER_FB_USES_SYSREF; + _GLOBAL_CONST signed long mtGNR_ERR_DELAY_TIME_TOO_HIGH; + _GLOBAL_CONST signed long mtGNR_ERR_OUTPUT_LIMIT_INVALID; + _GLOBAL_CONST signed long mtGNR_ERR_DELAY_TIME_HIGH; + _GLOBAL_CONST signed long mtGNR_ERR_DELAY_TIME_NEGATIVE; + _GLOBAL_CONST signed long mtGNR_ERR_FILTER_TIME_NEGATIVE; + _GLOBAL_CONST signed long mtGNR_ERR_DERIVATIVE_TIME_NEG; + _GLOBAL_CONST signed long mtGNR_ERR_INTEGRATION_TIME_NEG; + _GLOBAL_CONST signed long mtGNR_ERR_GAIN_NEGATIVE; + _GLOBAL_CONST signed long mtGNR_ERR_SAMPLE_TIME_INVALID; + _GLOBAL_CONST signed long mtGNR_ERR_MEM_ALLOC_FAILED; +#endif + + + + #ifdef __cplusplus }; #endif diff --git a/example/AsProject/Logical/Libraries/_AS/MTTypes/binary.lby b/example/AsProject/Logical/Libraries/_AS/MTTypes/binary.lby index b082f02..dec6486 100644 --- a/example/AsProject/Logical/Libraries/_AS/MTTypes/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/MTTypes/binary.lby @@ -1,9 +1,8 @@  - + - MTTypes.fun - MTTypes.typ - MTTypes.var + MTTypes.typ + MTTypes.var \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/_AS/Package.pkg b/example/AsProject/Logical/Libraries/_AS/Package.pkg index 7fc0b5e..799806d 100644 --- a/example/AsProject/Logical/Libraries/_AS/Package.pkg +++ b/example/AsProject/Logical/Libraries/_AS/Package.pkg @@ -4,11 +4,9 @@ ArEventLog AsARCfg - AsArLog AsArProf AsBrMath AsBrStr - AsDb AsEPL AsGuard AsHttp @@ -17,7 +15,6 @@ AsIODiag AsIOTime AsMem - AsSafety AsSem astime AsTCP @@ -26,17 +23,17 @@ AsXml AsZip brsystem - Convert DataObj dvframe FileIO - LoopConR - MTTypes operator runtime standard sys_lib AsBrWStr - MTLookUp + MTTypes + MTBasics + LoopConR + MTLookUp \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/_AS/astime/SG4/astime.h b/example/AsProject/Logical/Libraries/_AS/astime/SG4/astime.h index 144dc69..cba5941 100644 --- a/example/AsProject/Logical/Libraries/_AS/astime/SG4/astime.h +++ b/example/AsProject/Logical/Libraries/_AS/astime/SG4/astime.h @@ -15,47 +15,6 @@ extern "C" #ifndef _BUR_PUBLIC #define _BUR_PUBLIC #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define timERR_AR 33213U - #define timERR_INVALID_DTSTRUCTURE 33212U - #define timERR_INVALID_LEN 33211U - #define timERR_INVALID_PARAMETER 33210U - #define timREDUND_INTERFACE 3U - #define timTIME_SERVER 2U - #define timREAL_TIME_CLOCK 1U - #define timNO_DST 3U - #define timDAYLIGHT_SAVING_TIME 2U - #define timNORMAL_TIME 1U - #define TIME_MAX 2073600000 - #define TIME_MIN (-2073600000) - #define DATE_AND_TIME_MAX 4102444799U - #define timEXSETTIME_NO_OPTION 0U - #define timEXSETTIME_NO_LOGENTRY 1U -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST unsigned short timERR_AR; - _GLOBAL_CONST unsigned short timERR_INVALID_DTSTRUCTURE; - _GLOBAL_CONST unsigned short timERR_INVALID_LEN; - _GLOBAL_CONST unsigned short timERR_INVALID_PARAMETER; - _GLOBAL_CONST unsigned char timREDUND_INTERFACE; - _GLOBAL_CONST unsigned char timTIME_SERVER; - _GLOBAL_CONST unsigned char timREAL_TIME_CLOCK; - _GLOBAL_CONST unsigned char timNO_DST; - _GLOBAL_CONST unsigned char timDAYLIGHT_SAVING_TIME; - _GLOBAL_CONST unsigned char timNORMAL_TIME; - _GLOBAL_CONST signed long TIME_MAX; - _GLOBAL_CONST signed long TIME_MIN; - _GLOBAL_CONST unsigned long DATE_AND_TIME_MAX; - _GLOBAL_CONST unsigned char timEXSETTIME_NO_OPTION; - _GLOBAL_CONST unsigned char timEXSETTIME_NO_LOGENTRY; -#endif - - - - /* Datatypes and datatypes of function blocks */ typedef struct TIMEStructure { signed char day; @@ -358,6 +317,44 @@ _BUR_PUBLIC unsigned long DiffT(plctime TIME2, plctime TIME1); _BUR_PUBLIC unsigned long DiffDT(plcdt DT2, plcdt DT1); +/* Constants */ +#ifdef _REPLACE_CONST + #define timERR_AR 33213U + #define timERR_INVALID_DTSTRUCTURE 33212U + #define timERR_INVALID_LEN 33211U + #define timERR_INVALID_PARAMETER 33210U + #define timREDUND_INTERFACE 3U + #define timTIME_SERVER 2U + #define timREAL_TIME_CLOCK 1U + #define timNO_DST 3U + #define timDAYLIGHT_SAVING_TIME 2U + #define timNORMAL_TIME 1U + #define TIME_MAX 2073600000 + #define TIME_MIN (-2073600000) + #define DATE_AND_TIME_MAX 4102444799U + #define timEXSETTIME_NO_OPTION 0U + #define timEXSETTIME_NO_LOGENTRY 1U +#else + _GLOBAL_CONST unsigned short timERR_AR; + _GLOBAL_CONST unsigned short timERR_INVALID_DTSTRUCTURE; + _GLOBAL_CONST unsigned short timERR_INVALID_LEN; + _GLOBAL_CONST unsigned short timERR_INVALID_PARAMETER; + _GLOBAL_CONST unsigned char timREDUND_INTERFACE; + _GLOBAL_CONST unsigned char timTIME_SERVER; + _GLOBAL_CONST unsigned char timREAL_TIME_CLOCK; + _GLOBAL_CONST unsigned char timNO_DST; + _GLOBAL_CONST unsigned char timDAYLIGHT_SAVING_TIME; + _GLOBAL_CONST unsigned char timNORMAL_TIME; + _GLOBAL_CONST signed long TIME_MAX; + _GLOBAL_CONST signed long TIME_MIN; + _GLOBAL_CONST unsigned long DATE_AND_TIME_MAX; + _GLOBAL_CONST unsigned char timEXSETTIME_NO_OPTION; + _GLOBAL_CONST unsigned char timEXSETTIME_NO_LOGENTRY; +#endif + + + + #ifdef __cplusplus }; #endif diff --git a/example/AsProject/Logical/Libraries/_AS/astime/binary.lby b/example/AsProject/Logical/Libraries/_AS/astime/binary.lby index 3886c33..4ce250f 100644 --- a/example/AsProject/Logical/Libraries/_AS/astime/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/astime/binary.lby @@ -1,12 +1,12 @@ - - - - - astime.fun - astime.typ - astime.var - - - - - \ No newline at end of file + + + + + astime.fun + astime.typ + astime.var + + + + + diff --git a/example/AsProject/Logical/Libraries/_AS/brsystem/SG4/brsystem.h b/example/AsProject/Logical/Libraries/_AS/brsystem/SG4/brsystem.h index 076c4ff..e7acb77 100644 --- a/example/AsProject/Logical/Libraries/_AS/brsystem/SG4/brsystem.h +++ b/example/AsProject/Logical/Libraries/_AS/brsystem/SG4/brsystem.h @@ -15,125 +15,7 @@ extern "C" #ifndef _BUR_PUBLIC #define _BUR_PUBLIC #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define brWINDOWS_BLUESCREEN 1U - #define brWINDOWS_OK 0U - #define brX2X 10U - #define brPP 255U - #define brCPU 1U - #define brKEY 8U - #define brDRAM 0U - #define br2003 2U - #define br2005 1U - #define br2010 0U - #define brC200 9U - #define brC300 8U - #define brADDON 7U - #define brPANEL 6U - #define brGLOBAL_REMANENT_PV 5U - #define brLOCAL_REMANENT_PV 4U - #define brUSRROM 3U - #define brSYSROM 2U - #define brUSRRAM 1U - #define brACOPOS 7U - #define brCAN_IO 5U - #define brBASE_IO 3U - #define brPRODUCT 0U - #define brETHER_IO 6U - #define brNO_FAMILY 255U - #define brREMOTE_IO 4U - #define brBATTERY_OK 1U - #define brPOWERPANEL 5U - #define brBATTERY_LOW 0U - #define brLOGICSCANNER 3U - #define brPLUGIN_MODULE 10U - #define brSYSTEM_MODULE 2U - #define brBATTERY_NOTEST 2U - #define TARGET_BIG_ENDIAN 2U - #define brBATTERY_MISSING 3U - #define INIT_REASON_UNKNOWN (-1) - #define INIT_REASON_DOWNLOAD 3 - #define TARGET_LITTLE_ENDIAN 1U - #define brAUTOMATION_RUNTIME 4U - #define brERR_INVALID_DEVICE 27250U - #define INIT_REASON_COLDSTART 2 - #define INIT_REASON_WARMSTART 1 - #define brSYSCONF_SET_VOLATILE 0 - #define brERR_INVALID_PARAMETER 27251U - #define brERR_NON_CYCLIC_CONTEXT 27252U - #define brSYSCONF_SET_NON_VOLATILE 1 -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST unsigned long brWINDOWS_BLUESCREEN; - _GLOBAL_CONST unsigned long brWINDOWS_OK; - _GLOBAL_CONST unsigned char brX2X; - _GLOBAL_CONST unsigned char brPP; - _GLOBAL_CONST unsigned char brCPU; - _GLOBAL_CONST unsigned char brKEY; - _GLOBAL_CONST unsigned long brDRAM; - _GLOBAL_CONST unsigned char br2003; - _GLOBAL_CONST unsigned char br2005; - _GLOBAL_CONST unsigned char br2010; - _GLOBAL_CONST unsigned char brC200; - _GLOBAL_CONST unsigned char brC300; - _GLOBAL_CONST unsigned char brADDON; - _GLOBAL_CONST unsigned char brPANEL; - _GLOBAL_CONST unsigned long brGLOBAL_REMANENT_PV; - _GLOBAL_CONST unsigned long brLOCAL_REMANENT_PV; - _GLOBAL_CONST unsigned long brUSRROM; - _GLOBAL_CONST unsigned long brSYSROM; - _GLOBAL_CONST unsigned long brUSRRAM; - _GLOBAL_CONST unsigned char brACOPOS; - _GLOBAL_CONST unsigned char brCAN_IO; - _GLOBAL_CONST unsigned char brBASE_IO; - _GLOBAL_CONST unsigned char brPRODUCT; - _GLOBAL_CONST unsigned char brETHER_IO; - _GLOBAL_CONST unsigned char brNO_FAMILY; - _GLOBAL_CONST unsigned char brREMOTE_IO; - _GLOBAL_CONST unsigned char brBATTERY_OK; - _GLOBAL_CONST unsigned char brPOWERPANEL; - _GLOBAL_CONST unsigned char brBATTERY_LOW; - _GLOBAL_CONST unsigned char brLOGICSCANNER; - _GLOBAL_CONST unsigned char brPLUGIN_MODULE; - _GLOBAL_CONST unsigned char brSYSTEM_MODULE; - _GLOBAL_CONST unsigned char brBATTERY_NOTEST; - _GLOBAL_CONST unsigned char TARGET_BIG_ENDIAN; - _GLOBAL_CONST unsigned char brBATTERY_MISSING; - _GLOBAL_CONST signed char INIT_REASON_UNKNOWN; - _GLOBAL_CONST signed char INIT_REASON_DOWNLOAD; - _GLOBAL_CONST unsigned char TARGET_LITTLE_ENDIAN; - _GLOBAL_CONST unsigned char brAUTOMATION_RUNTIME; - _GLOBAL_CONST unsigned short brERR_INVALID_DEVICE; - _GLOBAL_CONST signed char INIT_REASON_COLDSTART; - _GLOBAL_CONST signed char INIT_REASON_WARMSTART; - _GLOBAL_CONST plcbit brSYSCONF_SET_VOLATILE; - _GLOBAL_CONST unsigned short brERR_INVALID_PARAMETER; - _GLOBAL_CONST unsigned short brERR_NON_CYCLIC_CONTEXT; - _GLOBAL_CONST plcbit brSYSCONF_SET_NON_VOLATILE; -#endif - - - - /* Datatypes and datatypes of function blocks */ -typedef struct MEMInfo -{ - /* VAR_OUTPUT (analog) */ - unsigned short status; - unsigned long FreeUSR_Ram; - unsigned long FreeSYSTEM; - unsigned long FreeUSR_Prom; - unsigned long FreeSYS_Prom; - unsigned long FreeFIX_Ram; - unsigned long FreeTMP_Ram; - unsigned long FreeMEMCARD; - /* VAR_INPUT (digital) */ - plcbit enable; -} MEMInfo_typ; - typedef struct MEMxInfo { /* VAR_INPUT (analog) */ @@ -184,157 +66,59 @@ typedef struct TARGETInfo plcbit enable; } TARGETInfo_typ; -typedef struct HWInfo -{ - /* VAR_INPUT (analog) */ - unsigned long pName; - /* VAR_OUTPUT (analog) */ - unsigned short status; - unsigned char family; - unsigned char usetype; - unsigned long module_typ; - unsigned char master_no; - unsigned char slave_no; - unsigned char module_adr; - unsigned char slot_no; - /* VAR (analog) */ - unsigned long next_vw_p; - unsigned long last_modul_p; - unsigned long next_entry_p; - unsigned char next_entry_ix; - unsigned char next_slot_ix; - unsigned char last_rio_master; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit first; -} HWInfo_typ; - -typedef struct SysconfInfo -{ - /* VAR_INPUT (analog) */ - unsigned long pEntry; - unsigned long pValue; - unsigned long value_len; - /* VAR_OUTPUT (analog) */ - unsigned short status; - /* VAR_INPUT (digital) */ - plcbit enable; -} SysconfInfo_typ; - -typedef struct SysconfSet -{ - /* VAR_INPUT (analog) */ - unsigned long pEntry; - unsigned long pNewValue; - unsigned char option; - /* VAR_OUTPUT (analog) */ - unsigned short status; - /* VAR_INPUT (digital) */ - plcbit enable; -} SysconfSet_typ; - -typedef struct BatteryInfo -{ - /* VAR_INPUT (analog) */ - unsigned long pDevice; - /* VAR_OUTPUT (analog) */ - unsigned short status; - unsigned char state; - /* VAR_INPUT (digital) */ - plcbit enable; -} BatteryInfo_typ; - -typedef struct EXCInfo -{ - /* VAR_OUTPUT (analog) */ - unsigned short status; - unsigned long task_class; - unsigned long task_ident; - /* VAR_INPUT (digital) */ - plcbit enable; -} EXCInfo_typ; - -typedef struct ZYKVLenable -{ - /* VAR_OUTPUT (analog) */ - unsigned short status; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit mode; -} ZYKVLenable_typ; - -typedef struct PMemGet -{ - /* VAR_INPUT (analog) */ - unsigned long offset; - unsigned long len; - unsigned long adress; - /* VAR_OUTPUT (analog) */ - unsigned short status; - /* VAR_INPUT (digital) */ - plcbit enable; -} PMemGet_typ; - -typedef struct PMemPut -{ - /* VAR_INPUT (analog) */ - unsigned long offset; - unsigned long len; - unsigned long adress; - /* VAR_OUTPUT (analog) */ - unsigned short status; - /* VAR_INPUT (digital) */ - plcbit enable; -} PMemPut_typ; - -typedef struct PMemSize -{ - /* VAR_OUTPUT (analog) */ - unsigned short status; - unsigned long size; - /* VAR_INPUT (digital) */ - plcbit enable; -} PMemSize_typ; - -typedef struct ARwinWindowsInfo -{ - /* VAR_OUTPUT (analog) */ - unsigned short status; - unsigned long windowsStatus; - /* VAR_INPUT (digital) */ - plcbit enable; -} ARwinWindowsInfo_typ; - -typedef struct ARwinEthWinInfo -{ - /* VAR_OUTPUT (analog) */ - unsigned short status; - plcstring IPAddr[16]; - plcstring SubnetMask[16]; - plcbyte MacAddr[6]; - /* VAR_INPUT (digital) */ - plcbit enable; -} ARwinEthWinInfo_typ; - /* Prototyping of functions and function blocks */ -_BUR_PUBLIC void MEMInfo(struct MEMInfo* inst); _BUR_PUBLIC void MEMxInfo(struct MEMxInfo* inst); _BUR_PUBLIC void SysInfo(struct SysInfo* inst); _BUR_PUBLIC void RTInfo(struct RTInfo* inst); _BUR_PUBLIC void TARGETInfo(struct TARGETInfo* inst); -_BUR_PUBLIC void HWInfo(struct HWInfo* inst); -_BUR_PUBLIC void SysconfInfo(struct SysconfInfo* inst); -_BUR_PUBLIC void SysconfSet(struct SysconfSet* inst); -_BUR_PUBLIC void BatteryInfo(struct BatteryInfo* inst); -_BUR_PUBLIC void EXCInfo(struct EXCInfo* inst); -_BUR_PUBLIC void ZYKVLenable(struct ZYKVLenable* inst); -_BUR_PUBLIC void PMemGet(struct PMemGet* inst); -_BUR_PUBLIC void PMemPut(struct PMemPut* inst); -_BUR_PUBLIC void PMemSize(struct PMemSize* inst); -_BUR_PUBLIC void ARwinWindowsInfo(struct ARwinWindowsInfo* inst); -_BUR_PUBLIC void ARwinEthWinInfo(struct ARwinEthWinInfo* inst); +_BUR_PUBLIC unsigned long RTTolerance(void); +_BUR_PUBLIC plcbit RTCyclic(void); +_BUR_PUBLIC plcbit RTInit(void); +_BUR_PUBLIC plcbit RTExit(void); +_BUR_PUBLIC unsigned long OSVersionMajor(void); +_BUR_PUBLIC unsigned long OSVersionMinor(void); +_BUR_PUBLIC unsigned long OSVersionPatch(void); +_BUR_PUBLIC unsigned long OSVersionBuild(void); +_BUR_PUBLIC unsigned long RTCycleTime(signed char task_class); +_BUR_PUBLIC unsigned long RTCylceTime(signed char task_class); + + +/* Constants */ +#ifdef _REPLACE_CONST + #define brERR_NON_CYCLIC_CONTEXT 27252U + #define brERR_INVALID_PARAMETER 27251U + #define brGLOBAL_REMANENT_PV 5U + #define brLOCAL_REMANENT_PV 4U + #define brUSRROM 3U + #define brSYSROM 2U + #define brUSRRAM 1U + #define brDRAM 0U + #define TARGET_BIG_ENDIAN 2U + #define TARGET_LITTLE_ENDIAN 1U + #define INIT_REASON_UNKNOWN (-1) + #define INIT_REASON_DOWNLOAD 3 + #define INIT_REASON_COLDSTART 2 + #define INIT_REASON_WARMSTART 1 +#else + _GLOBAL_CONST unsigned short brERR_NON_CYCLIC_CONTEXT; + _GLOBAL_CONST unsigned short brERR_INVALID_PARAMETER; + _GLOBAL_CONST unsigned long brGLOBAL_REMANENT_PV; + _GLOBAL_CONST unsigned long brLOCAL_REMANENT_PV; + _GLOBAL_CONST unsigned long brUSRROM; + _GLOBAL_CONST unsigned long brSYSROM; + _GLOBAL_CONST unsigned long brUSRRAM; + _GLOBAL_CONST unsigned long brDRAM; + _GLOBAL_CONST unsigned char TARGET_BIG_ENDIAN; + _GLOBAL_CONST unsigned char TARGET_LITTLE_ENDIAN; + _GLOBAL_CONST signed char INIT_REASON_UNKNOWN; + _GLOBAL_CONST signed char INIT_REASON_DOWNLOAD; + _GLOBAL_CONST signed char INIT_REASON_COLDSTART; + _GLOBAL_CONST signed char INIT_REASON_WARMSTART; +#endif + + #ifdef __cplusplus diff --git a/example/AsProject/Logical/Libraries/_AS/brsystem/binary.lby b/example/AsProject/Logical/Libraries/_AS/brsystem/binary.lby index b8c8ff9..6a1c0f2 100644 --- a/example/AsProject/Logical/Libraries/_AS/brsystem/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/brsystem/binary.lby @@ -1,12 +1,12 @@ - - - - - brsystem.fun - brsystem.typ - brsystem.var - - - - - \ No newline at end of file + + + + + brsystem.fun + brsystem.typ + brsystem.var + + + + + diff --git a/example/AsProject/Logical/Libraries/_AS/brsystem/brsystem.fun b/example/AsProject/Logical/Libraries/_AS/brsystem/brsystem.fun index 8773a06..7a92bd0 100644 --- a/example/AsProject/Logical/Libraries/_AS/brsystem/brsystem.fun +++ b/example/AsProject/Logical/Libraries/_AS/brsystem/brsystem.fun @@ -1,20 +1,4 @@ -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK MEMInfo (*returns information about the memory areas available on the system*) - VAR_INPUT - enable :BOOL; (*enables execution*) - END_VAR - VAR_OUTPUT - status :UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*) - FreeUSR_Ram :UDINT; (*SG3: free memory in USER RAM SG4: free memory in SRAM (Userram)*) - FreeSYSTEM :UDINT; (*SG3: free system memory SG4: not used, always 0*) - FreeUSR_Prom :UDINT; (*SG3: free memory in USER PROM SG4: free memory of HD where RPSHD is located*) - FreeSYS_Prom :UDINT; (*SG3: free memory in system PROM SG4: free memory of HD where RPSHD is located*) - FreeFIX_Ram :UDINT; (*SG3: free memory in FIX RAM SG4: not used, always 0*) - FreeTMP_Ram :UDINT; (*SG3: free temporary memory in RAM SG4: free memory in DRAM*) - FreeMEMCARD :UDINT; (*SG3: free memory on MEMCARD SG4: not used, always 0*) - END_VAR -END_FUNCTION_BLOCK - {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK MEMxInfo (*returns information about the memory areas available in the system; asynchronous execution*) VAR_INPUT enable :BOOL; (*enables execution*) @@ -39,13 +23,13 @@ END_FUNCTION_BLOCK END_VAR VAR_OUTPUT init_reason :USINT; (*reason for initialization*) - init_count :USINT; (*SG3: the value is increased by every INIT (warm restart) SG4: not used, always 0*) + init_count :USINT; (*not used, always 0*) tick_count :UDINT; (*tick count*) - version :UDINT; (*operating system version of the target system*) + version :UDINT; (*not used, always 0*) END_VAR END_FUNCTION_BLOCK -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK RTInfo (*returns runtime information about the software object*) +{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK RTInfo (*returns runtime information about the program*) VAR_INPUT enable :BOOL; (*enables execution*) END_VAR @@ -53,14 +37,14 @@ END_FUNCTION_BLOCK status :UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*) cycle_time :UDINT; (*cycle time in microsec*) init_reason :SINT; (*reason for initialization*) - task_class :SINT; (*task class (SG3: #1 - #4 SG4: #1 - #8)*) + task_class :SINT; (*task class (#1 - #8)*) END_VAR END_FUNCTION_BLOCK {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK TARGETInfo (*returns information about the target system used*) VAR_INPUT enable :BOOL; (*enables execution*) - pOSVersion :UDINT; (*string given as a pointer (min. 7 char), where the os version is written*) + pOSVersion :UDINT; (*not used*) END_VAR VAR_OUTPUT status :UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*) @@ -68,140 +52,39 @@ END_FUNCTION_BLOCK END_VAR END_FUNCTION_BLOCK -{REDUND_ERROR} FUNCTION_BLOCK HWInfo (*returns information about the hardware configuration*) - VAR_INPUT - enable :BOOL; (*enables execution*) - first :BOOL; (*determines the hardware module on which the FUB is used 0/1 next/first*) - pName :UDINT; (*string given as a pointer, where the name of the module is written*) - END_VAR - VAR_OUTPUT - status :UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*) - family :USINT; (*family designation*) - usetype :USINT; (*hardware type*) - module_typ :UDINT; (*module type*) - master_no :USINT; (*logical number of the IO master, RIO master, CAN bus with CANIO*) - slave_no :USINT; (*slave number*) - module_adr :USINT; (*hardware module address (decimal)*) - slot_no :USINT; (*slot of the first submodule found (decimal)*) - END_VAR - VAR - next_vw_p :UDINT; (*internal variable*) - last_modul_p :UDINT; (*internal variable*) - next_entry_p :UDINT; (*internal variable*) - next_entry_ix :USINT; (*internal variable*) - next_slot_ix :USINT; (*internal variable*) - last_rio_master :USINT; (*internal variable*) - END_VAR -END_FUNCTION_BLOCK +{REDUND_OK} FUNCTION RTTolerance : UDINT (*returns the tolerance [microsec] of the programs task class*) +END_FUNCTION -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK SysconfInfo (*returns the parameters for a sysconf entry*) - VAR_INPUT - enable :BOOL; (*enables execution*) - pEntry :UDINT; (*string given as a pointer, where the name of the entry is written*) - pValue :UDINT; (*string given as a pointer, where the value of the entry is copied*) - value_len :UDINT; (*length of the "value-string"*) - END_VAR - VAR_OUTPUT - status :UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*) - END_VAR -END_FUNCTION_BLOCK - -{REDUND_ERROR} FUNCTION_BLOCK SysconfSet (*sets the parameters for a sysconf entry*) - VAR_INPUT - enable :BOOL; (*enables execution*) - pEntry :UDINT; (*string given as a pointer, where the name of the entry is written*) - pNewValue :UDINT; (*string given as a pointer, where the new value of the entry is written*) - option :USINT; (*sets the parameter volatile/permanent ("brSYSCONF_SET_VOLATILE"/"brSYSCONF_SET_NON_VOLATILE")*) - END_VAR - VAR_OUTPUT - status :UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*) - END_VAR -END_FUNCTION_BLOCK +{REDUND_OK} FUNCTION RTCyclic : BOOL (*returns true, if function is called in the cyclic part of the program, false otherwise*) +END_FUNCTION -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK BatteryInfo (*returns the state of the battery*) - VAR_INPUT - enable :BOOL; (*enables execution*) - pDevice :UDINT; (*device name given as a pointer*) - END_VAR - VAR_OUTPUT - status :UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*) - state :USINT; (*state of the battery*) - END_VAR -END_FUNCTION_BLOCK +{REDUND_OK} FUNCTION RTInit : BOOL (*returns true, if function is called in the init part of the program, false otherwise*) +END_FUNCTION -{REDUND_ERROR} FUNCTION_BLOCK EXCInfo (*returns information about the software object that triggered the exception*) - VAR_INPUT - enable :BOOL; (*enables execution*) - END_VAR - VAR_OUTPUT - status :UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*) - task_class :UDINT; (*task class in which the exception was triggered*) - task_ident :UDINT; (*ID number of the software object that triggered the exception*) - END_VAR -END_FUNCTION_BLOCK +{REDUND_OK} FUNCTION RTExit : BOOL (*returns true, if function is called in the exit part of the program, false otherwise*) +END_FUNCTION -{REDUND_ERROR} FUNCTION_BLOCK ZYKVLenable (*enables/disables the cycle time monitoring of software objects*) - VAR_INPUT - enable :BOOL; (*enables execution*) - mode :BOOL; (*0/1 monitoring off/on*) - END_VAR - VAR_OUTPUT - status :UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*) - END_VAR -END_FUNCTION_BLOCK +{REDUND_OK} FUNCTION OSVersionMajor : UDINT (*returns the major number of the operating system version*) +END_FUNCTION -{REDUND_ERROR} FUNCTION_BLOCK PMemGet (*reads data of len byte from the permanent memeory area beginning at offset*) - VAR_INPUT - enable :BOOL; (*enables execution*) - offset :UDINT; (*offset within the permanent memory area*) - len :UDINT; (*length of data area to be read*) - adress :UDINT; (*address where the read data is copied*) - END_VAR - VAR_OUTPUT - status :UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*) - END_VAR -END_FUNCTION_BLOCK +{REDUND_OK} FUNCTION OSVersionMinor : UDINT (*returns the minor number of the operating system version*) +END_FUNCTION -{REDUND_ERROR} FUNCTION_BLOCK PMemPut (*writes len bytes to the permanent memory area beginning at offset*) - VAR_INPUT - enable :BOOL; (*enables execution*) - offset :UDINT; (*offset within the permanent memory area*) - len :UDINT; (*length of data area to be written*) - adress :UDINT; (*address of the data to be written to the permanent memory area*) - END_VAR - VAR_OUTPUT - status :UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*) - END_VAR -END_FUNCTION_BLOCK +{REDUND_OK} FUNCTION OSVersionPatch : UDINT (*returns the patch number of the operating system version*) +END_FUNCTION -{REDUND_ERROR} FUNCTION_BLOCK PMemSize (*determines the size of permanent memory area in its existing configuration*) - VAR_INPUT - enable :BOOL; (*enables execution*) - END_VAR - VAR_OUTPUT - status :UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*) - size :UDINT; (*size of permanent memory area*) - END_VAR -END_FUNCTION_BLOCK +{REDUND_OK} FUNCTION OSVersionBuild : UDINT (*returns the build number of the operating system version*) +END_FUNCTION -{REDUND_ERROR} FUNCTION_BLOCK ARwinWindowsInfo (*get status of windows system*) +{REDUND_OK} FUNCTION RTCycleTime : UDINT (*returns the cycle time [microsec] of the task class*) VAR_INPUT - enable :BOOL; (*enables execution*) - END_VAR - VAR_OUTPUT - status :UINT; (*execution status: ERR_OK, 0xXXXX = see help*) - windowsStatus :UDINT; (*windows system status: brWINDOWS_BLUESCREEN, brWINDOWS_OK*) + task_class : SINT; (*task class (#1 - #8)*) END_VAR -END_FUNCTION_BLOCK +END_FUNCTION -{REDUND_ERROR} FUNCTION_BLOCK ARwinEthWinInfo (*get ETH info windows interface*) +{REDUND_OK} FUNCTION RTCylceTime : UDINT (*OBSOLETE (only for compatibility reasons) - use RTCycleTime*) VAR_INPUT - enable :BOOL; (*enables execution*) + task_class : SINT; (*task class (#1 - #8)*) END_VAR - VAR_OUTPUT - status :UINT; (*execution status: ERR_OK, 0xXXXX = see help*) - IPAddr :STRING[15]; (*IP-address of virtual windows IF*) - SubnetMask :STRING[15]; (*netmask of virtual windows IF*) - MacAddr :ARRAY[0..5] OF BYTE; (*MAC-address of virtual windows IF*) - END_VAR -END_FUNCTION_BLOCK +END_FUNCTION + \ No newline at end of file diff --git a/example/AsProject/Logical/Libraries/_AS/brsystem/brsystem.var b/example/AsProject/Logical/Libraries/_AS/brsystem/brsystem.var index d846b59..357bbe0 100644 --- a/example/AsProject/Logical/Libraries/_AS/brsystem/brsystem.var +++ b/example/AsProject/Logical/Libraries/_AS/brsystem/brsystem.var @@ -1,49 +1,17 @@ VAR CONSTANT - brSYSCONF_SET_NON_VOLATILE : BOOL := TRUE; (*set permanent value*) + INIT_REASON_WARMSTART : SINT := 1; (*warm restart boot information*) + INIT_REASON_COLDSTART : SINT := 2; (*cold restart boot information*) + INIT_REASON_DOWNLOAD : SINT := 3; (*download boot information*) + INIT_REASON_UNKNOWN : SINT := -1; (*unknown boot information*) + TARGET_LITTLE_ENDIAN : USINT := 1; (*formatSpec*) + TARGET_BIG_ENDIAN : USINT := 2; (*formatSpec*) + brDRAM : UDINT := 0; (*DRAM memory type*) + brUSRRAM : UDINT := 1; (*USRRAM memory type*) + brSYSROM : UDINT := 2; (*SYSROM memory type*) + brUSRROM : UDINT := 3; (*USRROM memory type*) + brLOCAL_REMANENT_PV : UDINT := 4; (*local REMMEM memory type*) + brGLOBAL_REMANENT_PV : UDINT := 5; (*global REMMEM memory type*) + brERR_INVALID_PARAMETER : UINT := 27251; (*invalid parameter transferred*) brERR_NON_CYCLIC_CONTEXT : UINT := 27252; (*non-cyclic context call*) - brERR_INVALID_PARAMETER : UINT := 27251; (*invalid parameter transferred*) - brSYSCONF_SET_VOLATILE : BOOL := FALSE; (*set non-permanent value*) - INIT_REASON_WARMSTART : SINT := 1; (*warm restart boot information*) - INIT_REASON_COLDSTART : SINT := 2; (*cold restart boot information*) - brERR_INVALID_DEVICE : UINT := 27250; (*battery monitoring*) - brAUTOMATION_RUNTIME : USINT := 4; (*series recognition*) - TARGET_LITTLE_ENDIAN : USINT := 1; (*formatSpec*) - INIT_REASON_DOWNLOAD : SINT := 3; (*download boot information*) - INIT_REASON_UNKNOWN : SINT := -1; (*unknown boot information*) - brBATTERY_MISSING : USINT := 3; (*battery monitoring*) - TARGET_BIG_ENDIAN : USINT := 2; (*formatSpec*) - brBATTERY_NOTEST : USINT := 2; (*battery monitoring*) - brSYSTEM_MODULE : USINT := 2; (*usage recognition*) - brPLUGIN_MODULE : USINT := 10; (*usage recognition*) - brLOGICSCANNER : USINT := 3; (*series recognition*) - brBATTERY_LOW : USINT := 0; (*battery monitoring*) - brPOWERPANEL : USINT := 5; (*series recognition*) - brBATTERY_OK : USINT := 1; (*battery monitoring*) - brREMOTE_IO : USINT := 4; (*usage recognition*) - brNO_FAMILY : USINT := 255; (*series recognition*) - brETHER_IO : USINT := 6; (*usage recognition*) - brPRODUCT : USINT := 0; (*usage recognition*) - brBASE_IO : USINT := 3; (*usage recognition*) - brCAN_IO : USINT := 5; (*usage recognition*) - brACOPOS : USINT := 7; (*usage recognition*) - brUSRRAM : UDINT := 1; (*USRRAM memory type*) - brSYSROM : UDINT := 2; (*SYSROM memory type*) - brUSRROM : UDINT := 3; (*USRROM memory type*) - brLOCAL_REMANENT_PV : UDINT := 4; (*local REMMEM memory type*) - brGLOBAL_REMANENT_PV : UDINT := 5; (*global REMMEM memory type*) - brPANEL : USINT := 6; (*series recognition*) - brADDON : USINT := 7; (*series recognition*) - brC300 : USINT := 8; (*series recognition*) - brC200 : USINT := 9; (*series recognition*) - br2010 : USINT := 0; (*series recognition*) - br2005 : USINT := 1; (*series recognition*) - br2003 : USINT := 2; (*series recognition*) - brDRAM : UDINT := 0; (*DRAM memory type*) - brKEY : USINT := 8; (*usage recognition*) - brCPU : USINT := 1; (*usage recognition*) - brPP : USINT := 255; (*usage recognition*) - brX2X : USINT := 10; (*series recognition*) - brWINDOWS_OK : UDINT := 0; (*Windows OK*) - brWINDOWS_BLUESCREEN : UDINT := 1; (*Windows in bluescreen*) END_VAR diff --git a/example/AsProject/Logical/Libraries/_AS/dvframe/SG4/dvframe.h b/example/AsProject/Logical/Libraries/_AS/dvframe/SG4/dvframe.h index b3ca2f6..2073348 100644 --- a/example/AsProject/Logical/Libraries/_AS/dvframe/SG4/dvframe.h +++ b/example/AsProject/Logical/Libraries/_AS/dvframe/SG4/dvframe.h @@ -15,65 +15,6 @@ extern "C" #ifndef _BUR_PUBLIC #define _BUR_PUBLIC #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define ARG_BAUD 0U - #define ARG_MISC 16U - #define frmERR_OK 0U - #define ARG_PVPOLLADR 15U - #define frmERR_MAXOPEN 8254U - #define frmERR_NOINPUT 60U - #define ARG_TXPVPOLLADR 17U - #define frmERR_NOBUFFER 8071U - #define frmERR_PA_DB_SB 8256U - #define MISC_RECEIVE_ALL 2U - #define frmERR_NOTOPENED 8251U - #define frmERR_INPUTERROR 8079U - #define frmERR_NORESOURCES 8258U - #define ARG_EVSEND_TASKEVENT 18U - #define ARG_EVSEND_TASKIDENT 14U - #define frmERR_INIT_IN_PROGRESS 8068U - #define frmERR_IF_UNREACHABLE 8067U - #define frmERR_INVALIDBUFFER 8072U - #define frmERR_IOCTL_NOTVALID 8073U - #define frmERR_MODEDESCRIPTION 8253U - #define frmERR_TRANSMITOVERRUN 8078U - #define frmERR_FUB_ENABLE_FALSE 65534U - #define frmERR_DEVICEDESCRIPTION 8252U - #define frmERR_IOCTL_NOTSUPPORTED 8257U -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST unsigned long ARG_BAUD; - _GLOBAL_CONST unsigned long ARG_MISC; - _GLOBAL_CONST unsigned short frmERR_OK; - _GLOBAL_CONST unsigned long ARG_PVPOLLADR; - _GLOBAL_CONST unsigned short frmERR_MAXOPEN; - _GLOBAL_CONST unsigned short frmERR_NOINPUT; - _GLOBAL_CONST unsigned long ARG_TXPVPOLLADR; - _GLOBAL_CONST unsigned short frmERR_NOBUFFER; - _GLOBAL_CONST unsigned short frmERR_PA_DB_SB; - _GLOBAL_CONST unsigned long MISC_RECEIVE_ALL; - _GLOBAL_CONST unsigned short frmERR_NOTOPENED; - _GLOBAL_CONST unsigned short frmERR_INPUTERROR; - _GLOBAL_CONST unsigned short frmERR_NORESOURCES; - _GLOBAL_CONST unsigned long ARG_EVSEND_TASKEVENT; - _GLOBAL_CONST unsigned long ARG_EVSEND_TASKIDENT; - _GLOBAL_CONST unsigned short frmERR_INIT_IN_PROGRESS; - _GLOBAL_CONST unsigned short frmERR_IF_UNREACHABLE; - _GLOBAL_CONST unsigned short frmERR_INVALIDBUFFER; - _GLOBAL_CONST unsigned short frmERR_IOCTL_NOTVALID; - _GLOBAL_CONST unsigned short frmERR_MODEDESCRIPTION; - _GLOBAL_CONST unsigned short frmERR_TRANSMITOVERRUN; - _GLOBAL_CONST unsigned short frmERR_FUB_ENABLE_FALSE; - _GLOBAL_CONST unsigned short frmERR_DEVICEDESCRIPTION; - _GLOBAL_CONST unsigned short frmERR_IOCTL_NOTSUPPORTED; -#endif - - - - /* Datatypes and datatypes of function blocks */ typedef struct XOPENCONFIG { unsigned short idle; @@ -241,6 +182,62 @@ _BUR_PUBLIC void FRM_read(struct FRM_read* inst); _BUR_PUBLIC void FRM_xopen(struct FRM_xopen* inst); +/* Constants */ +#ifdef _REPLACE_CONST + #define ARG_BAUD 0U + #define ARG_MISC 16U + #define frmERR_OK 0U + #define ARG_PVPOLLADR 15U + #define frmERR_MAXOPEN 8254U + #define frmERR_NOINPUT 60U + #define ARG_TXPVPOLLADR 17U + #define frmERR_NOBUFFER 8071U + #define frmERR_PA_DB_SB 8256U + #define MISC_RECEIVE_ALL 2U + #define frmERR_NOTOPENED 8251U + #define frmERR_INPUTERROR 8079U + #define frmERR_NORESOURCES 8258U + #define ARG_EVSEND_TASKEVENT 18U + #define ARG_EVSEND_TASKIDENT 14U + #define frmERR_INIT_IN_PROGRESS 8068U + #define frmERR_IF_UNREACHABLE 8067U + #define frmERR_INVALIDBUFFER 8072U + #define frmERR_IOCTL_NOTVALID 8073U + #define frmERR_MODEDESCRIPTION 8253U + #define frmERR_TRANSMITOVERRUN 8078U + #define frmERR_FUB_ENABLE_FALSE 65534U + #define frmERR_DEVICEDESCRIPTION 8252U + #define frmERR_IOCTL_NOTSUPPORTED 8257U +#else + _GLOBAL_CONST unsigned long ARG_BAUD; + _GLOBAL_CONST unsigned long ARG_MISC; + _GLOBAL_CONST unsigned short frmERR_OK; + _GLOBAL_CONST unsigned long ARG_PVPOLLADR; + _GLOBAL_CONST unsigned short frmERR_MAXOPEN; + _GLOBAL_CONST unsigned short frmERR_NOINPUT; + _GLOBAL_CONST unsigned long ARG_TXPVPOLLADR; + _GLOBAL_CONST unsigned short frmERR_NOBUFFER; + _GLOBAL_CONST unsigned short frmERR_PA_DB_SB; + _GLOBAL_CONST unsigned long MISC_RECEIVE_ALL; + _GLOBAL_CONST unsigned short frmERR_NOTOPENED; + _GLOBAL_CONST unsigned short frmERR_INPUTERROR; + _GLOBAL_CONST unsigned short frmERR_NORESOURCES; + _GLOBAL_CONST unsigned long ARG_EVSEND_TASKEVENT; + _GLOBAL_CONST unsigned long ARG_EVSEND_TASKIDENT; + _GLOBAL_CONST unsigned short frmERR_INIT_IN_PROGRESS; + _GLOBAL_CONST unsigned short frmERR_IF_UNREACHABLE; + _GLOBAL_CONST unsigned short frmERR_INVALIDBUFFER; + _GLOBAL_CONST unsigned short frmERR_IOCTL_NOTVALID; + _GLOBAL_CONST unsigned short frmERR_MODEDESCRIPTION; + _GLOBAL_CONST unsigned short frmERR_TRANSMITOVERRUN; + _GLOBAL_CONST unsigned short frmERR_FUB_ENABLE_FALSE; + _GLOBAL_CONST unsigned short frmERR_DEVICEDESCRIPTION; + _GLOBAL_CONST unsigned short frmERR_IOCTL_NOTSUPPORTED; +#endif + + + + #ifdef __cplusplus }; #endif diff --git a/example/AsProject/Logical/Libraries/_AS/dvframe/binary.lby b/example/AsProject/Logical/Libraries/_AS/dvframe/binary.lby index 2a14c1c..680988e 100644 --- a/example/AsProject/Logical/Libraries/_AS/dvframe/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/dvframe/binary.lby @@ -1,12 +1,12 @@ - - - - - dvframe.fun - dvframe.typ - dvframe.var - - - - - \ No newline at end of file + + + + + dvframe.fun + dvframe.typ + dvframe.var + + + + + diff --git a/example/AsProject/Logical/Libraries/_AS/operator/binary.lby b/example/AsProject/Logical/Libraries/_AS/operator/binary.lby index 6c84922..2f1a9ab 100644 --- a/example/AsProject/Logical/Libraries/_AS/operator/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/operator/binary.lby @@ -1,9 +1,9 @@ - - - - - operator.fun - operator.typ - operator.var - - \ No newline at end of file + + + + + operator.fun + operator.typ + operator.var + + diff --git a/example/AsProject/Logical/Libraries/_AS/runtime/SG4/runtime.h b/example/AsProject/Logical/Libraries/_AS/runtime/SG4/runtime.h index 276ee6c..8ff44c4 100644 --- a/example/AsProject/Logical/Libraries/_AS/runtime/SG4/runtime.h +++ b/example/AsProject/Logical/Libraries/_AS/runtime/SG4/runtime.h @@ -13,71 +13,6 @@ extern "C" #ifndef _BUR_PUBLIC #define _BUR_PUBLIC #endif -/* Constants */ -#ifdef _REPLACE_CONST - #define IEC_DATATYPE_LINT 23U - #define IEC_DATATYPE_WSTRING 21U - #define IEC_DATATYPE_LWORD 20U - #define IEC_DATATYPE_DWORD 19U - #define IEC_DATATYPE_WORD 18U - #define IEC_DATATYPE_BYTE 17U - #define IEC_DATATYPE_TIME_OF_DAY 16U - #define IEC_DATATYPE_LREAL 14U - #define IEC_DATATYPE_DATE 13U - #define IEC_DATATYPE_TIME 12U - #define IEC_DATATYPE_DATE_AND_TIME 11U - #define IEC_DATATYPE_ULINT 10U - #define IEC_DATATYPE_STRING 9U - #define IEC_DATATYPE_REAL 8U - #define IEC_DATATYPE_UDINT 7U - #define IEC_DATATYPE_UINT 6U - #define IEC_DATATYPE_USINT 5U - #define IEC_DATATYPE_DINT 4U - #define IEC_DATATYPE_INT 3U - #define IEC_DATATYPE_SINT 2U - #define IEC_DATATYPE_BOOL 1U - #define ERR_FB_NOT_IMPLEMENTED (-1070585592) - #define ERR_FUB_REDUNDANT 35688U - #define ERR_FUB_BUSY 65535U - #define ERR_FUB_ENABLE_FALSE 65534U - #define ERR_NOTIMPLEMENTED 9999U - #define ERR_OK 0U -#else - #ifndef _GLOBAL_CONST - #define _GLOBAL_CONST _WEAK const - #endif - _GLOBAL_CONST unsigned short IEC_DATATYPE_LINT; - _GLOBAL_CONST unsigned short IEC_DATATYPE_WSTRING; - _GLOBAL_CONST unsigned short IEC_DATATYPE_LWORD; - _GLOBAL_CONST unsigned short IEC_DATATYPE_DWORD; - _GLOBAL_CONST unsigned short IEC_DATATYPE_WORD; - _GLOBAL_CONST unsigned short IEC_DATATYPE_BYTE; - _GLOBAL_CONST unsigned short IEC_DATATYPE_TIME_OF_DAY; - _GLOBAL_CONST unsigned short IEC_DATATYPE_LREAL; - _GLOBAL_CONST unsigned short IEC_DATATYPE_DATE; - _GLOBAL_CONST unsigned short IEC_DATATYPE_TIME; - _GLOBAL_CONST unsigned short IEC_DATATYPE_DATE_AND_TIME; - _GLOBAL_CONST unsigned short IEC_DATATYPE_ULINT; - _GLOBAL_CONST unsigned short IEC_DATATYPE_STRING; - _GLOBAL_CONST unsigned short IEC_DATATYPE_REAL; - _GLOBAL_CONST unsigned short IEC_DATATYPE_UDINT; - _GLOBAL_CONST unsigned short IEC_DATATYPE_UINT; - _GLOBAL_CONST unsigned short IEC_DATATYPE_USINT; - _GLOBAL_CONST unsigned short IEC_DATATYPE_DINT; - _GLOBAL_CONST unsigned short IEC_DATATYPE_INT; - _GLOBAL_CONST unsigned short IEC_DATATYPE_SINT; - _GLOBAL_CONST unsigned short IEC_DATATYPE_BOOL; - _GLOBAL_CONST signed long ERR_FB_NOT_IMPLEMENTED; - _GLOBAL_CONST unsigned short ERR_FUB_REDUNDANT; - _GLOBAL_CONST unsigned short ERR_FUB_BUSY; - _GLOBAL_CONST unsigned short ERR_FUB_ENABLE_FALSE; - _GLOBAL_CONST unsigned short ERR_NOTIMPLEMENTED; - _GLOBAL_CONST unsigned short ERR_OK; -#endif - - - - /* Datatypes and datatypes of function blocks */ typedef struct SFCActionControl { @@ -482,6 +417,68 @@ _BUR_PUBLIC double RealCos(double x); _BUR_PUBLIC double RealSqrt(double x); +/* Constants */ +#ifdef _REPLACE_CONST + #define IEC_DATATYPE_LINT 23U + #define IEC_DATATYPE_WSTRING 21U + #define IEC_DATATYPE_LWORD 20U + #define IEC_DATATYPE_DWORD 19U + #define IEC_DATATYPE_WORD 18U + #define IEC_DATATYPE_BYTE 17U + #define IEC_DATATYPE_TIME_OF_DAY 16U + #define IEC_DATATYPE_LREAL 14U + #define IEC_DATATYPE_DATE 13U + #define IEC_DATATYPE_TIME 12U + #define IEC_DATATYPE_DATE_AND_TIME 11U + #define IEC_DATATYPE_ULINT 10U + #define IEC_DATATYPE_STRING 9U + #define IEC_DATATYPE_REAL 8U + #define IEC_DATATYPE_UDINT 7U + #define IEC_DATATYPE_UINT 6U + #define IEC_DATATYPE_USINT 5U + #define IEC_DATATYPE_DINT 4U + #define IEC_DATATYPE_INT 3U + #define IEC_DATATYPE_SINT 2U + #define IEC_DATATYPE_BOOL 1U + #define ERR_FB_NOT_IMPLEMENTED (-1070585592) + #define ERR_FUB_REDUNDANT 35688U + #define ERR_FUB_BUSY 65535U + #define ERR_FUB_ENABLE_FALSE 65534U + #define ERR_NOTIMPLEMENTED 9999U + #define ERR_OK 0U +#else + _GLOBAL_CONST unsigned short IEC_DATATYPE_LINT; + _GLOBAL_CONST unsigned short IEC_DATATYPE_WSTRING; + _GLOBAL_CONST unsigned short IEC_DATATYPE_LWORD; + _GLOBAL_CONST unsigned short IEC_DATATYPE_DWORD; + _GLOBAL_CONST unsigned short IEC_DATATYPE_WORD; + _GLOBAL_CONST unsigned short IEC_DATATYPE_BYTE; + _GLOBAL_CONST unsigned short IEC_DATATYPE_TIME_OF_DAY; + _GLOBAL_CONST unsigned short IEC_DATATYPE_LREAL; + _GLOBAL_CONST unsigned short IEC_DATATYPE_DATE; + _GLOBAL_CONST unsigned short IEC_DATATYPE_TIME; + _GLOBAL_CONST unsigned short IEC_DATATYPE_DATE_AND_TIME; + _GLOBAL_CONST unsigned short IEC_DATATYPE_ULINT; + _GLOBAL_CONST unsigned short IEC_DATATYPE_STRING; + _GLOBAL_CONST unsigned short IEC_DATATYPE_REAL; + _GLOBAL_CONST unsigned short IEC_DATATYPE_UDINT; + _GLOBAL_CONST unsigned short IEC_DATATYPE_UINT; + _GLOBAL_CONST unsigned short IEC_DATATYPE_USINT; + _GLOBAL_CONST unsigned short IEC_DATATYPE_DINT; + _GLOBAL_CONST unsigned short IEC_DATATYPE_INT; + _GLOBAL_CONST unsigned short IEC_DATATYPE_SINT; + _GLOBAL_CONST unsigned short IEC_DATATYPE_BOOL; + _GLOBAL_CONST signed long ERR_FB_NOT_IMPLEMENTED; + _GLOBAL_CONST unsigned short ERR_FUB_REDUNDANT; + _GLOBAL_CONST unsigned short ERR_FUB_BUSY; + _GLOBAL_CONST unsigned short ERR_FUB_ENABLE_FALSE; + _GLOBAL_CONST unsigned short ERR_NOTIMPLEMENTED; + _GLOBAL_CONST unsigned short ERR_OK; +#endif + + + + #ifdef __cplusplus }; #endif diff --git a/example/AsProject/Logical/Libraries/_AS/runtime/binary.lby b/example/AsProject/Logical/Libraries/_AS/runtime/binary.lby index fbe06bd..92ad626 100644 --- a/example/AsProject/Logical/Libraries/_AS/runtime/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/runtime/binary.lby @@ -1,9 +1,9 @@ - - - - - runtime.fun - runtime.typ - runtime.var - - \ No newline at end of file + + + + + runtime.fun + runtime.typ + runtime.var + + diff --git a/example/AsProject/Logical/Libraries/_AS/standard/binary.lby b/example/AsProject/Logical/Libraries/_AS/standard/binary.lby index 28171d9..69d58cf 100644 --- a/example/AsProject/Logical/Libraries/_AS/standard/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/standard/binary.lby @@ -1,9 +1,9 @@ - - - - - standard.fun - standard.typ - standard.var - - \ No newline at end of file + + + + + standard.fun + standard.typ + standard.var + + diff --git a/example/AsProject/Logical/Libraries/_AS/sys_lib/SG4/sys_lib.h b/example/AsProject/Logical/Libraries/_AS/sys_lib/SG4/sys_lib.h index ae9f441..cfa9161 100644 --- a/example/AsProject/Logical/Libraries/_AS/sys_lib/SG4/sys_lib.h +++ b/example/AsProject/Logical/Libraries/_AS/sys_lib/SG4/sys_lib.h @@ -2,9 +2,9 @@ /* Do not edit ! */ #ifndef _SYS_LIB_H_ -#define _SYS_LIB_H_ +#define _SYS_LIB_H_ #ifdef __cplusplus -extern "C" +extern "C" { #endif @@ -15,716 +15,537 @@ extern "C" #define _BUR_PUBLIC #endif -#define TMP_MODE 0x8000 /* temporary suspend/resume for */ - /* PLC and user task */ - /* Error codes of the BURTRAP/SYS_LIB services */ - -#define ERR_BUR_WRROW 2061 /* illegal row */ -#define ERR_BUR_WRCOL 2062 /* illegal column */ -#define ERR_BUR_WR_CHAR 2063 /* invalid ASCII character */ -#define ERR_BUR_NORTC 2073 /* RTC not existing or uninitialized */ - -#define ERR_BUR_MO_NOTFOUND 3019 /* module not found */ -#define ERR_BUR_NOMEM 3030 /* out of memory */ -#define ERR_BUR_MEMVWBUSY 3035 /* memory management busy */ -#define ERR_BUR_ILLPTR 3104 /* illegal data pointer in MEM_free */ - -#define ERR_BUR_PSOS_BASE 3300 /* base number of pSOS errors */ - -#define ERR_BUR_ILLTKNR 3300 /* illegal task-class number */ -#define ERR_BUR_WROFFSET 3301 /* illegal offset */ -#define ERR_BUR_ILLSTATE 3302 /* illegal state of object */ -#define ERR_BUR_NOMSG 3303 /* no message sent/received */ -#define ERR_BUR_DUPOBJ 3305 /* object exists */ -#define ERR_BUR_TIMEOUT 3304 /* timeout error */ -#define ERR_BUR_EXISTS 3306 /* entry exists */ -#define ERR_BUR_LCOUNT 3307 /* Linkcnt <> 0 in AVT_cancel () */ -#define ERR_BUR_BURNING 3308 /* error burning module */ -#define ERR_BUR_INVALIDMBX 3309 /* invalid mailbox */ - -#define ERR_BUR_ILLBPTR 3310 /* invalid base pointer */ -#define ERR_BUR_ILLTYP 3311 /* invalid I/O type */ -#define ERR_BUR_ILLEXT 3312 /* invalid ext. bit */ -#define ERR_BUR_ILLVER 3313 /* invalid version */ - /* e.g. BURTRAP V1.10 to SPSSW V1.05 */ -#define ERR_BUR_ILLLEN 3314 /* invalid data length */ -#define ERR_BUR_MAX_LCOUNT 3315 /* AVT_attach: LCOUNT > 127 */ -#define ERR_BUR_AVT_FREE 3316 /* AVT_release:LCOUNT = 0 */ -#define ERR_BUR_ILLPAR 3317 /* illegal parameter */ -#define ERR_BUR_INSTALL 3318 /* error install datamodule */ -#define ERR_BUR_WRONG_MODTYP 3319 /* wrong Moduletype */ - -#define ERR_BUR_OBJDEL 3320 /* object already deleted */ -#define ERR_BUR_ILLOBJ 3324 /* object does not exist */ -#define ERR_BUR_ILLOBJTYP 3328 /* invalid object type */ -#define ERR_BUR_NOENTRY 3332 /* no entry */ -#define ERR_BUR_TOOLONG_PVNAME 3333 /* too long PV name */ -#define ERR_BUR_ILLIDENT 3336 /* illegal ident */ -#define ERR_BUR_NOSMBUF 3560 /* no more semaphore buffers */ -#define ERR_BUR_NOSM 3564 /* semaphore not available */ -#define ERR_BUR_SMDEL 3568 /* semaphore deleted */ -#define ERR_BUR_NOTIME 3584 /* time not available */ -#define ERR_BUR_ILLDATE 3588 /* date : out of range */ -#define ERR_BUR_ILLTIME 3592 /* time : out of range */ -#define ERR_BUR_ILLTICKS 3596 /* ticks : out of range */ - -#define ERR_BUR_MEM_ALLOC 3600 /* not enough continuous memory */ -#define ERR_BUR_TMP_ALLOC 3601 /* not enough continuous memory */ -#define ERR_BUR_MEM_FREE 3700 /* invalid pointer/length */ -#define ERR_BUR_TMP_FREE 3701 /* invalid pointer/length */ +#define ERR_BUR_MO_NOTFOUND 3019 /* module not found */ +#define ERR_BUR_ILLSTATE 3302 /* illegal state of object */ +#define ERR_BUR_ILLTYP 3311 /* SYSreset - invalid input value for mode */ +#define ERR_BUR_ILLPAR 3317 /* illegal parameter */ +#define ERR_BUR_ILLOBJ 3324 /* object does not exist */ +#define ERR_BUR_NOENTRY 3332 /* no entry */ +#define ERR_BUR_TOOLONG_PVNAME 3333 /* too long PV name */ +#define ERR_BUR_ILLIDENT 3336 /* illegal ident */ +#define ERR_BUR_NOTIME 3584 /* time not available */ +#define ERR_BUR_TMP_ALLOC 3601 /* not enough continuous memory */ +#define ERR_BUR_TMP_FREE 3701 /* invalid pointer/length */ +#define ERR_EXC_NIL_POINTER 9133 /* null pointer */ +#define ERR_BUR_PVNAME 14700 /* Invalid name syntax */ +#define ERR_BUR_WRONG_ARRAY 14702 /* Invalid array syntax */ +#define ERR_BUR_WRONG_ELEM 14703 /* Invalid element syntax */ +#define ERR_BUR_WRONG_COMP 14704 /* Invalid component separator */ +#define ERR_BUR_NOTFOUND 14710 /* PV not found */ +#define ERR_BUR_ZEROLNG 14712 /* PV size is zero (plausibility check) */ +#define ERR_BUR_NODETAIL 14713 /* No type description (plausibility check) */ +#define ERR_BUR_AIXTOOBIG 14714 /* Array index too big */ +#define ERR_BUR_WRONG_SDSR 14715 /* Invalid address (plausibility check) */ +#define ERR_BUR_BUFLNG 14716 /* Name buffer too small */ +#define ERR_BUR_WRONG_INDEX 14717 /* Access via index/subindex is not supported */ /* State for object PLC task */ -#define Z_ST_created 1 -#define Z_ST_running 2 -#define Z_ST_blocked 3 -#define Z_ST_exist 0x00 -#define Z_ST_installed 0x82 -#define Z_ST_PVinstalled 0x83 -#define Z_ST_IOinstalled 0x84 -#define Z_ST_IOdeinstalled 0x85 -#define Z_ST_PVdeinstalled 0x86 -#define Z_ST_delete 0x87 -#define Z_ST_stdebug 0x88 -#define Z_ST_tmp_suspended 0x90 - -/* PV data types - obsolete */ -#define PB_DT_STRUCT 0 /* structure */ -#define PB_DT_BOOL 1 /* boolean */ -#define PB_DT_INT8 2 /* integer8 */ -#define PB_DT_INT16 3 /* integer16 */ -#define PB_DT_INT32 4 /* integer32 */ -#define PB_DT_BYTE 5 /* unsigned integer8 */ -#define PB_DT_WORD 6 /* unsigned integer16 */ -#define PB_DT_LONG 7 /* unsigned integer32 */ -#define PB_DT_FLOAT 8 /* floating point */ -#define PB_DT_VIS 9 /* visible string */ -#define PB_DT_OCTET 10 /* octet string */ -#define PB_DT_DATE 11 /* date */ -#define PB_DT_TIME 12 /* time of day */ -#define PB_DT_DIFF 13 /* time difference */ -#define PB_DT_BIT 14 /* bit string */ -#define PB_DT_ARRAY 15 /* array */ +#define Z_ST_created 1 +#define Z_ST_running 2 +#define Z_ST_blocked 3 +#define Z_ST_exist 0x00 +#define Z_ST_installed 0x82 +#define Z_ST_PVinstalled 0x83 +#define Z_ST_IOinstalled 0x84 +#define Z_ST_IOdeinstalled 0x85 +#define Z_ST_PVdeinstalled 0x86 +#define Z_ST_delete 0x87 +#define Z_ST_stdebug 0x88 +#define Z_ST_tmp_suspended 0x90 /* elementary data types */ -#define SYSLIB_IEC_TYPE_USER_DEFINED 0 /* User-defined data type */ -#define SYSLIB_IEC_TYPE_USER_DEFINED_2 15 /* User-defined data type (legacy: array of structs) */ -#define SYSLIB_IEC_TYPE_BOOL 1 /* 8 Bit containing a boolean value FALSE=0 or TRUE=1 */ -#define SYSLIB_IEC_TYPE_SINT 2 /* 8 Bit signed integer */ -#define SYSLIB_IEC_TYPE_INT 3 /* 16 Bit signed integer */ -#define SYSLIB_IEC_TYPE_DINT 4 /* 32 Bit signed integer */ -#define SYSLIB_IEC_TYPE_USINT 5 /* 8 Bit unsigned integer */ -#define SYSLIB_IEC_TYPE_UINT 6 /* 16 Bit unsigned integer */ -#define SYSLIB_IEC_TYPE_UDINT 7 /* 32 Bit unsigned integer */ -#define SYSLIB_IEC_TYPE_REAL 8 /* 32 Bit floating point number */ -#define SYSLIB_IEC_TYPE_STRING 9 /* Variable-length single-byte character string */ -#define SYSLIB_IEC_TYPE_DATE_AND_TIME 11 /* 32 Bit of Date in Seconds since 01.01.1970 00:00:00 */ -#define SYSLIB_IEC_TYPE_TIME 12 /* 32 Bit of Time in ms */ -#define SYSLIB_IEC_TYPE_DATE 13 /* 32 Bit of Date (only) */ -#define SYSLIB_IEC_TYPE_LREAL 14 /* 64 Bit floating point number */ -#define SYSLIB_IEC_TYPE_TIME_OF_DAY 16 /* 32 Bit Time of day (only) */ -#define SYSLIB_IEC_TYPE_BYTE 17 /* Bit string of length 8 */ -#define SYSLIB_IEC_TYPE_WORD 18 /* Bit string of length 16 */ -#define SYSLIB_IEC_TYPE_DWORD 19 /* Bit string of length 32 */ -#define SYSLIB_IEC_TYPE_WSTRING 21 /* Variable-length double-byte character string */ - -/* memory types */ -#define SYS_RAM 1 /* RAM */ -#define USER_ROM1 2 /* EPROM */ -#define FIX_RAM 5 /* fixed RAM */ +#define SYSLIB_IEC_TYPE_USER_DEFINED 0 /* User-defined data type */ +#define SYSLIB_IEC_TYPE_USER_DEFINED_2 15 /* User-defined data type (legacy: array of structs) */ +#define SYSLIB_IEC_TYPE_BOOL 1 /* 8 Bit containing a boolean value FALSE=0 or TRUE=1 */ +#define SYSLIB_IEC_TYPE_SINT 2 /* 8 Bit signed integer */ +#define SYSLIB_IEC_TYPE_INT 3 /* 16 Bit signed integer */ +#define SYSLIB_IEC_TYPE_DINT 4 /* 32 Bit signed integer */ +#define SYSLIB_IEC_TYPE_USINT 5 /* 8 Bit unsigned integer */ +#define SYSLIB_IEC_TYPE_UINT 6 /* 16 Bit unsigned integer */ +#define SYSLIB_IEC_TYPE_UDINT 7 /* 32 Bit unsigned integer */ +#define SYSLIB_IEC_TYPE_REAL 8 /* 32 Bit floating point number */ +#define SYSLIB_IEC_TYPE_STRING 9 /* Variable-length single-byte character string */ +#define SYSLIB_IEC_TYPE_DATE_AND_TIME 11 /* 32 Bit of Date in Seconds since 01.01.1970 00:00:00 */ +#define SYSLIB_IEC_TYPE_TIME 12 /* 32 Bit of Time in ms */ +#define SYSLIB_IEC_TYPE_DATE 13 /* 32 Bit of Date (only) */ +#define SYSLIB_IEC_TYPE_LREAL 14 /* 64 Bit floating point number */ +#define SYSLIB_IEC_TYPE_TIME_OF_DAY 16 /* 32 Bit Time of day (only) */ +#define SYSLIB_IEC_TYPE_BYTE 17 /* Bit string of length 8 */ +#define SYSLIB_IEC_TYPE_WORD 18 /* Bit string of length 16 */ +#define SYSLIB_IEC_TYPE_DWORD 19 /* Bit string of length 32 */ +#define SYSLIB_IEC_TYPE_WSTRING 21 /* Variable-length double-byte character string */ /* shutdown / reboot types */ -#define SYSLIB_WARMSTART 0x01 /*WARMSTART(with restart)*/ -#define SYSLIB_COLDSTART 0x02 /*COLDSTART(with restart)*/ -#define SYSLIB_WARMSTART_NO_REBOOT 0x11 /*WARMSTART(no restart, only shutdown)*/ -#define SYSLIB_COLDSTART_NO_REBOOT 0x12 /*COLDSTART(no restart, only shutdown)*/ -#define SYSLIB_DIAGNOSTICS 0x20 /*DIAGNOSTICS(with restart)*/ -#define SYSLIB_SERVICE 0x40 /*SERVICE(with restart) */ - -typedef struct RTCtime_typ { - /* 1. UDINT */ - UINT year; /* year, starting with zero */ - USINT month; /* month: 1 - 12 */ - USINT day; /* day: 1 - 31 */ - /* 2. UDINT */ - USINT reserve; - USINT hour; /* hour: 0 - 23 */ - USINT minute; /* minute: 0 - 59 */ - USINT second; /* second: 0 - 59 */ - /* 3. UDINT */ - UINT millisec; /* millisecond: 0 - 999 */ - UINT microsec; /* microsecond: 0 - 999 */ - } RTCtime_typ; - -/* structure for SYSxinfo */ -typedef struct SYSxinfo_typ { - char aws_name[6]; - char aws_type[2]; - UDINT cpu_info; - UINT ma_globl_len; - UINT md_globl_len; - UDINT os_len; - UDINT user_len; - UDINT tmp_len; - UDINT eprom_len; - UDINT fix_ram_len; - } SYSxinfo_typ; - -/* structure for MO_list */ -typedef struct MO_List_typ { - char name[14]; /* name of the module (ASCII) */ - USINT grp; /* groups */ - USINT type; /* module type */ - USINT state; /* state of the module */ - USINT reserve; - UDINT adress; /* physical address of the module */ - UDINT memtype; /* memory type (0=OTP,1=RAM,2=EPROM,3=FLASH */ - } MO_List_typ; /* 5=FIXRAM) */ - -/* structure for slMoList */ -typedef struct slMoList { - /* VAR_INPUT (analog) */ - unsigned long pMoName; - unsigned long sizeMoName; - unsigned long pAppMoName; - unsigned long sizeAppMoName; - /* VAR_OUTPUT (analog) */ - unsigned short status; - unsigned long moSize; - unsigned char moType; - unsigned char memType; - /* VAR (analog) */ - unsigned long i_hMo; - /* VAR_INPUT (digital) */ - plcbit enable; - plcbit first; - plcbit filter; -} slMoList_typ; - -/* structure for MO_info */ -typedef struct MO_info -{ - /* VAR_INPUT (analog) */ - unsigned long pName; - unsigned char grp; - /* VAR_OUTPUT (analog) */ - unsigned short status; - unsigned char type; - unsigned char state; - unsigned long memType; - unsigned long address; - unsigned long size; - unsigned char version[10]; - struct RTCtime_typ date; - /* VAR_INPUT (digital) */ - plcbit enable; -} MO_info_typ; - -/* structure for PV_list */ -typedef struct PV_List_typ { - char name[14]; /* name of the PV (ASCII) */ - USINT tcnr; /* PV task class */ - USINT grp; /* PV group */ - UDINT ident; /* PV identifier */ - UDINT adress; /* physical address of the PV */ - } PV_List_typ; - -/* structue for PV_xlist */ -typedef struct PV_xList_typ { - - char name[33]; /* name of PV (ASCII) */ - USINT data_typ; /* data type of PV */ - UDINT data_len; /* data length of PV */ - UDINT dimension; /* dimension of PV */ - UDINT adress; /* physical address of PV */ - }PV_xList_typ; - -/* structure for ERR_read */ -typedef struct ERR_typ { - UINT err_nr; /* error number */ - UDINT err_info; /* additional information */ - char t_name[5]; /* name of the running task */ - USINT err_type; /* error type (1=fatal, 2=warning, 3=info) */ - UINT err_year; /* time of the error in RTC format */ - USINT err_month; - USINT err_day; - USINT err_reserve; - USINT err_hour; - USINT err_minute; - USINT err_second; - UINT err_millisec; - UINT err_microsec; - } ERR_typ; - -/* structure for ERR_xread */ -typedef struct ERR_xtyp { - UINT err_nr; /* error number */ - UDINT err_info; /* additional information */ - char t_name[5]; /* name of the running task */ - USINT err_type; /* error type (1=Fatal, 2=Warning, 3=Info) */ - UINT err_year; /* time of the error in RTC format */ - USINT err_month; - USINT err_day; - USINT err_reserve; - USINT err_hour; - USINT err_minute; - USINT err_second; - UINT err_millisec; - UINT err_microsec; - USINT err_string[34]; /* 32 byte string with 0 termination */ - } ERR_xtyp; - -/* structure for MO_ver */ -typedef struct MoVerStruc_typ { - USINT version[10]; /* Version of the BR Module */ - UINT year; - USINT month; - USINT day; - USINT reserve; - USINT hour; - USINT minute; - USINT second; - } MoVerStruc_typ; - -/* structure for the FUB Bit2Byte */ -typedef struct Bit2Byte { +#define SYSLIB_WARMSTART 0x01 /*WARMSTART(with restart)*/ +#define SYSLIB_COLDSTART 0x02 /*COLDSTART(with restart)*/ +#define SYSLIB_WARMSTART_NO_REBOOT 0x11 /*WARMSTART(no restart, only shutdown)*/ +#define SYSLIB_COLDSTART_NO_REBOOT 0x12 /*COLDSTART(no restart, only shutdown)*/ +#define SYSLIB_DIAGNOSTICS 0x20 /*DIAGNOSTICS(with restart)*/ +#define SYSLIB_SERVICE 0x40 /*SERVICE(with restart) */ + + typedef struct RTCtime_typ + { + /* 1. UDINT */ + UINT year; /* year, starting with zero */ + USINT month; /* month: 1 - 12 */ + USINT day; /* day: 1 - 31 */ + /* 2. UDINT */ + USINT reserve; + USINT hour; /* hour: 0 - 23 */ + USINT minute; /* minute: 0 - 59 */ + USINT second; /* second: 0 - 59 */ + /* 3. UDINT */ + UINT millisec; /* millisecond: 0 - 999 */ + UINT microsec; /* microsecond: 0 - 999 */ + } RTCtime_typ; + + /* structure for MO_list */ + typedef struct MO_List_typ + { + char name[14]; /* name of the module (ASCII) */ + USINT grp; /* groups */ + USINT type; /* module type */ + USINT state; /* state of the module */ + USINT reserve; + UDINT adress; /* physical address of the module */ + UDINT memtype; /* memory type (0=OTP,1=RAM,2=EPROM,3=FLASH */ + } MO_List_typ; /* 5=FIXRAM) */ + + /* structure for slMoList */ + typedef struct slMoList + { + /* VAR_INPUT (analog) */ + unsigned long pMoName; + unsigned long sizeMoName; + unsigned long pAppMoName; + unsigned long sizeAppMoName; + /* VAR_OUTPUT (analog) */ + unsigned short status; + unsigned long moSize; + unsigned char moType; + unsigned char memType; + /* VAR (analog) */ + unsigned long i_hMo; + /* VAR_INPUT (digital) */ + plcbit enable; + plcbit first; + plcbit filter; + } slMoList_typ; + + /* structure for MO_info */ + typedef struct MO_info + { + /* VAR_INPUT (analog) */ + unsigned long pName; + unsigned char grp; + /* VAR_OUTPUT (analog) */ + unsigned short status; + unsigned char type; + unsigned char state; + unsigned long memType; + unsigned long address; + unsigned long size; + unsigned char version[10]; + struct RTCtime_typ date; + /* VAR_INPUT (digital) */ + plcbit enable; + } MO_info_typ; + + /* structue for PV_xlist */ + typedef struct PV_xList_typ + { + + char name[33]; /* name of PV (ASCII) */ + USINT data_typ; /* data type of PV */ + UDINT data_len; /* data length of PV */ + UDINT dimension; /* dimension of PV */ + UDINT adress; /* physical address of PV */ + } PV_xList_typ; + + /* structure for MO_ver */ + typedef struct MoVerStruc_typ + { + USINT version[10]; /* Version of the BR Module */ + UINT year; + USINT month; + USINT day; + USINT reserve; + USINT hour; + USINT minute; + USINT second; + } MoVerStruc_typ; + + /* structure for the FUB Bit2Byte */ + typedef struct Bit2Byte + { /* non boolean input parameter */ - UDINT bitadr; - UINT length; + UDINT bitadr; + UINT length; /* non boolean output parameter*/ - UDINT byteadr; + UDINT byteadr; /* non boolean static local */ - USINT byte_00; - USINT byte_01; - USINT byte_02; - USINT byte_03; - USINT byte_04; - USINT byte_05; - USINT byte_06; - USINT byte_07; - USINT byte_08; - USINT byte_09; - USINT byte_10; - USINT byte_11; - USINT byte_12; - USINT byte_13; - USINT byte_14; - USINT byte_15; + USINT byte_00; + USINT byte_01; + USINT byte_02; + USINT byte_03; + USINT byte_04; + USINT byte_05; + USINT byte_06; + USINT byte_07; + USINT byte_08; + USINT byte_09; + USINT byte_10; + USINT byte_11; + USINT byte_12; + USINT byte_13; + USINT byte_14; + USINT byte_15; /* boolean input parameter */ /* boolean output parameter */ /* boolean static local */ - BOOL bmem000; - BOOL bmem001; - BOOL bmem002; - BOOL bmem003; - BOOL bmem004; - BOOL bmem005; - BOOL bmem006; - BOOL bmem007; - BOOL bmem008; - BOOL bmem009; - BOOL bmem010; - BOOL bmem011; - BOOL bmem012; - BOOL bmem013; - BOOL bmem014; - BOOL bmem015; - BOOL bmem016; - BOOL bmem017; - BOOL bmem018; - BOOL bmem019; - BOOL bmem020; - BOOL bmem021; - BOOL bmem022; - BOOL bmem023; - BOOL bmem024; - BOOL bmem025; - BOOL bmem026; - BOOL bmem027; - BOOL bmem028; - BOOL bmem029; - BOOL bmem030; - BOOL bmem031; - BOOL bmem032; - BOOL bmem033; - BOOL bmem034; - BOOL bmem035; - BOOL bmem036; - BOOL bmem037; - BOOL bmem038; - BOOL bmem039; - BOOL bmem040; - BOOL bmem041; - BOOL bmem042; - BOOL bmem043; - BOOL bmem044; - BOOL bmem045; - BOOL bmem046; - BOOL bmem047; - BOOL bmem048; - BOOL bmem049; - BOOL bmem050; - BOOL bmem051; - BOOL bmem052; - BOOL bmem053; - BOOL bmem054; - BOOL bmem055; - BOOL bmem056; - BOOL bmem057; - BOOL bmem058; - BOOL bmem059; - BOOL bmem060; - BOOL bmem061; - BOOL bmem062; - BOOL bmem063; - BOOL bmem064; - BOOL bmem065; - BOOL bmem066; - BOOL bmem067; - BOOL bmem068; - BOOL bmem069; - BOOL bmem070; - BOOL bmem071; - BOOL bmem072; - BOOL bmem073; - BOOL bmem074; - BOOL bmem075; - BOOL bmem076; - BOOL bmem077; - BOOL bmem078; - BOOL bmem079; - BOOL bmem080; - BOOL bmem081; - BOOL bmem082; - BOOL bmem083; - BOOL bmem084; - BOOL bmem085; - BOOL bmem086; - BOOL bmem087; - BOOL bmem088; - BOOL bmem089; - BOOL bmem090; - BOOL bmem091; - BOOL bmem092; - BOOL bmem093; - BOOL bmem094; - BOOL bmem095; - BOOL bmem096; - BOOL bmem097; - BOOL bmem098; - BOOL bmem099; - BOOL bmem100; - BOOL bmem101; - BOOL bmem102; - BOOL bmem103; - BOOL bmem104; - BOOL bmem105; - BOOL bmem106; - BOOL bmem107; - BOOL bmem108; - BOOL bmem109; - BOOL bmem110; - BOOL bmem111; - BOOL bmem112; - BOOL bmem113; - BOOL bmem114; - BOOL bmem115; - BOOL bmem116; - BOOL bmem117; - BOOL bmem118; - BOOL bmem119; - BOOL bmem120; - BOOL bmem121; - BOOL bmem122; - BOOL bmem123; - BOOL bmem124; - BOOL bmem125; - BOOL bmem126; - BOOL bmem127; - BOOL bmem128; - BOOL bmem129; - BOOL bmem130; - BOOL bmem131; - BOOL bmem132; - BOOL bmem133; - BOOL bmem134; - BOOL bmem135; - BOOL bmem136; - BOOL bmem137; - BOOL bmem138; - BOOL bmem139; - } Bit2Byte_typ; - -/* structure for the FUB Byte2Bit */ -typedef struct Byte2Bit { + BOOL bmem000; + BOOL bmem001; + BOOL bmem002; + BOOL bmem003; + BOOL bmem004; + BOOL bmem005; + BOOL bmem006; + BOOL bmem007; + BOOL bmem008; + BOOL bmem009; + BOOL bmem010; + BOOL bmem011; + BOOL bmem012; + BOOL bmem013; + BOOL bmem014; + BOOL bmem015; + BOOL bmem016; + BOOL bmem017; + BOOL bmem018; + BOOL bmem019; + BOOL bmem020; + BOOL bmem021; + BOOL bmem022; + BOOL bmem023; + BOOL bmem024; + BOOL bmem025; + BOOL bmem026; + BOOL bmem027; + BOOL bmem028; + BOOL bmem029; + BOOL bmem030; + BOOL bmem031; + BOOL bmem032; + BOOL bmem033; + BOOL bmem034; + BOOL bmem035; + BOOL bmem036; + BOOL bmem037; + BOOL bmem038; + BOOL bmem039; + BOOL bmem040; + BOOL bmem041; + BOOL bmem042; + BOOL bmem043; + BOOL bmem044; + BOOL bmem045; + BOOL bmem046; + BOOL bmem047; + BOOL bmem048; + BOOL bmem049; + BOOL bmem050; + BOOL bmem051; + BOOL bmem052; + BOOL bmem053; + BOOL bmem054; + BOOL bmem055; + BOOL bmem056; + BOOL bmem057; + BOOL bmem058; + BOOL bmem059; + BOOL bmem060; + BOOL bmem061; + BOOL bmem062; + BOOL bmem063; + BOOL bmem064; + BOOL bmem065; + BOOL bmem066; + BOOL bmem067; + BOOL bmem068; + BOOL bmem069; + BOOL bmem070; + BOOL bmem071; + BOOL bmem072; + BOOL bmem073; + BOOL bmem074; + BOOL bmem075; + BOOL bmem076; + BOOL bmem077; + BOOL bmem078; + BOOL bmem079; + BOOL bmem080; + BOOL bmem081; + BOOL bmem082; + BOOL bmem083; + BOOL bmem084; + BOOL bmem085; + BOOL bmem086; + BOOL bmem087; + BOOL bmem088; + BOOL bmem089; + BOOL bmem090; + BOOL bmem091; + BOOL bmem092; + BOOL bmem093; + BOOL bmem094; + BOOL bmem095; + BOOL bmem096; + BOOL bmem097; + BOOL bmem098; + BOOL bmem099; + BOOL bmem100; + BOOL bmem101; + BOOL bmem102; + BOOL bmem103; + BOOL bmem104; + BOOL bmem105; + BOOL bmem106; + BOOL bmem107; + BOOL bmem108; + BOOL bmem109; + BOOL bmem110; + BOOL bmem111; + BOOL bmem112; + BOOL bmem113; + BOOL bmem114; + BOOL bmem115; + BOOL bmem116; + BOOL bmem117; + BOOL bmem118; + BOOL bmem119; + BOOL bmem120; + BOOL bmem121; + BOOL bmem122; + BOOL bmem123; + BOOL bmem124; + BOOL bmem125; + BOOL bmem126; + BOOL bmem127; + BOOL bmem128; + BOOL bmem129; + BOOL bmem130; + BOOL bmem131; + BOOL bmem132; + BOOL bmem133; + BOOL bmem134; + BOOL bmem135; + BOOL bmem136; + BOOL bmem137; + BOOL bmem138; + BOOL bmem139; + } Bit2Byte_typ; + + /* structure for the FUB Byte2Bit */ + typedef struct Byte2Bit + { /* non boolean input parameter */ - UDINT byteadr; - UINT length; + UDINT byteadr; + UINT length; /* non boolean output parameter*/ - UDINT bitadr; + UDINT bitadr; /* non boolean static local */ /* boolean input parameter */ /* boolean output parameter */ /* boolean static local */ - BOOL bmem000; - BOOL bmem001; - BOOL bmem002; - BOOL bmem003; - BOOL bmem004; - BOOL bmem005; - BOOL bmem006; - BOOL bmem007; - BOOL bmem008; - BOOL bmem009; - BOOL bmem010; - BOOL bmem011; - BOOL bmem012; - BOOL bmem013; - BOOL bmem014; - BOOL bmem015; - BOOL bmem016; - BOOL bmem017; - BOOL bmem018; - BOOL bmem019; - BOOL bmem020; - BOOL bmem021; - BOOL bmem022; - BOOL bmem023; - BOOL bmem024; - BOOL bmem025; - BOOL bmem026; - BOOL bmem027; - BOOL bmem028; - BOOL bmem029; - BOOL bmem030; - BOOL bmem031; - BOOL bmem032; - BOOL bmem033; - BOOL bmem034; - BOOL bmem035; - BOOL bmem036; - BOOL bmem037; - BOOL bmem038; - BOOL bmem039; - BOOL bmem040; - BOOL bmem041; - BOOL bmem042; - BOOL bmem043; - BOOL bmem044; - BOOL bmem045; - BOOL bmem046; - BOOL bmem047; - BOOL bmem048; - BOOL bmem049; - BOOL bmem050; - BOOL bmem051; - BOOL bmem052; - BOOL bmem053; - BOOL bmem054; - BOOL bmem055; - BOOL bmem056; - BOOL bmem057; - BOOL bmem058; - BOOL bmem059; - BOOL bmem060; - BOOL bmem061; - BOOL bmem062; - BOOL bmem063; - BOOL bmem064; - BOOL bmem065; - BOOL bmem066; - BOOL bmem067; - BOOL bmem068; - BOOL bmem069; - BOOL bmem070; - BOOL bmem071; - BOOL bmem072; - BOOL bmem073; - BOOL bmem074; - BOOL bmem075; - BOOL bmem076; - BOOL bmem077; - BOOL bmem078; - BOOL bmem079; - BOOL bmem080; - BOOL bmem081; - BOOL bmem082; - BOOL bmem083; - BOOL bmem084; - BOOL bmem085; - BOOL bmem086; - BOOL bmem087; - BOOL bmem088; - BOOL bmem089; - BOOL bmem090; - BOOL bmem091; - BOOL bmem092; - BOOL bmem093; - BOOL bmem094; - BOOL bmem095; - BOOL bmem096; - BOOL bmem097; - BOOL bmem098; - BOOL bmem099; - BOOL bmem100; - BOOL bmem101; - BOOL bmem102; - BOOL bmem103; - BOOL bmem104; - BOOL bmem105; - BOOL bmem106; - BOOL bmem107; - BOOL bmem108; - BOOL bmem109; - BOOL bmem110; - BOOL bmem111; - BOOL bmem112; - BOOL bmem113; - BOOL bmem114; - BOOL bmem115; - BOOL bmem116; - BOOL bmem117; - BOOL bmem118; - BOOL bmem119; - BOOL bmem120; - BOOL bmem121; - BOOL bmem122; - BOOL bmem123; - BOOL bmem124; - BOOL bmem125; - BOOL bmem126; - BOOL bmem127; - BOOL bmem128; - BOOL bmem129; - BOOL bmem130; - BOOL bmem131; - BOOL bmem132; - BOOL bmem133; - BOOL bmem134; - BOOL bmem135; - BOOL bmem136; - BOOL bmem137; - BOOL bmem138; - BOOL bmem139; - } Byte2Bit_typ; - -/***************/ -/* Prototyping of functions and function blocks */ -_BUR_PUBLIC UINT PV_ident (char *pv_name_p, USINT pv_tcnr, USINT pv_grpnr, - UDINT *pv_ident); -_BUR_PUBLIC UINT PV_setval (UDINT pv_ident, UDINT value); -_BUR_PUBLIC UINT PV_getval (UDINT pv_ident, UDINT *value); -_BUR_PUBLIC UINT PV_getadr (char *pv_name_p, USINT pv_tcnr, USINT pv_grpnr, - UDINT *pv_adresse); -_BUR_PUBLIC UINT PV_xgetadr (char *pv_name, UDINT *pv_adresse, UDINT *data_len); -_BUR_PUBLIC UINT PV_xsetval (UDINT pv_ident, UINT subindex, void *data_p, - USINT data_len); -_BUR_PUBLIC UINT PV_xgetval (UDINT pv_ident, UINT subindex, void *data_p, - USINT data_len); -_BUR_PUBLIC UINT PV_info (UDINT pv_ident, UDINT *data_type, UDINT *data_len, - UINT *dimension); -_BUR_PUBLIC UINT PV_list (UINT prev_index, UINT *index, PV_List_typ *pvl_p); -_BUR_PUBLIC UINT PV_xlist (UINT prev_index, UINT *index, PV_xList_typ *pvl_p); -_BUR_PUBLIC UINT PV_item (char *pv_name, UINT index, char *itemname); -_BUR_PUBLIC UINT PV_ninfo (char *pv_name, UDINT *data_typ_p, UDINT *data_len_p, - UINT *dimension_p); - - - -_BUR_PUBLIC UINT SYS_info (UDINT *sg_init_cnt, UDINT *sg_initdescr, UDINT *sg_tickcnt, - UDINT *sg_version, UDINT *sg_ov_version); -_BUR_PUBLIC UINT SYSxinfo (SYSxinfo_typ *sx_p); -_BUR_PUBLIC UINT SYSreset (BOOL enable, USINT mode); -_BUR_PUBLIC USINT SYS_battery (void); - -_BUR_PUBLIC UINT MO_list (UINT prev_index, UINT *index, MO_List_typ *mol_p); -_BUR_PUBLIC void MO_info (struct MO_info* pInst); -_BUR_PUBLIC void slMoList (slMoList_typ * pInst); - -_BUR_PUBLIC UINT KEY_enadis (BOOL mode); -_BUR_PUBLIC UINT KEY_read (USINT keys[4]); - -_BUR_PUBLIC UINT FORCE_info (USINT tcnr, BOOL *force); - -_BUR_PUBLIC UINT ST_ident (char *st_name_p, USINT st_grp, UDINT *st_ident); -_BUR_PUBLIC UINT ST_suspend (UDINT st_ident); -_BUR_PUBLIC UINT ST_resume (UDINT st_ident); -_BUR_PUBLIC UINT ST_tmp_suspend (UDINT st_ident); -_BUR_PUBLIC UINT ST_tmp_resume (UDINT st_ident); -_BUR_PUBLIC UINT ST_allsuspend (void); -_BUR_PUBLIC UINT ST_info (UDINT st_ident, USINT *state, SINT *tcnr); -_BUR_PUBLIC UINT ST_name (UDINT st_ident, char *st_name_p, USINT *st_grp); - -_BUR_PUBLIC UINT UT_ident (char *ut_name_p, USINT ut_grp, USINT ut_proc, char *ut_sps_p,UDINT *ut_ident); -_BUR_PUBLIC UINT UT_suspend (UDINT ut_ident); -_BUR_PUBLIC UINT UT_resume (UDINT ut_ident); -_BUR_PUBLIC UINT UT_sleep (UDINT tickcount); -_BUR_PUBLIC UINT UT_sendmsg (UDINT ut_ident, void *msg, UDINT msglng, UDINT flags); -_BUR_PUBLIC UINT UT_recmsg (UDINT *ut_ident, void **msg, UDINT *msglng, UDINT flags); -_BUR_PUBLIC UINT UT_freemsg (UDINT msglng, void *msg); -_BUR_PUBLIC UINT UT_exit (UDINT exitinfo); - - -_BUR_PUBLIC UINT AVT_create (char *name_p, USINT grupid, UDINT av_info, UDINT *av_ident); -_BUR_PUBLIC UINT AVT_cancel (UDINT av_ident); -_BUR_PUBLIC UINT AVT_ident (char *name_p, USINT grupid, UDINT *av_ident); -_BUR_PUBLIC UINT AVT_attach (UDINT av_ident, UDINT *av_info); -_BUR_PUBLIC UINT AVT_release (UDINT av_ident); -_BUR_PUBLIC UINT AVT_info (UDINT av_ident, USINT *av_linkcount); - -_BUR_PUBLIC UINT MEM_alloc (UDINT memlng, void **memptr); -_BUR_PUBLIC UINT MEM_free (UDINT memlng, void *memptr); -_BUR_PUBLIC UINT TMP_alloc (UDINT memlng, void **memptr); -_BUR_PUBLIC UINT TMP_free (UDINT memlng, void *memptr); - -_BUR_PUBLIC UINT RTC_gettime (RTCtime_typ *rtctime); -_BUR_PUBLIC UINT RTC_settime (RTCtime_typ *rtctime); -_BUR_PUBLIC UINT SW_gettime (RTCtime_typ *rtctime); -_BUR_PUBLIC UINT SW_settime (RTCtime_typ *rtctime); -_BUR_PUBLIC UINT TIM_musec (void); -_BUR_PUBLIC UINT TIM_ticks (void); - -_BUR_PUBLIC UINT SM_create (char *sm_name, USINT sm_count, UDINT *sm_ident); -_BUR_PUBLIC UINT SM_ident (char *sm_name, UDINT *sm_ident); -_BUR_PUBLIC UINT SM_delete (UDINT sm_ident); -_BUR_PUBLIC UINT SM_attach (UDINT sm_ident, UDINT timeout, UDINT flags); -_BUR_PUBLIC UINT SM_release (UDINT sm_ident); - -_BUR_PUBLIC UINT ERR_warning (UINT errornr, UDINT errorinfo); -_BUR_PUBLIC UINT ERR_fatal (UINT errornr, UDINT errorinfo); -_BUR_PUBLIC UINT ERR_read (UINT entry_nr, ERR_typ *err_p); -_BUR_PUBLIC UINT ERRxwarning (UINT errornr, UDINT errorinfo, char* errorstring); -_BUR_PUBLIC UINT ERRxread (UINT entry_nr, ERR_xtyp *err_p); -_BUR_PUBLIC UINT ERRxfatal (UINT errornr, UDINT errorinfo, char* errorstring); - -_BUR_PUBLIC UINT DIS_str (UDINT row, UDINT col, char *string); -_BUR_PUBLIC UINT DIS_chr (UDINT row, UDINT col, char character); -_BUR_PUBLIC UINT DIS_clr (void); - -_BUR_PUBLIC UINT DA_create (char *name_p, USINT grp, UINT spooladr, UDINT data_len, - void *data_p, void **mo_data_p, UDINT *mo_ident); -_BUR_PUBLIC UINT DA_write (UDINT mo_ident, void *data_p,UDINT data_len, - UDINT mo_data_offset); -_BUR_PUBLIC UINT DA_read (UDINT mo_ident, void *data_p,UDINT data_len, - UDINT mo_data_offset); -_BUR_PUBLIC UINT DA_ident (char *name_p, USINT grp, UDINT *mo_ident); -_BUR_PUBLIC UINT DA_delete (UDINT mo_ident); -_BUR_PUBLIC UINT DA_burn (UDINT mo_ident); -_BUR_PUBLIC UINT DA_fix (UDINT mo_ident); -_BUR_PUBLIC UINT DA_info (UDINT mo_ident, void **moduldata_adr, UDINT *moduldata_lng, - USINT *memorytype); -_BUR_PUBLIC UINT DA_copy (UDINT mo_ident, char *new_name, USINT mem_typ, UDINT *da_ident, - UDINT *daten_p, UDINT *daten_len); -_BUR_PUBLIC UINT DA_store (UDINT mo_ident, USINT mem_typ, UDINT* daten_p, UDINT* daten_len); - -_BUR_PUBLIC UINT MO_ver (STRING *pName, USINT grp, MoVerStruc_typ* pMoVerStruc); - -_BUR_PUBLIC void Bit2Byte (Bit2Byte_typ* Bit2Byte_ptr); -_BUR_PUBLIC void Byte2Bit (Byte2Bit_typ* Byte2Bit_ptr); + BOOL bmem000; + BOOL bmem001; + BOOL bmem002; + BOOL bmem003; + BOOL bmem004; + BOOL bmem005; + BOOL bmem006; + BOOL bmem007; + BOOL bmem008; + BOOL bmem009; + BOOL bmem010; + BOOL bmem011; + BOOL bmem012; + BOOL bmem013; + BOOL bmem014; + BOOL bmem015; + BOOL bmem016; + BOOL bmem017; + BOOL bmem018; + BOOL bmem019; + BOOL bmem020; + BOOL bmem021; + BOOL bmem022; + BOOL bmem023; + BOOL bmem024; + BOOL bmem025; + BOOL bmem026; + BOOL bmem027; + BOOL bmem028; + BOOL bmem029; + BOOL bmem030; + BOOL bmem031; + BOOL bmem032; + BOOL bmem033; + BOOL bmem034; + BOOL bmem035; + BOOL bmem036; + BOOL bmem037; + BOOL bmem038; + BOOL bmem039; + BOOL bmem040; + BOOL bmem041; + BOOL bmem042; + BOOL bmem043; + BOOL bmem044; + BOOL bmem045; + BOOL bmem046; + BOOL bmem047; + BOOL bmem048; + BOOL bmem049; + BOOL bmem050; + BOOL bmem051; + BOOL bmem052; + BOOL bmem053; + BOOL bmem054; + BOOL bmem055; + BOOL bmem056; + BOOL bmem057; + BOOL bmem058; + BOOL bmem059; + BOOL bmem060; + BOOL bmem061; + BOOL bmem062; + BOOL bmem063; + BOOL bmem064; + BOOL bmem065; + BOOL bmem066; + BOOL bmem067; + BOOL bmem068; + BOOL bmem069; + BOOL bmem070; + BOOL bmem071; + BOOL bmem072; + BOOL bmem073; + BOOL bmem074; + BOOL bmem075; + BOOL bmem076; + BOOL bmem077; + BOOL bmem078; + BOOL bmem079; + BOOL bmem080; + BOOL bmem081; + BOOL bmem082; + BOOL bmem083; + BOOL bmem084; + BOOL bmem085; + BOOL bmem086; + BOOL bmem087; + BOOL bmem088; + BOOL bmem089; + BOOL bmem090; + BOOL bmem091; + BOOL bmem092; + BOOL bmem093; + BOOL bmem094; + BOOL bmem095; + BOOL bmem096; + BOOL bmem097; + BOOL bmem098; + BOOL bmem099; + BOOL bmem100; + BOOL bmem101; + BOOL bmem102; + BOOL bmem103; + BOOL bmem104; + BOOL bmem105; + BOOL bmem106; + BOOL bmem107; + BOOL bmem108; + BOOL bmem109; + BOOL bmem110; + BOOL bmem111; + BOOL bmem112; + BOOL bmem113; + BOOL bmem114; + BOOL bmem115; + BOOL bmem116; + BOOL bmem117; + BOOL bmem118; + BOOL bmem119; + BOOL bmem120; + BOOL bmem121; + BOOL bmem122; + BOOL bmem123; + BOOL bmem124; + BOOL bmem125; + BOOL bmem126; + BOOL bmem127; + BOOL bmem128; + BOOL bmem129; + BOOL bmem130; + BOOL bmem131; + BOOL bmem132; + BOOL bmem133; + BOOL bmem134; + BOOL bmem135; + BOOL bmem136; + BOOL bmem137; + BOOL bmem138; + BOOL bmem139; + } Byte2Bit_typ; + + /***************/ + /* Prototyping of functions and function blocks */ + _BUR_PUBLIC UINT PV_xgetadr(char *pv_name, UDINT *pv_adresse, UDINT *data_len); + _BUR_PUBLIC UINT PV_lkaddr(void *pv_address, char *pv_name_buf, UDINT pv_name_buf_size); + _BUR_PUBLIC UINT PV_xlist(UINT prev_index, UINT *index, PV_xList_typ *pvl_p); + _BUR_PUBLIC UINT PV_item(char *pv_name, UINT index, char *itemname); + _BUR_PUBLIC UINT PV_ninfo(char *pv_name, UDINT *data_typ_p, UDINT *data_len_p, + UINT *dimension_p); + + _BUR_PUBLIC UINT SYSreset(BOOL enable, USINT mode); + + _BUR_PUBLIC UINT MO_list(UINT prev_index, UINT *index, MO_List_typ *mol_p); + _BUR_PUBLIC void MO_info(struct MO_info *pInst); + _BUR_PUBLIC void slMoList(slMoList_typ *pInst); + + _BUR_PUBLIC UINT ST_ident(char *st_name_p, USINT st_grp, UDINT *st_ident); + _BUR_PUBLIC UINT ST_tmp_suspend(UDINT st_ident); + _BUR_PUBLIC UINT ST_tmp_resume(UDINT st_ident); + _BUR_PUBLIC UINT ST_allsuspend(void); + _BUR_PUBLIC UINT ST_info(UDINT st_ident, USINT *state, SINT *tcnr); + _BUR_PUBLIC UINT ST_name(UDINT st_ident, char *st_name_p, USINT *st_grp); + + _BUR_PUBLIC UINT TMP_alloc(UDINT memlng, void **memptr); + _BUR_PUBLIC UINT TMP_free(UDINT memlng, void *memptr); + + _BUR_PUBLIC UINT RTC_gettime(RTCtime_typ *rtctime); + _BUR_PUBLIC UINT RTC_settime(RTCtime_typ *rtctime); + _BUR_PUBLIC UINT TIM_musec(void); + _BUR_PUBLIC UINT TIM_ticks(void); + + _BUR_PUBLIC UINT ERR_warning(UINT errornr, UDINT errorinfo); + _BUR_PUBLIC UINT ERR_fatal(UINT errornr, UDINT errorinfo); + _BUR_PUBLIC UINT ERRxwarning(UINT errornr, UDINT errorinfo, char *errorstring); + _BUR_PUBLIC UINT ERRxfatal(UINT errornr, UDINT errorinfo, char *errorstring); + + _BUR_PUBLIC UINT MO_ver(STRING *pName, USINT grp, MoVerStruc_typ *pMoVerStruc); + + _BUR_PUBLIC unsigned long MO_versionMajor(STRING *pName); + _BUR_PUBLIC unsigned long MO_versionMinor(STRING *pName); + _BUR_PUBLIC unsigned long MO_versionPatch(STRING *pName); + _BUR_PUBLIC unsigned long MO_versionBuild(STRING *pName); + + _BUR_PUBLIC void Bit2Byte(Bit2Byte_typ *Bit2Byte_ptr); + _BUR_PUBLIC void Byte2Bit(Byte2Bit_typ *Byte2Bit_ptr); #ifdef __cplusplus }; #endif #endif /* _SYS_LIB_H_ */ - - diff --git a/example/AsProject/Logical/Libraries/_AS/sys_lib/binary.lby b/example/AsProject/Logical/Libraries/_AS/sys_lib/binary.lby index f8c1f6c..5714324 100644 --- a/example/AsProject/Logical/Libraries/_AS/sys_lib/binary.lby +++ b/example/AsProject/Logical/Libraries/_AS/sys_lib/binary.lby @@ -1,12 +1,12 @@ - - - - - sys_lib.fun - sys_lib.typ - sys_lib.var - - - - - \ No newline at end of file + + + + + sys_lib.fun + sys_lib.typ + sys_lib.var + + + + + diff --git a/example/AsProject/Logical/Libraries/_AS/sys_lib/sys_lib.fun b/example/AsProject/Logical/Libraries/_AS/sys_lib/sys_lib.fun index 71ee9b8..a06234d 100644 --- a/example/AsProject/Logical/Libraries/_AS/sys_lib/sys_lib.fun +++ b/example/AsProject/Logical/Libraries/_AS/sys_lib/sys_lib.fun @@ -1,4 +1,3 @@ - {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK Byte2Bit (*converts a byte array into a bit array*) VAR_INPUT byteadr :UDINT; (*byte array address*) @@ -43,125 +42,6 @@ END_FUNCTION_BLOCK END_VAR END_FUNCTION_BLOCK -{REDUND_ERROR} FUNCTION KEY_read : UINT (*reads the status of the keys on the CPU*) - VAR_INPUT - keys :UDINT; (*array variable for storing key states*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION KEY_enadis : UINT (*disables key handling by the operating system (operating mode 0)*) - VAR_INPUT - mode :BOOL; (*operating mode: 0 ... key handling by the operating system, 1 ... key handling by an application program*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION DA_fix : UINT (*transfers a data object to the FIXRAM*) - VAR_INPUT - mo_ident :UDINT; (*ID number from DA_create() or DA_ident()*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION DA_info : UINT (*provides information about the data object*) - VAR_INPUT - mo_ident :UDINT; (*ID number from DA_create() or DA_ident()*) - moduldata_adr :UDINT; (*data address in the data object*) - moduldata_len :UDINT; (*pointer to length of the data (in bytes)*) - memorytype :UDINT; (*pointer to memory type*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION DA_copy : UINT (*copies a data object into the specified memory (RAM, User ROM, MEMCARD or FIXRAM) under the name new_name*) - VAR_INPUT - mo_ident :UDINT; (*ID number from DA_create() or DA_ident()*) - new_name :UDINT; (*pointer to name of the new data object*) - mem_typ :USINT; (*memory type, e.g. 1...RAM, 2...User ROM, ..*) - da_ident :UDINT; (*pointer to ID number of the copied data object*) - daten_p :UDINT; (*data address in the new data object*) - daten_len :UDINT; (*pointer to data length in the new data object (in bytes)*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION DA_store : UINT (*saves a data object in the specified memory (RAM, UserROM, MEMCARD or FIXRAM)*) - VAR_INPUT - mo_ident :UDINT; (*ID number from DA_create() or DA_ident()*) - mem_typ :USINT; (*memory type, e.g. 1...RAM, 2...User ROM, ..*) - daten_p :UDINT; (*data address in the new data object*) - daten_len :UDINT; (*pointer to data length in the new data object (in bytes)*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION DA_burn : UINT (*transfers a data object to UserROM*) - VAR_INPUT - mo_ident :UDINT; (*ID number from DA_create() or DA_ident()*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION DA_delete : UINT (*deletes a data object from the memory (RAM, User ROM, MEMCARD or FIXRAM)*) - VAR_INPUT - mo_ident :UDINT; (*ID number from DA_create() or DA_ident()*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION DA_ident : UINT (*provides the ID number of an existing data object*) - VAR_INPUT - name_p :UDINT; (*pointer to name of the data object*) - grp :USINT; (*group number (standard = 0)*) - mo_ident :UDINT; (*pointer to ID number of the data object*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION DA_read : UINT (*reads data from a module in the RAM or FIXRAM*) - VAR_INPUT - mo_ident :UDINT; (*ID number from DA_create() or DA_ident()*) - data_p :UDINT; (*pointer to data range*) - data_len :UDINT; (*length of the data (in bytes)*) - mo_data_offset :UDINT; (*offset in the data area of the module*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION DA_write : UINT (*writes data to a data object in RAM or FIXRAM*) - VAR_INPUT - mo_ident :UDINT; (*ID number from DA_create() or DA_ident()*) - data_p :UDINT; (*pointer to data range*) - data_len :UDINT; (*length of the data (in bytes)*) - mo_data_offset :UDINT; (*offset in the data area of the module*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION DA_create : UINT (*generates a data object with corresponding parameter in the RAM*) - VAR_INPUT - name_p :UDINT; (*pointer to name of the data object*) - grp :USINT; (*group Number (standard = 0)*) - spooladr :UINT; (*spool address (standard = 0)*) - data_len :UDINT; (*length of the data (in bytes)*) - data_p :UDINT; (*pointer to data which is written in the data object*) - mo_data_p :UDINT; (*data address in the data object*) - mo_ident :UDINT; (*pointer to ID number of the data object*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION DIS_clr : UINT (*clears the CPU status display (B&R 2010 system only)*) - VAR_INPUT - dummy_input :USINT; (*required for operation in ladder diagram*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION DIS_chr : UINT (*writes a ASCII character to the CPU status display*) - VAR_INPUT - row :UDINT; (*row number (0 or 1) where the ASCII character is to be output*) - col :UDINT; (*column number (0 through 7) where the ASCII character is to be output*) - character :SINT; (*ASCII character that is to be output on the status display*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION DIS_str : UINT (*writes a character string to the CPU status display*) - VAR_INPUT - row :UDINT; (*row number (0 or 1) where the string is to be output*) - col :UDINT; (*column number (0 through 7) from where the string is to be output*) - string :UDINT; (*pointer to string (ending in zero) that is to be output on the status display*) - END_VAR -END_FUNCTION - {REDUND_ERROR} FUNCTION ERRxfatal : UINT (*makes an log book entry in the error log book*) VAR_INPUT errornr :UINT; (*error number, which is entered in the error log book*) @@ -170,20 +50,6 @@ END_FUNCTION END_VAR END_FUNCTION -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION ERR_read : UINT (*reads an entry from the error log book and writes the information in a structure (ERR_typ_struct)*) - VAR_INPUT - entry_nr :UINT; (*number of the log book entry that is to be read*) - ERR_typ_struct :UDINT; (*pointer to structure in which information about the log book entry is written*) - END_VAR -END_FUNCTION - -{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION ERRxread : UINT (*reads an entry from the error log book and writes the information in a structure (ERR_typ_struct)*) - VAR_INPUT - entry_nr :UINT; (*number of the log book entry that is to be read*) - ERR_xtyp_struct :UDINT; (*pointer to structure in which information about the log book entry is written*) - END_VAR -END_FUNCTION - {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION ERR_fatal : UINT (*makes an entry (log book entry) in the error log book*) VAR_INPUT errornr :UINT; (*error number, which is entered in the error log book*) @@ -206,41 +72,6 @@ END_FUNCTION END_VAR END_FUNCTION -{REDUND_ERROR} FUNCTION SM_release : UINT (*releases the semaphore with the specified ID number*) - VAR_INPUT - sm_ident :UDINT; (*semaphore ID number from SM_create() or SM_ident()*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION SM_attach : UINT (*requests the use of a semaphore*) - VAR_INPUT - sm_ident :UDINT; (*semaphore ID number from SM_create() or SM_ident()*) - timeout :UDINT; (*timeout time in units of 10 ms (0 = unlimited timeout time)*) - flags :UDINT; (*0 ... wait for timeout time to elapse, 1 ... do not wait for timeout time to elapse*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION SM_delete : UINT (*deletes the semaphore with the specified ID number*) - VAR_INPUT - sm_ident :UDINT; (*semaphore ID number from SM_create() or SM_ident()*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION SM_ident : UINT (*provides the ID number of an existing semaphore*) - VAR_INPUT - sm_name :UDINT; (*pointer to semaphore name*) - sm_ident :UDINT; (*pointer to ID number of the semaphore*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION SM_create : UINT (*generates a semaphore using the specified parameter and provides the ID number of the semaphore*) - VAR_INPUT - sm_name :UDINT; (*semaphore name, given as a string*) - sm_count :USINT; (*number of permitted instances of simultaneous access using the semaphore*) - sm_ident :UDINT; (*ID number of the semaphore*) - END_VAR -END_FUNCTION - {REDUND_OK} {REDUND_UNREPLICABLE} FUNCTION TIM_ticks : UINT (*provides the number of ticks (1 tick = 10 ms) in the current second*) (* The dummy_input parameter is obsolete. VAR_INPUT @@ -255,18 +86,6 @@ END_FUNCTION END_VAR *) END_FUNCTION -{REDUND_ERROR} FUNCTION SW_settime : UINT (*sets the software clock to the desired time (RTCtime_struct structure)*) - VAR_INPUT - RTCtime_struct :UDINT; (*pointer to the structure which contains the time and date*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION SW_gettime : UINT (*reads the time and date from the software clock and writes this information in a RTCtime_struct structure*) - VAR_INPUT - RTCtime_struct :UDINT; (*pointer to the structure where the time and date are stored*) - END_VAR -END_FUNCTION - {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION RTC_settime : UINT (*sets the real-time clock to the desired time (RTCtime_struct structure)*) VAR_INPUT RTCtime_struct :UDINT; (*pointer to the structure which contains the time and date*) @@ -293,122 +112,6 @@ END_FUNCTION END_VAR END_FUNCTION -{REDUND_ERROR} FUNCTION MEM_free : UINT (*releases a memory area, which has been allocated using MEM_alloc()*) - VAR_INPUT - memlng :UDINT; (*size of the memory area to be released in bytes*) - memptr :UDINT; (*address for the memory area to be released*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION MEM_alloc : UINT (*allocates memory in the user memory area (user RAM only)*) - VAR_INPUT - memlng :UDINT; (*size of the allocated memory area in bytes*) - memptr :UDINT; (*pointer to requested memory area*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION AVT_info : UINT (*determines how many links there are to the AVT entry with the specified AVT ID number*) - VAR_INPUT - av_ident :UDINT; (*AVT ID number from AVT_create() or AVT_ident()*) - av_linkcount :UDINT; (*link count (number of access to this AVT entry)*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION AVT_release : UINT (*releases the AVT entry with the specified AVT ID number*) - VAR_INPUT - av_ident :UDINT; (*AVT ID number from AVT_create() or AVT_ident()*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION AVT_attach : UINT (*attachs information to an AVT entry*) - VAR_INPUT - av_ident :UDINT; (*AVT ID number from AVT_create() or AVT_ident()*) - av_info :UDINT; (*pointer to AVT info (e.g.: data address)*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION AVT_ident : UINT (*provides the AVT ID number for an existing AVT entry*) - VAR_INPUT - av_name :UDINT; (*pointer to name of AVT entry*) - av_grp :USINT; (*group number (standard = 0)*) - av_ident :UDINT; (*pointer to AVT ident number*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION AVT_cancel : UINT (*deletes the entry with the specified AVT ID number from the AVT*) - VAR_INPUT - av_ident :UDINT; (*AVT ID number from AVT_create() or AVT_ident()*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION AVT_create : UINT (*generates an AVT entry with the specified name and provides an ID number*) - VAR_INPUT - av_name :UDINT; (*pointer to name of AVT entry*) - av_grp :USINT; (*group number (standard = 0)*) - av_info :UDINT; (*AVT info (e.g.: data address)*) - av_ident :UDINT; (*pointer to AVT ident number*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION UT_sleep : UINT (*stops the idle time object for a set period of time*) - VAR_INPUT - tickcount :UDINT; (*number of ticks (1 tick = 10 ms) for which an idle time object is stopped*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION UT_exit : UINT (*exits an idle time object*) - VAR_INPUT - exitinfo :UDINT; (*exit information (standard = 0)*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION UT_freemsg : UINT (*releases the memory which was taken up by a received message*) - VAR_INPUT - msglng :UDINT; (*size of the memory to be released (in bytes)*) - msg :UDINT; (*pointer to memory to be released*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION UT_recmsg : UINT (*receives a message sent using the UT_sendmsg() function*) - VAR_INPUT - ut_ident :UDINT; (*pointer to ID number of the object to which the message was sent*) - msg :UDINT; (*address at which the received message should be saved*) - msglng :UDINT; (*pointer to length of the received data in bytes*) - flags :UDINT; (*Bit 1 = 1: do not wait for UT_sendmsg()*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION UT_sendmsg : UINT (*sends a message to another object (including cyclic objects)*) - VAR_INPUT - ut_ident :UDINT; (*ID number of the object to which the message is to be sent (from UT_ident())*) - msg :UDINT; (*pointer to message to be sent*) - msglng :UDINT; (*length of the message to be sent (in bytes)*) - flags :UDINT; (*Bit 1 = 1: do not wait for UT_recmsg()*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION UT_resume : UINT (*restarts a stopped idle time object*) - VAR_INPUT - ut_ident :UDINT; (*ID number from UT_ident()*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION UT_suspend : UINT (*stops the idle time object with the specified ID number*) - VAR_INPUT - ut_ident :UDINT; (*ID number from UT_ident()*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION UT_ident : UINT (*provides the ID number of an idle time object*) - VAR_INPUT - ut_name :UDINT; (*pointer to name of the idle time object*) - ut_grp :USINT; (*group number (standard = 0)*) - ut_proc :USINT; (*processor number (standard: 0 = current processor)*) - ut_sps_p :UDINT; (*pointer to name of the target system*) - ut_ident :UDINT; (*pointer to ID number of the idle time object*) - END_VAR -END_FUNCTION - {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION ST_name : UINT (*provides the name and group number for the object with the relevant ID number*) VAR_INPUT st_ident :UDINT; (*ID number for the object from ST_ident() (0 = the object itself)*) @@ -443,18 +146,6 @@ END_FUNCTION END_VAR END_FUNCTION -{REDUND_ERROR} FUNCTION ST_resume : UINT (*activates a previously stopped (cyclic) software object*) - VAR_INPUT - st_ident :UDINT; (*ID number for the software object from ST_ident()*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION ST_suspend : UINT (*suspends a cyclic object permanently*) - VAR_INPUT - st_ident :UDINT; (*ID number for the object from ST_ident()(0 = object suspends itself)*) - END_VAR -END_FUNCTION - {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION ST_ident : UINT (*provides the ID number for a software object*) VAR_INPUT st_name :UDINT; (*pointer to name of the software object*) @@ -463,13 +154,6 @@ END_FUNCTION END_VAR END_FUNCTION -{REDUND_ERROR} FUNCTION FORCE_info : UINT (*determines whether or not a variable is forced in the objects of the specified resource (tk_nr)*) - VAR_INPUT - tknr :USINT; (*resource that is to be checked: 1 through 4 ... cyclic resource, -9 ... Interrupt resource, ..*) - force :UDINT; (*given as a pointer: 1 ... force function is active, 0 ... force function is inactive*) - END_VAR -END_FUNCTION - {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION MO_ver : UINT (*reads the version and the date of a B&R module*) VAR_INPUT pName :UDINT; (*pointer to name of the B&R module*) @@ -504,32 +188,35 @@ END_FUNCTION END_VAR END_FUNCTION_BLOCK -{REDUND_ERROR} FUNCTION SYS_battery : USINT (*indicates the status of the standard/rechargeable battery in the CPU and the battery in the APM*) +{REDUND_OK} FUNCTION MO_versionMajor : UDINT (*returns the major number of a B&R module, returns zero on error*) VAR_INPUT - dummy_input :USINT; (*required for operation in ladder diagram*) - END_VAR + pName :UDINT; (*pointer to name of the B&R module*) + END_VAR END_FUNCTION -{REDUND_OK} {REDUND_UNREPLICABLE} FUNCTION SYSreset : UINT (*initiates a boot procedure on the target system in the specified mode (WARM or COLD START)*) +{REDUND_OK} FUNCTION MO_versionMinor : UDINT (*returns the minor number of a B&R module, returns zero on error*) VAR_INPUT - enable :BOOL; (*enables execution*) - mode :USINT; (*boot mode: 0x01 .. WARM START (with Restart), 0x02 .. COLD START (with Restart), ..*) + pName :UDINT; (*pointer to name of the B&R module*) END_VAR END_FUNCTION -{REDUND_ERROR} FUNCTION SYSxinfo : UINT (*reads the additional system information and writes this information into a SYSxinfo_struct structure*) +{REDUND_OK} FUNCTION MO_versionPatch : UDINT (*returns the patch number of a B&R module, returns zero on error*) VAR_INPUT - SYSxinfo_struct :UDINT; (*pointer to structure where the additional system information is stored, given as a pointer*) + pName :UDINT; (*pointer to name of the B&R module*) END_VAR END_FUNCTION -{REDUND_ERROR} FUNCTION SYS_info : UINT (*provides information about the system*) +{REDUND_OK} FUNCTION MO_versionBuild : UDINT (*returns the build number of a B&R module, returns zero on error*) VAR_INPUT - init_count :UDINT; (*pointer to number of previously executed warm restarts*) - init_descr :UDINT; (*pointer to mode of last start-up: 1 ... WARM RESTART, 2 ... COLD RESTART, ..*) - tick_count :UDINT; (*pointer to tick counter*) - version :UDINT; (*pointer to operating system version number*) - ov_version :UDINT; (*pointer to object directory version number*) + pName :UDINT; (*pointer to name of the B&R module*) + END_VAR +END_FUNCTION + + +{REDUND_OK} {REDUND_UNREPLICABLE} FUNCTION SYSreset : UINT (*initiates a boot procedure on the target system in the specified mode (WARM or COLD START)*) + VAR_INPUT + enable :BOOL; (*enables execution*) + mode :USINT; (*boot mode: 0x01 .. WARM START (with Restart), 0x02 .. COLD START (with Restart), ..*) END_VAR END_FUNCTION @@ -558,50 +245,6 @@ END_FUNCTION END_VAR END_FUNCTION -{REDUND_ERROR} FUNCTION PV_ident : UINT (*provides the ID number of a process variable (PV)*) - VAR_INPUT - pv_name :UDINT; (*pointer to name of the process variable*) - pv_tknr :USINT; (*process variable resource*) - pv_grp :USINT; (*group number *) - pv_ident :UDINT; (*pointer to PV ID number*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION PV_list : UINT (*browses all variables*) - VAR_INPUT - prev_index :UINT; (*index of the PV where the search is being started*) - index :UDINT; (*pointer to index of the located PV*) - PVList_struct :UDINT; (*pointer to structure which contains PV information about the located PV*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION PV_info : UINT (*reads data from a process variable of a complex data type (array or structure variable)*) - VAR_INPUT - pv_ident :UDINT; (*ID number of the process variable from PV_ident()*) - data_typ :UDINT; (*pointer to data type of the PV*) - data_len :UDINT; (*pointer to length of the PV in bytes*) - dimension :UDINT; (*pointer to number of array or structure elements*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION PV_xgetval : UINT (*reads data from a process variable of a complex data type (array or structure variable)*) - VAR_INPUT - pv_ident :UDINT; (*ID number of the process variable from PV_ident()*) - subindex :UINT; (*element index: 0 ... Entire array/structure, 1 ... 1st element of the array/structure, ..*) - data_p :UDINT; (*pointer to data read*) - data_len :USINT; (*length of the data to be read in bytes*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION PV_xsetval : UINT (*sets a particular value for a process variable of a complex data type (array variable or structure variable)*) - VAR_INPUT - pv_ident :UDINT; (*ID number of the process variable from PV_ident()*) - subindex :UINT; (*element index: 0 ... Entire array/structure, 1 ... 1st element of the array/structure, ..*) - data_p :UDINT; (*pointer to data assigned to the PV*) - data_len :USINT; (*length of the data in bytes*) - END_VAR -END_FUNCTION - {REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION PV_xgetadr : UINT (*provides the address and length of a variable*) VAR_INPUT pv_name_p :UDINT; (*pointer to name of the process variable*) @@ -610,26 +253,11 @@ END_FUNCTION END_VAR END_FUNCTION -{REDUND_ERROR} FUNCTION PV_getadr : UINT (*provides the address of a process variable*) - VAR_INPUT - pv_name_p :UDINT; (*pointer to name of the process variable*) - pv_tknr :USINT; (*process variable resource: 1 ... Cyclic #1, timer #1-4, 2 ... Cyclic resource cyclic #2, ..*) - pv_grpnr :USINT; (*group number (standard = 0)*) - pv_adresse :UDINT; (*PV address for dynamic access*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION PV_getval : UINT (*reads the value of a process variable*) - VAR_INPUT - pv_ident :UDINT; (*ID number of the process variable from PV_ident()*) - value :UDINT; (*pointer to determined value of the PV*) - END_VAR -END_FUNCTION - -{REDUND_ERROR} FUNCTION PV_setval : UINT (*sets a particular value for a process variable*) +{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION PV_lkaddr : UINT (*looks for a process varaible name for the specified address*) VAR_INPUT - pv_ident :UDINT; (*ID number of the process variable from PV_ident()*) - value :UDINT; (*value assigned to the PV*) + pv_address :UDINT; (*PV address to look for*) + pv_name_buf :UDINT; (*pointer to name buffer for the name of the process variable*) + pv_name_buf_size :UDINT; (*size of name buffer in bytes*) END_VAR END_FUNCTION diff --git a/example/AsProject/Logical/Libraries/_AS/sys_lib/sys_lib.typ b/example/AsProject/Logical/Libraries/_AS/sys_lib/sys_lib.typ index 7983477..ebb1fc4 100644 --- a/example/AsProject/Logical/Libraries/_AS/sys_lib/sys_lib.typ +++ b/example/AsProject/Logical/Libraries/_AS/sys_lib/sys_lib.typ @@ -1,4 +1,3 @@ - TYPE MoVerStruc_typ : STRUCT version : ARRAY[0..9] OF USINT ; @@ -10,37 +9,6 @@ TYPE minute : USINT ; second : USINT ; END_STRUCT; - ERR_xtyp : STRUCT - err_nr : UINT ; - err_info : UDINT ; - t_name : ARRAY[0..4] OF SINT ; - err_type : USINT ; - err_year : UINT ; - err_month : USINT ; - err_day : USINT ; - err_reserve : USINT ; - err_hour : USINT ; - err_minute : USINT ; - err_second : USINT ; - err_millisec : UINT ; - err_microsec : UINT ; - err_string : ARRAY[0..33] OF USINT ; - END_STRUCT; - ERR_typ : STRUCT - err_nr : UINT ; - err_info : UDINT ; - t_name : ARRAY[0..4] OF SINT ; - err_type : USINT ; - err_year : UINT ; - err_month : USINT ; - err_day : USINT ; - err_reserve : USINT ; - err_hour : USINT ; - err_minute : USINT ; - err_second : USINT ; - err_millisec : UINT ; - err_microsec : UINT ; - END_STRUCT; PV_xList_typ : STRUCT name : ARRAY[0..32] OF SINT ; (*name of the process variable*) data_typ : USINT ; (*PV data type (see PV_info())*) @@ -48,13 +16,6 @@ TYPE dimension : UDINT ; (*number of array elements*) adress : UDINT ; (*physical address of the PV (for dynamic access)*) END_STRUCT; - PV_List_typ : STRUCT - name : ARRAY[0..13] OF SINT ; (*name of the PV*) - tcnr : USINT ; (*PV resource*) - grp : USINT ; (*group number of the PV (standard = 0)*) - ident : UDINT ; (*PV ID number*) - adress : UDINT ; (*physical address of the PV (for dynamic access)*) - END_STRUCT; MO_List_typ : STRUCT name : ARRAY[0..13] OF SINT ; grp : USINT ; @@ -64,18 +25,6 @@ TYPE adress : UDINT ; memtype : UDINT ; END_STRUCT; - SYSxinfo_typ : STRUCT - aws_name : ARRAY[0..5] OF SINT ; - aws_type : ARRAY[0..1] OF SINT ; - cpu_info : UDINT ; - ma_globl_len : UINT ; - md_globl_len : UINT ; - os_len : UDINT ; - user_len : UDINT ; - tmp_len : UDINT ; - eprom_len : UDINT ; - fix_ram_len : UDINT ; - END_STRUCT; RTCtime_typ : STRUCT year : UINT ; month : USINT ; diff --git a/example/AsProject/Logical/Libraries/_AS/sys_lib/sys_lib.var b/example/AsProject/Logical/Libraries/_AS/sys_lib/sys_lib.var index ed5f718..9604ea3 100644 --- a/example/AsProject/Logical/Libraries/_AS/sys_lib/sys_lib.var +++ b/example/AsProject/Logical/Libraries/_AS/sys_lib/sys_lib.var @@ -1,57 +1,30 @@ (*error codes of the SYS_LIB services*) VAR CONSTANT - ERR_BUR_WRROW : UINT := 2061; (*illegal row*) - ERR_BUR_WRCOL : UINT := 2062; (*illegal column*) - ERR_BUR_WR_CHAR : UINT := 2063; (*invalid ASCII character*) - ERR_BUR_NORTC : UINT := 2073; (*RTC not existing or uninitialized*) - - ERR_BUR_MO_NOTFOUND : UINT := 3019; (*module not found*) - ERR_BUR_NOMEM : UINT := 3030; (*out of memory*) - ERR_BUR_MEMVWBUSY : UINT := 3035; (*memory management busy*) - ERR_BUR_ILLPTR : UINT := 3104; (*illegal data pointer in MEM_free*) - - ERR_BUR_ILLTKNR : UINT := 3300; (*illegal task-class number*) - ERR_BUR_WROFFSET : UINT := 3301; (*illegal offset*) + ERR_BUR_MO_NOTFOUND : UINT := 3019; (*module not found*) ERR_BUR_ILLSTATE : UINT := 3302; (*illegal state of object*) - ERR_BUR_NOMSG : UINT := 3303; (*no message sent/received*) - ERR_BUR_DUPOBJ : UINT := 3305; (*object exists*) - ERR_BUR_TIMEOUT : UINT := 3304; (*timeout error*) - ERR_BUR_EXISTS : UINT := 3306; (*entry exists*) - ERR_BUR_LCOUNT : UINT := 3307; (*Linkcnt <> 0 in AVT_cancel ()*) - ERR_BUR_BURNING : UINT := 3308; (*error burning module*) - ERR_BUR_INVALIDMBX : UINT := 3309; (*invalid mailbox*) - - ERR_BUR_ILLBPTR : UINT := 3310; (*invalid base pointer*) - ERR_BUR_ILLTYP : UINT := 3311; (*invalid I/O type*) - ERR_BUR_ILLEXT : UINT := 3312; (*invalid ext. bit*) - ERR_BUR_ILLVER : UINT := 3313; (*invalid version, e.g. BURTRAP V1.10 to SPSSW V1.05*) - ERR_BUR_ILLLEN : UINT := 3314; (*invalid data length*) - ERR_BUR_MAX_LCOUNT : UINT := 3315; (*AVT_attach: LCOUNT > 127*) - ERR_BUR_AVT_FREE : UINT := 3316; (*AVT_release:LCOUNT = 0*) + ERR_BUR_ILLTYP : UINT := 3311; (*SYSreset - invalid input value for mode*) ERR_BUR_ILLPAR : UINT := 3317; (*illegal parameter*) - ERR_BUR_INSTALL : UINT := 3318; (*error install datamodule*) - ERR_BUR_WRONG_MODTYP : UINT := 3319; (*wrong module type*) - - ERR_BUR_OBJDEL : UINT := 3320; (*object already deleted*) ERR_BUR_ILLOBJ : UINT := 3324; (*object does not exist*) - ERR_BUR_ILLOBJTYP : UINT := 3328; (*invalid object type*) - ERR_BUR_NOENTRY : UINT := 3332; (*no entry*) + ERR_BUR_NOENTRY : UINT := 3332; (*no entry*) ERR_BUR_TOOLONG_PVNAME : UINT := 3333; (*too long PV name*) - ERR_BUR_ILLIDENT : UINT := 3336; (*illegal ident*) - ERR_BUR_NOSMBUF : UINT := 3560; (*no more semaphore buffers*) - ERR_BUR_NOSM : UINT := 3564; (*semaphore not available*) - ERR_BUR_SMDEL : UINT := 3568; (*semaphore deleted*) + ERR_BUR_ILLIDENT : UINT := 3336; (*illegal ident*) ERR_BUR_NOTIME : UINT := 3584; (*time not available*) - ERR_BUR_ILLDATE : UINT := 3588; (*date : out of range*) - ERR_BUR_ILLTIME : UINT := 3592; (*time : out of range*) - ERR_BUR_ILLTICKS : UINT := 3596; (*ticks : out of range*) - - ERR_BUR_MEM_ALLOC : UINT := 3600; (*not enough continuous memory*) ERR_BUR_TMP_ALLOC : UINT := 3601; (*not enough continuous memory*) - ERR_BUR_MEM_FREE : UINT := 3700; (*invalid pointer/length*) ERR_BUR_TMP_FREE : UINT := 3701; (*invalid pointer/length*) - END_VAR + ERR_EXC_NIL_POINTER : UINT := 9133; (*null pointer*) + ERR_BUR_PVNAME : UINT := 14700; (*Invalid name syntax*) + ERR_BUR_WRONG_ARRAY : UINT := 14702; (*Invalid array syntax*) + ERR_BUR_WRONG_ELEM : UINT := 14703; (*Invalid element syntax*) + ERR_BUR_WRONG_COMP : UINT := 14704; (*Invalid component separator*) + ERR_BUR_NOTFOUND : UINT := 14710; (*PV not found*) + ERR_BUR_ZEROLNG : UINT := 14712; (*PV size is zero (plausibility check)*) + ERR_BUR_NODETAIL : UINT := 14713; (*No type description (plausibility check)*) + ERR_BUR_AIXTOOBIG : UINT := 14714; (*Array index too big*) + ERR_BUR_WRONG_SDSR : UINT := 14715; (*Invalid address (plausibility check)*) + ERR_BUR_BUFLNG : UINT := 14716; (*Name buffer too small*) + ERR_BUR_WRONG_INDEX : UINT := 14717; (*Access via index/subindex is not supported*) +END_VAR (*state for object PLC task*) VAR CONSTANT @@ -69,26 +42,6 @@ VAR CONSTANT Z_ST_tmp_suspended : UINT := 16#90; (*object temporarily stopped*) END_VAR -(*OBSOLETE PV data types*) -VAR CONSTANT - PB_DT_STRUCT : UINT := 0; (*OBSOLETE*) - PB_DT_BOOL : UINT := 1; (*OBSOLETE*) - PB_DT_INT8 : UINT := 2; (*OBSOLETE*) - PB_DT_INT16 : UINT := 3; (*OBSOLETE*) - PB_DT_INT32 : UINT := 4; (*OBSOLETE*) - PB_DT_BYTE : UINT := 5; (*OBSOLETE*) - PB_DT_WORD : UINT := 6; (*OBSOLETE*) - PB_DT_LONG : UINT := 7; (*OBSOLETE*) - PB_DT_FLOAT : UINT := 8; (*OBSOLETE*) - PB_DT_VIS : UINT := 9; (*OBSOLETE*) - PB_DT_OCTET : UINT := 10; (*OBSOLETE*) - PB_DT_DATE : UINT := 11; (*OBSOLETE*) - PB_DT_TIME : UINT := 12; (*OBSOLETE*) - PB_DT_DIFF : UINT := 13; (*OBSOLETE*) - PB_DT_BIT : UINT := 14; (*OBSOLETE*) - PB_DT_ARRAY : UINT := 15; (*OBSOLETE*) -END_VAR - (*elementary data types*) VAR CONSTANT SYSLIB_IEC_TYPE_USER_DEFINED : USINT := 0; (*User-defined data type*) @@ -113,13 +66,6 @@ VAR CONSTANT SYSLIB_IEC_TYPE_WSTRING : USINT := 21; (*Variable-length double-byte character string*) END_VAR -(*memory types*) -VAR CONSTANT - SYS_RAM : UINT := 1; (*RAM*) - USER_ROM1 : UINT := 2; (*EPROM*) - FIX_RAM : UINT := 5; (*fixed RAM*) -END_VAR - (*shutdown/reboot types*) VAR CONSTANT SYSLIB_WARMSTART : USINT := 16#01; (*WARMSTART (with restart)*) diff --git a/example/AsProject/Logical/MachineControl/MachineControl.typ b/example/AsProject/Logical/MachineControl/MachineControl.typ deleted file mode 100644 index 45cb1ac..0000000 --- a/example/AsProject/Logical/MachineControl/MachineControl.typ +++ /dev/null @@ -1,49 +0,0 @@ -(******************************************************************** - * COPYRIGHT -- Automation Resources Group - ******************************************************************** - * Package: MachineControl - * File: MachineControl.typ - * Author: David Blackburn - * Created: November 10, 2011 - ******************************************************************** - * Data types of package MachineControl - ********************************************************************) - -TYPE - SUBSTATES : - ( - SUB_STATE_INIT, - SUB_BOOTING_INIT_FILE_DEVICES, - SUB_STATE_STARTING_SET_LIMITS, - SUB_STATE_PSU_POWER, - SUB_STATE_SERVO_POWER, - SUB_STATE_SERVO_HOME, - SUB_STATE_SERVO_HOME_DONE, - SUB_STATE_ENABLE_DRIVE_COMPS, - SUB_STATE_ENABLE_AXIS_ENAGAGE, - SUB_STATE_STARTING_CNC_START, - SUB_STATE_STARTING_CNC_STARTED, - SUB_STATE_STARTING_CNC_FAILED, - SUB_STATE_STARTING_ENABLE_CLAMP, - SUB_STATE_EXITING_INIT, - SUB_STATE_EXITING_CLEANUP, - SUB_STATE_STOPPING_DISABLE_HEAD, - SUB_STATE_STOPPING_DISABLE_VFD, - SUB_STATE_EXITING_DISABLE_CLAMP, - SUB_STATE_STOPPING_STOP_CNC, - SUB_STATE_CLEARING_PROMPT_USER, - SUB_STATE_CLEARING_START_PROGRAM, - SUB_STATE_CLEARING_WAIT_FINISH, - SUB_STATE_DISABLE_AXIS_ENAGAGE, - SUB_STATE_SERVO_STOP, - SUB_STATE_SERVO_POWER_OFF, - SUB_STATE_BACKUP_HOME_DATA, - SUB_STATE_STOP_DISABLE_MOTORS - ); - MODE_MACHINE_ENUM : - ( - MODE_MACHINE_AUTO, - MODE_MACHINE_MANUAL_PROGRAM, - MODE_MACHINE_MANUAL_JOG - ); -END_TYPE diff --git a/example/AsProject/Logical/MachineControl/MachineControl.var b/example/AsProject/Logical/MachineControl/MachineControl.var deleted file mode 100644 index 9db5b27..0000000 --- a/example/AsProject/Logical/MachineControl/MachineControl.var +++ /dev/null @@ -1,20 +0,0 @@ -(******************************************************************** - * COPYRIGHT -- Automation Resources Group - ******************************************************************** - * Package: MachineControl - * File: MachineControl.var - * Author: David Blackburn - * Created: November 10, 2011 - ******************************************************************** - * Variables of package MachineControl - ********************************************************************) -VAR - gMachine : Piper_typ := (0); -END_VAR -VAR RETAIN - BootTime : TIME; -END_VAR -VAR - gActiveMode : MODE_MACHINE_ENUM := MODE_MACHINE_AUTO; - gRequestedMode : MODE_MACHINE_ENUM := MODE_MACHINE_AUTO; -END_VAR diff --git a/example/AsProject/Logical/MachineControl/MachineHMI/IEC.prg b/example/AsProject/Logical/MachineControl/MachineHMI/IEC.prg deleted file mode 100644 index 54f112f..0000000 --- a/example/AsProject/Logical/MachineControl/MachineHMI/IEC.prg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - MachineProgCyclic.st - MachineProgInit.st - MachineProg.typ - MachineProg.var - - \ No newline at end of file diff --git a/example/AsProject/Logical/MachineControl/MachineHMI/MachineProg.typ b/example/AsProject/Logical/MachineControl/MachineHMI/MachineProg.typ deleted file mode 100644 index d5d0989..0000000 --- a/example/AsProject/Logical/MachineControl/MachineHMI/MachineProg.typ +++ /dev/null @@ -1,44 +0,0 @@ -(******************************************************************** - * COPYRIGHT -- Automation Resources Group - ******************************************************************** - * Program: MachineProg - * File: MachineProg.typ - * Author: David Blackburn - * Created: November 10, 2011 - ******************************************************************** - * Local data types of program MachineProg - ********************************************************************) - -TYPE - Machine_HMI_CMD_typ : STRUCT - Reset : HMI_Button_typ; - Start : HMI_Button_typ; - Stop : HMI_Button_typ; - Hold : HMI_Button_typ; - Unhold : HMI_Button_typ; - Suspend : HMI_Button_typ; - Unsuspend : HMI_Button_typ; - Abort : HMI_Button_typ; - Clear : HMI_Button_typ; - END_STRUCT; - Machine_HMI_State_typ : STRUCT - MachineStateLayer : HMI_Layer_typ; - Stopped : HMI_Shape_typ; - Resetting : HMI_Shape_typ; - Idle : HMI_Shape_typ; - Starting : HMI_Shape_typ; - Execute : HMI_Shape_typ; - Completing : HMI_Shape_typ; - Complete : HMI_Shape_typ; - Suspending : HMI_Shape_typ; - Suspended : HMI_Shape_typ; - UnSuspending : HMI_Shape_typ; - Holding : HMI_Shape_typ; - Held : HMI_Shape_typ; - UnHolding : HMI_Shape_typ; - Aborting : HMI_Shape_typ; - Aborted : HMI_Shape_typ; - Clearing : HMI_Shape_typ; - Stopping : HMI_Shape_typ; - END_STRUCT; -END_TYPE diff --git a/example/AsProject/Logical/MachineControl/MachineHMI/MachineProg.var b/example/AsProject/Logical/MachineControl/MachineHMI/MachineProg.var deleted file mode 100644 index 1c7a3bd..0000000 --- a/example/AsProject/Logical/MachineControl/MachineHMI/MachineProg.var +++ /dev/null @@ -1,14 +0,0 @@ -(******************************************************************** - * COPYRIGHT -- Automation Resources Group - ******************************************************************** - * Program: MachineProg - * File: MachineProg.var - * Author: David Blackburn - * Created: November 10, 2011 - ******************************************************************** - * Local variables of program MachineProg - ********************************************************************) -VAR - HMIMachineCMD : Machine_HMI_CMD_typ := (0); - HMIMachineState : Machine_HMI_State_typ := (0); -END_VAR diff --git a/example/AsProject/Logical/MachineControl/MachineHMI/MachineProgCyclic.st b/example/AsProject/Logical/MachineControl/MachineHMI/MachineProgCyclic.st deleted file mode 100644 index c12bb91..0000000 --- a/example/AsProject/Logical/MachineControl/MachineHMI/MachineProgCyclic.st +++ /dev/null @@ -1,523 +0,0 @@ -(******************************************************************** - * COPYRIGHT -- Automation Resources Group - ******************************************************************** - * PROGRAM: MachineProg - * File: MachineProgCyclic.st - * Author: David Blackburn - * Created: November 10, 2011 - ******************************************************************** - * Implementation OF PROGRAM MachineProg - ********************************************************************) - - -(********************************************************************) -(* *) -(* This program provides a framework for top level machine control. *) -(* This program should accept top level commands (Start, *) -(* Stop, etc.) and interact with lower level control objects, *) -(* issuing commands and checking status information. *) -(* *) -(* The state machine and commands are PackML compliant. *) -(* *) -(********************************************************************) - - -PROGRAM _CYCLIC - -HMIMachineCMD.Abort.StatusDP.0:= 1; -HMIMachineCMD.Clear.StatusDP.0:= 1; -HMIMachineCMD.Hold.StatusDP.0:= 1; -HMIMachineCMD.Reset.StatusDP.0:= 1; -HMIMachineCMD.Start.StatusDP.0:= 1; -HMIMachineCMD.Stop.StatusDP.0:= 1; -HMIMachineCMD.Suspend.StatusDP.0:= 1; -HMIMachineCMD.Unhold.StatusDP.0:= 1; -HMIMachineCMD.Unsuspend.StatusDP.0:= 1; - -HMIMachineState.Aborted.ColorDP:= 0; -HMIMachineState.Aborting.ColorDP:= 0; -HMIMachineState.Clearing.ColorDP:= 0; -HMIMachineState.Complete.ColorDP:= 0; -HMIMachineState.Completing.ColorDP:= 0; -HMIMachineState.Execute.ColorDP:= 0; -HMIMachineState.Held.ColorDP:= 0; -HMIMachineState.Holding.ColorDP:= 0; -HMIMachineState.Idle.ColorDP:= 0; -HMIMachineState.Resetting.ColorDP:= 0; -HMIMachineState.Starting.ColorDP:= 0; -HMIMachineState.Stopped.ColorDP:= 0; -HMIMachineState.Stopping.ColorDP:= 0; -HMIMachineState.Suspended.ColorDP:= 0; -HMIMachineState.Suspending.ColorDP:= 0; -HMIMachineState.UnHolding.ColorDP:= 0; -HMIMachineState.UnSuspending.ColorDP:= 0; - - - -(********************************************) -(* Main state machine *) -(********************************************) - - -CASE gMachine.OUT.State OF - - -(************************************************************) -(* STOP states *) -(************************************************************) - - MACH_ST_STOPPING: - - (****************************) - (* Check for machine CMDs *) - (****************************) - - HMIMachineCMD.Abort.StatusDP.0:= 0; - HMIMachineState.Stopping.ColorDP:= 1; - - IF( HMIMachineCMD.Abort.CMD = 1)THEN - - gMachine.IN.CMD.Abort:=1; - - END_IF - - - MACH_ST_STOPPED: - - (****************************) - (* Wait for machine CMDs *) - (****************************) - - HMIMachineCMD.Abort.StatusDP.0:= 0; - HMIMachineState.Stopped.ColorDP:= 1; - - IF( HMIMachineCMD.Abort.CMD = 1)THEN - - gMachine.IN.CMD.Abort:=1; - - END_IF - - HMIMachineCMD.Reset.StatusDP.0:= 0; - - IF( HMIMachineCMD.Reset.CMD = 1)THEN - - gMachine.IN.CMD.Reset:=1; - - END_IF - - -(************************************************************) -(* IDLE states *) -(************************************************************) - - MACH_ST_RESETTING: - - (****************************) - (* Check for machine CMDs *) - (****************************) - - HMIMachineCMD.Abort.StatusDP.0:= 0; - HMIMachineState.Resetting.ColorDP:= 1; - - IF( HMIMachineCMD.Abort.CMD = 1)THEN - - gMachine.IN.CMD.Abort:=1; - - END_IF - - HMIMachineCMD.Stop.StatusDP.0:= 0; - - IF( HMIMachineCMD.Stop.CMD = 1)THEN - - gMachine.IN.CMD.Stop:=1; - - END_IF - - - MACH_ST_IDLE: - - - (****************************) - (* Wait for machine CMDs *) - (****************************) - - HMIMachineCMD.Abort.StatusDP.0:= 0; - HMIMachineState.Idle.ColorDP:= 1; - - IF( HMIMachineCMD.Abort.CMD = 1)THEN - - gMachine.IN.CMD.Abort:=1; - - END_IF - - HMIMachineCMD.Stop.StatusDP.0:= 0; - - IF( HMIMachineCMD.Stop.CMD = 1)THEN - - gMachine.IN.CMD.Stop:=1; - - END_IF - - HMIMachineCMD.Start.StatusDP.0:= 0; - - IF( HMIMachineCMD.Start.CMD = 1)THEN - - gMachine.IN.CMD.Start:=1; - - END_IF - - -(************************************************************) -(* EXECUTE states *) -(************************************************************) - - MACH_ST_STARTING: - - (****************************) - (* Check for machine CMDs *) - (****************************) - - HMIMachineCMD.Abort.StatusDP.0:= 0; - HMIMachineState.Starting.ColorDP:= 1; - - IF( HMIMachineCMD.Abort.CMD = 1)THEN - - gMachine.IN.CMD.Abort:=1; - - END_IF - - HMIMachineCMD.Stop.StatusDP.0:= 0; - - IF( HMIMachineCMD.Stop.CMD = 1)THEN - - gMachine.IN.CMD.Stop:=1; - - END_IF - - - MACH_ST_EXECUTE: - - (****************************) - (* Check for machine CMDs *) - (****************************) - - HMIMachineCMD.Abort.StatusDP.0:= 0; - HMIMachineState.Execute.ColorDP:= 1; - - IF( HMIMachineCMD.Abort.CMD = 1)THEN - - gMachine.IN.CMD.Abort:=1; - - END_IF - - HMIMachineCMD.Stop.StatusDP.0:= 0; - - IF( HMIMachineCMD.Stop.CMD = 1)THEN - - gMachine.IN.CMD.Stop:=1; - - END_IF - - HMIMachineCMD.Hold.StatusDP.0:= 0; - - IF( HMIMachineCMD.Hold.CMD = 1)THEN - - gMachine.IN.CMD.Hold:=1; - - END_IF - - HMIMachineCMD.Suspend.StatusDP.0:= 0; - - IF( HMIMachineCMD.Suspend.CMD = 1)THEN - - gMachine.IN.CMD.Suspend:=1; - - END_IF - - - MACH_ST_COMPLETING: - - (****************************) - (* Check for machine CMDs *) - (****************************) - - HMIMachineCMD.Abort.StatusDP.0:= 0; - HMIMachineState.Completing.ColorDP:= 1; - - IF( HMIMachineCMD.Abort.CMD = 1)THEN - - gMachine.IN.CMD.Abort:=1; - - END_IF - - HMIMachineCMD.Stop.StatusDP.0:= 0; - - IF( HMIMachineCMD.Stop.CMD = 1)THEN - - gMachine.IN.CMD.Stop:=1; - - END_IF - - - MACH_ST_COMPLETE: - - - (****************************) - (* Wait for machine CMDs *) - (****************************) - - HMIMachineCMD.Abort.StatusDP.0:= 0; - HMIMachineState.Complete.ColorDP:= 1; - - IF( HMIMachineCMD.Abort.CMD = 1)THEN - - gMachine.IN.CMD.Abort:=1; - - END_IF - - HMIMachineCMD.Stop.StatusDP.0:= 0; - - IF( HMIMachineCMD.Stop.CMD = 1)THEN - - gMachine.IN.CMD.Stop:=1; - - END_IF - - HMIMachineCMD.Reset.StatusDP.0:= 0; - - IF( HMIMachineCMD.Reset.CMD = 1)THEN - - gMachine.IN.CMD.Reset:=1; - - END_IF - - -(************************************************************) -(* HOLD states *) -(************************************************************) - - MACH_ST_HOLDING: - - (****************************) - (* Check for machine CMDs *) - (****************************) - - HMIMachineCMD.Abort.StatusDP.0:= 0; - HMIMachineState.Holding.ColorDP:= 1; - - IF( HMIMachineCMD.Abort.CMD = 1)THEN - - gMachine.IN.CMD.Abort:=1; - - END_IF - - HMIMachineCMD.Stop.StatusDP.0:= 0; - - IF( HMIMachineCMD.Stop.CMD = 1)THEN - - gMachine.IN.CMD.Stop:=1; - - END_IF - - - MACH_ST_HELD: - - - (****************************) - (* Wait for machine CMDs *) - (****************************) - - HMIMachineCMD.Abort.StatusDP.0:= 0; - HMIMachineState.Held.ColorDP:= 1; - - IF( HMIMachineCMD.Abort.CMD = 1)THEN - - gMachine.IN.CMD.Abort:=1; - - END_IF - - HMIMachineCMD.Stop.StatusDP.0:= 0; - - IF( HMIMachineCMD.Stop.CMD = 1)THEN - - gMachine.IN.CMD.Stop:=1; - - END_IF - - HMIMachineCMD.Unhold.StatusDP.0:= 0; - - IF( HMIMachineCMD.Unhold.CMD = 1)THEN - - gMachine.IN.CMD.Unhold:=1; - - END_IF - - - MACH_ST_UNHOLDING: - - (****************************) - (* Check for machine CMDs *) - (****************************) - - HMIMachineCMD.Abort.StatusDP.0:= 0; - HMIMachineState.UnHolding.ColorDP:= 1; - - IF( HMIMachineCMD.Abort.CMD = 1)THEN - - gMachine.IN.CMD.Abort:=1; - - END_IF - - HMIMachineCMD.Stop.StatusDP.0:= 0; - - IF( HMIMachineCMD.Stop.CMD = 1)THEN - - gMachine.IN.CMD.Stop:=1; - - END_IF - - -(************************************************************) -(* SUSPEND states *) -(************************************************************) - - MACH_ST_SUSPENDING: - - (****************************) - (* Check for machine CMDs *) - (****************************) - - HMIMachineCMD.Abort.StatusDP.0:= 0; - HMIMachineState.Suspending.ColorDP:= 1; - - IF( HMIMachineCMD.Abort.CMD = 1)THEN - - gMachine.IN.CMD.Abort:=1; - - END_IF - - HMIMachineCMD.Stop.StatusDP.0:= 0; - - IF( HMIMachineCMD.Stop.CMD = 1)THEN - - gMachine.IN.CMD.Stop:=1; - - END_IF - - - MACH_ST_SUSPENDED: - - - (****************************) - (* Wait for machine CMDs *) - (****************************) - - HMIMachineCMD.Abort.StatusDP.0:= 0; - HMIMachineState.Suspended.ColorDP:= 1; - - IF( HMIMachineCMD.Abort.CMD = 1)THEN - - gMachine.IN.CMD.Abort:=1; - - END_IF - - HMIMachineCMD.Stop.StatusDP.0:= 0; - - IF( HMIMachineCMD.Stop.CMD = 1)THEN - - gMachine.IN.CMD.Stop:=1; - - END_IF - - HMIMachineCMD.Unsuspend.StatusDP.0:= 0; - - IF( HMIMachineCMD.Unsuspend.CMD = 1)THEN - - gMachine.IN.CMD.Unsuspend:=1; - - END_IF - - - MACH_ST_UNSUSPENDING: - - (****************************) - (* Check for machine CMDs *) - (****************************) - - HMIMachineCMD.Abort.StatusDP.0:= 0; - HMIMachineState.UnSuspending.ColorDP:= 1; - - IF( HMIMachineCMD.Abort.CMD = 1)THEN - - gMachine.IN.CMD.Abort:=1; - - END_IF - - HMIMachineCMD.Stop.StatusDP.0:= 0; - - IF( HMIMachineCMD.Stop.CMD = 1)THEN - - gMachine.IN.CMD.Stop:=1; - - END_IF - - -(************************************************************) -(* ABORT states *) -(************************************************************) - - MACH_ST_ABORTING: - - (****************************) - (* Check for machine CMDs *) - (****************************) - HMIMachineState.Aborting.ColorDP:= 1; - (* No CMDs possible in MACH_ST_ABORTING *) - - - MACH_ST_ABORTED: - - - (****************************) - (* Wait for Machine CMDs *) - (****************************) - - HMIMachineCMD.Clear.StatusDP.0:= 0; - HMIMachineState.Aborted.ColorDP:= 1; - - IF( HMIMachineCMD.Clear.CMD = 1)THEN - - gMachine.IN.CMD.Clear:=1; - - END_IF - - - MACH_ST_CLEARING: - - (****************************) - (* Check for machine CMDs *) - (****************************) - - HMIMachineCMD.Abort.StatusDP.0:= 0; - HMIMachineState.Clearing.ColorDP:= 1; - - IF( HMIMachineCMD.Abort.CMD = 1)THEN - - gMachine.IN.CMD.Abort:=1; - - END_IF - - -END_CASE - - -HMIMachineCMD.Abort.CMD:=0; -HMIMachineCMD.Clear.CMD:=0; -HMIMachineCMD.Hold.CMD:=0; -HMIMachineCMD.Reset.CMD:=0; -HMIMachineCMD.Start.CMD:=0; -HMIMachineCMD.Stop.CMD:=0; -HMIMachineCMD.Suspend.CMD:=0; -HMIMachineCMD.Unhold.CMD:=0; -HMIMachineCMD.Unsuspend.CMD:=0; -END_PROGRAM diff --git a/example/AsProject/Logical/MachineControl/MachineHMI/MachineProgInit.st b/example/AsProject/Logical/MachineControl/MachineHMI/MachineProgInit.st deleted file mode 100644 index de6da36..0000000 --- a/example/AsProject/Logical/MachineControl/MachineHMI/MachineProgInit.st +++ /dev/null @@ -1,18 +0,0 @@ -(******************************************************************** - * COPYRIGHT -- Automation Resources Group - ******************************************************************** - * Program: MachineProg - * File: MachineProgInit.st - * Author: David Blackburn - * Created: November 10, 2011 - ******************************************************************** - * Implementation of program MachineProg - ********************************************************************) - - -PROGRAM _INIT - - //Hide Main page state model - HMIMachineState.MachineStateLayer.StatusDP:= 1; - -END_PROGRAM diff --git a/example/AsProject/Logical/MachineControl/MachineProg/IEC.prg b/example/AsProject/Logical/MachineControl/MachineProg/IEC.prg deleted file mode 100644 index 447ad68..0000000 --- a/example/AsProject/Logical/MachineControl/MachineProg/IEC.prg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - MachineProgCyclic.st - MachineProg.typ - MachineProg.var - - \ No newline at end of file diff --git a/example/AsProject/Logical/MachineControl/MachineProg/MachineProg.typ b/example/AsProject/Logical/MachineControl/MachineProg/MachineProg.typ deleted file mode 100644 index b92f88b..0000000 --- a/example/AsProject/Logical/MachineControl/MachineProg/MachineProg.typ +++ /dev/null @@ -1,14 +0,0 @@ -(******************************************************************** - * COPYRIGHT -- Automation Resources Group - ******************************************************************** - * Program: MachineProg - * File: MachineProg.typ - * Author: David Blackburn - * Created: November 10, 2011 - ******************************************************************** - * Local data types of program MachineProg - ********************************************************************) - -TYPE - -END_TYPE diff --git a/example/AsProject/Logical/MachineControl/MachineProg/MachineProg.var b/example/AsProject/Logical/MachineControl/MachineProg/MachineProg.var deleted file mode 100644 index c198ebd..0000000 --- a/example/AsProject/Logical/MachineControl/MachineProg/MachineProg.var +++ /dev/null @@ -1,19 +0,0 @@ -(******************************************************************** - * COPYRIGHT -- Automation Resources Group - ******************************************************************** - * Program: MachineProg - * File: MachineProg.var - * Author: David Blackburn - * Created: November 10, 2011 - ******************************************************************** - * Local variables of program MachineProg - ********************************************************************) -VAR - StatusModule : Module_Interface_typ; - Module : REFERENCE TO Module_Interface_typ; - TON_0 : TON; - StateString : STRING[80]; -END_VAR -VAR RETAIN - ByPassAll : BOOL := 0; -END_VAR diff --git a/example/AsProject/Logical/MachineControl/MachineProg/MachineProgCyclic.st b/example/AsProject/Logical/MachineControl/MachineProg/MachineProgCyclic.st deleted file mode 100644 index 9e1ef8c..0000000 --- a/example/AsProject/Logical/MachineControl/MachineProg/MachineProgCyclic.st +++ /dev/null @@ -1,111 +0,0 @@ -(******************************************************************** - * COPYRIGHT -- Automation Resources Group - ******************************************************************** - * Program: MachineProg - * File: MachineProgCyclic.st - * Author: David Blackburn - * Created: November 10, 2011 - ******************************************************************** - * Implementation of program MachineProg - ********************************************************************) - - -(********************************************************************) -(* *) -(* This program provides a framework for top level machine control. *) -(* This program should accept top level commands (Start, *) -(* Stop, etc.) and interact with lower level control objects, *) -(* issuing commands and checking status information. *) -(* *) -(* The state machine and commands are PackML compliant. *) -(* *) -(********************************************************************) - -PROGRAM _INIT - - -END_PROGRAM - -PROGRAM _CYCLIC - - - //Piper controls the main machine state - Piper_fn_Cyclic( gMachine ); - - - - //Handle anything that needs to happen at the machine level for a given state - CASE gMachine.OUT.State OF - - MACH_ST_BOOTING: - StateString:= 'Booting'; - TON_0.IN:= 1; - - MACH_ST_BOOTED: - StateString:= 'Booted'; - IF TON_0.IN THEN - TON_0.IN:= 0; - IF BootTime = 0 THEN - BootTime:= TON_0.ET; - END_IF - BootTime:= (TON_0.ET+(BootTime*9))/10; - END_IF - MACH_ST_NOT_READY :StateString:= 'MACH_ST_NOT_READY'; - MACH_ST_ERROR :StateString:= 'MACH_ST_ERROR ; '; - MACH_ST_CLEARING :StateString:= 'MACH_ST_CLEARING '; - MACH_ST_STOPPED :StateString:= 'MACH_ST_STOPPED '; - MACH_ST_STARTING :StateString:= 'MACH_ST_STARTING '; - MACH_ST_IDLE :StateString:= 'MACH_ST_IDLE '; - MACH_ST_SUSPENDED :StateString:= 'MACH_ST_SUSPENDED'; - MACH_ST_EXECUTE :StateString:= 'MACH_ST_EXECUTE '; - MACH_ST_STOPPING :StateString:= 'MACH_ST_STOPPING '; - MACH_ST_ABORTING :StateString:= 'MACH_ST_ABORTING '; - MACH_ST_ABORTED :StateString:= 'MACH_ST_ABORTED '; - MACH_ST_HOLDING :StateString:= 'MACH_ST_HOLDING '; - MACH_ST_HELD :StateString:= 'MACH_ST_HELD '; - MACH_ST_UNHOLDING :StateString:= 'MACH_ST_UNHOLDING'; - MACH_ST_SUSPENDING:StateString:= 'MACH_ST_SUSPENDING'; - MACH_ST_UNSUSPENDING:StateString:= 'MACH_ST_UNSUSPENDING'; - MACH_ST_RESETTING :StateString:= 'MACH_ST_RESETTING'; - MACH_ST_COMPLETING:StateString:= 'MACH_ST_COMPLETING'; - MACH_ST_COMPLETE :StateString:= 'MACH_ST_COMPLETE '; - MACH_ST_BYPASSED :StateString:= 'MACH_ST_BYPASSED '; - MACH_ST_ :StateString:= 'MACH_ST_ '; - END_CASE - - CASE gMachine.OUT.State OF - MACH_ST_STARTING, - MACH_ST_EXECUTE, - MACH_ST_HELD, - MACH_ST_UNHOLDING, - MACH_ST_SUSPENDING, - MACH_ST_UNSUSPENDING, - MACH_ST_HOLDING, - MACH_ST_COMPLETING, - MACH_ST_COMPLETE: - //Mode change not allowed - gRequestedMode:=gActiveMode; - ELSE - gActiveMode:=gRequestedMode; - END_CASE - - TON_0.PT:=T#1d; - TON_0(); - - - - //**************************************************************************// - //Display the first module the Piper is waiting on // - //**************************************************************************// - IF gMachine.OUT.BusyModule = 0 THEN - StatusModule.ModuleName:= 'Ready'; - Module ACCESS ADR(StatusModule); - ELSE - Module ACCESS gMachine.OUT.BusyModule; - StatusModule:= Module; - END_IF; - - - - -END_PROGRAM diff --git a/example/AsProject/Logical/MachineControl/Package.pkg b/example/AsProject/Logical/MachineControl/Package.pkg deleted file mode 100644 index 2fb4d22..0000000 --- a/example/AsProject/Logical/MachineControl/Package.pkg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - cPiperModuleTemplate - MachineControl.typ - MachineControl.var - MachineHMI - MachineProg - PiperModuleTemplate - - \ No newline at end of file diff --git a/example/AsProject/Logical/MachineControl/PiperModuleTemplate/Cyclic.st b/example/AsProject/Logical/MachineControl/PiperModuleTemplate/Cyclic.st deleted file mode 100644 index 4a8adcc..0000000 --- a/example/AsProject/Logical/MachineControl/PiperModuleTemplate/Cyclic.st +++ /dev/null @@ -1,19 +0,0 @@ -(******************************************************************** - * COPYRIGHT -- - ******************************************************************** - * Program: PiperModuleTemplate - * File: PiperModuleTemplateCyclic.st - * Author: Josh - * Created: October 03, 2013 - ******************************************************************** - * Implementation of program PiperModuleTemplate - ********************************************************************) - -PROGRAM _CYCLIC - - // Call PiperModuleInterface to interface with the rest of the machine - PiperModuleInterface; - - //Put your code here - -END_PROGRAM diff --git a/example/AsProject/Logical/MachineControl/PiperModuleTemplate/IEC.prg b/example/AsProject/Logical/MachineControl/PiperModuleTemplate/IEC.prg deleted file mode 100644 index bdcedc5..0000000 --- a/example/AsProject/Logical/MachineControl/PiperModuleTemplate/IEC.prg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - Cyclic.st - PiperModule.var - PiperInterface.st - - \ No newline at end of file diff --git a/example/AsProject/Logical/MachineControl/PiperModuleTemplate/PiperInterface.st b/example/AsProject/Logical/MachineControl/PiperModuleTemplate/PiperInterface.st deleted file mode 100644 index 1e33a76..0000000 --- a/example/AsProject/Logical/MachineControl/PiperModuleTemplate/PiperInterface.st +++ /dev/null @@ -1,50 +0,0 @@ -(******************************************************************** - * COPYRIGHT -- - ******************************************************************** - * Program: MachineProg - * File: PiperModuleInterface.st - * Author: Josh - * Created: October 03, 2013 - ******************************************************************** - * Implementation of program MachineProg - ********************************************************************) - -ACTION PiperModuleInterface: - - //Give this module a name so it is easier to debug - ModuleInterface.ModuleName:= 'Name'; - - //Add a module to the Piper - Module.ModuleInterface:= ADR(ModuleInterface); - Module.Piper:= ADR(gMachine); - Module(); - - // Handle any machine states that this module needs to respond to - CASE ModuleInterface.PiperState OF -// MACH_ST_BOOTING: -// MACH_ST_CLEARING: -// MACH_ST_STOPPED: -// MACH_ST_STARTING: -// MACH_ST_IDLE: -// MACH_ST_SUSPENDED: -// MACH_ST_EXECUTE: -// MACH_ST_STOPPING: -// MACH_ST_ABORTING: -// MACH_ST_ABORTED: -// MACH_ST_HOLDING: -// MACH_ST_HELD: -// MACH_ST_UNHOLDING: -// MACH_ST_SUSPENDING: -// MACH_ST_UNSUSPENDING: -// MACH_ST_RESETTING: -// MACH_ST_COMPLETING: -// MACH_ST_COMPLETE: - - MACH_ST_BYPASSED: - - ELSE - ModuleInterface.ModuleResponse:= ModuleInterface.PiperState; - - END_CASE - -END_ACTION \ No newline at end of file diff --git a/example/AsProject/Logical/MachineControl/PiperModuleTemplate/PiperModule.var b/example/AsProject/Logical/MachineControl/PiperModuleTemplate/PiperModule.var deleted file mode 100644 index aaa4522..0000000 --- a/example/AsProject/Logical/MachineControl/PiperModuleTemplate/PiperModule.var +++ /dev/null @@ -1,14 +0,0 @@ -(******************************************************************** - * COPYRIGHT -- - ******************************************************************** - * Program: PiperModuleTemplate - * File: PiperModuleTemplate.var - * Author: Josh - * Created: October 03, 2013 - ******************************************************************** - * Local variables of program PiperModuleTemplate - ********************************************************************) -VAR - ModuleInterface : Module_Interface_typ; - Module : Piper_Module_Fub; -END_VAR diff --git a/example/AsProject/Logical/MachineControl/cPiperModuleTemplate/ANSIC.prg b/example/AsProject/Logical/MachineControl/cPiperModuleTemplate/ANSIC.prg deleted file mode 100644 index 09d5848..0000000 --- a/example/AsProject/Logical/MachineControl/cPiperModuleTemplate/ANSIC.prg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - Cyclic.c - PiperModule.var - PiperInterface.c - - \ No newline at end of file diff --git a/example/AsProject/Logical/MachineControl/cPiperModuleTemplate/Cyclic.c b/example/AsProject/Logical/MachineControl/cPiperModuleTemplate/Cyclic.c deleted file mode 100644 index 9a909d6..0000000 --- a/example/AsProject/Logical/MachineControl/cPiperModuleTemplate/Cyclic.c +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************** - * COPYRIGHT -- - ******************************************************************** - * Program: cPiperModuleTemplate - * File: cPiperModuleTemplateCyclic.c - * Author: dfblackburn - * Created: April 06, 2016 - ******************************************************************** - * Implementation of program cPiperModuleTemplate - ********************************************************************/ - -#include - -#ifdef _DEFAULT_INCLUDES - #include -#endif - -// Function prototype for piper interface -void PiperModuleInterface(); - -void _CYCLIC ProgramCyclic(void) -{ - - // Call PiperModuleInterface to interface with the rest of the machine - PiperModuleInterface(); - - //Put your code here - -} diff --git a/example/AsProject/Logical/MachineControl/cPiperModuleTemplate/PiperInterface.c b/example/AsProject/Logical/MachineControl/cPiperModuleTemplate/PiperInterface.c deleted file mode 100644 index 777253f..0000000 --- a/example/AsProject/Logical/MachineControl/cPiperModuleTemplate/PiperInterface.c +++ /dev/null @@ -1,55 +0,0 @@ -/******************************************************************** - * COPYRIGHT -- - ******************************************************************** - * Program: ServoProg - * File: PiperModuleInterface.c - * Author: dfblackburn - * Created: April 01, 2016 - *******************************************************************/ - -#include -#ifdef _DEFAULT_INCLUDES -#include -#endif - -#include - -void PiperModuleInterface() { - - // Give this module a name so it is easier to debug - strcpy(ModuleInterface.ModuleName, "Name"); - - // Add a module to the Piper - Module.ModuleInterface = &ModuleInterface; - Module.Piper = &gMachine; - Piper_Module_Fub(&Module); - - // Handle any machine states that this module needs to respond to - switch (ModuleInterface.PiperState) { - - //case MACH_ST_BOOTING: - //case MACH_ST_STOPPED: - //case MACH_ST_RESETTING: - //case MACH_ST_IDLE: - //case MACH_ST_STARTING: - //case MACH_ST_EXECUTE: - //case MACH_ST_COMPLETING: - //case MACH_ST_COMPLETE: - //case MACH_ST_HOLDING: - //case MACH_ST_HELD: - //case MACH_ST_UNHOLDING: - //case MACH_ST_SUSPENDING: - //case MACH_ST_SUSPENDED: - //case MACH_ST_UNSUSPENDING: - //case MACH_ST_STOPPING: - //case MACH_ST_ABORTING: - //case MACH_ST_ABORTED: - //case MACH_ST_CLEARING: - - case MACH_ST_BYPASSED: break; - - default: ModuleInterface.ModuleResponse = ModuleInterface.PiperState; - - } // switch(PiperState) - -} // PiperModuleInterface() diff --git a/example/AsProject/Logical/MachineControl/cPiperModuleTemplate/PiperModule.var b/example/AsProject/Logical/MachineControl/cPiperModuleTemplate/PiperModule.var deleted file mode 100644 index 5a91cff..0000000 --- a/example/AsProject/Logical/MachineControl/cPiperModuleTemplate/PiperModule.var +++ /dev/null @@ -1,14 +0,0 @@ -(******************************************************************** - * COPYRIGHT -- - ******************************************************************** - * Program: cPiperModuleTemplate - * File: cPiperModuleTemplate.var - * Author: dfblackburn - * Created: April 06, 2016 - ******************************************************************** - * Local variables of program cPiperModuleTemplate - ********************************************************************) -VAR - ModuleInterface : Module_Interface_typ; - Module : Piper_Module_Fub; -END_VAR diff --git a/example/AsProject/Logical/Package.pkg b/example/AsProject/Logical/Package.pkg index e9b4eed..03aa539 100644 --- a/example/AsProject/Logical/Package.pkg +++ b/example/AsProject/Logical/Package.pkg @@ -1,12 +1,9 @@  - + Global.typ Global.var Libraries - MachineControl - Process - ..\..\src\Ar\Lux\Package.pkg \ No newline at end of file diff --git a/example/AsProject/Logical/Process/Package.pkg b/example/AsProject/Logical/Process/Package.pkg deleted file mode 100644 index 3e72dfd..0000000 --- a/example/AsProject/Logical/Process/Package.pkg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - counter - - \ No newline at end of file diff --git a/example/AsProject/Logical/Process/counter/IEC.prg b/example/AsProject/Logical/Process/counter/IEC.prg deleted file mode 100644 index 531dcb9..0000000 --- a/example/AsProject/Logical/Process/counter/IEC.prg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - Main.st - Types.typ - Variables.var - - \ No newline at end of file diff --git a/example/AsProject/Logical/Process/counter/Main.st b/example/AsProject/Logical/Process/counter/Main.st deleted file mode 100644 index ed6c83f..0000000 --- a/example/AsProject/Logical/Process/counter/Main.st +++ /dev/null @@ -1,23 +0,0 @@ - -PROGRAM _INIT - (* Insert code here *) - -END_PROGRAM - -PROGRAM _CYCLIC - - IF (NOT pause) THEN - counter := counter + 1; - END_IF - - IF (reset) THEN - counter := 0; - END_IF - -END_PROGRAM - -PROGRAM _EXIT - (* Insert code here *) - -END_PROGRAM - diff --git a/example/AsProject/Logical/Process/counter/Types.typ b/example/AsProject/Logical/Process/counter/Types.typ deleted file mode 100644 index ed99443..0000000 --- a/example/AsProject/Logical/Process/counter/Types.typ +++ /dev/null @@ -1,4 +0,0 @@ - -TYPE - -END_TYPE diff --git a/example/AsProject/Logical/Process/counter/Variables.var b/example/AsProject/Logical/Process/counter/Variables.var deleted file mode 100644 index e0743be..0000000 --- a/example/AsProject/Logical/Process/counter/Variables.var +++ /dev/null @@ -1,5 +0,0 @@ -VAR - pause : BOOL; - counter : UDINT; - reset : BOOL; -END_VAR diff --git a/example/AsProject/Physical/ARM/Hardware.hw b/example/AsProject/Physical/ARM/Hardware.hw index 9d6f12b..a818f9a 100644 --- a/example/AsProject/Physical/ARM/Hardware.hw +++ b/example/AsProject/Physical/ARM/Hardware.hw @@ -1,27 +1,22 @@  - + - - + + - - - - - - + + - - - - - - - + + + + + + @@ -32,12 +27,11 @@ - - + diff --git a/example/AsProject/Physical/ARM/Hardware.hwl b/example/AsProject/Physical/ARM/Hardware.hwl index 94afe28..cb75ea3 100644 --- a/example/AsProject/Physical/ARM/Hardware.hwl +++ b/example/AsProject/Physical/ARM/Hardware.hwl @@ -2,7 +2,7 @@ - + diff --git a/example/AsProject/Physical/ARM/Hardware.jpg b/example/AsProject/Physical/ARM/Hardware.jpg index 847a6c0..5f124a3 100644 Binary files a/example/AsProject/Physical/ARM/Hardware.jpg and b/example/AsProject/Physical/ARM/Hardware.jpg differ diff --git a/example/AsProject/Physical/ARM/X20CP0484/AccessAndSecurity/ManagedCertificateStores/Package.pkg b/example/AsProject/Physical/ARM/X20CP0484/AccessAndSecurity/ManagedCertificateStores/Package.pkg new file mode 100644 index 0000000..3f3fdb3 --- /dev/null +++ b/example/AsProject/Physical/ARM/X20CP0484/AccessAndSecurity/ManagedCertificateStores/Package.pkg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/example/AsProject/Physical/ARM/X20CP0484/AccessAndSecurity/Package.pkg b/example/AsProject/Physical/ARM/X20CP0484/AccessAndSecurity/Package.pkg index 9952a7b..afc6684 100644 --- a/example/AsProject/Physical/ARM/X20CP0484/AccessAndSecurity/Package.pkg +++ b/example/AsProject/Physical/ARM/X20CP0484/AccessAndSecurity/Package.pkg @@ -4,6 +4,7 @@ UserRoleSystem CertificateStore + ManagedCertificateStores TransportLayerSecurity Firewall diff --git a/example/AsProject/Physical/ARM/X20CP0484/AccessAndSecurity/UserRoleSystem/BRRole.brrole b/example/AsProject/Physical/ARM/X20CP0484/AccessAndSecurity/UserRoleSystem/BRRole.brrole new file mode 100644 index 0000000..7b4e1f3 --- /dev/null +++ b/example/AsProject/Physical/ARM/X20CP0484/AccessAndSecurity/UserRoleSystem/BRRole.brrole @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/example/AsProject/Physical/ARM/X20CP0484/AccessAndSecurity/UserRoleSystem/Package.pkg b/example/AsProject/Physical/ARM/X20CP0484/AccessAndSecurity/UserRoleSystem/Package.pkg index 0e3f9b3..1571099 100644 --- a/example/AsProject/Physical/ARM/X20CP0484/AccessAndSecurity/UserRoleSystem/Package.pkg +++ b/example/AsProject/Physical/ARM/X20CP0484/AccessAndSecurity/UserRoleSystem/Package.pkg @@ -2,7 +2,6 @@ - Role.role - User.user + BRRole.brrole \ No newline at end of file diff --git a/example/AsProject/Physical/ARM/X20CP0484/AccessAndSecurity/UserRoleSystem/Role.role b/example/AsProject/Physical/ARM/X20CP0484/AccessAndSecurity/UserRoleSystem/Role.role deleted file mode 100644 index e6246d6..0000000 --- a/example/AsProject/Physical/ARM/X20CP0484/AccessAndSecurity/UserRoleSystem/Role.role +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/example/AsProject/Physical/ARM/X20CP0484/AccessAndSecurity/UserRoleSystem/User.user b/example/AsProject/Physical/ARM/X20CP0484/AccessAndSecurity/UserRoleSystem/User.user deleted file mode 100644 index 0aeb82e..0000000 --- a/example/AsProject/Physical/ARM/X20CP0484/AccessAndSecurity/UserRoleSystem/User.user +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/example/AsProject/Physical/ARM/X20CP0484/Connectivity/OpcUaCs/Package.pkg b/example/AsProject/Physical/ARM/X20CP0484/Connectivity/OpcUaCs/Package.pkg new file mode 100644 index 0000000..1d9efe8 --- /dev/null +++ b/example/AsProject/Physical/ARM/X20CP0484/Connectivity/OpcUaCs/Package.pkg @@ -0,0 +1,8 @@ + + + + + UaCsConfig.uacfg + UaDvConfig.uadcfg + + \ No newline at end of file diff --git a/example/AsProject/Physical/ARM/X20CP0484/Connectivity/OpcUaCs/UaCsConfig.uacfg b/example/AsProject/Physical/ARM/X20CP0484/Connectivity/OpcUaCs/UaCsConfig.uacfg new file mode 100644 index 0000000..a70a9f3 --- /dev/null +++ b/example/AsProject/Physical/ARM/X20CP0484/Connectivity/OpcUaCs/UaCsConfig.uacfg @@ -0,0 +1,5 @@ + + + + + diff --git a/example/AsProject/Physical/ARM/X20CP0484/Connectivity/OpcUaCs/UaDvConfig.uadcfg b/example/AsProject/Physical/ARM/X20CP0484/Connectivity/OpcUaCs/UaDvConfig.uadcfg new file mode 100644 index 0000000..6f48e39 --- /dev/null +++ b/example/AsProject/Physical/ARM/X20CP0484/Connectivity/OpcUaCs/UaDvConfig.uadcfg @@ -0,0 +1,5 @@ + + + + + diff --git a/example/AsProject/Physical/ARM/X20CP0484/Connectivity/OpcUaFx/Package.pkg b/example/AsProject/Physical/ARM/X20CP0484/Connectivity/OpcUaFx/Package.pkg new file mode 100644 index 0000000..7bd1f6a --- /dev/null +++ b/example/AsProject/Physical/ARM/X20CP0484/Connectivity/OpcUaFx/Package.pkg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/example/AsProject/Physical/ARM/X20CP0484/Connectivity/Package.pkg b/example/AsProject/Physical/ARM/X20CP0484/Connectivity/Package.pkg index 255a599..91f96f2 100644 --- a/example/AsProject/Physical/ARM/X20CP0484/Connectivity/Package.pkg +++ b/example/AsProject/Physical/ARM/X20CP0484/Connectivity/Package.pkg @@ -2,6 +2,7 @@ - OpcUA + OpcUaCs + OpcUaFx \ No newline at end of file diff --git a/example/AsProject/Physical/ARM/X20CP0484/Cpu.per b/example/AsProject/Physical/ARM/X20CP0484/Cpu.per index 11a7d02..b759501 100644 --- a/example/AsProject/Physical/ARM/X20CP0484/Cpu.per +++ b/example/AsProject/Physical/ARM/X20CP0484/Cpu.per @@ -1,4 +1,4 @@ VAR_CONFIG -END_VAR +END_VAR \ No newline at end of file diff --git a/example/AsProject/Physical/ARM/X20CP0484/Cpu.pkg b/example/AsProject/Physical/ARM/X20CP0484/Cpu.pkg index b0d72eb..06eabee 100644 --- a/example/AsProject/Physical/ARM/X20CP0484/Cpu.pkg +++ b/example/AsProject/Physical/ARM/X20CP0484/Cpu.pkg @@ -12,6 +12,7 @@ AccessAndSecurity mappControl mappMotion + mapp6D mappServices mappSafety mappView @@ -19,9 +20,9 @@ mappCockpit - - + + - + \ No newline at end of file diff --git a/example/AsProject/Physical/ARM/X20CP0484/Cpu.sw b/example/AsProject/Physical/ARM/X20CP0484/Cpu.sw index 63453e6..86b5bb3 100644 --- a/example/AsProject/Physical/ARM/X20CP0484/Cpu.sw +++ b/example/AsProject/Physical/ARM/X20CP0484/Cpu.sw @@ -1,29 +1,33 @@ - - - - - - + + + - - - + - - - - + + + + + + + + + + + + + + - - + @@ -32,39 +36,30 @@ - - + - + + - - - - - - - - - + - - \ No newline at end of file + diff --git a/example/AsProject/Physical/ARM/X20CP0484/IoMap.iom b/example/AsProject/Physical/ARM/X20CP0484/IoMap.iom index 11a7d02..b759501 100644 --- a/example/AsProject/Physical/ARM/X20CP0484/IoMap.iom +++ b/example/AsProject/Physical/ARM/X20CP0484/IoMap.iom @@ -1,4 +1,4 @@ VAR_CONFIG -END_VAR +END_VAR \ No newline at end of file diff --git a/example/AsProject/Physical/ARM/X20CP0484/PvMap.vvm b/example/AsProject/Physical/ARM/X20CP0484/PvMap.vvm index 11a7d02..b759501 100644 --- a/example/AsProject/Physical/ARM/X20CP0484/PvMap.vvm +++ b/example/AsProject/Physical/ARM/X20CP0484/PvMap.vvm @@ -1,4 +1,4 @@ VAR_CONFIG -END_VAR +END_VAR \ No newline at end of file diff --git a/example/AsProject/Physical/ARM/X20CP0484/Connectivity/OpcUA/Package.pkg b/example/AsProject/Physical/ARM/X20CP0484/mapp6D/Package.pkg similarity index 51% rename from example/AsProject/Physical/ARM/X20CP0484/Connectivity/OpcUA/Package.pkg rename to example/AsProject/Physical/ARM/X20CP0484/mapp6D/Package.pkg index 6c3ca56..20dfef0 100644 --- a/example/AsProject/Physical/ARM/X20CP0484/Connectivity/OpcUA/Package.pkg +++ b/example/AsProject/Physical/ARM/X20CP0484/mapp6D/Package.pkg @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/CertificateStore/CertificateRevocationLists/Package.pkg b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/CertificateStore/CertificateRevocationLists/Package.pkg similarity index 100% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/CertificateStore/CertificateRevocationLists/Package.pkg rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/CertificateStore/CertificateRevocationLists/Package.pkg diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/CertificateStore/CertificateSigningRequests/Package.pkg b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/CertificateStore/CertificateSigningRequests/Package.pkg similarity index 100% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/CertificateStore/CertificateSigningRequests/Package.pkg rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/CertificateStore/CertificateSigningRequests/Package.pkg diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/CertificateStore/OwnCertificates/Certificates/Package.pkg b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/CertificateStore/OwnCertificates/Certificates/Package.pkg similarity index 100% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/CertificateStore/OwnCertificates/Certificates/Package.pkg rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/CertificateStore/OwnCertificates/Certificates/Package.pkg diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/CertificateStore/OwnCertificates/Package.pkg b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/CertificateStore/OwnCertificates/Package.pkg similarity index 100% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/CertificateStore/OwnCertificates/Package.pkg rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/CertificateStore/OwnCertificates/Package.pkg diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/CertificateStore/OwnCertificates/PrivateKeys/Package.pkg b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/CertificateStore/OwnCertificates/PrivateKeys/Package.pkg similarity index 100% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/CertificateStore/OwnCertificates/PrivateKeys/Package.pkg rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/CertificateStore/OwnCertificates/PrivateKeys/Package.pkg diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/CertificateStore/Package.pkg b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/CertificateStore/Package.pkg similarity index 100% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/CertificateStore/Package.pkg rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/CertificateStore/Package.pkg diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/CertificateStore/ThirdPartyCertificates/Package.pkg b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/CertificateStore/ThirdPartyCertificates/Package.pkg similarity index 100% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/CertificateStore/ThirdPartyCertificates/Package.pkg rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/CertificateStore/ThirdPartyCertificates/Package.pkg diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/CertificateStore/ThirdPartyCertificates/SoftwareCertificates/Package.pkg b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/CertificateStore/ThirdPartyCertificates/SoftwareCertificates/Package.pkg similarity index 100% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/CertificateStore/ThirdPartyCertificates/SoftwareCertificates/Package.pkg rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/CertificateStore/ThirdPartyCertificates/SoftwareCertificates/Package.pkg diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/Firewall/Package.pkg b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/Firewall/Package.pkg similarity index 100% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/Firewall/Package.pkg rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/Firewall/Package.pkg diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/Firewall/Rules.firewallRules b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/Firewall/Rules.firewallRules similarity index 100% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/Firewall/Rules.firewallRules rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/Firewall/Rules.firewallRules diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/Package.pkg b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/Package.pkg similarity index 100% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/Package.pkg rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/Package.pkg diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/TransportLayerSecurity/Package.pkg b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/TransportLayerSecurity/Package.pkg similarity index 100% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/TransportLayerSecurity/Package.pkg rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/TransportLayerSecurity/Package.pkg diff --git a/example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/UserRoleSystem/BRRole.brrole b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/UserRoleSystem/BRRole.brrole new file mode 100644 index 0000000..7b4e1f3 --- /dev/null +++ b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/UserRoleSystem/BRRole.brrole @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/UserRoleSystem/Package.pkg b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/UserRoleSystem/Package.pkg similarity index 73% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/UserRoleSystem/Package.pkg rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/UserRoleSystem/Package.pkg index 537314c..4b1f11c 100644 --- a/example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/UserRoleSystem/Package.pkg +++ b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/UserRoleSystem/Package.pkg @@ -1,8 +1,9 @@  - + Role.role User.user + BRRole.brrole \ No newline at end of file diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/UserRoleSystem/Role.role b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/UserRoleSystem/Role.role similarity index 100% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/UserRoleSystem/Role.role rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/UserRoleSystem/Role.role diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/UserRoleSystem/User.user b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/UserRoleSystem/User.user similarity index 100% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/AccessAndSecurity/UserRoleSystem/User.user rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/AccessAndSecurity/UserRoleSystem/User.user diff --git a/example/AsProject/Physical/Intel/5APC4100_TGL1_000/Connectivity/OpcUaCs/Package.pkg b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/Connectivity/OpcUaCs/Package.pkg new file mode 100644 index 0000000..1d9efe8 --- /dev/null +++ b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/Connectivity/OpcUaCs/Package.pkg @@ -0,0 +1,8 @@ + + + + + UaCsConfig.uacfg + UaDvConfig.uadcfg + + \ No newline at end of file diff --git a/example/AsProject/Physical/Intel/5APC4100_TGL1_000/Connectivity/OpcUaCs/UaCsConfig.uacfg b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/Connectivity/OpcUaCs/UaCsConfig.uacfg new file mode 100644 index 0000000..a70a9f3 --- /dev/null +++ b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/Connectivity/OpcUaCs/UaCsConfig.uacfg @@ -0,0 +1,5 @@ + + + + + diff --git a/example/AsProject/Physical/Intel/5APC4100_TGL1_000/Connectivity/OpcUaCs/UaDvConfig.uadcfg b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/Connectivity/OpcUaCs/UaDvConfig.uadcfg new file mode 100644 index 0000000..6f48e39 --- /dev/null +++ b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/Connectivity/OpcUaCs/UaDvConfig.uadcfg @@ -0,0 +1,5 @@ + + + + + diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/Connectivity/Package.pkg b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/Connectivity/Package.pkg similarity index 67% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/Connectivity/Package.pkg rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/Connectivity/Package.pkg index 6f73576..ffb4e2c 100644 --- a/example/AsProject/Physical/Intel/5PC900_TS17_04/Connectivity/Package.pkg +++ b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/Connectivity/Package.pkg @@ -1,7 +1,7 @@  - + - OpcUA + OpcUaCs \ No newline at end of file diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/Cpu.per b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/Cpu.per similarity index 100% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/Cpu.per rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/Cpu.per diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/Cpu.pkg b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/Cpu.pkg similarity index 75% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/Cpu.pkg rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/Cpu.pkg index eec0fb9..f1c7cc1 100644 --- a/example/AsProject/Physical/Intel/5PC900_TS17_04/Cpu.pkg +++ b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/Cpu.pkg @@ -17,11 +17,10 @@ mappVision mappCockpit - - - + + + - - + \ No newline at end of file diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/Cpu.sw b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/Cpu.sw similarity index 71% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/Cpu.sw rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/Cpu.sw index b078404..94499d2 100644 --- a/example/AsProject/Physical/Intel/5PC900_TS17_04/Cpu.sw +++ b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/Cpu.sw @@ -1,21 +1,13 @@ - - - - - - + + + - - - + - - - - + @@ -32,11 +24,10 @@ - - + @@ -45,40 +36,30 @@ - - + - - + + + - - - - - - - - - + - - - \ No newline at end of file + diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/IoMap.iom b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/IoMap.iom similarity index 100% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/IoMap.iom rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/IoMap.iom diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/PvMap.vvm b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/PvMap.vvm similarity index 100% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/PvMap.vvm rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/PvMap.vvm diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/TextSystem/Package.pkg b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/TextSystem/Package.pkg similarity index 100% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/TextSystem/Package.pkg rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/TextSystem/Package.pkg diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/UnitSystem/Package.pkg b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/UnitSystem/Package.pkg similarity index 100% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/UnitSystem/Package.pkg rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/UnitSystem/Package.pkg diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/mappCockpit/Package.pkg b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/mappCockpit/Package.pkg similarity index 100% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/mappCockpit/Package.pkg rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/mappCockpit/Package.pkg diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/mappControl/Package.pkg b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/mappControl/Package.pkg similarity index 100% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/mappControl/Package.pkg rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/mappControl/Package.pkg diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/mappMotion/Package.pkg b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/mappMotion/Package.pkg similarity index 100% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/mappMotion/Package.pkg rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/mappMotion/Package.pkg diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/mappServices/Package.pkg b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/mappServices/Package.pkg similarity index 100% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/mappServices/Package.pkg rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/mappServices/Package.pkg diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/mappView/Package.pkg b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/mappView/Package.pkg similarity index 100% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/mappView/Package.pkg rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/mappView/Package.pkg diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/mappVision/Package.pkg b/example/AsProject/Physical/Intel/5APC4100_TGL1_000/mappVision/Package.pkg similarity index 100% rename from example/AsProject/Physical/Intel/5PC900_TS17_04/mappVision/Package.pkg rename to example/AsProject/Physical/Intel/5APC4100_TGL1_000/mappVision/Package.pkg diff --git a/example/AsProject/Physical/Intel/5PC900_TS17_04/Connectivity/OpcUA/Package.pkg b/example/AsProject/Physical/Intel/5PC900_TS17_04/Connectivity/OpcUA/Package.pkg deleted file mode 100644 index 444dadf..0000000 --- a/example/AsProject/Physical/Intel/5PC900_TS17_04/Connectivity/OpcUA/Package.pkg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/example/AsProject/Physical/Intel/Config.pkg b/example/AsProject/Physical/Intel/Config.pkg index 822c826..e467a81 100644 --- a/example/AsProject/Physical/Intel/Config.pkg +++ b/example/AsProject/Physical/Intel/Config.pkg @@ -1,10 +1,10 @@  - + Hardware.hw Hardware.hwl - 5PC900_TS17_04 + 5APC4100_TGL1_000 Hardware.jpg diff --git a/example/AsProject/Physical/Intel/Hardware.hw b/example/AsProject/Physical/Intel/Hardware.hw index a62bf19..fd2eaa4 100644 --- a/example/AsProject/Physical/Intel/Hardware.hw +++ b/example/AsProject/Physical/Intel/Hardware.hw @@ -1,15 +1,48 @@  - + - - + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -28,41 +61,19 @@ + + + + - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/example/AsProject/README.md b/example/AsProject/README.md new file mode 100644 index 0000000..51c6479 --- /dev/null +++ b/example/AsProject/README.md @@ -0,0 +1,15 @@ +# Info +Project is provided by Loupe +https://loupe.team +info@loupe.team +1-800-240-7042 + +# Description +StarterAsProject is a minimal starter Automation Studio project used to bootstrap new application from a known starting point. It is used by LPM when creating new projects. + +# Installation +To install the project using the Loupe Package Manager (LPM), in an empty directory run `lpm init`, and when prompted confirm with yes. Alternately, you can run `lpm install starterasproject`. For more information about LPM, see https://loupeteam.github.io/LoupeDocs/tools/lpm.html + +## Licensing + +This project is licensed under the [MIT License](LICENSE). \ No newline at end of file diff --git a/example/AsProject/package-lock.json b/example/AsProject/package-lock.json index 842026d..7ebae47 100644 --- a/example/AsProject/package-lock.json +++ b/example/AsProject/package-lock.json @@ -1,223 +1,64 @@ -{ - "name": "asproject", - "version": "1.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "asproject", - "version": "1.0.0", - "license": "ISC", - "dependencies": { - "@loupeteam/csvfilelib": "^1.2.2", - "@loupeteam/databuffer": "^0.1.1", - "@loupeteam/hammers": "^0.10.0", - "@loupeteam/persist": "^0.0.7", - "@loupeteam/piper": "^0.1.9", - "@loupeteam/vartools": "^0.11.3", - "@loupeteam/websocket": "^0.2.2" - } - }, - "node_modules/@loupeteam/csvfilelib": { - "version": "1.2.2", - "resolved": "https://npm.pkg.github.com/download/@loupeteam/csvfilelib/1.2.2/048f0eddaea148af7ba646067e207c0588617a15", - "integrity": "sha512-Vs8a/3Y0P8uJM4gI3gz7SbFJwJrM4RcJru4H21IPPPAye5lbEkGYf7eTpR1/rAVzvSRFjqB7hI7f79FaET/3KA==", - "license": "MIT", - "dependencies": { - "@loupeteam/fiowrap": ">=0.9.0 <=0.9.9", - "@loupeteam/hmitools": ">=0.11.3 <=0.11.9", - "@loupeteam/logthat": ">=0.5.0 <=0.5.9", - "@loupeteam/stringext": ">=0.14.1 <=0.14.9" - } - }, - "node_modules/@loupeteam/databuffer": { - "version": "0.1.1", - "resolved": "https://npm.pkg.github.com/download/@loupeteam/databuffer/0.1.1/8d40808bb2de89899da090259e12f2ea1ff818bb", - "integrity": "sha512-xn6HlzBXW0jRgXeRJx66rT154OPomvfGhsFtLsQqV4oPpWURZ4WPoM1uOf7tgmVzfZk4CSpsh16whowVBpJDQg==", - "license": "MIT" - }, - "node_modules/@loupeteam/fiowrap": { - "version": "0.9.1", - "resolved": "https://npm.pkg.github.com/download/@loupeteam/fiowrap/0.9.1/f299ddc5721948a99321c6391fd3f4c147987d31", - "integrity": "sha512-1u4+YdCr41Xa1OOauiyav8Gq71Q1U5caPNImYwhVW01Tx7LG8a+zG1sKLXeLfbKxAfL/aHTPqEJSCNtB94Rq+w==", - "license": "MIT", - "dependencies": { - "@loupeteam/stringext": ">=0.11.0" - } - }, - "node_modules/@loupeteam/hammers": { - "version": "0.10.0", - "resolved": "https://npm.pkg.github.com/download/@loupeteam/hammers/0.10.0/3d5f92c83690b9a582e9253665fdd15f756b3245", - "integrity": "sha512-Y9s1odM5BW7xnDJiFZ6tB8moIp8SmRtrmi0DXgT/cbio/U+SY06QDp9ULplXRfQuSNc7rRJt8SnRoJPGmn94WA==", - "license": "MIT" - }, - "node_modules/@loupeteam/hmitools": { - "version": "0.11.4", - "resolved": "https://npm.pkg.github.com/download/@loupeteam/hmitools/0.11.4/6c24c55ef0f034c5f85428706b0dc4b26af26252", - "integrity": "sha512-NnAQSf/EP5cpDj7rBRFoCk7sTbPtPtVkXmRPM/LU3Ca/H5fk1CCmA8MFBBbA25UGN+9LOgtX6pmW0MFVq/alDA==", - "license": "MIT", - "dependencies": { - "@loupeteam/logthat": "*", - "@loupeteam/ringbuflib": ">=0.2.0", - "@loupeteam/stringext": ">=0.4.0" - } - }, - "node_modules/@loupeteam/logthat": { - "version": "0.5.1", - "resolved": "https://npm.pkg.github.com/download/@loupeteam/logthat/0.5.1/728712ec79fff3ca14613f7b900f501a920b2871", - "integrity": "sha512-DvZR0Q/dU+RVR9ASV4xPJY2XIUG6fuf3brlyjndRK1MxVzl+ksBHm0QZJufDlYW9yejnT3cLoE6X9R3a+Cm+vg==", - "license": "MIT", - "dependencies": { - "@loupeteam/stringext": ">=0.14.1" - } - }, - "node_modules/@loupeteam/persist": { - "version": "0.0.7", - "resolved": "https://npm.pkg.github.com/download/@loupeteam/persist/0.0.7/1024ef80ca6dd324ed87044feff23d38412b108b", - "integrity": "sha512-fEDGXIRWcxYsXdUjrNAmT9FXeixV2+DsBbozLthVJ0jzBBzgJssGwUTEjG0UPpCQf0nj6PbtBGsWTHBvEQA0tQ==", - "license": "MIT" - }, - "node_modules/@loupeteam/piper": { - "version": "0.1.9", - "resolved": "https://npm.pkg.github.com/download/@loupeteam/piper/0.1.9/c665eb90b122d0b726b81d9e6f8ef13d56e6b238", - "integrity": "sha512-99mrVw542pEtWuojbSGdJz3sVUDYr2AdM6/IcVYrXA2gMTwALXoO1/9uEdGPcxSOP7qLZTmI/fM2mchTvWv/Pw==", - "license": "MIT", - "dependencies": { - "@loupeteam/logthat": ">=0.5.0 <=0.5.9", - "@loupeteam/stringext": ">=0.14.0 <=0.14.9" - } - }, - "node_modules/@loupeteam/ringbuflib": { - "version": "0.2.4", - "resolved": "https://npm.pkg.github.com/download/@loupeteam/ringbuflib/0.2.4/f42f953e137103bbed3d088c97bbd3bd0dcb064e", - "integrity": "sha512-UWnY3vSgOIIyNoDQMpo0eAuw9P0dAt35O0UdNB6tNXIeLr8ytzI3vbHAjiaSUYoecLkNl4lbhyVHNGXoivlz8Q==", - "license": "MIT" - }, - "node_modules/@loupeteam/stringext": { - "version": "0.14.4", - "resolved": "https://npm.pkg.github.com/download/@loupeteam/stringext/0.14.4/9d7c965dd094afeaf89b9f48c9b882ce798890dc", - "integrity": "sha512-xYNj2b+SUxIgM5ZvB+BgDL+cqWkaKHAN65GbyNCd1B/SExiqUDO/VMa77/Sk2XlIZdzXj5mXxjwU/zjY97WsMg==", - "license": "MIT" - }, - "node_modules/@loupeteam/tcpcomm": { - "version": "0.10.0", - "resolved": "https://npm.pkg.github.com/download/@loupeteam/tcpcomm/0.10.0/38e4ab8cba58b7463701059bde22d905dddd19e4", - "integrity": "sha512-jhao/10Zyv8nSNpdd5AoghApqj7b8GP8sXjfpS0CL6xXMFOoUR9cUfjxAFd85hce0GaEnIN7h7HN1e3FFiCoJQ==", - "license": "MIT" - }, - "node_modules/@loupeteam/vartools": { - "version": "0.11.3", - "resolved": "https://npm.pkg.github.com/download/@loupeteam/vartools/0.11.3/edf84e21e928d1bef4bafea2ccbf31d560790b92", - "integrity": "sha512-ZKSvCPCGDXw/Qki/vo7I9SZJqwXpUF4HjypwpDwRZCDgiY0gt5aNsFj1Rm6uWqgSn4FJ+njhWXfF9QHyR98Rsg==", - "license": "MIT", - "dependencies": { - "@loupeteam/stringext": ">=0.14.0 <=0.14.9" - } - }, - "node_modules/@loupeteam/websocket": { - "version": "0.2.2", - "resolved": "https://npm.pkg.github.com/download/@loupeteam/websocket/0.2.2/2d60baf3324fd4234fb0774056d5a68d91b823e8", - "integrity": "sha512-/D0V6tTZsCzGf/vWCaEpEPbSQMSEA2y3KWQC2MCypmIyMN/MsP3ttepiYElFIFHxQgv3eiIE5fSiT+71DAv3qQ==", - "license": "MIT", - "dependencies": { - "@loupeteam/stringext": ">=0.14.0 <=0.15.9", - "@loupeteam/tcpcomm": ">=0.10.0 <=0.10.9" - } - } - }, - "dependencies": { - "@loupeteam/csvfilelib": { - "version": "1.2.2", - "resolved": "https://npm.pkg.github.com/download/@loupeteam/csvfilelib/1.2.2/048f0eddaea148af7ba646067e207c0588617a15", - "integrity": "sha512-Vs8a/3Y0P8uJM4gI3gz7SbFJwJrM4RcJru4H21IPPPAye5lbEkGYf7eTpR1/rAVzvSRFjqB7hI7f79FaET/3KA==", - "requires": { - "@loupeteam/fiowrap": ">=0.9.0 <=0.9.9", - "@loupeteam/hmitools": ">=0.11.3 <=0.11.9", - "@loupeteam/logthat": ">=0.5.0 <=0.5.9", - "@loupeteam/stringext": ">=0.14.1 <=0.14.9" - } - }, - "@loupeteam/databuffer": { - "version": "0.1.1", - "resolved": "https://npm.pkg.github.com/download/@loupeteam/databuffer/0.1.1/8d40808bb2de89899da090259e12f2ea1ff818bb", - "integrity": "sha512-xn6HlzBXW0jRgXeRJx66rT154OPomvfGhsFtLsQqV4oPpWURZ4WPoM1uOf7tgmVzfZk4CSpsh16whowVBpJDQg==" - }, - "@loupeteam/fiowrap": { - "version": "0.9.1", - "resolved": "https://npm.pkg.github.com/download/@loupeteam/fiowrap/0.9.1/f299ddc5721948a99321c6391fd3f4c147987d31", - "integrity": "sha512-1u4+YdCr41Xa1OOauiyav8Gq71Q1U5caPNImYwhVW01Tx7LG8a+zG1sKLXeLfbKxAfL/aHTPqEJSCNtB94Rq+w==", - "requires": { - "@loupeteam/stringext": ">=0.11.0" - } - }, - "@loupeteam/hammers": { - "version": "0.10.0", - "resolved": "https://npm.pkg.github.com/download/@loupeteam/hammers/0.10.0/3d5f92c83690b9a582e9253665fdd15f756b3245", - "integrity": "sha512-Y9s1odM5BW7xnDJiFZ6tB8moIp8SmRtrmi0DXgT/cbio/U+SY06QDp9ULplXRfQuSNc7rRJt8SnRoJPGmn94WA==" - }, - "@loupeteam/hmitools": { - "version": "0.11.4", - "resolved": "https://npm.pkg.github.com/download/@loupeteam/hmitools/0.11.4/6c24c55ef0f034c5f85428706b0dc4b26af26252", - "integrity": "sha512-NnAQSf/EP5cpDj7rBRFoCk7sTbPtPtVkXmRPM/LU3Ca/H5fk1CCmA8MFBBbA25UGN+9LOgtX6pmW0MFVq/alDA==", - "requires": { - "@loupeteam/logthat": "*", - "@loupeteam/ringbuflib": ">=0.2.0", - "@loupeteam/stringext": ">=0.4.0" - } - }, - "@loupeteam/logthat": { - "version": "0.5.1", - "resolved": "https://npm.pkg.github.com/download/@loupeteam/logthat/0.5.1/728712ec79fff3ca14613f7b900f501a920b2871", - "integrity": "sha512-DvZR0Q/dU+RVR9ASV4xPJY2XIUG6fuf3brlyjndRK1MxVzl+ksBHm0QZJufDlYW9yejnT3cLoE6X9R3a+Cm+vg==", - "requires": { - "@loupeteam/stringext": ">=0.14.1" - } - }, - "@loupeteam/persist": { - "version": "0.0.7", - "resolved": "https://npm.pkg.github.com/download/@loupeteam/persist/0.0.7/1024ef80ca6dd324ed87044feff23d38412b108b", - "integrity": "sha512-fEDGXIRWcxYsXdUjrNAmT9FXeixV2+DsBbozLthVJ0jzBBzgJssGwUTEjG0UPpCQf0nj6PbtBGsWTHBvEQA0tQ==" - }, - "@loupeteam/piper": { - "version": "0.1.9", - "resolved": "https://npm.pkg.github.com/download/@loupeteam/piper/0.1.9/c665eb90b122d0b726b81d9e6f8ef13d56e6b238", - "integrity": "sha512-99mrVw542pEtWuojbSGdJz3sVUDYr2AdM6/IcVYrXA2gMTwALXoO1/9uEdGPcxSOP7qLZTmI/fM2mchTvWv/Pw==", - "requires": { - "@loupeteam/logthat": ">=0.5.0 <=0.5.9", - "@loupeteam/stringext": ">=0.14.0 <=0.14.9" - } - }, - "@loupeteam/ringbuflib": { - "version": "0.2.4", - "resolved": "https://npm.pkg.github.com/download/@loupeteam/ringbuflib/0.2.4/f42f953e137103bbed3d088c97bbd3bd0dcb064e", - "integrity": "sha512-UWnY3vSgOIIyNoDQMpo0eAuw9P0dAt35O0UdNB6tNXIeLr8ytzI3vbHAjiaSUYoecLkNl4lbhyVHNGXoivlz8Q==" - }, - "@loupeteam/stringext": { - "version": "0.14.4", - "resolved": "https://npm.pkg.github.com/download/@loupeteam/stringext/0.14.4/9d7c965dd094afeaf89b9f48c9b882ce798890dc", - "integrity": "sha512-xYNj2b+SUxIgM5ZvB+BgDL+cqWkaKHAN65GbyNCd1B/SExiqUDO/VMa77/Sk2XlIZdzXj5mXxjwU/zjY97WsMg==" - }, - "@loupeteam/tcpcomm": { - "version": "0.10.0", - "resolved": "https://npm.pkg.github.com/download/@loupeteam/tcpcomm/0.10.0/38e4ab8cba58b7463701059bde22d905dddd19e4", - "integrity": "sha512-jhao/10Zyv8nSNpdd5AoghApqj7b8GP8sXjfpS0CL6xXMFOoUR9cUfjxAFd85hce0GaEnIN7h7HN1e3FFiCoJQ==" - }, - "@loupeteam/vartools": { - "version": "0.11.3", - "resolved": "https://npm.pkg.github.com/download/@loupeteam/vartools/0.11.3/edf84e21e928d1bef4bafea2ccbf31d560790b92", - "integrity": "sha512-ZKSvCPCGDXw/Qki/vo7I9SZJqwXpUF4HjypwpDwRZCDgiY0gt5aNsFj1Rm6uWqgSn4FJ+njhWXfF9QHyR98Rsg==", - "requires": { - "@loupeteam/stringext": ">=0.14.0 <=0.14.9" - } - }, - "@loupeteam/websocket": { - "version": "0.2.2", - "resolved": "https://npm.pkg.github.com/download/@loupeteam/websocket/0.2.2/2d60baf3324fd4234fb0774056d5a68d91b823e8", - "integrity": "sha512-/D0V6tTZsCzGf/vWCaEpEPbSQMSEA2y3KWQC2MCypmIyMN/MsP3ttepiYElFIFHxQgv3eiIE5fSiT+71DAv3qQ==", - "requires": { - "@loupeteam/stringext": ">=0.14.0 <=0.15.9", - "@loupeteam/tcpcomm": ">=0.10.0 <=0.10.9" - } - } - } -} +{ + "name": "asproject", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "asproject", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "@loupeteam/databuffer": "^1.0.0", + "@loupeteam/librarybuilderproject": "^1.0.1", + "@loupeteam/stringext": "^1.0.0", + "@loupeteam/tcpcomm": "^1.0.0", + "@loupeteam/vartools": "^1.0.0", + "@loupeteam/websocket": "^1.0.0" + } + }, + "node_modules/@loupeteam/databuffer": { + "version": "1.0.0", + "resolved": "https://npm.pkg.github.com/download/@loupeteam/databuffer/1.0.0/c80b87311005a974ce6903c7c1961fe4479589cb", + "integrity": "sha512-FDvYrvMDMHsOYhUp+Ua/xyuZibBM0mFFaT0A/nIlJmDBkVXIlr0hHKyvhRgHsgBju+n01nXXT653ywWrLgSW1A==", + "license": "MIT" + }, + "node_modules/@loupeteam/librarybuilderproject": { + "version": "1.0.1", + "resolved": "https://npm.pkg.github.com/download/@loupeteam/librarybuilderproject/1.0.1/7c9555096f7ef8e8ce6b355c76533cb86d3b0229", + "integrity": "sha512-0a31O2d0/LpWOwOvde6hIU/ZKPt4B9RXgrM/KQi2ayXm9UuDudNdp0YqCiTDm+UqciUlY5GtpQzOhx4VYfKdbA==", + "license": "MIT" + }, + "node_modules/@loupeteam/stringext": { + "version": "1.0.0", + "resolved": "https://npm.pkg.github.com/download/@loupeteam/stringext/1.0.0/9da05bfa435b70b88d57f6a3abe7e1b03d1ac9f4", + "integrity": "sha512-CkwWziPxGwLisndcMunmR7DLdX1tvrt1hxHVn9ZYqJ8L6defPZr/ZWutpT+qhQJgoQnt5n+N48M1gbv6WclTHg==", + "license": "MIT" + }, + "node_modules/@loupeteam/tcpcomm": { + "version": "1.0.0", + "resolved": "https://npm.pkg.github.com/download/@loupeteam/tcpcomm/1.0.0/0d281632586b26aa891d9ad2558616810707755c", + "integrity": "sha512-3UQQG+vzu15vkbi9jpvopm5M6dBLnLeRWsi3ytuFcskJC5TBy0Lc5Qs+zQW09siZJe3dGrY2sTst0U5A/cvdTw==", + "license": "MIT" + }, + "node_modules/@loupeteam/vartools": { + "version": "1.0.0", + "resolved": "https://npm.pkg.github.com/download/@loupeteam/vartools/1.0.0/b105450a7e0560e86398afc2e715b90a54541c79", + "integrity": "sha512-YndEhEkCJwYOg0MsX5xIEoyttZaZwqkGHeBO73wVrRZqcKc8RvrnLYPpYEgiEdUf8O8DiZ+3hb7Jra26CMwl3Q==", + "license": "MIT", + "dependencies": { + "@loupeteam/stringext": "*" + } + }, + "node_modules/@loupeteam/websocket": { + "version": "1.0.0", + "resolved": "https://npm.pkg.github.com/download/@loupeteam/websocket/1.0.0/06ba4434ebefacac870b424359f5e84d9645ac4e", + "integrity": "sha512-8ryxKYr4di651ekgJq3l25w4T31fkBJ5L4EZGLNV23/5F0ucflSNIYOmfPefFYeUXCyW32kECodBjztUqRzOSQ==", + "license": "MIT", + "dependencies": { + "@loupeteam/stringext": ">=1.0.0", + "@loupeteam/tcpcomm": ">=1.0.0" + } + } + } +} diff --git a/example/AsProject/package.json b/example/AsProject/package.json index e00c986..196c5d8 100644 --- a/example/AsProject/package.json +++ b/example/AsProject/package.json @@ -1,28 +1,24 @@ -{ - "name": "asproject", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [], - "author": "", - "license": "ISC", - "lpmConfig": { - "deploymentConfigs": [ - "Intel", - "ARM" - ], - "gitClient": "GitExtensions" - }, - "dependencies": { - "@loupeteam/csvfilelib": "^1.2.2", - "@loupeteam/databuffer": "^0.1.1", - "@loupeteam/hammers": "^0.10.0", - "@loupeteam/persist": "^0.0.7", - "@loupeteam/piper": "^0.1.9", - "@loupeteam/vartools": "^0.11.3", - "@loupeteam/websocket": "^0.2.2" - } -} +{ + "name": "asproject", + "version": "1.0.0", + "description": "", + "scripts": {}, + "keywords": [], + "author": "", + "license": "MIT", + "lpmConfig": { + "deploymentConfigs": [ + "Intel", + "ARM" + ], + "gitClient": "GitExtensions" + }, + "dependencies": { + "@loupeteam/databuffer": "^1.0.0", + "@loupeteam/librarybuilderproject": "^1.0.1", + "@loupeteam/stringext": "^1.0.0", + "@loupeteam/tcpcomm": "^1.0.0", + "@loupeteam/vartools": "^1.0.0", + "@loupeteam/websocket": "^1.0.0" + } +} diff --git a/src/Ar/OMJSON/ANSIC.lby b/src/Ar/OMJSON/ANSIC.lby index 0cd524e..2feb930 100644 --- a/src/Ar/OMJSON/ANSIC.lby +++ b/src/Ar/OMJSON/ANSIC.lby @@ -1,6 +1,6 @@  - + OMJSON.typ OMJSON.var @@ -24,15 +24,15 @@ jsonInternalWrapper.c - + - + - + - - + + \ No newline at end of file diff --git a/src/Ar/OMJSON/CHANGELOG.md b/src/Ar/OMJSON/CHANGELOG.md index c7001be..92c5bae 100644 --- a/src/Ar/OMJSON/CHANGELOG.md +++ b/src/Ar/OMJSON/CHANGELOG.md @@ -1,5 +1,9 @@ # Change log +2.0.0 - Migrate to Automation Studio 6 (AS6) + Bump all Loupe dependency versions to AS6 releases (VarTools, DataBuffer, TCPComm, StringExt, WebSocket >=1.0.0) + Apply (UDINT) casts to stringlcpy calls for AS6/StringExt 1.0.0 API compatibility + 1.4.3 - Update Websocket dependency to fix connection issue Fix clients being disconnect due to timeout immediately after connecting diff --git a/src/Ar/OMJSON/jsonAux.c b/src/Ar/OMJSON/jsonAux.c index 764727f..36277d5 100644 --- a/src/Ar/OMJSON/jsonAux.c +++ b/src/Ar/OMJSON/jsonAux.c @@ -302,7 +302,7 @@ unsigned long stringify_string(char *pDest, char *pSrc, unsigned long maxLength, // Check for invalid whitespace characters if (*ptr < 32 && *ptr > 0 && !(*ptr >= 8 && *ptr <= 13 && *ptr != 11)) { - length = stringlcpy(pDest, "Invalid String", maxLength+1); + length = stringlcpy((UDINT)pDest, (UDINT)"Invalid String", maxLength+1); length = length > maxLength ? maxLength : length; return length; } @@ -415,7 +415,7 @@ unsigned long stringify_wstring(char *pDest, unsigned short *pSrc, unsigned long // Check for invalid whitespace characters tempWChar = wchar2char(*ptr); if (tempWChar < 32 && !(tempWChar >= 8 && tempWChar <= 13 && tempWChar != 11)) { - length = stringlcpy(pDest, "Invalid String", maxLength+1); + length = stringlcpy((UDINT)pDest, (UDINT)"Invalid String", maxLength+1); length = length > maxLength ? maxLength : length; return length; } diff --git a/src/Ar/OMJSON/package.json b/src/Ar/OMJSON/package.json new file mode 100644 index 0000000..6e053f4 --- /dev/null +++ b/src/Ar/OMJSON/package.json @@ -0,0 +1,19 @@ +{ + "name": "@loupeteam/omjson", + "version": "0.0.0", + "description": "Object-mapped JSON serialization library for B&R Automation Studio", + "homepage": "https://loupeteam.github.io/LoupeDocs/libraries/omjson.html", + "scripts": {}, + "keywords": [], + "author": "Loupe", + "license": "MIT", + "repository": { "type": "git", "url": "https://github.com/loupeteam/OMJSON" }, + "lpm": { "type": "library" }, + "dependencies": { + "@loupeteam/vartools": ">=1.0.0", + "@loupeteam/databuffer": ">=1.0.0", + "@loupeteam/tcpcomm": ">=1.0.0", + "@loupeteam/stringext": ">=1.0.0", + "@loupeteam/websocket": ">=1.0.0" + } +}