Array Indexing in Siemens PLCs

J

Thread Starter

James Ingraham

I have several times complained about a major (in my opinion) missing feature from Siemens PLCs. While S7 / Step 7 allows you to create an array, you can't index them with a variable. This defeats the whole purpose of an array. Array indexing by variable is now allowed, but only in Step 7 Basic for S7-1200. This is an interesting limitation; the 1200 is not meant to be a high-end PLC / PAC. Siemens often compares it to Allen-Bradley's MicroLogix. (Take this article, for example, which mentions a Siemens webinar comparing the two. http://www.totallyintegratedautomation.com/2010/09/analyzing-competing-controller-platforms/ ) Supposedly, they will have a broader range of PLCs that support the new features the 1200 has, but for now that's the only controller you can do this on.

One further restriction. In a Rockwell ControlLogix / CompactLogix PLC if I want to index an array I just do it. In an Add instruction I can type in a my_array[current_index] in one field, 7 in the next, and result[different_index] in the destination. In Step 7 Basic you have to explicitly call a function for getting or setting an index in an array, so you have an extra step to do.

Here's the link to a video describing the new feature.
http://www.automation.siemens.com/s...basic-screencasts/en/video-12/video-12-en.htm

Finally, I'm curious as to other people's feelings on this. Are all the Siemens users out there jumping for joy, or do you just never need to index an array? Am I the only one that thinks this is a critical feature?

-James Ingraham
Sage Automation, Inc.
 
S
I haven't done a S7-1200 job yet, but I agree with you. I always found that to be a glaring omission in the 300's and 400's.

Logix platform PLC's have their issues too, though. Sold as semi-specialized for motion, you can't put axes in an array, nor do THISARRAY[THATARRAY[CURRENTINDEX]], nor put AXES into a UDT, all of which, in my mind, are a failure to finish the power paradigm they envisioned for the Logix.
 
B

bob peterson

I never noticed that Siemens did not have that feature. I use it a lot in AB PLCs. It is great for creating pattern files and that kind of thing where the operator needs to be able to configure how something is done, but you don't know what it is up front. It can be very slick and very powerful, also a bit confusing for the novice who looks at it. Almost like the way a CNC program works.

--
Bob
 
J

James Ingraham

In replay to Steve Myres:

It would definitely be helpful to alias ANY hardware from inside a UDT or array. I've actually spoken to Rockwell about it, and basically got a "We're looking at it, but don't hold your breath" response. I guess nothing can be perfect.

-James Ingraham
Sage Automation, Inc.
 
S
It's really weird, though. They decide to build a new family of controllers, sit around and think of a concept that would be really cool, implement about 60% of it, and start selling it! And upgrade it for 15-20 major versions over 10-15 years without ever doing the stuff that was so strongly demanded by the original concept. Oh, AND no backward compatibility between firmware versions!
 
Top