danny135792000
Member
- Join Date
- Mar 2003
- Posts
- 3
Hello
I'm using RS 500
I would like to move six numbers (N7:1 thru N7:6) to different locations in file N10 depending on the value in N7:0.
e.g. If N7:0 = 1 I want to move N7:1 thru N7:6 to N10:4 thru N10:9
If N7:0 = 2 move them (N7:1 thru N7:6) to N10:24 thru N10:29
If N7:0 = 3 move to N10:44 thru N10:49
and so on.
The number of different values in N7:0 could be as many as 20.
The number of words to be moved may increase from six to as many as 19.
Needless to say I'm a novice with PLC's but I think I could do this with a bunch of if statements. However, I'm sure there's a more efficient way to do it?
Thank you
Danny
I'm using RS 500
I would like to move six numbers (N7:1 thru N7:6) to different locations in file N10 depending on the value in N7:0.
e.g. If N7:0 = 1 I want to move N7:1 thru N7:6 to N10:4 thru N10:9
If N7:0 = 2 move them (N7:1 thru N7:6) to N10:24 thru N10:29
If N7:0 = 3 move to N10:44 thru N10:49
and so on.
The number of different values in N7:0 could be as many as 20.
The number of words to be moved may increase from six to as many as 19.
Needless to say I'm a novice with PLC's but I think I could do this with a bunch of if statements. However, I'm sure there's a more efficient way to do it?
Thank you
Danny