S7 Constant Format

Ok, so the WOR_W wouldn’t have worked anyway with PQW or Const = PQW ?
I am now using a memory word (MW256) in the program and then MOVE it to the PQW256 at the end. It working well.

Thanks for the info, the P was a bit confusing at first, because you don’t use it on normal outputs Q12.3 for example.

I have a Profinet link to a drive, where I am sending/receiving a Status word.
 
The PQW will work if it is declared as a WORD.
But using an intermediary address for manipulating the data before sending it off to the PQW address is a good way to do it.

Beware that if you are controlling adrive via Profibus or Profinet, then almost certainly you must fetch and send all the data consistently. That means you can NOT write part of the peripherial data (such as a word), you have to fetch or send all the data consistently via SFC14 and SFC15.
If you only have that single word (or double-word) of data it will be OK. If you have more than 4 bytes of data, you must use SFC14 and SFC15.
 
I am transferring quite a few Words from the drive and I have not noticed any problems. The manuals are very unclear about data consistency and the use of SFC14 & 15.

On previous plcs the I/O is read between program scans. I am new to ProfiNet IO and the manuals assume you have knowledge of ProfiBus, which I don’t either.
Do these PIWs and PQWs provide instant access to the IO then instead of the IO image?
 
The size of the IO image may be modified in the "cycle/Clock memory" tab of the CPU properties in the HW config editor. I *think* the default size is 256 for most current 300 class cpu's. When addressing PIW / PQW you are directly addressing the IO, which is why you get a IO access error if the IO is not present (OB122).
 
Does that mean I need to copy all my ProfiNet PIW/PQWs to/from a memory area (DB or MW) manually at the beginning of OB1 to use in my program? Otherwise any IO access using P will slow down the system?

The default process image area size for inputs and outputs is 128 each on my system. Does this mean IO addresses over I/QW128 have to be accessed directly with PI/PQW?

Thanks for helping clear things up.
 
I found this on the Siemens site, it explains things much clearer than the manual.
http://support.automation.siemens.com/WW/llisapi.dll?func=cslib.csinfo&objId=24148871

In the example peripheral IO access is 15 micro seconds slower, but I am guessing it will be much more over ProfiNet?

Outputs are usually only wrote to once in the program, but Inputs are accessed many times, so I think the Inputs need to be cashed to avoid multiple PIWs in the scan cycle. There seems to be two choices;
1, Expand the process image area to include all my ProfiNet inputs.
2, Copy all the PIW to a DB.

Am I on the right track?
 

Similar Topics

I am new to using Functional Block Diagram (FDB) language programming in CCW. I want to set a variable to a constant if a contact is closed...
Replies
7
Views
451
Hello all, this is my first time working with a PLC and dealing with hardware, so please have patience with me. I have an electric rod-style...
Replies
21
Views
3,104
Hello, I have posed a similar question before, but the DB then provided me with pre-allocated "spares". In this instance I need to declare a...
Replies
13
Views
4,192
Hello gentlemen, Why does this work: VAR CONSTANT SIZE_OF_dutEVENT : UDINT := SIZEOF (DUT_Event); MAX_SIZE_OF_dutEVENT : UDINT := 5...
Replies
2
Views
1,643
Hi! I know there is a lot of skilled people with Schneider somachine in this forum, so i have to ask something. How and why do you use constant...
Replies
4
Views
2,237
Back
Top Bottom