Siemens STL

godfrey

Member
Join Date
Apr 2002
Location
Charlotte, NC
Posts
412
I'm trying to understand some of the following code which was not written by me:
STL28272.JPG

The code I believe is supposed to latch an alarm. I think I understand the first half. The value of an analog input is compared to 32767. Here's where I get stuck. What is menat by
= L 2.0
A L 2.0
BLD 102

And further down what is
FP "AIT_4150_2_DEV_FAIL_OS"

I think the OS at the end of the above means one-shot but what is the FP?
I believe the last statement resets the bit when the acknowledge button is pressed.
 
See if it converts to LAD or FBD. BLD is used by editor when you are programming in LAD or FBD. It does nothing in CPU.

L2.0 is from the Temp Area

Nick


Format
BLD <number>

Address Description
<number> Number specifies BLD instruction, range from 0 to 255

Description BLD <number>
(program display instruction; null instruction) executes no function and does not affect the status bits. The instruction is used for the programming device (PG) for graphic display. It is created automatically when a Ladder or FBD program is displayed in STL. The address <number> specifies the BLD instruction and is generated by the programming device.
Status word
BR CC 1 CC 0 OV OS OR STA RLO /FC
writes: - - - - - - - - -
 
FP = Flank positive

To create a oneshot on rising edge:

Code:
A input
FP memory
= OSP_input

to create a oneshot on falling edge: (FN = flank negative)

Code:
A input
FN memory
= OSN_input
 
Hi godfrey,


AIAlm01a.JPG

Every time the analog input goes out of range...


AIAlm01b.JPG

...or if an already existing alarm has not been acknowledged yet, a TEMPorary bit (= L 2.0) will be active. Also meaning: the error could disappear, but as long as the alarm has not been acknowledged, the alarm will remain active.


AIAlm02.JPG

If this TEMP bit (so any of the two conditions above) is true, the alarm will be active. Or: If the error is persistant, the alarm bit remains active, even though the alarm has been acknowledged. I'm assuming the programmer wants the problem to be dealt with immediately.


AIAlm03.JPG

Every time the out of range error reoccurs, the acknowledge bit is reset by the rising edge (= FP) of the TEMP. Or: Every reoccuring error will have to be acknowledged.
 
godfrey - if you put your cursor on the FP instruction (whilst in the block editor) and press F1, you will get a description of the instruction.
 
Here is the ladder equivilant of the STL

fp.JPG


As there is a branch in the output section of the ladder, the editor generates an intermediate variable at the branch point (L2.0 in this case). I have always assumed the BLD instruction is used so the programming device can display the status of the ladder at the branch point.

Note that the editor maintains the local variables used and they are always added on after any local variables you have named youself. Provided you stay in ladder viiew you can add more local variables and the editor will automatically relocate the locals generated by the editor. If you switch to stl view and add locals, you will (generally) get a warning that a local is already being used. Any of the ladder that was using the auto allocated locals will now only display in stl.
 

Similar Topics

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
673
I'm having trouble trying to convert this code to ladder, anyone able to help me? A M4.0 A M4.1 A M117.0 AN M17.7 A ( A I38.6 AN I3.7 O ( A M4.5...
Replies
8
Views
1,206
Hello, I am still new to STL. But from what I understand is the JC mnemonic should jump if RLO = 1. If we review both pictures the M0bf RLO = 1...
Replies
5
Views
1,051
Hello, I am working on a project to upgrade some old S5-100U processors. The programs are all uploaded and I don't have descriptors...ugh. Be that...
Replies
4
Views
1,167
I really struggle with STL in Siemens Step 7 Classic. I'll learn chunks, but then I don't use it enough to retain and build on the knowledge. When...
Replies
17
Views
3,216
Back
Top Bottom