Detecting Step7 DB number in FBD

cmulder

Member
Join Date
Nov 2002
Posts
14
Hi all,

I am programming with Step 7, v 5.2, servicepack 1. I have created an FB, with (amongst others) a BLOCK_DB for an input. Within the created FB I want to detect the actual number of the DB.

I know that when using SCL one can just call the function BLOCK_DB_TO_WORD. However, when programming in FBD this function is not available (or at least, I can not find it).

How can I easily detect the number of a BLOCK_DB when programming in FBD?

Thanks in advance,
Caspar
 
In dont think there is any way to program this in FBD but you can insert a STL network and use the instruction "L DBNO". This instruction loads the current db number in accu 1. Or if you dont want to use stl in your code hide the instruction in your own FC with the number as an INT outvariable.
 
Yep, you are correct. So, I made you a FBD block. Just insert it anywhere, as many times as you want and it will return the DB that is currently OPEN
 

Similar Topics

Hey again guys, Having all kinds of issues this week. Is there a way to detect when an integer value changes? I need to set a BOOL every time...
Replies
8
Views
8,158
Dear all, What is the name of the function used for positive edge detection in Step7 SCL ?? Thank you
Replies
8
Views
13,069
I've been called to a site to assist with an ASi fault. The line has been down for a couple of weeks following a failure of the ASi power supply...
Replies
6
Views
1,301
I am looking at an application where I will need to detect small hairline cracks in stamped metal parts. The sensing will need to be done in the...
Replies
10
Views
1,138
Hello everybody, I am working on a project which has HMI FTView SE 13 (Local) and controllogix L71 PLC. I have a question how does PLC detect a...
Replies
0
Views
513
Back
Top Bottom