TIA How to declare the AT overlay (V13)

kaputt

Level-1
Beiträge
100
Reaktionspunkte
10
Zuviel Werbung?
-> Hier kostenlos registrieren
Hi, all!

I cannot get this AT-declaration working. I have tried different approaches, and now are only 2 options left:
- A destructive one:sb8:
- Ask for help.



What I want is to declare an dw-array [0..7] as an overlay to a bit array [0..255].
And why? Because I don't want to fill 256 bools with FALSE, but rather 8 DWs with 0. Cycle time saving.
The compiler says the "dwstep" doesn't exist, but there is never a complain about my declaration.

Here's a picture of my misere:

AT_deklarasjon.gif

MfG
Kaputt
 
So if things aren't intuitive: RTFM.

First, there isn't much intuitive to find in TIA at all, so your'e probably OK on that point.

As you found out by now, using AT is only possible by using non optimized blocks.
It makes some sort of sense, since with optimization, the data might be all over the place within the PLC.
I don't know how the great Siemens-optimization works, overlaying might be problem with that.

For that reason I'm surprised how you managed to declare an AT-View in an optimized block, not using "Set in IDB", in your first screenshot.
I can't manage that here.

"Set in IDB" is the only option enabling you to use AT but I still don't know the mechanism behind it and for what it's needed.
However in the Programming Guideline for S7-1200/1500 (3.5 Retentivity) there is a mention of a possible Performance-problem using it.
So I'm confused about that option.

btw. here is a good summary of the differences between optimized and non optimized.
And I changed the access to non optimized.
Then the variable was error-free. But it is not an overlay anymore, it has got its own address area. Must be wrong still.
Again surprised. Here, TIA v13SP1Upd1, I have no Problem making that declare.
AT_Example.jpg

Are you declaring the AT the same way I am?
1) declare bit Array
2) in the next line, set cursor on Data-type, type in "AT" an hit Enter
3) set desired Data-type (Array of DINT)
4) set varname

I'm sticking to non optimized for now, if I need an AT.
 
Zuletzt bearbeitet:
Zuviel Werbung?
-> Hier kostenlos registrieren
Hi!

If you are using S7-300 or S7-400 CPU's, the AT-view is only working on SCL.

On S7-1200 and S7-1500 it is working also in other languages.

Greetings,

Ottmar
 
Zuletzt bearbeitet:
Hi again!

I haven't seen your screenshot.
The AT declaring like you have done is okay.

It seems that only the "fill" instruction doesn't work this way.

Try to use this instruction:
dwstep[0] := dw#16#0

Greetings,

Ottmar
 
Thanks for good advices!

I did declare the 'AT' wrongly, by writing it myself in the name column.
So the compiler took it as a part of the variable name.

Ja, ja, I'm old but still learning...and forgetting.

kaputt
 
Zurück
Oben