Step7 S7317 problem with a temp varibale

spook

Member
Join Date
Jul 2006
Location
Paris
Posts
5
Hello,

I met last week a problem with a temp variable in a FC. I changed the program since but i want to understand because other FC/FB uses temp variable.

In the same rung i write then load a tempreal value, and get different values, when i read values online.

Code:
      L     "DBWaterAir".SetPoint_LevelTeepolTank    80.0
      L     5.000000e+000                5.00
      -R    
      T     "TempReal"                    75.00

      U(    
      O     "DBWaterAir".TeepolRequest
      O(    
      L     "DBWaterAir".LevelTeepolTank_Pourcent    
      L     #TempReal                    26664 (something like this)
      <=R   
      )     
      )     
      U(    
      L     "DBWaterAir".LevelTeepolTank_Pourcent
      L     "DBWaterAir".SetPoint_LevelTeepolTank
      <R    
      )     
      =     "DBWaterAir".TeepolRequest
This temp real was used in an other rung in the same way, but it was ok. When i changed in the second rung the name of the tempreal, in the first rung, the load value wasn't the same??? then i had to change very fast the programm and delete the first tempreal value.

I don't use any L datas, and all temps (3) are real and transferd with real.

If anyone has an idea
Thanks
 
Last edited:
Maybe someone can understand what you write, but I cannot.
Also, is the code you have listed the "bad" code or the "good" code ?

If the listing is the complete code, then you are loading a temporary variable (#TempReal) without initialising it. That wont work.
 
Tx, it was actually this problem between local and memento variable.
Shame on me

Sorry for my bad english
 

Similar Topics

is there any free trial version available for step7 professional and wincc comfort v17. i searched and downloaded TRIAL Download STEP 7...
Replies
1
Views
85
Hello. I need your help. I work at STEP7. There are two CPU 317-2 PN/DP controllers (317-2EK14-0AB0), working on PROFIBUS, as Master (CPU_1) and...
Replies
6
Views
194
This is the first time I am working with Simatic Manager Step7 as I started my siemens journey with TIA which is pretty easy and do a lot of stuff...
Replies
3
Views
188
When you download a DB, the values get overwritten by what is in the "actual" column in offline DB. Does this happen at the start of the PLC...
Replies
6
Views
167
Hello Inside a FB, I´m trying to transfer a string from a DB to a IN_OUT var that was define as a UDT. The problem is that i can´t determine the...
Replies
4
Views
164
Back
Top Bottom