Need example PLC program of siemens 1200 series

The SCL is going to be mostly the same. There will be a few instructions that probably are different from one to the other, but other than that I think it will look very similar.

Is there something specific you are trying to do?
 
It is a bit of a shock starting with SCL, particularly if you have little experience with computer programming. SCL is very similar to a language called Pascal, the formatting follows it very closely. SCL is best used for things that involve calculation, whereas Ladder is best for binary logic. You can't mix languages within a block, but you can within a program and then call an SCL Function from within a Ladder block or vice versa.

The picture below or attached is a small SCL program that clears some memory in a non-optimised DB.

Stuff to notice:
Comments are preceded by double forward slash.
Ends of statements are show with a semicolon (; ).
Ends of lines may not be ends of statements, so within the Poke function variables are separated by comma (, ).
Variables have a # at the beginning, but if you copy and paste the variable from somewhere else TIA will add the # for you.
If you want to store a calculated variable you start with the name of the variable (don't forget the #), followed by a colon :) ) then the equals (=) followed by the formula.

If you open or create an SCL block, the library on the right of the screen changes to show SCL instruction, and you can access the help for each instruction the same as for Ladder.

Small SCL.JPG
 

Similar Topics

Hi, All!!! I'm new member in this forum.. I need some help from all members.. I need some example sources program Ladder for ON-OFF logic on HVAC...
Replies
3
Views
2,370
Hello all! I have a PN Coupler connecting two PLCs, one on X1 and one on X2 and am able to transfer data using the IN and OUT configuration...
Replies
1
Views
1,180
Using a PLC-5 .. I have a need to send ASCII to a really dumb annunciation device over serial. There were only 5 strings I ever sent so for...
Replies
17
Views
5,082
Need good example/sample of aoi RSLogix5000 code to read&write through RS232 port on Need good example/sample of aoi RSLogix5000 code to...
Replies
0
Views
1,838
Hi friends, i am new to the sucosoft programming software of Moeller. i need some example programs which are done in ladder logic diagram. please...
Replies
0
Views
1,660
Back
Top Bottom