Compare commits
131 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6f1eaffda8 | |||
| 1e6cb3bca5 | |||
| 37321f1808 | |||
| 7f80b3248d | |||
| 702f9e70f1 | |||
| 1fd453dd1d | |||
| c9a1af40a9 | |||
| b443b52dbe | |||
| fbf8b1fa9b | |||
| f764e490af | |||
| 2873b6b35c | |||
| 38a86f27fc | |||
| b0cc8416fa | |||
| 94e8648e69 | |||
| f1971a6c18 | |||
| 1dfdf7912f | |||
| 1b66839725 | |||
| fe7354a376 | |||
| d21dbbf34f | |||
| 063d6ece08 | |||
| f41a6037f6 | |||
| 10345e6c84 | |||
| b87b167853 | |||
| 402255643f | |||
| f8f7178e06 | |||
| e782d7b8b0 | |||
| ecde4ca013 | |||
| d879448a5a | |||
| a8b10ec3da | |||
| 165624d9ab | |||
| 8b5484483e | |||
| 19eae53d2d | |||
| c28e6a307a | |||
| 6550f63b5e | |||
| 76b4de916c | |||
| 0692751128 | |||
| b751e440fc | |||
| 8ec5b72f9c | |||
| b346299a22 | |||
| 4eeb9e87da | |||
| 362eab2e27 | |||
| 85320227d5 | |||
| 52de588270 | |||
| 3a42205366 | |||
| 2c52d115cd | |||
| b5f321a180 | |||
| 8fa067c932 | |||
| 6685fc42df | |||
| 02dd6a04b2 | |||
| 5e19bc2db2 | |||
| 2c2b3847da | |||
| 50e74ca4aa | |||
| 3d50f23bc7 | |||
| 14f343b6ee | |||
| c4920b3609 | |||
| 7c65fb0b1a | |||
| 0d06a132f3 | |||
| 8dd4a71161 | |||
| 8919c8d344 | |||
| 5de4de7e9b | |||
| 5719c846ef | |||
| 58df475727 | |||
| 78184965fe | |||
| 3203d0b00a | |||
| 1229fbb5b2 | |||
| 24e4814fa1 | |||
| 1ae1e28724 | |||
| 02b5b9d390 | |||
| f0a59a812f | |||
| 80ba7cf1a3 | |||
| 66a274529b | |||
| 5ea7e65fe5 | |||
| 949a80fb62 | |||
| c3c4a5d9dc | |||
| 72e6371430 | |||
| 794bb63dcf | |||
| 8607788e89 | |||
| aed58d5e1e | |||
| e8882c852f | |||
| b5f60bf136 | |||
| b822732ef2 | |||
| dac1b03b87 | |||
| 6a314e34e9 | |||
| 7337f9d48a | |||
| f99bd04f49 | |||
| fc97a0cebc | |||
| 9592e403fc | |||
| caca8e380b | |||
| 132ce583ff | |||
| 3c1abedd50 | |||
| e69bf62137 | |||
| b1f6446d23 | |||
| 0335436dce | |||
| aa4ba0020e | |||
| 4ed799f300 | |||
| 65f7faf638 | |||
| 25237edc61 | |||
| 2c2936d670 | |||
| 4197353771 | |||
| 8c89beecdc | |||
| ed493313b9 | |||
| 4c8670e58a | |||
| cb966c5d1c | |||
| d8886dd5f6 | |||
| b99e5d7c96 | |||
| 096ce0d2d0 | |||
| 662877ffde | |||
| 4e50a46cc8 | |||
| 0f0d4a6458 | |||
| b7a0d5edea | |||
| 0cce55c176 | |||
| 66380773ed | |||
| 24a2b7c751 | |||
| f535c7b8df | |||
| 553b8bae68 | |||
| b456610021 | |||
| 1edff621b8 | |||
| ab1d9380c9 | |||
| 809ea9f7eb | |||
| 4469241cef | |||
| d294056976 | |||
| ab58fa05bd | |||
| 2b581ae70c | |||
| 2420814f38 | |||
| d7c2dcd2c4 | |||
| 8f65dae94d | |||
| 313efe4594 | |||
| 716d8763b2 | |||
| 8c3eb77822 | |||
| a704954d64 | |||
| 1d42d28306 |
Vendored
+223
@@ -0,0 +1,223 @@
|
||||
pipeline {
|
||||
// Declarative Pipeline MODE con Scripted Pipeline Syntax entro le chiamate script { }
|
||||
agent none
|
||||
environment {
|
||||
EMAIL_RECIPIENTS = 'samuele@steamware.net'
|
||||
}
|
||||
stages {
|
||||
stage('Checkout') {
|
||||
agent any
|
||||
steps {
|
||||
/* build delle SteamWare libs! */
|
||||
/*build 'SteamWare/SteamWareLib'*/
|
||||
/* copio le libs...*/
|
||||
// step([$class: 'CopyArtifact', fingerprintArtifacts: true, projectName: 'Steamware/SteamWareLib', selector: [$class: 'WorkspaceSelector'], target: '../Steamware/SteamWareLib'])
|
||||
|
||||
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
|
||||
script {
|
||||
withEnv(['NEXT_BUILD_NUMBER=293']) {
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '2.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
|
||||
env.versionNumber = VersionNumber(versionNumberString : '2.0.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
env.APP_NAME = 'SCMA'
|
||||
}
|
||||
}
|
||||
script {
|
||||
currentBuild.displayName = "${env.versionNumber}"
|
||||
if (env.BRANCH_NAME == "develop" || env.BRANCH_NAME.contains("DEMO")) {
|
||||
currentBuild.description = "TEST ${env.versionNumber}"
|
||||
}
|
||||
else {
|
||||
currentBuild.description = "BUILD ${env.versionNumber}"
|
||||
}
|
||||
}
|
||||
// CAMBIO numero versione + checkout NuGet in file sorgente!!!
|
||||
bat "e:\\fart.exe VersGen\\VersGen.cs 1.0.0.0 ${env.versionNumber} || EXIT /B 0"
|
||||
bat "e:\\nuget.exe restore ${WORKSPACE}\\MTC_Adapter\\SCMA.sln"
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
agent any
|
||||
steps {
|
||||
script {
|
||||
properties([buildDiscarder(logRotator(artifactDaysToKeepStr: '180', artifactNumToKeepStr: '30', daysToKeepStr: '360', numToKeepStr: '30')), pipelineTriggers([])])
|
||||
// CAMBIO numero versione + checkout NuGet in file sorgente!!!
|
||||
bat "e:\\fart.exe VersGen\\VersGen.cs 1.0.0.0 ${env.versionNumber} || EXIT /B 0"
|
||||
bat "e:\\nuget.exe restore ${WORKSPACE}\\MTC_Adapter\\SCMA.sln"
|
||||
}
|
||||
script {
|
||||
/* compilo installers in base al BRANCH del cliente... */
|
||||
if (env.BRANCH_NAME == "develop" || env.BRANCH_NAME == "master") {
|
||||
parallel (
|
||||
DB: {
|
||||
sleep 1
|
||||
bat "\"${tool 'MSBuild-15.0'}\" MTC_Adapter/MTC-ADB/MTC-ADB.csproj -target:Build /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /m"
|
||||
},
|
||||
MAIN: {
|
||||
sleep 0
|
||||
bat "\"${tool 'MSBuild-15.0'}\" MTC_Adapter/SCMA/SCMA.csproj -target:Build /p:DefineConstants=\"FS30D=1,SIEMENS=1\" /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/ /m"
|
||||
},
|
||||
failFast: false)
|
||||
}
|
||||
else {
|
||||
echo 'Niente x Build (limitata a develop/master)...'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Deploy') {
|
||||
agent any
|
||||
steps {
|
||||
// in primis fix versione e recupero pacchetti...
|
||||
script {
|
||||
// CAMBIO numero versione + checkout NuGet in file sorgente!!!
|
||||
bat "e:\\fart.exe VersGen\\VersGen.cs 1.0.0.0 ${env.versionNumber} || EXIT /B 0"
|
||||
bat "e:\\nuget.exe restore ${WORKSPACE}\\MTC_Adapter\\SCMA.sln"
|
||||
}
|
||||
// poi compilo
|
||||
script {
|
||||
// procedo solo se NON si tratta di commit in ramo DOCUMentazione...
|
||||
if (env.BRANCH_NAME == "master" || env.BRANCH_NAME.contains("develop") || env.BRANCH_NAME.contains("MTC_Only")) {
|
||||
echo 'Questo BRANCH non necessita di installer...'
|
||||
}
|
||||
else
|
||||
{
|
||||
if (env.BRANCH_NAME == "MySql") {
|
||||
// pulizia directory BIN
|
||||
bat "RD /S /Q \"${WORKSPACE}\\MTC_Adapter\\MTC-ADB\\bin\" || EXIT /B 0"
|
||||
// BUILD adapter MySql!
|
||||
bat "\"${tool 'MSBuild-15.0'}\" MTC_Adapter/MTC-ADB/MTC-ADB.csproj -target:Build /p:Configuration=${env.BRANCH_NAME} /p:VisualStudioVersion=15.0 /p:RunCodeAnalysis=false /p:Platform=\"Any CPU\" /p:DebugSymbols=false /p:DebugType=None /p:OutputPath=bin/${env.versionNumber} /m"
|
||||
}
|
||||
else {
|
||||
// pulizia directory BIN
|
||||
//bat "RD /S /Q \"${WORKSPACE}\\MTC_Adapter\\SCMA\\bin\" || EXIT /B 0"
|
||||
if (env.BRANCH_NAME == "FANUC") {
|
||||
env.currConfig='CMS-FANUC'
|
||||
}
|
||||
else if (env.BRANCH_NAME == "KVARA") {
|
||||
env.currConfig='SCM-ESA'
|
||||
}
|
||||
else if (env.BRANCH_NAME == "OSAI") {
|
||||
env.currConfig='CMS-OSAI'
|
||||
}
|
||||
else if (env.BRANCH_NAME == "SIEMENS") {
|
||||
env.currConfig='CMS-SIEMENS'
|
||||
}
|
||||
else {
|
||||
env.currConfig='Release'
|
||||
}
|
||||
bat "\"${tool 'MSBuild-15.0'}\" MTC_Adapter/SCMA/SCMA.csproj -target:Build /p:FS30D=1 /p:SIEMENS=1 /p:Configuration=${env.currConfig} /p:DebugSymbols=false /p:DebugType=None /p:OutputPath=bin/${env.versionNumber} /m"
|
||||
|
||||
// // Build adapters VERI
|
||||
// // bat "\"${tool 'MSBuild-15.0'}\" MTC_Adapter/SCMA/SCMA.csproj -target:Build /p:FS30D=1 /p:SIEMENS=1 /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/${env.versionNumber} /m"
|
||||
// // bat "\"${tool 'MSBuild-15.0'}\" MTC_Adapter/SCMA/SCMA.csproj -target:Build /p:DefineConstants=\"FS30D=1,SIEMENS=1\" /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OutputPath=bin/${env.versionNumber} /m"
|
||||
// // bat "\"${tool 'MSBuild-15.0'}\" MTC_Adapter/SCMA/SCMA.csproj -target:Build /p:FS30D=1 /p:SIEMENS=1 /p:Configuration=${env.BRANCH_NAME} /p:VisualStudioVersion=15.0 /p:RunCodeAnalysis=false /p:Platform=\"Any CPU\" /p:DebugSymbols=false /p:DebugType=None /p:OutputPath=bin/${env.versionNumber} /m"
|
||||
}
|
||||
}
|
||||
}
|
||||
// ora mi occupo delle operazioni di compressione e copia...
|
||||
script {
|
||||
// procedo ove necessario...
|
||||
if (env.BRANCH_NAME == "master" || env.BRANCH_NAME.contains("develop") || env.BRANCH_NAME.contains("MTC_Only")) {
|
||||
echo 'Nessuna compressione + copia post deploy x documentazione'
|
||||
}
|
||||
else {
|
||||
// manifest.xml: aggiorno versNumber ed URL del branch di update...
|
||||
bat "e:\\fart.exe MTC_Adapter\\SCMA\\Resources\\manifest.xml 1.0.0.0 ${env.versionNumber} || EXIT /B 0"
|
||||
bat "e:\\fart.exe MTC_Adapter\\SCMA\\Resources\\manifest.xml {{BRANCHNAME}} ${env.BRANCH_NAME} || EXIT /B 0"
|
||||
bat "e:\\fart.exe MTC_Adapter\\SCMA\\Resources\\ChangeLog.html {{CURRENT-REL}} ${env.versionNumber} || EXIT /B 0"
|
||||
writeFile file: 'changeLog.log', text: "${getChangeString()}"
|
||||
// copio ed esporto in IIS02 i vari files .xml, .html, .zip
|
||||
powershell '(Get-Content MTC_Adapter\\SCMA\\Resources\\ChangeLog.html) | ForEach-Object { $_ -replace \"{{LAST-CHANGES}}\", \"${getChangeString()}\" } | Set-Content MTC_Adapter\\SCMA\\Resources\\ChangeLog.html'
|
||||
|
||||
bat "xcopy /y MTC_Adapter\\SCMA\\Resources\\manifest.xml c:\\inetpub\\wwwroot\\SWS\\SCMA\\${env.BRANCH_NAME}\\ "
|
||||
bat "xcopy /y MTC_Adapter\\SCMA\\Resources\\ChangeLog.html c:\\inetpub\\wwwroot\\SWS\\SCMA\\${env.BRANCH_NAME}\\ "
|
||||
bat "xcopy /y MTC_Adapter\\SCMA\\Resources\\logoSteamware.png c:\\inetpub\\wwwroot\\SWS\\SCMA\\${env.BRANCH_NAME}\\ "
|
||||
|
||||
|
||||
// // elimino files inutili di resources e pubblico
|
||||
// bat "RD /S /Q MTC_Adapter\\SCMA\\Resources"
|
||||
// elimino vecchio zip...
|
||||
bat "RD /S /Q Releases\\${env.BRANCH_NAME}\\ || EXIT /B 0"
|
||||
if (env.BRANCH_NAME == "MySql") {
|
||||
// Compressione in .zip dell'installer x MySql...
|
||||
bat "e:\\7za.exe a -tzip ${WORKSPACE}\\Releases\\${env.BRANCH_NAME}\\SCMA.zip ${WORKSPACE}\\MTC_Adapter\\MTC-ADB\\bin\\${env.versionNumber}\\*"
|
||||
}
|
||||
else {
|
||||
// Compressione in .zip dell'installer x adapter MTC-OPC-UA-RED...
|
||||
bat "e:\\7za.exe a -tzip ${WORKSPACE}\\Releases\\${env.BRANCH_NAME}\\SCMA.zip ${WORKSPACE}\\MTC_Adapter\\SCMA\\bin\\${env.versionNumber}\\*"
|
||||
}
|
||||
|
||||
// salvo copia della versione in staging...
|
||||
bat "xcopy /y Releases\\${env.BRANCH_NAME}\\SCMA.zip E:\\Staging\\byProd\\SCMA\\${env.BRANCH_NAME}\\${env.versionNumber}\\ "
|
||||
// copio in area WebDeploy
|
||||
bat "xcopy /y Releases\\${env.BRANCH_NAME}\\SCMA.zip c:\\inetpub\\wwwroot\\SWS\\SCMA\\${env.BRANCH_NAME}\\ "
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
sendEmail("Successful")
|
||||
}
|
||||
failure {
|
||||
sendEmail("Failed")
|
||||
}
|
||||
unstable {
|
||||
sendEmail("Unstable")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// // Funzione x pubblicazione su server IIS di deploy
|
||||
// def publishToDeployServer(prjPath, iisPath, packName) {
|
||||
// echo "Richiesto esecuzione publishToDeployServer con parametri: " + prjPath + " | " + iisPath + " | " + packName
|
||||
// // inizio copiando files di base da area VersGen...
|
||||
// bat "xcopy /y VersGen\\ChangeLog.html " + prjPath + "Resources\\ChangeLog.html "
|
||||
// bat "xcopy /y VersGen\\logoSteamware.png " + prjPath + "Resources\\logoSteamware.png "
|
||||
// bat "xcopy /y VersGen\\manifest.xml " + prjPath + "Resources\\manifest.xml "
|
||||
// // manifest.xml: aggiorno versNumber ed URL del branch di update...
|
||||
// bat "e:\\fart.exe " + prjPath + "Resources\\manifest.xml 1.0.0.0 ${env.versionNumber} || EXIT /B 0"
|
||||
// bat "e:\\fart.exe " + prjPath + "Resources\\manifest.xml {{BRANCHNAME}} ${env.BRANCH_NAME} || EXIT /B 0"
|
||||
// bat "e:\\fart.exe " + prjPath + "Resources\\manifest.xml {{PACKNAME}} " + packName + " || EXIT /B 0"
|
||||
// bat "e:\\fart.exe " + prjPath + "Resources\\ChangeLog.html {{CURRENT-REL}} ${env.versionNumber} || EXIT /B 0"
|
||||
// writeFile file: prjPath + 'changeLog.log', text: "${getChangeString()}"
|
||||
// powershell '(Get-Content ' + prjPath + 'Resources\\ChangeLog.html) | ForEach-Object { $_ -replace \"{{LAST-CHANGES}}\", \"${getChangeString()}\" } | Set-Content ' + prjPath + 'Resources\\ChangeLog.html'
|
||||
// // copio ed esporto in IIS02 i vari files .xml, .html, .zip
|
||||
// bat "xcopy /y " + prjPath + "Resources\\manifest.xml " + iisPath + packName + "\\${env.BRANCH_NAME}\\ "
|
||||
// bat "xcopy /y " + prjPath + "Resources\\ChangeLog.html " + iisPath + packName + "\\${env.BRANCH_NAME}\\ "
|
||||
// bat "xcopy /y " + prjPath + "Resources\\logoSteamware.png " + iisPath + packName + "\\${env.BRANCH_NAME}\\ "
|
||||
// // salvo copia della versione...
|
||||
// bat "xcopy /y " + prjPath + "\\ReleaseClienti\\${env.BRANCH_NAME}\\* E:\\Staging\\byProd\\MP\\${env.BRANCH_NAME}\\" + packName + "\\${env.versionNumber}\\ "
|
||||
// // copio x AutoUpdate deploy
|
||||
// bat "xcopy /y " + prjPath + "\\ReleaseClienti\\${env.BRANCH_NAME}\\" + packName + ".zip " + iisPath + packName + "\\${env.BRANCH_NAME}\\ "
|
||||
// }
|
||||
@NonCPS
|
||||
// Funzione x recupero changeLog
|
||||
def getChangeString() {
|
||||
MAX_MSG_LEN = 100
|
||||
def changeString = ""
|
||||
|
||||
echo "Gathering SCM changes"
|
||||
def changeLogSets = currentBuild.changeSets
|
||||
for (int i = 0; i < changeLogSets.size(); i++) {
|
||||
def entries = changeLogSets[i].items
|
||||
for (int j = 0; j < entries.length; j++) {
|
||||
def entry = entries[j]
|
||||
truncated_msg = entry.msg.take(MAX_MSG_LEN)
|
||||
changeString += " - ${truncated_msg} [${entry.author}]\n"
|
||||
}
|
||||
}
|
||||
|
||||
if (!changeString) {
|
||||
changeString = " - Nessuna Modifica"
|
||||
}
|
||||
return changeString
|
||||
}
|
||||
// Funzione x invio email
|
||||
def sendEmail(status) {
|
||||
mail (
|
||||
to: "$EMAIL_RECIPIENTS",
|
||||
subject: "Build $BUILD_NUMBER - " + status + " ($JOB_NAME)",
|
||||
body: "Modifiche:\n " + getChangeString() + "\n\n Verifica console output: $BUILD_URL/console" + "\n")
|
||||
}
|
||||
@@ -25,6 +25,7 @@
|
||||
<UseVSHostingProcess>true</UseVSHostingProcess>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<WarningLevel>0</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
@@ -36,6 +37,8 @@
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
<DefineConstants>FS30D=1,SIEMENS=1</DefineConstants>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<WarningLevel>0</WarningLevel>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
@@ -60,6 +63,7 @@
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<DefineConstants>FS30D=1,SIEMENS=1</DefineConstants>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<WarningLevel>0</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'SCM-ESA|AnyCPU' ">
|
||||
<DefineTrace>true</DefineTrace>
|
||||
@@ -72,6 +76,7 @@
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<DefineConstants>FS30D=1,SIEMENS=1</DefineConstants>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<WarningLevel>0</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'CMS-SIEMENS|AnyCPU'">
|
||||
<DefineTrace>true</DefineTrace>
|
||||
@@ -84,6 +89,7 @@
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<WarningLevel>0</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'CMS-OSAI|AnyCPU'">
|
||||
<DefineTrace>true</DefineTrace>
|
||||
@@ -96,6 +102,7 @@
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<WarningLevel>0</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Siemens.Sinumerik.Operate.Services, Version=4.7.3.2, Culture=neutral, PublicKeyToken=bdd90fa02fd1c4ee, processorArchitecture=x86">
|
||||
|
||||
@@ -1,70 +1,43 @@
|
||||
Namespace CNC
|
||||
|
||||
Public Class Runtime
|
||||
Public Shared NC As CMSCncLib.CNC.CNC
|
||||
Public Class Runtime
|
||||
Public Shared NC As CMSCncLib.CNC.CNC
|
||||
|
||||
|
||||
Public Shared Sub CreateNC(tipoNC As CNC.NcType, ipTarget As String)
|
||||
'************ Istanzio l'oggetto NC *****************
|
||||
Try
|
||||
Public Shared Sub CreateNC(tipoNC As CNC.NcType, ipTarget As String)
|
||||
'************ Istanzio l'oggetto NC *****************
|
||||
Dim exStr As String
|
||||
Try
|
||||
|
||||
Select Case tipoNC
|
||||
Select Case tipoNC
|
||||
|
||||
Case NC_FANUC
|
||||
'CMSCncLib.App.Runtime.Log.WI("TRY creating NC CNC.NC", "TypeNC=" & Config.Settings.Settings.TypeNC.ToString, CLog.Lev.Principal)
|
||||
Dim ipFanuc As String
|
||||
Dim portIpFanuc As String
|
||||
Dim CncScreenHssb As String
|
||||
Case NC_FANUC
|
||||
Dim ipFanuc As String
|
||||
Dim portIpFanuc As String
|
||||
Dim CncScreenHssb As String
|
||||
|
||||
' SIMULATORE
|
||||
' IP LOOPBACK: 192.168.211.5/255.255.255.0
|
||||
'ipFanuc = "192.168.211.5"
|
||||
' PRODUZIONE
|
||||
' IP ETH: 192.168.139.201/255.255.255.0
|
||||
'ipFanuc = "192.168.139.1"
|
||||
' imposto IP da chiamata
|
||||
ipFanuc = ipTarget
|
||||
|
||||
' imposto IP da chiamata
|
||||
ipFanuc = ipTarget
|
||||
portIpFanuc = "8193"
|
||||
CncScreenHssb = "0"
|
||||
NC = New FANUC(0, ipFanuc, portIpFanuc, CncScreenHssb)
|
||||
|
||||
Case NC_OSAI
|
||||
NC = New OSAI_OPEN(ipTarget)
|
||||
|
||||
portIpFanuc = "8193"
|
||||
CncScreenHssb = "0"
|
||||
NC = New FANUC(0, ipFanuc, portIpFanuc, CncScreenHssb)
|
||||
#If SIEMENS Then
|
||||
Case NC_SIEMENS
|
||||
NC = New SIEMENS
|
||||
#End If
|
||||
End Select
|
||||
|
||||
Case NC_OSAI
|
||||
'If Config.Settings.Settings.OsaiCommType = 1 Then 'SOAP
|
||||
NC = New OSAI_OPEN(ipTarget)
|
||||
'Else 'DCOM
|
||||
' Dim DotNet As Boolean
|
||||
' If OSAI.GetWinnbi(DotNet) Then
|
||||
' NC = New OSAI(Config.Settings.Settings.NcName)
|
||||
' Else
|
||||
' Log.WE("Error on GetWinnbi or WINNBI are not installed", "Install Osai WINNBI before run this software", True)
|
||||
' End If
|
||||
'End If
|
||||
Catch ex As Exception
|
||||
exStr = ex.Message
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Case NC_SIEMENS
|
||||
Try
|
||||
NC = New SIEMENS
|
||||
Catch ex As CmsNcException
|
||||
'NC.frmMain_ref.ExitApp()
|
||||
'frmMain.ExitApp()
|
||||
'End
|
||||
End Try
|
||||
End Select
|
||||
|
||||
'CMSCncLib.App.Runtime.Log.WI("OK crating NC CNC.NC", , CLog.Lev.Principal)
|
||||
Catch ex As Exception
|
||||
Dim exStr As String
|
||||
exStr = ex.Message
|
||||
'CMSCncLib.App.Runtime.Log.WE("ERR crating NC CNC.NC", ex.Message, True)
|
||||
End Try
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
File diff suppressed because it is too large
Load Diff
@@ -52,12 +52,15 @@
|
||||
<HintPath>..\packages\MySql.Data.6.9.9\lib\net45\MySql.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.4.4.5\lib\net45\NLog.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<HintPath>..\packages\NLog.4.5.8\lib\net45\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
@@ -117,7 +120,7 @@
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<Content Include="NLog.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Include="dump\build.bat" />
|
||||
<None Include="dump\dump.obj" />
|
||||
|
||||
@@ -53,4 +53,4 @@
|
||||
-->
|
||||
<logger name="*" minlevel="Debug" writeTo="f" />
|
||||
</rules>
|
||||
</nlog>
|
||||
</nlog>
|
||||
+516
-314
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="MySql.Data" version="6.9.9" targetFramework="net452" />
|
||||
<package id="NLog" version="4.4.5" targetFramework="net452" />
|
||||
<package id="NLog.Config" version="4.4.5" targetFramework="net452" />
|
||||
<package id="NLog.Schema" version="4.4.5" targetFramework="net452" />
|
||||
<package id="NLog" version="4.5.8" targetFramework="net452" />
|
||||
<package id="NLog.Config" version="4.5.8" targetFramework="net452" />
|
||||
<package id="NLog.Schema" version="4.5.8" targetFramework="net452" />
|
||||
<package id="PrettyBin" version="1.1.0" targetFramework="net452" />
|
||||
<package id="SlowCheetah" version="2.5.48" targetFramework="net452" />
|
||||
</packages>
|
||||
@@ -37,12 +37,17 @@
|
||||
<HintPath>..\packages\AForge.Math.2.2.5\lib\AForge.Math.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.4.4.4\lib\net45\NLog.dll</HintPath>
|
||||
<HintPath>..\packages\NLog.4.5.8\lib\net45\NLog.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
@@ -56,9 +61,7 @@
|
||||
<Compile Include="baseUtils.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="NLog.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Include="NLog.config" />
|
||||
<None Include="NLog.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
|
||||
+523
-315
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
||||
<packages>
|
||||
<package id="AForge" version="2.2.5" targetFramework="net452" />
|
||||
<package id="AForge.Math" version="2.2.5" targetFramework="net452" />
|
||||
<package id="NLog" version="4.4.4" targetFramework="net452" />
|
||||
<package id="NLog.Config" version="4.4.4" targetFramework="net452" />
|
||||
<package id="NLog.Schema" version="4.4.4" targetFramework="net452" />
|
||||
<package id="NLog" version="4.5.8" targetFramework="net452" />
|
||||
<package id="NLog.Config" version="4.5.8" targetFramework="net452" />
|
||||
<package id="NLog.Schema" version="4.5.8" targetFramework="net452" />
|
||||
</packages>
|
||||
@@ -1,172 +0,0 @@
|
||||
using MTC;
|
||||
using MTConnect;
|
||||
using System;
|
||||
|
||||
namespace MTC_Adapter
|
||||
{
|
||||
public class AdapterDemo : AdapterGeneric
|
||||
{
|
||||
public Condition mTemp = new Condition("temp");
|
||||
public Condition mFillLevel = new Condition("cool_low", true);
|
||||
|
||||
/// <summary>
|
||||
/// estende l'init della classe base...
|
||||
/// </summary>
|
||||
/// <param name="caller"></param>
|
||||
/// <param name="adpConf"></param>
|
||||
public AdapterDemo(MainForm caller, AdapterConf adpConf) : base(caller, adpConf)
|
||||
{
|
||||
if (utils.CRB("verbose")) lg.Info("Start init Adapter DEMO");
|
||||
// IMPLICITO: carica da metodo base tutte le specifiche del conf...
|
||||
|
||||
|
||||
// aggiungo specifiche del demo: allarmi gestiti a buttons!!!
|
||||
mAdapter.AddDataItem(mTemp);
|
||||
mAdapter.AddDataItem(mFillLevel);
|
||||
|
||||
}
|
||||
|
||||
public override void startAdapter(int port)
|
||||
{
|
||||
base.startAdapter(port);
|
||||
|
||||
// aggiungo altre condizioni specifiche...
|
||||
|
||||
mTemp.Normal();
|
||||
mFillLevel.Normal();
|
||||
}
|
||||
|
||||
public override void getSlowChangingData()
|
||||
{
|
||||
mClock.Value = string.Format("{0:yyyy-MM-dd} {0:HH:mm:ss}", DateTime.Now);
|
||||
|
||||
mOperator.Value = parentForm.datiProd.Operator;
|
||||
|
||||
// recupero SEMPRE dati ulteriori: status ON/OFF, clock, ...
|
||||
mStatus.Value = parentForm.datiProd.Status;
|
||||
mAccTime.Value = parentForm.datiProd.AccTime;
|
||||
mClock.Value = DateTime.Now.Date.ToFileTimeUtc();
|
||||
mPower.Value = parentForm.datiProd.Power;
|
||||
}
|
||||
|
||||
public override void getStrobeAndAckStatus()
|
||||
{
|
||||
base.getStrobeAndAckStatus();
|
||||
|
||||
// controllo bool allarmi...
|
||||
if (parentForm.datiProd.EmrStop)
|
||||
{
|
||||
mEStop.Value = "TRIGGERED";
|
||||
}
|
||||
else
|
||||
{
|
||||
mEStop.Value = "ARMED";
|
||||
}
|
||||
|
||||
// imposto func mode...
|
||||
mFunctionalMode.Value = parentForm.datiProd.FuncMode;
|
||||
|
||||
// se ho un messaggio...
|
||||
if(parentForm.datiProd.MessageText.Length>0)
|
||||
{
|
||||
mMessage.Code = parentForm.datiProd.MessageCode;
|
||||
mMessage.Value = parentForm.datiProd.MessageText;
|
||||
}
|
||||
}
|
||||
|
||||
public override void getConfigParam()
|
||||
{
|
||||
base.getConfigParam();
|
||||
}
|
||||
|
||||
|
||||
public override void processStrobe()
|
||||
{
|
||||
// qui forzo la gestione di update dei path & co...
|
||||
getPath();
|
||||
getUnOp();
|
||||
getAxis();
|
||||
}
|
||||
/// <summary>
|
||||
/// non fa nulla perché recupera allarmi in vettore al singolo cambio...
|
||||
/// </summary>
|
||||
/// <param name="Alarm2Refresh"></param>
|
||||
/// <param name="giveAck"></param>
|
||||
public override void refreshAlarmState(StFlag32 Alarm2Refresh, bool giveAck)
|
||||
{
|
||||
base.refreshAlarmState(Alarm2Refresh, giveAck);
|
||||
}
|
||||
|
||||
public override void getPath()
|
||||
{
|
||||
base.getPath();
|
||||
|
||||
PathData PtData = parentForm.CurrPath;
|
||||
if(PtData.PathSel>=0)
|
||||
{
|
||||
vettPath[PtData.PathSel].mPathFeed.Value = PtData.PathFeedrate;
|
||||
vettPath[PtData.PathSel].mPathFeedOver.Value = PtData.PathFeedrateOver;
|
||||
vettPath[PtData.PathSel].mPathRapidOver.Value = PtData.PathRapidOver;
|
||||
vettPath[PtData.PathSel].mPathPosActX.Value = PtData.PathPosAct.x;
|
||||
vettPath[PtData.PathSel].mPathPosActY.Value = PtData.PathPosAct.y;
|
||||
vettPath[PtData.PathSel].mPathPosActZ.Value = PtData.PathPosAct.z;
|
||||
vettPath[PtData.PathSel].mPathPosActI.Value = PtData.PathPosAct.i;
|
||||
vettPath[PtData.PathSel].mPathPosActJ.Value = PtData.PathPosAct.j;
|
||||
vettPath[PtData.PathSel].mPathPosActK.Value = PtData.PathPosAct.k;
|
||||
|
||||
|
||||
|
||||
// aggiunta x revisione 2016.05.05
|
||||
vettPath[PtData.PathSel].mPathType.Value = PtData.PathType;
|
||||
vettPath[PtData.PathSel].mPathPartId.Value = PtData.PartId;
|
||||
vettPath[PtData.PathSel].mPathPartCount.Value = PtData.pzTot;
|
||||
vettPath[PtData.PathSel].mPathRunMode.Value = PtData.RunMode;
|
||||
vettPath[PtData.PathSel].mPathExeMode.Value = PtData.ExeMode;
|
||||
vettPath[PtData.PathSel].mPathCurrProg.Value = PtData.ProgramName;
|
||||
vettPath[PtData.PathSel].mPathCurrProgRowNum.Value = PtData.ProgrRow;
|
||||
vettPath[PtData.PathSel].mPathActiveAxes.Value = PtData.ActiveAxes;
|
||||
}
|
||||
}
|
||||
|
||||
public override void getUnOp()
|
||||
{
|
||||
base.getUnOp();
|
||||
|
||||
UnOpData uoData = parentForm.CurrUnOp;
|
||||
if (uoData.UnOpSel >= 0)
|
||||
{
|
||||
vettUnOp[uoData.UnOpSel].mUnOpToolId.Value = uoData.UnOpToolId;
|
||||
vettUnOp[uoData.UnOpSel].mUnOpNumCU.Value = uoData.UnOpNumCU;
|
||||
vettUnOp[uoData.UnOpSel].mUnOpStatus.Value = uoData.UnOpStatus;
|
||||
vettUnOp[uoData.UnOpSel].mUnOpVitaRes.Value = uoData.UnOpVitaRes;
|
||||
vettUnOp[uoData.UnOpSel].mUnOpSpeed.Value = uoData.UnOpSpeed;
|
||||
vettUnOp[uoData.UnOpSel].mUnOpLoad.Value = uoData.UnOpLoad;
|
||||
vettUnOp[uoData.UnOpSel].mUnOpAccTime.Value = uoData.UnOpAccTime;
|
||||
}
|
||||
}
|
||||
|
||||
public override void getAxis()
|
||||
{
|
||||
base.getAxis();
|
||||
AxisData AxData = parentForm.CurrAxis;
|
||||
if (AxData.AxisSel >= 0)
|
||||
{
|
||||
// USO asse selezionato + dati visualizzati e di conseguenza aggiorno...
|
||||
vettAxis[AxData.AxisSel].mAxMainProc.Value = AxData.AxisMainProc;
|
||||
vettAxis[AxData.AxisSel].mAxIsMaster.Value = AxData.AxisIsMaster;
|
||||
vettAxis[AxData.AxisSel].mAxMastId.Value = AxData.AxisMastId;
|
||||
//vettAxis[AxData.AxisSel].mAxType.Value = AxData.AxisType;
|
||||
vettAxis[AxData.AxisSel].mAxDir.Value = AxData.AxisDir;
|
||||
vettAxis[AxData.AxisSel].mAxLoad.Value = AxData.AxisLoad;
|
||||
vettAxis[AxData.AxisSel].mAxPosAct.Value = AxData.AxisPosAct;
|
||||
vettAxis[AxData.AxisSel].mAxPosTgt.Value = AxData.AxisPosTgt;
|
||||
vettAxis[AxData.AxisSel].mAxFeedAct.Value = AxData.AxisFeedAct;
|
||||
vettAxis[AxData.AxisSel].mAxFeedOver.Value = AxData.AxisFeedOver;
|
||||
vettAxis[AxData.AxisSel].mAxAccelAct.Value = AxData.AxisAccel;
|
||||
vettAxis[AxData.AxisSel].mAxAccTime.Value = AxData.AxisAccTime;
|
||||
vettAxis[AxData.AxisSel].mAxBattery.Value = AxData.AxisBattery;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1 +0,0 @@
|
||||
# Commenti con cancelletto, struttura un variabile per riga, tipo chiave|valore (occhio che il separatore è configurato da .cofig come "testCharSep"); spazi e tabulazioni dovrei trimmarli in acquisizione (qui inseriti per comodità di lettura)
|
||||
@@ -1,94 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace MTC_Adapter
|
||||
{
|
||||
|
||||
public static class EnumerationExtensions
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// checks if the value contains the provided type
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static bool Has<T>(this System.Enum type, T value)
|
||||
{
|
||||
try
|
||||
{
|
||||
return (((int)(object)type & (int)(object)value) == (int)(object)value);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// checks if the value is only the provided type
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static bool Is<T>(this System.Enum type, T value)
|
||||
{
|
||||
try
|
||||
{
|
||||
return (int)(object)type == (int)(object)value;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// appends a value
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static T Add<T>(this System.Enum type, T value)
|
||||
{
|
||||
try
|
||||
{
|
||||
return (T)(object)(((int)(object)type | (int)(object)value));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new ArgumentException(
|
||||
string.Format(
|
||||
"Could not append value from enumerated type '{0}'.",
|
||||
typeof(T).Name
|
||||
), ex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// completely removes the value
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static T Remove<T>(this System.Enum type, T value)
|
||||
{
|
||||
try
|
||||
{
|
||||
return (T)(object)(((int)(object)type & ~(int)(object)value));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new ArgumentException(
|
||||
string.Format(
|
||||
"Could not remove value from enumerated type '{0}'.",
|
||||
typeof(T).Name
|
||||
), ex);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="NLog" version="4.4.4" targetFramework="net452" />
|
||||
<package id="NLog.Config" version="4.4.4" targetFramework="net452" />
|
||||
<package id="NLog.Schema" version="4.4.4" targetFramework="net452" />
|
||||
<package id="PrettyBin" version="1.1.0" targetFramework="net452" />
|
||||
<package id="SlowCheetah" version="2.5.48" targetFramework="net452" />
|
||||
</packages>
|
||||
@@ -1,48 +0,0 @@
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace MTC_Adapter
|
||||
{
|
||||
public class utils : MTC.baseUtils
|
||||
{
|
||||
/// <summary>
|
||||
/// folder archiviazione dati configurazione (DATA\CONF)
|
||||
/// </summary>
|
||||
public static string resxDir
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Format(@"{0}\{1}", Application.StartupPath, CRS("resxPath"));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// folder archiviazione dati configurazione (DATA\CONF)
|
||||
/// </summary>
|
||||
public static string confDir
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Format(@"{0}\{1}", Application.StartupPath, CRS("dataConfPath"));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// folder archiviazione dati storici giornalieri (DATA\DAT)
|
||||
/// </summary>
|
||||
public static string dataDatDir
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Format(@"{0}\{1}", Application.StartupPath, CRS("dataDatPath"));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// folder archiviazione dati (DATA)
|
||||
/// </summary>
|
||||
public static string dataDir
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Format(@"{0}\{1}", Application.StartupPath, CRS("dataPath"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+510
-320
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{5AFCCD6A-3758-44C8-96ED-84E809FCA8A1}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>OPC_UA_REDIS</RootNamespace>
|
||||
<AssemblyName>OPC-UA-REDIS</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.4.5.8\lib\net45\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="StackExchange.Redis, Version=1.2.6.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\StackExchange.Redis.1.2.6\lib\net46\StackExchange.Redis.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SOUR-IO.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="NLog.config">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Include="NLog.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Le informazioni generali relative a un assembly sono controllate dal seguente
|
||||
// set di attributi. Modificare i valori di questi attributi per modificare le informazioni
|
||||
// associate a un assembly.
|
||||
[assembly: AssemblyTitle("OPC-UA-REDIS")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("OPC-UA-REDIS")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Se si imposta ComVisible su false, i tipi in questo assembly non saranno visibili
|
||||
// ai componenti COM. Se è necessario accedere a un tipo in questo assembly da
|
||||
// COM, impostare su true l'attributo ComVisible per tale tipo.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Se il progetto viene esposto a COM, il GUID seguente verrà utilizzato come ID della libreria dei tipi
|
||||
[assembly: Guid("5afccd6a-3758-44c8-96ed-84e809fca8a1")]
|
||||
|
||||
// Le informazioni sulla versione di un assembly sono costituite dai seguenti quattro valori:
|
||||
//
|
||||
// Versione principale
|
||||
// Versione secondaria
|
||||
// Numero di build
|
||||
// Revisione
|
||||
//
|
||||
// È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
|
||||
// usando l'asterisco '*' come illustrato di seguito:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OPC_UA_REDIS
|
||||
{
|
||||
/// <summary>
|
||||
/// Classe utilità per Input/Output su SERVER REDIS
|
||||
/// </summary>
|
||||
public class SOUR_IO
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="NLog" version="4.5.8" targetFramework="net461" />
|
||||
<package id="NLog.Config" version="4.5.8" targetFramework="net461" />
|
||||
<package id="NLog.Schema" version="4.5.8" targetFramework="net461" />
|
||||
<package id="StackExchange.Redis" version="1.2.6" targetFramework="net461" />
|
||||
</packages>
|
||||
@@ -14,7 +14,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
||||
EndProject
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "CMSCncLib", "CMSCncLib\CMSCncLib.vbproj", "{2D769FFD-1122-4276-A115-29246E6D23C5}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MTC-Adapter", "MTC_Adapter\MTC-Adapter.csproj", "{736DF121-11E6-4D46-835D-6560ACF241E4}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SCMA", "SCMA\SCMA.csproj", "{736DF121-11E6-4D46-835D-6560ACF241E4}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VersGen", "VersGen\VersGen.csproj", "{58E399F3-9D4E-49D3-AB35-9ED536543D50}"
|
||||
EndProject
|
||||
@@ -26,6 +26,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MTC", "MTC\MTC.csproj", "{E
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetAdapterSDK", "..\..\..\..\GitHub\MTConnect\dot_net_sdk\DotNetAdapterSDK.csproj", "{D8D08DBE-B511-4DE0-B5A9-563EBFC60C4F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OPC-UA-REDIS", "OPC-UA-REDIS\OPC-UA-REDIS.csproj", "{5AFCCD6A-3758-44C8-96ED-84E809FCA8A1}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
CMS-FANUC|Any CPU = CMS-FANUC|Any CPU
|
||||
@@ -135,8 +137,25 @@ Global
|
||||
{D8D08DBE-B511-4DE0-B5A9-563EBFC60C4F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D8D08DBE-B511-4DE0-B5A9-563EBFC60C4F}.SCM-ESA|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D8D08DBE-B511-4DE0-B5A9-563EBFC60C4F}.SCM-ESA|Any CPU.Build.0 = Release|Any CPU
|
||||
{5AFCCD6A-3758-44C8-96ED-84E809FCA8A1}.CMS-FANUC|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5AFCCD6A-3758-44C8-96ED-84E809FCA8A1}.CMS-FANUC|Any CPU.Build.0 = Release|Any CPU
|
||||
{5AFCCD6A-3758-44C8-96ED-84E809FCA8A1}.CMS-OSAI|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5AFCCD6A-3758-44C8-96ED-84E809FCA8A1}.CMS-OSAI|Any CPU.Build.0 = Release|Any CPU
|
||||
{5AFCCD6A-3758-44C8-96ED-84E809FCA8A1}.CMS-SIEMENS|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5AFCCD6A-3758-44C8-96ED-84E809FCA8A1}.CMS-SIEMENS|Any CPU.Build.0 = Release|Any CPU
|
||||
{5AFCCD6A-3758-44C8-96ED-84E809FCA8A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5AFCCD6A-3758-44C8-96ED-84E809FCA8A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5AFCCD6A-3758-44C8-96ED-84E809FCA8A1}.MySql|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5AFCCD6A-3758-44C8-96ED-84E809FCA8A1}.MySql|Any CPU.Build.0 = Release|Any CPU
|
||||
{5AFCCD6A-3758-44C8-96ED-84E809FCA8A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5AFCCD6A-3758-44C8-96ED-84E809FCA8A1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5AFCCD6A-3758-44C8-96ED-84E809FCA8A1}.SCM-ESA|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5AFCCD6A-3758-44C8-96ED-84E809FCA8A1}.SCM-ESA|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {C7C9CC69-EF84-4B45-8C42-E5002A954A03}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,602 @@
|
||||
using MTC;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SCMA.AdapterCom
|
||||
{
|
||||
/// <summary>
|
||||
/// Gateway di comunicazione secondo diversi standard, partendo da oggetti BASE MTC
|
||||
/// </summary>
|
||||
public class Gateway
|
||||
{
|
||||
|
||||
#region oggetti base
|
||||
|
||||
/// <summary>
|
||||
/// Protocollo attivo per la comunicazione dell'adapter
|
||||
/// </summary>
|
||||
public gwProtocol protocollo;
|
||||
/// <summary>
|
||||
/// STOBE allarmi:
|
||||
/// 1024 bit di strobe degli allarmi attivi (32 word da 4byte/32 bit di flags...)
|
||||
/// </summary>
|
||||
public byte[] AlarmFlags;
|
||||
/// <summary>
|
||||
/// Oggetto elenco allarmi
|
||||
/// </summary>
|
||||
public allarme[] elencoAllarmi;
|
||||
/// <summary>
|
||||
/// Porta comunicazione standard oggetto
|
||||
/// </summary>
|
||||
public int port;
|
||||
/// <summary>
|
||||
/// Stringa di configurazione globale
|
||||
/// </summary>
|
||||
public string connConfig;
|
||||
/// <summary>
|
||||
/// Flag per indicare se l'obj stia ancora girando
|
||||
/// </summary>
|
||||
private bool myRunning = false;
|
||||
/// <summary>
|
||||
/// Indicatore public di oggetto running running.
|
||||
/// </summary>
|
||||
public bool Running { get { return myRunning; } }
|
||||
/// <summary>
|
||||
/// la parte di "mark & sweep" (segnala ed invia) è iniziata e stiamo tracciando le conditions.
|
||||
/// </summary>
|
||||
bool myBegun = false;
|
||||
/// <summary>
|
||||
/// Elenco di TUTTI i NODI ITEMS gestiti dal gateway (item/variabile)...
|
||||
/// </summary>
|
||||
public Dictionary<string, itemNode> itemNodes = new Dictionary<string, itemNode>();
|
||||
/// <summary>
|
||||
/// Elenco di TUTTI i NODI CONDITIONS gestiti dal gateway (allarme/condizione)...
|
||||
/// </summary>
|
||||
public Dictionary<string, itemNode> conditionNodes = new Dictionary<string, itemNode>();
|
||||
|
||||
#endregion
|
||||
|
||||
#region gestione globale oggetto
|
||||
|
||||
/// <summary>
|
||||
/// init classe come output su LOGFILE
|
||||
/// </summary>
|
||||
public Gateway()
|
||||
{
|
||||
port = 0;
|
||||
connConfig = "";
|
||||
protocollo = gwProtocol.LOGFILE;
|
||||
}
|
||||
/// <summary>
|
||||
/// Inizia la raccolta dati per confronto modifica da precedente...
|
||||
/// </summary>
|
||||
public virtual void beginDataCollect()
|
||||
{
|
||||
myBegun = true;
|
||||
foreach (object di in itemNodes)
|
||||
{
|
||||
// inizializza ogni oggetto (in particolare di tipo alarm/conditions x check variazione)
|
||||
//di.Begin();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Fa la verifica di cosa sia cambiato ed invia
|
||||
/// </summary>
|
||||
public virtual void sendChanged()
|
||||
{
|
||||
if (myBegun)
|
||||
{
|
||||
foreach (object di in itemNodes)
|
||||
{
|
||||
//di.Prepare();
|
||||
}
|
||||
}
|
||||
|
||||
#if false
|
||||
// Separate out the data items into those that are on one line and those
|
||||
// need separate lines.
|
||||
List<SimpleDataItem> together = new List<SimpleDataItem>();
|
||||
List<SimpleDataItem> separate = new List<SimpleDataItem>();
|
||||
foreach (object di in trackItems)
|
||||
{
|
||||
List<SimpleDataItem> list = di.ItemList();
|
||||
if (di.NewLine)
|
||||
separate.AddRange(list);
|
||||
else
|
||||
together.AddRange(list);
|
||||
}
|
||||
|
||||
// Compone all the same line data items onto one line.
|
||||
string line;
|
||||
if (timestamp == null)
|
||||
{
|
||||
DateTime now = DateTime.UtcNow;
|
||||
timestamp = now.ToString("yyyy-MM-dd\\THH:mm:ss.fffffffK");
|
||||
}
|
||||
if (together.Count > 0)
|
||||
{
|
||||
line = timestamp;
|
||||
foreach (SimpleDataItem di in together)
|
||||
line += "|" + di.ToString();
|
||||
line += "\n";
|
||||
|
||||
SendToAll(line);
|
||||
}
|
||||
|
||||
// Now write out all the separate lines
|
||||
if (separate.Count > 0)
|
||||
{
|
||||
foreach (SimpleDataItem di in separate)
|
||||
{
|
||||
line = timestamp;
|
||||
line += "|" + di.ToString() + "\n";
|
||||
SendToAll(line);
|
||||
}
|
||||
}
|
||||
|
||||
// Flush the output
|
||||
FlushAll();
|
||||
#endif
|
||||
|
||||
// Cleanup
|
||||
foreach (object di in itemNodes)
|
||||
{
|
||||
// pulizia oggetti
|
||||
//di.Cleanup();
|
||||
}
|
||||
myBegun = false;
|
||||
}
|
||||
/// <summary>
|
||||
/// Imposta TUTTI i data items unavailable
|
||||
/// </summary>
|
||||
public virtual void setAllUnavailable()
|
||||
{
|
||||
foreach (object di in itemNodes)
|
||||
{
|
||||
//// imposta a unavailable
|
||||
//di.Unavailable();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// AVVIA processo lettura CNC e invio dati a client
|
||||
/// </summary>
|
||||
public virtual void start()
|
||||
{
|
||||
#if false
|
||||
if (!mRunning)
|
||||
{
|
||||
mListener = new TcpListener(IPAddress.Any, mPort);
|
||||
mListener.Start();
|
||||
mListenThread = new Thread(new ThreadStart(ListenForClients));
|
||||
mListenThread.Start();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
/// <summary>
|
||||
/// FERMA processo lettura CNC e invio dati a client
|
||||
/// </summary>
|
||||
public virtual void stop()
|
||||
{
|
||||
#if false
|
||||
if (mRunning)
|
||||
{
|
||||
mRunning = false;
|
||||
mListener.Stop();
|
||||
foreach (Object obj in mClients)
|
||||
{
|
||||
Stream client = (Stream)obj;
|
||||
client.Close();
|
||||
}
|
||||
mClients.Clear();
|
||||
|
||||
// Wait 5 seconds for the thread to exit.
|
||||
mListenThread.Join(2000);
|
||||
|
||||
// Wait for all client threads to exit.
|
||||
mActiveClients.Wait(2000);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region gestione nodi (dataItems / conditions)
|
||||
|
||||
/// <summary>
|
||||
/// Aggiunge un generico item all'elenco di quelli tracciati INDICANDO IL TYPE
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="value"></param>
|
||||
public virtual void addItemNodeByType(string key, itemType tipo)
|
||||
{
|
||||
if (!itemNodes.ContainsKey(key))
|
||||
{
|
||||
itemNode currItem = new itemNode(tipo, availStatus.UNAVAILABLE.ToString());
|
||||
#if false
|
||||
// di base salvo tipo/valore come KVP nell'item...
|
||||
Dictionary<itemType, object> currObj = new Dictionary<itemType, object>();
|
||||
currObj.Add(tipo, "UNAVAILABLE");
|
||||
#endif
|
||||
itemNodes.Add(key, currItem);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Aggiunge un generico item all'elenco di quelli tracciati INDICANDO IL TYPE ed il valore iniziale
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="value"></param>
|
||||
public virtual void addItemNodeAndSet(string key, itemType tipo, object value)
|
||||
{
|
||||
addItemNodeByType(key, tipo);
|
||||
updateItemNodeValue(key, value);
|
||||
}
|
||||
/// <summary>
|
||||
/// Aggiunge un generico item all'elenco di quelli tracciati (NON STRONGLY TYPED!!! occhio!!!)
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="value"></param>
|
||||
public virtual void addItemNode(string key, object value)
|
||||
{
|
||||
// se non c'è già elemento lo aggiungo...
|
||||
if (!itemNodes.ContainsKey(key))
|
||||
{
|
||||
// default: event...
|
||||
itemNode currItem = new itemNode(itemType.Event, value);
|
||||
itemNodes.Add(key, currItem);
|
||||
}
|
||||
}
|
||||
public virtual void addItemNode(object value)
|
||||
{
|
||||
if (!itemNodes.ContainsKey(value.ToString()))
|
||||
{
|
||||
// default: event...
|
||||
itemNode currItem = new itemNode(itemType.Event, value);
|
||||
itemNodes.Add(value.ToString(), currItem);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Rimuove TUTTI i data items tracciati
|
||||
/// </summary>
|
||||
public virtual void removeAllItemNodes()
|
||||
{
|
||||
itemNodes.Clear();
|
||||
}
|
||||
/// <summary>
|
||||
/// Rimuove un item dall'elenco di quelli tracciati
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
public virtual void removeItemNode(string key)
|
||||
{
|
||||
itemNodes.Remove(key);
|
||||
}
|
||||
/// <summary>
|
||||
/// RESTITUISCE un item da KEY
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
public virtual object getItemNode(string key)
|
||||
{
|
||||
return itemNodes[key].cObject;
|
||||
}
|
||||
/// <summary>
|
||||
/// AGGIORNA un generico item all'elenco di quelli tracciati (NON STRONGLY TYPED!!! occhio!!!)
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="value"></param>
|
||||
public virtual void updateItemNodeValue(string key, object value)
|
||||
{
|
||||
itemNodes[key].cObject = value;
|
||||
}
|
||||
/// <summary>
|
||||
/// AGGIORNA un generico item all'elenco di quelli tracciati (NON STRONGLY TYPED!!! occhio!!!)
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="code"></param>
|
||||
/// <param name="value"></param>
|
||||
public virtual void updateItemNodeCodeValue(string key, string code, object value)
|
||||
{
|
||||
itemNodes[key].cObject = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggiunge un generico item all'elenco di quelli tracciati (NON STRONGLY TYPED!!! occhio!!!)
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="value"></param>
|
||||
public virtual void addConditionNode(string key, object value)
|
||||
{
|
||||
// se non c'è già elemento lo aggiungo...
|
||||
if (!conditionNodes.ContainsKey(key))
|
||||
{
|
||||
// default: event...
|
||||
itemNode currItem = new itemNode(itemType.Condition, value);
|
||||
conditionNodes.Add(key, currItem);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Rimuove TUTTI i CONDITION NODES tracciati
|
||||
/// </summary>
|
||||
public virtual void removeAllConditionNodes()
|
||||
{
|
||||
conditionNodes.Clear();
|
||||
}
|
||||
/// <summary>
|
||||
/// Rimuove un CONDITION NODE dall'elenco di quelli tracciati
|
||||
/// </summary>
|
||||
/// <param name="key">chaive</param>
|
||||
public virtual void removeConditionNode(string key)
|
||||
{
|
||||
conditionNodes.Remove(key);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region gestione allarmi
|
||||
|
||||
/// <summary>
|
||||
/// processo il vettore LOCALE degli allarmi
|
||||
/// </summary>
|
||||
public virtual void processAlarm()
|
||||
{
|
||||
if (AlarmFlags != null)
|
||||
{
|
||||
// variabili helper
|
||||
StFlag32 AlarmBlock = 0;
|
||||
allarme currAllarm;
|
||||
// controllo TUTTI i bit della variabile COMPLETA degli status allarmi: se ce ne sono di alzati DEVO processare...
|
||||
for (int i = 0; i < AlarmFlags.Length / 4; i++)
|
||||
{
|
||||
// leggo 32bit alla volta...
|
||||
AlarmBlock = (StFlag32)BitConverter.ToUInt32(AlarmFlags, i * 4);
|
||||
for (int j = 0; j < 32; j++)
|
||||
{
|
||||
// converto! e aggiungo allarmi sollevati al corretto controller allarmi...
|
||||
if (AlarmBlock.HasFlag((StFlag32)Math.Pow(2, j)))
|
||||
{
|
||||
// recupero allarme da oggetto in memoria...
|
||||
currAllarm = elencoAllarmi[i * 32 + j];
|
||||
addAlarm(currAllarm);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// SETUP oggetti gestione allarmi
|
||||
/// </summary>
|
||||
public virtual void addAlarmNodes()
|
||||
{
|
||||
// minimo sempre PLC/CNC
|
||||
addConditionNode("CNC", "CNC");
|
||||
addConditionNode("PLC", "PLC");
|
||||
}
|
||||
/// <summary>
|
||||
/// INIT allarmi a normal
|
||||
/// </summary>
|
||||
public virtual void initAlarms()
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// INIT di un SINGOLO NODO di allarme a normal
|
||||
/// </summary>
|
||||
/// <param name="alarmNode"></param>
|
||||
public virtual void initAlarm(itemNode alarmNode)
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// Aggiunta SINGOLO allarme su GENERICO (global) nodo
|
||||
/// </summary>
|
||||
/// <param name="currAllarm">Allarme da riportare al nodo</param>
|
||||
public virtual void addAlarm(allarme currAllarm)
|
||||
{
|
||||
#if false
|
||||
// in base al tipo di allarme decodifico condizione...
|
||||
Condition.Level livello = Condition.Level.NORMAL;
|
||||
switch (currAllarm.livello)
|
||||
{
|
||||
case "WARNING":
|
||||
livello = Condition.Level.WARNING;
|
||||
break;
|
||||
case "FAULT":
|
||||
default:
|
||||
livello = Condition.Level.FAULT;
|
||||
break;
|
||||
}
|
||||
// in base al gruppo decido dove assegnare come CONDITION...
|
||||
switch (currAllarm.gruppo)
|
||||
{
|
||||
case "PLC":
|
||||
mAlarmPLC.Add(livello, currAllarm.descrizione, currAllarm.codNum, "", "");
|
||||
break;
|
||||
case "CNC":
|
||||
default:
|
||||
mAlarmCNC.Add(livello, currAllarm.descrizione, currAllarm.codNum, "", "");
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
/// <summary>
|
||||
/// Aggiunta SINGOLO allarme su SPECIFICO nodo
|
||||
/// </summary>
|
||||
/// <param name="alarmNode">Generico nodo di tipo condition</param>
|
||||
/// <param name="currAllarm">Allarme da riportare al nodo</param>
|
||||
public virtual void addAlarm(itemNode alarmNode, allarme currAllarm)
|
||||
{
|
||||
#if false
|
||||
// in base al tipo di allarme decodifico condizione...
|
||||
Condition.Level livello = Condition.Level.NORMAL;
|
||||
switch (currAllarm.livello)
|
||||
{
|
||||
case "WARNING":
|
||||
livello = Condition.Level.WARNING;
|
||||
break;
|
||||
case "FAULT":
|
||||
default:
|
||||
livello = Condition.Level.FAULT;
|
||||
break;
|
||||
}
|
||||
// in base al gruppo decido dove assegnare come CONDITION...
|
||||
switch (currAllarm.gruppo)
|
||||
{
|
||||
case "PLC":
|
||||
mAlarmPLC.Add(livello, currAllarm.descrizione, currAllarm.codNum, "", "");
|
||||
break;
|
||||
case "CNC":
|
||||
default:
|
||||
mAlarmCNC.Add(livello, currAllarm.descrizione, currAllarm.codNum, "", "");
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
/// <summary>
|
||||
/// RESTITUISCE un nodo CONDITION da KEY
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
public virtual object getAlarmNode(string key)
|
||||
{
|
||||
return conditionNodes[key];
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Classe item node (tipo/obj)
|
||||
/// </summary>
|
||||
public class itemNode
|
||||
{
|
||||
/// <summary>
|
||||
/// Tipo oggetto (per cast)
|
||||
/// </summary>
|
||||
public itemType cType;
|
||||
/// <summary>
|
||||
/// Object specifico
|
||||
/// </summary>
|
||||
public object cObject;
|
||||
/// <summary>
|
||||
/// costruttore
|
||||
/// </summary>
|
||||
public itemNode()
|
||||
{ }
|
||||
/// <summary>
|
||||
/// costruttore
|
||||
/// </summary>
|
||||
/// <param name="_tipo"></param>
|
||||
/// <param name="_obj"></param>
|
||||
public itemNode(itemType _tipo, object _obj)
|
||||
{
|
||||
cType = _tipo;
|
||||
cObject = _obj;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tipologia protocolli di comunicazione ammessi
|
||||
/// </summary>
|
||||
public enum gwProtocol
|
||||
{
|
||||
/// <summary>
|
||||
/// NESSUN protocollo reale --> FILE DUMP sul log...
|
||||
/// </summary>
|
||||
LOGFILE,
|
||||
/// <summary>
|
||||
/// Protocollo di comunicazione MTConnect
|
||||
/// </summary>
|
||||
MTC,
|
||||
/// <summary>
|
||||
/// Protocollo di comunicazione SCM.OPC.UA.REDIS.SERVER
|
||||
/// </summary>
|
||||
SOURS
|
||||
}
|
||||
/// <summary>
|
||||
/// Tipologia di ITEM
|
||||
/// </summary>
|
||||
public enum itemType
|
||||
{
|
||||
/// <summary>
|
||||
/// CONDIZION = ALLARME
|
||||
/// </summary>
|
||||
Condition,
|
||||
/// <summary>
|
||||
/// Evento = point in time data
|
||||
/// </summary>
|
||||
Event,
|
||||
/// <summary>
|
||||
/// Messaggio generico
|
||||
/// </summary>
|
||||
Message,
|
||||
/// <summary>
|
||||
/// Campionamento continuo
|
||||
/// </summary>
|
||||
Sample
|
||||
}
|
||||
/// <summary>
|
||||
/// Varibili STATO ATTIVO (es attuatori, sistemi...)
|
||||
/// </summary>
|
||||
public enum actStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// Stato inattivo
|
||||
/// </summary>
|
||||
INACTIVE = 0,
|
||||
/// <summary>
|
||||
/// Stato Attivo
|
||||
/// </summary>
|
||||
ACTIVE
|
||||
}
|
||||
/// <summary>
|
||||
/// Varibili STATO OnOff
|
||||
/// </summary>
|
||||
public enum onOffStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// Stato OFF
|
||||
/// </summary>
|
||||
OFF = 0,
|
||||
/// <summary>
|
||||
/// Stato ON
|
||||
/// </summary>
|
||||
ON
|
||||
}
|
||||
/// <summary>
|
||||
/// Varibili STATO per EMERGENZA
|
||||
/// </summary>
|
||||
public enum emStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// Stato ARMATO
|
||||
/// </summary>
|
||||
ARMED = 0,
|
||||
/// <summary>
|
||||
/// Stato EMERGENZA PREMUTA
|
||||
/// </summary>
|
||||
TRIGGERED
|
||||
}
|
||||
/// <summary>
|
||||
/// Varibili STATO per AVAIL
|
||||
/// </summary>
|
||||
public enum availStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// Stato DISPONIBILE
|
||||
/// </summary>
|
||||
AVAILABLE = 0,
|
||||
/// <summary>
|
||||
/// Stato NON disponibile
|
||||
/// </summary>
|
||||
UNAVAILABLE
|
||||
}
|
||||
/// <summary>
|
||||
/// Varibili STATO per AVAIL
|
||||
/// </summary>
|
||||
public enum pathType
|
||||
{
|
||||
/// <summary>
|
||||
/// Stato LAVORO
|
||||
/// </summary>
|
||||
LAVORO = 0,
|
||||
/// <summary>
|
||||
/// Stato ASSERV
|
||||
/// </summary>
|
||||
ASSERV
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,287 @@
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using System.Linq;
|
||||
//using System.Text;
|
||||
//using System.Threading.Tasks;
|
||||
//using MTC;
|
||||
using MTC;
|
||||
using MTConnect;
|
||||
|
||||
namespace SCMA.AdapterCom
|
||||
{
|
||||
public class GatewayMTC : Gateway
|
||||
{
|
||||
/// <summary>
|
||||
/// adapter globale MTC
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
public Adapter mAdapter = new Adapter();
|
||||
|
||||
#region gestione globale oggetto
|
||||
|
||||
/// <summary>
|
||||
/// wrapper init
|
||||
/// </summary>
|
||||
public GatewayMTC()
|
||||
{
|
||||
protocollo = gwProtocol.MTC;
|
||||
}
|
||||
/// <summary>
|
||||
/// Wrapper metodo Begin
|
||||
/// </summary>
|
||||
public override void beginDataCollect()
|
||||
{
|
||||
mAdapter.Begin();
|
||||
}
|
||||
/// <summary>
|
||||
/// Wrapper metodo SendChanged
|
||||
/// </summary>
|
||||
public override void sendChanged()
|
||||
{
|
||||
mAdapter.SendChanged();
|
||||
}
|
||||
/// <summary>
|
||||
/// Wrapper metodo imposta tutto a UNAVAILABLE
|
||||
/// </summary>
|
||||
public override void setAllUnavailable()
|
||||
{
|
||||
mAdapter.Unavailable();
|
||||
}
|
||||
/// <summary>
|
||||
/// Wrapper metodo START
|
||||
/// </summary>
|
||||
public override void start()
|
||||
{
|
||||
mAdapter.Port = port;
|
||||
mAdapter.Start();
|
||||
}
|
||||
/// <summary>
|
||||
/// Wrapper metodo STOP
|
||||
/// </summary>
|
||||
public override void stop()
|
||||
{
|
||||
mAdapter.Stop();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region gestione nodi (dataItems, conditions)
|
||||
|
||||
public override void addItemNodeByType(string key, itemType tipo)
|
||||
{
|
||||
if (!itemNodes.ContainsKey(key))
|
||||
{
|
||||
// in base al TIPO genero l'oggetto corretto...
|
||||
DataItem currObj;
|
||||
switch (tipo)
|
||||
{
|
||||
case itemType.Condition:
|
||||
currObj = new Condition(key);
|
||||
break;
|
||||
case itemType.Event:
|
||||
currObj = new Event(key);
|
||||
break;
|
||||
case itemType.Message:
|
||||
currObj = new Message(key);
|
||||
break;
|
||||
case itemType.Sample:
|
||||
currObj = new Sample(key);
|
||||
break;
|
||||
default:
|
||||
currObj = new DataItem(key);
|
||||
break;
|
||||
}
|
||||
mAdapter.AddDataItem(currObj);
|
||||
if (tipo == itemType.Condition)
|
||||
{
|
||||
addConditionNode(key, currObj);
|
||||
addItemNode(key, currObj);
|
||||
}
|
||||
else
|
||||
{
|
||||
addItemNode(key, currObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// Effettua chiamata VERA su adapter MTConnect...
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
public override void addItemNode(string key, object value)
|
||||
{
|
||||
if (!itemNodes.ContainsKey(key))
|
||||
{
|
||||
base.addItemNode(key, value);
|
||||
// aggiungo ad adapter
|
||||
mAdapter.AddDataItem((DataItem)value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Effettua chiamata VERA su adapter MTConnect...
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
public override void addItemNode(object value)
|
||||
{
|
||||
DataItem currObj = (DataItem)value;
|
||||
string key = value.ToString().Replace("|", "");
|
||||
try
|
||||
{
|
||||
key = key.Replace(currObj.Value.ToString(), "");
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
if (!itemNodes.ContainsKey(key))
|
||||
{
|
||||
base.addItemNode(key, value);
|
||||
// aggiungo ad adapter
|
||||
mAdapter.AddDataItem((DataItem)value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Wrapper metodo rimozione di TUTTI gli ITEMS
|
||||
/// </summary>
|
||||
public override void removeAllItemNodes()
|
||||
{
|
||||
foreach (var item in itemNodes)
|
||||
{
|
||||
// rimuovo da MTC
|
||||
mAdapter.RemoveDataItem((DataItem)item.Value.cObject);
|
||||
}
|
||||
base.removeAllItemNodes();
|
||||
}
|
||||
/// <summary>
|
||||
/// Wrapper metodo rimozione ITEMS
|
||||
/// </summary>
|
||||
/// <param name="anItem"></param>
|
||||
public override void removeItemNode(string key)
|
||||
{
|
||||
// rimuovo da MTC
|
||||
mAdapter.RemoveDataItem((DataItem)itemNodes[key].cObject);
|
||||
// rimuovo da vett interno
|
||||
base.removeItemNode(key);
|
||||
}
|
||||
public override void updateItemNodeValue(string key, object value)
|
||||
{
|
||||
((DataItem)getItemNode(key)).Value = value;
|
||||
}
|
||||
public override void updateItemNodeCodeValue(string key, string code, object value)
|
||||
{
|
||||
((Message)getItemNode(key)).Code = code;
|
||||
((Message)getItemNode(key)).Value = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// wrapper aggiunta condizione
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="value"></param>
|
||||
public override void addConditionNode(string key, object value)
|
||||
{
|
||||
base.addConditionNode(key, value);
|
||||
// aggiungo ad adapter
|
||||
mAdapter.AddDataItem((Condition)value);
|
||||
}
|
||||
public override void removeAllConditionNodes()
|
||||
{
|
||||
foreach (var item in conditionNodes)
|
||||
{
|
||||
// rimuovo da MTC
|
||||
mAdapter.RemoveDataItem((Condition)item.Value.cObject);
|
||||
}
|
||||
base.removeAllConditionNodes();
|
||||
}
|
||||
public override void removeConditionNode(string key)
|
||||
{
|
||||
// rimuovo da MTC
|
||||
mAdapter.RemoveDataItem((Condition)conditionNodes[key].cObject);
|
||||
// rimuovo da vett interno
|
||||
base.removeConditionNode(key);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region gestione allarmi
|
||||
|
||||
/// <summary>
|
||||
/// Speciofica implementazione x formattazione ALLARMI
|
||||
/// </summary>
|
||||
/// <param name="currAllarm"></param>
|
||||
public override void addAlarm(allarme currAllarm)
|
||||
{
|
||||
// in base al tipo di allarme decodifico condizione...
|
||||
Condition.Level livello = Condition.Level.NORMAL;
|
||||
switch (currAllarm.livello)
|
||||
{
|
||||
case "WARNING":
|
||||
livello = Condition.Level.WARNING;
|
||||
break;
|
||||
case "FAULT":
|
||||
default:
|
||||
livello = Condition.Level.FAULT;
|
||||
break;
|
||||
}
|
||||
if (conditionNodes.ContainsKey(currAllarm.gruppo))
|
||||
{
|
||||
Condition mAlarm = (Condition)conditionNodes[currAllarm.gruppo].cObject;
|
||||
mAlarm.Add(livello, currAllarm.descrizione, currAllarm.codNum, "", "");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Speciofica implementazione x formattazione ALLARMI
|
||||
/// </summary>
|
||||
/// <param name="currAllarm"></param>
|
||||
/// <param name="alarmNode">Generico nodo di tipo condition</param>
|
||||
public override void addAlarm(itemNode alarmNode, allarme currAllarm)
|
||||
{
|
||||
// in base al tipo di allarme decodifico condizione...
|
||||
Condition.Level livello = Condition.Level.NORMAL;
|
||||
switch (currAllarm.livello)
|
||||
{
|
||||
case "WARNING":
|
||||
livello = Condition.Level.WARNING;
|
||||
break;
|
||||
case "FAULT":
|
||||
default:
|
||||
livello = Condition.Level.FAULT;
|
||||
break;
|
||||
}
|
||||
Condition mAlarm = (Condition)alarmNode.cObject;
|
||||
mAlarm.Add(livello, currAllarm.descrizione, currAllarm.codNum, "", "");
|
||||
}
|
||||
/// <summary>
|
||||
/// Wrapper setup obj allarmi
|
||||
/// </summary>
|
||||
public override void addAlarmNodes()
|
||||
{
|
||||
// registro
|
||||
Condition newCondNode;
|
||||
newCondNode = new Condition("CNC");
|
||||
addConditionNode("CNC", newCondNode);
|
||||
newCondNode = new Condition("PLC");
|
||||
addConditionNode("PLC", newCondNode);
|
||||
}
|
||||
/// <summary>
|
||||
/// Wrapper inizializzazione allarmi
|
||||
/// </summary>
|
||||
public override void initAlarms()
|
||||
{
|
||||
// trasformo i nodi in elenchi conditions e li aggiungo...
|
||||
foreach (var item in conditionNodes)
|
||||
{
|
||||
((Condition)item.Value.cObject).Normal();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// inizializazione allarme a normal
|
||||
/// </summary>
|
||||
/// <param name="alarmNode"></param>
|
||||
public override void initAlarm(itemNode alarmNode)
|
||||
{
|
||||
Condition mAlarm = (Condition)alarmNode.cObject;
|
||||
mAlarm.Normal();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using System.Linq;
|
||||
//using System.Text;
|
||||
//using System.Threading.Tasks;
|
||||
|
||||
namespace SCMA.AdapterCom
|
||||
{
|
||||
public class GatewaySOURS : Gateway
|
||||
{
|
||||
public GatewaySOURS()
|
||||
{
|
||||
protocollo = gwProtocol.SOURS;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace MTC_Adapter
|
||||
namespace SCMA
|
||||
{
|
||||
#region -- AdapterConf Class --
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
using MTC;
|
||||
using MTConnect;
|
||||
using SCMA.AdapterCom;
|
||||
using System;
|
||||
|
||||
namespace SCMA
|
||||
{
|
||||
public class AdapterDemo : AdapterGeneric
|
||||
{
|
||||
public Condition mTemp;
|
||||
public Condition mFillLevel;
|
||||
|
||||
/// <summary>
|
||||
/// estende l'init della classe base...
|
||||
/// </summary>
|
||||
/// <param name="caller">FORM chaimante</param>
|
||||
/// <param name="adpConf">CONFIGURAZIONE adapter</param>
|
||||
/// <param name="gatewayObj">OGGETTO gestione comunicazione OUT (tipologia e metodi)</param>
|
||||
public AdapterDemo(MainForm caller, AdapterConf adpConf, Gateway gatewayObj) : base(caller, adpConf, gatewayObj)
|
||||
{
|
||||
if (utils.CRB("verbose"))
|
||||
{
|
||||
lg.Info("Start init Adapter DEMO");
|
||||
}
|
||||
// IMPLICITO: carica da metodo base tutte le specifiche del conf...
|
||||
|
||||
mTemp = new Condition("temp");
|
||||
mFillLevel = new Condition("cool_low", true);
|
||||
// aggiungo specifiche del demo: allarmi gestiti a buttons!!!
|
||||
currGateway.addItemNode("temp", mTemp);
|
||||
currGateway.addItemNode("cool_low", mFillLevel);
|
||||
}
|
||||
|
||||
public override void startAdapter()
|
||||
{
|
||||
base.startAdapter();
|
||||
// aggiungo altre condizioni specifiche...
|
||||
mTemp.Normal();
|
||||
mFillLevel.Normal();
|
||||
}
|
||||
|
||||
public override void getSlowChangingData()
|
||||
{
|
||||
// recupero SEMPRE dati ulteriori: status ON/OFF, clock, ...
|
||||
currGateway.updateItemNodeValue("STATUS", parentForm.datiProd.Status);
|
||||
currGateway.updateItemNodeValue("ACC_TIME", parentForm.datiProd.AccTime);
|
||||
currGateway.updateItemNodeValue("OperatorId", parentForm.datiProd.Operator);
|
||||
currGateway.updateItemNodeValue("POWER", parentForm.datiProd.Power);
|
||||
currGateway.updateItemNodeValue("CLOCK", DateTime.Now.Date.ToFileTimeUtc());
|
||||
}
|
||||
|
||||
public override void getStrobeAndAckStatus()
|
||||
{
|
||||
base.getStrobeAndAckStatus();
|
||||
|
||||
// controllo bool allarmi...
|
||||
if (parentForm.datiProd.EmrStop)
|
||||
{
|
||||
currGateway.updateItemNodeValue("E_STOP", emStatus.TRIGGERED.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
currGateway.updateItemNodeValue("E_STOP", emStatus.ARMED.ToString());
|
||||
}
|
||||
|
||||
// imposto func mode...
|
||||
currGateway.updateItemNodeValue("FUNCT_MODE", parentForm.datiProd.FuncMode);
|
||||
|
||||
// se ho un messaggio...
|
||||
if (parentForm.datiProd.MessageText.Length > 0)
|
||||
{
|
||||
currGateway.updateItemNodeCodeValue("MESSAGE", parentForm.datiProd.MessageCode, parentForm.datiProd.MessageText);
|
||||
}
|
||||
}
|
||||
|
||||
public override void getConfigParam()
|
||||
{
|
||||
base.getConfigParam();
|
||||
}
|
||||
|
||||
|
||||
public override void processStrobe()
|
||||
{
|
||||
// qui forzo la gestione di update dei path & co...
|
||||
getPath();
|
||||
getUnOp();
|
||||
getAxis();
|
||||
}
|
||||
/// <summary>
|
||||
/// non fa nulla perché recupera allarmi in vettore al singolo cambio...
|
||||
/// </summary>
|
||||
/// <param name="Alarm2Refresh"></param>
|
||||
/// <param name="giveAck"></param>
|
||||
public override void refreshAlarmState(StFlag32 Alarm2Refresh, bool giveAck)
|
||||
{
|
||||
base.refreshAlarmState(Alarm2Refresh, giveAck);
|
||||
}
|
||||
|
||||
public override void getPath()
|
||||
{
|
||||
base.getPath();
|
||||
|
||||
PathData PtData = parentForm.CurrPath;
|
||||
if (PtData.PathSel >= 0)
|
||||
{
|
||||
currGateway.updateItemNodeValue(vettPath[PtData.PathSel].feedKey, PtData.PathFeedrate);
|
||||
currGateway.updateItemNodeValue(vettPath[PtData.PathSel].feedOverKey, PtData.PathFeedrateOver);
|
||||
currGateway.updateItemNodeValue(vettPath[PtData.PathSel].rapidOverKey, PtData.PathRapidOver);
|
||||
currGateway.updateItemNodeValue(vettPath[PtData.PathSel].posAct_X_Key, PtData.PathPosAct.x);
|
||||
currGateway.updateItemNodeValue(vettPath[PtData.PathSel].posAct_Y_Key, PtData.PathPosAct.y);
|
||||
currGateway.updateItemNodeValue(vettPath[PtData.PathSel].posAct_Z_Key, PtData.PathPosAct.z);
|
||||
currGateway.updateItemNodeValue(vettPath[PtData.PathSel].posAct_I_Key, PtData.PathPosAct.i);
|
||||
currGateway.updateItemNodeValue(vettPath[PtData.PathSel].posAct_J_Key, PtData.PathPosAct.j);
|
||||
currGateway.updateItemNodeValue(vettPath[PtData.PathSel].posAct_K_Key, PtData.PathPosAct.k);
|
||||
// aggiunta x revisione 2016.05.05
|
||||
currGateway.updateItemNodeValue(vettPath[PtData.PathSel].pathTypeKey, PtData.PathType);
|
||||
currGateway.updateItemNodeValue(vettPath[PtData.PathSel].partIdKey, PtData.PartId);
|
||||
currGateway.updateItemNodeValue(vettPath[PtData.PathSel].partCountKey, PtData.pzTot);
|
||||
currGateway.updateItemNodeValue(vettPath[PtData.PathSel].runModeKey, PtData.RunMode);
|
||||
currGateway.updateItemNodeValue(vettPath[PtData.PathSel].exeModeKey, PtData.ExeMode);
|
||||
currGateway.updateItemNodeValue(vettPath[PtData.PathSel].currProgKey, PtData.ProgramName);
|
||||
currGateway.updateItemNodeValue(vettPath[PtData.PathSel].currProgRowNumKey, PtData.ProgrRow);
|
||||
currGateway.updateItemNodeValue(vettPath[PtData.PathSel].activeAxesKey, PtData.ActiveAxes);
|
||||
}
|
||||
}
|
||||
|
||||
public override void getUnOp()
|
||||
{
|
||||
base.getUnOp();
|
||||
|
||||
UnOpData uoData = parentForm.CurrUnOp;
|
||||
if (uoData.UnOpSel >= 0)
|
||||
{
|
||||
currGateway.updateItemNodeValue(vettUnOp[uoData.UnOpSel].toolIdKey, uoData.UnOpToolId);
|
||||
currGateway.updateItemNodeValue(vettUnOp[uoData.UnOpSel].numCUKey, uoData.UnOpNumCU);
|
||||
currGateway.updateItemNodeValue(vettUnOp[uoData.UnOpSel].statusKey, uoData.UnOpStatus);
|
||||
currGateway.updateItemNodeValue(vettUnOp[uoData.UnOpSel].vitaResKey, uoData.UnOpVitaRes);
|
||||
currGateway.updateItemNodeValue(vettUnOp[uoData.UnOpSel].speedKey, uoData.UnOpSpeed);
|
||||
currGateway.updateItemNodeValue(vettUnOp[uoData.UnOpSel].loadKey, uoData.UnOpLoad);
|
||||
currGateway.updateItemNodeValue(vettUnOp[uoData.UnOpSel].accTimeKey, uoData.UnOpAccTime);
|
||||
}
|
||||
}
|
||||
|
||||
public override void getAxis()
|
||||
{
|
||||
base.getAxis();
|
||||
AxisData AxData = parentForm.CurrAxis;
|
||||
if (AxData.AxisSel >= 0)
|
||||
{
|
||||
// USO asse selezionato + dati visualizzati e di conseguenza aggiorno...
|
||||
currGateway.updateItemNodeValue(vettAxis[AxData.AxisSel].mainProcKey, AxData.AxisMainProc);
|
||||
currGateway.updateItemNodeValue(vettAxis[AxData.AxisSel].mainProcKey, AxData.AxisIsMaster);
|
||||
currGateway.updateItemNodeValue(vettAxis[AxData.AxisSel].mainProcKey, AxData.AxisMastId);
|
||||
currGateway.updateItemNodeValue(vettAxis[AxData.AxisSel].mainProcKey, AxData.AxisType);
|
||||
currGateway.updateItemNodeValue(vettAxis[AxData.AxisSel].mainProcKey, AxData.AxisDir);
|
||||
currGateway.updateItemNodeValue(vettAxis[AxData.AxisSel].mainProcKey, AxData.AxisLoad);
|
||||
currGateway.updateItemNodeValue(vettAxis[AxData.AxisSel].mainProcKey, AxData.AxisPosAct);
|
||||
currGateway.updateItemNodeValue(vettAxis[AxData.AxisSel].mainProcKey, AxData.AxisPosTgt);
|
||||
currGateway.updateItemNodeValue(vettAxis[AxData.AxisSel].mainProcKey, AxData.AxisFeedAct);
|
||||
currGateway.updateItemNodeValue(vettAxis[AxData.AxisSel].mainProcKey, AxData.AxisFeedOver);
|
||||
currGateway.updateItemNodeValue(vettAxis[AxData.AxisSel].mainProcKey, AxData.AxisAccel);
|
||||
currGateway.updateItemNodeValue(vettAxis[AxData.AxisSel].mainProcKey, AxData.AxisAccTime);
|
||||
currGateway.updateItemNodeValue(vettAxis[AxData.AxisSel].mainProcKey, AxData.AxisBattery);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
using MTC;
|
||||
using MTConnect;
|
||||
using SCMA.AdapterCom;
|
||||
using SCMCncLib;
|
||||
using System;
|
||||
using System.IO;
|
||||
@@ -7,7 +7,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
namespace MTC_Adapter
|
||||
namespace SCMA
|
||||
{
|
||||
public class AdapterESA : AdapterGeneric
|
||||
{
|
||||
@@ -97,7 +97,11 @@ namespace MTC_Adapter
|
||||
/// </summary>
|
||||
protected void loadAllarmiCNC()
|
||||
{
|
||||
if (utils.CRB("verbose")) lg.Info("Inizio caricamento vettore allarmi");
|
||||
if (utils.CRB("verbose"))
|
||||
{
|
||||
lg.Info("Inizio caricamento vettore allarmi");
|
||||
}
|
||||
|
||||
int totRighe = 0;
|
||||
string fileName = string.Format(@"{0}\{1}", utils.confDir, utils.CRS("AlarmListCNC"));
|
||||
string linea;
|
||||
@@ -133,7 +137,10 @@ namespace MTC_Adapter
|
||||
}
|
||||
// chiudo file
|
||||
file.Close();
|
||||
if (utils.CRB("verbose")) lg.Info(string.Format("Fine caricamento vettore allarmi CNC: {0} allarmi caricati!", numRiga));
|
||||
if (utils.CRB("verbose"))
|
||||
{
|
||||
lg.Info(string.Format("Fine caricamento vettore allarmi CNC: {0} allarmi caricati!", numRiga));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Restituisce path completo file da chaive configurazione
|
||||
@@ -217,7 +224,10 @@ namespace MTC_Adapter
|
||||
// ora trimmo vettore al solo numero VERO dei valori caricati...
|
||||
Array.Resize<otherData>(ref vettoreConf, numRiga);
|
||||
|
||||
if (utils.CRB("verbose")) lg.Info(string.Format("Fine caricamento vettore di {0} variabili per file {1}", numRiga, nomeFile));
|
||||
if (utils.CRB("verbose"))
|
||||
{
|
||||
lg.Info(string.Format("Fine caricamento vettore di {0} variabili per file {1}", numRiga, nomeFile));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -231,10 +241,11 @@ namespace MTC_Adapter
|
||||
|
||||
/// <summary>
|
||||
/// estende l'init della classe base...
|
||||
/// </summary>
|
||||
/// <param name="caller"></param>
|
||||
/// <param name="adpConf"></param>
|
||||
public AdapterESA(MainForm caller, AdapterConf adpConf) : base(caller, adpConf)
|
||||
/// </summary>
|
||||
/// <param name="caller">FORM chaimante</param>
|
||||
/// <param name="adpConf">CONFIGURAZIONE adapter</param>
|
||||
/// <param name="gatewayObj">OGGETTO gestione comunicazione OUT (tipologia e metodi)</param>
|
||||
public AdapterESA(MainForm caller, AdapterConf adpConf, Gateway gatewayObj) : base(caller, adpConf, gatewayObj)
|
||||
{
|
||||
string iniPath = string.Format(@"{0}\{1}", utils.confDir, utils.CRS("defaultEsaFile"));
|
||||
|
||||
@@ -242,7 +253,10 @@ namespace MTC_Adapter
|
||||
|
||||
IniFiles.IniFile EsaIni = new IniFiles.IniFile(iniPath);
|
||||
|
||||
if (utils.CRB("verbose")) lg.Info("step 01: impostato INI File {0}", iniPath);
|
||||
if (utils.CRB("verbose"))
|
||||
{
|
||||
lg.Info("step 01: impostato INI File {0}", iniPath);
|
||||
}
|
||||
|
||||
loadOtherFile();
|
||||
|
||||
@@ -251,7 +265,10 @@ namespace MTC_Adapter
|
||||
ncDevice = new thdNcEsaGvKvara(EsaIni, numByte, numWord, numDWord, numString); // impostato a 255 byte (char) FISSO x la parte stringa... mapIOT_String.Length);
|
||||
parentForm.commPlcActive = false;
|
||||
|
||||
if (utils.CRB("verbose")) lg.Info("step 02: avviato thdNcEsaGvKvara da INI File {0}", iniPath);
|
||||
if (utils.CRB("verbose"))
|
||||
{
|
||||
lg.Info("step 02: avviato thdNcEsaGvKvara da INI File {0}", iniPath);
|
||||
}
|
||||
|
||||
// inizializzo posizioni assi...
|
||||
prevPosAxis = new double[adpConf.nAxis];
|
||||
@@ -320,7 +337,11 @@ namespace MTC_Adapter
|
||||
parentForm.commPlcActive = true;
|
||||
inizio = DateTime.Now;
|
||||
ncDevice.ReadBufferByte();
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-PLC_IOT-Byte", ncDevice.PLC_MemoryAreaIOT_Byte.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-PLC_IOT-Byte", ncDevice.PLC_MemoryAreaIOT_Byte.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
parentForm.commPlcActive = false;
|
||||
}
|
||||
else
|
||||
@@ -386,8 +407,8 @@ namespace MTC_Adapter
|
||||
pathRunMode = "NA";
|
||||
break;
|
||||
}
|
||||
// salvo run mode
|
||||
vettPath[idxPath].mPathRunMode.Value = pathRunMode;
|
||||
// salvo run mode
|
||||
currGateway.updateItemNodeValue(vettPath[idxPath].runModeKey, pathRunMode);
|
||||
}
|
||||
else if (mapIOT_Byte[i].varName.StartsWith("IOT_LUB_"))
|
||||
{
|
||||
@@ -407,11 +428,11 @@ namespace MTC_Adapter
|
||||
{
|
||||
status = "OK";
|
||||
}
|
||||
vettLubro[numero - 1].mLubroStatus.Value = status;
|
||||
currGateway.updateItemNodeValue(vettLubro[numero - 1].statusKey, status);
|
||||
}
|
||||
else if (mapIOT_Byte[i].varName.EndsWith("_CNT"))
|
||||
{
|
||||
vettLubro[numero - 1].mLubroNum.Value = ncDevice.PLC_MemoryAreaIOT_Byte[byteNum];
|
||||
currGateway.updateItemNodeValue(vettLubro[numero - 1].countKey, ncDevice.PLC_MemoryAreaIOT_Byte[byteNum]);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -432,7 +453,7 @@ namespace MTC_Adapter
|
||||
// salvo in vettore SE possibile...
|
||||
if (numero <= vettUnOp.Length)
|
||||
{
|
||||
vettUnOp[numero - 1].mUnOpLoad.Value = ncDevice.PLC_MemoryAreaIOT_Byte[byteNum];
|
||||
currGateway.updateItemNodeValue(vettUnOp[numero - 1].loadKey, ncDevice.PLC_MemoryAreaIOT_Byte[byteNum]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -461,11 +482,11 @@ namespace MTC_Adapter
|
||||
{
|
||||
if (((StFlag8)currByte).HasFlag((StFlag8)Math.Pow(2, bitNum)))
|
||||
{
|
||||
mPower.Value = "ON";
|
||||
currGateway.updateItemNodeValue("POWER", onOffStatus.ON.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
mPower.Value = "OFF";
|
||||
currGateway.updateItemNodeValue("POWER", onOffStatus.OFF.ToString());
|
||||
}
|
||||
}
|
||||
else if (mapIOT_Byte[i].varName == "IOT_READY")
|
||||
@@ -484,11 +505,11 @@ namespace MTC_Adapter
|
||||
{
|
||||
if (((StFlag8)currByte).HasFlag((StFlag8)Math.Pow(2, bitNum)))
|
||||
{
|
||||
mEStop.Value = "TRIGGERED";
|
||||
currGateway.updateItemNodeValue("E_STOP", emStatus.TRIGGERED.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
mEStop.Value = "ARMED";
|
||||
currGateway.updateItemNodeValue("E_STOP", emStatus.ARMED.ToString());
|
||||
}
|
||||
}
|
||||
else if (mapIOT_Byte[i].varName == "IOT_ALRM")
|
||||
@@ -512,8 +533,7 @@ namespace MTC_Adapter
|
||||
ProgAreaRun = "ON";
|
||||
ProgAreaRunCode = 1;
|
||||
}
|
||||
vettMemArea[numero - 1].mMemAreaRunning.Code = ProgAreaRunCode.ToString();
|
||||
vettMemArea[numero - 1].mMemAreaRunning.Value = ProgAreaRun;
|
||||
currGateway.updateItemNodeCodeValue(vettMemArea[numero - 1].prgRunningKey, ProgAreaRunCode.ToString(), ProgAreaRun);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
@@ -539,7 +559,7 @@ namespace MTC_Adapter
|
||||
// salvo in vettore SE possibile...
|
||||
if (numero <= vettVacPump.Length)
|
||||
{
|
||||
vettVacPump[numero - 1].mVacPumpStatus.Value = VacStat;
|
||||
currGateway.updateItemNodeValue(vettVacPump[numero - 1].statusKey, VacStat);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -567,8 +587,7 @@ namespace MTC_Adapter
|
||||
{
|
||||
pathExeMode = "READY";
|
||||
}
|
||||
vettPath[idxPath].mPathExeMode.Value = pathExeMode;
|
||||
|
||||
currGateway.updateItemNodeValue(vettPath[idxPath].exeModeKey, pathExeMode);
|
||||
// sistemo le stringhe x display
|
||||
sb.AppendLine(string.Format("RunMode: {0}", pathRunMode));
|
||||
sb.AppendLine(string.Format("ExeMode: {0}", pathExeMode));
|
||||
@@ -589,7 +608,11 @@ namespace MTC_Adapter
|
||||
parentForm.commPlcActive = true;
|
||||
inizio = DateTime.Now;
|
||||
ncDevice.ReadBufferWord();
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-PLC_IOT-Word", ncDevice.PLC_MemoryAreaIOT_Word.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-PLC_IOT-Word", ncDevice.PLC_MemoryAreaIOT_Word.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
parentForm.commPlcActive = false;
|
||||
}
|
||||
else
|
||||
@@ -613,23 +636,15 @@ namespace MTC_Adapter
|
||||
// controllo, SE è 0 --> normal/niente, altrimenti è l'allarme indicato!!!
|
||||
if (numAlarmCNC == 0)
|
||||
{
|
||||
mAlarmCNC.Normal();
|
||||
// init TUTTI i nodi...
|
||||
currGateway.initAlarms();
|
||||
}
|
||||
else
|
||||
{
|
||||
allarme currAllarm = elencoAllarmiCNC[numAlarmCNC - 1];
|
||||
Condition.Level livello = Condition.Level.NORMAL;
|
||||
switch (currAllarm.livello)
|
||||
{
|
||||
case "WARNING":
|
||||
livello = Condition.Level.WARNING;
|
||||
break;
|
||||
case "FAULT":
|
||||
default:
|
||||
livello = Condition.Level.FAULT;
|
||||
break;
|
||||
}
|
||||
mAlarmCNC.Add(livello, currAllarm.descrizione, currAllarm.codNum, "", "");
|
||||
// forzo a CNC x siocurezza...
|
||||
currAllarm.gruppo = "CNC";
|
||||
currGateway.addAlarm(currAllarm);
|
||||
}
|
||||
}
|
||||
else if (mapIOT_Word[i].varName.StartsWith("IOT_S_MD_"))
|
||||
@@ -640,7 +655,7 @@ namespace MTC_Adapter
|
||||
// salvo in vettore SE possibile...
|
||||
if (numero <= vettUnOp.Length)
|
||||
{
|
||||
vettUnOp[numero - 1].mUnOpSpeed.Value = ncDevice.PLC_MemoryAreaIOT_Word[byteNum];
|
||||
currGateway.updateItemNodeValue(vettUnOp[numero - 1].speedKey, ncDevice.PLC_MemoryAreaIOT_Word[byteNum]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -660,7 +675,7 @@ namespace MTC_Adapter
|
||||
// salvo in vettore SE possibile...
|
||||
if (numero <= vettUnOp.Length)
|
||||
{
|
||||
vettUnOp[numero - 1].mUnOpToolId.Value = ncDevice.PLC_MemoryAreaIOT_Word[byteNum];
|
||||
currGateway.updateItemNodeValue(vettUnOp[numero - 1].toolIdKey, ncDevice.PLC_MemoryAreaIOT_Word[byteNum]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -681,7 +696,7 @@ namespace MTC_Adapter
|
||||
// salvo in vettore SE possibile...
|
||||
if (numero <= vettUnOp.Length)
|
||||
{
|
||||
vettUnOp[numero - 1].mUnOpNumCU.Value = ncDevice.PLC_MemoryAreaIOT_Word[byteNum];
|
||||
currGateway.updateItemNodeValue(vettUnOp[numero - 1].numCUKey, ncDevice.PLC_MemoryAreaIOT_Word[byteNum]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -701,7 +716,7 @@ namespace MTC_Adapter
|
||||
// salvo in vettore SE possibile...
|
||||
if (numero <= vettUnOp.Length)
|
||||
{
|
||||
vettUnOp[numero - 1].mUnOpAccTime.Value = ncDevice.PLC_MemoryAreaIOT_Word[byteNum];
|
||||
currGateway.updateItemNodeValue(vettUnOp[numero - 1].accTimeKey, ncDevice.PLC_MemoryAreaIOT_Word[byteNum]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -722,7 +737,7 @@ namespace MTC_Adapter
|
||||
// salvo in vettore SE possibile...
|
||||
if (numero <= vettVacPump.Length)
|
||||
{
|
||||
vettVacPump[numero - 1].mVacPumpWrkTime.Value = ncDevice.PLC_MemoryAreaIOT_Word[byteNum];
|
||||
currGateway.updateItemNodeValue(vettVacPump[numero - 1].workTimeKey, ncDevice.PLC_MemoryAreaIOT_Word[byteNum]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -742,7 +757,7 @@ namespace MTC_Adapter
|
||||
// salvo in vettore SE possibile...
|
||||
if (numero <= vettMemArea.Length)
|
||||
{
|
||||
vettMemArea[numero - 1].mMemAreaProgNumRep.Value = ncDevice.PLC_MemoryAreaIOT_Word[byteNum];
|
||||
currGateway.updateItemNodeValue(vettMemArea[numero - 1].numRepKey, ncDevice.PLC_MemoryAreaIOT_Word[byteNum]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -762,7 +777,7 @@ namespace MTC_Adapter
|
||||
// salvo in vettore SE possibile...
|
||||
if (numero <= vettMemArea.Length)
|
||||
{
|
||||
vettMemArea[numero - 1].mMemAreaProgNumExe.Value = ncDevice.PLC_MemoryAreaIOT_Word[byteNum];
|
||||
currGateway.updateItemNodeValue(vettMemArea[numero - 1].numExeKey, ncDevice.PLC_MemoryAreaIOT_Word[byteNum]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -778,7 +793,10 @@ namespace MTC_Adapter
|
||||
// verifico se nei mandini ho un tool e quanti cambi...
|
||||
for (int i = 0; i < vettUnOp.Length; i++)
|
||||
{
|
||||
if (vettUnOp[i].mUnOpToolId.Value.ToString() != "") sb.AppendLine(string.Format("UnOp_{0}: ToolId: {1} | NumCU: {2}", i + 1, vettUnOp[i].mUnOpToolId.Value, vettUnOp[i].mUnOpNumCU.Value));
|
||||
if (currGateway.getItemNode(vettUnOp[i].toolIdKey).ToString() != "")
|
||||
{
|
||||
sb.AppendLine(string.Format("UnOp_{0}: ToolId: {1} | NumCU: {2}", i + 1, currGateway.getItemNode(vettUnOp[i].toolIdKey), currGateway.getItemNode(vettUnOp[i].numCUKey)));
|
||||
}
|
||||
}
|
||||
// update form!
|
||||
parentForm.dataMonitor_2 += sb.ToString();
|
||||
@@ -796,7 +814,11 @@ namespace MTC_Adapter
|
||||
parentForm.commPlcActive = true;
|
||||
inizio = DateTime.Now;
|
||||
ncDevice.ReadBufferDWord();
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-PLC_IOT-DWord", ncDevice.PLC_MemoryAreaIOT_DWord.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-PLC_IOT-DWord", ncDevice.PLC_MemoryAreaIOT_DWord.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
parentForm.commPlcActive = false;
|
||||
}
|
||||
else
|
||||
@@ -845,7 +867,7 @@ namespace MTC_Adapter
|
||||
// salvo in vettore SE possibile...
|
||||
if (numero <= vettAxis.Length)
|
||||
{
|
||||
vettAxis[numero - 1].mAxDistDone.Value = ncDevice.PLC_MemoryAreaIOT_DWord[byteNum];
|
||||
currGateway.updateItemNodeValue(vettAxis[numero - 1].distDoneKey, ncDevice.PLC_MemoryAreaIOT_DWord[byteNum]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -866,7 +888,7 @@ namespace MTC_Adapter
|
||||
// salvo in vettore SE possibile...
|
||||
if (numero <= vettAxis.Length)
|
||||
{
|
||||
vettAxis[numero - 1].mAxInvDDone.Value = ncDevice.PLC_MemoryAreaIOT_DWord[byteNum];
|
||||
currGateway.updateItemNodeValue(vettAxis[numero - 1].invDDoneKey, ncDevice.PLC_MemoryAreaIOT_DWord[byteNum]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -885,12 +907,12 @@ namespace MTC_Adapter
|
||||
{
|
||||
numero = Convert.ToInt32(mapIOT_DWord[i].varName.Replace("IOT_POS_AX_", ""));
|
||||
// recupero valore pos assi (in micron)
|
||||
valDouble = (double)BitConverter.ToInt32(BitConverter.GetBytes(ncDevice.PLC_MemoryAreaIOT_DWord[byteNum]), 0);
|
||||
valDouble = BitConverter.ToInt32(BitConverter.GetBytes(ncDevice.PLC_MemoryAreaIOT_DWord[byteNum]), 0);
|
||||
// salvo in vettore SE possibile...
|
||||
if (numero <= vettAxis.Length)
|
||||
{
|
||||
// riporto il dato in mm (divido x 1000)
|
||||
vettAxis[numero - 1].mAxPosAct.Value = valDouble / utils.CRI("fattdecimale");
|
||||
// riporto il dato in mm (divido x 1000)
|
||||
currGateway.updateItemNodeValue(vettAxis[numero - 1].posActKey, valDouble / utils.CRI("fattdecimale"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -911,7 +933,7 @@ namespace MTC_Adapter
|
||||
// salvo in vettore SE possibile...
|
||||
if (numero <= vettUnOp.Length)
|
||||
{
|
||||
vettUnOp[numero - 1].mUnOpKRev.Value = ncDevice.PLC_MemoryAreaIOT_DWord[byteNum];
|
||||
currGateway.updateItemNodeValue(vettUnOp[numero - 1].kRevKey, ncDevice.PLC_MemoryAreaIOT_DWord[byteNum]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -930,7 +952,7 @@ namespace MTC_Adapter
|
||||
{
|
||||
numero = Convert.ToInt32(mapIOT_DWord[i].varName.Replace("IOT_PLC_MSG_", ""));
|
||||
// copio allarmi in vettore generale AlarmFlags (dove lo gestisce) 4 byte alla volta
|
||||
Buffer.BlockCopy(BitConverter.GetBytes(ncDevice.PLC_MemoryAreaIOT_DWord[byteNum]), 0, AlarmFlags, numero * 4, 4);
|
||||
Buffer.BlockCopy(BitConverter.GetBytes(ncDevice.PLC_MemoryAreaIOT_DWord[byteNum]), 0, currGateway.AlarmFlags, numero * 4, 4);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
@@ -943,7 +965,10 @@ namespace MTC_Adapter
|
||||
// verifico se nei gruppi di feed ho qualcosa di diverso da zero...
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
if (FeedRateGrp[i] != 0) sb.AppendLine(string.Format("FeedRate_{1}: {0:00} mm/min", FeedRateGrp[i], i));
|
||||
if (FeedRateGrp[i] != 0)
|
||||
{
|
||||
sb.AppendLine(string.Format("FeedRate_{1}: {0:00} mm/min", FeedRateGrp[i], i));
|
||||
}
|
||||
}
|
||||
// update form!
|
||||
parentForm.dataMonitor_1 += sb.ToString();
|
||||
@@ -961,7 +986,11 @@ namespace MTC_Adapter
|
||||
parentForm.commPlcActive = true;
|
||||
inizio = DateTime.Now;
|
||||
ncDevice.ReadBufferString();
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-PLC_IOT-DWord", ncDevice.PLC_MemoryAreaIOT_DWord.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-PLC_IOT-DWord", ncDevice.PLC_MemoryAreaIOT_DWord.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
parentForm.commPlcActive = false;
|
||||
}
|
||||
else
|
||||
@@ -987,9 +1016,8 @@ namespace MTC_Adapter
|
||||
}
|
||||
// trimmo!
|
||||
valString = valString.Trim();
|
||||
// salvo
|
||||
vettMemArea[j].mMemAreaProgName.Code = j.ToString();
|
||||
vettMemArea[j].mMemAreaProgName.Value = valString;
|
||||
// salvo
|
||||
currGateway.updateItemNodeCodeValue(vettMemArea[j].prgNameKey, j.ToString(), valString);
|
||||
// aggiungo nomi programmi...
|
||||
sb.AppendLine(string.Format("{0}: {1}", mapIOT_String[j].varName, valString));
|
||||
}
|
||||
@@ -1031,7 +1059,7 @@ namespace MTC_Adapter
|
||||
// cicl su UnOp
|
||||
for (int i = 0; i < currAdpConf.nUnOp; i++)
|
||||
{
|
||||
vettUnOp[i].mUnOpSpeedOverr.Value = SpeedRateOver;
|
||||
currGateway.updateItemNodeValue(vettUnOp[i].speedOverKey, SpeedRateOver);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1058,22 +1086,23 @@ namespace MTC_Adapter
|
||||
int axGroup = 0;
|
||||
try
|
||||
{
|
||||
axGroup = Convert.ToInt32(vettAxis[i].mAxGrp.Value);
|
||||
axGroup = Convert.ToInt32(currGateway.getItemNode(vettAxis[i].groupKey));
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (axGroup > 0)
|
||||
{
|
||||
vettAxis[i].mAxFeedAct.Value = FeedRateGrp[axGroup - 1];
|
||||
currGateway.updateItemNodeValue(vettAxis[i].feedrateKey, FeedRateGrp[axGroup - 1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
vettAxis[i].mAxFeedAct.Value = FeedRate;
|
||||
currGateway.updateItemNodeValue(vettAxis[i].feedrateKey, FeedRate);
|
||||
}
|
||||
vettAxis[i].mAxFeedOver.Value = FeedRateOver;
|
||||
|
||||
// calcolo distanza e salvo valore...
|
||||
newPos = Convert.ToDouble(vettAxis[i].mAxPosAct.Value);
|
||||
currGateway.updateItemNodeValue(vettAxis[i].feedOverKey, FeedRateOver);
|
||||
|
||||
// calcolo distanza e salvo valore...
|
||||
newPos = Convert.ToDouble(currGateway.getItemNode(vettAxis[i].posActKey));
|
||||
distPerc = newPos - prevPosAxis[i];
|
||||
|
||||
// sistemo direzione +/- (POS/NEG se lineari, CCW/CW se rotativi)
|
||||
@@ -1087,8 +1116,8 @@ namespace MTC_Adapter
|
||||
}
|
||||
|
||||
|
||||
// verifico tipo direzione da tipo asse...
|
||||
tipoAsse = vettAxis[i].mAxType.Value.ToString();
|
||||
// verifico tipo direzione da tipo asse...
|
||||
tipoAsse = currGateway.getItemNode(vettAxis[i].typeKey).ToString();
|
||||
if (tipoAsse == "LINEAR")
|
||||
{
|
||||
// ?: conditional operator.
|
||||
@@ -1099,7 +1128,7 @@ namespace MTC_Adapter
|
||||
direzione = (newDir > 0) ? "CLOCKWISE" : "COUNTER_CLOCKWISE";
|
||||
}
|
||||
|
||||
vettAxis[i].mAxDir.Value = direzione;
|
||||
currGateway.updateItemNodeValue(vettAxis[i].directionKey, direzione);
|
||||
|
||||
// se la direzione è variata salvo il cambio direzione...
|
||||
if (newDir != prevDirAxis[i])
|
||||
@@ -1115,7 +1144,7 @@ namespace MTC_Adapter
|
||||
|
||||
if (utils.CRB("verbose"))
|
||||
{
|
||||
sb.AppendLine(string.Format("Asse {0}: PosAct:{1:N3} | {2}", i, (double)(newPos), direzione));
|
||||
sb.AppendLine(string.Format("Asse {0}: PosAct:{1:N3} | {2}", i, newPos, direzione));
|
||||
}
|
||||
|
||||
// salvo valori vettore prec...
|
||||
@@ -1,12 +1,10 @@
|
||||
using CMSCncLib.CNC;
|
||||
using MTC;
|
||||
using SCMA.AdapterCom;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace MTC_Adapter
|
||||
namespace SCMA
|
||||
{
|
||||
public class AdapterFanuc : AdapterGeneric
|
||||
{
|
||||
@@ -76,10 +74,11 @@ namespace MTC_Adapter
|
||||
|
||||
/// <summary>
|
||||
/// estende l'init della classe base...
|
||||
/// </summary>
|
||||
/// <param name="caller"></param>
|
||||
/// <param name="adpConf"></param>
|
||||
public AdapterFanuc(MainForm caller, AdapterConf adpConf) : base(caller, adpConf)
|
||||
/// </summary>
|
||||
/// <param name="caller">FORM chaimante</param>
|
||||
/// <param name="adpConf">CONFIGURAZIONE adapter</param>
|
||||
/// <param name="gatewayObj">OGGETTO gestione comunicazione OUT (tipologia e metodi)</param>
|
||||
public AdapterFanuc(MainForm caller, AdapterConf adpConf, Gateway gatewayObj) : base(caller, adpConf, gatewayObj)
|
||||
{
|
||||
// è little endian (NON serve conversione)
|
||||
hasBigEndian = false;
|
||||
@@ -94,10 +93,17 @@ namespace MTC_Adapter
|
||||
prevDirAxis = new int[adpConf.nAxis];
|
||||
|
||||
FANUC_ref = (FANUC)Runtime.NC;
|
||||
if (utils.CRB("verbose")) lg.Info("FANUC_ref da CMSCncLib");
|
||||
if (utils.CRB("verbose"))
|
||||
{
|
||||
lg.Info("FANUC_ref da CMSCncLib");
|
||||
}
|
||||
|
||||
// disconnetto e connetto...
|
||||
if (utils.CRB("verbose")) lg.Info("FANUC: tryDisconnect");
|
||||
if (utils.CRB("verbose"))
|
||||
{
|
||||
lg.Info("FANUC: tryDisconnect");
|
||||
}
|
||||
|
||||
tryDisconnect();
|
||||
lg.Info("FANUC: tryConnect");
|
||||
tryConnect();
|
||||
@@ -197,7 +203,10 @@ namespace MTC_Adapter
|
||||
int memIndex = 10500;
|
||||
inizio = DateTime.Now;
|
||||
FanucMemRW(R, FANUC.MemType.R, memIndex, ref MemBlock);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-STROBES", MemBlock.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-STROBES", MemBlock.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
// suddivido!
|
||||
Buffer.BlockCopy(MemBlock, 0, Acknowl, 0, Acknowl.Length);
|
||||
@@ -237,7 +246,10 @@ namespace MTC_Adapter
|
||||
memIndex = 10660;
|
||||
inizio = DateTime.Now;
|
||||
FanucMemRW(R, FANUC.MemType.R, memIndex, ref MemBlock);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-STRB_DW1", MemBlock.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-STRB_DW1", MemBlock.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
// check COD_M
|
||||
bitNum = 0;
|
||||
@@ -328,18 +340,17 @@ namespace MTC_Adapter
|
||||
// 2017.01.16 INVIO vettore azioni (1 o +)... SE CE NE SONO!
|
||||
if (UserAction.Trim() != "")
|
||||
{
|
||||
mUserAction.ForceChanged();
|
||||
mUserAction.Value = UserAction.Trim();
|
||||
currGateway.updateItemNodeValue("USER_ACTION", UserAction.Trim());
|
||||
}
|
||||
|
||||
// Invio comunque strobe non riconosciuti
|
||||
if (mUnkStrobe.Value.ToString() != UnkStrobe.Trim())
|
||||
// Invio comunque strobe non riconosciuti
|
||||
if (currGateway.getItemNode("UNK_STROBE").ToString() != UnkStrobe.Trim())
|
||||
{
|
||||
mUnkStrobe.Value = UnkStrobe.Trim();
|
||||
currGateway.updateItemNodeValue("UNK_STROBE", UnkStrobe.Trim());
|
||||
}
|
||||
|
||||
// INVIO COMUNQUE stato test...
|
||||
mTestingData.Value = TestingData.Trim();
|
||||
currGateway.updateItemNodeValue("TESTING_DATA", TestingData.Trim());
|
||||
|
||||
memIndex = 10504;
|
||||
// scrivo update ad ack SE VARIATO!!!
|
||||
@@ -347,7 +358,10 @@ namespace MTC_Adapter
|
||||
{
|
||||
inizio = DateTime.Now;
|
||||
FanucMemRW(W, FANUC.MemType.R, memIndex, ref retACK_DW1);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("W{0}-DW1", retACK_DW1.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("W{0}-DW1", retACK_DW1.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
}
|
||||
|
||||
sendWatchDog();
|
||||
@@ -369,7 +383,7 @@ namespace MTC_Adapter
|
||||
/// </summary>
|
||||
/// <param name="charSep"></param>
|
||||
/// <returns></returns>
|
||||
private string getTestData(string charSep)
|
||||
private new string getTestData(string charSep)
|
||||
{
|
||||
string answ = "";
|
||||
// Area di memoria x test... 64 byte
|
||||
@@ -384,7 +398,10 @@ namespace MTC_Adapter
|
||||
int memIndex = 11000;
|
||||
inizio = DateTime.Now;
|
||||
FanucMemRW(R, FANUC.MemType.R, memIndex, ref MemBlockTestData);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TEST_DATA_DW1", MemBlockTestData.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-TEST_DATA_DW1", MemBlockTestData.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
// recupero cod univoco test e numero parametri impiegati
|
||||
testNum = BitConverter.ToUInt16(MemBlockTestData, 0);
|
||||
@@ -470,13 +487,17 @@ namespace MTC_Adapter
|
||||
// recupero tutti i 32 bit del blocco
|
||||
inizio = DateTime.Now;
|
||||
FanucMemRW(R, FANUC.MemType.R, memIndex, ref MemBlock);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-STRB_DW0", MemBlock.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (AlarmFlags != null)
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-STRB_DW0", MemBlock.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
if (currGateway.AlarmFlags != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
// aggiorno vettore allarmi x intero! size del vettore di destinazione (in byte!!!!)
|
||||
Buffer.BlockCopy(MemBlock, 0, AlarmFlags, 0, AlarmFlags.Length);
|
||||
Buffer.BlockCopy(MemBlock, 0, currGateway.AlarmFlags, 0, currGateway.AlarmFlags.Length);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
@@ -498,7 +519,10 @@ namespace MTC_Adapter
|
||||
// recupero tutti i 32 bit del blocco
|
||||
inizio = DateTime.Now;
|
||||
FanucMemRW(R, FANUC.MemType.R, memIndex + i * 4, ref MemBlock);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-STRB_DW0", MemBlock.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-STRB_DW0", MemBlock.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
// da testare metodo copia alternativo, condizionato a web.config
|
||||
if (!utils.CRB("fastCopy"))
|
||||
{
|
||||
@@ -506,12 +530,12 @@ namespace MTC_Adapter
|
||||
for (int j = 0; j < 4; j++)
|
||||
{
|
||||
// copy array a blocchi
|
||||
AlarmFlags[i * 4 + j] = MemBlock[j];
|
||||
currGateway.AlarmFlags[i * 4 + j] = MemBlock[j];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Buffer.BlockCopy(MemBlock, 0, AlarmFlags, i * 4, MemBlock.Length);
|
||||
Buffer.BlockCopy(MemBlock, 0, currGateway.AlarmFlags, i * 4, MemBlock.Length);
|
||||
}
|
||||
if (utils.CRB("verbose"))
|
||||
{
|
||||
@@ -531,7 +555,11 @@ namespace MTC_Adapter
|
||||
// scrivo update ad ack!!!
|
||||
inizio = DateTime.Now;
|
||||
FanucMemRW(W, FANUC.MemType.R, memIndex, ref retACK_DW0);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("W{0}-ACK_DW0", retACK_DW0.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("W{0}-ACK_DW0", retACK_DW0.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
ackReturned = true;
|
||||
}
|
||||
}
|
||||
@@ -548,7 +576,10 @@ namespace MTC_Adapter
|
||||
retACK_DW0 = BitConverter.GetBytes(Convert.ToUInt32(STRB_DW0 & ACK_DW0));
|
||||
inizio = DateTime.Now;
|
||||
FanucMemRW(W, FANUC.MemType.R, memIndex, ref retACK_DW0);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("W{0}-ACK_DW0", retACK_DW0.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("W{0}-ACK_DW0", retACK_DW0.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -562,23 +593,24 @@ namespace MTC_Adapter
|
||||
// EMstop: verifico BIT e di conseguenza imposto
|
||||
if (STRB_DW2.HasFlag(StFlag32.B00))
|
||||
{
|
||||
mEStop.Value = "TRIGGERED";
|
||||
currGateway.updateItemNodeValue("E_STOP", emStatus.TRIGGERED.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
mEStop.Value = "ARMED";
|
||||
currGateway.updateItemNodeValue("E_STOP", emStatus.ARMED.ToString());
|
||||
}
|
||||
|
||||
// verifico POWER ON...
|
||||
if (STRB_DW2.HasFlag(StFlag32.B01))
|
||||
{
|
||||
mPower.Value = "ON";
|
||||
currGateway.updateItemNodeValue("POWER", onOffStatus.ON.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
mPower.Value = "OFF";
|
||||
currGateway.updateItemNodeValue("POWER", onOffStatus.OFF.ToString());
|
||||
}
|
||||
|
||||
|
||||
// Processo selezionato 0=P1, 1=P2
|
||||
string procSel = "";
|
||||
if (STRB_DW2.HasFlag(StFlag32.B02))
|
||||
@@ -589,9 +621,9 @@ namespace MTC_Adapter
|
||||
{
|
||||
procSel = "P1";
|
||||
}
|
||||
if (mProcSel.Value.ToString() != procSel)
|
||||
if (currGateway.getItemNode("PROC_SEL").ToString() != procSel)
|
||||
{
|
||||
mProcSel.Value = procSel;
|
||||
currGateway.updateItemNodeValue("PROC_SEL", procSel);
|
||||
}
|
||||
|
||||
// HARD CODE: forzo path 1 (indice 0...)
|
||||
@@ -600,11 +632,11 @@ namespace MTC_Adapter
|
||||
// verifico tipo processo path...
|
||||
if (STRB_DW2.HasFlag(StFlag32.B03))
|
||||
{
|
||||
vettPath[idxPath].mPathType.Value = "LAVORO";
|
||||
currGateway.updateItemNodeValue(vettPath[idxPath].pathTypeKey, pathType.LAVORO.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
vettPath[idxPath].mPathType.Value = "ASSERV";
|
||||
currGateway.updateItemNodeValue(vettPath[idxPath].pathTypeKey, pathType.ASSERV.ToString());
|
||||
}
|
||||
|
||||
// switch su RUN mode...
|
||||
@@ -629,10 +661,10 @@ namespace MTC_Adapter
|
||||
{
|
||||
runMode = "SEMI_AUTO";
|
||||
}
|
||||
// salvo valore selezionato
|
||||
if (vettPath[idxPath].mPathRunMode.Value.ToString() != runMode)
|
||||
// salvo valore selezionato
|
||||
if (currGateway.getItemNode(vettPath[idxPath].runModeKey).ToString() != runMode)
|
||||
{
|
||||
vettPath[idxPath].mPathRunMode.Value = runMode;
|
||||
currGateway.updateItemNodeValue(vettPath[idxPath].runModeKey, runMode);
|
||||
}
|
||||
|
||||
// switch su EXE mode...
|
||||
@@ -665,14 +697,12 @@ namespace MTC_Adapter
|
||||
{
|
||||
exeMode = "PROGRAM_COMPLETED";
|
||||
}
|
||||
// salvo valore selezionato
|
||||
if (vettPath[idxPath].mPathExeMode.Value.ToString() != exeMode)
|
||||
// salvo valore selezionato
|
||||
if (currGateway.getItemNode(vettPath[idxPath].exeModeKey).ToString() != exeMode)
|
||||
{
|
||||
vettPath[idxPath].mPathExeMode.Value = exeMode;
|
||||
currGateway.updateItemNodeValue(vettPath[idxPath].exeModeKey, exeMode);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// processo eventuali altri bit status non noti...
|
||||
string UnkStatus = "";
|
||||
// cerco i bit alzati --> aggiungo in stringa! TRANNE 31 e 32 che sono watchdog...
|
||||
@@ -685,7 +715,7 @@ namespace MTC_Adapter
|
||||
}
|
||||
}
|
||||
// invio comunque...
|
||||
mUnkStatus.Value = UnkStatus.Trim();
|
||||
currGateway.updateItemNodeValue("UNK_STATUS", UnkStatus.Trim());
|
||||
|
||||
// inizializzo SEMPRE a vuoto...
|
||||
string SubMode = "";
|
||||
@@ -703,11 +733,10 @@ namespace MTC_Adapter
|
||||
}
|
||||
|
||||
}
|
||||
// 2017.01.16 INVIO SOLO SE CAMBIA:..
|
||||
if (vettPath[idxPath].mPathSubMode.Value.ToString() != SubMode.Trim())
|
||||
// 2017.01.16 INVIO SOLO SE CAMBIA:..
|
||||
if (currGateway.getItemNode(vettPath[idxPath].subModeKey).ToString() != SubMode.Trim())
|
||||
{
|
||||
// INVIO SEMPRE (x prendere il reset/fronte discesa)...
|
||||
vettPath[idxPath].mPathSubMode.Value = SubMode.Trim();
|
||||
currGateway.updateItemNodeValue(vettPath[idxPath].subModeKey, SubMode.Trim());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -728,7 +757,10 @@ namespace MTC_Adapter
|
||||
uint[] tabDatiMtz = new uint[maintData.Length];
|
||||
inizio = DateTime.Now;
|
||||
FanucMemRW(R, FANUC.MemType.R, memIndex, ref tabDatiMtzByte);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-DatiMtz", tabDatiMtzByte.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-DatiMtz", tabDatiMtzByte.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
// copio byte --> word!
|
||||
Buffer.BlockCopy(tabDatiMtzByte, 0, tabDatiMtz, 0, tabDatiMtzByte.Length);
|
||||
// decodifico aree memoria secondo tab configurazione
|
||||
@@ -756,7 +788,10 @@ namespace MTC_Adapter
|
||||
uint[] tabDatiAnalog = new uint[analogData.Length];
|
||||
inizio = DateTime.Now;
|
||||
FanucMemRW(R, FANUC.MemType.R, memIndex, ref tabDatiAnalogByte);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-DatiAnalog", tabDatiAnalogByte.Length * 4), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-DatiAnalog", tabDatiAnalogByte.Length * 4), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
// copio byte --> word!
|
||||
Buffer.BlockCopy(tabDatiAnalogByte, 0, tabDatiAnalog, 0, tabDatiAnalogByte.Length);
|
||||
// decodifico aree memoria secondo tab configurazione
|
||||
@@ -786,7 +821,10 @@ namespace MTC_Adapter
|
||||
byte[] tabDatiStatus = new byte[numByte];
|
||||
inizio = DateTime.Now;
|
||||
FanucMemRW(R, FANUC.MemType.R, memIndex, ref tabDatiStatus);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-DatiStatus", tabDatiStatus.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-DatiStatus", tabDatiStatus.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
// decodifico aree memoria secondo tab configurazione
|
||||
processStatusData(tabDatiStatus, statusData);
|
||||
@@ -810,13 +848,17 @@ namespace MTC_Adapter
|
||||
StringBuilder sb2 = new StringBuilder();
|
||||
|
||||
// dati base...
|
||||
sb1.AppendLine(string.Format("POWER {0}: | EmStop:{1:N3} | ProcSel: {2}", mPower.Value, mEStop.Value, mProcSel.Value));
|
||||
sb1.AppendLine(string.Format("POWER {0}: | EmStop:{1} | ProcSel: {2}", currGateway.getItemNode("POWER"), currGateway.getItemNode("E_STOP"), currGateway.getItemNode("PROC_SEL")));
|
||||
|
||||
// leggo dati globali...
|
||||
parentForm.commPlcActive = true;
|
||||
inizio = DateTime.Now;
|
||||
allDynData = FANUC_ref.getAllDynData();
|
||||
if (utils.CRB("recTime")) TimingData.addResult("R-ALL-DYN-DATA", DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult("R-ALL-DYN-DATA", DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
parentForm.commPlcActive = false;
|
||||
|
||||
FeedRate = allDynData.actf;
|
||||
@@ -825,7 +867,10 @@ namespace MTC_Adapter
|
||||
byte[] PathData_mem = new byte[4];
|
||||
inizio = DateTime.Now;
|
||||
FanucMemRW(R, FANUC.MemType.R, memIndex, ref PathData_mem);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-PathData", PathData_mem.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-PathData", PathData_mem.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
// 2016.07.19 mod con Fabio
|
||||
//JogRateOver = PathData_mem[0];
|
||||
@@ -850,7 +895,11 @@ namespace MTC_Adapter
|
||||
try
|
||||
{
|
||||
allarmiCNC = FANUC_ref.getCncAlarm();
|
||||
if (utils.CRB("recTime")) TimingData.addResult("R-CNC-ALARMS", DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult("R-CNC-ALARMS", DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
checkCNCAlarms();
|
||||
}
|
||||
catch (Exception exc)
|
||||
@@ -870,7 +919,8 @@ namespace MTC_Adapter
|
||||
// accodo dati UT...
|
||||
for (int i = 0; i < currAdpConf.nUnOp; i++)
|
||||
{
|
||||
sb2.AppendLine(string.Format("UT: ToolId {0} | VitaRes {1} | TipoVita {2} ", vettUnOp[i].mUnOpToolId.Value, vettUnOp[i].mUnOpVitaRes.Value, vettUnOp[i].mUnOpVitaResType.Value));
|
||||
|
||||
sb2.AppendLine(string.Format("UT: ToolId {0} | VitaRes {1} | TipoVita {2} ", currGateway.getItemNode(vettUnOp[i].toolIdKey), currGateway.getItemNode(vettUnOp[i].vitaResKey), currGateway.getItemNode(vettUnOp[i].vitaResTypeKey)));
|
||||
}
|
||||
parentForm.dataMonitor_2 = sb2.ToString();
|
||||
|
||||
@@ -922,28 +972,31 @@ namespace MTC_Adapter
|
||||
/// <summary>
|
||||
/// Invia singolo allarme CNC se presente
|
||||
/// </summary>
|
||||
/// <param name="allarme"></param>
|
||||
protected void sendAlarmIfPresent(CMSCncLib.Focas1.ODBALMMSG2_data allarme)
|
||||
/// <param name="allarmiFanuc"></param>
|
||||
protected void sendAlarmIfPresent(CMSCncLib.Focas1.ODBALMMSG2_data allarmiFanuc)
|
||||
{
|
||||
// controllo valore...
|
||||
if (allarme.alm_no > 0)
|
||||
if (allarmiFanuc.alm_no > 0)
|
||||
{
|
||||
allarme newAlarm;
|
||||
try
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (utils.CRI("loglevel") > 5)
|
||||
{
|
||||
lg.Info(string.Format("Allarmi CNC: NUM {0} | MESS: {1} | ASSE: {2} | TYPE: {3}", allarme.alm_no, allarme.alm_msg, allarme.axis, allarme.type));
|
||||
lg.Info(string.Format("Allarmi CNC: NUM {0} | MESS: {1} | ASSE: {2} | TYPE: {3}", allarmiFanuc.alm_no, allarmiFanuc.alm_msg, allarmiFanuc.axis, allarmiFanuc.type));
|
||||
}
|
||||
// se ho asse accodo ad asse altrimenti no...
|
||||
string codAllarme = string.Format("T{0}-N{1}", allarme.type, allarme.alm_no);
|
||||
if (allarme.axis == 0)
|
||||
string codAllarme = string.Format("T{0}-N{1}", allarmiFanuc.type, allarmiFanuc.alm_no);
|
||||
if (allarmiFanuc.axis == 0)
|
||||
{
|
||||
mAlarmCNC.Add(MTConnect.Condition.Level.FAULT, allarme.alm_msg, codAllarme, "", "");
|
||||
allarme currAllarm = new allarme(codAllarme, "CNC", "FAULT", allarmiFanuc.alm_msg);
|
||||
currGateway.addAlarm(currAllarm);
|
||||
}
|
||||
else
|
||||
{
|
||||
vettAxis[allarme.axis - 1].mAxAlarmCNC.Add(MTConnect.Condition.Level.FAULT, allarme.alm_msg, codAllarme, "", "");
|
||||
newAlarm = new allarme(codAllarme, vettAxis[allarmiFanuc.axis - 1].alarmCncKey, "FAULT", allarmiFanuc.alm_msg);
|
||||
currGateway.addAlarm(currGateway.conditionNodes[vettAxis[allarmiFanuc.axis - 1].alarmCncKey], newAlarm);
|
||||
}
|
||||
// mostro in form!
|
||||
sb.AppendLine(codAllarme);
|
||||
@@ -967,7 +1020,10 @@ namespace MTC_Adapter
|
||||
|
||||
inizio = DateTime.Now;
|
||||
FanucMemRW(R, FANUC.MemType.D, memIndex, ref unOpSpeedMem);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-SPEED_UNOP", unOpSpeedMem.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-SPEED_UNOP", unOpSpeedMem.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
procUnOp(unOpSpeedMem);
|
||||
}
|
||||
@@ -982,7 +1038,11 @@ namespace MTC_Adapter
|
||||
int memIndex = 13100 + 4 * j;
|
||||
inizio = DateTime.Now;
|
||||
FanucMemRW(R, FANUC.MemType.D, memIndex, ref int32Mem);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TabUT-VitaRes", int32Mem.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-TabUT-VitaRes", int32Mem.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
return memIndex;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -996,7 +1056,11 @@ namespace MTC_Adapter
|
||||
int memIndex = 10700 + 1 * j;
|
||||
inizio = DateTime.Now;
|
||||
FanucMemRW(R, FANUC.MemType.D, memIndex, ref int8Mem);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TabUT-FamUT", 8), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-TabUT-FamUT", 8), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
return memIndex;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -1009,7 +1073,11 @@ namespace MTC_Adapter
|
||||
int memIndex = 8900;
|
||||
inizio = DateTime.Now;
|
||||
FanucMemRW(R, FANUC.MemType.D, memIndex, ref tabFam_FamUt);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TabFamUT-FamUT", tabFam_FamUt.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-TabFamUT-FamUT", tabFam_FamUt.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
return memIndex;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -1023,7 +1091,11 @@ namespace MTC_Adapter
|
||||
int memIndex = 11700 + 2 * j;
|
||||
inizio = DateTime.Now;
|
||||
FanucMemRW(R, FANUC.MemType.D, memIndex, ref int16Mem);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TabUT-FamUT", int16Mem.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-TabUT-FamUT", int16Mem.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
return memIndex;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -1036,7 +1108,11 @@ namespace MTC_Adapter
|
||||
int memIndex = 11300;
|
||||
inizio = DateTime.Now;
|
||||
FanucMemRW(R, FANUC.MemType.D, memIndex, ref tabUt_UT);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TabUT-UT", tabUt_UT.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-TabUT-UT", tabUt_UT.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
return memIndex;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -1049,7 +1125,11 @@ namespace MTC_Adapter
|
||||
int memIndex = 2960;
|
||||
inizio = DateTime.Now;
|
||||
FanucMemRW(R, FANUC.MemType.D, memIndex, ref elencoUtMem);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-NUMUT", elencoUtMem.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-NUMUT", elencoUtMem.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
return memIndex;
|
||||
}
|
||||
|
||||
@@ -1061,7 +1141,11 @@ namespace MTC_Adapter
|
||||
parentForm.commPlcActive = true;
|
||||
inizio = DateTime.Now;
|
||||
CMSCncLib.Focas1.ODBGCD vettGCodes = FANUC_ref.getPathGCodeMod();
|
||||
if (utils.CRB("recTime")) TimingData.addResult("R-GCodModal", DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult("R-GCodModal", DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
parentForm.commPlcActive = false;
|
||||
|
||||
string GCodAttivi = "";
|
||||
@@ -1098,11 +1182,30 @@ namespace MTC_Adapter
|
||||
inizio = DateTime.Now;
|
||||
vettGCodes = FANUC_ref.getPathGCode1Shot();
|
||||
parentForm.commPlcActive = false;
|
||||
if (utils.CRB("recTime")) TimingData.addResult("R-GCodOneShot", DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (vettGCodes.gcd0.flag > 0) GCodAttivi += string.Format("[{0}]", vettGCodes.gcd0.code);
|
||||
if (vettGCodes.gcd1.flag > 0) GCodAttivi += string.Format("[{0}]", vettGCodes.gcd1.code);
|
||||
if (vettGCodes.gcd2.flag > 0) GCodAttivi += string.Format("[{0}]", vettGCodes.gcd2.code);
|
||||
if (vettGCodes.gcd3.flag > 0) GCodAttivi += string.Format("[{0}]", vettGCodes.gcd3.code);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult("R-GCodOneShot", DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
if (vettGCodes.gcd0.flag > 0)
|
||||
{
|
||||
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd0.code);
|
||||
}
|
||||
|
||||
if (vettGCodes.gcd1.flag > 0)
|
||||
{
|
||||
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd1.code);
|
||||
}
|
||||
|
||||
if (vettGCodes.gcd2.flag > 0)
|
||||
{
|
||||
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd2.code);
|
||||
}
|
||||
|
||||
if (vettGCodes.gcd3.flag > 0)
|
||||
{
|
||||
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd3.code);
|
||||
}
|
||||
|
||||
// 2017.12.27 gestione assi limitati --> non sono abilitate le funzioni £D, quindi DISABILITO da conf...
|
||||
CMSCncLib.Focas1.ODB5AXMAN vettTTCoord = new CMSCncLib.Focas1.ODB5AXMAN();
|
||||
@@ -1111,7 +1214,11 @@ namespace MTC_Adapter
|
||||
parentForm.commPlcActive = true;
|
||||
inizio = DateTime.Now;
|
||||
vettTTCoord = FANUC_ref.getPathTTCoord();
|
||||
if (utils.CRB("recTime")) TimingData.addResult("R-TTCoord", DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult("R-TTCoord", DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
parentForm.commPlcActive = false;
|
||||
}
|
||||
// ciclo su path
|
||||
@@ -1123,22 +1230,22 @@ namespace MTC_Adapter
|
||||
sb_2 = new StringBuilder();
|
||||
sb_3 = new StringBuilder();
|
||||
|
||||
vettPath[i].mPathCodG_Act.Value = GCodAttivi;
|
||||
currGateway.updateItemNodeValue(vettPath[i].gCodeAct_Key, GCodAttivi);
|
||||
if (!utils.CRB("FanucLimit3D"))
|
||||
{
|
||||
vettPath[i].mPathPosActX.Value = ((decimal)vettTTCoord.data1) / utils.CRI("fattdecimale");
|
||||
vettPath[i].mPathPosActY.Value = ((decimal)vettTTCoord.data2) / utils.CRI("fattdecimale");
|
||||
vettPath[i].mPathPosActZ.Value = ((decimal)vettTTCoord.data3) / utils.CRI("fattdecimale");
|
||||
vettPath[i].mPathPosActI.Value = ((decimal)vettTTCoord.c1) / utils.CRI("fattdecimale");
|
||||
vettPath[i].mPathPosActJ.Value = ((decimal)vettTTCoord.c2) / utils.CRI("fattdecimale");
|
||||
vettPath[i].mPathPosActK.Value = "0"; // è 5 assi...nullo...
|
||||
currGateway.updateItemNodeValue(vettPath[i].posAct_X_Key, ((decimal)vettTTCoord.data1) / utils.CRI("fattdecimale"));
|
||||
currGateway.updateItemNodeValue(vettPath[i].posAct_Y_Key, ((decimal)vettTTCoord.data2) / utils.CRI("fattdecimale"));
|
||||
currGateway.updateItemNodeValue(vettPath[i].posAct_Z_Key, ((decimal)vettTTCoord.data3) / utils.CRI("fattdecimale"));
|
||||
currGateway.updateItemNodeValue(vettPath[i].posAct_I_Key, ((decimal)vettTTCoord.c1) / utils.CRI("fattdecimale"));
|
||||
currGateway.updateItemNodeValue(vettPath[i].posAct_J_Key, ((decimal)vettTTCoord.c2) / utils.CRI("fattdecimale"));
|
||||
currGateway.updateItemNodeValue(vettPath[i].posAct_K_Key, "0"); // è 5 assi...nullo...
|
||||
}
|
||||
|
||||
// 2017.01.16 da rivedere
|
||||
vettPath[i].mPathCurrProgRowNum.Value = "";
|
||||
vettPath[i].mPathActiveAxes.Value = "";
|
||||
// 2017.01.16 da rivedere
|
||||
currGateway.updateItemNodeValue(vettPath[i].currProgRowNumKey, "");
|
||||
currGateway.updateItemNodeValue(vettPath[i].activeAxesKey, "");
|
||||
|
||||
sb_2.AppendLine(string.Format("Path {0}, PROG: {1}", i + 1, vettPath[i].mPathCurrProg.Value));
|
||||
sb_2.AppendLine(string.Format("Path {0}, PROG: {1}", i + 1, currGateway.getItemNode(vettPath[i].currProgKey)));
|
||||
sb_3.AppendLine(string.Format("Path {0}, GCodes: {1}", i + 1, GCodAttivi));
|
||||
|
||||
sb_3.AppendLine(string.Format("Path {0}, Asse 1: {1:N3}", i + 1, ((decimal)vettTTCoord.data1) / utils.CRI("fattdecimale")));
|
||||
@@ -1161,11 +1268,18 @@ namespace MTC_Adapter
|
||||
parentForm.commPlcActive = true;
|
||||
inizio = DateTime.Now;
|
||||
CMSCncLib.Focas1.ODBPOS posAssi = FANUC_ref.getAllAxisPos();
|
||||
if (utils.CRB("recTime")) TimingData.addResult("R-AXIS_POS", DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult("R-AXIS_POS", DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
inizio = DateTime.Now;
|
||||
CMSCncLib.Focas1.ODBSVLOAD loadAssi = FANUC_ref.getAllAxisLoad();
|
||||
if (utils.CRB("recTime")) TimingData.addResult("R-AXIS_LOAD", DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult("R-AXIS_LOAD", DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
parentForm.commPlcActive = false;
|
||||
|
||||
CMSCncLib.Focas1.LOADELM valLoad = new CMSCncLib.Focas1.LOADELM();
|
||||
@@ -1321,13 +1435,12 @@ namespace MTC_Adapter
|
||||
break;
|
||||
}
|
||||
|
||||
// popolo valori...
|
||||
vettAxis[i].mAxLoad.Value = (double)(valLoad.data) / Math.Pow(10, valLoad.dec);
|
||||
newPos = (double)(valPos.abs.data) / Math.Pow(10, valPos.abs.dec);
|
||||
vettAxis[i].mAxPosAct.Value = newPos;
|
||||
vettAxis[i].mAxPosTgt.Value = newPos + (double)(valPos.dist.data) / Math.Pow(10, valPos.dist.dec);
|
||||
|
||||
vettAxis[i].mAxFeedAct.Value = FeedRate;
|
||||
// popolo valori...
|
||||
currGateway.updateItemNodeValue(vettAxis[i].loadKey, valLoad.data / Math.Pow(10, valLoad.dec));
|
||||
newPos = valPos.abs.data / Math.Pow(10, valPos.abs.dec);
|
||||
currGateway.updateItemNodeValue(vettAxis[i].posActKey, newPos);
|
||||
currGateway.updateItemNodeValue(vettAxis[i].posTgtKey, newPos + valPos.dist.data / Math.Pow(10, valPos.dist.dec));
|
||||
currGateway.updateItemNodeValue(vettAxis[i].feedrateKey, FeedRate);
|
||||
|
||||
// calcolo distanza e salvo valore...
|
||||
distPerc = newPos - prevPosAxis[i];
|
||||
@@ -1342,8 +1455,8 @@ namespace MTC_Adapter
|
||||
newDir = prevDirAxis[i];
|
||||
}
|
||||
|
||||
// verifico tipo direzione da tipo asse...
|
||||
tipoAsse = vettAxis[i].mAxType.Value.ToString();
|
||||
// verifico tipo direzione da tipo asse...
|
||||
tipoAsse = currGateway.getItemNode(vettAxis[i].typeKey).ToString();
|
||||
if (tipoAsse == "LINEAR")
|
||||
{
|
||||
// ?: conditional operator.
|
||||
@@ -1353,13 +1466,11 @@ namespace MTC_Adapter
|
||||
{
|
||||
direzione = (newDir > 0) ? "CLOCKWISE" : "COUNTER_CLOCKWISE";
|
||||
}
|
||||
|
||||
vettAxis[i].mAxDir.Value = direzione;
|
||||
|
||||
currGateway.updateItemNodeValue(vettAxis[i].directionKey, direzione);
|
||||
|
||||
if (utils.CRB("verbose"))
|
||||
{
|
||||
sb.AppendLine(string.Format("Asse {0}: PosAct:{1:N3}, ToGo:{2:N3}{3} | {4}", valPos.abs.name, (double)(valPos.abs.data) / Math.Pow(10, valPos.abs.dec), valPos.dist.name, (double)(valPos.dist.data) / Math.Pow(10, valPos.dist.dec), direzione));
|
||||
sb.AppendLine(string.Format("Asse {0}: PosAct:{1:N3}, ToGo:{2:N3}{3} | {4}", valPos.abs.name, valPos.abs.data / Math.Pow(10, valPos.abs.dec), valPos.dist.name, valPos.dist.data / Math.Pow(10, valPos.dist.dec), direzione));
|
||||
}
|
||||
|
||||
// salvo valori vettore prec...
|
||||
@@ -1368,8 +1479,8 @@ namespace MTC_Adapter
|
||||
|
||||
//vettAxis[i].mAxMainProc.Value = AxData.AxisMainProc;
|
||||
//vettAxis[i].mAxIsMaster.Value = AxData.AxisIsMaster;
|
||||
//vettAxis[i].mAxMastId.Value = AxData.AxisMastId;
|
||||
vettAxis[i].mAxFeedOver.Value = FeedRateOver;
|
||||
//vettAxis[i].mAxMastId.Value = AxData.AxisMastId;
|
||||
currGateway.updateItemNodeValue(vettAxis[i].feedOverKey, FeedRateOver);
|
||||
//vettAxis[i].mAxAccelAct.Value = AxData.AxisAccel;
|
||||
//vettAxis[i].mAxBattery.Value = AxData.AxisBattery;
|
||||
}
|
||||
+5333
-5019
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,11 @@
|
||||
using CMSCncLib.CNC;
|
||||
using MTC;
|
||||
using SCMA.AdapterCom;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace MTC_Adapter
|
||||
namespace SCMA
|
||||
{
|
||||
public class AdapterOsai : AdapterGeneric
|
||||
{
|
||||
@@ -193,10 +192,11 @@ namespace MTC_Adapter
|
||||
public Dictionary<string, string> allarmiCNC = new Dictionary<string, string>();
|
||||
/// <summary>
|
||||
/// estende l'init della classe base...
|
||||
/// </summary>
|
||||
/// <param name="caller"></param>
|
||||
/// <param name="adpConf"></param>
|
||||
public AdapterOsai(MainForm caller, AdapterConf adpConf) : base(caller, adpConf)
|
||||
/// </summary>
|
||||
/// <param name="caller">FORM chaimante</param>
|
||||
/// <param name="adpConf">CONFIGURAZIONE adapter</param>
|
||||
/// <param name="gatewayObj">OGGETTO gestione comunicazione OUT (tipologia e metodi)</param>
|
||||
public AdapterOsai(MainForm caller, AdapterConf adpConf, Gateway gatewayObj) : base(caller, adpConf, gatewayObj)
|
||||
{
|
||||
// !!!HARD CODED!!! aggiunto banco STATUS del 2 processo IN CODA... (4+1)DW=20byte x strobes...!!!
|
||||
Strobes = new byte[20];
|
||||
@@ -224,11 +224,19 @@ namespace MTC_Adapter
|
||||
|
||||
parentForm.commPlcActive = true;
|
||||
OSAI_ref = (OSAI)Runtime.NC;
|
||||
if (utils.CRB("verbose")) lg.Info(string.Format("Generato oggetto OSAI_ref da CMSCncLib:{0}{1}", Environment.NewLine, OSAI_ref.Descrizione));
|
||||
if (utils.CRB("verbose"))
|
||||
{
|
||||
lg.Info(string.Format("Generato oggetto OSAI_ref da CMSCncLib:{0}{1}", Environment.NewLine, OSAI_ref.Descrizione));
|
||||
}
|
||||
|
||||
parentForm.commPlcActive = false;
|
||||
|
||||
// disconnetto e connetto...
|
||||
if (utils.CRB("verbose")) lg.Info("OSAI: tryDisconnect");
|
||||
if (utils.CRB("verbose"))
|
||||
{
|
||||
lg.Info("OSAI: tryDisconnect");
|
||||
}
|
||||
|
||||
tryDisconnect();
|
||||
lg.Info("OSAI: tryConnect");
|
||||
tryConnect();
|
||||
@@ -335,12 +343,18 @@ namespace MTC_Adapter
|
||||
// leggo blocco dati + grande...
|
||||
inizio = DateTime.Now;
|
||||
OsaiMemRW_Word(R, OSAI.MemTypeWord.MW_CODE, memIndexA, ref MemBlock_A);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R-{0}-W4", MemBlock_A.Length * 2), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R-{0}-W4", MemBlock_A.Length * 2), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
// leggo blocco dati + piccolo
|
||||
inizio = DateTime.Now;
|
||||
OsaiMemRW_Word(R, OSAI.MemTypeWord.MW_CODE, memIndexB, ref MemBlock_B);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R-{0}-W1", MemBlock_B.Length * 2), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R-{0}-W1", MemBlock_B.Length * 2), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
// suddivido blocco a blocco... da file di conf x OSAI!!!
|
||||
// primi 12 byte ad ACK
|
||||
@@ -382,8 +396,7 @@ namespace MTC_Adapter
|
||||
// 2017.01.16 INVIO vettore azioni (1 o +)... SE CE NE SONO!
|
||||
if (UserAction.Trim() != "")
|
||||
{
|
||||
mUserAction.ForceChanged();
|
||||
mUserAction.Value = UserAction.Trim();
|
||||
currGateway.updateItemNodeValue("USER_ACTION", UserAction.Trim());
|
||||
}
|
||||
|
||||
// verifico strobe dell'auto-test
|
||||
@@ -408,7 +421,10 @@ namespace MTC_Adapter
|
||||
{
|
||||
inizio = DateTime.Now;
|
||||
fatto = OsaiMemRW_Byte(W, OSAI.MemTypeWord.MW_CODE, memIndexAck, 0, ref currACK_DW);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("W{0}-ACK_DW0", currACK_DW.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("W{0}-ACK_DW0", currACK_DW.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
@@ -431,7 +447,10 @@ namespace MTC_Adapter
|
||||
// leggo tutto!!!
|
||||
inizio = DateTime.Now;
|
||||
fatto = OsaiMemRW_Byte(R, OSAI.MemTypeWord.MW_CODE, memIndexMST, 0, ref MemBlock_MST);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-STRB_DW1-P{1:00}", MemBlock_MST.Length, idxPath), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-STRB_DW1-P{1:00}", MemBlock_MST.Length, idxPath), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
@@ -463,7 +482,11 @@ namespace MTC_Adapter
|
||||
int memIndex = 19700;
|
||||
inizio = DateTime.Now;
|
||||
OsaiMemRW_DWord(R, OSAI.MemTypeWord.MW_CODE, memIndex, ref MemBlockTestData);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TEST_DATA", MemBlockTestData.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-TEST_DATA", MemBlockTestData.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
@@ -517,7 +540,11 @@ namespace MTC_Adapter
|
||||
parentForm.commPlcActive = true;
|
||||
inizio = DateTime.Now;
|
||||
OSAI_ref.O_GetNcInfo1(ref allNcData);
|
||||
if (utils.CRB("recTime")) TimingData.addResult("R-NcInfo", DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult("R-NcInfo", DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
parentForm.commPlcActive = false;
|
||||
|
||||
// recupero speed e feed...
|
||||
@@ -540,7 +567,10 @@ namespace MTC_Adapter
|
||||
ushort[] PathData_mem = new ushort[14];
|
||||
inizio = DateTime.Now;
|
||||
OsaiMemRW_Word(R, OSAI.MemTypeWord.MW_CODE, memIndex, ref PathData_mem);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-PathData", PathData_mem.Length * 2), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-PathData", PathData_mem.Length * 2), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
// inizio indicando feed...
|
||||
sb1.AppendLine(string.Format("FeedRate: {0} mm/min", FeedRate));
|
||||
@@ -588,26 +618,32 @@ namespace MTC_Adapter
|
||||
allarmiCNC.Clear();
|
||||
allarmiCNC.Add(allNcData.lastncerror.ToString(), alarmText);
|
||||
// 2017.05.09 gestione allarmi commentata
|
||||
#if false
|
||||
#if false
|
||||
//-----------------------------------------------------
|
||||
// PROMO BLOCCO TEST
|
||||
//-----------------------------------------------------
|
||||
mAlarmCNC.Add(MTConnect.Condition.Level.FAULT, alarmText, allNcData.lastncerror.ToString(), "", "");
|
||||
// mostro in form!
|
||||
sb1.AppendLine(alarmText);
|
||||
parentForm.dataMonitor_1 += sb1.ToString();
|
||||
#endif
|
||||
parentForm.dataMonitor_1 += sb1.ToString();
|
||||
|
||||
// 2017.05.09 gestione allarmi commentata
|
||||
#if false
|
||||
// il codice è corretto (manca prima aprte codice + traduzione), se cerco di trovare oggett completo NON c'è, verificare con Andrea...
|
||||
sb1.AppendLine(string.Format("Allarmi CNC: {0}", allNcData.lastncerror));
|
||||
|
||||
//-----------------------------------------------------
|
||||
// SECONDO BLOCCO TEST
|
||||
//-----------------------------------------------------
|
||||
// il codice è corretto (manca prima aprte codice + traduzione), se cerco di trovare oggett completo NON c'è, verificare con Andrea...
|
||||
sb1.AppendLine(string.Format("Allarmi CNC: {0}", allNcData.lastncerror));
|
||||
|
||||
parentForm.commPlcActive = true;
|
||||
inizio = DateTime.Now;
|
||||
OSAI_ref.O_ReadCurrentErrorMsg(ref allarmiCNC);
|
||||
if (utils.CRB("recTime")) TimingData.addResult("R-CNC-ERROR-MSG", DateTime.Now.Subtract(inizio).Ticks);
|
||||
parentForm.commPlcActive = false;
|
||||
checkCNCAlarms();
|
||||
#endif
|
||||
#if false
|
||||
parentForm.commPlcActive = true;
|
||||
inizio = DateTime.Now;
|
||||
OSAI_ref.O_ReadCurrentErrorMsg(ref allarmiCNC);
|
||||
if (utils.CRB("recTime")) TimingData.addResult("R-CNC-ERROR-MSG", DateTime.Now.Subtract(inizio).Ticks);
|
||||
parentForm.commPlcActive = false;
|
||||
checkCNCAlarms();
|
||||
|
||||
//-----------------------------------------------------
|
||||
// TERZO BLOCCO TEST
|
||||
//-----------------------------------------------------
|
||||
// provo altri metodi...
|
||||
parentForm.commPlcActive = true;
|
||||
CMSCncLib.OPENcontrol.MSGEMERGENCY emergCNC = new CMSCncLib.OPENcontrol.MSGEMERGENCY();
|
||||
@@ -647,7 +683,10 @@ namespace MTC_Adapter
|
||||
uint[] tabDatiMtz = new uint[maintData.Length];
|
||||
inizio = DateTime.Now;
|
||||
OsaiMemRW_DWord(R, OSAI.MemTypeWord.GW_CODE, memIndex, ref tabDatiMtz);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-DatiMtz", tabDatiMtz.Length * 4), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-DatiMtz", tabDatiMtz.Length * 4), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
// decodifico aree memoria secondo tab configurazione
|
||||
processMaintData(tabDatiMtz, maintData);
|
||||
}
|
||||
@@ -674,7 +713,10 @@ namespace MTC_Adapter
|
||||
uint[] tabDatiAnalog = new uint[analogData.Length];
|
||||
inizio = DateTime.Now;
|
||||
OsaiMemRW_DWord(R, OSAI.MemTypeWord.MW_CODE, memIndex, ref tabDatiAnalog);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-DatiAnalog", tabDatiAnalog.Length * 4), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-DatiAnalog", tabDatiAnalog.Length * 4), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
// decodifico aree memoria secondo tab configurazione
|
||||
processAnalogData(tabDatiAnalog, analogData);
|
||||
}
|
||||
@@ -702,7 +744,10 @@ namespace MTC_Adapter
|
||||
byte[] tabDatiStatus = new byte[numByte];
|
||||
inizio = DateTime.Now;
|
||||
OsaiMemRW_Byte(R, OSAI.MemTypeWord.MW_CODE, memIndex, 0, ref tabDatiStatus);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-DatiStatus", tabDatiStatus.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-DatiStatus", tabDatiStatus.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
// decodifico aree memoria secondo tab configurazione
|
||||
processStatusData(tabDatiStatus, statusData);
|
||||
}
|
||||
@@ -769,7 +814,9 @@ namespace MTC_Adapter
|
||||
{
|
||||
lg.Info(string.Format("Allarme CNC: {0}", alarmText));
|
||||
}
|
||||
mAlarmCNC.Add(MTConnect.Condition.Level.FAULT, alarmText, item.Key, "", "");
|
||||
// predispongo allarme
|
||||
allarme currAllarm = new allarme(item.Key, "CNC", "FAULT", alarmText);
|
||||
currGateway.addAlarm(currAllarm);
|
||||
// mostro in form!
|
||||
sb.AppendLine(alarmText);
|
||||
}
|
||||
@@ -781,36 +828,6 @@ namespace MTC_Adapter
|
||||
}
|
||||
}
|
||||
}
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Invia singolo allarme CNC se presente
|
||||
/// </summary>
|
||||
/// <param name="allarme"></param>
|
||||
protected void sendAlarmIfPresent(CMSCncLib.OPENcontrol.MSGERROR allarme)
|
||||
{
|
||||
// controllo valore...
|
||||
if (allarme != null && allarme.CodeErr != 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (utils.CRI("loglevel") > 5)
|
||||
{
|
||||
lg.Info(string.Format("Allarmi CNC: {0} ", allarme.CodeErr));
|
||||
}
|
||||
string alarmText = string.Format("Cod: {0} | Proc: {1} | Comm: {2} | SubCom: {3} | {4}", allarme.CodeErr, allarme.Process, allarme.Comando, allarme.SubCom, allarme.FormatTxt);
|
||||
mAlarmCNC.Add(MTConnect.Condition.Level.FAULT, alarmText, allarme.CodeErr.ToString(), "", "");
|
||||
// mostro in form!
|
||||
sb.AppendLine(alarmText);
|
||||
parentForm.dataMonitor_1 += sb.ToString();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
lg.Error(string.Format("{0}", exc));
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/// <summary>
|
||||
/// Recupero dati x UnOp
|
||||
/// </summary>
|
||||
@@ -823,7 +840,10 @@ namespace MTC_Adapter
|
||||
ushort[] unOpSpeedMemW = new ushort[30];
|
||||
inizio = DateTime.Now;
|
||||
OsaiMemRW_Word(R, OSAI.MemTypeWord.MW_CODE, memIndex, ref unOpSpeedMemW);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-SPEED_UNOP", unOpSpeedMem.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-SPEED_UNOP", unOpSpeedMem.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
// travaso in modalità byte...
|
||||
Buffer.BlockCopy(unOpSpeedMemW, 0, unOpSpeedMem, 0, unOpSpeedMem.Length);
|
||||
@@ -840,7 +860,11 @@ namespace MTC_Adapter
|
||||
int memIndex = 6200 + 2 * j;
|
||||
inizio = DateTime.Now;
|
||||
OsaiMemRW_Byte(R, OSAI.MemTypeWord.MW_CODE, memIndex, 0, ref int32Mem);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TabUT-VitaRes", int32Mem.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-TabUT-VitaRes", int32Mem.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
return memIndex;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -858,7 +882,11 @@ namespace MTC_Adapter
|
||||
inizio = DateTime.Now;
|
||||
OsaiMemRW_Byte(R, OSAI.MemTypeWord.MW_CODE, memIndex, resto, ref byteMtrx);
|
||||
int8Mem = byteMtrx[0];
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TabUT-FamUT", 8), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-TabUT-FamUT", 8), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
return memIndex;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -871,7 +899,11 @@ namespace MTC_Adapter
|
||||
int memIndex = 4100;
|
||||
inizio = DateTime.Now;
|
||||
OsaiMemRW_Byte(R, OSAI.MemTypeWord.MW_CODE, memIndex, 0, ref tabFam_FamUt);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TabFamUT-FamUT", tabFam_FamUt.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-TabFamUT-FamUT", tabFam_FamUt.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
return memIndex;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -885,7 +917,11 @@ namespace MTC_Adapter
|
||||
int memIndex = 5500 + j;
|
||||
inizio = DateTime.Now;
|
||||
OsaiMemRW_Byte(R, OSAI.MemTypeWord.MW_CODE, memIndex, 0, ref int16Mem);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TabUT-FamUT", int16Mem.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-TabUT-FamUT", int16Mem.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
return memIndex;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -898,7 +934,11 @@ namespace MTC_Adapter
|
||||
int memIndex = 5300;
|
||||
inizio = DateTime.Now;
|
||||
OsaiMemRW_Byte(R, OSAI.MemTypeWord.MW_CODE, memIndex, 0, ref tabUt_UT);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TabUT-UT", tabUt_UT.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-TabUT-UT", tabUt_UT.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
return memIndex;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -911,7 +951,11 @@ namespace MTC_Adapter
|
||||
int memIndex = 3020;
|
||||
inizio = DateTime.Now;
|
||||
OsaiMemRW_Byte(R, OSAI.MemTypeWord.MW_CODE, memIndex, 0, ref elencoUtMem);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-NUMUT", elencoUtMem.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-NUMUT", elencoUtMem.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
return memIndex;
|
||||
}
|
||||
|
||||
@@ -937,7 +981,11 @@ namespace MTC_Adapter
|
||||
{
|
||||
OSAI_ref.getPathGCodeMod(2, ref vettGCodes_02);
|
||||
}
|
||||
if (utils.CRB("recTime")) TimingData.addResult("R-GCodModal", DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult("R-GCodModal", DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
parentForm.commPlcActive = false;
|
||||
}
|
||||
else
|
||||
@@ -963,32 +1011,14 @@ namespace MTC_Adapter
|
||||
}
|
||||
}
|
||||
|
||||
vettPath[i].mPathCodG_Act.Value = GCodAttivi;
|
||||
currGateway.updateItemNodeValue(vettPath[i].gCodeAct_Key, GCodAttivi);
|
||||
// 2017.01.16 da rivedere
|
||||
currGateway.updateItemNodeValue(vettPath[i].currProgRowNumKey, "");
|
||||
currGateway.updateItemNodeValue(vettPath[i].activeAxesKey, "");
|
||||
|
||||
#if false
|
||||
vettPath[i].mPathPosActX.Value = ((decimal)vettTTCoord.data1) / utils.CRI("fattdecimale");
|
||||
vettPath[i].mPathPosActY.Value = ((decimal)vettTTCoord.data2) / utils.CRI("fattdecimale");
|
||||
vettPath[i].mPathPosActZ.Value = ((decimal)vettTTCoord.data3) / utils.CRI("fattdecimale");
|
||||
vettPath[i].mPathPosActI.Value = ((decimal)vettTTCoord.c1) / utils.CRI("fattdecimale");
|
||||
vettPath[i].mPathPosActJ.Value = ((decimal)vettTTCoord.c2) / utils.CRI("fattdecimale");
|
||||
vettPath[i].mPathPosActK.Value = "0"; // è 5 assi...nullo...
|
||||
#endif
|
||||
|
||||
// 2017.01.16 da rivedere
|
||||
vettPath[i].mPathCurrProgRowNum.Value = "";
|
||||
vettPath[i].mPathActiveAxes.Value = "";
|
||||
|
||||
sb_2.AppendLine(string.Format("Path {0}, PROG: {1}", i + 1, vettPath[i].mPathCurrProg.Value));
|
||||
sb_2.AppendLine(string.Format("Path {0}, PROG: {1}", i + 1, currGateway.getItemNode(vettPath[i].currProgKey)));
|
||||
sb_3.AppendLine(string.Format("Path {0}, GCodes: {1}", i + 1, GCodAttivi));
|
||||
|
||||
#if false
|
||||
sb.AppendLine(string.Format("Path {0}, Asse 1: {1:N3}", i + 1, ((decimal)vettTTCoord.data1) / utils.CRI("fattdecimale")));
|
||||
sb.AppendLine(string.Format("Path {0}, Asse 2: {1:N3}", i + 1, ((decimal)vettTTCoord.data2) / utils.CRI("fattdecimale")));
|
||||
sb.AppendLine(string.Format("Path {0}, Asse 3: {1:N3}", i + 1, ((decimal)vettTTCoord.data3) / utils.CRI("fattdecimale")));
|
||||
sb.AppendLine(string.Format("Path {0}, Cent 1: {1:N3}", i + 1, ((decimal)vettTTCoord.c1) / utils.CRI("fattdecimale")));
|
||||
sb.AppendLine(string.Format("Path {0}, Cent 2: {1:N3}", i + 1, ((decimal)vettTTCoord.c2) / utils.CRI("fattdecimale")));
|
||||
#endif
|
||||
|
||||
parentForm.dataMonitor_2 += sb_2.ToString();
|
||||
parentForm.dataMonitor_3 += sb_3.ToString();
|
||||
}
|
||||
@@ -1049,8 +1079,9 @@ namespace MTC_Adapter
|
||||
try
|
||||
{
|
||||
// salvo (per ID) descr asse e processo corrente!
|
||||
vettAxis[currId - 1].mAxDescr.Value = axisTable[j];
|
||||
vettAxis[currId - 1].mAxMainProc.Value = i;
|
||||
|
||||
currGateway.updateItemNodeValue(vettAxis[currId - 1].descriptionKey, axisTable[j]);
|
||||
currGateway.updateItemNodeValue(vettAxis[currId - 1].mainProcKey, i);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
@@ -1134,14 +1165,11 @@ namespace MTC_Adapter
|
||||
newPos = 0;
|
||||
newPosTgt = 0;
|
||||
}
|
||||
// popolo valori... LOAD gestito da vettore letto con area memoria AnalogData.map
|
||||
vettAxis[i].mAxLoad.Value = Convert.ToUInt32(istLoadAssi[i].vcMedian);
|
||||
|
||||
vettAxis[i].mAxPosAct.Value = newPos;
|
||||
vettAxis[i].mAxPosTgt.Value = newPosTgt;
|
||||
|
||||
vettAxis[i].mAxFeedAct.Value = FeedRate;
|
||||
|
||||
// popolo valori... LOAD gestito da vettore letto con area memoria AnalogData.map
|
||||
currGateway.updateItemNodeValue(vettAxis[i].loadKey, Convert.ToUInt32(istLoadAssi[i].vcMedian));
|
||||
currGateway.updateItemNodeValue(vettAxis[i].posActKey, newPos);
|
||||
currGateway.updateItemNodeValue(vettAxis[i].posTgtKey, newPosTgt);
|
||||
currGateway.updateItemNodeValue(vettAxis[i].feedrateKey, FeedRate);
|
||||
// calcolo distanza e salvo valore...
|
||||
distPerc = newPos - prevPosAxis[i];
|
||||
|
||||
@@ -1155,8 +1183,8 @@ namespace MTC_Adapter
|
||||
newDir = prevDirAxis[i];
|
||||
}
|
||||
|
||||
// verifico tipo direzione da tipo asse...
|
||||
tipoAsse = vettAxis[i].mAxType.Value.ToString();
|
||||
// verifico tipo direzione da tipo asse...
|
||||
tipoAsse = currGateway.getItemNode(vettAxis[i].typeKey).ToString();
|
||||
if (tipoAsse == "LINEAR")
|
||||
{
|
||||
// ?: conditional operator.
|
||||
@@ -1167,19 +1195,18 @@ namespace MTC_Adapter
|
||||
direzione = (newDir > 0) ? "CLOCKWISE" : "COUNTER_CLOCKWISE";
|
||||
}
|
||||
|
||||
vettAxis[i].mAxDir.Value = direzione;
|
||||
|
||||
currGateway.updateItemNodeValue(vettAxis[i].directionKey, direzione);
|
||||
|
||||
if (utils.CRB("verbose"))
|
||||
{
|
||||
sb.AppendLine(string.Format("Asse {0}: PosAct:{1:N3} | Prg:{2:N3} | Load:{3:N1} | {4}", axName, newPos, newPosTgt, vettAxis[i].mAxLoad.Value, direzione));
|
||||
sb.AppendLine(string.Format("Asse {0}: PosAct:{1:N3} | Prg:{2:N3} | Load:{3:N1} | {4}", axName, newPos, newPosTgt, currGateway.getItemNode(vettAxis[i].loadKey), direzione));
|
||||
}
|
||||
|
||||
// salvo valori vettore prec...
|
||||
prevPosAxis[i] = newPos;
|
||||
prevDirAxis[i] = newDir;
|
||||
|
||||
vettAxis[i].mAxFeedOver.Value = FeedRateOver;
|
||||
currGateway.updateItemNodeValue(vettAxis[i].feedOverKey, FeedRateOver);
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -1187,12 +1214,12 @@ namespace MTC_Adapter
|
||||
}
|
||||
}
|
||||
// salvo timing!
|
||||
if (utils.CRB("recTime")) TimingData.addResult("R-AXIS_POS", DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult("R-AXIS_POS", DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
parentForm.commPlcActive = false;
|
||||
|
||||
|
||||
|
||||
|
||||
parentForm.dataMonitor_3 += sb.ToString();
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,11 @@
|
||||
using CMSCncLib.CNC;
|
||||
using CMSCncLib.CNC;
|
||||
using MTC;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SCMA.AdapterCom;
|
||||
using Siemens.Sinumerik.Operate.Services;
|
||||
using System;
|
||||
using System.Text;
|
||||
|
||||
namespace MTC_Adapter
|
||||
namespace SCMA
|
||||
{
|
||||
public class AdapterSiemens : AdapterGeneric
|
||||
{
|
||||
@@ -179,11 +177,6 @@ namespace MTC_Adapter
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// struttura dati SIEMENS x ALL DYN DATA
|
||||
/// C:\Users\samuele\Documents\FOCAS A02B-0207-K737_04.20\Document\SpecE\Position\cnc_rddynamic2.htm
|
||||
/// </summary>
|
||||
protected CMSCncLib.Focas1.ODBDY2_1 allDynData;
|
||||
/// <summary>
|
||||
/// Vettore degli allarmi CNC attivi
|
||||
/// </summary>
|
||||
@@ -191,10 +184,11 @@ namespace MTC_Adapter
|
||||
|
||||
/// <summary>
|
||||
/// estende l'init della classe base...
|
||||
/// </summary>
|
||||
/// <param name="caller"></param>
|
||||
/// <param name="adpConf"></param>
|
||||
public AdapterSiemens(MainForm caller, AdapterConf adpConf) : base(caller, adpConf)
|
||||
/// </summary>
|
||||
/// <param name="caller">FORM chaimante</param>
|
||||
/// <param name="adpConf">CONFIGURAZIONE adapter</param>
|
||||
/// <param name="gatewayObj">OGGETTO gestione comunicazione OUT (tipologia e metodi)</param>
|
||||
public AdapterSiemens(MainForm caller, AdapterConf adpConf, Gateway gatewayObj) : base(caller, adpConf, gatewayObj)
|
||||
{
|
||||
// !!!HARD CODED!!! aggiunto banco STATUS del 2 processo IN CODA... (4+1)DW=20byte x strobes...!!!
|
||||
Strobes = new byte[20];
|
||||
@@ -216,11 +210,18 @@ namespace MTC_Adapter
|
||||
prevPosAxis = new double[adpConf.nAxis];
|
||||
prevDirAxis = new int[adpConf.nAxis];
|
||||
|
||||
SIEMENS_ref = (SIEMENS)Runtime.NC;
|
||||
if (utils.CRB("verbose")) lg.Info("SIEMENS_ref da CMSCncLib");
|
||||
SIEMENS_ref = (CMSCncLib.CNC.SIEMENS)Runtime.NC;
|
||||
if (utils.CRB("verbose"))
|
||||
{
|
||||
lg.Info("SIEMENS_ref da CMSCncLib");
|
||||
}
|
||||
|
||||
// disconnetto e connetto...
|
||||
if (utils.CRB("verbose")) lg.Info("SIEMENS: tryDisconnect");
|
||||
if (utils.CRB("verbose"))
|
||||
{
|
||||
lg.Info("SIEMENS: tryDisconnect");
|
||||
}
|
||||
|
||||
tryDisconnect();
|
||||
lg.Info("SIEMENS: tryConnect");
|
||||
tryConnect();
|
||||
@@ -320,7 +321,10 @@ namespace MTC_Adapter
|
||||
// leggo TUTTI i primi 284 byte...
|
||||
inizio = DateTime.Now;
|
||||
SIEMENSMemRW_Byte(R, baseMemDb, memIndex, ref MemBlockTop);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-STROBES", MemBlockTop.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-STROBES", MemBlockTop.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
// suddivido! (...la prima parte ack/strobe...)
|
||||
Buffer.BlockCopy(MemBlockTop, 0, Acknowl, 0, Acknowl.Length);
|
||||
@@ -333,7 +337,10 @@ namespace MTC_Adapter
|
||||
|
||||
inizio = DateTime.Now;
|
||||
SIEMENSMemRW_Byte(R, baseMemDb, memIndex, ref MemBlock);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-STROBES", MemBlock.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-STROBES", MemBlock.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
// suddivido! (...la prima parte ack/strobe...)
|
||||
Buffer.BlockCopy(MemBlock, 0, Acknowl, 0, Acknowl.Length);
|
||||
@@ -372,8 +379,7 @@ namespace MTC_Adapter
|
||||
// 2017.01.16 INVIO vettore azioni (1 o +)... SE CE NE SONO!
|
||||
if (UserAction.Trim() != "")
|
||||
{
|
||||
mUserAction.ForceChanged();
|
||||
mUserAction.Value = UserAction.Trim();
|
||||
currGateway.updateItemNodeValue("USER_ACTION", UserAction.Trim());
|
||||
}
|
||||
|
||||
// verifico strobe dell'auto-test
|
||||
@@ -398,7 +404,11 @@ namespace MTC_Adapter
|
||||
{
|
||||
inizio = DateTime.Now;
|
||||
SIEMENSMemRW_Byte(W, baseMemDb, memIndexAck, ref currACK_DW);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("W{0}-ACK_DW0", currACK_DW.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("W{0}-ACK_DW0", currACK_DW.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
@@ -429,7 +439,10 @@ namespace MTC_Adapter
|
||||
// leggo tutto!!!
|
||||
inizio = DateTime.Now;
|
||||
SIEMENSMemRW_Byte(R, baseMemDb, memIndexMST, ref MemBlock_MST);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-STRB_DW1-P{1:00}", MemBlock_MST.Length, idxPath), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-STRB_DW1-P{1:00}", MemBlock_MST.Length, idxPath), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
}
|
||||
fatto = true;
|
||||
}
|
||||
@@ -463,7 +476,11 @@ namespace MTC_Adapter
|
||||
int memIndex = 284;
|
||||
inizio = DateTime.Now;
|
||||
SIEMENSMemRW_DWord(R, baseMemDb, memIndex, ref MemBlockTestData);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TEST_DATA", MemBlockTestData.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-TEST_DATA", MemBlockTestData.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
@@ -539,7 +556,7 @@ namespace MTC_Adapter
|
||||
public override void readGlobalData()
|
||||
{
|
||||
// 2017.11.20 tentato di recuperare il dato ma pare ci siano solo info x singolo asse, la DB21 SEMBRA promettente ma lato S7 abbiamo verificato con Adimar che nON E? usata nella DBW158 e seg.. x popolare dati di FEEDRATE/SPEEDRATE...
|
||||
#if true
|
||||
|
||||
// Parameter manual NC... pag 790:
|
||||
/*
|
||||
* Leggendo questo:
|
||||
@@ -554,28 +571,16 @@ namespace MTC_Adapter
|
||||
parentForm.commPlcActive = true;
|
||||
inizio = DateTime.Now;
|
||||
var fsData = SIEMENS_ref.getAllNcInfo(currAdpConf.nPath);
|
||||
if (utils.CRB("recTime")) TimingData.addResult("R-NcInfo", DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult("R-NcInfo", DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
parentForm.commPlcActive = false;
|
||||
|
||||
// recupero speed e feed...
|
||||
FeedRate = Convert.ToInt32(fsData.Feed);
|
||||
//SpeedRate = Convert.ToInt32(allNcData.realspeed);
|
||||
#endif
|
||||
|
||||
|
||||
// cercare funzione!!!
|
||||
#if false
|
||||
// leggo dati globali...
|
||||
parentForm.commPlcActive = true;
|
||||
inizio = DateTime.Now;
|
||||
OSAI_ref.O_GetNcInfo1(ref allNcData);
|
||||
if (utils.CRB("recTime")) TimingData.addResult("R-NcInfo", DateTime.Now.Subtract(inizio).Ticks);
|
||||
parentForm.commPlcActive = false;
|
||||
|
||||
// recupero speed e feed...
|
||||
FeedRate = Convert.ToInt32(allNcData.realfeed);
|
||||
SpeedRate = Convert.ToInt32(allNcData.realspeed);
|
||||
#endif
|
||||
//SpeedRate = Convert.ToInt32(allNcData.realspeed);
|
||||
}
|
||||
/// <summary>
|
||||
/// legge dati override...
|
||||
@@ -606,7 +611,11 @@ namespace MTC_Adapter
|
||||
parentForm.commPlcActive = true;
|
||||
inizio = DateTime.Now;
|
||||
SIEMENSMemRW_Word(R, baseMemDb, memIndex, ref PathData_mem);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-PathData", PathData_mem.Length * 2), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-PathData", PathData_mem.Length * 2), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
parentForm.commPlcActive = false;
|
||||
}
|
||||
|
||||
@@ -643,7 +652,11 @@ namespace MTC_Adapter
|
||||
parentForm.commPlcActive = true;
|
||||
inizio = DateTime.Now;
|
||||
allarmiCNC = SIEMENS_ref.getCncAlarm();
|
||||
if (utils.CRB("recTime")) TimingData.addResult("R-CNC-ERROR-MSG", DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult("R-CNC-ERROR-MSG", DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
parentForm.commPlcActive = false;
|
||||
fatto = true;
|
||||
}
|
||||
@@ -666,7 +679,10 @@ namespace MTC_Adapter
|
||||
uint[] tabDatiMtz = new uint[maintData.Length];
|
||||
inizio = DateTime.Now;
|
||||
SIEMENSMemRW_DWord(R, baseMemDb, memIndex, ref tabDatiMtz);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-DatiMtz", tabDatiMtz.Length * 4), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-DatiMtz", tabDatiMtz.Length * 4), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
// decodifico aree memoria secondo tab configurazione
|
||||
processMaintData(tabDatiMtz, maintData);
|
||||
}
|
||||
@@ -692,7 +708,10 @@ namespace MTC_Adapter
|
||||
byte[] tabDatiStatus = new byte[numByte];
|
||||
inizio = DateTime.Now;
|
||||
SIEMENSMemRW_Byte(R, baseMemDb, memIndex, ref tabDatiStatus);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-DatiStatus", tabDatiStatus.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-DatiStatus", tabDatiStatus.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
// decodifico aree memoria secondo tab configurazione
|
||||
processStatusData(tabDatiStatus, statusData);
|
||||
}
|
||||
@@ -717,7 +736,10 @@ namespace MTC_Adapter
|
||||
uint[] tabDatiAnalog = new uint[analogData.Length];
|
||||
inizio = DateTime.Now;
|
||||
SIEMENSMemRW_DWord(R, baseMemDb, memIndex, ref tabDatiAnalog);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-DatiAnalog", tabDatiAnalog.Length * 4), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-DatiAnalog", tabDatiAnalog.Length * 4), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
// decodifico aree memoria secondo tab configurazione
|
||||
processAnalogData(tabDatiAnalog, analogData);
|
||||
}
|
||||
@@ -772,34 +794,23 @@ namespace MTC_Adapter
|
||||
/// <summary>
|
||||
/// Invia singolo allarme CNC se presente
|
||||
/// </summary>
|
||||
/// <param name="allarme"></param>
|
||||
protected void sendAlarmIfPresent(Alarm allarme)
|
||||
/// <param name="allarmeSiemens"></param>
|
||||
protected void sendAlarmIfPresent(Alarm allarmeSiemens)
|
||||
{
|
||||
// controllo valore...
|
||||
if (allarme.Id > 0)
|
||||
if (allarmeSiemens.Id > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (utils.CRI("loglevel") > 5)
|
||||
{
|
||||
lg.Info(string.Format("Allarmi CNC: Id {0} | MESS: {1} | CAT: {2} | SRC: {3}", allarme.Id, allarme.Message, allarme.Category, allarme.Source));
|
||||
lg.Info(string.Format("Allarmi CNC: Id {0} | MESS: {1} | CAT: {2} | SRC: {3}", allarmeSiemens.Id, allarmeSiemens.Message, allarmeSiemens.Category, allarmeSiemens.Source));
|
||||
}
|
||||
|
||||
// da gestire instance = PATH!!! 1/2, x cui raddoppia i messaggi...
|
||||
|
||||
string codAllarme = string.Format("P{0}:S{1}:{2}:{3}", allarme.Instance + utils.CRI("SiemensBaseCountPath"), allarme.Source.Name, allarme.Id, allarme.Message);
|
||||
#if false
|
||||
// se ho asse accodo ad asse altrimenti no...
|
||||
if (allarme.axis == 0)
|
||||
{
|
||||
mAlarmCNC.Add(MTConnect.Condition.Level.FAULT, allarme.alm_msg, codAllarme, "", "");
|
||||
}
|
||||
else
|
||||
{
|
||||
vettAxis[allarme.axis - 1].mAxAlarmCNC.Add(MTConnect.Condition.Level.FAULT, allarme.alm_msg, codAllarme, "", "");
|
||||
}
|
||||
#endif
|
||||
string codAllarme = string.Format("P{0}:S{1}:{2}:{3}", allarmeSiemens.Instance + utils.CRI("SiemensBaseCountPath"), allarmeSiemens.Source.Name, allarmeSiemens.Id, allarmeSiemens.Message);
|
||||
// se NON ancora mostrati allarmi...
|
||||
if (!alarmMsgDispl)
|
||||
{
|
||||
@@ -807,9 +818,9 @@ namespace MTC_Adapter
|
||||
sb.AppendLine(codAllarme);
|
||||
parentForm.dataMonitor_1 += sb.ToString();
|
||||
}
|
||||
|
||||
mAlarmCNC.Add(MTConnect.Condition.Level.FAULT, allarme.Message, codAllarme, "", "");
|
||||
|
||||
// predispongo allarme
|
||||
allarme currAllarm = new allarme(codAllarme, "CNC", "FAULT", allarmeSiemens.Message);
|
||||
currGateway.addAlarm(currAllarm);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
@@ -830,7 +841,10 @@ namespace MTC_Adapter
|
||||
|
||||
inizio = DateTime.Now;
|
||||
SIEMENSMemRW_Byte(R, baseMemUO, memIndex, ref unOpSpeedMem);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-SPEED_UNOP", unOpSpeedMem.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-SPEED_UNOP", unOpSpeedMem.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
procUnOp(unOpSpeedMem);
|
||||
}
|
||||
@@ -846,15 +860,6 @@ namespace MTC_Adapter
|
||||
int memIndex = 4300 + 4 * j;
|
||||
Buffer.BlockCopy(ValUT.tabVitaRes, j, int32Mem, 0, int32Mem.Length);
|
||||
return memIndex;
|
||||
|
||||
#if false
|
||||
// DB253.DBI4300
|
||||
int memIndex = 4300 + 4 * j;
|
||||
inizio = DateTime.Now;
|
||||
SIEMENSMemRW_Byte(R, baseMemUT, memIndex, ref int32Mem);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TabUT-VitaRes", int32Mem.Length * 4), DateTime.Now.Subtract(inizio).Ticks);
|
||||
return memIndex;
|
||||
#endif
|
||||
}
|
||||
/// <summary>
|
||||
/// Procedura di processing lettura memoria x DatiUt - Step 3b
|
||||
@@ -868,15 +873,6 @@ namespace MTC_Adapter
|
||||
int memIndex = 1900 + 1 * j;
|
||||
int8Mem = BitConverter.GetBytes(ValUT.tabTipoVitaRes[j])[0];
|
||||
return memIndex;
|
||||
|
||||
#if false
|
||||
// DB253.DBI1900
|
||||
int memIndex = 1900 + 1 * j;
|
||||
inizio = DateTime.Now;
|
||||
SIEMENSMemRW_Byte(R, baseMemUT, memIndex, ref int8Mem);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TabUT-FamUT", 1), DateTime.Now.Subtract(inizio).Ticks);
|
||||
return memIndex;
|
||||
#endif
|
||||
}
|
||||
/// <summary>
|
||||
/// Procedura di processing lettura memoria x DatiUt - Step 3a
|
||||
@@ -889,15 +885,6 @@ namespace MTC_Adapter
|
||||
int memIndex = 100;
|
||||
Buffer.BlockCopy(ValUT.tabFamUt, 0, tabFam_FamUt, 0, tabFam_FamUt.Length);
|
||||
return memIndex;
|
||||
|
||||
#if false
|
||||
// DB253.DBI100
|
||||
int memIndex = 100;
|
||||
inizio = DateTime.Now;
|
||||
SIEMENSMemRW_Byte(R, baseMemUT, memIndex, ref tabFam_FamUt);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TabFamUT-FamUT", tabFam_FamUt.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
return memIndex;
|
||||
#endif
|
||||
}
|
||||
/// <summary>
|
||||
/// Procedura di processing lettura memoria x DatiUt - Step 2b
|
||||
@@ -911,15 +898,6 @@ namespace MTC_Adapter
|
||||
int memIndex = 2900 + 2 * j;
|
||||
Buffer.BlockCopy(ValUT.tabIdFamUt, j, int16Mem, 0, int16Mem.Length);
|
||||
return memIndex;
|
||||
|
||||
#if false
|
||||
// DB253.DBI2900
|
||||
int memIndex = 2900 + 2 * j;
|
||||
inizio = DateTime.Now;
|
||||
SIEMENSMemRW_Byte(R, baseMemUT, memIndex, ref int16Mem);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TabUT-FamUT", int16Mem.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
return memIndex;
|
||||
#endif
|
||||
}
|
||||
/// <summary>
|
||||
/// Procedura di processing lettura memoria x DatiUt - Step 2a
|
||||
@@ -932,15 +910,6 @@ namespace MTC_Adapter
|
||||
int memIndex = 2500;
|
||||
Buffer.BlockCopy(ValUT.tabUt_UT, 0, tabUt_UT, 0, tabUt_UT.Length);
|
||||
return memIndex;
|
||||
|
||||
#if false
|
||||
// DB253.DBI2500
|
||||
int memIndex = 2500;
|
||||
inizio = DateTime.Now;
|
||||
SIEMENSMemRW_Byte(R, baseMemUT, memIndex, ref tabUt_UT);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TabUT-UT", tabUt_UT.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
return memIndex;
|
||||
#endif
|
||||
}
|
||||
/// <summary>
|
||||
/// Procedura di processing lettura memoria x DatiUt - Step 1
|
||||
@@ -952,21 +921,15 @@ namespace MTC_Adapter
|
||||
// faccio un unica chiamata in blocco di TUTTE le aree che riguardano gli UT e le salvo in variabili locali siemens...
|
||||
inizio = DateTime.Now;
|
||||
ValUT = SIEMENS_ref.getAllUtData(numMemUt, 20);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-UT_ALL", numMemUt * 4 * 2 + numMemUt * 4 + 20 * 2), DateTime.Now.Subtract(inizio).Ticks);
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-UT_ALL", numMemUt * 4 * 2 + numMemUt * 4 + 20 * 2), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
// restituisco dati richiesti...
|
||||
int memIndex = 280;
|
||||
Buffer.BlockCopy(ValUT.elencoUtMem, 0, elencoUtMem, 0, elencoUtMem.Length);
|
||||
return memIndex;
|
||||
|
||||
#if false
|
||||
// DB254.DBI280
|
||||
int memIndex = 280;
|
||||
inizio = DateTime.Now;
|
||||
SIEMENSMemRW_Byte(R, baseMemUO, memIndex, ref elencoUtMem);
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-NUMUT", elencoUtMem.Length), DateTime.Now.Subtract(inizio).Ticks);
|
||||
return memIndex;
|
||||
#endif
|
||||
}
|
||||
/// <summary>
|
||||
/// Processo dati di path
|
||||
@@ -979,14 +942,10 @@ namespace MTC_Adapter
|
||||
// recupero vettore generale G MODE
|
||||
inizio = DateTime.Now;
|
||||
SIEMENS_ref.getPathGCodeMod(currAdpConf.nPath, ref vettGCod);
|
||||
if (utils.CRB("recTime")) TimingData.addResult("R-GCodModal", DateTime.Now.Subtract(inizio).Ticks);
|
||||
|
||||
// NON sappiamo cosa misura... NON leggo
|
||||
#if false
|
||||
inizio = DateTime.Now;
|
||||
SIEMENS.PosizLav[] vettTTCoord = SIEMENS_ref.getPathTTCoord(currAdpConf.nPath);
|
||||
if (utils.CRB("recTime")) TimingData.addResult("R-TTCoord", DateTime.Now.Subtract(inizio).Ticks);
|
||||
#endif
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult("R-GCodModal", DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
// ciclo su path
|
||||
StringBuilder sb_2;
|
||||
@@ -1008,33 +967,9 @@ namespace MTC_Adapter
|
||||
}
|
||||
}
|
||||
|
||||
vettPath[i].mPathCodG_Act.Value = GCodAttivi;
|
||||
currGateway.updateItemNodeValue(vettPath[i].gCodeAct_Key, GCodAttivi);
|
||||
sb_3.AppendLine(string.Format("Path {0}, GCodes: {1}", i + 1, GCodAttivi));
|
||||
|
||||
// nON leggo
|
||||
#if false
|
||||
vettPath[i].mPathPosActX.Value = ((decimal)vettTTCoord[i].X);// / utils.CRI("fattdecimale");
|
||||
vettPath[i].mPathPosActY.Value = ((decimal)vettTTCoord[i].Y);// / utils.CRI("fattdecimale");
|
||||
vettPath[i].mPathPosActZ.Value = ((decimal)vettTTCoord[i].Z);// / utils.CRI("fattdecimale");
|
||||
vettPath[i].mPathPosActI.Value = ((decimal)vettTTCoord[i].I);// / utils.CRI("fattdecimale");
|
||||
vettPath[i].mPathPosActJ.Value = ((decimal)vettTTCoord[i].J);// / utils.CRI("fattdecimale");
|
||||
vettPath[i].mPathPosActK.Value = ((decimal)vettTTCoord[i].K);// / utils.CRI("fattdecimale");
|
||||
#endif
|
||||
|
||||
#if false
|
||||
// 2017.01.16 da rivedere
|
||||
vettPath[i].mPathCurrProgRowNum.Value = "";
|
||||
vettPath[i].mPathActiveAxes.Value = "";
|
||||
|
||||
sb_2.AppendLine(string.Format("Path {0}, PROG: {1}", i + 1, vettPath[i].mPathCurrProg.Value));
|
||||
|
||||
sb_3.AppendLine(string.Format("Path {0}, Asse 1: {1:N3}", i + 1, ((decimal)vettTTCoord.data1) / utils.CRI("fattdecimale")));
|
||||
sb_3.AppendLine(string.Format("Path {0}, Asse 2: {1:N3}", i + 1, ((decimal)vettTTCoord.data2) / utils.CRI("fattdecimale")));
|
||||
sb_3.AppendLine(string.Format("Path {0}, Asse 3: {1:N3}", i + 1, ((decimal)vettTTCoord.data3) / utils.CRI("fattdecimale")));
|
||||
sb_3.AppendLine(string.Format("Path {0}, Cent 1: {1:N3}", i + 1, ((decimal)vettTTCoord.c1) / utils.CRI("fattdecimale")));
|
||||
sb_3.AppendLine(string.Format("Path {0}, Cent 2: {1:N3}", i + 1, ((decimal)vettTTCoord.c2) / utils.CRI("fattdecimale")));
|
||||
#endif
|
||||
|
||||
parentForm.dataMonitor_2 += sb_2.ToString();
|
||||
parentForm.dataMonitor_3 += sb_3.ToString();
|
||||
}
|
||||
@@ -1057,8 +992,10 @@ namespace MTC_Adapter
|
||||
// recupero in blocco dati assi...
|
||||
inizio = DateTime.Now;
|
||||
SIEMENS.AxData[] ValAssi = SIEMENS_ref.getAllAxisData();
|
||||
if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-AXIS_ALL", ValAssi.Length * 4 * 2), DateTime.Now.Subtract(inizio).Ticks);
|
||||
|
||||
if (utils.CRB("recTime"))
|
||||
{
|
||||
TimingData.addResult(string.Format("R{0}-AXIS_ALL", ValAssi.Length * 4 * 2), DateTime.Now.Subtract(inizio).Ticks);
|
||||
}
|
||||
|
||||
for (int i = 0; i < currAdpConf.nAxis; i++)
|
||||
{
|
||||
@@ -1067,18 +1004,13 @@ namespace MTC_Adapter
|
||||
{
|
||||
// popolo valori... ipotesi MILLESIMI di mm... CONVERSIONE BigEndianness
|
||||
newPos = ValAssi[i].PosAct;
|
||||
vettAxis[i].mAxPosAct.Value = newPos;
|
||||
vettAxis[i].mAxLoad.Value = ValAssi[i].Load;
|
||||
|
||||
// imposto feed "generale" per asse... si potrebbe usare velocità del singolo asse... !!!FARE!!! verificare
|
||||
vettAxis[i].mAxFeedAct.Value = ValAssi[i].Feed;// FeedRate;
|
||||
vettAxis[i].mAxFeedOver.Value = ValAssi[i].FeedOver; // FeedRateOver;
|
||||
|
||||
vettAxis[i].mAxLoad.Value = ValAssi[i].Load;
|
||||
|
||||
// verifica pos TGT... NON E' orrettamente letta lato area memoria...
|
||||
vettAxis[i].mAxPosTgt.Value = ValAssi[i].PosTgt;
|
||||
|
||||
currGateway.updateItemNodeValue(vettAxis[i].posActKey, newPos);
|
||||
currGateway.updateItemNodeValue(vettAxis[i].loadKey, ValAssi[i].Load);
|
||||
// imposto feed "generale" per asse... si potrebbe usare velocità del singolo asse... !!!FARE!!! verificare
|
||||
currGateway.updateItemNodeValue(vettAxis[i].feedrateKey, ValAssi[i].Feed);
|
||||
currGateway.updateItemNodeValue(vettAxis[i].feedOverKey, ValAssi[i].FeedOver);
|
||||
// verifica pos TGT... NON E' correttamente letta lato area memoria...
|
||||
currGateway.updateItemNodeValue(vettAxis[i].posTgtKey, ValAssi[i].PosTgt);
|
||||
// calcolo distanza e salvo valore...
|
||||
distPerc = newPos - prevPosAxis[i];
|
||||
|
||||
@@ -1092,8 +1024,8 @@ namespace MTC_Adapter
|
||||
newDir = prevDirAxis[i];
|
||||
}
|
||||
|
||||
// verifico tipo direzione da tipo asse...
|
||||
tipoAsse = vettAxis[i].mAxType.Value.ToString();
|
||||
// verifico tipo direzione da tipo asse...
|
||||
tipoAsse = currGateway.getItemNode(vettAxis[i].typeKey).ToString();
|
||||
if (tipoAsse == "LINEAR")
|
||||
{
|
||||
// ?: conditional operator.
|
||||
@@ -1103,8 +1035,8 @@ namespace MTC_Adapter
|
||||
{
|
||||
direzione = (newDir > 0) ? "CLOCKWISE" : "COUNTER_CLOCKWISE";
|
||||
}
|
||||
// imposto direzione
|
||||
vettAxis[i].mAxDir.Value = direzione;
|
||||
// imposto direzione
|
||||
currGateway.updateItemNodeValue(vettAxis[i].directionKey, direzione);
|
||||
|
||||
if (utils.CRB("verbose"))
|
||||
{
|
||||
@@ -4,7 +4,13 @@
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
|
||||
</startup>
|
||||
<appSettings>
|
||||
<!--MAIN CONF-->
|
||||
<add key="appName" value="MTConnect Adapter"/>
|
||||
<!--parametri protocollo comunicazione-->
|
||||
<add key="adpProto" value="MTC"/>
|
||||
<add key="MTC_port" value="7878"/>
|
||||
<add key="SOURS_IP" value="localhost"/>
|
||||
<add key="SOURS_port" value="6379"/>
|
||||
<!--gestione TIMERS e periodi multipli x thread lenti-->
|
||||
<add key="startTimerMs" value="250"/>
|
||||
<add key="timerIntMs" value="5"/><!--invio da adapter ad agent: 5ms-->
|
||||
@@ -47,7 +53,7 @@
|
||||
<!--<add key ="ipPLC" value="192.168.214.1" />-->
|
||||
<!--CMS PROD-->
|
||||
<!--<add key ="ipPLC" value="192.168.139.1" />-->
|
||||
<add key ="ipPLC" value="192.168.214.1" />
|
||||
<add key ="ipPLC" value="192.168.157.2" />
|
||||
|
||||
<add key="recTime" value="true"/>
|
||||
<add key="verbose" value="true"/>
|
||||
+4
-134
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<AdapterConf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<Version>1</Version>
|
||||
<NomeAdapt>ADAPTER_SIEMENS</NomeAdapt>
|
||||
<TipoAdapt>SIEMENS</TipoAdapt>
|
||||
<NomeAdapt>ADAPTER_OSAI</NomeAdapt>
|
||||
<TipoAdapt>OSAI</TipoAdapt>
|
||||
<ContOreMaccOn>0</ContOreMaccOn>
|
||||
<ContOreMaccLav>0</ContOreMaccLav>
|
||||
<ContSlittaTast>0</ContSlittaTast>
|
||||
@@ -83,10 +83,10 @@
|
||||
<ident>Path_01</ident>
|
||||
<dataRefList />
|
||||
</element>
|
||||
<element>
|
||||
<!--<element>
|
||||
<ident>Path_02</ident>
|
||||
<dataRefList />
|
||||
</element>
|
||||
</element>-->
|
||||
</Path>
|
||||
<UnOp>
|
||||
<element>
|
||||
@@ -173,135 +173,5 @@
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
<element>
|
||||
<ident>Axis_07</ident>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>Axis_07_Type</Key>
|
||||
<Value>LINEAR</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_07_Grp</Key>
|
||||
<Value>00</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
<element>
|
||||
<ident>Axis_08</ident>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>Axis_08_Type</Key>
|
||||
<Value>LINEAR</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_08_Grp</Key>
|
||||
<Value>00</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
<element>
|
||||
<ident>Axis_09</ident>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>Axis_09_Type</Key>
|
||||
<Value>LINEAR</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_09_Grp</Key>
|
||||
<Value>00</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
<element>
|
||||
<ident>Axis_10</ident>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>Axis_10_Type</Key>
|
||||
<Value>LINEAR</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_10_Grp</Key>
|
||||
<Value>00</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
<element>
|
||||
<ident>Axis_11</ident>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>Axis_11_Type</Key>
|
||||
<Value>LINEAR</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_11_Grp</Key>
|
||||
<Value>00</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
<element>
|
||||
<ident>Axis_12</ident>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>Axis_12_Type</Key>
|
||||
<Value>LINEAR</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_12_Grp</Key>
|
||||
<Value>00</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
<element>
|
||||
<ident>Axis_13</ident>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>Axis_13_Type</Key>
|
||||
<Value>ROTARY</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_13_Grp</Key>
|
||||
<Value>00</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
<element>
|
||||
<ident>Axis_14</ident>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>Axis_14_Type</Key>
|
||||
<Value>ROTARY</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_14_Grp</Key>
|
||||
<Value>00</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
<element>
|
||||
<ident>Axis_15</ident>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>Axis_15_Type</Key>
|
||||
<Value>LINEAR</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_15_Grp</Key>
|
||||
<Value>00</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
<element>
|
||||
<ident>Axis_16</ident>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>Axis_16_Type</Key>
|
||||
<Value>LINEAR</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_16_Grp</Key>
|
||||
<Value>00</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
</Axis>
|
||||
</AdapterConf>
|
||||
@@ -0,0 +1,94 @@
|
||||
using System;
|
||||
|
||||
namespace SCMA
|
||||
{
|
||||
|
||||
public static class EnumerationExtensions
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// checks if the value contains the provided type
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static bool Has<T>(this System.Enum type, T value)
|
||||
{
|
||||
try
|
||||
{
|
||||
return (((int)(object)type & (int)(object)value) == (int)(object)value);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// checks if the value is only the provided type
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static bool Is<T>(this System.Enum type, T value)
|
||||
{
|
||||
try
|
||||
{
|
||||
return (int)(object)type == (int)(object)value;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// appends a value
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static T Add<T>(this System.Enum type, T value)
|
||||
{
|
||||
try
|
||||
{
|
||||
return (T)(object)(((int)(object)type | (int)(object)value));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new ArgumentException(
|
||||
string.Format(
|
||||
"Could not append value from enumerated type '{0}'.",
|
||||
typeof(T).Name
|
||||
), ex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// completely removes the value
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static T Remove<T>(this System.Enum type, T value)
|
||||
{
|
||||
try
|
||||
{
|
||||
return (T)(object)(((int)(object)type & ~(int)(object)value));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new ArgumentException(
|
||||
string.Format(
|
||||
"Could not remove value from enumerated type '{0}'.",
|
||||
typeof(T).Name
|
||||
), ex);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+6
-4
@@ -1,4 +1,4 @@
|
||||
namespace MTC_Adapter
|
||||
namespace SCMA
|
||||
{
|
||||
partial class MainForm
|
||||
{
|
||||
@@ -1343,7 +1343,7 @@
|
||||
// mLoadAdaptConf
|
||||
//
|
||||
this.mLoadAdaptConf.Name = "mLoadAdaptConf";
|
||||
this.mLoadAdaptConf.Size = new System.Drawing.Size(233, 26);
|
||||
this.mLoadAdaptConf.Size = new System.Drawing.Size(232, 26);
|
||||
this.mLoadAdaptConf.Text = "LOAD ADAPTER CONF";
|
||||
this.mLoadAdaptConf.Click += new System.EventHandler(this.mLoadAdaptConf_Click);
|
||||
//
|
||||
@@ -1360,7 +1360,7 @@
|
||||
//
|
||||
this.mConfGen.Name = "mConfGen";
|
||||
this.mConfGen.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.T)));
|
||||
this.mConfGen.Size = new System.Drawing.Size(336, 26);
|
||||
this.mConfGen.Size = new System.Drawing.Size(332, 26);
|
||||
this.mConfGen.Text = "TEMPLATE CONF GENERATOR";
|
||||
this.mConfGen.Click += new System.EventHandler(this.mConfGen_Click);
|
||||
//
|
||||
@@ -1614,6 +1614,7 @@
|
||||
this.port.TabIndex = 1;
|
||||
this.port.Text = "7878";
|
||||
this.port.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
|
||||
this.port.Visible = false;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
@@ -1624,6 +1625,7 @@
|
||||
this.label1.Size = new System.Drawing.Size(34, 17);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Port";
|
||||
this.label1.Visible = false;
|
||||
//
|
||||
// tbConf
|
||||
//
|
||||
@@ -2273,7 +2275,7 @@
|
||||
//
|
||||
this.trayMenu.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||
this.trayMenu.Name = "trayMenu";
|
||||
this.trayMenu.Size = new System.Drawing.Size(67, 4);
|
||||
this.trayMenu.Size = new System.Drawing.Size(61, 4);
|
||||
this.trayMenu.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.trayMenu_ItemClicked);
|
||||
//
|
||||
// MainForm
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright Copyright 2016, Steamware s.r.l. & CMS/SCM s.p.a.
|
||||
* Copyright Copyright 2016+, Steamware s.r.l. & CMS/SCM s.p.a.
|
||||
*
|
||||
* Based on data, code and example by MTC consortium & System Insights, Inc.
|
||||
*
|
||||
@@ -8,6 +8,7 @@ using MTC;
|
||||
using NLog;
|
||||
using NLog.Config;
|
||||
using NLog.Targets;
|
||||
using SCMA.AdapterCom;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
@@ -18,7 +19,7 @@ using System.IO;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace MTC_Adapter
|
||||
namespace SCMA
|
||||
{
|
||||
|
||||
public partial class MainForm : Form
|
||||
@@ -72,6 +73,8 @@ namespace MTC_Adapter
|
||||
/// </summary>
|
||||
public tipoAdapter tipoScelto = tipoAdapter.DEMO;
|
||||
|
||||
//public Gateway protocollo
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -355,41 +358,56 @@ namespace MTC_Adapter
|
||||
/// </summary>
|
||||
private void loadAdapterType()
|
||||
{
|
||||
Gateway currGateway;// = new Gateway();
|
||||
switch (utils.CRS("adpProto"))
|
||||
{
|
||||
case "MTC":
|
||||
currGateway = new GatewayMTC();
|
||||
break;
|
||||
case "SOURS":
|
||||
currGateway = new GatewaySOURS();
|
||||
break;
|
||||
case "":
|
||||
default:
|
||||
currGateway = new Gateway();
|
||||
break;
|
||||
}
|
||||
// ira inizializzo VERO adapter x tipo controllo e protocollo...
|
||||
switch (tipoScelto)
|
||||
{
|
||||
case tipoAdapter.DEMO:
|
||||
agObj = new AdapterDemo(this, adpConf);
|
||||
agObj = new AdapterDemo(this, adpConf, currGateway);
|
||||
EnableTab(tabCtrlMain.TabPages[1], true);
|
||||
EnableTab(tabCtrlMain.TabPages[2], true);
|
||||
start.Enabled = true;
|
||||
break;
|
||||
case tipoAdapter.ESAGV:
|
||||
agObj = new AdapterESA(this, adpConf);
|
||||
agObj = new AdapterESA(this, adpConf, currGateway);
|
||||
EnableTab(tabCtrlMain.TabPages[1], true);
|
||||
EnableTab(tabCtrlMain.TabPages[2], false);
|
||||
start.Enabled = true;
|
||||
break;
|
||||
case tipoAdapter.FANUC:
|
||||
agObj = new AdapterFanuc(this, adpConf);
|
||||
agObj = new AdapterFanuc(this, adpConf, currGateway);
|
||||
EnableTab(tabCtrlMain.TabPages[1], true);
|
||||
EnableTab(tabCtrlMain.TabPages[2], false);
|
||||
start.Enabled = true;
|
||||
break;
|
||||
case tipoAdapter.OSAI:
|
||||
agObj = new AdapterOsai(this, adpConf);
|
||||
agObj = new AdapterOsai(this, adpConf, currGateway);
|
||||
EnableTab(tabCtrlMain.TabPages[1], true);
|
||||
EnableTab(tabCtrlMain.TabPages[2], false);
|
||||
start.Enabled = true;
|
||||
break;
|
||||
case tipoAdapter.SIEMENS:
|
||||
agObj = new AdapterSiemens(this, adpConf);
|
||||
agObj = new AdapterSiemens(this, adpConf, currGateway);
|
||||
EnableTab(tabCtrlMain.TabPages[1], true);
|
||||
EnableTab(tabCtrlMain.TabPages[2], false);
|
||||
start.Enabled = true;
|
||||
break;
|
||||
case tipoAdapter.ND:
|
||||
default:
|
||||
agObj = new AdapterDemo(this, adpConf);
|
||||
agObj = new AdapterDemo(this, adpConf, currGateway);
|
||||
EnableTab(tabCtrlMain.TabPages[1], false);
|
||||
EnableTab(tabCtrlMain.TabPages[2], false);
|
||||
start.Enabled = false;
|
||||
@@ -503,8 +521,7 @@ namespace MTC_Adapter
|
||||
// se NON sta girando...
|
||||
if (!agObj.adpRunning)
|
||||
{
|
||||
int porta = Convert.ToInt32(port.Text);
|
||||
agObj.startAdapter(porta);
|
||||
agObj.startAdapter();
|
||||
displayTaskAndWait("Adapter started!");
|
||||
|
||||
// fix buttons start/stop/dump
|
||||
@@ -1690,7 +1707,7 @@ namespace MTC_Adapter
|
||||
bitArray[32 + i] = ErrRT_03.Checked;
|
||||
}
|
||||
byte[] newAlarm = utils.ToByteArray(bitArray);
|
||||
Buffer.BlockCopy(newAlarm, 0, agObj.AlarmFlags, 0, 32);
|
||||
Buffer.BlockCopy(newAlarm, 0, agObj.currGateway.AlarmFlags, 0, 32);
|
||||
}
|
||||
|
||||
private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||
@@ -138,24 +138,6 @@
|
||||
<metadata name="K.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="X.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Y.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Z.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="I.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="J.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="K.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>104, 17</value>
|
||||
</metadata>
|
||||
@@ -28,9 +28,9 @@
|
||||
<target xsi:type="File" name="f" fileName="${basedir}/logs/${shortdate}.log"
|
||||
layout="${longdate} ${uppercase:${level}} ${message}" />
|
||||
-->
|
||||
<target xsi:type="File"
|
||||
name="f"
|
||||
fileName="${basedir}/logs/${shortdate}.log"
|
||||
<target xsi:type="File"
|
||||
name="f"
|
||||
fileName="${basedir}/logs/${shortdate}.log"
|
||||
layout="${longdate} ${uppercase:${level}} ${message}"
|
||||
/>
|
||||
<!--<target xsi:type="File"
|
||||
+516
-314
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace MTC_Adapter
|
||||
namespace SCMA
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
+28
-28
@@ -1,28 +1,28 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("MTC_Adapter")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyProduct("MTC_Adapter")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("57d02317-e0a5-4275-a4c9-baa757eaa312")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("SCMA")]
|
||||
[assembly: AssemblyDescription("SCM Group Adapter")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyProduct("SCMA")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("57d02317-e0a5-4275-a4c9-baa757eaa312")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
+63
-63
@@ -1,63 +1,63 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Il codice è stato generato da uno strumento.
|
||||
// Versione runtime:4.0.30319.42000
|
||||
//
|
||||
// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MTC_Adapter.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Classe di risorse fortemente tipizzata per la ricerca di stringhe localizzate e così via.
|
||||
/// </summary>
|
||||
// Questa classe è stata generata automaticamente dalla classe StronglyTypedResourceBuilder.
|
||||
// tramite uno strumento quale ResGen o Visual Studio.
|
||||
// Per aggiungere o rimuovere un membro, modificare il file con estensione ResX ed eseguire nuovamente ResGen
|
||||
// con l'opzione /str oppure ricompilare il progetto VS.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce l'istanza di ResourceManager nella cache utilizzata da questa classe.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MTC_Adapter.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Esegue l'override della proprietà CurrentUICulture del thread corrente per tutte le
|
||||
/// ricerche di risorse eseguite utilizzando questa classe di risorse fortemente tipizzata.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Il codice è stato generato da uno strumento.
|
||||
// Versione runtime:4.0.30319.42000
|
||||
//
|
||||
// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace SCMA.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Classe di risorse fortemente tipizzata per la ricerca di stringhe localizzate e così via.
|
||||
/// </summary>
|
||||
// Questa classe è stata generata automaticamente dalla classe StronglyTypedResourceBuilder.
|
||||
// tramite uno strumento quale ResGen o Visual Studio.
|
||||
// Per aggiungere o rimuovere un membro, modificare il file con estensione ResX ed eseguire nuovamente ResGen
|
||||
// con l'opzione /str oppure ricompilare il progetto VS.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce l'istanza di ResourceManager nella cache utilizzata da questa classe.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SCMA.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Esegue l'override della proprietà CurrentUICulture del thread corrente per tutte le
|
||||
/// ricerche di risorse eseguite utilizzando questa classe di risorse fortemente tipizzata.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+26
-26
@@ -1,26 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Il codice è stato generato da uno strumento.
|
||||
// Versione runtime:4.0.30319.42000
|
||||
//
|
||||
// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MTC_Adapter.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Il codice è stato generato da uno strumento.
|
||||
// Versione runtime:4.0.30319.42000
|
||||
//
|
||||
// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace SCMA.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.8.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,503 @@
|
||||
# Commenti con "#", elenco tipo COD_NUM|GRUPPO|LEVEL|DESCRIZIONE completa
|
||||
000001|PLC|FAULT|[COD 001] - 152 AXIS X DRIVING GEAR NOT READY
|
||||
000002|PLC|FAULT|[COD 002] - 152 AXIS Y DRIVING GEAR NOT READY
|
||||
000003|PLC|FAULT|[COD 003] - 152 AXIS Z DRIVING GEAR NOT READY
|
||||
000004|PLC|FAULT|[COD 004] - 152 AXIS V DRIVING GEAR NOT READY
|
||||
000005|PLC|FAULT|[COD 005] - 152 AXIS B DRIVING GEAR NOT READY
|
||||
000006|PLC|FAULT|[COD 006] - 152 AXIS C DRIVING GEAR NOT READY
|
||||
000007|PLC|FAULT|[COD 007] - 152 Allarme azionamento asse ID 07
|
||||
000008|PLC|FAULT|[COD 008] - 152 Allarme azionamento asse ID 08
|
||||
000009|PLC|FAULT|[COD 009] - 152 Allarme azionamento asse ID 09
|
||||
000010|PLC|FAULT|[COD 010] - 152 Allarme azionamento asse ID 10
|
||||
000011|PLC|FAULT|[COD 011] - 152 Allarme azionamento asse ID 11
|
||||
000012|PLC|FAULT|[COD 012] - 152 Allarme azionamento asse ID 12
|
||||
000013|PLC|FAULT|[COD 013] - 152 Allarme azionamento asse ID 13
|
||||
000014|PLC|FAULT|[COD 014] - 152 Allarme azionamento asse ID 14
|
||||
000015|PLC|FAULT|[COD 015] - 152 Allarme azionamento asse ID 15
|
||||
000016|PLC|FAULT|[COD 016] - 152 Allarme azionamento asse ID 16
|
||||
000017|PLC|FAULT|[COD 017] - 152 Allarme azionamento asse ID 17
|
||||
000018|PLC|FAULT|[COD 018] - 152 Allarme azionamento asse ID 18
|
||||
000019|PLC|FAULT|[COD 019] - 152 Allarme azionamento asse ID 19
|
||||
000020|PLC|FAULT|[COD 020] - 152 Allarme azionamento asse ID 20
|
||||
000021|PLC|FAULT|[COD 021] - 152 Allarme azionamento asse ID 21
|
||||
000022|PLC|FAULT|[COD 022] - 152 Allarme azionamento asse ID 22
|
||||
000023|PLC|FAULT|[COD 023] - 152 Allarme azionamento asse ID 23
|
||||
000024|PLC|FAULT|[COD 024] - 152 Allarme azionamento asse ID 24
|
||||
000025|PLC|FAULT|[COD 025] - 152 Allarme azionamento asse ID 25
|
||||
000026|PLC|FAULT|[COD 026] - 152 Allarme azionamento asse ID 26
|
||||
000027|PLC|FAULT|[COD 027] - 152 Allarme azionamento asse ID 27
|
||||
000028|PLC|FAULT|[COD 028] - 152 Allarme azionamento asse ID 28
|
||||
000029|PLC|FAULT|[COD 029] - 152 Allarme azionamento asse ID 29
|
||||
000030|PLC|FAULT|[COD 030] - 152 Allarme azionamento asse ID 30
|
||||
000031|PLC|FAULT|[COD 031] - 152 Allarme azionamento asse ID 31
|
||||
000032|PLC|FAULT|[COD 032] - 152 Allarme azionamento asse ID 32
|
||||
000033|PLC|FAULT|[COD 033] - 152 Allarme azionamento asse ID 33
|
||||
000034|PLC|FAULT|[COD 034] - 152 Allarme azionamento asse ID 34
|
||||
000035|PLC|FAULT|[COD 035] - 152 Allarme azionamento asse ID 35
|
||||
000036|PLC|FAULT|[COD 036] - 152 Allarme azionamento asse ID 36
|
||||
000037|PLC|FAULT|[COD 037] - 152 Allarme azionamento asse ID 37
|
||||
000038|PLC|FAULT|[COD 038] - 152 Allarme azionamento asse ID 38
|
||||
000039|PLC|FAULT|[COD 039] - 152 Allarme azionamento asse ID 39
|
||||
000040|PLC|FAULT|[COD 040] - 152 Allarme azionamento asse ID 40
|
||||
000041|PLC|FAULT|[COD 041] - 152 Allarme azionamento asse ID 41
|
||||
000042|PLC|FAULT|[COD 042] - 152 Allarme azionamento asse ID 42
|
||||
000043|PLC|FAULT|[COD 043] - 152 Allarme azionamento asse ID 43
|
||||
000044|PLC|FAULT|[COD 044] - 152 Allarme azionamento asse ID 44
|
||||
000045|PLC|FAULT|[COD 045] - 152 Allarme azionamento asse ID 45
|
||||
000046|PLC|FAULT|[COD 046] - 152 Allarme azionamento asse ID 46
|
||||
000047|PLC|FAULT|[COD 047] - 152 Allarme azionamento asse ID 47
|
||||
000048|PLC|FAULT|[COD 048] - 152 Allarme azionamento asse ID 48
|
||||
000049|PLC|FAULT|[COD 049] - 152 Allarme azionamento asse ID 49
|
||||
000050|PLC|FAULT|[COD 050] - 152 Allarme azionamento asse ID 50
|
||||
000051|PLC|FAULT|[COD 051] - 152 Allarme azionamento asse ID 51
|
||||
000052|PLC|FAULT|[COD 052] - 152 Allarme azionamento asse ID 52
|
||||
000053|PLC|FAULT|[COD 053] - 152 Allarme azionamento asse ID 53
|
||||
000054|PLC|FAULT|[COD 054] - 152 Allarme azionamento asse ID 54
|
||||
000055|PLC|FAULT|[COD 055] - 152 Allarme azionamento asse ID 55
|
||||
000056|PLC|FAULT|[COD 056] - 152 Allarme azionamento asse ID 56
|
||||
000057|PLC|FAULT|[COD 057] - 152 Allarme azionamento asse ID 57
|
||||
000058|PLC|FAULT|[COD 058] - 152 Allarme azionamento asse ID 58
|
||||
000059|PLC|FAULT|[COD 059] - 152 Allarme azionamento asse ID 59
|
||||
000060|PLC|FAULT|[COD 060] - 152 Allarme azionamento asse ID 60
|
||||
000061|PLC|FAULT|[COD 061] - 152 Allarme azionamento asse ID 61
|
||||
000062|PLC|FAULT|[COD 062] - 152 Allarme azionamento asse ID 62
|
||||
000063|PLC|FAULT|[COD 063] - 152 Allarme azionamento asse ID 63
|
||||
000064|PLC|FAULT|[COD 064] - 152 Allarme azionamento asse ID 64
|
||||
000065|PLC|FAULT|[COD 065] - Potenza spenta
|
||||
000066|PLC|FAULT|[COD 066] - Assi non riferiti
|
||||
000067|PLC|FAULT|[COD 067] - Errore nel ciclo azzeramento assi
|
||||
000068|PLC|FAULT|[COD 068] - Errore abilitazione assi
|
||||
000069|PLC|FAULT|[COD 069] - Assi non abilitati
|
||||
000070|PLC|FAULT|[COD 070] - Errore preset origini
|
||||
000071|PLC|FAULT|[COD 071] - Livello minimo lubrificazione
|
||||
000072|PLC|FAULT|[COD 072] - Contr.tempo esecuzione background
|
||||
000073|PLC|FAULT|[COD 073] - Pulsante di start rifiutato
|
||||
000074|PLC|FAULT|[COD 074] - Troppi assi selezionati
|
||||
000075|PLC|FAULT|[COD 075] - Teach pendant abilitata
|
||||
000076|PLC|FAULT|[COD 076] -
|
||||
000077|PLC|FAULT|[COD 077] - Errore salvataggio file XML
|
||||
000078|PLC|FAULT|[COD 078] - Parametri AMP assi sovrascritti
|
||||
000079|PLC|FAULT|[COD 079] - Azion.OsWire in attesa rapid-halt
|
||||
000080|PLC|FAULT|[COD 080] - Azion.OsWire attesa I/O emer.man.
|
||||
000081|PLC|FAULT|[COD 081] - Anomalia generica function block
|
||||
000082|PLC|FAULT|[COD 082] - Nodo di I/O digitale in errore
|
||||
000083|PLC|FAULT|[COD 083] - Time-out abilitazione assi
|
||||
000084|PLC|FAULT|[COD 084] - Err. gestione file mappatura I/O
|
||||
000085|PLC|FAULT|[COD 085] - Azionamenti guasti
|
||||
000086|PLC|FAULT|[COD 086] - Errore durante l'inizializzazione
|
||||
000087|PLC|FAULT|[COD 087] - Watch dog console Top 5
|
||||
000088|PLC|FAULT|[COD 088] - Errore gestione reset
|
||||
000089|PLC|FAULT|[COD 089] - Errore file XML configuraz. PLC
|
||||
000090|PLC|FAULT|[COD 090] - Errore file XML configuraz. assi
|
||||
000091|PLC|FAULT|[COD 091] - Errore Ethercat
|
||||
000092|PLC|FAULT|[COD 092] -
|
||||
000093|PLC|FAULT|[COD 093] - Azionamento mandrino 4 guasto
|
||||
000094|PLC|FAULT|[COD 094] - Azionamento mandrino 3 guasto
|
||||
000095|PLC|FAULT|[COD 095] - Azionamento mandrino 2 guasto
|
||||
000096|PLC|FAULT|[COD 096] - Azionamento mandrino 1 guasto
|
||||
000097|PLC|FAULT|[COD 097] - Ripari aperti
|
||||
000098|PLC|FAULT|[COD 098] - Mancanza pressostato aria
|
||||
000099|PLC|FAULT|[COD 099] - Intervento termici generici
|
||||
000100|PLC|FAULT|[COD 100] - Oltrecorsa asse ausiliario
|
||||
000101|PLC|FAULT|[COD 101] - Teach pendant liveman
|
||||
000102|PLC|FAULT|[COD 102] - Disabilitazione assi
|
||||
000103|PLC|FAULT|[COD 103] -
|
||||
000104|PLC|FAULT|[COD 104] -
|
||||
000105|PLC|FAULT|[COD 105] -
|
||||
000106|PLC|FAULT|[COD 106] -
|
||||
000107|PLC|FAULT|[COD 107] -
|
||||
000108|PLC|FAULT|[COD 108] -
|
||||
000109|PLC|FAULT|[COD 109] -
|
||||
000110|PLC|FAULT|[COD 110] -
|
||||
000111|PLC|FAULT|[COD 111] -
|
||||
000112|PLC|FAULT|[COD 112] -
|
||||
000113|PLC|FAULT|[COD 113] - Rotaz. mandr. 1 con pezzo sbloc.
|
||||
000114|PLC|FAULT|[COD 114] - Rotaz. mandr. 1 con utens. sbloc.
|
||||
000115|PLC|FAULT|[COD 115] - Err.parità sensori uten.1 blo/sbl
|
||||
000116|PLC|FAULT|[COD 116] - Memoria utens. in mandr. 1 errata
|
||||
000117|PLC|FAULT|[COD 117] - Rotaz. mandr. 1 con riferim. alti
|
||||
000118|PLC|FAULT|[COD 118] -
|
||||
000119|PLC|FAULT|[COD 119] -
|
||||
000120|PLC|FAULT|[COD 120] -
|
||||
000121|PLC|FAULT|[COD 121] -
|
||||
000122|PLC|FAULT|[COD 122] -
|
||||
000123|PLC|FAULT|[COD 123] -
|
||||
000124|PLC|FAULT|[COD 124] -
|
||||
000125|PLC|FAULT|[COD 125] -
|
||||
000126|PLC|FAULT|[COD 126] -
|
||||
000127|PLC|FAULT|[COD 127] -
|
||||
000128|PLC|FAULT|[COD 128] -
|
||||
000129|PLC|FAULT|[COD 129] - Pezzo 1 non bloccato
|
||||
000130|PLC|FAULT|[COD 130] - Pezzo 1 non sbloccato
|
||||
000131|PLC|FAULT|[COD 131] - Utensile 1 non sbloccato
|
||||
000132|PLC|FAULT|[COD 132] - Utensile 1 non bloccato
|
||||
000133|PLC|FAULT|[COD 133] - Cambio utensile 1 fuori fase
|
||||
000134|PLC|FAULT|[COD 134] - Cappa aspirazione non alta
|
||||
000135|PLC|FAULT|[COD 135] - Cappa aspirazione non bassa
|
||||
000136|PLC|FAULT|[COD 136] - Uten.mand.1 non allineato con RCM
|
||||
000137|PLC|FAULT|[COD 137] -
|
||||
000138|PLC|FAULT|[COD 138] -
|
||||
000139|PLC|FAULT|[COD 139] -
|
||||
000140|PLC|FAULT|[COD 140] -
|
||||
000141|PLC|FAULT|[COD 141] -
|
||||
000142|PLC|FAULT|[COD 142] -
|
||||
000143|PLC|FAULT|[COD 143] -
|
||||
000144|PLC|FAULT|[COD 144] -
|
||||
000145|PLC|FAULT|[COD 145] - Errore gestione asse ausiliario w
|
||||
000146|PLC|FAULT|[COD 146] - Messaggio dal processo 1
|
||||
000147|PLC|FAULT|[COD 147] - Pulsante sblocco uten.1 rifiutato
|
||||
000148|PLC|FAULT|[COD 148] - Rotazione G96 non ammessa Mandr.1
|
||||
000149|PLC|FAULT|[COD 149] - Attesa mandrino 1 a regime
|
||||
000150|PLC|FAULT|[COD 150] - Errore gestione mandrino 1
|
||||
000151|PLC|FAULT|[COD 151] - Modalità rotaz.G96/G97 variata P1
|
||||
000152|PLC|FAULT|[COD 152] - Errore funzione T programmata Pr1
|
||||
000153|PLC|FAULT|[COD 153] - Errore aggiornamento offset ut. 1
|
||||
000154|PLC|FAULT|[COD 154] - Errore gestione assi condivisi
|
||||
000155|PLC|FAULT|[COD 155] - Premere start per iniziare RCM
|
||||
000156|PLC|FAULT|[COD 156] - Premere start per riprendere lav.
|
||||
000157|PLC|FAULT|[COD 157] - Errore nel ciclo di ricerca mem.
|
||||
000158|PLC|FAULT|[COD 158] - Attesa sistema pronto SW/HW
|
||||
000159|PLC|FAULT|[COD 159] -
|
||||
000160|PLC|FAULT|[COD 160] -
|
||||
000161|PLC|FAULT|[COD 161] - Rotaz. mandr. 2 con pezzo sbloc.
|
||||
000162|PLC|FAULT|[COD 162] - Rotaz. mandr. 2 con utens. sbloc.
|
||||
000163|PLC|FAULT|[COD 163] - Err.parità sensori uten.2 blo/sbl
|
||||
000164|PLC|FAULT|[COD 164] - Memoria utens. in mandr. 2 errata
|
||||
000165|PLC|FAULT|[COD 165] -
|
||||
000166|PLC|FAULT|[COD 166] -
|
||||
000167|PLC|FAULT|[COD 167] - --- ATTESA CONFERMA CMS CONTROL
|
||||
000168|PLC|FAULT|[COD 168] - --- ADAPTER MTCONNECT NON DISPONIBILE
|
||||
000169|PLC|FAULT|[COD 169] - 720 LIQUIDO NEBULIZZATORE NON OK
|
||||
000170|PLC|FAULT|[COD 170] - 666 SPINDLE 2 SAFETY DEVICE FAILURE
|
||||
000171|PLC|FAULT|[COD 171] - 546 B-Z AXIS NOT IN ZERO POSITION
|
||||
000172|PLC|FAULT|[COD 172] - 229 THERMAL RELAY HYDRAULIC PUMP 2
|
||||
000173|PLC|FAULT|[COD 173] - 120 RANGE ACTIVATION NOT OK 2
|
||||
000174|PLC|FAULT|[COD 174] - 135 CONVERTER 2 IN WARNING
|
||||
000175|PLC|FAULT|[COD 175] - 135 CONVERTER 2 IN FAULT
|
||||
000176|PLC|FAULT|[COD 176] - 520 STALL MODE FUNCTION ACTIVE 2
|
||||
000177|PLC|FAULT|[COD 177] - 135 CONVERTER 2 BLOCKED
|
||||
000178|PLC|FAULT|[COD 178] - 168 CONVERTER 2 DISABLED
|
||||
000179|PLC|FAULT|[COD 179] - 163 CONVERTER 2 BRAKE OUT OF ORDER
|
||||
000180|PLC|FAULT|[COD 180] - 100 CONVERTER 2 OFF
|
||||
000181|PLC|FAULT|[COD 181] - 514 TOOL CRIB 4 PROTECTION NOT IN POSITION
|
||||
000182|PLC|FAULT|[COD 182] - 181 TOOL CHANGE 2 PROGRAM NOT CALLD
|
||||
000183|PLC|FAULT|[COD 183] - 489 COUPLING 2 FAILURE
|
||||
000184|PLC|FAULT|[COD 184] - 177 SERVO-DRIVE BRAKING MODULE OUT OF ORDER A
|
||||
000185|PLC|FAULT|[COD 185] - 177 SERVO-DRIVE BRAKING MODULE OUT OF ORDER B
|
||||
000186|PLC|FAULT|[COD 186] - 228 THERMAL RELAY TOOL COOLANT PUMP 2
|
||||
000187|PLC|FAULT|[COD 187] - 487 SPINDLE 2 JOINT INSUFFICIENT WATER
|
||||
000188|PLC|FAULT|[COD 188] - 488 INSUFFICIENT TOOL 2 COOLING
|
||||
000189|PLC|FAULT|[COD 189] - 493 A+ AXIS ONLY ENABLED TO MOVEMENT
|
||||
000190|PLC|FAULT|[COD 190] - 490 TOOLS POSITION CHECK 2
|
||||
000191|PLC|FAULT|[COD 191] - 432 TOOL 2 NOT UNCLAMPED
|
||||
000192|PLC|FAULT|[COD 192] - 450 TOOL 2 NOT LOCKED
|
||||
000193|PLC|FAULT|[COD 193] - 407 OVER EXTRA-STROKE A AXIS
|
||||
000194|PLC|FAULT|[COD 194] - 407 OVER EXTRA-STROKE B AXIS
|
||||
000195|PLC|FAULT|[COD 195] - 818 DOORS OPENED WITH SLAB ON MANIPULATOR
|
||||
000196|PLC|FAULT|[COD 196] - 514 PROTEZIONE MAGAZZINO 3 NON IN POSIZIONE
|
||||
000197|PLC|FAULT|[COD 197] - 545 UTENSILE ERRATO PER APERTURA MANIPOLATORE
|
||||
000198|PLC|FAULT|[COD 198] - 545 ROTATION WITHOUT WATER NOT ALLOWED
|
||||
000199|PLC|FAULT|[COD 199] - 561 LASER NOT IN POSITION
|
||||
000200|PLC|FAULT|[COD 200] - --- VENTOSA SINCR. 1 NON OK
|
||||
000201|PLC|FAULT|[COD 201] - --- VENTOSA SINCR. 2 NON OK
|
||||
000202|PLC|FAULT|[COD 202] - --- VENTOSA SINCR. 3 NON OK
|
||||
000203|PLC|FAULT|[COD 203] - --- VENTOSA SINCR. 4 NON OK
|
||||
000204|PLC|FAULT|[COD 204] - --- VENTOSA SINCR. 5 NON OK
|
||||
000205|PLC|FAULT|[COD 205] - --- VENTOSA SINCR. 6 NON OK
|
||||
000206|PLC|FAULT|[COD 206] - --- VENTOSA SINCR. 7 NON OK
|
||||
000207|PLC|FAULT|[COD 207] - --- VENTOSA SINCR. 8 NON OK
|
||||
000208|PLC|FAULT|[COD 208] - --- VENTOSA SINCR. 9 NON OK
|
||||
000209|PLC|FAULT|[COD 209] - --- VENTOSA SINCR. 10 NON OK
|
||||
000210|PLC|FAULT|[COD 210] - --- VENTOSA SINCR. 11 NON OK
|
||||
000211|PLC|FAULT|[COD 211] - --- VENTOSA SINCR. 12 NON OK
|
||||
000212|PLC|FAULT|[COD 212] - --- VENTOSA SINCR. 13 NON OK
|
||||
000213|PLC|FAULT|[COD 213] - --- VENTOSA SINCR. 14 NON OK
|
||||
000214|PLC|FAULT|[COD 214] - --- VENTOSA SINCR. 15 NON OK
|
||||
000215|PLC|FAULT|[COD 215] - --- VENTOSA SINCR. 16 NON OK
|
||||
000216|PLC|FAULT|[COD 216] - --- VENTOSA SINCR. 17 NON OK
|
||||
000217|PLC|FAULT|[COD 217] - --- VENTOSA SINCR. 18 NON OK
|
||||
000218|PLC|FAULT|[COD 218] - --- VENTOSA SINCR. 19 NON OK
|
||||
000219|PLC|FAULT|[COD 219] - --- VENTOSA SINCR. 20 NON OK
|
||||
000220|PLC|FAULT|[COD 220] - --- VENTOSA SINCR. 21 NON OK
|
||||
000221|PLC|FAULT|[COD 221] - --- VENTOSA SINCR. 22 NON OK
|
||||
000222|PLC|FAULT|[COD 222] - --- VENTOSA SINCR. 23 NON OK
|
||||
000223|PLC|FAULT|[COD 223] - --- VENTOSA SINCR. 24 NON OK
|
||||
000224|PLC|FAULT|[COD 224] - 534 VENTOSE IN MOVIMENTO
|
||||
000225|PLC|FAULT|[COD 225] - 503 PULIZIA CONI IN CORSO
|
||||
000226|PLC|FAULT|[COD 226] - 177 MODULO FRENATURA AZIONAMENTO ASSE U NON OK
|
||||
000227|PLC|FAULT|[COD 227] - 488 RECYCLED WATER NOT OK
|
||||
000228|PLC|FAULT|[COD 228] - 443 RAFFREDDAMENTO POMPA VUOTO 2 NON OK
|
||||
000229|PLC|FAULT|[COD 229] - 538 ROTARY TABLE NOT IN POSITION
|
||||
000230|PLC|FAULT|[COD 230] - 346 PARATIA NON IN POSIZIONE
|
||||
000231|PLC|FAULT|[COD 231] - 595 SAFETY BARRIERS
|
||||
000232|PLC|FAULT|[COD 232] - 666 SETTING FEED ERROR
|
||||
000233|PLC|FAULT|[COD 233] - 805 SAFETY DOOR LOCK ERROR
|
||||
000234|PLC|FAULT|[COD 234] - 666 AXES FEED OUT OF RANGE
|
||||
000235|PLC|FAULT|[COD 235] - 124 INCORRECT VECTRON DATASET CONFIGURATION FILE
|
||||
000236|PLC|FAULT|[COD 236] - 442 BLADE CRIB 1 NOT IN POSITION
|
||||
000237|PLC|FAULT|[COD 237] - 442 BLADE CRIB 2 NOT IN POSITION
|
||||
000238|PLC|FAULT|[COD 238] - 125 VECTRON PARAMETERS WRITING IN PROGRESS
|
||||
000239|PLC|FAULT|[COD 239] - 546 Z AXIS NOT IN POSITION
|
||||
000240|PLC|FAULT|[COD 240] - 285 THERMAL RELAY LOAD ROLLER HYDRAULIC PUMP MOTOR
|
||||
000241|PLC|FAULT|[COD 241] - --- AUTOMATIC ZEROING HEIDENAHIN NOT OK
|
||||
000242|PLC|FAULT|[COD 242] - --- HEIDENAHIN ACTIVATION NOT ALLOWED WITH TOOL
|
||||
000243|PLC|FAULT|[COD 243] - 561 HEIDENAHIN NOT IN POSITION
|
||||
000244|PLC|FAULT|[COD 244] - 442 BLADE CRIB NOT IN POSITION
|
||||
000245|PLC|FAULT|[COD 245] - 533 COLLET NOT IN POSITION
|
||||
000246|PLC|FAULT|[COD 246] - 199 SPINDLE 1 NOT IN POSITION
|
||||
000247|PLC|FAULT|[COD 247] - 124 INCORRECT TRANSPORTS CONFIGURATION FILE
|
||||
000248|PLC|FAULT|[COD 248] - 556 INTERRUPTED LOAD/UNLOAD CYCLE
|
||||
000249|PLC|FAULT|[COD 249] - 553 LOADING/UNLOADING CYCLE BLOCKED
|
||||
000250|PLC|FAULT|[COD 250] - 575 PIECE IN LOADING/UNLOADING PHASE
|
||||
000251|PLC|FAULT|[COD 251] - 548 ROLLER LOADER NOT IN POSITION
|
||||
000252|PLC|FAULT|[COD 252] - 576 PIECE-LOADER EMPTY
|
||||
000253|PLC|FAULT|[COD 253] - 135 CONVERTER UNLOAD BELT NOT READY
|
||||
000254|PLC|FAULT|[COD 254] - 135 CONVERTER MACHINE BELT NOT READY
|
||||
000255|PLC|FAULT|[COD 255] - 135 CONVERTER LOAD BELT NOT READY
|
||||
000256|PLC|FAULT|[COD 256] - 135 CONVERTER UNLOAD ROLLER NOT READY
|
||||
000257|PLC|FAULT|[COD 257] - 135 CONVERTER MACHINE ROLLER NOT READY
|
||||
000258|PLC|FAULT|[COD 258] - 135 CONVERTER LOAD ROLLER NOT READY
|
||||
000259|PLC|FAULT|[COD 259] - 549 SAFETY UNLOAD BELT
|
||||
000260|PLC|FAULT|[COD 260] - 549 SAFETY MACHINE BELT
|
||||
000261|PLC|FAULT|[COD 261] - 549 SAFETY LOAD BELT
|
||||
000262|PLC|FAULT|[COD 262] - 549 SAFETY UNLOAD ROLLER
|
||||
000263|PLC|FAULT|[COD 263] - 549 SAFETY MACHINE ROLLER
|
||||
000264|PLC|FAULT|[COD 264] - 549 SAFETY LOAD ROLLER
|
||||
000265|PLC|FAULT|[COD 265] - 599 MANUAL MOVEMENT UNLOAD BELT NOT ALLOWED
|
||||
000266|PLC|FAULT|[COD 266] - 599 MANUAL MOVEMENT MACHINE BELT NOT ALLOWED
|
||||
000267|PLC|FAULT|[COD 267] - 599 MANUAL MOVEMENT LOAD BELT NOT ALLOWED
|
||||
000268|PLC|FAULT|[COD 268] - 599 MANUAL MOVEMENT UNLOAD ROLLER NOT ALLOWED
|
||||
000269|PLC|FAULT|[COD 269] - 599 MANUAL MOVEMENT MACHINE ROLLER NOT ALLOWED
|
||||
000270|PLC|FAULT|[COD 270] - 599 MANUAL MOVEMENT LOAD ROLLER NOT ALLOWED
|
||||
000271|PLC|FAULT|[COD 271] - 125 UNLOAD BELT PARAMETERS ERROR
|
||||
000272|PLC|FAULT|[COD 272] - 125 MACHINE BELT PARAMETERS ERROR
|
||||
000273|PLC|FAULT|[COD 273] - 125 LOAD BELT PARAMETERS ERROR
|
||||
000274|PLC|FAULT|[COD 274] - 125 UNLOAD ROLLER PARAMETERS ERROR
|
||||
000275|PLC|FAULT|[COD 275] - 125 MACHINE ROLLER PARAMETERS ERROR
|
||||
000276|PLC|FAULT|[COD 276] - 125 LOAD ROLLER PARAMETERS ERROR
|
||||
000277|PLC|FAULT|[COD 277] - 285 THERMAL RELAY MACHINE ROLLER MOTOR
|
||||
000278|PLC|FAULT|[COD 278] - 285 THERMAL RELAY UNLOAD ROLLER MOTOR
|
||||
000279|PLC|FAULT|[COD 279] - 285 THERMAL RELAY LOAD BELT MOTOR
|
||||
000280|PLC|FAULT|[COD 280] - 285 THERMAL RELAY MACHINE BELT MOTOR
|
||||
000281|PLC|FAULT|[COD 281] - 285 THERMAL RELAY UNLOAD BELT MOTOR
|
||||
000282|PLC|FAULT|[COD 282] - 125 SAVING FGE POINTS
|
||||
000283|PLC|FAULT|[COD 283] - 287 PROTEZIONE TERMICA IMPIANTO CERIO
|
||||
000284|PLC|FAULT|[COD 284] - 659 ACCENSIONE PROLUNGATA POMPA CERIO
|
||||
000285|PLC|FAULT|[COD 285] - 705 AMP SETTINGS FOR N.T.S. ERROR
|
||||
000286|PLC|FAULT|[COD 286] - 779 NTS IN LOW POSITION
|
||||
000287|PLC|FAULT|[COD 287] - 779 NTS NOT IN POSITION
|
||||
000288|PLC|FAULT|[COD 288] - 599 Q MOVEMENT NOT ALLOWED
|
||||
000289|PLC|FAULT|[COD 289] - 493 Q+ AXIS ONLY ENABLED TO MOVEMENT
|
||||
000290|PLC|FAULT|[COD 290] - 493 Q- AXIS ONLY ENABLED TO MOVEMENT
|
||||
000291|PLC|FAULT|[COD 291] - 250 SHAPES DETECTOR ON SPINDLE
|
||||
000292|PLC|FAULT|[COD 292] - 250 PULIZIA PIANO IN CORSO
|
||||
000293|PLC|FAULT|[COD 293] - 124 ERRORE FILE CONFIGURAZINE SICU-CU
|
||||
000294|PLC|FAULT|[COD 294] - 442 TOOL CRIB 2 NOT IN POSITION
|
||||
000295|PLC|FAULT|[COD 295] - 514 TOOL CRIB 2 PROTECTION NOT IN POSITION
|
||||
000296|PLC|FAULT|[COD 296] - 545 AXES NOT IN PROBING POSITION
|
||||
000297|PLC|FAULT|[COD 297] - 251 PROBE CYCLE INTERRUPTED
|
||||
000298|PLC|FAULT|[COD 298] - 251 PRESETTING LASER CYCLE INTERRUPTED
|
||||
000299|PLC|FAULT|[COD 299] - 495 SINGLE AXIS ZEROING NOT ENABLE
|
||||
000300|PLC|FAULT|[COD 300] - 285 RELAIS THERMIQUE ROULEAUX MACHINE
|
||||
000301|PLC|FAULT|[COD 301] - 438 SPINDLE OFF WITH PROBE ACTIVATED
|
||||
000302|PLC|FAULT|[COD 302] - 538 TABLE NOT POSITIONED
|
||||
000303|PLC|FAULT|[COD 303] - 294 SUCTION CUPS NOT IN POSITION
|
||||
000304|PLC|FAULT|[COD 304] - 547 COLLISION MANIPULATOR AND PROBE
|
||||
000305|PLC|FAULT|[COD 305] - 197 REMOVE PARTS FROM MANIPULATOR
|
||||
000306|PLC|FAULT|[COD 306] - 545 AXES NOT IN POSITION TO OPEN MANIPULATOR
|
||||
000307|PLC|FAULT|[COD 307] - 538 AXIS MOVEMENT NOT ALLOWED WITH MANIPULATOR OPEN
|
||||
000308|PLC|FAULT|[COD 308] - 305 MANIPLATOR VACUUM CLAMPS NOT OK
|
||||
000309|PLC|FAULT|[COD 309] - 197 PART NOT LOCKED BY MANIPULATOR
|
||||
000310|PLC|FAULT|[COD 310] - 785 CONSENSO APERTURA PORTE NEGATO
|
||||
000311|PLC|FAULT|[COD 311] - 482 PIECE CLEANING WATER NOT OK
|
||||
000312|PLC|FAULT|[COD 312] - 488 INSUFFICIENT TOOL DRILL COOLING
|
||||
000313|PLC|FAULT|[COD 313] - 482 MANIPULATOR WATER NOT OK
|
||||
000314|PLC|FAULT|[COD 314] - 146 FIELDBUS KO (375)
|
||||
000315|PLC|FAULT|[COD 315] - 250 CICLO RAVVIVA FORETTI IN CORSO
|
||||
000316|PLC|FAULT|[COD 316] - 250 CICLO RAVVIVA MOLE IN CORSO
|
||||
000317|PLC|FAULT|[COD 317] - 407 OVER EXTRA-STROKE X AXIS
|
||||
000318|PLC|FAULT|[COD 318] - 407 OVER EXTRA-STROKE Y AXIS
|
||||
000319|PLC|FAULT|[COD 319] - 407 OVER EXTRA-STROKE Z AXIS
|
||||
000320|PLC|FAULT|[COD 320] - 407 OVER EXTRA-STROKE V AXIS
|
||||
000321|PLC|FAULT|[COD 321] - 148 AXES PRE-ALERTED
|
||||
000322|PLC|FAULT|[COD 322] - 147 AXES ALERTED
|
||||
000323|PLC|FAULT|[COD 323] - 149 Z AXIS PRE-ALERTED
|
||||
000324|PLC|FAULT|[COD 324] - 149 W AXIS PRE-ALERTED
|
||||
000325|PLC|FAULT|[COD 325] - 747 LAYING THE TOOL DOWN TO THE FLOOR (START)
|
||||
000326|PLC|FAULT|[COD 326] - 748 TAKE UP TOOL FROM THE FLOOR (START)
|
||||
000327|PLC|FAULT|[COD 327] - 151 DRIVING GEARS NOT POWERED
|
||||
000328|PLC|FAULT|[COD 328] - 150 SERVO DRIVES NOT ENABLED
|
||||
000329|PLC|FAULT|[COD 329] - 656 CLUTCH LOCKED
|
||||
000330|PLC|FAULT|[COD 330] - 655 CLUTCH NOT LOCKED
|
||||
000331|PLC|FAULT|[COD 331] - 404 Z-AXIS BALANCING INSUFFICIENT
|
||||
000332|PLC|FAULT|[COD 332] - 464 TOOL LIFE EXHAUSTED
|
||||
000333|PLC|FAULT|[COD 333] - 484 MACHINE STOPPED
|
||||
000334|PLC|FAULT|[COD 334] - 177 SERVO-DRIVE BRAKING MODULE OUT OF ORDER X
|
||||
000335|PLC|FAULT|[COD 335] - 177 SERVO-DRIVE BRAKING MODULE OUT OF ORDER Y
|
||||
000336|PLC|FAULT|[COD 336] - 177 SERVO-DRIVE BRAKING MODULE OUT OF ORDER Z
|
||||
000337|PLC|FAULT|[COD 337] - 305 VACUUM CLAMPING INEFFICIENT
|
||||
000338|PLC|FAULT|[COD 338] - 177 SERVO-DRIVE BRAKING MODULE OUT OF ORDER V
|
||||
000339|PLC|FAULT|[COD 339] - 593 SAFETY GUARDS
|
||||
000340|PLC|FAULT|[COD 340] - 594 CHECK DOORS SECURITY
|
||||
000341|PLC|FAULT|[COD 341] - 584 OPENING DOORS REQUEST
|
||||
000342|PLC|FAULT|[COD 342] - 487 SPINDLE JOINT INSUFFICIENT WATER
|
||||
000343|PLC|FAULT|[COD 343] - 488 INSUFFICIENT TOOL COOLING
|
||||
000344|PLC|FAULT|[COD 344] - 594 FRONT DOORS NOT LOCKED
|
||||
000345|PLC|FAULT|[COD 345] - 594 BACK DOORS NOT LOCKED
|
||||
000346|PLC|FAULT|[COD 346] - 584 LATERAL DOOR NOT LOCKED
|
||||
000347|PLC|FAULT|[COD 347] - 124 INCORRECT PLC CONFIGURATION FILE
|
||||
000348|PLC|FAULT|[COD 348] - 124 INCORRECT I/O FILE
|
||||
000349|PLC|FAULT|[COD 349] - AXES AMP PARAMETER OVERWRITE
|
||||
000350|PLC|FAULT|[COD 350] - ERROR DURING BOOT
|
||||
000351|PLC|FAULT|[COD 351] - 124 INCORRECT CONFIG.COLLISIONI FILE
|
||||
000352|PLC|FAULT|[COD 352] - 124 INCORRECT CONFIG.COMPENSAZIONE FILE
|
||||
000353|PLC|FAULT|[COD 353] - 124 INCORRECT CONFIG.MACCHINA FILE
|
||||
000354|PLC|FAULT|[COD 354] - 489 COUPLING FAILURE
|
||||
000355|PLC|FAULT|[COD 355] - 146 BUS ETHERCAT NOT OK
|
||||
000356|PLC|FAULT|[COD 356] - 145 AXIS BOARDS NOT READY
|
||||
000357|PLC|FAULT|[COD 357] - 583 MACHINE OFF
|
||||
000358|PLC|FAULT|[COD 358] - 443 VACUUM PUMP COOLING SYSTEM MALFUNCTION
|
||||
000359|PLC|FAULT|[COD 359] - 406 EMERGENCY PUSH-BUTTON
|
||||
000360|PLC|FAULT|[COD 360] - 583 E-STOP CONTACT OPEN <PUSH RESET>
|
||||
000361|PLC|FAULT|[COD 361] - 667 SAFETY CIRCUIT FAILURE
|
||||
000362|PLC|FAULT|[COD 362] - 666 SAFETY DEVICE FAILURE
|
||||
000363|PLC|FAULT|[COD 363] - 127 OVERRIDE AT ZERO
|
||||
000364|PLC|FAULT|[COD 364] - 305 VACUUM CLAMPING 2 INEFFICIENT
|
||||
000365|PLC|FAULT|[COD 365] - 127 RAPID OVERRIDE AT ZERO
|
||||
000366|PLC|FAULT|[COD 366] - 406 POWER OFF BUTTON PUSHED
|
||||
000367|PLC|FAULT|[COD 367] - 577 TABLE IN MOTION
|
||||
000368|PLC|FAULT|[COD 368] - 590 FRONT DOORS NOT CLOSED
|
||||
000369|PLC|FAULT|[COD 369] - 590 BACK DOORS NOT CLOSED
|
||||
000370|PLC|FAULT|[COD 370] - 230 THERMAL RELAY VACUUM PUMP 1
|
||||
000371|PLC|FAULT|[COD 371] - 230 THERMAL RELAY VACUUM PUMP 2
|
||||
000372|PLC|FAULT|[COD 372] - 229 THERMAL RELAY HYDRAULIC PUMP
|
||||
000373|PLC|FAULT|[COD 373] - 641 TABLE CHANGE INTERRUPTED
|
||||
000374|PLC|FAULT|[COD 374] - 534 TABLE LOCKING PIN NOT UP
|
||||
000375|PLC|FAULT|[COD 375] - 534 TABLE LOCKING PIN NOT DOWN
|
||||
000376|PLC|FAULT|[COD 376] - 403 OVERHEATING ELECTRICAL BOX
|
||||
000377|PLC|FAULT|[COD 377] - 260 AUTOMATIC ADJUSTMENT OF FEED OVERRIDE IN PROGRESS
|
||||
000378|PLC|FAULT|[COD 378] - 305 VACUUM CLAMPING 1 INEFFICIENT
|
||||
000379|PLC|FAULT|[COD 379] - 611 TOOL CHANGE MOTOR NON IN POSITION
|
||||
000380|PLC|FAULT|[COD 380] - 459 B AXIS LOCKED
|
||||
000381|PLC|FAULT|[COD 381] - 458 B AXIS UNLOCKED
|
||||
000382|PLC|FAULT|[COD 382] - 459 C AXIS LOCKED
|
||||
000383|PLC|FAULT|[COD 383] - 458 C AXIS UNLOCKED
|
||||
000384|PLC|FAULT|[COD 384] - 305 VACUUM CLAMPING INC. PLANE 1 INEFFICIENT
|
||||
000385|PLC|FAULT|[COD 385] - 305 VACUUM CLAMPING INC. PLANE 2 INEFFICIENT
|
||||
000386|PLC|FAULT|[COD 386] - 229 THERMAL RELAY RECYCLE WATER PUMP
|
||||
000387|PLC|FAULT|[COD 387] - 228 THERMAL RELAY TOOL COOLANT PUMP
|
||||
000388|PLC|FAULT|[COD 388] - 590 CABIN DOOR NOT CLOSED
|
||||
000389|PLC|FAULT|[COD 389] - 179 TOOL CHANGE MOTOR NOT POWERED/ENABLED
|
||||
000390|PLC|FAULT|[COD 390] - 300 RIGHT PRESSURE CLAMPING INEFFICIENT
|
||||
000391|PLC|FAULT|[COD 391] - 300 LEFT PRESSURE CLAMPING INEFFICIENT
|
||||
000392|PLC|FAULT|[COD 392] - 360 REFERENCE CYLINDERS 1 NOT IN POSITION
|
||||
000393|PLC|FAULT|[COD 393] - 360 REFERENCE CYLINDERS 2 NOT IN POSITION
|
||||
000394|PLC|FAULT|[COD 394] - 124 INCORRECT CONFIG.MOTORI CANBUS
|
||||
000395|PLC|FAULT|[COD 395] - 135 TOOL CHANGE CONVERTER BLOCKED
|
||||
000396|PLC|FAULT|[COD 396] - 135 TOOL CHANGE CONVERTER ON WARNIG
|
||||
000397|PLC|FAULT|[COD 397] - 530 EXTERNAL MACHINE PANEL ENABLED
|
||||
000398|PLC|FAULT|[COD 398] - 412 AXIS AUTOMATIC ZEROING UNDER WAY
|
||||
000399|PLC|FAULT|[COD 399] - 442 TOOL CRIB 1 NOT IN POSITION
|
||||
000400|PLC|FAULT|[COD 400] - 514 TOOL CRIB 1 PROTECTION NOT IN POSITION
|
||||
000401|PLC|FAULT|[COD 401] - 495 AXIS ZEROING WITH TOOL IN ELECTROSPINDLE
|
||||
000402|PLC|FAULT|[COD 402] - 606 PART-PROGRAM NOT FOUND (PC)
|
||||
000403|PLC|FAULT|[COD 403] - 163 CONVERTER BRAKE OUT OF ORDER
|
||||
000404|PLC|FAULT|[COD 404] - 603 PRESS START CYCLE
|
||||
000405|PLC|FAULT|[COD 405] - 001 TOOLTABLES CHECKED? PRESS SOFTKEY «YES»
|
||||
000406|PLC|FAULT|[COD 406] - 002 ARE YOU SURE? PRESS SOFTKEY «YES»
|
||||
000407|PLC|FAULT|[COD 407] - 606 PART-PROGRAM NOT FOUND
|
||||
000408|PLC|FAULT|[COD 408] - 135 CONVERTER BLOCKED
|
||||
000409|PLC|FAULT|[COD 409] - 106 STOP FROM EXTERNAL PUSH-BUTTON PANEL
|
||||
000410|PLC|FAULT|[COD 410] - 105 MACHINE IN HOLD STATUS
|
||||
000411|PLC|FAULT|[COD 411] - 168 CONVERTER DISABLED
|
||||
000412|PLC|FAULT|[COD 412] - 700 TABLES UNDER MODIFICATION
|
||||
000413|PLC|FAULT|[COD 413] - 161 VECTRON COMMUNICATION ERROR
|
||||
000414|PLC|FAULT|[COD 414] - 162 VECTRON FATAL ERROR: STOP THE MACHINE
|
||||
000415|PLC|FAULT|[COD 415] - 176 FAULTY SPINDLE POWER SUPPLY
|
||||
000416|PLC|FAULT|[COD 416] - 125 WEAR CONSTANT OUT OF RANGE
|
||||
000417|PLC|FAULT|[COD 417] - 125 WRONG PARAMETER READING
|
||||
000418|PLC|FAULT|[COD 418] - 125 PRESSURE RANGE NOT CORRECT
|
||||
000419|PLC|FAULT|[COD 419] - 106 STOP FROM EXTERNAL PUSH-BUTTON CONTROL PANEL
|
||||
000420|PLC|FAULT|[COD 420] - 125 COMPENSATION VERSOR ERROR
|
||||
000421|PLC|FAULT|[COD 421] - 245 THERMAL CUT-OUT TOOL CRIB PROTECTION
|
||||
000422|PLC|FAULT|[COD 422] - 741 TOOL CHANGE CODE PROCESS NOT SELECTED
|
||||
000423|PLC|FAULT|[COD 423] - 390 T FUNCTION NOT PERMITTED
|
||||
000424|PLC|FAULT|[COD 424] - 804 MOVE FEED/RAPID OVERRIDE
|
||||
000425|PLC|FAULT|[COD 425] - 661 UNLOAD THE TOOL AND LOAD IT IN HIS POSITION ON THE TOOL CRIB
|
||||
000426|PLC|FAULT|[COD 426] - 657 PLATFORM BALANCE HEAD NOT IN POSITION
|
||||
000427|PLC|FAULT|[COD 427] - 741 HEADS 1 NOT SELECTED
|
||||
000428|PLC|FAULT|[COD 428] - 488 RAFFREDDAMENTO DISCO INFERIORE
|
||||
000429|PLC|FAULT|[COD 429] - 294 DISCO TAGLIO INFERIORE NON IN POSIZIONE
|
||||
000430|PLC|FAULT|[COD 430] - 181 TOOL CHANGE PROGRAM NOT CALLED
|
||||
000431|PLC|FAULT|[COD 431] - 546 Z AXIS NOT IN ZERO POSITION
|
||||
000432|PLC|FAULT|[COD 432] - 545 B AXIS NOT IN POSITION
|
||||
000433|PLC|FAULT|[COD 433] - 689 TOOLMANAGER WARNING
|
||||
000434|PLC|FAULT|[COD 434] - 689 TOOLMANAGER WARNING
|
||||
000435|PLC|FAULT|[COD 435] - 250 PRESETTING LASER ENABLED
|
||||
000436|PLC|FAULT|[COD 436] - 817 HEADS SELECTION ERROR
|
||||
000437|PLC|FAULT|[COD 437] - 517 INCORRECT VALUE FROM TABLE
|
||||
000438|PLC|FAULT|[COD 438] - 390 M07 FUNCTION NOT PERMITTED
|
||||
000439|PLC|FAULT|[COD 439] - 411 AXES WITHOUT ZERO POINTS (M97-HOME)
|
||||
000440|PLC|FAULT|[COD 440] - 390 T FUNCTION NOT PERMITTED
|
||||
000441|PLC|FAULT|[COD 441] - 399 GREASE TANK EMPTY
|
||||
000442|PLC|FAULT|[COD 442] - 400 LUBRICATION INEFFICIENT
|
||||
000443|PLC|FAULT|[COD 443] - 152 DRIVING GEARS NOT READY
|
||||
000444|PLC|FAULT|[COD 444] - 530 SETTING MODE ENABLED
|
||||
000445|PLC|FAULT|[COD 445] - 398 INSUFFICIENT AIR PRESSURE
|
||||
000446|PLC|FAULT|[COD 446] - 528 “PROGRAM TEST” MODE ACTIVE
|
||||
000447|PLC|FAULT|[COD 447] - 125 FLOATING WRONG PARAMETER
|
||||
000448|PLC|FAULT|[COD 448] - 561 PROBE NOT IN POSITION
|
||||
000449|PLC|FAULT|[COD 449] - 100 CONVERTER OFF
|
||||
000450|PLC|FAULT|[COD 450] - 520 STALL MODE FUNCTION ACTIVE
|
||||
000451|PLC|FAULT|[COD 451] - 120 RANGE ACTIVATION NOT OK
|
||||
000452|PLC|FAULT|[COD 452] - 135 CONVERTER IN FAULT
|
||||
000453|PLC|FAULT|[COD 453] - 135 CONVERTER IN WARNING
|
||||
000454|PLC|FAULT|[COD 454] - 235 SPINDLE THERMAL PROTECTION
|
||||
000455|PLC|FAULT|[COD 455] - 522 SPINDLE R.P.M. TOO HIGH
|
||||
000456|PLC|FAULT|[COD 456] - 115 SPINDLE SPEED CONTROL
|
||||
000457|PLC|FAULT|[COD 457] - 498 MAXIMAL CHARGE ON THE SPINDLE
|
||||
000458|PLC|FAULT|[COD 458] - 441 SPINDLE COOLING SYSTEM MALFUNCTION
|
||||
000459|PLC|FAULT|[COD 459] - 672 COOLANT CIRCUIT OUT OF ORDER
|
||||
000460|PLC|FAULT|[COD 460] - 490 TOOLS POSITION CHECK
|
||||
000461|PLC|FAULT|[COD 461] - 666 SPINDLE SAFETY DEVICE FAILURE
|
||||
000462|PLC|FAULT|[COD 462] - --- TURNING OFF ---
|
||||
000463|PLC|FAULT|[COD 463] - 450 TOOL NOT LOCKED
|
||||
000464|PLC|FAULT|[COD 464] - 432 TOOL NOT UNCLAMPED
|
||||
000465|PLC|FAULT|[COD 465] - 503 TOOL-CHANGE IN EXECUTION
|
||||
000466|PLC|FAULT|[COD 466] - 504 TOOL-CHANGE INTERRUPTED
|
||||
000467|PLC|FAULT|[COD 467] - 493 Z+ AXIS ONLY ENABLED TO MOVEMENT
|
||||
000468|PLC|FAULT|[COD 468] - 493 Z- AXIS ONLY ENABLED TO MOVEMENT
|
||||
000469|PLC|FAULT|[COD 469] - 493 Y+ AXIS ONLY ENABLED TO MOVEMENT
|
||||
000470|PLC|FAULT|[COD 470] - 493 Y- AXIS ONLY ENABLED TO MOVEMENT
|
||||
000471|PLC|FAULT|[COD 471] - 493 X+ AXIS ONLY ENABLED TO MOVEMENT
|
||||
000472|PLC|FAULT|[COD 472] - 493 X- AXIS ONLY ENABLED TO MOVEMENT
|
||||
000473|PLC|FAULT|[COD 473] - 493 C+ AXIS ONLY ENABLED TO MOVEMENT
|
||||
000474|PLC|FAULT|[COD 474] - 493 C- AXIS ONLY ENABLED TO MOVEMENT
|
||||
000475|PLC|FAULT|[COD 475] - 493 B+ AXIS ONLY ENABLED TO MOVEMENT
|
||||
000476|PLC|FAULT|[COD 476] - 493 B- AXIS ONLY ENABLED TO MOVEMENT
|
||||
000477|PLC|FAULT|[COD 477] - 484 MACHINE STOPPED BY LUBRICATION INEFFICIENT
|
||||
000478|PLC|FAULT|[COD 478] - 654 VERIFY AXES COLLISION
|
||||
000479|PLC|FAULT|[COD 479] - --- SAFETY COLLISION FUNCTION OFF ---
|
||||
000480|PLC|FAULT|[COD 480] - 573 POSITIVE OVERSTROKE FLOATING AXIS
|
||||
000481|PLC|FAULT|[COD 481] - 573 NEGATIVE OVERSTROKE FLOATING AXIS
|
||||
000482|PLC|FAULT|[COD 482] - 538 TABLE MOVEMENT NOT ALLOWED
|
||||
000483|PLC|FAULT|[COD 483] - 538 TABLE RELEASE NOT ALLOWED
|
||||
000484|PLC|FAULT|[COD 484] - 235 SONDA TERMICA MANDRINO 2
|
||||
000485|PLC|FAULT|[COD 485] - 522 GIRI TROPPO ELEVATI MANDRINO 2
|
||||
000486|PLC|FAULT|[COD 486] - 115 CONTROLLO VELOCITÀ MANDRINO 2
|
||||
000487|PLC|FAULT|[COD 487] - 498 CARICO MASSIMO SUL MANDRINO 2
|
||||
000488|PLC|FAULT|[COD 488] - 176 MANDRINO 2 NON INIZIALIZZATO
|
||||
000489|PLC|FAULT|[COD 489] - 741 UNITÀ OPERATRICE 2: MANDRINO NON SELEZIONATO O IN CAMBIO UTENSIL
|
||||
000490|PLC|FAULT|[COD 490] - 538 AXES MOVEMENT NOT ENABLED-PROBE IN POSITION
|
||||
000491|PLC|FAULT|[COD 491] - 595 SAFETY LOAD BARRIERS
|
||||
000492|PLC|FAULT|[COD 492] - 595 SAFETY UNLOAD BARRIERS
|
||||
000493|PLC|FAULT|[COD 493] - 550 CHECK POPUP MODULE
|
||||
000494|PLC|FAULT|[COD 494] - 550 ASCENT POPUP MODULE NOT ALLOWE
|
||||
000495|PLC|FAULT|[COD 495] - 550 POPUP MODULE UP
|
||||
000496|PLC|FAULT|[COD 496] - 552 CHECK INPUT BULKHEAD
|
||||
000497|PLC|FAULT|[COD 497] - 552 CHECK OUTPUT BULKHEAD
|
||||
000498|PLC|FAULT|[COD 498] - 551 WAITING INPUT BULKHEAD OPEN
|
||||
000499|PLC|FAULT|[COD 499] - 551 WAITING INPUT BULKHEAD CLOSE
|
||||
000500|PLC|FAULT|[COD 500] - 551 WAITING OUTPUT BULKHEAD OPEN
|
||||
000501|PLC|FAULT|[COD 501] - 551 WAITING OUTPUT BULKHEAD CLOSE
|
||||
000502|PLC|FAULT|[COD 502] - 550 WAITING POPUP IN POSITION
|
||||
@@ -0,0 +1,7 @@
|
||||
# Commenti con cancelletto, struttura un variabile per riga, tipo chiave|valore (occhio che il separatore è configurato da .cofig come "testCharSep"); spazi e tabulazioni dovrei trimmarli in acquisizione (qui inseriti per comodità di lettura)
|
||||
001|Axis_01_Load |NUM
|
||||
002|Axis_02_Load |NUM
|
||||
003|Axis_03_Load |NUM
|
||||
004|Axis_04_Load |NUM
|
||||
005|Axis_05_Load |NUM
|
||||
006|Axis_06_Load |NUM
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
+2
-2
@@ -21,8 +21,8 @@
|
||||
020|VacAct_02_Count |COUNT
|
||||
021|Lubro_01_Num |COUNT
|
||||
022|SlittaTastatore_Count |COUNT
|
||||
023|SlittaMagazzino_01_Count |COUNT
|
||||
024|ProtMagazzino_01_Count |COUNT
|
||||
023|ProtMagazzino_01_Count |COUNT
|
||||
024|ProtMagazzino_02_Count |COUNT
|
||||
025|UnOp_01_NumCambiUT |COUNT
|
||||
026|Axis_01_AccTime |COUNT
|
||||
027|Axis_02_AccTime |COUNT
|
||||
@@ -0,0 +1,35 @@
|
||||
<body>
|
||||
<i>Adapters MTC e OPC-UA-REDIS CMS</i>
|
||||
<h4>Versione: {{CURRENT-REL}}</h4>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
<b>Ultime modifiche:</b>
|
||||
<ul>{{LAST-CHANGES}}</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>v.2.0.* → v.2.1.*</b>
|
||||
<ul>
|
||||
<li>Implementaizone logicheOPC-UA-REDIS</li>
|
||||
<li>Gestione deploy CI/CD</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>v.1.8.* → v.2.0.*</b>
|
||||
<ul>
|
||||
<li>Modifica Globale processi interni per disaccoppiamento logiche MTC</li>
|
||||
<li>Modifica deploy CI/CD</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div>
|
||||
<div style="float: left;">
|
||||
<img src="logoSteamware.png" />
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<a href="https://www.steamware.net/IOT" target="_blank">© Steamware 2006-2018</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user