STL FB Output in S7 - How to output word compare?

Join Date
Jun 2011
Location
Tucson, AZ
Posts
1
Hello

I am currently learning on my own how to program a Siemens S7-300, and I have hit a bit of a snag with a FB I am making that will compare two words as inputs into the FB, and then output a bool of 1 if both words match. I have two inputs (Wrd1, Wrd2) and one output (Eql) for the FB. I am using the example found here (also below) but instead of turning on a Q output, I need to set the output of the FB to 1 so I can use this in OB1. How do I do this? This is my first time working with STL, and I have only been working with Step7 for a little over a week now.

Thanks

Current code I have:
Code:
A( 
L    #Wrd1 
L    #Wrd2 
==I 
)
 
Hello

I am currently learning on my own how to program a Siemens S7-300, and I have hit a bit of a snag with a FB I am making that will compare two words as inputs into the FB, and then output a bool of 1 if both words match. I have two inputs (Wrd1, Wrd2) and one output (Eql) for the FB. I am using the example found here (also below) but instead of turning on a Q output, I need to set the output of the FB to 1 so I can use this in OB1. How do I do this? This is my first time working with STL, and I have only been working with Step7 for a little over a week now.

Thanks

Current code I have:
Code:
L    #Wrd1 
L    #Wrd2 
==I 
[COLOR=red]= Eql[/COLOR]
 
[COLOR=red]// or[/COLOR]
 
[COLOR=red]S Egl  // You must reset it elsewhere[/COLOR]


In this particular case you can omit the 'A(' and the ')'.

Kalle
 

Similar Topics

i am new to simatic manager and i am trying to figure what this part do in the code : A I 5.6 = DB50.DBX 4.6...
Replies
3
Views
124
Hello everyone, can anyone help me with covert the STL code to ladder. Iam using plc s71200. A %DB1.DBX33.7 // angel of vaccum...
Replies
2
Views
200
Hello nice to meet you, im new in here, I'm currently trying to convert code written in STL for a S7-400 to SCL for an S7-1500, because when i run...
Replies
5
Views
295
First off thank you in advance. Second I am very new to STL. I am trying to build a counter that has one count up and 23 count down options. Am...
Replies
6
Views
361
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
642
Back
Top Bottom