What's PW in S5?

uptown47

Lifetime Supporting Member
Join Date
Feb 2008
Location
Over there, next to those boxes
Posts
1,146
Hi all,

I'm converting some software from S5 to S7.

I've got this bit of code:


L QW 12
L KM 11111111 11111101
AW
T PW 12



Is PW 12 peripheral word 12??

There's no network on the S5 so where would this peripheral word 12 be??

What would be the S7 equivalent?

Anyone any ideas?

Cheers

:)
 
PW = periphery word.

T PWx means you are writing to the real world outputs, an instant update.

Analogues addresses started at 256, therefore PW12 means that the program is instantly updating digital output word 12, thats bytes 12 and 13.

EDIT, it looks like in this case it is turning Q 13.1 off, I would have thought it would also T QW 12 as well, or at least turn off Q 13.1 as well, otherwise at the end of the scan Q 13.1 status would be re-written to the output and turn back on if Q 13.1 was left on.
 
Last edited:
The equivalent for T PW12 (S5) would be T PQW12 in S7, assuming the I/O addresses are the same.

Kind regards,
 
PeterW said:
PW = periphery word.

T PWx means you are writing to the real world outputs, an instant update.

Analogues addresses started at 256, therefore PW12 means that the program is instantly updating digital output word 12, thats bytes 12 and 13.

EDIT, it looks like in this case it is turning Q 13.1 off, I would have thought it would also T QW 12 as well, or at least turn off Q 13.1 as well, otherwise at the end of the scan Q 13.1 status would be re-written to the output and turn back on if Q 13.1 was left on.

Are not the PW for analogs starting @ PW128 for the first slot?
 
There's no analogues outputs on the system or any networked devices. So does that mean that its basically just updating QW 12 ??


I can't see how it can be the equivalent of PQW12 with no networked devices attached to the PLC ?

Thanks for your help so far...

:)
 
In S5 you only knew whether the PW was an input or output as implied by use. L PW was always an input, T PW was always an output.

With S7, PIW = Input peripheral, PQW = Output peripheral.

To understand what is happening here you must understand that in S5, QW12 IS NOT THE OUTPUT, but an IMAGE table of the outputs, much the same way as IW12 is NOT THE INPUT, but an image.

At the start of the scan, the REAL INPUTS, the periphery area, is transferred into the IMAGE and the image is used in the program. The outputs Q's are updated and at the end of the scan these are transferred to the REAL outputs, again the periphery.

So loading and transferring to periphery area's within the scan just means you are updating from or to the IMAGE with the real status at that time.

It does not mean the periphery is analog or any network device, in the case you have shown it is simple digital I/O. It is updating 16 digital output bits Q12.0 through to Q13.7, within the scan.

To transfer to PQW12 in Step 7 is the wquivalent to T PW12 in Step 5, it is imediately updating the peripheral output.

Nothing to do with networks.
 
Peter

Many thanks for clarifying that for me.

People say you learn something new every day.. I must have learnt at least a weeks worth today!

Thanks again


JP, you were bang on with your answer. Many thanks.

:)
 
Back
Top Bottom