C program conversion to S7-SCL


Thread Starter


Hello everyone,

I am a newbie to Siemens S7 programming. I have a program written in C which I am porting over to SCL. My C program has some pointers that are being used. How do I convert them to S7-SCL? Are there any "pointers" in S7-SCL? I looked into ANY datatype but I don't think that it will help.

With best regards,

Curt Wuollet

Not a big Siemens fan but generally you might benefit by converting your concise, elegant, C pointer math into array indexing operations. This will get you far closer to the PLC way of doing things. There are various sorta pointer like things to abstract addresses, but they aren't very portable. As a rule, you will be dealing with integers as absolute addresses and hard allocated arrays and structures. If you get way down the Siemens way of things there are some lower level things but some of them serve mostly to make code nasty to read and their advantage is often questionable. First make it work with KISS and then make it elegant. Getting used to their ideas in OO will be plenty for a while.


Chris Deverill

SCL is a lot closer to Pascal than it is to C. So try writing your programs in Pascal - the programs I've written this way have ported relatively easily to SCL.

Chris D