Siemens Step-7 :- Array copy

Here's a more generalised implementation using symbolic addressing (view FC1 in symbolic mode). I've also included a generalised array read/write for an array of ints. Unfortunately FC1 now has to contain some STL for initialising the ANY pointers used by SFC20

As you can see, you can quickly build up a suite of blocks for accessing array data which you can access using ladder.
 
Last edited:
Here's a more generalised implementation using symbolic addressing (view FC1 in symbolic mode). I've also included a generalised array read/write for an array of ints. Unfortunately FC1 now has to contain some STL for initialising the ANY pointers used by SFC20

As you can see, you can quickly build up a suite of blocks for accessing array data which you can access using ladder.

YOU are an ABSOLUTE HERO.
Thank you SO MUCH, particularly "put" & "get".
I am going to have to get to grips with "LAR".

I am going to take what you have done and learn a hell of a lot.
 
I am going to take what you have done ...
Well exactly!

I don't understand the background to this entire thread. There must be several examples elsewhere in this forum of shift registers, arrays, symbolic addressing, etc in S7. Yet there's no evidence that you've searched or done prep work.

The original post seemed more concerned with complaining that Siemens wasn't Rockwell. That's like blaming apples for not being oranges.

And as for the 30 year experience, I notice you started a Rockwell thread in Dec 2010 (9 months ago) in which you described yourself as a newbie?

Are you actually relatively new to PLCs themselves, having used other control methods and programming systems in the past? If so, welcome to the crazy world of PLCs!! No two are ever going to offer the same features/facilities/techniques and often you can't extrapolate experience from one system to another. This can even happen within the same manufacturer's range. This lack of transportability of code/knowledge/methods between systems is infuriating at times, but keeps us all in a job at others.
Hey, if it was too easy, the customers would start doing it themselves, right?
 

I don't know why I have to justify myself to anyone, but I will. At least "L D[AR2,P#0.0]" reconised reconised my frustration.

1) if YOU did YOUR research properly you will have noticed I was a "newbie" to AoI within RsLogix and wanted some guidance.

2) if YOU did YOUR research properly you will have noticed I did say this was all part of the learning curve.

3) if YOU did YOUR reseach properly you would have pointed me to the article that explained how I could do
FOR x:= 1 to 200 DO
A[x+1] := A[x]
END
in Ladder/Statement List. WOuld have saved a lot of time.


4) This thread was started in hope that someone could point me
into the right direction with array shifting for product tracking. A basic concept that a solution must exist.

5) Yes, I am shocked that in 2011 a statement such as "A[x]" is not permitted and it has to be "A[2]". Great fun for a variable length machine with variable product paths and product parts. Perhaps getting rid of symbolic names may help also

6) "Hey, if it was too easy, the customers would start doing it themselves, right?". Clearly you have not dealt with customers I have had to.

Strangly they want simple software, which they can validate, they can trust, that they can understand and modify themselves (or ask supplied to enhance in furture at minimum cost).
I suppose making software "difficult" (something I struggle to do), non maintiainable and verbose would keep me in a job. But there again the opposite seems to keep me in a job
 
What's with all the SHOUTING?

Looking at your posts in this thread I felt as least as much effort had gone in to demonstrating that you knew how to solve the problem in Rockwell as asking for help in Siemens. That really wasn't relevant. All you needed to display was a clear definition of the problem and ask for assistance. The Rockwell element was a complete distraction.

You posted your OP at 09:17am and by 09:56am I offered the first suggestion and asked for more info. Others contributed their views really promptly with alternatives as you fleshed things out, but by post #15 at 03:32pm you were still telling us how to do it in AB.

Clearly you have a lot of expertise in AB (you've told us so), so I went looking to see how you answered other people's queries in the past. Knowing how someone explains things often helps when you want to explain something back to them. But I couldn't find anything that suggested you've helped other users here at all. A forum like this has to be a two-way street. Your only other thread (where I found the self-attached newbie label) began at 09:31 one day, and by 10:26 the same morning you answered your own question. It gave the appearance of someone requesting help from others as a starting point and then doing some rudimentary research by themselves afterwards. I say 'rudimentary', as finding your own answer in about 55 minutes doesn't seem to suggest it was an obscure topic.

Then I wondered: "Ok, he doesn't know Siemens, he doesn't help anyone with AB, could he be coming from a completely different background, outside PLCs? Is that what has caused the lack of code transportability to be a big issue?"

So yes, my second post rolled all these points in to one.
And all I got was a fusillade of aggression in response. The bit that really hit was point 3 accusing me of not doing my research to provide an answer and save time for you! Ouch! That's stretching the bonds of friendship a little too far.

And Uptown47, I did abridge the quote deliberately. I wasn't attempting to be nice. Based on my 'research' all I saw was a poster whose contributions to the forum emphasised the taking of what others could do for him. There's a hundred possible explanations for all this. Maybe SirLightBulb uses one identity to ask for help, and another one, with over 5000 posts to his credit, where he provides perfect timely assistance? We may never know.
 

Similar Topics

Good Morning. I would like to know how you can convert a string to a barcode from string to char. Basically my reader barcode reading puts me in...
Replies
1
Views
2,052
Hey i have a array [1..10] that holds an other array with [1..10] real I wonder if there is an easy way to compare those 100 values? I want to...
Replies
3
Views
6,485
Good Morning, Hoping someone with some Siemens experience can give me a hand with this one. Customer has a S7-200 cpu, which has a 6GK7...
Replies
0
Views
264
I'm just trying to figure out the right method of adding a DO card to an existing rack. It's not the *next* open slot, but I have to move the AO...
Replies
5
Views
567
Hi Siemens Experts, I am hoping someone can shed some light on my issue. I have uploaded the code from a S7-300 (317-2PN/DP) using Step 7...
Replies
9
Views
706
Back
Top Bottom