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.
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.