Ho un progetto sviluppato con il programma Easybuilder8000 per il terminale MT6070iH-1EV che contiene delle macro, il progetto aperto con easybuilder8000 viene correttamente compilato.
Il problema arriva nel momento in cui devo sostituire il terminale, ho dunque acquistato il modello MT8073iE, ho aperto il progetto con EasyBuilderPro, selezionato il nuovo modello, ma al momento della compilazione mi esce un errore su una macro, aprendola e compilandola si può notare come l’errore sia sul dimensionamento di un array Errore C70. Di seguito il codice della macro.
short buffRd[10]
short buffChk[20]
short chePunz[41]
short buffPosMatrix[20]
macro_command main()
int n=0
int p=0
int ptr=0
int tmp=0
int src=0
int tst=0
SYNC_TRIG_MACRO(2)
//trasferisco dati da memoria in var locali
GetData(buffRd[0], “Local HMI”, RW, 0, 10)
GetData(chePunz[0], “Local HMI”, RW, 100, 41)
//spacchetto word in caratteri
for n=0 to 9
ptr=n*2
buffChk[ptr] = buffRd[n] & 0xff
ptr=ptr+1
buffChk[ptr] = (buffRd[n]>>8) & 0xff
next
//sostituisco i codici ASCII con i codici posizione
for n=0 to 19
src=buffChk[n]
for p=1 to 40
tst=chePunz[p]
if src==tst then
buffPosMatrix[n]=p
p=41
end if
next p
next n
for n=0 to 9
ptr=n*2
tmp = buffChk[ptr]
ptr = ptr + 1
buffRd[n] = tmp + buffChk[ptr] * 256
next
SetData(buffPosMatrix[0], “Drivers”, 4x, 1#8194, 20)
SetData(buffRd[0], “Local HMI”, RW, 20, 12)
end macro_command