Working in STEP 7 - documentation example

Pandiani

Lifetime Supporting Member
Join Date
Apr 2005
Location
Tz
Posts
718
Hello guys,

a friend of mine is learning basics steps in STEP 7 programming. He was going through example "Working with STEP7.pdf" from standard documentation. Sample progam is called "ZEn01_05_STEP7__LAD_1-9". He asked me a question which I didn't know to answer so I must ask for your help. In that example there is one FB(Engine) with two DBs (Diesel and Petrol). Both DBs have integer static variable called "Preset Speed". In function block there is compare instruction that compares this value with input INT value. Diesel and Petrol DBs have different Preset speed value (1200 and 1500) as you can see yourself.
In OB1 both FBs are called (actually one FB with different DBs). When he tried to monitor both Function block calls (PLCSIM) he was surprised that in both block calls input argument is compared with same value (1500) although different values are entered into DBs.
I check it myself and determine that while it is true that Monitor values displayed are same, in reality program works with different "Preset speed values" as entered in appropriarte DBs. I'm not sure if this some kind of bug in STEP7 or PLCSIM, but it is true that no matter which FB call is chosen for monitoring (right click ->Monitor), in Network 2 ("monitoring the speed") always is written 1500 but actually appropriate number is used.
In fact FB online monitoring is lying. Is that same case with you? Is this known issue? I think this is wrong because someone can be easily mislead by watching monitored values.
Preset_speed.jpg
 
Simon, that is very helpful link.
I manage to perform correct monitoring in the following way:
1. Debug -> Operation ->Test operation
2. (still offline) Open FB and chose Debug ->Call enviroment
3. I've checked "Open datablocks" and entered 2 in Instance DB number field.
Now I am able to monitor correct values.

So this is not some kind of bug. I wonder why this is made like this.
 
Last edited:

Similar Topics

Hi Guys. Our system is based on iFix and PLC 300/400. We recentle changed from using the Six driver from Proscada to Keepware server. After...
Replies
4
Views
2,105
Hi every one I want to connect the two stations in step 7 I have a CPU 315-2PN/DP as a master and the CPU 315-2 DP can any one help me by showing...
Replies
2
Views
1,414
Hi all, I have a im151-8 cpu as the ring manager and three im151-3 pn as the ring clients. I have set up the hardware configuration and the ring...
Replies
2
Views
4,570
:mad: I am facing a strange problem. I have built a simple SFB4 TON being turned on by a bit M80.0 & with a fixed time of T#5S. (Seperate DB...
Replies
2
Views
3,772
I installed S5 V 7.23 SOFTWARE ON WINDOWS XP-SP1.WHEN I CLICK THE step 5 program, just display the windows and disappear.please suggest me how to...
Replies
4
Views
11,892
Back
Top Bottom