Step7 What exactly does the STA bit show when viewing a running program.

RMA

Member
Join Date
Sep 2004
Location
North of Hamburg, Germany
Posts
2,052
This is something that's been annoying me on and off for months if not years, but I've finally got sufficiently pi$$ed off to want to get to the bottom of it at last.

I've always thought that the STA Bit showed the status of the variable that was being operated on (read or written to). In other words if the state of a Bit was TRUE then the STA Bit would show "1" and if it's FALSE then STA would show "0". At least that's my understanding of what it says in the help file (disregarding the fact that on this occasion as well as most others, irrespective of whether I read the German or English version, even after reading it a dozen times, I'm never 100% sure that I've really understood what they're trying to say! :) ).

Status_Bit.JPG


Every now and then, however, this is not the case and I need to revert to a VAT to find out what's really happening. What I haven't fathomed out are the circumstances under which this happens. Can some kind soul out there please explain to me what's going on here!

Status_Anzeige.JPG


VAT_Status_Bit.JPG


How come my M999.x Marker Bits don't show "1" in the STA Bit? At first I thought it might have something to do with the Bit only being set and not read in the original program, so I changed to assign (=) and then added the query immediately after it, no change!
 
I was going to suggest performing a L STW instruction in between the logic instructions so you could monitor the STA bit in the accumulator. Unfortunately the STA bit does not get transferred to the accumulator in the 300 series :(

I can only suggest it is the monitoring tool at "fault" - but then to be fair how can it show the value of M999.0 at two instants in time separated by one instruction (that's about 0.1 microseconds) ?
 
but then to be fair how can it show the value of M999.0 at two instants in time separated by one instruction (that's about 0.1 microseconds) ?




Yes, but the data isn't changing during this time, in fact the signal is in a constant state for several seconds at a time. In my original query I had the following:
A M212.1
AN M310.0
S M999.0

because it turned out that the polarity of M310.0 was the opposite of what I expected, instead of trapping the expected, rare, occurence in M999.0, the signal was permanently on, but displayed in STA with a "0".

I've seen this on quite a few occasions and it drives me nuts, because it usually takes a while before you become suspicious and check the data in a VAT. If you don't become suspicious, you can spend a heck of a lot of time looking for a believed fault, which doesn't really exist - not nice! :(
 

Similar Topics

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
119
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
139
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
125
Hi all, I am trying to convert RSLogix 5000 program to Step7. I need to bit shift left my array of double integers for tracking the product on...
Replies
2
Views
519
I have a word in some DB which I want to load to AR1 and use as a pointer. In order to do this I need to write L DBxy.DBW xy SLD 3 LAR1 I...
Replies
3
Views
531
Back
Top Bottom