Gestione ricette a più indici su RW – Support Elsist https://support.elsist.biz/forums/topic/gestione-ricette-a-piu-indici-su-rw/feed/ Fri, 30 Oct 2026 08:35:58 +0000 https://bbpress.org/?v=2.6.20 it-IT https://support.elsist.biz/forums/topic/gestione-ricette-a-piu-indici-su-rw/#post-71944 Gestione ricette a più indici su RW https://support.elsist.biz/forums/topic/gestione-ricette-a-piu-indici-su-rw/#post-71944 Sun, 14 May 2023 15:32:43 +0000 a08 Stò realizzando un progetto in cui occorre gestire due tipologie di ricette, quest’ultime verranno gestite con il sistema RW. Ad ora sto utilizzando gli indirizzi di indice 9200 e 9201.

Per fare il dataTransfer da HMI a PLC ho fatto due macro di “Download” (una per indice) mentre per il processo inverso ho fatto macro di “Upload”. Le macro di Download sono state testate e funzionano correttamente.

Sto avendo qualche problemino, invece, per le macro di “Upload”. Quando voglio copiare i dati dell’indice 0 da PLC a HMI per esempio dalla ricetta Nr.1 alla ricetta Nr.2 funziona tutto benissimo. Però se successivamente vado nella pagina dei dati dell’indice 1 vedo che nella ricetta Nr.2 mi ha azzerrato tutti i valori RW, quando in realtà dovrebbe mantermeli avendo eseguito la macro Upload sull’indice 0 e non 1.

Allego di seguito come ho scritto le macro e spero di essere stato il più esaustivo possibile, sono sempre a disposizione.

]]>
https://support.elsist.biz/forums/topic/gestione-ricette-a-piu-indici-su-rw/#post-71955 Rispondi a: Gestione ricette a più indici su RW https://support.elsist.biz/forums/topic/gestione-ricette-a-piu-indici-su-rw/#post-71955 Mon, 15 May 2023 07:02:17 +0000 Sergio Bertana Puoi allegare le macro in testo e non come immagini così si possono verificare più facilmente…

]]>
https://support.elsist.biz/forums/topic/gestione-ricette-a-piu-indici-su-rw/#post-72007 Rispondi a: Gestione ricette a più indici su RW https://support.elsist.biz/forums/topic/gestione-ricette-a-piu-indici-su-rw/#post-72007 Tue, 16 May 2023 12:57:55 +0000 a08 Allego di seguito le due macro per Upload dati da PLC a HMI.

Ringrazio della disponibilità.

Macro indice 0

macro_command main()
short ric[50]
short punt
bool setBit=true //usato per conferma avvenuto upload ricetta
bool ResetBit=false //usato per conferma avvenuto upload ricetta

GetData(punt, "Local HMI", LW, 9200, 1)

GetData(ric[0], "Siemens S7-1200/S7-1500", DB3, 0, 10) //Nome ricetta
GetData(ric[10], "Siemens S7-1200/S7-1500", DB3, 20, 1) //N° Rotoli
GetData(ric[11], "Siemens S7-1200/S7-1500", DB3, 22, 1) //N° Strati
GetData(ric[12], "Siemens S7-1200/S7-1500", DB3, 24, 1) //Vel nastro
GetData(ric[13], "Siemens S7-1200/S7-1500", DB3, 26, 1) //Vel nastro ingresso 2
GetData(ric[14], "Siemens S7-1200/S7-1500", DB3, 28, 1) //Vel nastro uscita
GetData(ric[15], "Siemens S7-1200/S7-1500", DB3, 30, 1) //Vel nastro ingresso 1

SetData(ric[0], "Local HMI", RW, punt,50)

SetData(SetBit, "Local HMI", LB, 70, 1) //upload avvenuto, set tic nella pagina poup-up copia formato
DELAY(1000)
SetData(ResetBit, "Local HMI", LB, 70, 1) //upload avvenuto, resset tic nella pagina poup-up copia formato
end macro_command

Macro indice 1

macro_command main()
short ric[50]
short punt
bool setBit=true
bool ResetBit=false

GetData(punt, "Local HMI", LW, 9201, 1)

GetData(ric[30], "Siemens S7-1200/S7-1500", DB3, 40, 10) //Nome ricetta
GetData(ric[40], "Siemens S7-1200/S7-1500", DB3, 60, 1) //Vel Stella
GetData(ric[41], "Siemens S7-1200/S7-1500", DB3, 62, 1) //Rall Stella
GetData(ric[42], "Siemens S7-1200/S7-1500", DB3, 64, 1) //Vel nastro
GetData(ric[43], "Siemens S7-1200/S7-1500", DB3, 66, 1) //Vel nastro ingresso 2
GetData(ric[44], "Siemens S7-1200/S7-1500", DB3, 68, 1) //Vel nastro uscita
GetData(ric[45], "Siemens S7-1200/S7-1500", DB3, 70, 1) //Vel nastro ingresso 1

SetData(ric[0], "Local HMI", RW, punt, 50)

SetData(SetBit, "Local HMI", LB, 50, 1)
DELAY(1000)
SetData(ResetBit, "Local HMI", LB, 50, 1)
end macro_command
]]>
https://support.elsist.biz/forums/topic/gestione-ricette-a-piu-indici-su-rw/#post-72132 Rispondi a: Gestione ricette a più indici su RW https://support.elsist.biz/forums/topic/gestione-ricette-a-piu-indici-su-rw/#post-72132 Mon, 22 May 2023 10:16:03 +0000 a08 Buongiorno,

confermate la corretta visulizzazione delle macro?

Grazie!

]]>
https://support.elsist.biz/forums/topic/gestione-ricette-a-piu-indici-su-rw/#post-72156 Rispondi a: Gestione ricette a più indici su RW https://support.elsist.biz/forums/topic/gestione-ricette-a-piu-indici-su-rw/#post-72156 Sun, 28 May 2023 15:36:07 +0000 a08 buonasera,

volevo chiedere se poi si avesse avuto modo di guardare la risposta.

grazie

 

]]>