Compare commits
104 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b7fd90d300 | |||
| bc7a45f514 | |||
| 6059670422 | |||
| 3d616d83b0 | |||
| 81bf6a308b | |||
| b0ffae1969 | |||
| 4926394bfb | |||
| 381adc93a5 | |||
| ea29ef5f92 | |||
| 967846f83d | |||
| 3ed92738d2 | |||
| a4ce9b63a5 | |||
| 939d37eb63 | |||
| 47579dc6af | |||
| ba2359469d | |||
| 45c25b7835 | |||
| fbc5e09f04 | |||
| df9e5fc477 | |||
| 9ad36718bb | |||
| 147c64f88a | |||
| 6154e5fa14 | |||
| 8fc103563d | |||
| f861534e01 | |||
| fe4d3a1635 | |||
| 854b28f588 | |||
| ba6894e15d | |||
| 617802ddf6 | |||
| ee6fc599d8 | |||
| 9bdcb6ef14 | |||
| 648ef062c5 | |||
| a5519a7e23 | |||
| 6bd0d8ef96 | |||
| de3c615801 | |||
| 0ccab81063 | |||
| 695f363b88 | |||
| 30ad2fc050 | |||
| 7e464a8638 | |||
| 28444f60c0 | |||
| ead221b0ac | |||
| c864cec1d4 | |||
| 48d973fc01 | |||
| ae87d3cd07 | |||
| dd7ca930ae | |||
| 83e2ab062d | |||
| 69629c257d | |||
| b0aa56d06d | |||
| 302c74c64e | |||
| 7578bc4b5b | |||
| 9f05b65ca6 | |||
| b6dc59ea93 | |||
| 45ea2a309e | |||
| fbe3f56bc3 | |||
| 73124002a6 | |||
| 8d31628cc2 | |||
| ee11717644 | |||
| 4aec0ca0d9 | |||
| f7fdfd7f55 | |||
| 7d6cdeb612 | |||
| b85ed71319 | |||
| a6a078faac | |||
| b8462438c1 | |||
| 7a0099336c | |||
| 490c4ed21b | |||
| c44465430d | |||
| 9c427d23a3 | |||
| 6f1e429c4e | |||
| d6d5c10517 | |||
| 89ee203461 | |||
| 50d63545ba | |||
| 3a0ad9db97 | |||
| 2a6410ffdc | |||
| 236443b777 | |||
| d2d20d16a2 | |||
| 272f0823af | |||
| bd1994e6ec | |||
| 5ad7b7990c | |||
| e16fc55c57 | |||
| e77887153d | |||
| 7af6a9726a | |||
| 64e8bd0331 | |||
| fb16f616e5 | |||
| dd869ef966 | |||
| 8fdf8b74c4 | |||
| 256895ad04 | |||
| 6855503714 | |||
| c8773d1418 | |||
| 140599cd1c | |||
| e772745253 | |||
| d487ca5f60 | |||
| 53d0b16205 | |||
| 46dbf00660 | |||
| 7e2649efeb | |||
| 0ab280076f | |||
| 456481e65a | |||
| f28cc72be0 | |||
| 307303f99c | |||
| 9980358636 | |||
| 58c1ef1788 | |||
| fb2f6ac315 | |||
| 8315a632bf | |||
| 9b4119451f | |||
| 65c849315f | |||
| 28198b434f | |||
| 7173eb749f |
@@ -0,0 +1,359 @@
|
||||
#SCRIPT AUTO-BUILD
|
||||
# - Author: Nicola Carminati
|
||||
# - Version: 1.0
|
||||
# - Date: 07/12/2020
|
||||
#
|
||||
#
|
||||
#---------------------------------------------------------------------------------------------------------------------------
|
||||
# recupera timestamp x logging
|
||||
function Get-TimeStamp
|
||||
{
|
||||
return "[{0:MM/dd/yy} {0:HH:mm:ss}]" -f (Get-Date)
|
||||
}
|
||||
|
||||
function getFileLog()
|
||||
{
|
||||
return "{0:yyy_MM_dd}_{0:HH_mm}" -f (Get-Date) + "_$pid.log"
|
||||
}
|
||||
|
||||
function ExecuteLog($txt2log)
|
||||
{
|
||||
Write-Output "-------------------------------------------------------------------------------------------------------------------------------------------------" | Out-File -FilePath "$filelog" -Append
|
||||
Write-Output "$(Get-TimeStamp) $txt2log" | Out-File -FilePath "$filelog" -Append
|
||||
Invoke-Expression "$txt2log 2>&1 | Out-File -FilePath $filelog -Append"
|
||||
if( $LASTEXITCODE -ne 0)
|
||||
{
|
||||
Write-Host "Error during cmmand: $txt2log" -ForegroundColor Red ;
|
||||
Write-Host "Exit...." -ForegroundColor Red ;
|
||||
Set-Location $PSScriptRoot
|
||||
exit
|
||||
}
|
||||
}
|
||||
|
||||
function askConfirmorDie($message)
|
||||
{
|
||||
if ($silent -eq 0) {
|
||||
while ($confirmation -ne 'y') {
|
||||
$confirmation = Read-Host $message
|
||||
if ($confirmation -eq 'n') {
|
||||
Write-Host "As you like...." -ForegroundColor Red ;
|
||||
Write-Host "Bye...." -ForegroundColor Red ;
|
||||
Set-Location $PSScriptRoot
|
||||
exit
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function ExitOk()
|
||||
{
|
||||
Write-Host "Done!" -ForegroundColor Green
|
||||
exit
|
||||
}
|
||||
function ExitERR($msg)
|
||||
{
|
||||
Write-Host "Error: $msg" -ForegroundColor Red
|
||||
Write-Host "Bye...." -ForegroundColor Red ;
|
||||
exit
|
||||
}
|
||||
|
||||
function getAssemblyInfo($file)
|
||||
{
|
||||
$regex = "\[assembly\: AssemblyVersion\(""([\.\d+]*)""\)\]"
|
||||
$row = ((Get-Content $file ) | Select-String $regex) | Out-String
|
||||
$found1 = $row.IndexOf("""")
|
||||
$found2 = $row.LastIndexOf("""")
|
||||
RETURN $row.substring($found1+1, $found2 - $found1 -1)
|
||||
}
|
||||
|
||||
function ChangeAssemblyVersion($file,$version)
|
||||
{
|
||||
$regex = "\[assembly\: AssemblyVersion\(""([\.\d+]*)""\)\]"
|
||||
(Get-Content $file) -replace $regex, "[assembly: AssemblyVersion(""$version"")]" | Set-Content $file
|
||||
}
|
||||
|
||||
function CheckNugetScm()
|
||||
{
|
||||
$url = 'https://repository.scmgroup.com/repository/mconnect-nuget/'
|
||||
$ngt = nuget sources -Format Detailed | Out-String
|
||||
$ind = $ngt.LastIndexOf($url)
|
||||
if($ind -lt 0)
|
||||
{
|
||||
ExitERR("Nuget package Scm not found: $url. Add this Repository `r`n -USR: guest`r`n -PSW: mB6SQvj6`r`n")
|
||||
}
|
||||
}
|
||||
function CheckSingleCommand($cmd)
|
||||
{
|
||||
if ($null -eq (Get-Command $cmd -ErrorAction SilentlyContinue))
|
||||
{
|
||||
ExitERR("Command ""$cmd"" not found in your PATH")
|
||||
}
|
||||
}
|
||||
function CheckAllCommand()
|
||||
{
|
||||
CheckSingleCommand "git"
|
||||
CheckSingleCommand "nuget"
|
||||
CheckSingleCommand "devenv"
|
||||
CheckSingleCommand "npm"
|
||||
CheckSingleCommand "7z"
|
||||
CheckSingleCommand "iscc"
|
||||
|
||||
}
|
||||
#---------------------------------------------------------------------------------------------------------------------------
|
||||
# Main Function
|
||||
|
||||
#Setup Variables
|
||||
$outputdir = $PSScriptRoot + "\Thermo.Active\bin"
|
||||
$outputServer = $outputdir + "\Thermo.Active.exe"
|
||||
$outputClient = $outputdir + "\Client\Active_Client.exe"
|
||||
$assemblyInfoFile = $PSScriptRoot + "\Thermo.Active\Properties\AssemblyInfo.cs"
|
||||
$installerFilePath = $PSScriptRoot + "\Thermo.Active\SetupActive_Auto.iss"
|
||||
$outBuildPath = "C:\CMS\AutoBuild\"
|
||||
$branch = "master"
|
||||
$version = ""
|
||||
$branchNeedsToBeSetted = 1;
|
||||
$versionNeedsToBeSetted = 1;
|
||||
$zipOutput = 0;
|
||||
$silent = 0;
|
||||
$excludeClient = 0;
|
||||
$excludeServer = 0;
|
||||
$excludeFrontend = 0;
|
||||
$excludeNodeUpdate = 0;
|
||||
$excludeNugetUpdate = 0;
|
||||
$excludeGit = 0;
|
||||
$filelog = $PSScriptRoot + "\" + $filelog
|
||||
$version = getAssemblyInfo $assemblyInfoFile
|
||||
$outBuild = $outBuildPath + $version
|
||||
$outLogs = $outBuildPath + "_Logs\"
|
||||
|
||||
#Setup Arguments
|
||||
for ( $i = 0; $i -lt $args.count; $i++ ) {
|
||||
if($args[$i] -eq "-branch")
|
||||
{
|
||||
if($args[$i+1].StartsWith("-"))
|
||||
{
|
||||
$err = $args[$i+1]
|
||||
ExitERR "Invalid Branch Name"
|
||||
}
|
||||
else
|
||||
{
|
||||
$branch = $args[$i +1]
|
||||
$i++;
|
||||
$branchNeedsToBeSetted = 0;
|
||||
}
|
||||
}
|
||||
elseif($args[$i] -eq "-version")
|
||||
{
|
||||
if($args[$i+1].StartsWith("-"))
|
||||
{
|
||||
$err = $args[$i+1]
|
||||
ExitERR "Invalid Version Name"
|
||||
}
|
||||
else
|
||||
{
|
||||
$version = $args[$i +1]
|
||||
$outBuild = $outBuildPath + $version
|
||||
$i++;
|
||||
$versionNeedsToBeSetted = 0;
|
||||
}
|
||||
}
|
||||
elseif($args[$i] -eq "-silent")
|
||||
{
|
||||
$silent = 1;
|
||||
}
|
||||
elseif($args[$i] -eq "-portable")
|
||||
{
|
||||
$zipOutput = 1;
|
||||
}
|
||||
elseif($args[$i] -eq "-excludeclient")
|
||||
{
|
||||
$excludeClient = 1;
|
||||
}
|
||||
elseif($args[$i] -eq "-excludenodeupdate")
|
||||
{
|
||||
$excludeNodeUpdate = 1;
|
||||
}
|
||||
elseif($args[$i] -eq "-excludenugetupdate")
|
||||
{
|
||||
$excludeNugetUpdate = 1;
|
||||
}
|
||||
elseif($args[$i] -eq "-excludegit")
|
||||
{
|
||||
$excludeGit = 1;
|
||||
}
|
||||
elseif($args[$i] -eq "-excludeserver")
|
||||
{
|
||||
$excludeServer = 1;
|
||||
}
|
||||
elseif($args[$i] -eq "-excludefrontend")
|
||||
{
|
||||
$excludeFrontend = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$err = $args[$i]
|
||||
ExitERR "Invalid parameter: $err"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#Operations...
|
||||
CheckAllCommand
|
||||
|
||||
Write-Host "CMS-Active Builder...." -ForegroundColor Green
|
||||
|
||||
$tempname = getFileLog
|
||||
$filelog = $outLogs + $tempname
|
||||
New-Item -ItemType "directory" -Path "$outLogs" -Force | Out-Null
|
||||
Write-Host "Log File: " $filelog -ForegroundColor Green
|
||||
|
||||
|
||||
if (($silent -eq 0) -and ($branchNeedsToBeSetted -eq 1)) {
|
||||
$branch = git branch --show-current
|
||||
$response = Read-Host "insert the name of the Git Branch [$branch]"
|
||||
if ($response -ne '') {
|
||||
$branch = $response
|
||||
}
|
||||
}
|
||||
if (($silent -eq 0) -and ($versionNeedsToBeSetted -eq 1)) {
|
||||
$response = Read-Host "insert the name of the New Version [$version]"
|
||||
if ($response -ne '') {
|
||||
$version = $response
|
||||
$outBuild = $outBuildPath + $version
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "-------------------------------"
|
||||
if ($excludeGit -ne 1) {
|
||||
Write-Host "Git Feching"
|
||||
ExecuteLog "git fetch --all"
|
||||
|
||||
Write-Host "Moving to branch '$branch'"
|
||||
ExecuteLog "git checkout $branch"
|
||||
|
||||
$mail = git log -1 --pretty=format:'%ae'
|
||||
$author = git log -1 --pretty=format:'%an'
|
||||
Write-Host "This is your last commit message from '$author' [$mail]:"
|
||||
git log --oneline -n 1 HEAD
|
||||
askConfirmorDie "`r`nAre you sure do you want to continue [y,n]"
|
||||
|
||||
ExecuteLog "git checkout ."
|
||||
Write-Host "Pulling"
|
||||
ExecuteLog "git pull"
|
||||
}
|
||||
|
||||
Write-Host "-------------------------------"
|
||||
Write-Host "Clean the Solution"
|
||||
ExecuteLog "devenv Thermo.Active.sln /Clean"
|
||||
$outFile = Test-Path $outputdir
|
||||
if($outFile -eq "True")
|
||||
{
|
||||
Remove-Item $outputdir -Recurse -Force
|
||||
}
|
||||
|
||||
if ($excludeNugetUpdate -ne 1) {
|
||||
Write-Host "Update the Nuget Packages"
|
||||
CheckNugetScm
|
||||
ExecuteLog "nuget restore"
|
||||
}
|
||||
|
||||
if ($version -ne "") {
|
||||
ExecuteLog "ChangeAssemblyVersion $assemblyInfoFile $version"
|
||||
}
|
||||
|
||||
if ($excludeServer -ne 1) {
|
||||
Write-Host "Build the Server APP"
|
||||
ExecuteLog "devenv Thermo.Active.sln /Build Release /Projectconfig ""Release"" /project ""Thermo.Active\Thermo.Active.csproj"""
|
||||
$newv = (Get-Item $outputServer).VersionInfo.FileVersion
|
||||
$outBuild = $outBuildPath + $newv
|
||||
$outFile = Test-Path $outputServer
|
||||
if($outFile -ne "True")
|
||||
{
|
||||
ExitERR "Error while building Server APP (Exe not created)"
|
||||
}
|
||||
}
|
||||
|
||||
if ($excludeClient -ne 1) {
|
||||
Write-Host "Build the Client APP"
|
||||
ExecuteLog "devenv Thermo.Active.sln /Build Release /Projectconfig ""Release|x64"" /project ""Client2020\Client2020.csproj"""
|
||||
ExecuteLog "Copy-Item -Path ""$PSScriptRoot\Thermo.Active\bin\Client\x64"" -Destination ""$PSScriptRoot\tmp"" -Recurse"
|
||||
ExecuteLog "Remove-Item -Path ""$PSScriptRoot\Thermo.Active\bin\Client\x64*"" -Force -Recurse"
|
||||
ExecuteLog "Copy-Item -Path ""$PSScriptRoot\tmp\*"" -Destination ""$PSScriptRoot\Thermo.Active\bin\Client"" -Recurse"
|
||||
$outFile = Test-Path $outputClient
|
||||
if($outFile -ne "True")
|
||||
{
|
||||
ExitERR "Error while building Client APP (Exe not created)"
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "-------------------------------"
|
||||
if ($excludeFrontend -ne 1) {
|
||||
Set-Location .\Thermo.Active\wwwroot\
|
||||
if ($excludeNodeUpdate -ne 1) {
|
||||
Write-Host "Update the Node dependencies"
|
||||
ExecuteLog "npm install"
|
||||
}
|
||||
|
||||
Write-Host "Build the Frontend"
|
||||
ExecuteLog "npm run build"
|
||||
|
||||
Set-Location $PSScriptRoot
|
||||
}
|
||||
Write-Host "-------------------------------"
|
||||
Write-Host "Create the output directory"
|
||||
ExecuteLog "New-Item -ItemType ""directory"" -Path $outBuild -Force"
|
||||
ExecuteLog "Remove-Item $outBuild -Recurse -Force"
|
||||
|
||||
|
||||
if ($zipOutput -ne 1) {
|
||||
Write-Host "-------------------------------"
|
||||
Write-Host "Create the installer"
|
||||
ExecuteLog "iscc ""$installerFilePath"""
|
||||
ExecuteLog "Remove-Item -Path ""$PSScriptRoot\tmp"" -Force -Recurse"
|
||||
}
|
||||
|
||||
if ($zipOutput -eq 1) {
|
||||
Write-Host "-------------------------------"
|
||||
Write-Host "Create the Zip file"
|
||||
$outFile = Test-Path $outputdir
|
||||
if($outFile -eq "True")
|
||||
{
|
||||
ExecuteLog "7z a ""$outBuild\Active_Portable_$version.zip"" $outputdir\* "
|
||||
}
|
||||
|
||||
Write-Host "Create the view Folder"
|
||||
ExecuteLog "New-Item -ItemType ""directory"" -Path view -Force"
|
||||
ExecuteLog "Remove-Item -Path ""view\*"" -Force -Recurse"
|
||||
|
||||
Write-Host "Copy the files in View Folder"
|
||||
ExecuteLog "Copy-Item -Path ""$PSScriptRoot\Thermo.Active\wwwroot\dist"" -Destination ""view"" -Recurse"
|
||||
ExecuteLog "Copy-Item -Path ""$PSScriptRoot\Thermo.Active\wwwroot\Scripts"" -Destination ""view"" -Recurse"
|
||||
ExecuteLog "Copy-Item -Path ""$PSScriptRoot\Thermo.Active\wwwroot\libs"" -Destination ""view"" -Recurse"
|
||||
ExecuteLog "New-Item -ItemType ""directory"" -Path view\Assets\styles -Force"
|
||||
ExecuteLog "Copy-Item -Path ""$PSScriptRoot\Thermo.Active\wwwroot\Assets\fonts"" -Destination ""view\Assets"" -Recurse"
|
||||
ExecuteLog "Copy-Item -Path ""$PSScriptRoot\Thermo.Active\wwwroot\Assets\images"" -Destination ""view\Assets"" -Recurse"
|
||||
ExecuteLog "Copy-Item -Path ""$PSScriptRoot\Thermo.Active\wwwroot\Assets\icons"" -Destination ""view\Assets"" -Recurse"
|
||||
ExecuteLog "Copy-Item -Path ""$PSScriptRoot\Thermo.Active\wwwroot\Assets\styles\style.css"" -Destination ""view\Assets\styles"" "
|
||||
ExecuteLog "Copy-Item -Path ""$PSScriptRoot\Thermo.Active\wwwroot\Assets\styles\style.css.map"" -Destination ""view\Assets\styles"" "
|
||||
ExecuteLog "Copy-Item -Path ""$PSScriptRoot\Thermo.Active\wwwroot\Assets\styles\iziToast.min.css"" -Destination ""view\Assets\styles"" "
|
||||
ExecuteLog "Copy-Item -Path ""$PSScriptRoot\Thermo.Active\wwwroot\Assets\styles\vue2-datepicker.css"" -Destination ""view\Assets\styles"" "
|
||||
ExecuteLog "Copy-Item -Path ""$PSScriptRoot\Thermo.Active\wwwroot\index.html"" -Destination ""view"" -Recurse"
|
||||
ExecuteLog "Copy-Item -Path ""$PSScriptRoot\Thermo.Active\wwwroot\favicon.ico"" -Destination ""view"" -Recurse"
|
||||
|
||||
Write-Host "Copy view in Zip file"
|
||||
$outFile = Test-Path ".\View"
|
||||
if($outFile -eq "True")
|
||||
{
|
||||
ExecuteLog "7z a ""$outBuild\Active_Portable_$version.zip"" "".\view"" "
|
||||
ExecuteLog "Remove-Item "".\View"" -Recurse -Force"
|
||||
ExecuteLog "Remove-Item -Path ""$PSScriptRoot\tmp"" -Force -Recurse"
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "Version created: $version" -ForegroundColor Green
|
||||
Write-Host "Output dir: $outBuild"
|
||||
|
||||
if ($silent -eq 0) {
|
||||
explorer.exe $outBuild
|
||||
}
|
||||
|
||||
ExitOk
|
||||
@@ -0,0 +1,229 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<IOSetup>
|
||||
<parameter>
|
||||
<id>0</id>
|
||||
<category>DI</category>
|
||||
<bank>0</bank>
|
||||
<position>0</position>
|
||||
<page>301</page>
|
||||
<wire>404</wire>
|
||||
<profinet>A32.3</profinet>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<id>1</id>
|
||||
<category>DI</category>
|
||||
<bank>0</bank>
|
||||
<position>1</position>
|
||||
<page>301</page>
|
||||
<wire>405</wire>
|
||||
<profinet>A32.5</profinet>
|
||||
<disableForce>true</disableForce>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<id>2</id>
|
||||
<category>DI</category>
|
||||
<bank>0</bank>
|
||||
<position>2</position>
|
||||
<page>301</page>
|
||||
<wire>406</wire>
|
||||
<profinet>A32.7</profinet>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<id>3</id>
|
||||
<category>DI</category>
|
||||
<bank>0</bank>
|
||||
<position>3</position>
|
||||
<page>301</page>
|
||||
<wire>407</wire>
|
||||
<profinet>A32.8</profinet>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<id>4</id>
|
||||
<category>DI</category>
|
||||
<bank>0</bank>
|
||||
<position>4</position>
|
||||
<page>301</page>
|
||||
<wire>408</wire>
|
||||
<profinet>A32.1</profinet>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<id>5</id>
|
||||
<category>AI</category>
|
||||
<bank>0</bank>
|
||||
<position>5</position>
|
||||
<page>301</page>
|
||||
<wire>409</wire>
|
||||
<profinet>A32.2</profinet>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<id>6</id>
|
||||
<category>DI</category>
|
||||
<bank>0</bank>
|
||||
<position>6</position>
|
||||
<page>301</page>
|
||||
<wire>210</wire>
|
||||
<profinet>A32.4</profinet>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<id>7</id>
|
||||
<category>DI</category>
|
||||
<bank>0</bank>
|
||||
<position>7</position>
|
||||
<page>301</page>
|
||||
<wire>211</wire>
|
||||
<profinet>A32.6</profinet>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<id>0</id>
|
||||
<category>DO</category>
|
||||
<bank>0</bank>
|
||||
<position>0</position>
|
||||
<page>301</page>
|
||||
<wire>404</wire>
|
||||
<profinet>B43.3</profinet>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<id>1</id>
|
||||
<category>DO</category>
|
||||
<bank>0</bank>
|
||||
<position>1</position>
|
||||
<page>301</page>
|
||||
<wire>405</wire>
|
||||
<profinet>B43.5</profinet>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<id>2</id>
|
||||
<category>DO</category>
|
||||
<bank>0</bank>
|
||||
<position>2</position>
|
||||
<page>301</page>
|
||||
<wire>406</wire>
|
||||
<profinet>B43.7</profinet>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<id>3</id>
|
||||
<category>DO</category>
|
||||
<bank>0</bank>
|
||||
<position>3</position>
|
||||
<page>301</page>
|
||||
<wire>407</wire>
|
||||
<profinet>B43.8</profinet>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<id>4</id>
|
||||
<category>DO</category>
|
||||
<bank>0</bank>
|
||||
<position>4</position>
|
||||
<page>301</page>
|
||||
<wire>408</wire>
|
||||
<profinet>B43.1</profinet>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<id>21</id>
|
||||
<category>DO</category>
|
||||
<bank>1</bank>
|
||||
<position>5</position>
|
||||
<page>301</page>
|
||||
<wire>409</wire>
|
||||
<profinet>B43.2</profinet>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<id>22</id>
|
||||
<category>DO</category>
|
||||
<bank>1</bank>
|
||||
<position>6</position>
|
||||
<page>301</page>
|
||||
<wire>210</wire>
|
||||
<profinet>B43.4</profinet>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<id>23</id>
|
||||
<category>DO</category>
|
||||
<bank>1</bank>
|
||||
<position>7</position>
|
||||
<page>301</page>
|
||||
<wire>211</wire>
|
||||
<profinet>B43.6</profinet>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<id>0</id>
|
||||
<category>AI</category>
|
||||
<bank>0</bank>
|
||||
<position>0</position>
|
||||
<page>511</page>
|
||||
<wire>614</wire>
|
||||
<profinet>C43.23</profinet>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<id>1</id>
|
||||
<category>AI</category>
|
||||
<bank>0</bank>
|
||||
<position>1</position>
|
||||
<page>511</page>
|
||||
<wire>615</wire>
|
||||
<profinet>C43.25</profinet>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<id>16</id>
|
||||
<category>AI</category>
|
||||
<bank>2</bank>
|
||||
<position>0</position>
|
||||
<page>501</page>
|
||||
<wire>604</wire>
|
||||
<profinet>C43.3</profinet>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<id>17</id>
|
||||
<category>AI</category>
|
||||
<bank>2</bank>
|
||||
<position>1</position>
|
||||
<page>501</page>
|
||||
<wire>605</wire>
|
||||
<profinet>C43.5</profinet>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<id>0</id>
|
||||
<category>AO</category>
|
||||
<bank>0</bank>
|
||||
<position>0</position>
|
||||
<page>700</page>
|
||||
<wire>800</wire>
|
||||
<profinet>D43.13</profinet>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<id>1</id>
|
||||
<category>AO</category>
|
||||
<bank>0</bank>
|
||||
<position>1</position>
|
||||
<page>701</page>
|
||||
<wire>801</wire>
|
||||
<profinet>D43.14</profinet>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<id>2</id>
|
||||
<category>AO</category>
|
||||
<bank>0</bank>
|
||||
<position>2</position>
|
||||
<page>702</page>
|
||||
<wire>802</wire>
|
||||
<profinet>D43.15</profinet>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<id>16</id>
|
||||
<category>AO</category>
|
||||
<bank>3</bank>
|
||||
<position>0</position>
|
||||
<page>701</page>
|
||||
<wire>804</wire>
|
||||
<profinet>D43.3</profinet>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<id>31</id>
|
||||
<category>AO</category>
|
||||
<bank>4</bank>
|
||||
<position>15</position>
|
||||
<page>701</page>
|
||||
<wire>805</wire>
|
||||
<profinet>D43.5</profinet>
|
||||
</parameter>
|
||||
</IOSetup>
|
||||
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
|
||||
<xs:element name="IOSetup">
|
||||
<!-- Heads -->
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="parameter" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="id" type="xs:int"/>
|
||||
<xs:element name="category" type="io_type" />
|
||||
<xs:element name="bank" type="xs:string" />
|
||||
<xs:element name="position" type="xs:string" />
|
||||
<xs:element name="page" type="xs:string" />
|
||||
<xs:element name="wire" type="xs:string" />
|
||||
<xs:element name="profinet" type="xs:string" />
|
||||
<xs:element name="disableForce" type ="xs:boolean" minOccurs="0" />
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<!-- Head Type -->
|
||||
<xs:simpleType name="io_type" final="restriction">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="DI" />
|
||||
<xs:enumeration value="DO" />
|
||||
<xs:enumeration value="AI"/>
|
||||
<xs:enumeration value="AO"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
</xs:schema>
|
||||
@@ -119,6 +119,8 @@
|
||||
<sampling>
|
||||
<thread name="alarms" value="200" />
|
||||
<thread name="axis" value="200" />
|
||||
<thread name="channelsIoFast" value="300" />
|
||||
<thread name="channelsIoSlow" value="5000" />
|
||||
<thread name="area" value="500" />
|
||||
<thread name="confReq" value="2000" />
|
||||
<thread name="expMan" value="30000" />
|
||||
|
||||
@@ -61,6 +61,7 @@ namespace Thermo.Active.Config
|
||||
public static List<ThermoProdConfigModel> ThermoProdConfig;
|
||||
public static List<RecipeConfigModel> RecipeConfig;
|
||||
public static List<ModBlockConfigModel> ModBlockConfig;
|
||||
public static List<IOConfigModel> IOConfig;
|
||||
public static List<RiskResistModel> RiskResistConfig;
|
||||
public static List<RiskChannelModel> RiskChannelConfig;
|
||||
public static List<RiskBoardModel> RiskBoardConfig;
|
||||
|
||||
@@ -326,6 +326,7 @@ namespace Thermo.Active.Config
|
||||
ReadThermoProdConfig();
|
||||
ReadRecipeConfig();
|
||||
ReadModBlockConfig();
|
||||
ReadIOConfig();
|
||||
ReadRiskConfig();
|
||||
ReadAxesConfig();
|
||||
ReadCMSConnectConfig();
|
||||
@@ -499,6 +500,30 @@ namespace Thermo.Active.Config
|
||||
.ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// IO config setup from file
|
||||
/// </summary>
|
||||
private static void ReadIOConfig()
|
||||
{
|
||||
XDocument xmlConfigFile = GetXmlHandlerWithValidator(IO_CONFIG_SCHEMA_PATH, IO_CONFIG_PATH);
|
||||
// Read head config from XML file
|
||||
IOConfig = xmlConfigFile
|
||||
.Root
|
||||
.Elements()
|
||||
.Select(x => new IOConfigModel()
|
||||
{
|
||||
Id = Convert.ToInt16(x.Element("id").Value),
|
||||
Category = GetTActIO_Type(x.Element("category").Value),
|
||||
Bank = x.Element("bank") != null ? x.Element("bank").Value : "0",
|
||||
Position = x.Element("position") != null ? x.Element("position").Value : "0",
|
||||
Page = x.Element("page") != null ? x.Element("page").Value : "",
|
||||
Wire = x.Element("wire") != null ? x.Element("wire").Value : "",
|
||||
Profinet = x.Element("profinet") != null ? x.Element("profinet").Value : "",
|
||||
DisableForce = x.Element("disableForce") != null ? Convert.ToBoolean(x.Element("disableForce").Value): false
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
|
||||
private static void ReadNcSoftKeys()
|
||||
{
|
||||
XDocument xmlConfigFile = GetXmlHandlerWithValidator(NC_SOFTKEYS_CONFIG_SCHEMA_PATH, NC_SOFTKEYS_CONFIG_PATH);
|
||||
@@ -586,7 +611,8 @@ namespace Thermo.Active.Config
|
||||
{
|
||||
Canale = Convert.ToInt16(y.Attribute("canale").Value),
|
||||
Riga = Convert.ToInt16(y.Attribute("riga").Value),
|
||||
Tipo = Convert.ToInt16(y.Attribute("tipo").Value)
|
||||
Tipo = Convert.ToInt16(y.Attribute("tipo").Value),
|
||||
IdGruppo = Convert.ToInt16(y.Attribute("idGruppo").Value),
|
||||
}
|
||||
)
|
||||
.ToList()
|
||||
@@ -694,7 +720,8 @@ namespace Thermo.Active.Config
|
||||
Column = numCol,
|
||||
IdChannel = resistenza.Canale,
|
||||
Dimension = riferimento.Dimensione,
|
||||
IdReflector = riflettore.Tipo
|
||||
IdReflector = riflettore.Tipo,
|
||||
IdGroup = resistenza.IdGruppo,
|
||||
}); ;
|
||||
maxRow = resistenza.Riga > maxRow ? resistenza.Riga : maxRow;
|
||||
}
|
||||
|
||||
@@ -65,6 +65,9 @@
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ServerConfig.cs" />
|
||||
<Compile Include="ServerConfigController.cs" />
|
||||
<Content Include="Config\IOConfig.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Config\thermoProdConfig.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
@@ -215,6 +218,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Config\IOConfigValidator.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<None Include="Config\Recipes\template.tpl">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
|
||||
@@ -30,6 +30,7 @@ using static Thermo.Active.Utils.ExceptionManager;
|
||||
using System.Windows;
|
||||
using System.Drawing;
|
||||
using System.Configuration;
|
||||
using Thermo.Active.Model.DTOModels.ThIO;
|
||||
|
||||
public static class ThreadsFunctions
|
||||
{
|
||||
@@ -412,6 +413,55 @@ public static class ThreadsFunctions
|
||||
ncAdapter.Dispose();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Lettura valorichannelsIO
|
||||
/// </summary>
|
||||
public static void ReadChannelsIoData()
|
||||
{
|
||||
NcAdapter ncAdapter = new NcAdapter();
|
||||
Stopwatch sw = new Stopwatch();
|
||||
|
||||
try
|
||||
{
|
||||
// Try connection
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
if (libraryError.errorCode != 0)
|
||||
ManageLibraryError(libraryError);
|
||||
|
||||
while (true)
|
||||
{
|
||||
|
||||
sw.Restart();
|
||||
|
||||
if (ncAdapter.numericalControl.NC_IsConnected())
|
||||
{
|
||||
// Get Data from config and PLC
|
||||
libraryError = ncAdapter.ReadValIO(out DTOChannelsIOVal currChannelsIoVal);
|
||||
if (libraryError.errorCode != 0)
|
||||
ManageLibraryError(libraryError);
|
||||
else
|
||||
// Send through signalR
|
||||
MessageServices.Current.Publish(SEND_CHANNELS_IO_DATA, null, currChannelsIoVal);
|
||||
}
|
||||
else
|
||||
RestoreConnection();
|
||||
|
||||
sw.Stop();
|
||||
|
||||
//Update thread timer
|
||||
UpdateStat(MethodBase.GetCurrentMethod().Name, sw.ElapsedMilliseconds);
|
||||
|
||||
// verifico se periodo rapido o veloce...
|
||||
int timerAct = RedisController.FastIoSample ? samplMsec("channelsIoFast") : samplMsec("channelsIoSlow");
|
||||
// Wait
|
||||
Thread.Sleep(CalcSleepTime(timerAct, (int)sw.ElapsedMilliseconds));
|
||||
}
|
||||
}
|
||||
catch (ThreadAbortException)
|
||||
{
|
||||
ncAdapter.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public static void ReadEnabledFunctionality()
|
||||
{
|
||||
|
||||
@@ -36,6 +36,7 @@ namespace Thermo.Active.Core
|
||||
ThreadsFunctions.ReadScadaData,
|
||||
ThreadsFunctions.ReadMComandsData,
|
||||
ThreadsFunctions.ReadAxisInfoData,
|
||||
ThreadsFunctions.ReadChannelsIoData,
|
||||
ThreadsFunctions.ReadM154Data // levare?
|
||||
|
||||
};
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Thermo.Active.Database.Controllers
|
||||
private const string machinePowerPath = "Machine:Power";
|
||||
private const string machineAlarmPath = "Machine:Alarm";
|
||||
private const string machineEmergencyPath = "Machine:Emergency";
|
||||
private const string alarmsPath = "Machine:Plc:Condition";
|
||||
private const string alarmsPath = "Machine:Plc:Condition";
|
||||
private const string processStatusPath = "Machine:Cnc:CncProcesses:%NN%:Status";
|
||||
private const string processModePath = "Machine:Cnc:CncProcesses:%NN%:Mode";
|
||||
private const string processFeedOverridePath = "Machine:Cnc:CncProcesses:%NN%:FeedOverride";
|
||||
@@ -27,7 +27,7 @@ namespace Thermo.Active.Database.Controllers
|
||||
private const string processSpeedOverridePath = "Machine:Cnc:CncProcesses:%NN%:SpeedOverride";
|
||||
|
||||
private const string datamodelPath = "AdpConf:DataModel";
|
||||
private const string currentActiveVersionPath = "Machine:Hmi:Version";
|
||||
private const string currentActiveVersionPath = "Machine:Hmi:Version";
|
||||
private const string machineAxisPosition = "Machine:Axes:%NN%:CurrentPos";
|
||||
private const string machineAxisSpeed = "Machine:Axes:%NN%:FeedRate";
|
||||
private const string machineAxisLoad = "Machine:Axes:%NN%:Load";
|
||||
@@ -70,7 +70,7 @@ namespace Thermo.Active.Database.Controllers
|
||||
string redisHash = redUtil.man.redHash(redisAlmEn);
|
||||
return redUtil.man.redSaveHashDict(redisHash, alarms);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static bool WriteDatamodel(string datamodel)
|
||||
{
|
||||
@@ -79,7 +79,7 @@ namespace Thermo.Active.Database.Controllers
|
||||
}
|
||||
public static bool WriteDefaultEntry(Dictionary<string, string> entries)
|
||||
{
|
||||
foreach (KeyValuePair<string,string> entry in entries)
|
||||
foreach (KeyValuePair<string, string> entry in entries)
|
||||
{
|
||||
if (!redUtil.man.setRSV(redUtil.man.redHash(entry.Key), entry.Value))
|
||||
return false;
|
||||
@@ -109,7 +109,7 @@ namespace Thermo.Active.Database.Controllers
|
||||
string redisHash = redUtil.man.redHash(machineStatusPath);
|
||||
return redUtil.man.setRSV(redisHash, status.ToString());
|
||||
}
|
||||
|
||||
|
||||
public static bool WriteCurrentProcessStatus(uint ProductionProcess, string status)
|
||||
{
|
||||
string redisHash = redUtil.man.redHash(processStatusPath).Replace("%NN%", ProductionProcess.ToString("00"));
|
||||
@@ -131,21 +131,21 @@ namespace Thermo.Active.Database.Controllers
|
||||
if (!redUtil.man.setRSV(redisHash, "100"))
|
||||
return false;
|
||||
redisHash = redUtil.man.redHash(processSpeedOverridePath).Replace("%NN%", ProductionProcess.ToString("00"));
|
||||
if(!redUtil.man.setRSV(redisHash, "100"))
|
||||
if (!redUtil.man.setRSV(redisHash, "100"))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static bool WriteCurrentMachinePowerPath(bool status)
|
||||
{
|
||||
string redisHash = redUtil.man.redHash(machinePowerPath);
|
||||
if(status)
|
||||
if (status)
|
||||
return redUtil.man.setRSV(redisHash, "true");
|
||||
else
|
||||
return redUtil.man.setRSV(redisHash, "false");
|
||||
}
|
||||
|
||||
|
||||
public static bool WriteCurrentMachineAlarmPath(bool status)
|
||||
{
|
||||
string redisHash = redUtil.man.redHash(machineAlarmPath);
|
||||
@@ -154,7 +154,7 @@ namespace Thermo.Active.Database.Controllers
|
||||
else
|
||||
return redUtil.man.setRSV(redisHash, "false");
|
||||
}
|
||||
|
||||
|
||||
public static bool WriteCurrentMachineEmergencyPath(bool status)
|
||||
{
|
||||
string redisHash = redUtil.man.redHash(machineEmergencyPath);
|
||||
@@ -183,14 +183,41 @@ namespace Thermo.Active.Database.Controllers
|
||||
redUtil.man.ListPush(redisHash, msg);
|
||||
return true;
|
||||
}
|
||||
public static string ReadValue(string msgKey)
|
||||
{
|
||||
string redisHash = redUtil.man.redHash(msgKey);
|
||||
return redUtil.man.getRSV(redisHash);
|
||||
}
|
||||
public static bool WriteValue(string msgKey, string msg, int ttlSec)
|
||||
{
|
||||
string redisHash = redUtil.man.redHash(msgKey);
|
||||
redUtil.man.setRSV(redisHash, msg, ttlSec);
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool FastIoSample
|
||||
{
|
||||
get
|
||||
{
|
||||
var currVal = ReadValue("FastIoSample");
|
||||
bool answ = !string.IsNullOrEmpty(currVal);
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
// TTL: se true 5 min, altrimenti 1 sec
|
||||
int ttlSec = value ? 60 * 5 : 1;
|
||||
WriteValue("FastIoSample", "Active", ttlSec);
|
||||
}
|
||||
}
|
||||
|
||||
public static bool WriteCurrentAxisStatus(Dictionary<int, DTOAxisInfoModel> axis)
|
||||
{
|
||||
foreach(KeyValuePair<int, DTOAxisInfoModel> asse in axis)
|
||||
foreach (KeyValuePair<int, DTOAxisInfoModel> asse in axis)
|
||||
{
|
||||
string redisHash = redUtil.man.redHash(machineAxisName).Replace("%NN%", asse.Value.ID.ToString("00"));
|
||||
|
||||
if(redUtil.man.getRSV(redisHash) != null)
|
||||
if (redUtil.man.getRSV(redisHash) != null)
|
||||
{
|
||||
redisHash = redUtil.man.redHash(machineAxisPosition).Replace("%NN%", asse.Value.ID.ToString("00"));
|
||||
if (!redUtil.man.setRSV(redisHash, asse.Value.position.ToString()))
|
||||
@@ -203,7 +230,7 @@ namespace Thermo.Active.Database.Controllers
|
||||
redisHash = redUtil.man.redHash(machineAxisLoad).Replace("%NN%", asse.Value.ID.ToString("00"));
|
||||
if (!redUtil.man.setRSV(redisHash, asse.Value.load.ToString()))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -65,19 +65,44 @@ namespace Thermo.Active.Database
|
||||
{
|
||||
try
|
||||
{
|
||||
ServiceController service = new ServiceController("MySQL");
|
||||
String serviceName = getDbServiceName();
|
||||
if(serviceName.Equals(""))
|
||||
{
|
||||
ManageError(ERROR_LEVEL.FATAL, "Database SQL service not found", true);
|
||||
return false;
|
||||
}
|
||||
|
||||
String serviceRedisName = getRedisServiceName();
|
||||
if (serviceRedisName.Equals(""))
|
||||
{
|
||||
ManageError(ERROR_LEVEL.FATAL, "Database REDIS service not found", true);
|
||||
return false;
|
||||
}
|
||||
|
||||
ServiceController service = new ServiceController(serviceName);
|
||||
try
|
||||
{
|
||||
TimeSpan timeout = TimeSpan.FromSeconds(DATABASE_PROCESS_TIMEOUT);
|
||||
|
||||
service.WaitForStatus(ServiceControllerStatus.Running, timeout);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ManageError(ERROR_LEVEL.FATAL, "Database not started");
|
||||
Console.WriteLine(ex.Message);
|
||||
return false;
|
||||
}
|
||||
ManageError(ERROR_LEVEL.FATAL, "Database SQL not started", true);
|
||||
return false;
|
||||
}
|
||||
|
||||
service = new ServiceController(serviceRedisName);
|
||||
try
|
||||
{
|
||||
TimeSpan timeout = TimeSpan.FromSeconds(DATABASE_PROCESS_TIMEOUT);
|
||||
service.WaitForStatus(ServiceControllerStatus.Running, timeout);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
ManageError(ERROR_LEVEL.FATAL, "Database REDIS not started", true);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
System.Data.Entity.Database.SetInitializer<DatabaseContext>(null);
|
||||
var migrator = new DbMigrator(new Configuration());
|
||||
@@ -114,7 +139,7 @@ namespace Thermo.Active.Database
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void FindOrCreateMachineUniqueId()
|
||||
private static void FindOrCreateMachineUniqueId()
|
||||
{
|
||||
// Find machine unique id in the register
|
||||
string uniqueId = ReadUniqueIdFromRegister();
|
||||
@@ -198,5 +223,32 @@ namespace Thermo.Active.Database
|
||||
// Return value
|
||||
return (string)key.GetValue(REGISTER_MACHINE_ID_KEY_NAME);
|
||||
}
|
||||
}
|
||||
|
||||
private static string getDbServiceName()
|
||||
{
|
||||
ServiceController[] services = ServiceController.GetServices();
|
||||
var service = services.FirstOrDefault(s => s.ServiceName == "MariaDB");
|
||||
if (service != null)
|
||||
return service.DisplayName;
|
||||
|
||||
service = services.FirstOrDefault(s => s.ServiceName == "MySQL");
|
||||
if (service != null)
|
||||
return service.DisplayName;
|
||||
|
||||
return "";
|
||||
|
||||
}
|
||||
|
||||
private static string getRedisServiceName()
|
||||
{
|
||||
ServiceController[] services = ServiceController.GetServices();
|
||||
var service = services.FirstOrDefault(s => s.ServiceName == "Redis");
|
||||
if (service != null)
|
||||
return service.DisplayName;
|
||||
|
||||
return "";
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System.Collections.Generic;
|
||||
using static Thermo.Active.Model.Constants;
|
||||
|
||||
namespace Thermo.Active.Model.ConfigModels
|
||||
{
|
||||
public class IOConfigModel
|
||||
{
|
||||
public TACT_IO_TYPE Category { get; set; }
|
||||
public int Id { get; set; } =0;
|
||||
public string Bank { get; set; } = "0";
|
||||
public string Position { get; set; } = "0";
|
||||
public string Page { get; set; } = "";
|
||||
public string Wire { get; set; } = "";
|
||||
public string Profinet { get; set; } = "";
|
||||
public bool DisableForce { get; set; } = false;
|
||||
public string Label
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = $"LBL_IO_{Category}_{Id}";
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -45,7 +45,8 @@ namespace Thermo.Active.Model.ConfigModels
|
||||
|
||||
public int Canale;
|
||||
public int Riga;
|
||||
public int Tipo;
|
||||
public int Tipo;
|
||||
public int IdGruppo;
|
||||
|
||||
#endregion Public Fields
|
||||
}
|
||||
@@ -59,6 +60,7 @@ namespace Thermo.Active.Model.ConfigModels
|
||||
public int Id { get; set; } = 0;
|
||||
public int IdChannel { get; set; } = 0;
|
||||
public int IdReflector { get; set; } = 0;
|
||||
public int IdGroup { get; set; } = 0;
|
||||
public int Row { get; set; } = 0;
|
||||
|
||||
#endregion Public Fields
|
||||
|
||||
@@ -98,6 +98,26 @@ namespace Thermo.Active.Model
|
||||
Options
|
||||
}
|
||||
|
||||
public enum TACT_IO_TYPE
|
||||
{
|
||||
ND = 0,
|
||||
/// <summary>
|
||||
/// Digital IN
|
||||
/// </summary>
|
||||
DI,
|
||||
/// <summary>
|
||||
/// Digital OUT
|
||||
/// </summary>
|
||||
DO,
|
||||
/// <summary>
|
||||
/// Analog IN
|
||||
/// </summary>
|
||||
AI,
|
||||
/// <summary>
|
||||
/// Analog OUT
|
||||
/// </summary>
|
||||
AO
|
||||
}
|
||||
public enum TACT_MBLOCK_TYPE
|
||||
{
|
||||
ND = 0,
|
||||
@@ -303,6 +323,9 @@ namespace Thermo.Active.Model
|
||||
public const string MODBLOCK_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "moduleBlockConfigValidator.xsd";
|
||||
public const string MODBLOCK_CONFIG_PATH = CONFIG_DIRECTORY + "moduleBlockConfig.xml";
|
||||
|
||||
public const string IO_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "IOConfigValidator.xsd";
|
||||
public const string IO_CONFIG_PATH = CONFIG_DIRECTORY + "IOConfig.xml";
|
||||
|
||||
public const string RISK_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "risk2007Validator.xsd";
|
||||
public const string RISK_CONFIG_PATH = CONFIG_DIRECTORY + "risk2007.xml";
|
||||
|
||||
@@ -354,6 +377,7 @@ namespace Thermo.Active.Model
|
||||
public const string SEND_NC_SOFTKEYS_DATA = "SEND_NC_SOFTKEYS_DATA";
|
||||
public const string SEND_HEADS_DATA = "SEND_HEADS_DATA";
|
||||
public const string SEND_AXIS_INFO = "SEND_AXIS_INFO";
|
||||
public const string SEND_CHANNELS_IO_DATA = "SEND_CHANNELS_IO_DATA";
|
||||
public const string SEND_ACTIVE_PROGRAM_DATA = "SEND_ACTIVE_PROGRAM_DATA";
|
||||
public const string SEND_QUEUE_DATA = "SEND_QUEUE_DATA";
|
||||
public const string SEND_M155_DATA = "SEND_M155_DATA";
|
||||
|
||||
@@ -0,0 +1,191 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ThIO
|
||||
{
|
||||
public class DTOChannelsIO
|
||||
{
|
||||
public List<DigitalIN> DI { get; set; } = new List<DigitalIN>();
|
||||
public List<DigitalOUT> DO { get; set; } = new List<DigitalOUT>();
|
||||
public List<AnalogIN> AI { get; set; } = new List<AnalogIN>();
|
||||
public List<AnalogOUT> AO { get; set; } = new List<AnalogOUT>();
|
||||
}
|
||||
public class DigitalIN : IoItemConf
|
||||
{
|
||||
public bool Value { get; set; } = false;
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (!(obj is DigitalIN item))
|
||||
return false;
|
||||
if (Id != item.Id)
|
||||
return false;
|
||||
if (Bank != item.Bank)
|
||||
return false;
|
||||
if (Position != item.Position)
|
||||
return false;
|
||||
if (Page != item.Page)
|
||||
return false;
|
||||
if (Wire != Wire)
|
||||
return false;
|
||||
if (Profinet != item.Profinet)
|
||||
return false;
|
||||
if (Label != item.Label)
|
||||
return false;
|
||||
if (Visible != item.Visible)
|
||||
return false;
|
||||
if (Value != item.Value)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
/// <summary>
|
||||
/// Hash gen
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
public class AnalogIN : IoItemConf
|
||||
{
|
||||
public int Value { get; set; } = 0;
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (!(obj is AnalogIN item))
|
||||
return false;
|
||||
|
||||
if (Id != item.Id)
|
||||
return false;
|
||||
if (Bank != item.Bank)
|
||||
return false;
|
||||
if (Position != item.Position)
|
||||
return false;
|
||||
if (Page != item.Page)
|
||||
return false;
|
||||
if (Wire != Wire)
|
||||
return false;
|
||||
if (Profinet != item.Profinet)
|
||||
return false;
|
||||
if (Label != item.Label)
|
||||
return false;
|
||||
if (Visible != item.Visible)
|
||||
return false;
|
||||
if (Value != item.Value)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
/// <summary>
|
||||
/// Hash gen
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
public class DigitalOUT : DigitalIN
|
||||
{
|
||||
public bool ForceEnabled { get; set; } = true;
|
||||
public bool ForceZero { get; set; } = false;
|
||||
public bool ForceOne { get; set; } = false;
|
||||
public bool IsForced { get; set; } = false;
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (!(obj is DigitalOUT item))
|
||||
return false;
|
||||
|
||||
if (Id != item.Id)
|
||||
return false;
|
||||
if (Bank != item.Bank)
|
||||
return false;
|
||||
if (Position != item.Position)
|
||||
return false;
|
||||
if (Page != item.Page)
|
||||
return false;
|
||||
if (Wire != Wire)
|
||||
return false;
|
||||
if (Profinet != item.Profinet)
|
||||
return false;
|
||||
if (Label != item.Label)
|
||||
return false;
|
||||
if (Visible != item.Visible)
|
||||
return false;
|
||||
if (Value != item.Value)
|
||||
return false;
|
||||
if (ForceEnabled != item.ForceEnabled)
|
||||
return false;
|
||||
if (ForceZero != item.ForceZero)
|
||||
return false;
|
||||
if (ForceOne != item.ForceOne)
|
||||
return false;
|
||||
if (IsForced != item.IsForced)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
/// <summary>
|
||||
/// Hash gen
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
public class AnalogOUT : AnalogIN
|
||||
{
|
||||
public bool ForceEnabled { get; set; } = true;
|
||||
public int ForcedValue { get; set; } = 0;
|
||||
public bool IsForced { get; set; } = false;
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (!(obj is AnalogOUT item))
|
||||
return false;
|
||||
|
||||
if (Id != item.Id)
|
||||
return false;
|
||||
if (Bank != item.Bank)
|
||||
return false;
|
||||
if (Position != item.Position)
|
||||
return false;
|
||||
if (Page != item.Page)
|
||||
return false;
|
||||
if (Wire != Wire)
|
||||
return false;
|
||||
if (Profinet != item.Profinet)
|
||||
return false;
|
||||
if (Label != item.Label)
|
||||
return false;
|
||||
if (Visible != item.Visible)
|
||||
return false;
|
||||
if (Value != item.Value)
|
||||
return false;
|
||||
if (ForceEnabled != item.ForceEnabled)
|
||||
return false;
|
||||
if (ForcedValue != item.ForcedValue)
|
||||
return false;
|
||||
if (IsForced != item.IsForced)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
/// <summary>
|
||||
/// Hash gen
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ThIO
|
||||
{
|
||||
public class DTOChannelsIOVal
|
||||
{
|
||||
public List<DigInVal> DI { get; set; } = new List<DigInVal>();
|
||||
public List<DigOutVal> DO { get; set; } = new List<DigOutVal>();
|
||||
public List<AnalInVal> AI { get; set; } = new List<AnalInVal>();
|
||||
public List<AnalOutVal> AO { get; set; } = new List<AnalOutVal>();
|
||||
}
|
||||
public class DigInVal: IoItem
|
||||
{
|
||||
public bool Value { get; set; } = false;
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (!(obj is DigInVal item))
|
||||
return false;
|
||||
|
||||
if (Id != item.Id)
|
||||
return false;
|
||||
if (Value != item.Value)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
/// <summary>
|
||||
/// Hash gen
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
public class AnalInVal: IoItem
|
||||
{
|
||||
public int Value { get; set; } = 0;
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (!(obj is AnalInVal item))
|
||||
return false;
|
||||
|
||||
if (Id != item.Id)
|
||||
return false;
|
||||
if (Value != item.Value)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
/// <summary>
|
||||
/// Hash gen
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
public class DigOutVal : DigInVal
|
||||
{
|
||||
public bool ForceEnabled { get; set; } = true;
|
||||
public bool ForceZero { get; set; } = false;
|
||||
public bool ForceOne { get; set; } = false;
|
||||
public bool IsForced { get; set; } = false;
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (!(obj is DigOutVal item))
|
||||
return false;
|
||||
|
||||
if (Id != item.Id)
|
||||
return false;
|
||||
if (ForceEnabled != item.ForceEnabled)
|
||||
return false;
|
||||
if (ForceZero != item.ForceZero)
|
||||
return false;
|
||||
if (ForceOne != item.ForceOne)
|
||||
return false;
|
||||
if (IsForced != item.IsForced)
|
||||
return false;
|
||||
if (Value != item.Value)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
/// <summary>
|
||||
/// Hash gen
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
public class AnalOutVal : AnalInVal
|
||||
{
|
||||
public bool ForceEnabled { get; set; } = true;
|
||||
public int ForcedValue { get; set; } = 0;
|
||||
public bool IsForced { get; set; } = false;
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (!(obj is AnalOutVal item))
|
||||
return false;
|
||||
|
||||
if (Id != item.Id)
|
||||
return false;
|
||||
if (ForceEnabled != item.ForceEnabled)
|
||||
return false;
|
||||
if (ForcedValue != item.ForcedValue)
|
||||
return false;
|
||||
if (IsForced != item.IsForced)
|
||||
return false;
|
||||
if (Value != item.Value)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
/// <summary>
|
||||
/// Hash gen
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ThIO
|
||||
{
|
||||
public class DTOChannelsSetup
|
||||
{
|
||||
public List<string> DI { get; set; } = new List<string>();
|
||||
public List<string> DO { get; set; } = new List<string>();
|
||||
public List<string> AI { get; set; } = new List<string>();
|
||||
public List<string> AO { get; set; } = new List<string>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ThIO
|
||||
{
|
||||
public class DTOCycleLog
|
||||
{
|
||||
public List<CycleEvent> events { get; set; } = new List<CycleEvent>();
|
||||
}
|
||||
|
||||
public class CycleEvent
|
||||
{
|
||||
public DateTime dtEvent { get; set; }
|
||||
|
||||
public int code { get; set; } = 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ThIO
|
||||
{
|
||||
public class IoItem
|
||||
{
|
||||
public int Id { get; set; } = 0;
|
||||
}
|
||||
public class IoItemDigi : IoItem
|
||||
{
|
||||
public bool value { get; set; } = false;
|
||||
}
|
||||
public class IoItemAnal : IoItem
|
||||
{
|
||||
public int value { get; set; } = 0;
|
||||
}
|
||||
public class IoItemConf : IoItem
|
||||
{
|
||||
public string Bank { get; set; } = "0";
|
||||
public string Position { get; set; } = "0";
|
||||
public string Page { get; set; } = "0";
|
||||
public string Wire { get; set; } = "0";
|
||||
public string Profinet { get; set; } = "0";
|
||||
public string Label { get; set; } = "LBL";
|
||||
public bool Visible { get; set; } = true;
|
||||
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (!(obj is IoItemConf item))
|
||||
return false;
|
||||
|
||||
if (Id != item.Id)
|
||||
return false;
|
||||
if (Bank != item.Bank)
|
||||
return false;
|
||||
if (Position != item.Position)
|
||||
return false;
|
||||
if (Page != item.Page)
|
||||
return false;
|
||||
if (Wire != Wire)
|
||||
return false;
|
||||
if (Profinet != item.Profinet)
|
||||
return false;
|
||||
if (Label != item.Label)
|
||||
return false;
|
||||
if (Visible != item.Visible)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
/// <summary>
|
||||
/// Hash gen
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -66,6 +66,7 @@
|
||||
<Compile Include="ConfigModels\ExtSoftwareModel.cs" />
|
||||
<Compile Include="ConfigModels\InputOperatorConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\AxesConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\IOConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\ThermoProdConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\ModBlockConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\RiskConfigModel.cs" />
|
||||
@@ -112,6 +113,11 @@
|
||||
<Compile Include="DTOModels\DTOM156InputModel.cs" />
|
||||
<Compile Include="DTOModels\DTOMessageModel.cs" />
|
||||
<Compile Include="DTOModels\ThAxes\DTOAxisInfoModel.cs" />
|
||||
<Compile Include="DTOModels\ThIO\DTOChannelsIOVal.cs" />
|
||||
<Compile Include="DTOModels\ThIO\DTOCycleLog.cs" />
|
||||
<Compile Include="DTOModels\ThIO\DTOChannelsSetup.cs" />
|
||||
<Compile Include="DTOModels\ThIO\DTOChannelsIO.cs" />
|
||||
<Compile Include="DTOModels\ThIO\IoItemConf.cs" />
|
||||
<Compile Include="DTOModels\ThModules\DTOModulesBlock.cs" />
|
||||
<Compile Include="DTOModels\ThProd\DTOProdInfo.cs" />
|
||||
<Compile Include="DTOModels\ThProd\DTOThermoPanelProd.cs" />
|
||||
|
||||
@@ -14,6 +14,7 @@ using Thermo.Active.Model.DTOModels.AlarmModels;
|
||||
using Thermo.Active.Model.DTOModels.MaintenanceModels;
|
||||
using Thermo.Active.Model.DTOModels.Scada;
|
||||
using Thermo.Active.Model.DTOModels.ThAxes;
|
||||
using Thermo.Active.Model.DTOModels.ThIO;
|
||||
using Thermo.Active.Model.DTOModels.ThModules;
|
||||
using Thermo.Active.Model.DTOModels.ThProd;
|
||||
using Thermo.Active.Model.DTOModels.ThRecipe;
|
||||
@@ -1456,6 +1457,134 @@ namespace Thermo.Active.NC
|
||||
return libraryError;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Legge dal PLC elenco di eventi LOG del ciclo e li presenta
|
||||
/// </summary>
|
||||
/// <param name="machineLog">Oggetto elenco elementi LOG registrati da macchina</param>
|
||||
/// <returns></returns>
|
||||
public CmsError GetCycleLog(out Dictionary<DateTime, int> machineLog)
|
||||
{
|
||||
CmsError libraryError = NO_ERROR;
|
||||
machineLog = new Dictionary<DateTime, int>();
|
||||
|
||||
if (false)
|
||||
{
|
||||
// recupero l'oggetto dall'NC
|
||||
|
||||
// effettuo traduzione
|
||||
#if false
|
||||
// overview di base: ultima salvata...
|
||||
var err2fix = new Dictionary<RecipeSection, RecipeCatStatus>();
|
||||
|
||||
// leggo la ricetta dal PLC!
|
||||
var currRecipe = new Dictionary<string, DTORecipeParam>();
|
||||
libraryError = ReadFullRecipe(out currRecipe);
|
||||
if (libraryError.IsError())
|
||||
return libraryError;
|
||||
|
||||
// leggo l'intero array delle DB... QUI FAKE sulle DB configurate...
|
||||
List<DTORecipeConfigModel> recipeConfig = RecipeConfig.Select(x => new DTORecipeConfigModel()
|
||||
{
|
||||
Id = x.Id,
|
||||
ScaleFactor = x.ScaleFactor,
|
||||
NumDec = x.NumDec,
|
||||
Category = x.Category.ToString(),
|
||||
SubCategory_1 = x.SubCategory_1,
|
||||
SubCategory_2 = x.SubCategory_2,
|
||||
Name = x.Name,
|
||||
Description = x.Description,
|
||||
Format = x.Format,
|
||||
Label = $"{x.Category}_{x.SubCategory_1}_{x.SubCategory_2}_{x.Name}".Replace("__", "_").Replace("__", "_").ToLower(),
|
||||
EnumVal = x.EnumVal
|
||||
}).ToList();
|
||||
|
||||
RecipeCatStatus currStatus = RecipeCatStatus.Unchanged;
|
||||
|
||||
// da conf ricetta --> se ci sono li leggo da li...
|
||||
if (NcFileAdapter.RecipeLiveData.RecipeOverview != null)
|
||||
{
|
||||
currOverview = NcFileAdapter.RecipeLiveData.RecipeOverview;
|
||||
}
|
||||
|
||||
// verifico eventualmente se mancasse qualcosa...
|
||||
bool changed = false;
|
||||
foreach (var item in recipeConfig)
|
||||
{
|
||||
if (!currOverview.ContainsKey(getRecipeSection(item.Category)))
|
||||
{
|
||||
currOverview.Add(getRecipeSection(item.Category), RecipeCatStatus.Unchanged);
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
// ricerco SE co fossero errori --> reset come changedOK
|
||||
foreach (var item in currOverview)
|
||||
{
|
||||
if (item.Value == RecipeCatStatus.HasError)
|
||||
err2fix.Add(item.Key, RecipeCatStatus.ChangedOk);
|
||||
}
|
||||
foreach (var item in err2fix)
|
||||
{
|
||||
currOverview[item.Key] = item.Value;
|
||||
changed = true;
|
||||
}
|
||||
|
||||
// se cambiato --> salvo in live data...
|
||||
if (changed)
|
||||
{
|
||||
NcFileAdapter.RecipeLiveData.RecipeOverview = currOverview;
|
||||
}
|
||||
|
||||
// ORA percorro conf ricetta x cercare eventuali ERRORI......
|
||||
foreach (var item in recipeConfig)
|
||||
{
|
||||
currStatus = currOverview[getRecipeSection(item.Category)];
|
||||
|
||||
// se lo stato è errore --> esco...
|
||||
if (currStatus == RecipeCatStatus.HasError)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// altrimenti controllo
|
||||
else
|
||||
{
|
||||
// se in errore AND visibile --> registro...
|
||||
bool checkCondition = false;
|
||||
checkCondition = (currRecipe[item.Label].Status.HasError);
|
||||
// 2020.07.29 - controllo condizione secondo status debug/release...
|
||||
if (checkCondition)
|
||||
{
|
||||
currOverview[getRecipeSection(item.Category)] = RecipeCatStatus.HasError;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
// altrimenti genero FAKE data
|
||||
else
|
||||
{
|
||||
int eventVal = 0;
|
||||
DateTime eventDate = DateTime.Now;
|
||||
// genero random eventi da 1..maxEvent
|
||||
Random rndGen = new Random();
|
||||
int maxEvent = 16;
|
||||
int maxDelay = 30000;
|
||||
for (int i = 0; i < 1024; i++)
|
||||
{
|
||||
// calcolo nuovo evento
|
||||
eventVal = rndGen.Next(maxEvent);
|
||||
// calcolo tempo anticipato
|
||||
eventDate = eventDate.AddMilliseconds(-rndGen.Next(maxDelay));
|
||||
//salvo
|
||||
machineLog.Add(eventDate, eventVal);
|
||||
}
|
||||
}
|
||||
|
||||
// restituisco cod errore se trovato
|
||||
return libraryError;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Legge tutti i parametri della ricetta e calcolo la overview dei vari steps
|
||||
/// </summary>
|
||||
@@ -1806,6 +1935,19 @@ namespace Thermo.Active.NC
|
||||
}
|
||||
|
||||
|
||||
// process ch load setup...
|
||||
Dictionary<int, int> newRisk = new Dictionary<int, int>();
|
||||
foreach (var item in NcAdapter.RecipeLiveData.ChannelSetpoints)
|
||||
{
|
||||
newRisk.Add(item.Key, item.Value);
|
||||
}
|
||||
|
||||
// write to PLC SetPointHMI (%)
|
||||
libraryError = WriteRecipeWarmChSetpHMI(newRisk);
|
||||
if (libraryError.IsError())
|
||||
return libraryError;
|
||||
|
||||
|
||||
// Ack !
|
||||
libraryError = numericalControl.PLC_WAckConfRecipeRequest();
|
||||
if (libraryError.IsError())
|
||||
@@ -2025,6 +2167,154 @@ namespace Thermo.Active.NC
|
||||
}
|
||||
return libraryError;
|
||||
}
|
||||
/// <summary>
|
||||
/// Restituisce intero set dati IO Channels (conf + valori)
|
||||
/// </summary>
|
||||
/// <param name="currChannelsIO"></param>
|
||||
/// <returns></returns>
|
||||
public CmsError ReadFullIO(out DTOChannelsIO currChannelsIO)
|
||||
{
|
||||
CmsError libraryError = NO_ERROR;
|
||||
currChannelsIO = new DTOChannelsIO();
|
||||
|
||||
// read and return channel IO data
|
||||
if (NcConfig.NcVendor == NC_VENDOR.S7NET)
|
||||
{
|
||||
// lettura da PLC
|
||||
Dictionary<int, ThermoModels.ModuleBlock> currModBlock = new Dictionary<int, ThermoModels.ModuleBlock>();
|
||||
ThermoModels.ChanIOVis currThermoIOVis = new ThermoModels.ChanIOVis();
|
||||
ThermoModels.ChanIOVal currThermoIOVal = new ThermoModels.ChanIOVal();
|
||||
ThermoModels.ChanIOFor currThermoIOFor = new ThermoModels.ChanIOFor();
|
||||
ThermoModels.ChanIOValFor currThermoIOValFor = new ThermoModels.ChanIOValFor();
|
||||
libraryError = numericalControl.PLC_RIOChannelsConf(ref currThermoIOVis);
|
||||
libraryError = numericalControl.PLC_RIOChannelsVal(ref currThermoIOVal, ref currThermoIOFor, ref currThermoIOValFor);
|
||||
|
||||
// setup da config
|
||||
List<DigitalIN> listDI = IOConfig.Where(x => x.Category == Model.Constants.TACT_IO_TYPE.DI).Select(x => new DigitalIN()
|
||||
{
|
||||
Id = x.Id,
|
||||
Bank = x.Bank,
|
||||
Position = x.Position,
|
||||
//Page = x.Category.ToString(),
|
||||
Page = x.Page,
|
||||
Wire = x.Wire,
|
||||
Profinet = x.Profinet,
|
||||
Label = x.Label.Replace("__", "_").Replace("__", "_").ToLower(),
|
||||
Visible = currThermoIOVis.DI.ContainsKey(x.Id)? currThermoIOVis.DI[x.Id]:false,
|
||||
Value = currThermoIOVal.DI.ContainsKey(x.Id) ? currThermoIOVal.DI[x.Id] : false
|
||||
}).ToList();
|
||||
List<DigitalOUT> listDO = IOConfig.Where(x => x.Category == Model.Constants.TACT_IO_TYPE.DO).Select(x => new DigitalOUT()
|
||||
{
|
||||
Id = x.Id,
|
||||
Bank = x.Bank,
|
||||
Position = x.Position,
|
||||
//Page = x.Category.ToString(),
|
||||
Page = x.Page,
|
||||
Wire = x.Wire,
|
||||
Profinet = x.Profinet,
|
||||
Label = x.Label.Replace("__", "_").Replace("__", "_").ToLower(),
|
||||
ForceEnabled=!x.DisableForce,
|
||||
Visible = currThermoIOVis.DO.ContainsKey(x.Id) ? currThermoIOVis.DO[x.Id] : false,
|
||||
Value = currThermoIOVal.DO.ContainsKey(x.Id) ? currThermoIOVal.DO[x.Id] : false,
|
||||
IsForced = currThermoIOFor.DO.ContainsKey(x.Id) ? currThermoIOFor.DO[x.Id] : false,
|
||||
ForceOne = currThermoIOValFor.DO.ContainsKey(x.Id) ? currThermoIOValFor.DO[x.Id] : false,
|
||||
ForceZero = currThermoIOValFor.DO.ContainsKey(x.Id) ? !currThermoIOValFor.DO[x.Id] : false
|
||||
}).ToList();
|
||||
List<AnalogIN> listAI = IOConfig.Where(x => x.Category == Model.Constants.TACT_IO_TYPE.AI).Select(x => new AnalogIN()
|
||||
{
|
||||
Id = x.Id,
|
||||
Bank = x.Bank,
|
||||
Position = x.Position,
|
||||
//Page = x.Category.ToString(),
|
||||
Page = x.Page,
|
||||
Wire = x.Wire,
|
||||
Profinet = x.Profinet,
|
||||
Label = x.Label.Replace("__", "_").Replace("__", "_").ToLower(),
|
||||
Visible = currThermoIOVis.AI.ContainsKey(x.Id) ? currThermoIOVis.AI[x.Id] : false,
|
||||
Value = currThermoIOVal.AI.ContainsKey(x.Id) ? currThermoIOVal.AI[x.Id] : 0
|
||||
}).ToList();
|
||||
List<AnalogOUT> listAO = IOConfig.Where(x => x.Category == Model.Constants.TACT_IO_TYPE.AO).Select(x => new AnalogOUT()
|
||||
{
|
||||
Id = x.Id,
|
||||
Bank = x.Bank,
|
||||
Position = x.Position,
|
||||
//Page = x.Category.ToString(),
|
||||
Page = x.Page,
|
||||
Wire = x.Wire,
|
||||
Profinet = x.Profinet,
|
||||
Label = x.Label.Replace("__", "_").Replace("__", "_").ToLower(),
|
||||
ForceEnabled = !x.DisableForce,
|
||||
Visible = currThermoIOVis.AO.ContainsKey(x.Id) ? currThermoIOVis.AO[x.Id] : false,
|
||||
Value = currThermoIOVal.AO.ContainsKey(x.Id) ? currThermoIOVal.AO[x.Id] : 0,
|
||||
IsForced = currThermoIOFor.AO.ContainsKey(x.Id) ? currThermoIOFor.AO[x.Id] : false,
|
||||
ForcedValue = currThermoIOValFor.AO.ContainsKey(x.Id) ? currThermoIOValFor.AO[x.Id] : 0
|
||||
}).ToList();
|
||||
|
||||
// assegno!
|
||||
currChannelsIO.DI = listDI;
|
||||
currChannelsIO.DO = listDO;
|
||||
currChannelsIO.AI = listAI;
|
||||
currChannelsIO.AO = listAO;
|
||||
}
|
||||
return libraryError;
|
||||
}
|
||||
/// <summary>
|
||||
/// Restitusice SOLO VALORI IO Channels
|
||||
/// </summary>
|
||||
/// <param name="currChannelsIoVal"></param>
|
||||
/// <returns></returns>
|
||||
public CmsError ReadValIO(out DTOChannelsIOVal currChannelsIoVal)
|
||||
{
|
||||
CmsError libraryError = NO_ERROR;
|
||||
currChannelsIoVal = new DTOChannelsIOVal();
|
||||
// read and return channel IO data
|
||||
if (NcConfig.NcVendor == NC_VENDOR.S7NET)
|
||||
{
|
||||
// lettura da PLC
|
||||
Dictionary<int, ThermoModels.ModuleBlock> currModBlock = new Dictionary<int, ThermoModels.ModuleBlock>();
|
||||
ThermoModels.ChanIOVal currThermoIOVal = new ThermoModels.ChanIOVal();
|
||||
ThermoModels.ChanIOFor currThermoIOFor = new ThermoModels.ChanIOFor();
|
||||
ThermoModels.ChanIOValFor currThermoIOValFor = new ThermoModels.ChanIOValFor();
|
||||
libraryError = numericalControl.PLC_RIOChannelsVal(ref currThermoIOVal, ref currThermoIOFor, ref currThermoIOValFor);
|
||||
|
||||
// setup da config
|
||||
List<DigInVal> listDI = IOConfig.Where(x => x.Category == Model.Constants.TACT_IO_TYPE.DI).Select(x => new DigInVal()
|
||||
{
|
||||
Id = x.Id,
|
||||
Value = currThermoIOVal.DI.ContainsKey(x.Id) ? currThermoIOVal.DI[x.Id] : false
|
||||
}).ToList();
|
||||
List<DigOutVal> listDO = IOConfig.Where(x => x.Category == Model.Constants.TACT_IO_TYPE.DO).Select(x => new DigOutVal()
|
||||
{
|
||||
Id = x.Id,
|
||||
ForceEnabled = !x.DisableForce,
|
||||
Value = currThermoIOVal.DO.ContainsKey(x.Id) ? currThermoIOVal.DO[x.Id] : false,
|
||||
IsForced = currThermoIOFor.DO.ContainsKey(x.Id) ? currThermoIOFor.DO[x.Id] : false,
|
||||
ForceOne = currThermoIOValFor.DO.ContainsKey(x.Id) ? currThermoIOValFor.DO[x.Id] : false,
|
||||
ForceZero = currThermoIOValFor.DO.ContainsKey(x.Id) ? !currThermoIOValFor.DO[x.Id] : false
|
||||
}).ToList();
|
||||
List<AnalInVal> listAI = IOConfig.Where(x => x.Category == Model.Constants.TACT_IO_TYPE.AI).Select(x => new AnalInVal()
|
||||
{
|
||||
Id = x.Id,
|
||||
Value = currThermoIOVal.AI.ContainsKey(x.Id) ? currThermoIOVal.AI[x.Id] : 0
|
||||
}).ToList();
|
||||
List<AnalOutVal> listAO = IOConfig.Where(x => x.Category == Model.Constants.TACT_IO_TYPE.AO).Select(x => new AnalOutVal()
|
||||
{
|
||||
Id = x.Id,
|
||||
ForceEnabled = !x.DisableForce,
|
||||
Value = currThermoIOVal.AO.ContainsKey(x.Id) ? currThermoIOVal.AO[x.Id] : 0,
|
||||
IsForced = currThermoIOFor.AO.ContainsKey(x.Id) ? currThermoIOFor.AO[x.Id] : false,
|
||||
ForcedValue = currThermoIOValFor.AO.ContainsKey(x.Id) ? currThermoIOValFor.AO[x.Id] : 0
|
||||
}).ToList();
|
||||
|
||||
// assegno!
|
||||
currChannelsIoVal.DI = listDI;
|
||||
currChannelsIoVal.DO = listDO;
|
||||
currChannelsIoVal.AI = listAI;
|
||||
currChannelsIoVal.AO = listAO;
|
||||
}
|
||||
return libraryError;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Legge tutti i parametri della ricetta
|
||||
@@ -3048,7 +3338,7 @@ namespace Thermo.Active.NC
|
||||
/// </summary>
|
||||
/// <param name="updtRecipe">Oggetto parametri da aggiornare (from HMI)</param>
|
||||
/// <param name="nMaxParamWrite">num max parametri da scrivere singolarmente</param>
|
||||
/// <param name="delayParamWrite">delay in scriottura multi parametri singoli</param>
|
||||
/// <param name="delayParamWrite">delay in scrittura multi parametri singoli</param>
|
||||
/// <returns></returns>
|
||||
public CmsError WriteRecipeParametersToPLC(Dictionary<string, DTORecipeParam> updtRecipe, int nMaxParamWrite, int delayParamWrite)
|
||||
{
|
||||
@@ -3078,7 +3368,7 @@ namespace Thermo.Active.NC
|
||||
/// </summary>
|
||||
/// <param name="updtRecipe">Oggetto parametri da aggiornare (from HMI)</param>
|
||||
/// <param name="nMaxParamWrite">num max parametri da scrivere singolarmente</param>
|
||||
/// <param name="delayParamWrite">delay in scriottura multi parametri singoli</param>
|
||||
/// <param name="delayParamWrite">delay in scrittura multi parametri singoli</param>
|
||||
/// <returns></returns>
|
||||
public CmsError WriteRecipeParams(Dictionary<string, DTORecipeParam> updtRecipe, int nMaxParamWrite, int delayParamWrite)
|
||||
{
|
||||
@@ -3087,6 +3377,125 @@ namespace Thermo.Active.NC
|
||||
return libraryError;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ChannelsID: write DO to PLC (values + setForce)
|
||||
/// </summary>
|
||||
/// <param name="newValues">Oggetto parametri da aggiornare (from HMI)</param>
|
||||
/// <returns></returns>
|
||||
public CmsError Write_IO_DO_ToPLC(Dictionary<int, bool> newValues)
|
||||
{
|
||||
// solo x S7...
|
||||
if (NcConfig.NcVendor == NC_VENDOR.S7NET)
|
||||
{
|
||||
// scrivo!
|
||||
CmsError libraryError = numericalControl.PLC_W_IO_DO_Val(newValues);
|
||||
if (libraryError.IsError())
|
||||
return libraryError;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FUNCTION_NOT_ALLOWED_ERROR;
|
||||
}
|
||||
return NO_ERROR;
|
||||
}
|
||||
/// <summary>
|
||||
/// ChannelsID: write AO to PLC (values + setForce)
|
||||
/// </summary>
|
||||
/// <param name="newValues">Oggetto parametri da aggiornare (from HMI)</param>
|
||||
/// <returns></returns>
|
||||
public CmsError Write_IO_AO_ToPLC(Dictionary<int, int> newValues)
|
||||
{
|
||||
// solo x S7...
|
||||
if (NcConfig.NcVendor == NC_VENDOR.S7NET)
|
||||
{
|
||||
// scrivo!
|
||||
CmsError libraryError = numericalControl.PLC_W_IO_AO_Val(newValues);
|
||||
if (libraryError.IsError())
|
||||
return libraryError;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FUNCTION_NOT_ALLOWED_ERROR;
|
||||
}
|
||||
return NO_ERROR;
|
||||
}
|
||||
/// <summary>
|
||||
/// ChannelsID: Write RESET (not forced) for DO to PLC (setForce = false)
|
||||
/// </summary>
|
||||
/// <param name="channels">Oggetto parametri da aggiornare (from HMI)</param>
|
||||
/// <returns></returns>
|
||||
public CmsError WriteReset_IO_DO_ToPLC(List<int> channels)
|
||||
{
|
||||
// solo x S7...
|
||||
if (NcConfig.NcVendor == NC_VENDOR.S7NET)
|
||||
{
|
||||
Dictionary<int, bool> newForced = new Dictionary<int, bool>();
|
||||
foreach (var item in channels)
|
||||
{
|
||||
newForced.Add(item, false);
|
||||
}
|
||||
// scrivo!
|
||||
CmsError libraryError = numericalControl.PLC_W_IO_DO_Reset(newForced);
|
||||
if (libraryError.IsError())
|
||||
return libraryError;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FUNCTION_NOT_ALLOWED_ERROR;
|
||||
}
|
||||
return NO_ERROR;
|
||||
}
|
||||
/// <summary>
|
||||
/// ChannelsID: Write RESET (not forced) for AO to PLC (setForce = false)
|
||||
/// </summary>
|
||||
/// <param name="channels">Oggetto parametri da aggiornare (from HMI)</param>
|
||||
/// <returns></returns>
|
||||
public CmsError WriteReset_IO_AO_ToPLC(List<int> channels)
|
||||
{
|
||||
// solo x S7...
|
||||
if (NcConfig.NcVendor == NC_VENDOR.S7NET)
|
||||
{
|
||||
Dictionary<int, bool> newForced = new Dictionary<int, bool>();
|
||||
foreach (var item in channels)
|
||||
{
|
||||
newForced.Add(item, false);
|
||||
}
|
||||
// scrivo!
|
||||
CmsError libraryError = numericalControl.PLC_W_IO_AO_Reset(newForced);
|
||||
if (libraryError.IsError())
|
||||
return libraryError;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FUNCTION_NOT_ALLOWED_ERROR;
|
||||
}
|
||||
return NO_ERROR;
|
||||
}
|
||||
/// <summary>
|
||||
/// ChannelsID: Write RESET (not forced) for DO + AO to PLC (setForce = false)
|
||||
/// </summary>
|
||||
/// <param name="newValues">Oggetto parametri da aggiornare (from HMI)</param>
|
||||
/// <param name="nMaxParamWrite">num max parametri da scrivere singolarmente</param>
|
||||
/// <param name="delayParamWrite">delay in scrittura multi parametri singoli</param>
|
||||
/// <returns></returns>
|
||||
public CmsError WriteReset_IO_ALL_ToPLC()
|
||||
{
|
||||
// solo x S7...
|
||||
if (NcConfig.NcVendor == NC_VENDOR.S7NET)
|
||||
{
|
||||
// scrivo!
|
||||
CmsError libraryError = numericalControl.PLC_W_IO_ResetAll();
|
||||
if (libraryError.IsError())
|
||||
return libraryError;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FUNCTION_NOT_ALLOWED_ERROR;
|
||||
}
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Scrive le softkey star
|
||||
/// </summary>
|
||||
|
||||
@@ -100,6 +100,21 @@ namespace Thermo.Active.Utils
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Conversion string --> TACT_IO_TYPE
|
||||
/// </summary>
|
||||
/// <param name="strValue"></param>
|
||||
/// <returns></returns>
|
||||
public static TACT_IO_TYPE GetTActIO_Type(string strValue)
|
||||
{
|
||||
TACT_IO_TYPE answ = TACT_IO_TYPE.ND;
|
||||
try
|
||||
{
|
||||
answ = (TACT_IO_TYPE)Enum.Parse(typeof(TACT_IO_TYPE), strValue);
|
||||
}
|
||||
catch { }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Conversion string --> TACT_MBLOCK_SECTION
|
||||
/// </summary>
|
||||
/// <param name="strValue"></param>
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
using Swashbuckle.Application;
|
||||
using Swashbuckle.Swagger;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Web.Http;
|
||||
using System.Web.Http.Description;
|
||||
|
||||
@@ -33,129 +36,132 @@ namespace Thermo.Active
|
||||
//
|
||||
c.SingleApiVersion("v1", "ThermoActive");
|
||||
|
||||
// If you want the output Swagger docs to be indented properly, enable the "PrettyPrint" option.
|
||||
//
|
||||
//c.PrettyPrint();
|
||||
// If you want the output Swagger docs to be indented properly, enable the "PrettyPrint" option.
|
||||
//
|
||||
//c.PrettyPrint();
|
||||
|
||||
// If your API has multiple versions, use "MultipleApiVersions" instead of "SingleApiVersion".
|
||||
// In this case, you must provide a lambda that tells Swashbuckle which actions should be
|
||||
// included in the docs for a given API version. Like "SingleApiVersion", each call to "Version"
|
||||
// returns an "Info" builder so you can provide additional metadata per API version.
|
||||
//
|
||||
//c.MultipleApiVersions(
|
||||
// (apiDesc, targetApiVersion) => ResolveVersionSupportByRouteConstraint(apiDesc, targetApiVersion),
|
||||
// (vc) =>
|
||||
// {
|
||||
// vc.Version("v2", "Swashbuckle Dummy API V2");
|
||||
// vc.Version("v1", "Swashbuckle Dummy API V1");
|
||||
// });
|
||||
// If your API has multiple versions, use "MultipleApiVersions" instead of "SingleApiVersion".
|
||||
// In this case, you must provide a lambda that tells Swashbuckle which actions should be
|
||||
// included in the docs for a given API version. Like "SingleApiVersion", each call to "Version"
|
||||
// returns an "Info" builder so you can provide additional metadata per API version.
|
||||
//
|
||||
//c.MultipleApiVersions(
|
||||
// (apiDesc, targetApiVersion) => ResolveVersionSupportByRouteConstraint(apiDesc, targetApiVersion),
|
||||
// (vc) =>
|
||||
// {
|
||||
// vc.Version("v2", "Swashbuckle Dummy API V2");
|
||||
// vc.Version("v1", "Swashbuckle Dummy API V1");
|
||||
// });
|
||||
|
||||
// You can use "BasicAuth", "ApiKey" or "OAuth2" options to describe security schemes for the API.
|
||||
// See https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md for more details.
|
||||
// NOTE: These only define the schemes and need to be coupled with a corresponding "security" property
|
||||
// at the document or operation level to indicate which schemes are required for an operation. To do this,
|
||||
// you'll need to implement a custom IDocumentFilter and/or IOperationFilter to set these properties
|
||||
// according to your specific authorization implementation
|
||||
//
|
||||
//c.BasicAuth("basic")
|
||||
// .Description("Basic HTTP Authentication");
|
||||
//
|
||||
// NOTE: You must also configure 'EnableApiKeySupport' below in the SwaggerUI section
|
||||
//c.ApiKey("apiKey")
|
||||
// .Description("API Key Authentication")
|
||||
// .Name("apiKey")
|
||||
// .In("header");
|
||||
//
|
||||
//c.OAuth2("oauth2")
|
||||
// .Description("OAuth2 Implicit Grant")
|
||||
// .Flow("implicit")
|
||||
// .AuthorizationUrl("http://localhost:9000/token")
|
||||
// .TokenUrl("http://localhost:9000/token")
|
||||
// .Scopes(scopes =>
|
||||
// {
|
||||
// scopes.Add("read", "Read access to protected resources");
|
||||
// scopes.Add("write", "Write access to protected resources");
|
||||
// });
|
||||
// You can use "BasicAuth", "ApiKey" or "OAuth2" options to describe security schemes for the API.
|
||||
// See https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md for more details.
|
||||
// NOTE: These only define the schemes and need to be coupled with a corresponding "security" property
|
||||
// at the document or operation level to indicate which schemes are required for an operation. To do this,
|
||||
// you'll need to implement a custom IDocumentFilter and/or IOperationFilter to set these properties
|
||||
// according to your specific authorization implementation
|
||||
//
|
||||
//c.BasicAuth("basic")
|
||||
// .Description("Basic HTTP Authentication");
|
||||
//
|
||||
// NOTE: You must also configure 'EnableApiKeySupport' below in the SwaggerUI section
|
||||
//c.ApiKey("apiKey")
|
||||
// .Description("API Key Authentication")
|
||||
// .Name("apiKey")
|
||||
// .In("header");
|
||||
//
|
||||
//c.OAuth2("oauth2")
|
||||
// .Description("OAuth2 Implicit Grant")
|
||||
// .Flow("implicit")
|
||||
// .AuthorizationUrl("http://localhost:9000/token")
|
||||
// .TokenUrl("http://localhost:9000/token")
|
||||
// .Scopes(scopes =>
|
||||
// {
|
||||
// scopes.Add("read", "Read access to protected resources");
|
||||
// scopes.Add("write", "Write access to protected resources");
|
||||
// });
|
||||
|
||||
// Set this flag to omit descriptions for any actions decorated with the Obsolete attribute
|
||||
//c.IgnoreObsoleteActions();
|
||||
// Set this flag to omit descriptions for any actions decorated with the Obsolete attribute
|
||||
//c.IgnoreObsoleteActions();
|
||||
|
||||
// Each operation be assigned one or more tags which are then used by consumers for various reasons.
|
||||
// For example, the swagger-ui groups operations according to the first tag of each operation.
|
||||
// By default, this will be controller name but you can use the "GroupActionsBy" option to
|
||||
// override with any value.
|
||||
//
|
||||
//c.GroupActionsBy(apiDesc => apiDesc.HttpMethod.ToString());
|
||||
// Each operation be assigned one or more tags which are then used by consumers for various reasons.
|
||||
// For example, the swagger-ui groups operations according to the first tag of each operation.
|
||||
// By default, this will be controller name but you can use the "GroupActionsBy" option to
|
||||
// override with any value.
|
||||
//
|
||||
//c.GroupActionsBy(apiDesc => apiDesc.HttpMethod.ToString());
|
||||
|
||||
// You can also specify a custom sort order for groups (as defined by "GroupActionsBy") to dictate
|
||||
// the order in which operations are listed. For example, if the default grouping is in place
|
||||
// (controller name) and you specify a descending alphabetic sort order, then actions from a
|
||||
// ProductsController will be listed before those from a CustomersController. This is typically
|
||||
// used to customize the order of groupings in the swagger-ui.
|
||||
//
|
||||
//c.OrderActionGroupsBy(new DescendingAlphabeticComparer());
|
||||
// You can also specify a custom sort order for groups (as defined by "GroupActionsBy") to dictate
|
||||
// the order in which operations are listed. For example, if the default grouping is in place
|
||||
// (controller name) and you specify a descending alphabetic sort order, then actions from a
|
||||
// ProductsController will be listed before those from a CustomersController. This is typically
|
||||
// used to customize the order of groupings in the swagger-ui.
|
||||
//
|
||||
//c.OrderActionGroupsBy(new DescendingAlphabeticComparer());
|
||||
|
||||
// If you annotate Controllers and API Types with
|
||||
// Xml comments (http://msdn.microsoft.com/en-us/library/b2s063f7(v=vs.110).aspx), you can incorporate
|
||||
// those comments into the generated docs and UI. You can enable this by providing the path to one or
|
||||
// more Xml comment files.
|
||||
//
|
||||
//c.IncludeXmlComments(GetXmlCommentsPath());
|
||||
// If you annotate Controllers and API Types with
|
||||
// Xml comments (http://msdn.microsoft.com/en-us/library/b2s063f7(v=vs.110).aspx), you can incorporate
|
||||
// those comments into the generated docs and UI. You can enable this by providing the path to one or
|
||||
// more Xml comment files.
|
||||
//
|
||||
//c.IncludeXmlComments(GetXmlCommentsPath());
|
||||
//var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
|
||||
//var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);
|
||||
//c.IncludeXmlComments(xmlPath);
|
||||
|
||||
// Swashbuckle makes a best attempt at generating Swagger compliant JSON schemas for the various types
|
||||
// exposed in your API. However, there may be occasions when more control of the output is needed.
|
||||
// This is supported through the "MapType" and "SchemaFilter" options:
|
||||
//
|
||||
// Use the "MapType" option to override the Schema generation for a specific type.
|
||||
// It should be noted that the resulting Schema will be placed "inline" for any applicable Operations.
|
||||
// While Swagger 2.0 supports inline definitions for "all" Schema types, the swagger-ui tool does not.
|
||||
// It expects "complex" Schemas to be defined separately and referenced. For this reason, you should only
|
||||
// use the "MapType" option when the resulting Schema is a primitive or array type. If you need to alter a
|
||||
// complex Schema, use a Schema filter.
|
||||
//
|
||||
//c.MapType<ProductType>(() => new Schema { type = "integer", format = "int32" });
|
||||
// Swashbuckle makes a best attempt at generating Swagger compliant JSON schemas for the various types
|
||||
// exposed in your API. However, there may be occasions when more control of the output is needed.
|
||||
// This is supported through the "MapType" and "SchemaFilter" options:
|
||||
//
|
||||
// Use the "MapType" option to override the Schema generation for a specific type.
|
||||
// It should be noted that the resulting Schema will be placed "inline" for any applicable Operations.
|
||||
// While Swagger 2.0 supports inline definitions for "all" Schema types, the swagger-ui tool does not.
|
||||
// It expects "complex" Schemas to be defined separately and referenced. For this reason, you should only
|
||||
// use the "MapType" option when the resulting Schema is a primitive or array type. If you need to alter a
|
||||
// complex Schema, use a Schema filter.
|
||||
//
|
||||
//c.MapType<ProductType>(() => new Schema { type = "integer", format = "int32" });
|
||||
|
||||
// If you want to post-modify "complex" Schemas once they've been generated, across the board or for a
|
||||
// specific type, you can wire up one or more Schema filters.
|
||||
//
|
||||
//c.SchemaFilter<ApplySchemaVendorExtensions>();
|
||||
// If you want to post-modify "complex" Schemas once they've been generated, across the board or for a
|
||||
// specific type, you can wire up one or more Schema filters.
|
||||
//
|
||||
//c.SchemaFilter<ApplySchemaVendorExtensions>();
|
||||
|
||||
// In a Swagger 2.0 document, complex types are typically declared globally and referenced by unique
|
||||
// Schema Id. By default, Swashbuckle does NOT use the full type name in Schema Ids. In most cases, this
|
||||
// works well because it prevents the "implementation detail" of type namespaces from leaking into your
|
||||
// Swagger docs and UI. However, if you have multiple types in your API with the same class name, you'll
|
||||
// need to opt out of this behavior to avoid Schema Id conflicts.
|
||||
//
|
||||
//c.UseFullTypeNameInSchemaIds();
|
||||
// In a Swagger 2.0 document, complex types are typically declared globally and referenced by unique
|
||||
// Schema Id. By default, Swashbuckle does NOT use the full type name in Schema Ids. In most cases, this
|
||||
// works well because it prevents the "implementation detail" of type namespaces from leaking into your
|
||||
// Swagger docs and UI. However, if you have multiple types in your API with the same class name, you'll
|
||||
// need to opt out of this behavior to avoid Schema Id conflicts.
|
||||
//
|
||||
//c.UseFullTypeNameInSchemaIds();
|
||||
|
||||
// Alternatively, you can provide your own custom strategy for inferring SchemaId's for
|
||||
// describing "complex" types in your API.
|
||||
//
|
||||
//c.SchemaId(t => t.FullName.Contains('`') ? t.FullName.Substring(0, t.FullName.IndexOf('`')) : t.FullName);
|
||||
// Alternatively, you can provide your own custom strategy for inferring SchemaId's for
|
||||
// describing "complex" types in your API.
|
||||
//
|
||||
//c.SchemaId(t => t.FullName.Contains('`') ? t.FullName.Substring(0, t.FullName.IndexOf('`')) : t.FullName);
|
||||
|
||||
// Set this flag to omit schema property descriptions for any type properties decorated with the
|
||||
// Obsolete attribute
|
||||
//c.IgnoreObsoleteProperties();
|
||||
// Set this flag to omit schema property descriptions for any type properties decorated with the
|
||||
// Obsolete attribute
|
||||
//c.IgnoreObsoleteProperties();
|
||||
|
||||
// In accordance with the built in JsonSerializer, Swashbuckle will, by default, describe enums as integers.
|
||||
// You can change the serializer behavior by configuring the StringToEnumConverter globally or for a given
|
||||
// enum type. Swashbuckle will honor this change out-of-the-box. However, if you use a different
|
||||
// approach to serialize enums as strings, you can also force Swashbuckle to describe them as strings.
|
||||
//
|
||||
//c.DescribeAllEnumsAsStrings();
|
||||
// In accordance with the built in JsonSerializer, Swashbuckle will, by default, describe enums as integers.
|
||||
// You can change the serializer behavior by configuring the StringToEnumConverter globally or for a given
|
||||
// enum type. Swashbuckle will honor this change out-of-the-box. However, if you use a different
|
||||
// approach to serialize enums as strings, you can also force Swashbuckle to describe them as strings.
|
||||
//
|
||||
//c.DescribeAllEnumsAsStrings();
|
||||
|
||||
// Similar to Schema filters, Swashbuckle also supports Operation and Document filters:
|
||||
//
|
||||
// Post-modify Operation descriptions once they've been generated by wiring up one or more
|
||||
// Operation filters.
|
||||
//
|
||||
//c.OperationFilter<AddDefaultResponse>();
|
||||
//
|
||||
// If you've defined an OAuth2 flow as described above, you could use a custom filter
|
||||
// to inspect some attribute on each action and infer which (if any) OAuth2 scopes are required
|
||||
// to execute the operation
|
||||
//
|
||||
c.OperationFilter(() => new AddRequiredHeaderParameter());
|
||||
// Similar to Schema filters, Swashbuckle also supports Operation and Document filters:
|
||||
//
|
||||
// Post-modify Operation descriptions once they've been generated by wiring up one or more
|
||||
// Operation filters.
|
||||
//
|
||||
//c.OperationFilter<AddDefaultResponse>();
|
||||
//
|
||||
// If you've defined an OAuth2 flow as described above, you could use a custom filter
|
||||
// to inspect some attribute on each action and infer which (if any) OAuth2 scopes are required
|
||||
// to execute the operation
|
||||
//
|
||||
c.OperationFilter(() => new AddRequiredHeaderParameter());
|
||||
|
||||
// Post-modify the entire Swagger document by wiring up one or more Document filters.
|
||||
// This gives full control to modify the final SwaggerDocument. You should have a good understanding of
|
||||
|
||||
@@ -5,6 +5,7 @@ using Thermo.Active.Database.Controllers;
|
||||
using Thermo.Active.Model.ConfigModels;
|
||||
using Thermo.Active.Model.DTOModels;
|
||||
using Thermo.Active.Model.DTOModels.AlarmModels;
|
||||
using Thermo.Active.Model.DTOModels.ThIO;
|
||||
using Thermo.Active.Model.DTOModels.ThProd;
|
||||
using Thermo.Active.Model.DTOModels.ThRecipe;
|
||||
using static Thermo.Active.Config.ServerConfig;
|
||||
@@ -124,6 +125,27 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
return Ok(recipeConfig);
|
||||
}
|
||||
|
||||
[Route("configIO"), HttpGet]
|
||||
public IHttpActionResult GetIOConfig()
|
||||
{
|
||||
// restituisce la configurazione come item dei banchi DI/DO/AI/AO
|
||||
DTOChannelsSetup configIO = new DTOChannelsSetup();
|
||||
// leggo i 4 tipi di oggetti e popolo
|
||||
List<string> listDI = IOConfig.Where(x => x.Category == Model.Constants.TACT_IO_TYPE.DI).GroupBy(x => x.Bank).Select(x => x.Key).ToList();
|
||||
List<string> listDO = IOConfig.Where(x => x.Category == Model.Constants.TACT_IO_TYPE.DO).GroupBy(x => x.Bank).Select(x => x.Key).ToList();
|
||||
List<string> listAI = IOConfig.Where(x => x.Category == Model.Constants.TACT_IO_TYPE.AI).GroupBy(x => x.Bank).Select(x => x.Key).ToList();
|
||||
List<string> listAO = IOConfig.Where(x => x.Category == Model.Constants.TACT_IO_TYPE.AO).GroupBy(x => x.Bank).Select(x => x.Key).ToList();
|
||||
|
||||
// assegno!
|
||||
configIO.DI = listDI;
|
||||
configIO.DO = listDO;
|
||||
configIO.AI = listAI;
|
||||
configIO.AO = listAO;
|
||||
|
||||
// restituisco
|
||||
return Ok(configIO);
|
||||
}
|
||||
|
||||
[Route("thermoProd"), HttpGet]
|
||||
public IHttpActionResult GetThermoProdConfig()
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
public class ThermocameraController : ApiController
|
||||
{
|
||||
[Route("show"), HttpPost]
|
||||
public IHttpActionResult GetDataPaginated()
|
||||
public IHttpActionResult showCamera()
|
||||
{
|
||||
String ThermoCameraXpos = AdditionalParametersConfig["ThermoCameraXpos"];
|
||||
String ThermoCameraYpos = AdditionalParametersConfig["ThermoCameraYpos"];
|
||||
|
||||
@@ -0,0 +1,278 @@
|
||||
using CMS_CORE_Library.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Security.Claims;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
using System.Web.Http.Description;
|
||||
using System.Windows.Media.Animation;
|
||||
using TeamDev.SDK.MVVM;
|
||||
using Thermo.Active.Config;
|
||||
using Thermo.Active.Database.Controllers;
|
||||
using Thermo.Active.Model.DTOModels;
|
||||
using Thermo.Active.Model.DTOModels.ThIO;
|
||||
using Thermo.Active.Model.DTOModels.ThRecipe;
|
||||
using Thermo.Active.Model.DTOModels.ThWarmers;
|
||||
using Thermo.Active.NC;
|
||||
using Thermo.Active.Utils;
|
||||
using static CMS_CORE_Library.Models.DataStructures;
|
||||
using static Thermo.Active.Config.ServerConfig;
|
||||
using static Thermo.Active.Model.Constants;
|
||||
|
||||
namespace Thermo.Active.Controllers.WebApi
|
||||
{
|
||||
[RoutePrefix("api/underthehood")]
|
||||
public class UnderTheHoodController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
/// Oggetto adapter condiviso da WebAPI
|
||||
/// </summary>
|
||||
protected static NcAdapter ncAdapter = new NcAdapter();
|
||||
|
||||
[ResponseType(typeof(DTOCycleLog))]
|
||||
[Route("cyclelog"), HttpGet]
|
||||
public IHttpActionResult GetCycleLog()
|
||||
{
|
||||
// // Try connection
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
DTOCycleLog currCycleLog = new DTOCycleLog();
|
||||
|
||||
if (libraryError.IsError())
|
||||
{
|
||||
ThermoActiveLogger.LogError($"ncAdapter Not connected! | GetCycleLog | {libraryError.exception}");
|
||||
}
|
||||
|
||||
libraryError = ncAdapter.GetCycleLog(out Dictionary<DateTime, int> cycleLog);
|
||||
foreach (var item in cycleLog)
|
||||
{
|
||||
currCycleLog.events.Add(new CycleEvent() { dtEvent=item.Key, code=item.Value });
|
||||
}
|
||||
|
||||
if (libraryError.IsError())
|
||||
{
|
||||
ThermoActiveLogger.LogError($"GetCycleLog error | {libraryError.exception}");
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
}
|
||||
|
||||
return Ok(currCycleLog);
|
||||
}
|
||||
|
||||
[ResponseType(typeof(DTOChannelsIO))]
|
||||
[Route("channels_io"), HttpGet]
|
||||
public IHttpActionResult GetChannelsIO()
|
||||
{
|
||||
// Try connection
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
if (libraryError.IsError())
|
||||
{
|
||||
ThermoActiveLogger.LogError($"NC Not connected! | GetChannelsIO | {libraryError.exception}");
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
}
|
||||
|
||||
// leggo dati gauges
|
||||
libraryError = ncAdapter.ReadFullIO(out DTOChannelsIO ChannelsIO);
|
||||
if (libraryError.IsError())
|
||||
{
|
||||
ThermoActiveLogger.LogError($"GetChannelsIO error | {libraryError.exception}");
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
}
|
||||
|
||||
// ritorno!
|
||||
return Ok(ChannelsIO);
|
||||
}
|
||||
|
||||
[ResponseType(typeof(DTOChannelsIOVal))]
|
||||
[Route("channels_io_val"), HttpGet]
|
||||
public IHttpActionResult GetChannelsIoVal()
|
||||
{
|
||||
// Try connection
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
if (libraryError.IsError())
|
||||
{
|
||||
ThermoActiveLogger.LogError($"NC Not connected! | GetChannelsIoVal | {libraryError.exception}");
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
}
|
||||
|
||||
// leggo dati gauges
|
||||
libraryError = ncAdapter.ReadValIO(out DTOChannelsIOVal ChannelsIOVal);
|
||||
if (libraryError.IsError())
|
||||
{
|
||||
ThermoActiveLogger.LogError($"GetChannelsIoVal error | {libraryError.exception}");
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
}
|
||||
|
||||
// ritorno!
|
||||
return Ok(ChannelsIOVal);
|
||||
}
|
||||
|
||||
[Route("io_force_ch_do"), HttpPut]
|
||||
[WebApiAuthorize(FunctionAccess = FUNCTIONALITY_NAMES.MAINTENANCE, Action = ACTIONS.WRITE)]
|
||||
public IHttpActionResult ForceChDO(List<IoItemDigi> updVal)
|
||||
{
|
||||
if (updVal != null)
|
||||
{
|
||||
// Try connection
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
if (libraryError.IsError())
|
||||
{
|
||||
ThermoActiveLogger.LogError($"NC Not connected! | ForceChDO | {libraryError.exception}");
|
||||
return InternalServerError();
|
||||
}
|
||||
|
||||
if (updVal.Count > 0)
|
||||
{
|
||||
// converto
|
||||
Dictionary<int, bool> parametersList = new Dictionary<int, bool>();
|
||||
foreach (var item in updVal)
|
||||
{
|
||||
parametersList.Add(item.Id, item.value);
|
||||
}
|
||||
|
||||
// scrivo sul PLC con i parametri specificati
|
||||
ncAdapter.Write_IO_DO_ToPLC(parametersList);
|
||||
}
|
||||
|
||||
// ritorno solo fatto!
|
||||
return Ok();
|
||||
}
|
||||
else
|
||||
{
|
||||
ThermoActiveLogger.LogError($"ForceChDO updatedVal null | Empty Parameters");
|
||||
return BadRequest();
|
||||
}
|
||||
}
|
||||
[Route("io_force_ch_ao"), HttpPut]
|
||||
[WebApiAuthorize(FunctionAccess = FUNCTIONALITY_NAMES.MAINTENANCE, Action = ACTIONS.WRITE)]
|
||||
public IHttpActionResult ForceChAO(List<IoItemAnal> updVal)
|
||||
{
|
||||
if (updVal != null)
|
||||
{
|
||||
// Try connection
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
if (libraryError.IsError())
|
||||
{
|
||||
ThermoActiveLogger.LogError($"NC Not connected! | ForceChAO | {libraryError.exception}");
|
||||
return InternalServerError();
|
||||
}
|
||||
|
||||
if (updVal.Count > 0)
|
||||
{
|
||||
Dictionary<int, int> parametersList = new Dictionary<int, int>();
|
||||
foreach (var item in updVal)
|
||||
{
|
||||
parametersList.Add(item.Id, item.value);
|
||||
}
|
||||
|
||||
// scrivo sul PLC con i parametri specificati
|
||||
ncAdapter.Write_IO_AO_ToPLC(parametersList);
|
||||
}
|
||||
|
||||
// ritorno solo fatto!
|
||||
return Ok();
|
||||
}
|
||||
else
|
||||
{
|
||||
ThermoActiveLogger.LogError($"ForceChAO parametersList null | Empty Parameters");
|
||||
return BadRequest();
|
||||
}
|
||||
}
|
||||
[Route("io_reset_ch_do"), HttpPut]
|
||||
[WebApiAuthorize(FunctionAccess = FUNCTIONALITY_NAMES.MAINTENANCE, Action = ACTIONS.WRITE)]
|
||||
public IHttpActionResult ResetChDO(List<int> parametersList)
|
||||
{
|
||||
if (parametersList != null)
|
||||
{
|
||||
// Try connection
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
if (libraryError.IsError())
|
||||
{
|
||||
ThermoActiveLogger.LogError($"NC Not connected! | ResetChDO | {libraryError.exception}");
|
||||
return InternalServerError();
|
||||
}
|
||||
|
||||
if (parametersList.Count > 0)
|
||||
{
|
||||
// scrivo sul PLC con i parametri specificati x ritardo/raggruppamento
|
||||
ncAdapter.WriteReset_IO_DO_ToPLC(parametersList);
|
||||
}
|
||||
|
||||
// ritorno solo fatto!
|
||||
return Ok();
|
||||
}
|
||||
else
|
||||
{
|
||||
ThermoActiveLogger.LogError($"ResetChDO parametersList null | Empty Parameters");
|
||||
return BadRequest();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Reset "force bit" on selected channels
|
||||
/// </summary>
|
||||
/// <param name="parametersList">List of channels index, zero based</param>
|
||||
/// <returns></returns>
|
||||
[Route("io_reset_ch_ao"), HttpPut]
|
||||
[WebApiAuthorize(FunctionAccess = FUNCTIONALITY_NAMES.MAINTENANCE, Action = ACTIONS.WRITE)]
|
||||
public IHttpActionResult ResetChAO(List<int> parametersList)
|
||||
{
|
||||
if (parametersList != null)
|
||||
{
|
||||
// Try connection
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
if (libraryError.IsError())
|
||||
{
|
||||
ThermoActiveLogger.LogError($"NC Not connected! | ResetChAO | {libraryError.exception}");
|
||||
return InternalServerError();
|
||||
}
|
||||
|
||||
if (parametersList.Count > 0)
|
||||
{
|
||||
// scrivo sul PLC con i parametri specificati x ritardo/raggruppamento
|
||||
ncAdapter.WriteReset_IO_AO_ToPLC(parametersList);
|
||||
}
|
||||
|
||||
// ritorno solo fatto!
|
||||
return Ok();
|
||||
}
|
||||
else
|
||||
{
|
||||
ThermoActiveLogger.LogError($"ResetChAO parametersList null | Empty Parameters");
|
||||
return BadRequest();
|
||||
}
|
||||
}
|
||||
[Route("io_reset_all_ch"), HttpPut]
|
||||
[WebApiAuthorize(FunctionAccess = FUNCTIONALITY_NAMES.MAINTENANCE, Action = ACTIONS.WRITE)]
|
||||
public IHttpActionResult ResetAllCh()
|
||||
{
|
||||
// Try connection
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
if (libraryError.IsError())
|
||||
{
|
||||
ThermoActiveLogger.LogError($"NC Not connected! | ResetAllCh | {libraryError.exception}");
|
||||
return InternalServerError();
|
||||
}
|
||||
|
||||
// scrivo sul PLC con i parametri specificati x ritardo/raggruppamento
|
||||
ncAdapter.WriteReset_IO_ALL_ToPLC();//parametersList);
|
||||
|
||||
// ritorno solo fatto!
|
||||
return Ok();
|
||||
}
|
||||
|
||||
[Route("io_sample_fast"), HttpPut]
|
||||
[WebApiAuthorize(FunctionAccess = FUNCTIONALITY_NAMES.MAINTENANCE, Action = ACTIONS.WRITE)]
|
||||
public IHttpActionResult SetFastSample(bool value)
|
||||
{
|
||||
// imposta (su redis) campionamento RAPIDO/lento x IO...
|
||||
RedisController.FastIoSample = value;
|
||||
|
||||
// ritorno solo fatto!
|
||||
return Ok();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -64,6 +64,10 @@ namespace Thermo.Active.Listeners
|
||||
{
|
||||
SignalRListener.SendThermoAxisInfoData(a);
|
||||
}));
|
||||
infos.Add(MessageServices.Current.Subscribe(SEND_CHANNELS_IO_DATA, (a, b) =>
|
||||
{
|
||||
SignalRListener.SendThermoChannelsIoData(a);
|
||||
}));
|
||||
infos.Add(MessageServices.Current.Subscribe(SEND_ACTIVE_PROGRAM_DATA, (a, b) =>
|
||||
{
|
||||
SignalRListener.SendActiveProgramData(a);
|
||||
|
||||
@@ -13,6 +13,7 @@ using Thermo.Active.Model.DTOModels;
|
||||
using Thermo.Active.Model.DTOModels.AlarmModels;
|
||||
using Thermo.Active.Model.DTOModels.Scada;
|
||||
using Thermo.Active.Model.DTOModels.ThAxes;
|
||||
using Thermo.Active.Model.DTOModels.ThIO;
|
||||
using Thermo.Active.Model.DTOModels.ThModules;
|
||||
using Thermo.Active.Model.DTOModels.ThProd;
|
||||
using Thermo.Active.Model.DTOModels.ThRecipe;
|
||||
@@ -59,7 +60,7 @@ namespace Thermo.Active.Listeners.SignalR
|
||||
{
|
||||
RedisController.WriteCurrentMachineEmergencyPath(LastPowerOnData.PrePowerOn.EmergencyButtons.Active);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -456,8 +457,8 @@ namespace Thermo.Active.Listeners.SignalR
|
||||
LastProdPanelData = currProdPanel;
|
||||
|
||||
var context = GlobalHost.ConnectionManager.GetHubContext<NcHub>();
|
||||
context.Clients.Group("ncData").prodPanelData(currProdPanel);
|
||||
|
||||
context.Clients.Group("ncData").prodPanelData(currProdPanel);
|
||||
|
||||
if (Config.ServerConfig.ServerStartupConfig.CmsConnectReady)
|
||||
{
|
||||
if (newPiece)
|
||||
@@ -508,8 +509,8 @@ namespace Thermo.Active.Listeners.SignalR
|
||||
RedisController.WriteCurrentMachineStatus(CMSConnectConstants.ConvertThermoToConnectStatus(currProdCycle.Status));
|
||||
RedisController.WriteCurrentMachinePowerPath(CMSConnectConstants.ConvertThermoToConnectPower(currProdCycle.Status));
|
||||
|
||||
RedisController.WriteCurrentProcessStatus(1,CMSConnectConstants.ConvertThermoToConnectProcessStatus(currProdCycle.Status));
|
||||
RedisController.WriteCurrentProcessMode(1,CMSConnectConstants.ConvertThermoToConnectProcessMode(currProdCycle.Mode));
|
||||
RedisController.WriteCurrentProcessStatus(1, CMSConnectConstants.ConvertThermoToConnectProcessStatus(currProdCycle.Status));
|
||||
RedisController.WriteCurrentProcessMode(1, CMSConnectConstants.ConvertThermoToConnectProcessMode(currProdCycle.Mode));
|
||||
|
||||
|
||||
}
|
||||
@@ -551,6 +552,65 @@ namespace Thermo.Active.Listeners.SignalR
|
||||
}
|
||||
}
|
||||
|
||||
public static void SendThermoChannelsIoData(object channelsIoData)
|
||||
{
|
||||
DTOChannelsIOVal currChannelsIoData = channelsIoData as DTOChannelsIOVal;
|
||||
DTOChannelsIOVal diffChannelsData = new DTOChannelsIOVal();
|
||||
|
||||
// processing differenze DI
|
||||
foreach (var item in currChannelsIoData.DI)
|
||||
{
|
||||
// recupero
|
||||
var element = LastChannelsIoData.DI.Find(x => x.Id == item.Id);
|
||||
if ((element == null) || (!item.Equals(element)))
|
||||
{
|
||||
diffChannelsData.DI.Add(item);
|
||||
}
|
||||
}
|
||||
// processing differenze DO
|
||||
foreach (var item in currChannelsIoData.DO)
|
||||
{
|
||||
// recupero
|
||||
var element = LastChannelsIoData.DO.Find(x => x.Id == item.Id);
|
||||
if ((element == null) || (!item.Equals(element)))
|
||||
{
|
||||
diffChannelsData.DO.Add(item);
|
||||
}
|
||||
}
|
||||
// processing differenze AI
|
||||
foreach (var item in currChannelsIoData.AI)
|
||||
{
|
||||
// recupero
|
||||
var element = LastChannelsIoData.AI.Find(x => x.Id == item.Id);
|
||||
if ((element == null) || (!item.Value.Equals(element.Value)))
|
||||
{
|
||||
diffChannelsData.AI.Add(item);
|
||||
}
|
||||
}
|
||||
// processing differenze AO
|
||||
foreach (var item in currChannelsIoData.AO)
|
||||
{
|
||||
// recupero
|
||||
var element = LastChannelsIoData.AO.Find(x => x.Id == item.Id);
|
||||
if ((element == null) || (!item.Value.Equals(element.Value)))
|
||||
{
|
||||
diffChannelsData.AO.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
// se ho differenze invio!
|
||||
if (diffChannelsData.DI.Count + diffChannelsData.DO.Count + diffChannelsData.AI.Count + diffChannelsData.AO.Count > 0)
|
||||
{
|
||||
// salvo update CLONANDO
|
||||
LastChannelsIoData.DI = currChannelsIoData.DI;
|
||||
LastChannelsIoData.DO = currChannelsIoData.DO;
|
||||
LastChannelsIoData.AI = currChannelsIoData.AI;
|
||||
LastChannelsIoData.AO = currChannelsIoData.AO;
|
||||
var context = GlobalHost.ConnectionManager.GetHubContext<NcHub>();
|
||||
context.Clients.Group("ncData").channelsIoVal(diffChannelsData);
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetGatewayRebootStatus(object status)
|
||||
{
|
||||
string msg = status.ToString();
|
||||
@@ -602,6 +662,8 @@ namespace Thermo.Active.Listeners.SignalR
|
||||
group.headsData(LastHeadsData);
|
||||
// Send Axis Info data
|
||||
group.axisInfo(LastAxisInfoData);
|
||||
// Send Axis Info data
|
||||
group.SendThermoChannelsIoData(LastChannelsIoData);
|
||||
// Send active program data
|
||||
group.activeProgramData(LastProgramData);
|
||||
// Send magazine is active data
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
using CMS_CORE_Library.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Thermo.Active.Model.DTOModels;
|
||||
using Thermo.Active.Model.DTOModels.AlarmModels;
|
||||
using Thermo.Active.Model.DTOModels.Scada;
|
||||
using Thermo.Active.Model.DTOModels.ThAxes;
|
||||
using Thermo.Active.Model.DTOModels.ThIO;
|
||||
using Thermo.Active.Model.DTOModels.ThModules;
|
||||
using Thermo.Active.Model.DTOModels.ThProd;
|
||||
using Thermo.Active.Model.DTOModels.ThRecipe;
|
||||
@@ -46,6 +48,8 @@ namespace Thermo.Active.Listeners
|
||||
public static DTOThermoPanelProd LastProdPanelData = new DTOThermoPanelProd();
|
||||
// Oggetti per assi THERMO
|
||||
public static Dictionary<int, DTOAxisInfoModel> LastAxisInfoData = new Dictionary<int, DTOAxisInfoModel>();
|
||||
// Oggetti x Valori Channels IO
|
||||
public static DTOChannelsIOVal LastChannelsIoData = new DTOChannelsIOVal();
|
||||
|
||||
public static bool LastIsNcConnected = false;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("CMS S.P.A.")]
|
||||
[assembly: AssemblyProduct("Thermo Active Server")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2020")]
|
||||
[assembly: AssemblyCopyright("Copyright � 2020")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@@ -30,4 +30,4 @@ using System.Runtime.InteropServices;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("0.110.146")]
|
||||
[assembly: AssemblyVersion("1.1.158")]
|
||||
|
||||
@@ -68,6 +68,9 @@ namespace Thermo.Active.Provider
|
||||
|
||||
await base.GrantResourceOwnerCredentials(context);
|
||||
|
||||
// in attesa di sistemare l'area di memoria della tastiera fisica esce...
|
||||
return;
|
||||
|
||||
// Try connection
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
|
||||
|
||||
@@ -5,21 +5,21 @@
|
||||
; Inno Setup Compiler version 5.6.0
|
||||
;==================================================
|
||||
|
||||
#define AppName "CMS Active"
|
||||
#define SCMAppName "Maestro Active cnc"
|
||||
#define FolderName "Active"
|
||||
#define SCMIcoName "SCM.ico"
|
||||
|
||||
#define MyAppVersion "1.4.1"
|
||||
#define AppName "CMS Active"
|
||||
#define SCMAppName "Maestro Active cnc"
|
||||
#define FolderName "Active"
|
||||
#define SCMIcoName "SCM.ico"
|
||||
|
||||
#define MyAppVersion "1.5.5"
|
||||
#define MyAppPublisher "CMS"
|
||||
#define MyAppURL "https://www.scmgroup.com/it/cms"
|
||||
#define MyAppExeName "Active.exe"
|
||||
|
||||
#define ProjectPath "C:\Workspace\CMS_STEP\Step\"
|
||||
#define MySourcePath "C:\Workspace\CMS_STEP\Step\bin"
|
||||
#define WwwRootPath "C:\Workspace\CMS_STEP\Step\wwwroot"
|
||||
#define IconsPath "C:\Workspace\CMS_STEP\Step\Desktop_Link\"
|
||||
#define InvDialPath "C:\Workspace\CMS_INVERTER_DIAGNOSIS\CMSInverterDiagnosis\bin\Release\"
|
||||
#define ProjectPath "C:\Users\ext_lmascherone\Documents\cms_step\Step\"
|
||||
#define MySourcePath "C:\Users\ext_lmascherone\Documents\cms_step\Step\bin"
|
||||
#define WwwRootPath "C:\Users\ext_lmascherone\Documents\cms_step\Step\wwwroot"
|
||||
#define IconsPath "C:\Users\ext_lmascherone\Documents\cms_step\Step\Desktop_Link\"
|
||||
#define InvDialPath "C:\Users\ext_lmascherone\Documents\cms_inverterdiagnosis\CMSInverterDiagnosis\bin\Release\"
|
||||
|
||||
#define SinumerikPath1 "{pf}\Siemens\Sinumerik\HMIsl\siemens\sinumerik\hmi\autostart\"
|
||||
#define SinumerikPath2 "C:\Siemens\Sinumerik\HMIsl\siemens\sinumerik\hmi\autostart\"
|
||||
@@ -28,16 +28,16 @@
|
||||
#define SinumerikAppExeName "run_hmi.exe"
|
||||
; Support installers
|
||||
; .Net
|
||||
#define DotNetInstallerPath "C:\Users\marantalu\Desktop\Per installazioni Active\"
|
||||
#define DotNetInstallerPath "C:\Users\ext_lmascherone\Documents\Per installazioni Active\"
|
||||
#define DotNetInstallerName "NDP462-KB3151800-x86-x64-AllOS-ENU.exe"
|
||||
; MariaDb
|
||||
#define MariaDBInstallerPath "C:\Users\marantalu\Desktop\Per installazioni Active\"
|
||||
#define MariaDBInstallerName "mariadb-10.3.13-winx64.msi"
|
||||
#define MariaDBInstallerPath "C:\Users\ext_lmascherone\Documents\Per installazioni Active\"
|
||||
#define MariaDBInstallerName "mariadb-10.3.13-winx64.msi"
|
||||
|
||||
|
||||
[Setup]
|
||||
AppName={#AppName}
|
||||
AppVersion={#MyAppVersion}
|
||||
AppVersion={#MyAppVersion}
|
||||
AppVerName={#AppName} {#MyAppVersion}
|
||||
AppPublisher={#MyAppPublisher}
|
||||
AppPublisherURL={#MyAppURL}
|
||||
@@ -66,7 +66,7 @@ Name: Fanuc; Description: {#AppName} {cm:ForFanucNC}; Types: custom; Flags: excl
|
||||
Name: Osai; Description: {#AppName} {cm:ForOsaiNC}; Types: custom; Flags: exclusive
|
||||
Name: Siemens; Description: {#AppName} {cm:ForSiemensNC}; Types: custom; Flags: exclusive
|
||||
|
||||
[Languages]
|
||||
[Languages]
|
||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||
Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl"
|
||||
|
||||
@@ -81,7 +81,7 @@ italian.CreateStartupIcon = Crea il collegamento in &Esecuzione Automatica
|
||||
italian.CreateSinumerikIcons = Crea le icone di &Sinumerik HMI
|
||||
italian.ForDemoNC=per CN DEMO
|
||||
italian.ForFanucNC=per CN FANUC
|
||||
italian.ForOsaiNC=per CN OSAI
|
||||
italian.ForOsaiNC=per CN OSAI
|
||||
italian.ForSiemensNC=per CN SIEMENS
|
||||
|
||||
english.InstallDotNet = Install .Net 4.6.2
|
||||
@@ -89,7 +89,7 @@ english.InstallMariaDB = Install MariaDB
|
||||
|
||||
italian.InstallDotNet = Installa .Net 4.6.2
|
||||
italian.InstallMariaDB = Installa MariaDB
|
||||
|
||||
|
||||
italian.InstallingMariaDB = Installando MariaDB
|
||||
english.InstallingMariaDB = Installing MariaDB
|
||||
|
||||
@@ -100,10 +100,10 @@ english.InstallingDotNet = Installing .Net
|
||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkablealone; Components: Fanuc Osai Siemens
|
||||
Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: checkablealone; Components: Fanuc Osai Siemens
|
||||
Name: startupicon; Description: {cm:CreateStartupIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: checkablealone; Components: Fanuc Osai Siemens
|
||||
Name: sinumerikicons; Description: {cm:CreateSinumerikIcons}; GroupDescription: {cm:AdditionalIcons}; Flags: checkablealone; Components: Siemens
|
||||
Name: sinumerikicons; Description: {cm:CreateSinumerikIcons}; GroupDescription: {cm:AdditionalIcons}; Flags: checkablealone; Components: Siemens
|
||||
|
||||
[Files]
|
||||
Source: "{#MySourcePath}\Active.exe"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "{#MySourcePath}\Thermo.Active.exe"; DestDir: "{app}"; Flags: ignoreversion
|
||||
|
||||
; Path to exe resources (dll, xml, config)
|
||||
Source: "{#MySourcePath}\*.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: Fanuc Osai Siemens
|
||||
@@ -134,7 +134,7 @@ Source: {#IconsPath}{#SCMIcoName}; DestDir: "{app}"; Flags: ignoreversion; Compo
|
||||
Source: {#DotNetInstallerPath}\{#DotNetInstallerName}; DestDir: {tmp}; Flags: deleteafterinstall;
|
||||
;Check: FrameworkIsNotInstalled
|
||||
Source: {#MariaDBInstallerPath}\{#MariaDBInstallerName}; DestDir: {tmp}; Flags: deleteafterinstall;
|
||||
|
||||
|
||||
; --- UTILS
|
||||
; Fanuc scripts - TEAMVIEWER
|
||||
Source: "{#ProjectPath}\Utility\*"; DestDir: "{app}\..\Utility\"; Flags: recursesubdirs ignoreversion; Components: Fanuc Osai Siemens
|
||||
@@ -261,7 +261,7 @@ var
|
||||
begin
|
||||
if DirExists(ExpandConstant('C:\CMS\Active\Active\Config')) then begin
|
||||
// Ask the user a Yes/No question, defaulting to No
|
||||
if not (MsgBox('La cartella "Config" esiste già. Vuoi sovrascriverla?', mbConfirmation, MB_YESNO) = IDYES) then
|
||||
if not (MsgBox('La cartella "Config" esiste già. Vuoi sovrascriverla?', mbConfirmation, MB_YESNO) = IDYES) then
|
||||
begin
|
||||
// user clicked NO
|
||||
Result:= false;
|
||||
@@ -296,7 +296,7 @@ var
|
||||
if CustomInputOptionCMSorSCM.Values[0]
|
||||
then IsSCM := false
|
||||
else
|
||||
IsSCM := true
|
||||
IsSCM := true;
|
||||
|
||||
if CurStep = ssPostInstall then
|
||||
begin
|
||||
|
||||
@@ -0,0 +1,218 @@
|
||||
;================================= 01.02.21 =====
|
||||
; CMS S.p.A. - UX-HMI Office
|
||||
;
|
||||
; Setup for Active
|
||||
; Inno Setup Compiler version 5.6.0
|
||||
;==================================================
|
||||
|
||||
#define AppName "CMS Active"
|
||||
#define FolderName "Thermo.Active"
|
||||
|
||||
#define MyAppPublisher "CMS"
|
||||
#define MyAppURL "https://www.scmgroup.com/it/cms"
|
||||
#define MyAppExeName "Thermo.Active.exe"
|
||||
|
||||
#define ProjectPath ""
|
||||
#define MySourcePath ProjectPath + "bin"
|
||||
#define WwwRootPath ProjectPath + "wwwroot"
|
||||
#define IconsPath ProjectPath + "Desktop_Link"
|
||||
#define ToolInstallerPath "SetupTools"
|
||||
#define MyAppVersion GetFileVersion( MySourcePath + '\Thermo.Active.exe')
|
||||
#define OutBaseDir "C:\CMS\AutoBuild"
|
||||
#define OutDir OutBaseDir + "\" + MyAppVersion
|
||||
|
||||
|
||||
; Support installers
|
||||
; .Net
|
||||
; MariaDb
|
||||
; cms_inv_diag
|
||||
#define DotNetInstallerName "NDP462-KB3151800-x86-x64-AllOS-ENU.exe"
|
||||
#define MariaDBInstallerName "mariadb-10.3.13-winx64.msi"
|
||||
#define CmsInvDiagPath "cms_inv_diag"
|
||||
|
||||
|
||||
[Setup]
|
||||
AppName={#AppName}
|
||||
AppVersion={#MyAppVersion}
|
||||
AppVerName={#AppName} {#MyAppVersion}
|
||||
AppPublisher={#MyAppPublisher}
|
||||
AppPublisherURL={#MyAppURL}
|
||||
AppSupportURL={#MyAppURL}
|
||||
AppUpdatesURL={#MyAppURL}
|
||||
DisableDirPage=true
|
||||
DisableProgramGroupPage=yes
|
||||
Compression=lzma
|
||||
SolidCompression=true
|
||||
OutputDir={#OutDir}
|
||||
UsePreviousAppDir=no
|
||||
OutputBaseFilename=ActiveSetup_{#MyAppVersion}
|
||||
|
||||
VersionInfoVersion={#MyAppVersion}
|
||||
VersionInfoCompany={#MyAppPublisher}
|
||||
VersionInfoTextVersion={#MyAppVersion}
|
||||
VersionInfoCopyright={#MyAppPublisher}
|
||||
DefaultDirName = C:\CMS\{#FolderName}\{#FolderName}
|
||||
WindowVisible=false
|
||||
PrivilegesRequired=admin
|
||||
|
||||
|
||||
; Setup installation type
|
||||
[Types]
|
||||
Name: custom; Description: CMS installation; Flags: iscustom
|
||||
|
||||
; Set NC types, this types are used to configure server config file
|
||||
[Components]
|
||||
|
||||
[Languages]
|
||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||
Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl"
|
||||
|
||||
[CustomMessages]
|
||||
english.CreateStartupIcon=Create Startup &icon
|
||||
italian.CreateStartupIcon = Crea il collegamento in &Esecuzione Automatica
|
||||
|
||||
english.InstallDotNet = Install .Net 4.6.2
|
||||
english.InstallMariaDB = Install MariaDB
|
||||
|
||||
italian.InstallDotNet = Installa .Net 4.6.2
|
||||
italian.InstallMariaDB = Installa MariaDB
|
||||
|
||||
italian.InstallingMariaDB = Installando MariaDB
|
||||
english.InstallingMariaDB = Installing MariaDB
|
||||
|
||||
italian.InstallingDotNet = Installando .Net
|
||||
english.InstallingDotNet = Installing .Net
|
||||
|
||||
[Tasks]
|
||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkablealone;
|
||||
Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: checkablealone;
|
||||
Name: startupicon; Description: {cm:CreateStartupIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: checkablealone;
|
||||
Name: sinumerikicons; Description: {cm:CreateSinumerikIcons}; GroupDescription: {cm:AdditionalIcons}; Flags: checkablealone;
|
||||
|
||||
[Files]
|
||||
Source: "{#MySourcePath}\Thermo.Active.exe"; DestDir: "{app}"; Flags: ignoreversion
|
||||
|
||||
; Path to exe resources (dll, xml, config)
|
||||
Source: "{#MySourcePath}\*.config"; DestDir: "{app}"; Flags: ignoreversion;
|
||||
; Configuration files
|
||||
Source: "{#MySourcePath}\Config\*.xml"; DestDir: "{app}\Config\"; Flags: ignoreversion;
|
||||
; Languages
|
||||
Source: "{#MySourcePath}\languages\*.*"; DestDir: "{app}\languages\"; Flags: ignoreversion;
|
||||
; Libs
|
||||
Source: "{#MySourcePath}\lib\*.*"; DestDir: "{app}\lib\"; Flags: ignoreversion;
|
||||
; Client copy
|
||||
Source: "{#MySourcePath}\Client\*.*"; DestDir: "{app}\Client\"; Flags: recursesubdirs ignoreversion; AfterInstall: DeleteLocalStorage
|
||||
; WWWRoot Files
|
||||
Source: "{#WwwRootPath}\favicon.ico"; DestDir: "{app}\view\"; Flags: ignoreversion;
|
||||
Source: "{#WwwRootPath}\index.html"; DestDir: "{app}\view\"; Flags: ignoreversion;
|
||||
; WWWRoot Directories
|
||||
Source: "{#WwwRootPath}\dist\*"; DestDir: "{app}\view\dist\"; Flags: recursesubdirs ignoreversion;
|
||||
Source: "{#WwwRootPath}\libs\*"; DestDir: "{app}\view\libs\"; Flags: recursesubdirs ignoreversion;
|
||||
Source: "{#WwwRootPath}\assets\*"; DestDir: "{app}\view\assets\"; Flags: recursesubdirs ignoreversion;
|
||||
Source: "{#WwwRootPath}\scripts\*"; DestDir: "{app}\view\scripts\"; Flags: recursesubdirs ignoreversion;
|
||||
|
||||
|
||||
;.Net Installer
|
||||
Source: {#ToolInstallerPath}\{#DotNetInstallerName}; DestDir: {tmp}; Flags: deleteafterinstall;
|
||||
;Check: FrameworkIsNotInstalled
|
||||
Source: {#ToolInstallerPath}\{#MariaDBInstallerName}; DestDir: {tmp}; Flags: deleteafterinstall;
|
||||
|
||||
; --- UTILS
|
||||
; Fanuc scripts - TEAMVIEWER
|
||||
Source: "{#ProjectPath}Utility\*"; DestDir: "{app}\..\Utility\"; Flags: recursesubdirs ignoreversion;
|
||||
|
||||
|
||||
[Icons]
|
||||
; Default icons
|
||||
Name: {group}\{#AppName}; Filename: {app}\{#MyAppExeName};
|
||||
Name: {userdesktop}\{#AppName}; Filename: {app}\{#MyAppExeName}; Tasks: desktopicon;
|
||||
Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\{#AppName}; Filename: {app}\{#MyAppExeName}; Tasks: quicklaunchicon;
|
||||
Name: {userstartup}\{#AppName}; Filename: {app}\{#MyAppExeName}; Tasks: startupicon;
|
||||
|
||||
[Run]
|
||||
; Install .net
|
||||
Filename: {tmp}\{#DotNetInstallerName}; Description: {cm:InstallDotNet}; WorkingDir:{tmp}; StatusMsg: {cm:InstallingDotNet}; Check: NetFrameworkNeedInstall
|
||||
;Check: NetFrameworkIsMissing
|
||||
; Install MariaDb
|
||||
Filename: "msiexec.exe"; Description: {cm:InstallDotNet}; WorkingDir:{tmp}; StatusMsg: {cm:InstallingMariaDB}; Parameters: "/i {tmp}\{#MariaDBInstallerName}"; Check: CheckHeidiSQLNeedInstall;
|
||||
|
||||
/// MinVersion: 10
|
||||
[Registry]
|
||||
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "Active"; ValueData: "C:\CMS\ACTIVE\Active\Active.exe"; MinVersion: 10;
|
||||
|
||||
[Code]
|
||||
///////////// SiemensPath ///////////////////////////////
|
||||
var
|
||||
CheckBoxIni: TCheckBox;
|
||||
OverwriteConfig: Boolean;
|
||||
|
||||
|
||||
|
||||
///////////////// Check .NET Framework 4.6.2 ////////////////////////////////////
|
||||
|
||||
function NetFrameworkNeedInstall(): Boolean;
|
||||
var
|
||||
bSuccess: Boolean;
|
||||
regVersion: Cardinal;
|
||||
begin
|
||||
Result := True;
|
||||
|
||||
bSuccess := RegQueryDWordValue(HKLM, 'Software\Microsoft\NET Framework Setup\NDP\v4\Full', 'Release', regVersion);
|
||||
if (True = bSuccess) and (regVersion >= 394802) then begin
|
||||
Result := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
///////////// Check heidiSQL /////////////////
|
||||
function CheckHeidiSQLNeedInstall: Boolean;
|
||||
begin
|
||||
if FileExists(ExpandConstant('C:\Program Files (x86)\Common Files\MariaDBShared\HeidiSQL\heidisql.exe'))
|
||||
then Result:= false
|
||||
else
|
||||
begin
|
||||
Result:= True
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
/////////////////// CheckConfigExistence /////////////////////////////
|
||||
function OverwriteConfigModal: Boolean;
|
||||
begin
|
||||
if DirExists(ExpandConstant('C:\CMS\Thermo.Active\Thermo.Active\Config')) then begin
|
||||
// Ask the user a Yes/No question, defaulting to No
|
||||
if not (MsgBox('La cartella "Config" esiste già. Vuoi sovrascriverla?', mbConfirmation, MB_YESNO) = IDYES) then
|
||||
begin
|
||||
// user clicked NO
|
||||
Result:= false;
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
Result:= True;
|
||||
end;
|
||||
|
||||
function GetOverwriteConfig: Boolean;
|
||||
begin
|
||||
Result:= OverwriteConfig;
|
||||
end;
|
||||
|
||||
/////////////////// DeleteLocalStorage //////////////////////
|
||||
procedure DeleteLocalStorage;
|
||||
begin
|
||||
DelTree(ExpandConstant('{app}\Client\LocalStorage'), True, True, True);
|
||||
|
||||
end;
|
||||
|
||||
///////////// InitializeWizard //////////////////////////
|
||||
procedure InitializeWizard();
|
||||
begin
|
||||
OverwriteConfig := OverwriteConfigModal;
|
||||
end;
|
||||
|
||||
procedure CurStepChanged(CurStep: TSetupStep);
|
||||
begin
|
||||
if CurStep = ssPostInstall then
|
||||
begin
|
||||
DeleteLocalStorage;
|
||||
end;
|
||||
end;
|
||||
@@ -223,6 +223,7 @@
|
||||
<Compile Include="Attributes\SignalRAuthorizeAttribute.cs" />
|
||||
<Compile Include="Controllers\SignalR\NcHub.cs" />
|
||||
<Compile Include="Controllers\WebApi\ApiAlarmController.cs" />
|
||||
<Compile Include="Controllers\WebApi\UnderTheHoodController.cs" />
|
||||
<Compile Include="Controllers\WebApi\SchedTaskController.cs" />
|
||||
<Compile Include="Controllers\WebApi\ModulesController.cs" />
|
||||
<Compile Include="Controllers\WebApi\ProdController.cs" />
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Thermo.Active
|
||||
string AppName = System.IO.Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetEntryAssembly().Location);
|
||||
if (System.Diagnostics.Process.GetProcessesByName(AppName).Length > 1)
|
||||
{
|
||||
MessageBox.Show("Only one istance of " + AppName + " can be executed!", AppName, MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
MessageBox.Show("Only one istance of "+ AppName +" can be executed!", AppName, MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace Thermo.Active
|
||||
|
||||
// Start server services
|
||||
if (!ValidateAddress(ServerStartupConfig.ServerAddress))
|
||||
ExceptionManager.ManageError(ERROR_LEVEL.FATAL, "IP Address not valid (must be one configured in Windows-OS)!");
|
||||
ExceptionManager.ManageError(ERROR_LEVEL.FATAL, "IP Address not valid (must be one configured in Windows-OS)!",true);
|
||||
|
||||
StartOptions opt = new StartOptions();
|
||||
opt.Urls.Add("http://localhost:" + ServerStartupConfig.ServerPort.ToString());
|
||||
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 9.9 KiB |
|
After Width: | Height: | Size: 572 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 224 B |
|
After Width: | Height: | Size: 299 B |
|
After Width: | Height: | Size: 434 B |
|
After Width: | Height: | Size: 338 B |
|
After Width: | Height: | Size: 471 B |
|
After Width: | Height: | Size: 733 B |
|
After Width: | Height: | Size: 525 B |
|
After Width: | Height: | Size: 890 B |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 504 B |
|
After Width: | Height: | Size: 853 B |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
@@ -1,4 +1,3 @@
|
||||
|
||||
// out: false, sourceMap: false, main: ../style.less
|
||||
@import "colors.less";
|
||||
|
||||
@@ -16,7 +15,9 @@
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
overflow: hidden;
|
||||
transition: width 200ms ease-in-out, height 200ms ease-in-out, padding 200ms ease-in-out, background-color 200ms ease-in-out, box-shadow 0ms 0ms;
|
||||
transition: width 200ms ease-in-out, height 200ms ease-in-out,
|
||||
padding 200ms ease-in-out, background-color 200ms ease-in-out,
|
||||
box-shadow 0ms 0ms;
|
||||
|
||||
&.expanded {
|
||||
width: 494px;
|
||||
@@ -27,7 +28,9 @@
|
||||
padding: 72px 24px 24px 0px;
|
||||
height: calc(~"100vh - 120px");
|
||||
box-shadow: @color-alarm-list-shadow;
|
||||
transition: width 200ms ease-in-out, height 200ms ease-in-out, padding 200ms ease-in-out, background-color 200ms ease-in-out, box-shadow 20ms 180ms;
|
||||
transition: width 200ms ease-in-out, height 200ms ease-in-out,
|
||||
padding 200ms ease-in-out, background-color 200ms ease-in-out,
|
||||
box-shadow 20ms 180ms;
|
||||
}
|
||||
|
||||
&.alarm {
|
||||
@@ -40,7 +43,7 @@
|
||||
color: @color-greyish-brown;
|
||||
}
|
||||
|
||||
&>.content {
|
||||
& > .content {
|
||||
height: calc(~"100% - 60px");
|
||||
padding-right: 24px;
|
||||
padding-left: 24px;
|
||||
@@ -52,7 +55,7 @@
|
||||
margin-left: -100%;
|
||||
}
|
||||
|
||||
&>.general-buttons {
|
||||
& > .general-buttons {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
position: absolute;
|
||||
@@ -83,7 +86,7 @@
|
||||
|
||||
.sources {
|
||||
span.source {
|
||||
border: 1px solid @color-greyish-brown !important;
|
||||
border: 1px solid @color-greyish-brown !important;
|
||||
color: @color-greyish-brown;
|
||||
}
|
||||
}
|
||||
@@ -195,7 +198,6 @@
|
||||
margin-bottom: 8px;
|
||||
|
||||
&.warning {
|
||||
|
||||
.content h2,
|
||||
.content .summary {
|
||||
color: @color-squash;
|
||||
@@ -203,7 +205,6 @@
|
||||
}
|
||||
|
||||
&.alarm {
|
||||
|
||||
.content h2,
|
||||
.content .summary {
|
||||
color: @color-scarlet;
|
||||
@@ -238,11 +239,11 @@
|
||||
.sourcecontainer {
|
||||
font-size: 14px;
|
||||
display: block;
|
||||
color: @color-greyish-brown ;
|
||||
color: @color-greyish-brown;
|
||||
font-weight: 600;
|
||||
|
||||
.source {
|
||||
border: 1px solid @color-warm-grey !important;
|
||||
border: 1px solid @color-warm-grey !important;
|
||||
padding: 0 5px;
|
||||
margin-right: 3px;
|
||||
}
|
||||
@@ -344,7 +345,7 @@
|
||||
span {
|
||||
width: 100%;
|
||||
font-size: 18px;
|
||||
line-height: 1;
|
||||
line-height: 1;
|
||||
overflow-x: hidden;
|
||||
overflow-y: hidden;
|
||||
width: 100%;
|
||||
@@ -357,7 +358,6 @@
|
||||
}
|
||||
|
||||
&.selected {
|
||||
|
||||
span,
|
||||
i {
|
||||
color: #4b4b4b;
|
||||
@@ -400,7 +400,7 @@
|
||||
cursor: pointer;
|
||||
|
||||
.message-box-header {
|
||||
height: calc(~'100% - 20px');
|
||||
height: calc(~"100% - 20px");
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-flow: row;
|
||||
@@ -472,10 +472,8 @@
|
||||
|
||||
&.enablemodify {
|
||||
height: 100%;
|
||||
|
||||
}
|
||||
|
||||
|
||||
button.btn-hidden {
|
||||
visibility: hidden;
|
||||
|
||||
@@ -535,7 +533,6 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.addattach {
|
||||
@@ -555,13 +552,21 @@
|
||||
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
|
||||
padding: 14px 17px;
|
||||
border: none;
|
||||
background-image: linear-gradient(to bottom, @color-white2, @color-silver);
|
||||
background-image: linear-gradient(
|
||||
to bottom,
|
||||
@color-white2,
|
||||
@color-silver
|
||||
);
|
||||
color: @color-darkish-blue;
|
||||
|
||||
&:active {
|
||||
background-image: linear-gradient(to bottom, @color-silver, @color-white2);
|
||||
background-image: linear-gradient(
|
||||
to bottom,
|
||||
@color-silver,
|
||||
@color-white2
|
||||
);
|
||||
border: none !important;
|
||||
box-shadow: inset @button-shadow !important;
|
||||
box-shadow: inset @button-shadow !important;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
@@ -661,7 +666,7 @@
|
||||
box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
&>.content {
|
||||
& > .content {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@@ -677,7 +682,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.alarm-history-container {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
@@ -868,7 +872,6 @@
|
||||
.checkboxesView,
|
||||
.checkboxesViewUser {
|
||||
width: calc(~"100% - 8px");
|
||||
;
|
||||
background-color: #fff;
|
||||
display: block;
|
||||
z-index: 100;
|
||||
@@ -926,11 +929,11 @@
|
||||
}
|
||||
|
||||
tr:nth-child(even) {
|
||||
background: #dddddd
|
||||
background: #dddddd;
|
||||
}
|
||||
|
||||
tr:nth-child(odd) {
|
||||
background: #FFF
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
th:nth-child(1),
|
||||
@@ -985,25 +988,24 @@
|
||||
overflow-x: hidden;
|
||||
|
||||
&.without-footer {
|
||||
height: 620px
|
||||
height: 620px;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 16px;
|
||||
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-track {
|
||||
margin: 20px 0px;
|
||||
background-color: #E5E5E5;
|
||||
background-color: #e5e5e5;
|
||||
border-radius: 15px;
|
||||
box-shadow: inset 0 1px 3px 0 #9F9F9F;
|
||||
box-shadow: inset 0 1px 3px 0 #9f9f9f;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
width: 16px;
|
||||
background: #9F9F9F;
|
||||
border: 4px solid #E5E5E5;
|
||||
background: #9f9f9f;
|
||||
border: 4px solid #e5e5e5;
|
||||
border-radius: 15px;
|
||||
}
|
||||
|
||||
@@ -1033,7 +1035,6 @@
|
||||
display: block;
|
||||
margin: auto;
|
||||
|
||||
|
||||
&.warning {
|
||||
background-color: #f5a623;
|
||||
color: #4b4b4b;
|
||||
@@ -1077,7 +1078,6 @@
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
|
||||
|
||||
div.group-label-button {
|
||||
text-align: center;
|
||||
margin: 8px 0 8px 0;
|
||||
@@ -1087,7 +1087,7 @@
|
||||
padding: 0px;
|
||||
|
||||
&.disabled {
|
||||
opacity: .65;
|
||||
opacity: 0.65;
|
||||
cursor: default;
|
||||
box-shadow: none !important;
|
||||
pointer-events: none;
|
||||
@@ -1107,7 +1107,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -170,6 +170,13 @@ select:focus {
|
||||
justify-content: space-between;
|
||||
max-width: 472px;
|
||||
|
||||
&.forBtn{
|
||||
margin-top: 10px;
|
||||
button{
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&.grid {
|
||||
display: grid;
|
||||
grid-template-rows: 1fr;
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.5);
|
||||
width: 547px;
|
||||
height: 72px;
|
||||
background-color: #bbbcbc;
|
||||
background-color: white;
|
||||
border:none;
|
||||
text-align: left;
|
||||
color: @color-darkish-blue;
|
||||
font-size: 20px;
|
||||
|
||||
&.active{
|
||||
background-color: white;
|
||||
background-color: rgba(23, 145, 255, 0.75);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -52,7 +52,11 @@
|
||||
justify-content: space-around;
|
||||
height: 64px;
|
||||
cursor: pointer;
|
||||
&.sq{
|
||||
grid-template-columns: 1fr 1fr 1fr 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.option-row:nth-child(odd) {
|
||||
background-color: #ddd;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
.modal.processo-info {
|
||||
width: 1808px;
|
||||
height: calc(~'100% - 104px');
|
||||
height: calc(~'100% - 115px');
|
||||
margin: 104px auto 0 auto;
|
||||
box-shadow: none;
|
||||
position: relative;
|
||||
|
||||
@@ -280,12 +280,17 @@
|
||||
|
||||
span {
|
||||
grid-column: 2;
|
||||
text-align: right;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
small {
|
||||
text-align: center;
|
||||
grid-column: 3;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -256,11 +256,16 @@
|
||||
}
|
||||
.setup .modal section.body section article .svg-area .borded_label div span {
|
||||
grid-column: 2;
|
||||
text-align: right;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.setup .modal section.body section article .svg-area .borded_label div small {
|
||||
text-align: center;
|
||||
grid-column: 3;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.setup .modal section.body section article .svg-area img {
|
||||
width: 100%;
|
||||
@@ -5345,7 +5350,7 @@ article .box .body {
|
||||
}
|
||||
.modal.processo-info {
|
||||
width: 1808px;
|
||||
height: calc(100% - 104px);
|
||||
height: calc(100% - 115px);
|
||||
margin: 104px auto 0 auto;
|
||||
box-shadow: none;
|
||||
position: relative;
|
||||
@@ -5817,6 +5822,12 @@ select:focus {
|
||||
justify-content: space-between;
|
||||
max-width: 472px;
|
||||
}
|
||||
.input-area.forBtn {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.input-area.forBtn button {
|
||||
margin: 0;
|
||||
}
|
||||
.input-area.grid {
|
||||
display: grid;
|
||||
grid-template-rows: 1fr;
|
||||
@@ -5943,14 +5954,14 @@ select:focus {
|
||||
box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.5);
|
||||
width: 547px;
|
||||
height: 72px;
|
||||
background-color: #bbbcbc;
|
||||
background-color: white;
|
||||
border: none;
|
||||
text-align: left;
|
||||
color: #002680;
|
||||
font-size: 20px;
|
||||
}
|
||||
.modal.opzioni-info section aside button.active {
|
||||
background-color: white;
|
||||
background-color: rgba(23, 145, 255, 0.75);
|
||||
}
|
||||
.opzionilavorazione {
|
||||
display: grid;
|
||||
@@ -5971,6 +5982,9 @@ select:focus {
|
||||
height: 64px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.opzionilavorazione .option-row.sq {
|
||||
grid-template-columns: 1fr 1fr 1fr 1fr;
|
||||
}
|
||||
.opzionilavorazione .option-row:nth-child(odd) {
|
||||
background-color: #ddd;
|
||||
}
|
||||
@@ -8053,7 +8067,7 @@ footer .container button.big:before {
|
||||
background: #dddddd;
|
||||
}
|
||||
.alarm-history-container .alarm-history-body .alarm-history-body-left .alarm-history-table tr:nth-child(odd) {
|
||||
background: #FFF;
|
||||
background: #fff;
|
||||
}
|
||||
.alarm-history-container .alarm-history-body .alarm-history-body-left .alarm-history-table th:nth-child(1),
|
||||
.alarm-history-container .alarm-history-body .alarm-history-body-left .alarm-history-table td:nth-child(1) {
|
||||
@@ -8108,14 +8122,14 @@ footer .container button.big:before {
|
||||
}
|
||||
.alarm-history-container .alarm-history-body .alarm-history-body-left .alarm-history-table tbody::-webkit-scrollbar-track {
|
||||
margin: 20px 0px;
|
||||
background-color: #E5E5E5;
|
||||
background-color: #e5e5e5;
|
||||
border-radius: 15px;
|
||||
box-shadow: inset 0 1px 3px 0 #9F9F9F;
|
||||
box-shadow: inset 0 1px 3px 0 #9f9f9f;
|
||||
}
|
||||
.alarm-history-container .alarm-history-body .alarm-history-body-left .alarm-history-table tbody::-webkit-scrollbar-thumb {
|
||||
width: 16px;
|
||||
background: #9F9F9F;
|
||||
border: 4px solid #E5E5E5;
|
||||
background: #9f9f9f;
|
||||
border: 4px solid #e5e5e5;
|
||||
border-radius: 15px;
|
||||
}
|
||||
.alarm-history-container .alarm-history-body .alarm-history-body-left .alarm-history-table tbody tr {
|
||||
@@ -24356,7 +24370,7 @@ body {
|
||||
margin-left: 10px;
|
||||
}
|
||||
body {
|
||||
font-family: 'Work Sans', sans-serif;
|
||||
font-family: "Work Sans", sans-serif;
|
||||
}
|
||||
.t-loading {
|
||||
bottom: 80px;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
// math: always
|
||||
@import url(../../libs/font-awesome/css/font-awesome.css);
|
||||
@import url(../../libs/glyphicons/styles/glyphicons.css);
|
||||
@import "base/layout.less";
|
||||
@import "iziToast.min.css";
|
||||
|
||||
body {
|
||||
font-family: 'Work Sans', sans-serif;
|
||||
font-family: "Work Sans", sans-serif;
|
||||
}
|
||||
|
||||
.t-loading {
|
||||
@@ -21,7 +22,6 @@ body {
|
||||
top: 80px;
|
||||
}
|
||||
|
||||
|
||||
.iziToast {
|
||||
background-color: @color-white2;
|
||||
border-color: @color-white2;
|
||||
@@ -44,7 +44,7 @@ body {
|
||||
background-color: @color-scarlet;
|
||||
}
|
||||
|
||||
.iziToast>.iziToast-progressbar {
|
||||
.iziToast > .iziToast-progressbar {
|
||||
background-color: rgba(255, 255, 255, 0.6);
|
||||
}
|
||||
|
||||
@@ -59,7 +59,6 @@ body {
|
||||
margin-top: 60px;
|
||||
}
|
||||
|
||||
|
||||
.login-form .login-avatar {
|
||||
height: 88px;
|
||||
width: 88px;
|
||||
@@ -75,4 +74,4 @@ body {
|
||||
font-family: Arial, sans-serif;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="600"
|
||||
width="800"
|
||||
height="800"
|
||||
viewBox="0 0 158.74999 211.66667"
|
||||
viewBox="-20 0 200.74999 211.66667"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
@@ -56,24 +56,35 @@
|
||||
transform="translate(0,-85.333317)">
|
||||
<path
|
||||
style="fill:#b3b3b3;fill-opacity:0.99628254;stroke:#b3b3b3;stroke-width:0.5291667;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 151.00544,293.53872 7.6015978,293.48182 v 0"
|
||||
d="M 151.00544,293.53872 -20,293.48182 v 0"
|
||||
id="path815"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:#b3b3b3;fill-opacity:0.99628254;stroke:#b3b3b3;stroke-width:0.5291667;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 122.69513,289.85069 -115.0935992,-0.066 v 0"
|
||||
id="path815-2"
|
||||
inkscape:connector-curvature="0" />
|
||||
<rect
|
||||
style="fill:#99cfff;fill-opacity:0.9665428;stroke:#002680;stroke-width:0.70897281;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
style="fill:#bbbcbc;fill-opacity:0.9665428;stroke:#002680;stroke-width:0.70897281;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect847"
|
||||
width="99.03894"
|
||||
height="2.995194"
|
||||
x="15.595546"
|
||||
y="289.87576" />
|
||||
<rect
|
||||
style="fill:#99cfff;fill-opacity:0.9665428;stroke:#002680;stroke-width:0.70897281;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect847-2"
|
||||
width="99.03894"
|
||||
height="2.995194"
|
||||
x="15.595546"
|
||||
y="101.28162 " />
|
||||
|
||||
<rect
|
||||
style="fill:#bbbcbc;fill-opacity:0.9665428;stroke:#002680;stroke-width:0.70897281;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect847-2"
|
||||
width="100"
|
||||
height="12.995194"
|
||||
x="80.595546"
|
||||
y="250.28162 " />
|
||||
|
||||
<path
|
||||
style="fill:#bbbcbc;fill-opacity:0;stroke:#bbbcbc;stroke-width:0.3924405;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.92936802"
|
||||
d="M 99.430686,292.77887 V 263.6747"
|
||||
d="M 130,200 V 240"
|
||||
id="path849-9"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
@@ -90,29 +101,12 @@
|
||||
inkscape:flatsided="false"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="m 62.114742,293.99563 -0.785136,-1.3599 -0.785136,-1.35989 1.570272,0 1.570272,0 -0.785136,1.35989 z"
|
||||
d="m 92.7,241 -0.785136,-1.3599 -0.785136,-1.35989 1.570272,0 1.570272,0 -0.785136,1.35989 z"
|
||||
inkscape:transform-center-y="0.45329498"
|
||||
transform="matrix(0.99999993,0,0,1.000002,37.315921,-1.0321709)" />
|
||||
<path
|
||||
sodipodi:type="star"
|
||||
style="fill:#bbbcbc;fill-opacity:1;stroke:#bbbcbc;stroke-width:0.26499975;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.92936802"
|
||||
id="path857-2-4"
|
||||
sodipodi:sides="3"
|
||||
sodipodi:cx="62.114742"
|
||||
sodipodi:cy="292.18243"
|
||||
sodipodi:r1="1.8131942"
|
||||
sodipodi:r2="0.90659708"
|
||||
sodipodi:arg1="1.5707963"
|
||||
sodipodi:arg2="2.6179939"
|
||||
inkscape:flatsided="false"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="m 62.114742,293.99563 -0.785136,-1.3599 -0.785136,-1.35989 1.570272,0 1.570272,0 -0.785136,1.35989 z"
|
||||
inkscape:transform-center-y="-0.45329064"
|
||||
transform="matrix(0.99999993,0,0,-1.000002,37.315906,557.67092)" />
|
||||
<path
|
||||
style="fill:#bbbcbc;fill-opacity:0;stroke:#bbbcbc;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.92936802"
|
||||
d="M 8.9564759,101.9539 V 289.54351"
|
||||
d="M 17.9564759,104.9539 V 289.54351"
|
||||
id="path849-5"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
@@ -129,13 +123,13 @@
|
||||
inkscape:flatsided="false"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="m 62.114742,293.99563 -0.785136,-1.3599 -0.785136,-1.35989 1.570272,0 1.570272,0 -0.785136,1.35989 z"
|
||||
d="m 71.114742,290.99563 -0.785136,-1.3599 -0.785136,-1.35989 1.570272,0 1.570272,0 -0.785136,1.35989 z"
|
||||
inkscape:transform-center-y="-0.45319651"
|
||||
transform="matrix(1.0001954,0,0,-0.99979352,-53.170405,395.73015)"
|
||||
inkscape:transform-center-x="1.2206616e-06" />
|
||||
<path
|
||||
style="fill:#bbbcbc;fill-opacity:0;stroke:#bbbcbc;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.92936802"
|
||||
d="M 120.21958,289.12031 V 101.5307"
|
||||
d="M 50.21958,289.12031 V 104.5307"
|
||||
id="path849-5-7"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
@@ -152,23 +146,18 @@
|
||||
inkscape:flatsided="false"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="m 62.114742,293.99563 -0.785136,-1.3599 -0.785136,-1.35989 1.570272,0 1.570272,0 -0.785136,1.35989 z"
|
||||
d="m -7.914742,293.99563 -0.785136,-1.3599 -0.785136,-1.35989 1.570272,0 1.570272,0 -0.785136,1.35989 z"
|
||||
inkscape:transform-center-y="0.45319651"
|
||||
transform="matrix(1.0001954,0,0,0.99979353,58.092706,-4.6559432)"
|
||||
inkscape:transform-center-x="1.2206616e-06" />
|
||||
<path
|
||||
style="fill:#b3b3b3;fill-opacity:0.99628254;stroke:#b3b3b3;stroke-width:0.52916676;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 151.00544,101.28162 7.6015868,101.22472 v 0"
|
||||
id="path815-20"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:#bbbcbc;fill-opacity:0;stroke:#bbbcbc;stroke-width:0.34999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.92936802"
|
||||
d="m 73.373966,101.79267 v 13.83474"
|
||||
d="m 105,200 v 50"
|
||||
id="path849-1-5"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:none;stroke:#bbbcbc;stroke-width:0.34999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 71.69097,115.71321 h 3.362392"
|
||||
d="m 91.69097,200 h 50"
|
||||
id="path855-0-6"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
@@ -185,7 +174,7 @@
|
||||
inkscape:flatsided="false"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="m 62.114742,293.99563 -0.785136,-1.3599 -0.785136,-1.35989 1.570272,0 1.570272,0 -0.785136,1.35989 z"
|
||||
d="m 96.1,202 -0.785136,-1.3599 -0.785136,-1.35989 1.570272,0 1.570272,0 -0.785136,1.35989 z"
|
||||
inkscape:transform-center-y="-0.48678734"
|
||||
transform="matrix(0.92838376,0,0,-1.0738472,15.707629,417.51225)"
|
||||
inkscape:transform-center-x="-2.0583999e-06" />
|
||||
|
||||
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 7.3 KiB |
@@ -2,7 +2,7 @@
|
||||
"env": "development",
|
||||
"api": {
|
||||
"enabled": true,
|
||||
"apiServerUrl": "http://localhost:9000/"
|
||||
"apiServerUrl": "http://seriate.steamware.net:9000/"
|
||||
},
|
||||
"allUIVisible": false
|
||||
}
|
||||
@@ -13,7 +13,7 @@
|
||||
<script src="Scripts/jquery.mousewheel.js"></script>
|
||||
<script src="Scripts/jquery.signalR-2.2.2.min.js"></script>
|
||||
<script src="Scripts/raphael-2.1.4.min.js"></script>
|
||||
<script src="http://localhost:9000/signalr/hubs" async></script>
|
||||
<script src="http://seriate.steamware.net:9000//signalr/hubs" async></script>
|
||||
|
||||
<link href="assets/styles/style.css" rel="stylesheet" />
|
||||
</head>
|
||||
|
||||
@@ -50,9 +50,12 @@
|
||||
"chalk": "^2.0.1",
|
||||
"copy-webpack-plugin": "^4.0.1",
|
||||
"css-loader": "^0.28.0",
|
||||
"style-loader": "1.2.1",
|
||||
"eslint": "^7.13.0",
|
||||
"eventsource-polyfill": "^0.9.6",
|
||||
"file-loader": "^1.1.4",
|
||||
"less": "^3.0.4",
|
||||
"less-loader": "^5.0.0",
|
||||
"style-loader": "1.2.1",
|
||||
"terser-webpack-plugin": "1.3.0",
|
||||
"ts-loader": "6.2.1",
|
||||
"typescript": "3.8.3",
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
declare module server {
|
||||
|
||||
export interface channels {
|
||||
[id: string]: channel[]
|
||||
}
|
||||
|
||||
export interface channel {
|
||||
value: number;
|
||||
id: number;
|
||||
bank: string;
|
||||
position: string;
|
||||
page: string;
|
||||
wire: string;
|
||||
profinet: string;
|
||||
label: string;
|
||||
visible: boolean;
|
||||
forceEnabled?: boolean;
|
||||
forcedValue?: number;
|
||||
isForced?: boolean;
|
||||
forceZero?: boolean;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import { store, appModelActions, machineStatusActions } from "@/store";
|
||||
import paddle from "@/app_modules_thermo/components/paddle/paddle.vue";
|
||||
import Dashboard from "@/app_modules_thermo/dashboard/dashboard.vue";
|
||||
import PreDashboard from "@/app_modules_thermo/preriscaldo-dashboard/preriscaldo-dashboard.vue";
|
||||
import sottoCofano from "@/app_modules_thermo/sotto-cofano/sotto-cofano.vue";
|
||||
|
||||
|
||||
import * as iziToast from "izitoast";
|
||||
@@ -38,7 +39,8 @@ declare var cmsClient;
|
||||
dashboard: Dashboard,
|
||||
predashboard: PreDashboard,
|
||||
alarmList,
|
||||
printGantt
|
||||
printGantt,
|
||||
sottoCofano
|
||||
}
|
||||
})
|
||||
export default class app extends Vue {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<router-view :class="{'blur':applyBlurInternal}" />
|
||||
<modal-container name="modal" container-name="modal-internal" :inform-hmi="false"></modal-container>
|
||||
</div>
|
||||
|
||||
<sotto-cofano></sotto-cofano>
|
||||
<paddle></paddle>
|
||||
|
||||
<app-footer :class="{'blur':(applyBlur || applyBlurNc)}"></app-footer>
|
||||
@@ -23,17 +23,14 @@
|
||||
<modal-container containerName="modal-login" name="modal-login"></modal-container>
|
||||
<keyboard></keyboard>
|
||||
|
||||
<div class="window-buttons" :class="{prioritize: prioritizeWindowsButtons, 'blur':(applyBlurNc && !prioritizeWindowsButtons)}">
|
||||
<button
|
||||
class="gray square close"
|
||||
@click="sendMessage('hide')"
|
||||
>-</button>
|
||||
<button
|
||||
class="gray square close"
|
||||
@click="sendMessage('close')"
|
||||
>×</button>
|
||||
<div
|
||||
class="window-buttons"
|
||||
:class="{prioritize: prioritizeWindowsButtons, 'blur':(applyBlurNc && !prioritizeWindowsButtons)}"
|
||||
>
|
||||
<button class="gray square close" @click="sendMessage('hide')">-</button>
|
||||
<button class="gray square close" @click="sendMessage('close')">×</button>
|
||||
</div>
|
||||
<modal-container name="modal" :class="{'blur':applyBlurNc}"></modal-container>
|
||||
<modal-container name="modal" :class="{'blur':applyBlurNc}"></modal-container>
|
||||
<modal-nc-container name="modal-nc"></modal-nc-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -4,13 +4,14 @@ import {
|
||||
store, AppModel,/*, MachineStatusModel, machineStatusActions, localizationModelActions, machineInfoActions*/
|
||||
machineStatusActions
|
||||
} from "@/store";
|
||||
import { UserInfoDialog, MachineInfoDialog, ContactInfoDialog,CmsconnectInfoDialog } from "@/app_modules/machine";
|
||||
import { UserInfoDialog, MachineInfoDialog, ContactInfoDialog, CmsconnectInfoDialog } from "@/app_modules/machine";
|
||||
|
||||
import { ModalHelper } from "./components/modals/ModalHelper";
|
||||
import Vue from "vue";
|
||||
import { loginService, machineService, localizationService } from "./services";
|
||||
import { prodService } from "./services/prodService";
|
||||
import * as iziToast from "izitoast";
|
||||
import { underTheHoodService } from "./services/underTheHoodService";
|
||||
|
||||
// import { UsersService } from "./services/usersService";
|
||||
|
||||
@@ -70,6 +71,9 @@ async function loadMachineConfig() {
|
||||
|
||||
await prodService.GetProdPanel();
|
||||
|
||||
await underTheHoodService.getChannels();
|
||||
await underTheHoodService.getChannelsConfig();
|
||||
|
||||
// load default language
|
||||
if (!(store.state as AppModel).localization.currentLanguage) {
|
||||
localizationService.changeCurrentLanguage(mcresult.defaultLanguage);
|
||||
@@ -375,12 +379,12 @@ function enableScroll(element) {
|
||||
|
||||
function takescreenshot() {
|
||||
var ricetta = (store.state as AppModel).prod.panel.nomeRicetta;
|
||||
if(!ricetta || ricetta =="")
|
||||
if (!ricetta || ricetta == "")
|
||||
ricetta = "_noRecipe";
|
||||
|
||||
if (typeof cmsClient != "undefined") {
|
||||
var response = cmsClient.takeScreenshot(ricetta);
|
||||
if(response != "")
|
||||
if (typeof cmsClient != "undefined") {
|
||||
var response = cmsClient.takeScreenshot(ricetta);
|
||||
if (response != "")
|
||||
var resp = JSON.parse(response);
|
||||
|
||||
if (response != "" && resp && resp.error) {
|
||||
@@ -393,7 +397,7 @@ function takescreenshot() {
|
||||
transitionOut: "fadeOut",
|
||||
});
|
||||
}
|
||||
else{
|
||||
else {
|
||||
(iziToast as any).success({
|
||||
title: "Screenshot",
|
||||
message: resp.path,
|
||||
@@ -401,7 +405,7 @@ function takescreenshot() {
|
||||
timeout: 10000,
|
||||
class: "t-error",
|
||||
transitionOut: "fadeOut",
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ import { routes as productionRoutes } from "./app_modules_thermo/processo/route"
|
||||
import { routes as SetupRoutes } from "@/app_modules_thermo/setup/route.js";
|
||||
import { routes as ProgrPreriscaldoRoutes } from "@/app_modules_thermo/programmazione-preriscaldo/route";
|
||||
import { routes as users } from "./app_modules/users/route";
|
||||
//import { routes as ioRoutes } from "@/app_modules_thermo/sotto-cofano/route";
|
||||
|
||||
export let routes = [
|
||||
{ path: "", component: productionRoutes[0].component, name: productionRoutes[0].name, meta: { title: "Dashboard" } },
|
||||
@@ -74,6 +75,7 @@ injectRoutes(routes, ProgrPreriscaldoRoutes);
|
||||
// injectRoutes(routes, scada);
|
||||
// injectRoutes(routes, reports);
|
||||
injectRoutes(routes, users);
|
||||
// injectRoutes(routes, ioRoutes);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { TimeLineChartHeader } from "@/components/timeline-chart";
|
||||
import { debounce } from "@/_base/debounce";
|
||||
import Vue from "vue";
|
||||
import Component from "vue-class-component";
|
||||
@@ -103,6 +104,8 @@ export default class Numeric extends Vue {
|
||||
this.focused = false;
|
||||
this.value.setpointHMI = this.setPoint.setpointHMI;
|
||||
})
|
||||
|
||||
this.$emit("update", this.setPoint.setpointHMI);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,6 +2,7 @@ import Vue from "vue";
|
||||
import Component from "vue-class-component";
|
||||
import { Prop } from 'vue-property-decorator';
|
||||
import Slider from "@/app_modules_thermo/components/slider.vue"
|
||||
import { Hub } from "@/services";
|
||||
|
||||
@Component({ name: "cornice", components: { slider: Slider } })
|
||||
export default class Cornice extends Vue {
|
||||
@@ -11,6 +12,18 @@ export default class Cornice extends Vue {
|
||||
recipe: Recipe.IRecipe;
|
||||
|
||||
|
||||
doSoftKeyClick() {
|
||||
Hub.Current.sendUserSoftKey(this.softKey.id);
|
||||
}
|
||||
|
||||
getSoftKeyStatus() {
|
||||
return this.$store.getters.getSoftKeyStatus(this.softKey.id);
|
||||
}
|
||||
|
||||
get softKey() {
|
||||
return this.$store.getters.getSoftKeyByRef("dimensions_frame_setupall");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -25,6 +25,17 @@
|
||||
</div>
|
||||
<slider v-model="recipe.general_sizes_frame_dim_y"></slider>
|
||||
</template>
|
||||
<hr />
|
||||
<template>
|
||||
<div class="input-area forBtn">
|
||||
<label>{{'softkey_' + softKey.id | localize('softkey_' + softKey.id)}}</label>
|
||||
<button
|
||||
class="btn"
|
||||
:class="{'active':getSoftKeyStatus().value}"
|
||||
@click="doSoftKeyClick()"
|
||||
>{{softKey.refCallLabel | localize(softKey.refCallLabel)}}</button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -2,9 +2,24 @@ import Vue from "vue";
|
||||
import Component from "vue-class-component";
|
||||
import { Prop } from 'vue-property-decorator';
|
||||
import Slider from "@/app_modules_thermo/components/slider.vue"
|
||||
import { Hub } from "@/services";
|
||||
|
||||
@Component({ name: "piastra", components: { slider: Slider } })
|
||||
export default class Piastra extends Vue {
|
||||
@Prop()
|
||||
recipe: Recipe.IRecipe;
|
||||
|
||||
|
||||
doSoftKeyClick() {
|
||||
Hub.Current.sendUserSoftKey(this.softKey.id);
|
||||
}
|
||||
|
||||
getSoftKeyStatus() {
|
||||
return this.$store.getters.getSoftKeyStatus(this.softKey.id);
|
||||
}
|
||||
|
||||
get softKey() {
|
||||
return this.$store.getters.getSoftKeyByRef("dimensions_plate_setupall");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -25,6 +25,17 @@
|
||||
</div>
|
||||
<slider v-model="recipe.general_sizes_plate_dim_y"></slider>
|
||||
</template>
|
||||
<hr />
|
||||
<template>
|
||||
<div class="input-area forBtn">
|
||||
<label>{{'softkey_' + softKey.id | localize('softkey_' + softKey.id)}}</label>
|
||||
<button
|
||||
class="btn"
|
||||
:class="{'active':getSoftKeyStatus().value}"
|
||||
@click="doSoftKeyClick()"
|
||||
>{{softKey.refCallLabel | localize(softKey.refCallLabel)}}</button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -11,21 +11,21 @@
|
||||
<div class="input-area">
|
||||
<img src="assets/icons/png/quota.png" />
|
||||
<label>{{'options_undercutupperplate__position'|localize('Quota')}}</label>
|
||||
<numeric v-model="quota" />
|
||||
<numeric v-model="quota" keyboardPosition="left" />
|
||||
</div>
|
||||
<slider v-model="quota"></slider>
|
||||
</template>
|
||||
<template v-if="ritardoAtt.status.visible">
|
||||
<div class="input-area">
|
||||
<label>{{'options_undercutupperplate_delay_acti'|localize('Ritardo attivazione')}}</label>
|
||||
<numeric v-model="ritardoAtt" />
|
||||
<numeric v-model="ritardoAtt" keyboardPosition="left" />
|
||||
</div>
|
||||
<slider v-model="ritardoAtt"></slider>
|
||||
</template>
|
||||
<template v-if="ritardoDisatt.status.visible">
|
||||
<div class="input-area">
|
||||
<label>{{'options_undercutupperplate_delay_dis'|localize('Ritardo disattivazione')}}</label>
|
||||
<numeric v-model="ritardoDisatt" />
|
||||
<numeric v-model="ritardoDisatt" keyboardPosition="left" />
|
||||
</div>
|
||||
<slider v-model="ritardoDisatt"></slider>
|
||||
</template>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<template v-if="setpoint.status.visible">
|
||||
<div class="input-area">
|
||||
<label>{{'options_thermoregulator_setpoint'|localize('Setpoint')}}</label>
|
||||
<numeric v-model="setpoint" />
|
||||
<numeric v-model="setpoint" keyboardPosition="left" />
|
||||
</div>
|
||||
<slider v-model="setpoint"></slider>
|
||||
</template>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<template>
|
||||
<div class="option-row" @click="$emit('click')">
|
||||
<div class="option-row sq" @click="$emit('click')" v-if="quota.status.visible">
|
||||
<label>{{numSottoSq}}</label>
|
||||
<!-- <template v-if="modalita.status.visible">
|
||||
<combo v-model="modalita"></combo>
|
||||
</template> va inserito il valore della combo di modalità-->
|
||||
<template v-if="quota.status.visible">
|
||||
<template>
|
||||
<label>{{quota.setpointHMI}} mm</label>
|
||||
</template>
|
||||
<template v-if="ritardoAtt.status.visible">
|
||||
<label>{{ritardoAtt.setpointHMI}} s</label>
|
||||
</template>
|
||||
<template v-if="ritardoDisatt.status.visible">
|
||||
<template>
|
||||
<label>{{ritardoDisatt.setpointHMI}} s</label>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
@@ -9,8 +9,15 @@ export default class setupTermo extends Vue {
|
||||
numTermo: string;
|
||||
|
||||
@Prop()
|
||||
status: Recipe.IStatus;
|
||||
status: Recipe.IValue;
|
||||
|
||||
@Prop()
|
||||
setpoint: Recipe.IValue;
|
||||
|
||||
get valueStatus(){
|
||||
if(this.status.setpointHMI ==1)
|
||||
return "True";
|
||||
else
|
||||
return "False";
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,15 @@
|
||||
<template>
|
||||
<div class="option-row" @click="$emit('click')">
|
||||
<div class="option-row sq" @click="$emit('click')" v-if="status.status.visible">
|
||||
<label>{{numTermo}}</label>
|
||||
<template v-if="status.visible">
|
||||
<label>{{status.enabled}}</label>
|
||||
<template>
|
||||
<label>{{valueStatus}}</label>
|
||||
</template>
|
||||
<template v-if="setpoint.status.visible">
|
||||
<template>
|
||||
<label>{{setpoint.setpointHMI}} °C</label>
|
||||
</template>
|
||||
<template>
|
||||
<label>{{setpoint.valueAct}} °C</label>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
<style scoped>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
:key="i"
|
||||
@click="selectedItem=i"
|
||||
:numTermo="i"
|
||||
:status="recipe[`options_thermoregulator_${i}_enabled`].status"
|
||||
:status="recipe[`options_thermoregulator_${i}_enabled`]"
|
||||
:setpoint="recipe[`options_thermoregulator_${i}_setpoint`]"
|
||||
></setup-termo>
|
||||
</div>
|
||||
|
||||
@@ -48,19 +48,19 @@
|
||||
</template>
|
||||
<style scoped>
|
||||
#quota6 {
|
||||
top: 600px;
|
||||
left: 630px;
|
||||
top: 470px;
|
||||
left: 770px;
|
||||
}
|
||||
#quota1 {
|
||||
top: 120px;
|
||||
left: 540px;
|
||||
top: 470px;
|
||||
left: 615px;
|
||||
}
|
||||
#quota5 {
|
||||
top: 250px;
|
||||
left: 700px;
|
||||
top: 360px;
|
||||
left: 470px;
|
||||
}
|
||||
#quota2 {
|
||||
top: 250px;
|
||||
top: 228px;
|
||||
left: 300px;
|
||||
}
|
||||
#quota4 {
|
||||
|
||||
@@ -49,6 +49,10 @@ export default class Resistance extends Vue {
|
||||
if(!this.channel.tCamActive || this.channel.setpointHMI==0)
|
||||
return "179, 179, 179";
|
||||
|
||||
|
||||
if(this.channel.tCamTempAct==0 || this.channel.tCamTempSet==0)
|
||||
return "144,191,61";
|
||||
|
||||
var delta = this.channel.tCamTempSet - this.channel.tCamTempAct;
|
||||
if(delta >= - 5 && delta <= 5)
|
||||
{
|
||||
@@ -111,10 +115,7 @@ export default class Resistance extends Vue {
|
||||
|
||||
get currentSelectedTempColor() {
|
||||
//Not linear, but quadratic
|
||||
if(!this.channel.tCamActive)
|
||||
return "64, 64, 64";
|
||||
else
|
||||
return "0,38,128"
|
||||
return "0,38,128"
|
||||
/*
|
||||
var x = 1/100 * this.channel.setpointHMI * this.channel.setpointHMI;
|
||||
return [this.selectedColorFrom[0] - (this.selectedColorFrom[0] - this.selectedColorTo[0]) * x / 100,
|
||||
|
||||
@@ -4,6 +4,8 @@ import { store } from '@/store';
|
||||
import { Prop,Watch } from 'vue-property-decorator';
|
||||
import warmers from "./warmers.vue";
|
||||
import { thermocameraService } from "@/services/thermocameraService";
|
||||
import { warmersService } from "@/services/warmersService";
|
||||
import { awaiter } from '@/_base';
|
||||
|
||||
@Component({
|
||||
name: "thermocamera", components: {
|
||||
@@ -18,7 +20,10 @@ export default class Thermocamera extends Vue {
|
||||
|
||||
selectedChannelIds: number[] = [];
|
||||
uniformChannelValue: number = -1;
|
||||
|
||||
btnModeEnabled = true;
|
||||
|
||||
/*
|
||||
modeEnabled: Recipe.IValue = {
|
||||
setpointHMI: this.thermocameraMode,
|
||||
checkpointHMI: this.thermocameraMode,
|
||||
@@ -42,7 +47,6 @@ export default class Thermocamera extends Vue {
|
||||
}
|
||||
} as Recipe.IValue;
|
||||
|
||||
|
||||
@Watch("modeEnabled.setpointHMI", { deep: true })
|
||||
async ChangedMode(n, o) {
|
||||
if(this.modeEnabled.checkpointHMI != this.modeEnabled.setpointHMI)
|
||||
@@ -52,9 +56,7 @@ export default class Thermocamera extends Vue {
|
||||
store.state.warmers.tCamStatus.thermoCamMode = true;
|
||||
store.state.warmers.channels.forEach(function(element, index){
|
||||
if (element.setpointHMI==0)
|
||||
store.state.warmers.channels[index].tCamActive = false;
|
||||
else
|
||||
store.state.warmers.channels[index].tCamActive = true;
|
||||
store.state.warmers.channels[index].tCamActive = false;
|
||||
});
|
||||
}
|
||||
else
|
||||
@@ -69,11 +71,12 @@ export default class Thermocamera extends Vue {
|
||||
store.state.warmers.tCamStatus.thermoCamOnOff = true;
|
||||
else
|
||||
store.state.warmers.tCamStatus.thermoCamOnOff = false;
|
||||
}
|
||||
}*/
|
||||
|
||||
@Watch("warmers", { deep: true })
|
||||
async ChangedTemps() {
|
||||
|
||||
/*
|
||||
if(store.state.warmers.tCamStatus.thermoCamOnOff)
|
||||
this.OnOffEnabled.setpointHMI = 1;
|
||||
else
|
||||
@@ -83,12 +86,12 @@ export default class Thermocamera extends Vue {
|
||||
this.modeEnabled.setpointHMI = 1;
|
||||
else
|
||||
this.modeEnabled.setpointHMI = 0;
|
||||
|
||||
*/
|
||||
|
||||
this.OnOffEnabled.status.enabled = false;
|
||||
this.btnModeEnabled = false;
|
||||
for(const ch of store.state.warmers.channels){
|
||||
if(ch.tCamTempSet > 0){
|
||||
this.OnOffEnabled.status.enabled = true;
|
||||
this.btnModeEnabled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -99,8 +102,10 @@ export default class Thermocamera extends Vue {
|
||||
}
|
||||
async mounted(){
|
||||
this.ChangedTemps();
|
||||
/*
|
||||
this.modeEnabled.checkpointHMI = this.modeEnabled.setpointHMI;
|
||||
this.OnOffEnabled.checkpointHMI = this.OnOffEnabled.setpointHMI;
|
||||
*/
|
||||
}
|
||||
|
||||
get selectedChannels(): Warmers.IChannel[] {
|
||||
@@ -118,6 +123,24 @@ export default class Thermocamera extends Vue {
|
||||
else
|
||||
return 0
|
||||
}
|
||||
|
||||
get thermocameraModeBTN(): boolean {
|
||||
return (store.state.warmers.tCamStatus.thermoCamMode) ;
|
||||
}
|
||||
|
||||
get thermocameraRunBTN(): boolean {
|
||||
return (store.state.warmers.tCamStatus.thermoCamOnOff) ;
|
||||
}
|
||||
|
||||
async toggleEnable(){
|
||||
store.state.warmers.tCamStatus.thermoCamMode = !store.state.warmers.tCamStatus.thermoCamMode;
|
||||
await awaiter (warmersService.setTCamMode(store.state.warmers.tCamStatus.thermoCamMode));
|
||||
}
|
||||
|
||||
async toggleRun(){
|
||||
store.state.warmers.tCamStatus.thermoCamOnOff = !store.state.warmers.tCamStatus.thermoCamOnOff;
|
||||
await awaiter (warmersService.setTCamOn(store.state.warmers.tCamStatus.thermoCamOnOff));
|
||||
}
|
||||
|
||||
get thermocameraOnOff(): number {
|
||||
if(store.state.warmers.tCamStatus.thermoCamOnOff)
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
<aside class="scrollable auto" v-if="recipe">
|
||||
<div class="box transparent">
|
||||
<div class="body">
|
||||
<div v-if="thermoCamModeNotEnabled" class="notEnabled small"> </div>
|
||||
<div v-if="thermoCamModeNotEnabled" class="notEnabled small"> </div>
|
||||
|
||||
<!-- NOT USED
|
||||
<template>
|
||||
<div class="input-area">
|
||||
<label>{{'thermocamera_mode'|localize('Thermoprophet Mode')}}</label>
|
||||
@@ -12,19 +14,42 @@
|
||||
:status="modeEnabled.status"
|
||||
></toggle-button>
|
||||
</div>
|
||||
</template>
|
||||
</template> -->
|
||||
<div class="input-area left grid">
|
||||
<button
|
||||
class="btn"
|
||||
@click="toggleEnable"
|
||||
:disabled="thermocameraModeBTN"
|
||||
>{{'warmers_start_thermocamera' | localize('Enable Thermoprophet')}}</button>
|
||||
<button
|
||||
class="btn"
|
||||
@click="toggleEnable"
|
||||
:disabled="!thermocameraModeBTN"
|
||||
>{{'warmers_stop_thermocamera' | localize('Disable Thermoprophet')}}</button>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<!--
|
||||
<template>
|
||||
<div class="input-area">
|
||||
<label>{{'thermocamera_mode'|localize('Thermoprophet Mode')}}</label>
|
||||
<toggle-button
|
||||
v-model="modeEnabled.setpointHMI"
|
||||
:status="modeEnabled.status"
|
||||
></toggle-button>
|
||||
</div>
|
||||
</template> -->
|
||||
<div class="input-area left grid">
|
||||
<button
|
||||
class="btn"
|
||||
@click="showcamera"
|
||||
>{{'warmers_showcamera' | localize('Show Camera Image')}}</button>
|
||||
</div>
|
||||
<!-- NOT USED
|
||||
<div class="divider"></div>
|
||||
<div class="input-area">
|
||||
<label>{{'warmers_selection' | localize('Selezione')}}</label>
|
||||
</div>
|
||||
<div class="input-area left grid grid-5">
|
||||
<!--
|
||||
<button
|
||||
class="btn btn-info square"
|
||||
@click="$refs.warmers.toggleSelection('rect')"
|
||||
@@ -39,14 +64,14 @@
|
||||
>
|
||||
<img src="assets/icons/png/libera.png" />
|
||||
</button>
|
||||
<label></label>
|
||||
<label></label>-->
|
||||
<button class="btn btn-info" @click="$refs.warmers.selectAll()">
|
||||
<label>{{'warmers_select_all' | localize('Tutti')}}</label>
|
||||
</button>
|
||||
<button class="btn btn-info" @click="$refs.warmers.selectNone()">
|
||||
<label>{{'warmers_select_none' | localize('Nessuno')}}</label>
|
||||
</button>
|
||||
</div>-->
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<div class="input-area">
|
||||
<label>{{'warmers_enable' | localize('Enable/Disable Management')}}</label>
|
||||
@@ -89,16 +114,19 @@
|
||||
:disabled="!isEnableDisableEnabled"
|
||||
>{{'warmers_clear_temperature' | localize('Clear all temperature')}}</button>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<template>
|
||||
<div class="input-area">
|
||||
<label>{{'thermocamera_on_off'|localize('Thermoprophet Run')}}</label>
|
||||
<toggle-button
|
||||
v-model="OnOffEnabled.setpointHMI"
|
||||
:status="OnOffEnabled.status"
|
||||
></toggle-button>
|
||||
</div>
|
||||
</template>
|
||||
<div class="divider"></div>
|
||||
<div class="input-area left grid">
|
||||
<button
|
||||
class="btn"
|
||||
@click="toggleRun"
|
||||
:disabled="thermocameraRunBTN || !btnModeEnabled"
|
||||
>{{'warmers_on_thermocamera' | localize('Thermoprophet ON')}}</button>
|
||||
<button
|
||||
class="btn"
|
||||
@click="toggleRun"
|
||||
:disabled="!thermocameraRunBTN"
|
||||
>{{'warmers_off_thermocamera' | localize('Thermoprophet OFF')}}</button>
|
||||
</div>
|
||||
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
|
||||
@@ -174,8 +174,6 @@ export default class ShowRiscaldamentoSuperioreInfo extends Vue {
|
||||
|
||||
if(this.warmersEdited || this.tempEnabledEdited){
|
||||
await warmersService.UpdateEnable(store.state.warmers.channels.reduce((p, c) => { p[c.idChannel] = c.tCamActive; return p; }, {}));
|
||||
await warmersService.setTCamMode(store.state.warmers.tCamStatus.thermoCamMode);
|
||||
await warmersService.setTCamOn(store.state.warmers.tCamStatus.thermoCamOnOff);
|
||||
}
|
||||
|
||||
if(this.warmersEdited || this.tempsEdited || this.tempEnabledEdited)
|
||||
|
||||
@@ -11,9 +11,28 @@ export default class VuotoPrincipale extends Vue {
|
||||
@Prop()
|
||||
recipe: Recipe.IRecipe;
|
||||
|
||||
noedit1 = false;
|
||||
noedit2 = false;
|
||||
noedit3 = false;
|
||||
|
||||
mounted(){
|
||||
this.recipe.vacuum_main_1_chart_setpointx.range.max = this.recipe.vacuum_main_max_time.setpointHMI;
|
||||
this.recipe.vacuum_main_2_chart_setpointx.range.max = this.recipe.vacuum_main_max_time.setpointHMI;
|
||||
this.recipe.vacuum_main_3_chart_setpointx.range.max = this.recipe.vacuum_main_max_time.setpointHMI;
|
||||
this.recipe.vacuum_main_3_chart_setpointx.status.enabled = false;
|
||||
}
|
||||
|
||||
@Watch("recipe.vacuum_main_max_time", {deep:true})
|
||||
editMaxTime(){
|
||||
editMaxTime(){
|
||||
this.recipe.vacuum_main_1_chart_setpointx.range.max = this.recipe.vacuum_main_max_time.setpointHMI;
|
||||
this.recipe.vacuum_main_2_chart_setpointx.range.max = this.recipe.vacuum_main_max_time.setpointHMI;
|
||||
this.recipe.vacuum_main_3_chart_setpointx.range.max = this.recipe.vacuum_main_max_time.setpointHMI;
|
||||
this.recipe.vacuum_main_3_chart_setpointx.status.enabled = false;
|
||||
|
||||
this.noedit1 = true;
|
||||
this.noedit2 = true;
|
||||
this.noedit3 = true;
|
||||
|
||||
if(this.recipe.vacuum_main_3_chart_setpointx.setpointHMI > 0){
|
||||
var maxtime = this.recipe.vacuum_main_1_chart_setpointx.setpointHMI + this.recipe.vacuum_main_2_chart_setpointx.setpointHMI;
|
||||
this.recipe.vacuum_main_3_chart_setpointx.setpointHMI = this.recipe.vacuum_main_max_time.setpointHMI - maxtime;
|
||||
@@ -31,11 +50,114 @@ export default class VuotoPrincipale extends Vue {
|
||||
}
|
||||
|
||||
@Watch("recipe.vacuum_main_1_chart_setpointx", {deep:true})
|
||||
editvaluesTime1(n,o){
|
||||
this.recipe.vacuum_main_1_chart_setpointx.range.max = this.recipe.vacuum_main_max_time.setpointHMI;
|
||||
this.recipe.vacuum_main_2_chart_setpointx.range.max = this.recipe.vacuum_main_max_time.setpointHMI;
|
||||
this.recipe.vacuum_main_3_chart_setpointx.range.max = this.recipe.vacuum_main_max_time.setpointHMI;
|
||||
this.recipe.vacuum_main_3_chart_setpointx.status.enabled = false;
|
||||
if(this.noedit1){
|
||||
this.noedit1 = false;
|
||||
return
|
||||
}
|
||||
this.noedit2 = false;
|
||||
|
||||
var diff = this.recipe.vacuum_main_max_time.setpointHMI -
|
||||
this.recipe.vacuum_main_1_chart_setpointx.setpointHMI -
|
||||
this.recipe.vacuum_main_2_chart_setpointx.setpointHMI -
|
||||
this.recipe.vacuum_main_3_chart_setpointx.setpointHMI;
|
||||
if(diff < 0)
|
||||
{
|
||||
if(this.recipe.vacuum_main_2_chart_setpointx.setpointHMI <= 0 && this.recipe.vacuum_main_3_chart_setpointx.setpointHMI <= 0){
|
||||
|
||||
this.recipe.vacuum_main_1_chart_setpointx.setpointHMI = this.recipe.vacuum_main_max_time.setpointHMI;
|
||||
}
|
||||
else if (this.recipe.vacuum_main_3_chart_setpointx.setpointHMI > 0){
|
||||
diff = this.recipe.vacuum_main_max_time.setpointHMI -
|
||||
this.recipe.vacuum_main_1_chart_setpointx.setpointHMI -
|
||||
this.recipe.vacuum_main_2_chart_setpointx.setpointHMI;
|
||||
|
||||
this.recipe.vacuum_main_3_chart_setpointx.setpointHMI = diff;
|
||||
|
||||
}
|
||||
else if(this.recipe.vacuum_main_2_chart_setpointx.setpointHMI > 0){
|
||||
|
||||
diff = this.recipe.vacuum_main_max_time.setpointHMI -
|
||||
this.recipe.vacuum_main_1_chart_setpointx.setpointHMI -
|
||||
this.recipe.vacuum_main_3_chart_setpointx.setpointHMI;
|
||||
|
||||
this.recipe.vacuum_main_2_chart_setpointx.setpointHMI = diff;
|
||||
}
|
||||
}
|
||||
else{
|
||||
if (this.recipe.vacuum_main_3_chart_setpointx.setpointHMI >= 0){
|
||||
diff = this.recipe.vacuum_main_max_time.setpointHMI -
|
||||
this.recipe.vacuum_main_1_chart_setpointx.setpointHMI -
|
||||
this.recipe.vacuum_main_2_chart_setpointx.setpointHMI;
|
||||
|
||||
this.recipe.vacuum_main_3_chart_setpointx.setpointHMI = diff;
|
||||
|
||||
}else if(this.recipe.vacuum_main_2_chart_setpointx.setpointHMI >= 0){
|
||||
|
||||
diff = this.recipe.vacuum_main_max_time.setpointHMI -
|
||||
this.recipe.vacuum_main_1_chart_setpointx.setpointHMI -
|
||||
this.recipe.vacuum_main_3_chart_setpointx.setpointHMI;
|
||||
|
||||
this.recipe.vacuum_main_2_chart_setpointx.setpointHMI = diff;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Watch("recipe.vacuum_main_2_chart_setpointx", {deep:true})
|
||||
editvaluesTime2(n,o){
|
||||
this.recipe.vacuum_main_1_chart_setpointx.range.max = this.recipe.vacuum_main_max_time.setpointHMI;
|
||||
this.recipe.vacuum_main_2_chart_setpointx.range.max = this.recipe.vacuum_main_max_time.setpointHMI;
|
||||
this.recipe.vacuum_main_3_chart_setpointx.range.max = this.recipe.vacuum_main_max_time.setpointHMI;
|
||||
this.recipe.vacuum_main_3_chart_setpointx.status.enabled = false;
|
||||
if(this.noedit1 || this.noedit2){
|
||||
this.noedit1 = false;
|
||||
this.noedit2 = false;
|
||||
return;
|
||||
}
|
||||
this.noedit3 = false;
|
||||
|
||||
var diff = this.recipe.vacuum_main_max_time.setpointHMI -
|
||||
this.recipe.vacuum_main_1_chart_setpointx.setpointHMI -
|
||||
this.recipe.vacuum_main_2_chart_setpointx.setpointHMI -
|
||||
this.recipe.vacuum_main_3_chart_setpointx.setpointHMI;
|
||||
|
||||
if(diff < 0)
|
||||
{
|
||||
if(this.recipe.vacuum_main_3_chart_setpointx.setpointHMI <= 0){
|
||||
this.recipe.vacuum_main_2_chart_setpointx.setpointHMI = this.recipe.vacuum_main_max_time.setpointHMI - this.recipe.vacuum_main_1_chart_setpointx.setpointHMI;
|
||||
}
|
||||
else{
|
||||
diff = this.recipe.vacuum_main_max_time.setpointHMI -
|
||||
this.recipe.vacuum_main_1_chart_setpointx.setpointHMI -
|
||||
this.recipe.vacuum_main_2_chart_setpointx.setpointHMI;
|
||||
|
||||
this.recipe.vacuum_main_3_chart_setpointx.setpointHMI = diff;
|
||||
}
|
||||
}
|
||||
else{
|
||||
if (this.recipe.vacuum_main_3_chart_setpointx.setpointHMI >= 0){
|
||||
diff = this.recipe.vacuum_main_max_time.setpointHMI -
|
||||
this.recipe.vacuum_main_1_chart_setpointx.setpointHMI -
|
||||
this.recipe.vacuum_main_2_chart_setpointx.setpointHMI;
|
||||
|
||||
this.recipe.vacuum_main_3_chart_setpointx.setpointHMI = diff;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Watch("recipe.vacuum_main_3_chart_setpointx", {deep:true})
|
||||
editvaluesTime(n,o){
|
||||
var somma = this.recipe.vacuum_main_1_chart_setpointx.setpointHMI + this.recipe.vacuum_main_2_chart_setpointx.setpointHMI + this.recipe.vacuum_main_3_chart_setpointx.setpointHMI;
|
||||
this.recipe.vacuum_main_max_time.setpointHMI = somma;
|
||||
editvaluesTime3(n,o){
|
||||
this.recipe.vacuum_main_1_chart_setpointx.range.max = this.recipe.vacuum_main_max_time.setpointHMI;
|
||||
this.recipe.vacuum_main_2_chart_setpointx.range.max = this.recipe.vacuum_main_max_time.setpointHMI;
|
||||
this.recipe.vacuum_main_3_chart_setpointx.range.max = this.recipe.vacuum_main_max_time.setpointHMI;
|
||||
this.recipe.vacuum_main_3_chart_setpointx.status.enabled = false;
|
||||
|
||||
}
|
||||
|
||||
get bars() {
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
@import "../../../variable.less";
|
||||
@@ -0,0 +1,9 @@
|
||||
import { Component, Vue } from "vue-property-decorator";
|
||||
import Header from "../../../header/my-header.vue";
|
||||
import MenuSx from "../../../menu-sx/menu-sx.vue";
|
||||
import AssiTable from "../../../Assi/components/tables/assi-table/assi-table.vue";
|
||||
|
||||
@Component({
|
||||
components: { Header, MenuSx, AssiTable }
|
||||
})
|
||||
export default class Assi extends Vue {}
|
||||
@@ -0,0 +1,9 @@
|
||||
<template>
|
||||
<div class="column-page-one-column">
|
||||
<AssiTable></AssiTable>
|
||||
</div>
|
||||
</template>
|
||||
<style lang="less">
|
||||
@import "assi.less";
|
||||
</style>
|
||||
<script lang="ts" src="./assi.ts"></script>
|
||||
@@ -0,0 +1,102 @@
|
||||
@import "../../../../variable.less";
|
||||
|
||||
.assi-table {
|
||||
th,
|
||||
td {
|
||||
width: 114px;
|
||||
max-width: 114px;
|
||||
&.assi-axis {
|
||||
width: 183px;
|
||||
max-width: 183px;
|
||||
}
|
||||
&.velocity {
|
||||
width: 63px;
|
||||
max-width: 63px;
|
||||
}
|
||||
&.position {
|
||||
width: 63px;
|
||||
max-width: 63px;
|
||||
}
|
||||
&.assi-buttons {
|
||||
width: 445px;
|
||||
max-width: 445px;
|
||||
}
|
||||
}
|
||||
|
||||
.fill-under-grey-3-2 {
|
||||
background-color: @fill-under-grey-3-2;
|
||||
}
|
||||
.fill-under-grey-1-2 {
|
||||
background-color: @fill-under-grey-1-2;
|
||||
}
|
||||
|
||||
.axis-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.fa {
|
||||
font-size: 30px;
|
||||
padding: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.buttons-container {
|
||||
display: inline-flex;
|
||||
margin: 0 0 0 10px;
|
||||
}
|
||||
|
||||
.buttons-container {
|
||||
> button {
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
margin: 0px 8px 0px 8px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 2px;
|
||||
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
|
||||
background-image: linear-gradient(to bottom, #818a8f 0%, #42494e 98%);
|
||||
}
|
||||
}
|
||||
|
||||
.button-align-probe {
|
||||
width: 81px;
|
||||
height: 48px;
|
||||
> label {
|
||||
cursor: pointer;
|
||||
font-size: 18px;
|
||||
color: @very-light-pink;
|
||||
}
|
||||
}
|
||||
.button-slaves-position {
|
||||
width: 205px;
|
||||
height: 48px;
|
||||
|
||||
> label {
|
||||
cursor: pointer;
|
||||
font-size: 18px;
|
||||
color: @very-light-pink;
|
||||
}
|
||||
}
|
||||
.assi-input-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
input {
|
||||
width: 106px;
|
||||
height: 48px;
|
||||
background-color: #dddddd;
|
||||
box-shadow: inset 0 1px 3px 0 rgb(0 0 0 / 50%);
|
||||
border: none;
|
||||
box-sizing: border-box;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
padding: 0 10px;
|
||||
color: #4b4b4b;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
tbody {
|
||||
.tr-n-level {
|
||||
margin-left: 33px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
import { Component, Vue } from "vue-property-decorator";
|
||||
|
||||
@Component({})
|
||||
export default class AssiTable extends Vue {
|
||||
data = [];
|
||||
groupedData = [];
|
||||
hon = false;
|
||||
groupVisible: string[] = [];
|
||||
|
||||
mounted() {
|
||||
this.hon = false;
|
||||
this.data = [
|
||||
{
|
||||
axis: "W1",
|
||||
group: "W",
|
||||
level: 0,
|
||||
position: 227.71,
|
||||
velocity: 374,
|
||||
torque: "0.85 Nm",
|
||||
status: "Upper",
|
||||
errorCode: 150,
|
||||
faseMotion: 123654
|
||||
},
|
||||
{
|
||||
axis: "W2",
|
||||
group: "W",
|
||||
level: 1,
|
||||
position: 227.71,
|
||||
velocity: 374,
|
||||
torque: "0.85 Nm",
|
||||
status: "Upper",
|
||||
errorCode: 150,
|
||||
faseMotion: 123654
|
||||
},
|
||||
// {
|
||||
// axis: "W3",
|
||||
// group: "W",
|
||||
// level: 1,
|
||||
// position: 227.71,
|
||||
// velocity: 374,
|
||||
// torque: "0.85 Nm",
|
||||
// status: "Upper",
|
||||
// errorCode: 150,
|
||||
// faseMotion: 123654
|
||||
// },
|
||||
// {
|
||||
// axis: "Z1",
|
||||
// group: "Z",
|
||||
// level: 0,
|
||||
// position: 227.71,
|
||||
// velocity: 374,
|
||||
// torque: "0.85 Nm",
|
||||
// status: "Upper",
|
||||
// errorCode: 150,
|
||||
// faseMotion: 123654
|
||||
// },
|
||||
// {
|
||||
// axis: "Z2",
|
||||
// group: "Z",
|
||||
// level: 1,
|
||||
// position: 227.71,
|
||||
// velocity: 374,
|
||||
// torque: "0.85 Nm",
|
||||
// status: "Upper",
|
||||
// errorCode: 150,
|
||||
// faseMotion: 123654
|
||||
// }
|
||||
];
|
||||
this.groupReduce(this.data);
|
||||
}
|
||||
|
||||
groupReduce(data) {
|
||||
this.groupedData = data.reduce((acc, item) => {
|
||||
if (Object.keys(acc).length > 0 && acc[item.group]) {
|
||||
acc[item.group].push({
|
||||
axis: item.axis,
|
||||
level: item.level,
|
||||
position: item.position,
|
||||
velocity: item.velocity,
|
||||
torque: item.torque,
|
||||
status: item.status,
|
||||
errorCode: item.errorCode,
|
||||
faseMotion: item.faseMotion,
|
||||
group: item.group
|
||||
});
|
||||
} else {
|
||||
acc[item.group] = [
|
||||
{
|
||||
axis: item.axis,
|
||||
level: item.level,
|
||||
position: item.position,
|
||||
velocity: item.velocity,
|
||||
torque: item.torque,
|
||||
status: item.status,
|
||||
errorCode: item.errorCode,
|
||||
faseMotion: item.faseMotion,
|
||||
group: item.group
|
||||
}
|
||||
];
|
||||
}
|
||||
return acc;
|
||||
}, {});
|
||||
}
|
||||
|
||||
openCollapse(group: string) {
|
||||
const idx = this.groupVisible.indexOf(group);
|
||||
if (idx >= 0) this.groupVisible.splice(idx, 1);
|
||||
else this.groupVisible.push(group);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
<template>
|
||||
<div class="one-column-table-container scrollable">
|
||||
<table class="assi-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="assi-axis">Axis</th>
|
||||
<th class="position">Position</th>
|
||||
<th class="velocity">Velocity</th>
|
||||
<th>Torque</th>
|
||||
<th>Status</th>
|
||||
<th>Error Code</th>
|
||||
<th class="fase-motion">Fase Motion</th>
|
||||
<th class="assi-buttons"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<template v-for="group of groupedData">
|
||||
<template v-for="(item, index) of group">
|
||||
<tr v-if="item.level === 0" :key="`${item.axis}_${index}`">
|
||||
<td>
|
||||
<span class="axis-container">
|
||||
<i
|
||||
v-if="groupVisible.includes(item.group)"
|
||||
@click="openCollapse(item.group)"
|
||||
class="fa fa-caret-down"
|
||||
></i>
|
||||
<i v-else @click="openCollapse(item.group)" class="fa fa-caret-right"></i>
|
||||
{{ item.axis }}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{ item.position }}</td>
|
||||
<td>{{ item.velocity }}</td>
|
||||
<td>{{ item.torque }}</td>
|
||||
<td>{{ item.status }}</td>
|
||||
<td>{{ item.errorCode }}</td>
|
||||
<td>{{ item.faseMotion }}</td>
|
||||
<td>
|
||||
<span class="buttons-container">
|
||||
<button class="button-align-probe">
|
||||
<label>Align</label>
|
||||
</button>
|
||||
<button class="button-slaves-position">
|
||||
<label>Set slaves position</label>
|
||||
</button>
|
||||
<button class="button-align-probe">
|
||||
<label>Probe</label>
|
||||
</button>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr
|
||||
v-else-if="groupVisible.includes(item.group)"
|
||||
:key="`${item.axis}_${index}`"
|
||||
:ref="`${item.axis.charAt(0)}`"
|
||||
:class="[
|
||||
index % 2 === 0
|
||||
? 'tr-n-level fill-under-grey-3-2'
|
||||
: 'tr-n-level fill-under-grey-1-2'
|
||||
]"
|
||||
>
|
||||
<td>
|
||||
<span>{{ item.axis }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span>{{ item.position }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span>{{ item.velocity }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span>{{ item.torque }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span>{{ item.status }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span>{{ item.errorCode }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span>{{ item.faseMotion }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="buttons-container">
|
||||
<button class="pointer">
|
||||
<span class="controlli-icon pointer">
|
||||
<img src="assets/icons/sotto-cofano/png/ico-bt-minus.png" />
|
||||
</span>
|
||||
</button>
|
||||
<div class="assi-input-container">
|
||||
<input />
|
||||
</div>
|
||||
<button class="pointer">
|
||||
<span class="controlli-icon pointer">
|
||||
<img src="assets/icons/sotto-cofano/png/ico-bt-plus.png" />
|
||||
</span>
|
||||
</button>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
</template>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</template>
|
||||
<style lang="less">
|
||||
@import "assi-table.less";
|
||||
</style>
|
||||
<script lang="ts" src="./assi-table.ts"></script>
|
||||
@@ -0,0 +1,42 @@
|
||||
@import "../../../variable.less";
|
||||
|
||||
.main-container {
|
||||
.column-page-header {
|
||||
width: 672px;
|
||||
margin: 0 0 0 20px;
|
||||
> title {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
font-size: 26px;
|
||||
font-weight: 500;
|
||||
line-height: 1.96;
|
||||
text-align: center;
|
||||
color: @white;
|
||||
}
|
||||
|
||||
.row-list {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
a {
|
||||
cursor: pointer;
|
||||
height: 45px;
|
||||
padding: 0 13px;
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
color: @white;
|
||||
text-decoration: underline;
|
||||
|
||||
&.upper {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.row-list-input {
|
||||
height: 100px;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import { store } from "@/store";
|
||||
import { Component, Vue } from "vue-property-decorator";
|
||||
import Header from "../../../header/my-header.vue";
|
||||
import MenuSx from "../../../menu-sx/menu-sx.vue";
|
||||
import InputTable from "../tables/inputTab/input.vue";
|
||||
import OutputTable from "../tables/outputTab/output.vue";
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
Header,
|
||||
MenuSx,
|
||||
InputTable,
|
||||
OutputTable
|
||||
}
|
||||
})
|
||||
export default class IO extends Vue {
|
||||
|
||||
get items(): server.channels {
|
||||
return store.state.underTheHood.ioChannels;
|
||||
}
|
||||
|
||||
get config(): { [id: string]: number[] } {
|
||||
return store.state.underTheHood.ioChannelsConfig;
|
||||
}
|
||||
|
||||
scrollto(key) {
|
||||
document.getElementById(key).scrollIntoView();
|
||||
}
|
||||
|
||||
}
|
||||