Sign in to follow this  
Followers 0
Bryll

Strange values

6 posts in this topic

I have a project with a 317F CPU (Program made in Step 7 Classic) and a TP1500 Comfort (Made in TIA Portal V11) communicating on the MPI bus. I'm reading two analog values that I scale to show an airflow value between 0 to 80 000 m3/h (DINT). The PLC shows the correct decimal values up to 80 000 when monitoring online. But, when I try to display it in the terminal as a bargraph and a decimal value is the highest value 65 534 (2 x 32 767) and for values over that starts from zero and counts up. Everything is declared as DINT, but the panel is displaying as if it was an UINT. I've checked for errors made by me all over the project, but I cant find anything. Any good ideas ?

Share this post


Link to post
Share on other sites
Some more info regarding the problem. In the PLC is two DINT declared (MD26 and MD30) and transferred to the HMI. The HMI has two bargraphs and two decimal value fields for the two DINT's The tag list in the PLC and the one in the HMI are identical, I double checked this a couple of times. Now to the strange thing. One is correct and the other one is corrupt. The corrupt one starts over from zero if the value goes over 65 534. Everything is compiled and transferred to the HMI and PLC several times without any correction of the behaviour. This is such a simple thing so it should work right away. Anyone with a good idea where the problem is ?

Share this post


Link to post
Share on other sites
Hi, Well, if one is correct and not the other, my guess is the wrong value is corrupted somewhere in your program ie MB27 or MW28 could be used in another routine. I'm afraid you don't have much choice but try to cross-ref all the possible components of your DINT, including possible MW/MD on the previous bytes... MW25 could corrupt MD26, so would MD23,24,25... Could also be a problem with the endianess, but you would have it on both values... If you wanna be sure to avoid such a corruption, you oughta think about using a DB to strore those values and see if it gets better. Good luck. Edited by drx

Share this post


Link to post
Share on other sites
Maybe on TP1500, for tags, to choose acquistion mode "continous", not "in operation" (default) for both tags. Edited by Homer_BL

Share this post


Link to post
Share on other sites
They are set to "Continous" already. A guy told me to remove the tags, compile, and then create them again and recompile. It helped him a couple of times when he got similar problems

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0