Tim114
Member
Hello all,
I'm working on my first project with an Allen Bradley Micro 810 using the connected components workbench. Everything is going well so far, but I've
reached a point where I can't seem to progress.
I am using a load cell(amplified) and a set of TON blocks to create an array with known time steps and recorded load cell values for each step. The Array is a DINT[0..100] and seems to be working fine. The problem I need to solve is that every cycle it needs to reset to zero initial value to be able to store new values from the load cell.
Since the COP command does not seem to be implemented in this build of CCW, I was trying to use a MOV to replace the terms of the Load_Cell_Array with an equivalent array of zeros. I have not succeeded in this and found an article on the Allen Bradley knowledgebase(#531939) that suggests using structured text to iteratively replace each Load_Cell_Array value with zero.
I do not yet know how to fix this using ST. I've cobbled together some code that I will paste below, but it shows several errors when I try to build.
If anyone has has a similar experience or has some input on this I would greatly appreciate it.
Thanks in Advance
-Tim
"
PROGRAM Zero_Array
VAR
i : DINT;
VarInput1 : DINT[0..100];
END_VAR;
FOR i := 0 TO 100 BY 1 DO;
VarInput1 := 0;
END_FOR ;
END_PROGRAM;
"
where 'VarInput1' is a connection point on the function block you select 'Load_Cell_Array'
I'm working on my first project with an Allen Bradley Micro 810 using the connected components workbench. Everything is going well so far, but I've
reached a point where I can't seem to progress.
I am using a load cell(amplified) and a set of TON blocks to create an array with known time steps and recorded load cell values for each step. The Array is a DINT[0..100] and seems to be working fine. The problem I need to solve is that every cycle it needs to reset to zero initial value to be able to store new values from the load cell.
Since the COP command does not seem to be implemented in this build of CCW, I was trying to use a MOV to replace the terms of the Load_Cell_Array with an equivalent array of zeros. I have not succeeded in this and found an article on the Allen Bradley knowledgebase(#531939) that suggests using structured text to iteratively replace each Load_Cell_Array value with zero.
I do not yet know how to fix this using ST. I've cobbled together some code that I will paste below, but it shows several errors when I try to build.
If anyone has has a similar experience or has some input on this I would greatly appreciate it.
Thanks in Advance
-Tim
"
PROGRAM Zero_Array
VAR
i : DINT;
VarInput1 : DINT[0..100];
END_VAR;
FOR i := 0 TO 100 BY 1 DO;
VarInput1 := 0;
END_FOR ;
END_PROGRAM;
"
where 'VarInput1' is a connection point on the function block you select 'Load_Cell_Array'