Hello All,
I'm busy with a project and run accross some problems.
Here it is:
I have an integer table of 80 values: For example N7:0 to N7:79.
With every falling edge of a limit switch I want to move all the data 1 up. (In N7:0 comes a value of 0,1,2,3,4,5,6 or 7 to describe the product)
That is:
N7:78-->N7:79
N7:77-->N7:78
...
N7:0-->N7:1
and finally I put a new value in N7:0
I do not care about the loss of data in N7:79.
(On the conveyor way N7:x is read in some stations but NEVER modified)
I'm not so used to work with the register functions.
So I planned to make the shift by myself...but if I just type it out...it means a lot of work. (Not that I'm lazy, but it doesn't look elegant).
I tried to use a loop (Within one program scan) for 80 times with indirect adressing, but that will do really bad for the scan time.
(It is much better to type the whole thing out than to use such a loop).
I suppose I will have to do it with ffl and ffu...but that makes it somewhat more difficult to handle.
If I write as above, I can really control by many ways.
Any experience is very thankfully welcome,
Kind regards
Birdy
I'm busy with a project and run accross some problems.
Here it is:
I have an integer table of 80 values: For example N7:0 to N7:79.
With every falling edge of a limit switch I want to move all the data 1 up. (In N7:0 comes a value of 0,1,2,3,4,5,6 or 7 to describe the product)
That is:
N7:78-->N7:79
N7:77-->N7:78
...
N7:0-->N7:1
and finally I put a new value in N7:0
I do not care about the loss of data in N7:79.
(On the conveyor way N7:x is read in some stations but NEVER modified)
I'm not so used to work with the register functions.
So I planned to make the shift by myself...but if I just type it out...it means a lot of work. (Not that I'm lazy, but it doesn't look elegant).
I tried to use a loop (Within one program scan) for 80 times with indirect adressing, but that will do really bad for the scan time.
(It is much better to type the whole thing out than to use such a loop).
I suppose I will have to do it with ffl and ffu...but that makes it somewhat more difficult to handle.
If I write as above, I can really control by many ways.
Any experience is very thankfully welcome,
Kind regards
Birdy