Declare PIW PQW(Analog values) in WinCC

But where i have to enter this PIW0 - 256 r PQW0 - 256
in the address section... there is nothing like that..only i,q,db,mw is available ....

What abt PIw PQW

CAn u plz give any examples ?????
 
Declaring PIW and PQW in WinCC

The PIW and PQW addresses for modules are set in HWconfig, i.e., select the PLC station in the project tree, then select Hardware. This is where you define the modules on a rack. Normally, the addresses are assigned automatically, but you can modify if needed. Generally, when referencing a Profibus slave device, you would want the PIW and PQW addresses the same because of limitations in the FBs/FCs used to read from/write to the slave.

The addresses defined for the module or slave are the PIW and PQW addresses used to access the channels on the card.

Each module is reported back in counts, which then is usually converted to an engineering unit value, using a linear conversion.

Normally the count range is 0 to 27648 for a 4-20ma signal or a 0-10v signal or whatever corresponds to 0 to 100% of span.
 
Sorry, forgot that for analog channels, each channel is reported as a WORD value, therefore an analog input card with addresses 256 to 271 will be read as follows:

PIW 256 - Channel 0
PIW 258 - Channel 1
PIW 260 - Channel 2
PIW 262 - Channel 3
PIW 264 - Channel 4
PIW 266 - Channel 5
PIW 268 - Channel 6
PIW 270 - Channel 7

The next analog input card would then normally have a starting address of 272.
 
macs_plc,

I believe (but I'm not 100% sure) that WinCC can't access hardware addresses directly. So it might be impossible to reach out the PIW/PQW from WinCC. Solution is or to map hardware modules to the process image (and access it as IW/QW) or to use intermediate storage like the data block.
 
This is wat iam trying for ... even though i assign any analog modules in hardware...i cant give piq and pqw directly to the Wincc...
for Example:
Consider iam having a tank level sensor, which i assigned as "piw123" in simatic manager....
when i try to assign a tag for it...i didnt see the piw address...

One more thing..."jacekd" said it should be mapped with " process image (and access it as IW/QW)" --->> i think this will work

How to procees map PIW PQW to IW and QW ???

Any example there ????
 
Last edited:
macs_plc,
tell me exact S7-CPU type (by means of the order number) and I'll try to tell you if mapping is possible with your CPU.

General idea is to change the base address of an io module so it lies in range of the process image. But not all CPUs support this feature.

Ex. for CPU S7-314C the process image is 128 bytes. If you change in HWConfig the base address of an analogue input module to something like 100 (decimal) the you can access its first channel as IW100, second - IW102 and so on...
 
How to do it.

howtoyr6.jpg
 
Iam using the same "CPU S7-314C"...
Is it possible to view the changes in piw 0-256 in WinCC (i mean every changes(0-100))....coz iam using a tank fill level sensor (piw 34 - 78) sensors in my project...
to b frank iam new to WinCC...


For that how can i declare the piw and pqw...in means of iw qw...
and how can i assign ie ...unsigned 8 r 16 ????
 
i know that piw starts with 256 --
were and how can i move or io map that piw....?
for example
piw to iw,qw, like this ???
were and how can i movethat values ?
coz i cant directly access piw in program
 
Normally with analogs you would scale the value into engineering units in the PLC then move the scaled value into a data block/dataword.

WinCC is not able to access PIW/PQW because they are not memory, they are direct reads of the hardware.

As shown above you can move the address of the module into the process image area, you can then access it as IW, downside is that this eats up big chuncks of the process image (Process image is the RAM assigned by the CPU to buffer the I/O, so the processor reads/writes the I/O every scan, and puts it into IW/QW area. so when you access IWxxx in your program you are reading a memory location which was updated with PIWxxx at the start of the scan, automatically by the CPU)

If you dont want to scale the value in the PLC then something like

L PIW256
T DB100.DBW2

would work

but remember to create the DB first.

Or you could use MW area if you dont want to use a Data Block
 
As u said how can i move
"address of the analog module into the process image area, you can then access it as IW "
is it done automatically i cant get that term - process image area???
coz i am new 2 siemens...but i worked AB(Flex logix), Gefanuc 90-30 only
 
Process image is the memory area into which the CPU write and reads the I/O values at the start and end of each scan.

Normal scan would be:

Read input values and place them in the process image
Solve program
Write process image to outputs.

This means that when you program L IWxxx in your program you are actually reading a memory location which was written with the value at the start of the scan. on the other hand if you L PIWxxx then you perform an immediate read on the input word.

Advantages of a process image are:

Reading memory rather than hardware, so quicker
Value will not change during the scan even if the input singnal changes, so program is solved with the same value through out. any change in value will be updated before the start of the next scan.

When you configure hardware on S7 you get the option to change the address of modules, what you need to do is to change the address to one below (I think) 128, you then move it into the process image and can then access it as IW both in your program and in WinCC
 

Similar Topics

I'm new in PLC programming. I have a small project which have 12 temperature sensor. How I should declare the variable for this 12 sensor. I...
Replies
4
Views
2,450
I'm new in PLC programming. I have a small project which have 15 temperature sensor. How I should declare the variable for this 15 sensor. I...
Replies
3
Views
1,918
Hello Folks: I'm trying to create a function that takes an DINT to dynamically set the range to a random number generator. Below is the code, I...
Replies
7
Views
1,873
In my WinCC Runtime program, I have to declare these variables: Dim AllProperties As HMIProperties Dim objProperty As HMIProperty Dim...
Replies
0
Views
2,259
Hi all, Anyone knows how to declare a one second pulse in the Rslogix 5000? Is there any command for this function? It does not same like GE or...
Replies
34
Views
86,582
Back
Top Bottom