jcmosquera
Member
Hi Everyone!
I'm currently working with an ABB RTU which has built-in PLC capabilities, I'm programming some systems using ST in Multiprog wt.
I simulated my system in Matlab and everything worked perfect, it's an earth fault recognition system for medium voltage networks.
I programmed everything with very simple commands, not using any complex Matlab functions so that I could easily port and rewrite my code in ST. All is working great but one thing that is bothering me and I'm getting an error from.
I hav the following simple for loop:
input and output are ARRAY[0..1000] OF REAL;
I get an error saying that I cannot use input[n+m-1], not even input[n+1]! How is that possible? I'm not PLC expert I'm just starting out and that seems like basic programming syntax to me like with other normal languages.
Any way I can get around this to access and read those type of array elements?
Thanks!
I'm currently working with an ABB RTU which has built-in PLC capabilities, I'm programming some systems using ST in Multiprog wt.
I simulated my system in Matlab and everything worked perfect, it's an earth fault recognition system for medium voltage networks.
I programmed everything with very simple commands, not using any complex Matlab functions so that I could easily port and rewrite my code in ST. All is working great but one thing that is bothering me and I'm getting an error from.
I hav the following simple for loop:
Code:
FOR m:=1 TO 1000 BY 1 DO
FOR n:=1 TO (n-m+1) BY 1 DO
output[m]:=output[m]+(input[n]*input[n+m-1]);
END_FOR;
END_FOR;
input and output are ARRAY[0..1000] OF REAL;
I get an error saying that I cannot use input[n+m-1], not even input[n+1]! How is that possible? I'm not PLC expert I'm just starting out and that seems like basic programming syntax to me like with other normal languages.
Any way I can get around this to access and read those type of array elements?
Thanks!