IOB-WIN-OPC-UA:
- creat modifica x scrittura reset contapezzi x test EMCO, impostate le 2 macchine diverse x fare debug in setup
This commit is contained in:
@@ -67,6 +67,8 @@ ENABLE_DYN_DATA=FALSE
|
||||
FORCE_DYN_DATA=TRUE
|
||||
ENABLE_DATA_FILTER=TRUE
|
||||
ENABLE_CLI_RESTART=TRUE
|
||||
SEND_PZCNT_MODE=DIRECT
|
||||
;SEND_PZCNT_MODE=TASK
|
||||
|
||||
DISABLE_SEND_WDST=TRUE
|
||||
|
||||
|
||||
@@ -67,6 +67,8 @@ ENABLE_DYN_DATA=FALSE
|
||||
FORCE_DYN_DATA=TRUE
|
||||
ENABLE_DATA_FILTER=TRUE
|
||||
ENABLE_CLI_RESTART=TRUE
|
||||
;SEND_PZCNT_MODE=DIRECT
|
||||
SEND_PZCNT_MODE=TASK
|
||||
|
||||
DISABLE_SEND_WDST=TRUE
|
||||
|
||||
|
||||
@@ -244,13 +244,35 @@ namespace IOB_WIN_OPC_UA.IobOpc
|
||||
/// <returns></returns>
|
||||
public override bool setcontapezziPLC(int newPzCount)
|
||||
{
|
||||
lgInfo($"Richiesto setcontapezziPLC | {newPzCount}");
|
||||
bool answ = false;
|
||||
if (memMap != null && memMap.mMapWrite.ContainsKey("forceSetPzCount"))
|
||||
{
|
||||
// provare x Donati EMCO e Siemens Rama Tenditalia
|
||||
Dictionary<string, string> task2add = new Dictionary<string, string>();
|
||||
task2add.Add("forceSetPzCount", $"{newPzCount}");
|
||||
executeTasks(task2add);
|
||||
// modalità invio secondo richiesta
|
||||
string sendMode = getOptPar("SEND_PZCNT_MODE");
|
||||
if (sendMode == "TASK")
|
||||
{
|
||||
Dictionary<string, string> task2add = new Dictionary<string, string>();
|
||||
task2add.Add("forceSetPzCount", $"{newPzCount}");
|
||||
executeTasks(task2add);
|
||||
}
|
||||
else
|
||||
{
|
||||
// provare x Donati EMCO e Siemens Rama Tenditalia
|
||||
var ListTempParams = new List<objItem>();
|
||||
// aggiungo reset caricamento
|
||||
objItem writeReq = new objItem()
|
||||
{
|
||||
uid = "forceSetPzCount",
|
||||
reqValue = $"{newPzCount}",
|
||||
name = "forceSetPzCount"
|
||||
};
|
||||
ListTempParams.Add(writeReq);
|
||||
// effettua chiamata scrittura verso impianto x il solo reset......
|
||||
plcWriteParams(ref ListTempParams);
|
||||
}
|
||||
answ = true;
|
||||
lgInfo($"Eseguito scrittura OPC-UA su nodo setcontapezziPLC | sendMode: {sendMode}");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user