Merge branch 'release/FixSwResetSetup_01'

This commit is contained in:
Samuele Locatelli
2025-09-24 11:17:08 +02:00
9 changed files with 398 additions and 16 deletions
+1 -2
View File
@@ -15,8 +15,7 @@ VENDOR=FRER
MODEL=MCIMIDETH
[CNC]
;IP=192.168.0.171
IP=192.168.0.193
IP=192.168.0.172
PORT=502
[SERVER]
+2 -1
View File
@@ -15,7 +15,8 @@ VENDOR=FRER
MODEL=MCIMIDETH
[CNC]
IP=192.168.0.172
;IP=192.168.0.171
IP=192.168.0.193
PORT=502
[SERVER]
+4 -4
View File
@@ -196,10 +196,10 @@
"forceResetPzCount#TAV_1": {
"name": "forceResetPzCount#TAV_1",
"description": "Reset Contapezzi TAV1 (A)",
"tipoMem": "Int",
"tipoMem": "Boolean",
"memAddr": "ns=1;s=/swcp-assets/137eada7-bd15-474d-8aaf-4e6f2f8ea72a/MES_OUT_A_RESET_COUNTER_TRIGGER",
"index": 0,
"size": 4
"size": 1
},
"setComm#TAV_2": {
"name": "setComm#TAV_2",
@@ -228,10 +228,10 @@
"forceResetPzCount#TAV_2": {
"name": "forceResetPzCount#TAV_2",
"description": "Reset Contapezzi TAV2 (U)",
"tipoMem": "Int",
"tipoMem": "Boolean",
"memAddr": "ns=1;s=/swcp-assets/137eada7-bd15-474d-8aaf-4e6f2f8ea72a/MES_OUT_U_RESET_COUNTER_TRIGGER",
"index": 0,
"size": 4
"size": 1
}
},
"mMapRead": {
+3 -3
View File
@@ -27,8 +27,8 @@ CLI_INST=SteamWareSim
;STARTLIST=Tend_RAMA_10_47
;STARTLIST=3026
;STARTLIST=TFT_RAMA_001
;STARTLIST=SIM_DP_02
STARTLIST=1042
;STARTLIST=2016
;STARTLIST=SIM_DP_01
;STARTLIST=1042
STARTLIST=2016
MAXCNC=10
+99
View File
@@ -0,0 +1,99 @@
;Configurazione IOB-WIN
[IOB]
CNCTYPE=SIMULA
PING_MS_TIMEOUT=500
MinDeltaSec=5
EnableRedisQueue=true
[MACHINE]
VENDOR=STEAMWARE
MODEL=DEMO_SIMULATOR_MULTI
[CNC]
IP=127.0.0.1
PORT=0000
[SERVER]
MPIP=http://10.74.82.218
MPURL=/MP/IO
CMDBASE=/IOB/input/
CMDFLOG=/IOB/flog/
CMDALIVE=/IOB
CMDENABLED=/IOB/enabled/
CMDADV1=?valore=
CMDREBO=/sendReboot.aspx?idxMacchina=
CMD_ODL_STARTED=/IOB/getCurrOdlStart/
CMD_FORCLE_SPLIT_ODL=/IOB/forceSplitOdlFull/
CMD_IDLE_TIME=/IOB/getIdlePeriod/
[MEMORY]
[BLINK]
MAX_COUNTER_BLINK = 15
BLINK_FILT=0
[OPTPAR]
AUTO_CHANGE_ODL=true
CHANGE_ODL_MODE=DAILY_CONF_PZ
CHANGE_ODL_HOURS=24
CHANGE_ODL_IDLE_MIN=0
; gestione custom timer
timerIntMs=200
;elenco comma separated delle sub-machine (tipicamente tavole)
IOB_MULTI_CNAME=TAV_1,TAV_2
;PZCOUNT_MODE=STD.[PAR/MEM].info|BIT.indice
PZCOUNT_MODE=BIT
ENABLE_PZ_RESET=TRUE
;gestione invio pezzi in blocco
ENABLE_SEND_PZC_BLOCK=TRUE
MIN_SEND_PZC_BLOCK=0
MAX_SEND_PZC_BLOCK=100
MIN_DURATA_ODL=960
; per il simulatore: 50|1 = WAIT 50, DURATION 1 con riferimento al PERIODO base (PER_BASE in ms, default 10 secondi)
PER_BASE=10500
SIM_PZCNT=10|3
SIM_ALARM=1000|20
SIM_MANU=50|6
; 1 = indica che la macchina è multi --> allo scadere del contapezzo gestisce ANCHE il giro tavola sui bit relativi
IS_MULTI=1
; indica gestione e simulazione bit 5 --> slow/emergenza
SIM_SLOW=3500|20
; indica gestione e simulazione bit 6 --> warmup/cooldown
SIM_WUCD=8000|20
; indica gestione e simulazione bit 7 --> emergenza
SIM_EMRG=4000|10
; indica simulazione delle funzionalità power ON/ OFF
SIM_POW_ON_OFF=true
T_ON=6
T_OFF=22
; indica simulazione controlli utente
SIM_RC=681|1
; indica simulazione registro scarti
SIM_RS=461|1
; indica simulazione dichiarazioni (note) utente
SIM_DICH=761|1
; indica matricola opr simulata
SIM_MATR_OPR=1
; conf parametri memoria READ/WRITE
PARAM_CONF=SIM_DP_01.json
;conf test FTP
FTP_SERVER=ftp.steamware.net
FTP_USER=testftpuser
FTP_PWD=we4reFromB3rghem!
FTP_CERT=
FTP_SKIP=TRUE
FTP_LOC_DIR=temp\csv
FTP_REM_DIR=
CSV_ADD_HEADER=true
[BRANCH]
NAME=master
; Tags manuali
[TAGS]
Customer=Steamware
HostOS=WIN
HostName=IOB-WIN-SIMULA
HostAddr=10.74.82.76
+216
View File
@@ -0,0 +1,216 @@
{
"mMapRead": {
"TEMP_01": {
"func": "MAX",
"period": 120,
"sendEnabled": true,
"name": "TEMP_01",
"description": "Temperatura 01",
"memAddr": "",
"tipoMem": "Real",
"index": 0,
"size": 0,
"factor": 1.0,
"maxVal": 24.0,
"minVal": 18.0,
"unit": "",
"value": "",
"decodeMap": [],
"displOrdinal": 4
},
"POWER_01": {
"func": "MAX",
"period": 120,
"sendEnabled": true,
"name": "POWER_01",
"description": "Potenza impianto",
"memAddr": "",
"tipoMem": "Int",
"index": 0,
"size": 0,
"factor": 1.0,
"maxVal": 80.0,
"minVal": 40.0,
"unit": "",
"value": "",
"decodeMap": [],
"displOrdinal": 5
},
"FEED_OVER": {
"func": "MAX",
"period": 120,
"sendEnabled": true,
"name": "FEED_OVER",
"description": "FEED override",
"memAddr": "",
"tipoMem": "Int",
"index": 0,
"size": 0,
"factor": 1.0,
"maxVal": 100.0,
"minVal": 0.0,
"unit": "",
"value": "",
"decodeMap": [],
"displOrdinal": 6
},
"RAPID_OVER": {
"func": "MAX",
"period": 120,
"sendEnabled": true,
"name": "RAPID_OVER",
"description": "RAPID override",
"memAddr": "",
"tipoMem": "Int",
"index": 0,
"size": 0,
"factor": 1.0,
"maxVal": 120.0,
"minVal": 50.0,
"unit": "",
"value": "",
"decodeMap": [],
"displOrdinal": 7
},
"POS_X": {
"func": "MAX",
"period": 120,
"sendEnabled": true,
"name": "POS_X",
"description": "Asse X",
"memAddr": "",
"tipoMem": "Int",
"index": 0,
"size": 0,
"factor": 1.0,
"maxVal": 2000.0,
"minVal": -2000.0,
"unit": "",
"value": "",
"decodeMap": [],
"displOrdinal": 8
},
"POS_Y": {
"func": "MAX",
"period": 120,
"sendEnabled": true,
"name": "POS_Y",
"description": "Asse Y",
"memAddr": "",
"tipoMem": "Int",
"index": 0,
"size": 0,
"factor": 1.0,
"maxVal": 2000.0,
"minVal": 0.0,
"unit": "",
"value": "",
"decodeMap": [],
"displOrdinal": 9
},
"POS_Z": {
"func": "MAX",
"period": 120,
"sendEnabled": true,
"name": "POS_Z",
"description": "Asse Z",
"memAddr": "",
"tipoMem": "Int",
"index": 0,
"size": 0,
"factor": 1.0,
"maxVal": 1500.0,
"minVal": 0.0,
"unit": "",
"value": "",
"decodeMap": [],
"displOrdinal": 10
}
},
"mMapWrite": {
"setArt": {
"name": "setArt",
"description": "Articolo",
"memAddr": "DB150.DBB12",
"tipoMem": "String",
"index": 12,
"size": 20,
"factor": 1.0,
"maxVal": 9999.0,
"minVal": 0.0,
"unit": "",
"value": "",
"decodeMap": [],
"displOrdinal": 1
},
"setComm": {
"name": "setComm",
"description": "Commessa",
"memAddr": "DB150.DBB32",
"tipoMem": "String",
"index": 32,
"size": 20,
"factor": 1.0,
"maxVal": 9999.0,
"minVal": 0.0,
"unit": "",
"value": "",
"decodeMap": [],
"displOrdinal": 2
},
"setPzComm": {
"name": "setPzComm",
"description": "Qta Richiesta",
"memAddr": "DB150.DBB8",
"tipoMem": "Int",
"index": 8,
"size": 4,
"factor": 1.0,
"maxVal": 9999.0,
"minVal": 0.0,
"unit": "",
"value": "",
"decodeMap": [],
"displOrdinal": 3
},
"forceSetPzCount": {
"name": "forceSetPzCount",
"description": "Imposta Qta",
"memAddr": "DB150.DBB8",
"tipoMem": "Int",
"index": 8,
"size": 4,
"factor": 1.0,
"maxVal": 9999.0,
"minVal": 0.0,
"unit": "",
"value": "",
"decodeMap": [],
"displOrdinal": 11
}
},
"DataDecodMap": {},
"FileDecod": {},
"mMapWriteLink": {},
"OptKVP": {
"fluxLogReduce": "true",
"fluxLogRedDeadBand": "2.5",
"fluxLogResendPeriod": "30",
"hasRecipe": "true",
"maxPodlQty": "530",
"useLocalRecipe": "true",
"path-locBase": "C:\\MesData\\",
"path-00-Arch": "ArchivioRicette\\FIMAT",
"path-01-Temp": "01-Temp\\FIMAT",
"path-02-Sent": "02-Inviate\\FIMAT",
"path-03-Recv": "03-Ricevute\\FIMAT",
"path-04-remReq": "Y:\\",
"path-05-remExe": "C:\\MesData\\Remote\\Dosed",
"path-06-remRec": "R:\\",
"path-outReport": "C:\\MesData\\Report",
"path-confSetup": "C:\\MesData\\Setup\\setupConsumi.json",
"replace-<Variant>": "<Variant>{{PODL}}",
"replace-<Info1>": "<Info1>Kg{{Qty}} | {{Note}}"
},
"OptMemPar": {}
}
+4 -6
View File
@@ -246,12 +246,10 @@
<None Include="DATA\CONF\MECART_80.json" />
<None Include="DATA\CONF\OPC_UA.ini" />
<None Include="DATA\CONF\OPC_UA.json" />
<None Include="DATA\CONF\SIM_DP_02.ini">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="DATA\CONF\SIM_DP_02.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="DATA\CONF\SIM_DP_01.ini" />
<None Include="DATA\CONF\SIM_DP_01.json" />
<None Include="DATA\CONF\SIM_DP_02.ini" />
<None Include="DATA\CONF\SIM_DP_02.json" />
<None Include="DATA\CONF\STEL_200.ini" />
<None Include="DATA\CONF\STEL_200.json" />
<None Include="DATA\CONF\STEL_210.ini" />
+39
View File
@@ -6,6 +6,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.NetworkInformation;
using System.Threading;
namespace IOB_WIN_OPC_UA.IobOpc
{
@@ -87,6 +88,15 @@ namespace IOB_WIN_OPC_UA.IobOpc
}
lgInfo($"Chiamato {tName} | addResetPzCount: {addResetPzCount}");
break;
case taskType.stopSetup:
forceDbSync = true;
// reset contapezzi inizio setup
if (IOBConfFull.Counters.ResetOnSetupStop)
{
addResetPzCount = true;
}
lgInfo($"Chiamato {tName} | addResetPzCount: {addResetPzCount}");
break;
}
}
}
@@ -103,6 +113,35 @@ namespace IOB_WIN_OPC_UA.IobOpc
{
task2exe.Add("forceSetPzCount", "0");
task2exe.Add("forceResetPzCount", "0");
}
if (addResetPzCount)
{
// se è una doppia tavola aggiungo anche tag "processOtherInfo"...
if (isMulti)
{
bool resetTav = false;
// se contiene chiave reset x tavola...
foreach (var item in IOBConfFull.Device.MultiIobList)
{
string keyName = $"forceResetPzCount#{item}";
resetTav = resetTav || memMap.mMapWrite.ContainsKey(keyName);
if (resetTav)
{
processOtherInfo(keyName, "True");
}
}
if (resetTav)
{
// attendo
Thread.Sleep(500);
// mando chiusura...
foreach (var item in IOBConfFull.Device.MultiIobList)
{
processOtherInfo($"forceResetPzCount#{item}", "False");
}
}
}
lgInfo("Aggiunti task reset contapezzi (ex EMCO) tramite forceSetPzCount e forceResetPzCount");
}
}
+30
View File
@@ -7,6 +7,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.NetworkInformation;
using System.Threading;
using System.Threading.Tasks;
using static IOB_UT_NEXT.CustomObj;
@@ -218,6 +219,35 @@ namespace IOB_WIN_OPC_UA.IobOpc
return answ;
}
/// <summary>
/// Override x scrittura valori tipo IMPULSO (es reset contapezzi impulsivo impianti SW)
/// </summary>
/// <param name="keyReq">chaive memwrite da usare</param>
/// <param name="valReq">valore da scrivere</param>
/// <returns></returns>
protected override bool processOtherInfo(string keyReq, string valReq)
{
bool answ = false;
if (memMap != null && memMap.mMapWrite != null)
{
// preparo elenco parametri da inviare...
var list2Write = new List<objItem>();
// aggiungo bit popupz
objItem currData = new objItem()
{
uid = keyReq,
reqValue = valReq,
name = keyReq
};
list2Write.Add(currData);
// scrivo!
plcWriteParams(ref list2Write);
lgInfo($"processOtherInfo | eseguito plcWriteParams per keyReq: {keyReq} | valReq: {valReq}");
answ = true;
}
return answ;
}
#endregion Private Methods
}
}