S7 VAT update time

RMA

Member
Join Date
Sep 2004
Location
North of Hamburg, Germany
Posts
2,052
Does anybody know when exactly a Bit which you switch in a VAT table gets updated in the PLC? I would hope that as with the peripheral devices the update takes place outside the normal program cycle - but am I right in my assumption - anbody know for sure?

The thought occurred to me in connection with my FM352-5 problem because in my test program there is nothing else in OB1 other than the calls to the DEBUG and NORMAL FBs for the 3 FMs, so if the update actually takes place during the cycle execution, there's a 50% chance of it happening between the calls to the two FBs controlling one of the FMs allowing both to run at the same time (since the DEBUG FM is called first), which is BIG no-no!
 
I am not sure about it, but it would be fairly simple to find out.

About reads:
Make a test program that writes a "1" into an address at the beginning of the scan, and writes a "2" into the same address at the very end of the scan.
You then observe the address in a VAT. If it stays firmly at "2" or flickers between "1" and "2" will tell you how it works.

About writes:
Make a test program that as the first thing copies the value of an adress into another address.
At the end of the program scan, the two adresses are compared. If they are the same, then you know that the write happens outside the scan. If they are different, then you know that writes can happen inside the scan.
Obviously you will have to make a lot of writes to the first address in order to confirm it 100%.
 
Sounds like a good idea, I'll give it a try sometime. With the read test it sounds like it cuold be fairly easy to see if you intentionally make the scan time fairly long. With the writes, as you say, it sounds like quite a lot entries will be necessary to get a definite idea.

Thanks

Roy
 
Roy

According to Hans Berger:-
In the variable table, select Variable - Trigger to set the trigger point and the trigger conditions seperately for monitoring and modifying. The trigger point is the point at which the CPU reads values from the system memory or writes values to the system memory.

If monitoring and modifying have the same trigger conditions, monitoring is carried out before modifying. If you select the trigger point "Start of cycle" for modifying, the variables are modified after updating of the process input image and before calling OB1. If you select the trigger point "End of cycyle" for monitoring, the status values are displayed after termination of OB1 and before output of the process output image.

Does that help?

Paul
 
Thanks Paul, I didnt even know that this dialog existed !:
[attachment]
It appears from the selectable options that both reads and writes are outside of the program scan.

vat.gif
 
Oops! I did read that a while back and promptly forgot about it. :oops:

I've just checked, and the setting for both reading and writing is start of scan. Since I've never changed it, that must be the default.

Seemed logical, but it's nice to know for sure, I've been bitten more than once after assuming something to be the case, just because it seemed logical that it should be so. I'm a bit more careful about that nowadays!

Thanks Paul.

Cheers

Roy
 
So it seems that the £45 + P&P that I invested in that book was money well spent! :rolleyes:

There are some snippets of information in his books that do make them worth paying for. I like the explanation on indirect addressing in his SCL and STL book, it certainly helped me get my head round it!

When I read this question I was immediately curious as to the answer, because this is something I never really thought about.

Paul
 

Similar Topics

hi guys, please i need to know how edit a table for monitoring a variables in my online project like a VAT in Siemens Step7. tanks Diego
Replies
5
Views
2,457
Is there a way in RSLogix5000 to setup a table to monitor some tags? I am looking something like the VAT tables in Step7 or Animation tables in...
Replies
1
Views
2,549
I am trying to build an FB as a wrapper for a timer... as any of you know me I am jumping into siemens newly/lately. It is not behaving the way I...
Replies
51
Views
17,800
Dear ALL, i have a DB that has a variable as DBD for exampl DB209.DBD40. that double word contain a number that no other FB or FC write to it. i...
Replies
2
Views
1,819
hi in step s7-400 is it possible to force inputs and outputs from variable table.If yes ,how to do it and is it possible to force it from VAT...
Replies
0
Views
1,595
Back
Top Bottom