3/18/2009 12:29 PM | |
Posts: 2348 Rating:
|
I can recommend using http://support.automation.siemens.com/WW/view/en/20443243 and Step7 integrated help with topic "ANY data type" To be short: ANY is pointer type which points to area (not particular variable, but range of variables). For exampleP#DB1.DBB20 REAL 5 (range of 5 reals beginning atDB1.DBB20). P area - didn't met anywhere, usually I or Q is used. V area - it's local stack area of calling block. You see, parameters with length > 4 bytes can't be trasfered to called function. In this case pointer to such parameter is written to local data of calling block and only pointer trasfered. So in called block this data is accessed via P#V... As for parameter types = also never met. In theory such project structure can exist, but in practice i didn't find any advantages it could give. If someone has more info - please share:^) |
This contribution was helpful to
1 thankful Users |
3/18/2009 2:54 PM | |
Posts: 557 Rating:
|
HI Thanks for your reply. i think these all are the machine code, siemens has givenhelp in ANY data type in simatic manager softwere. but there is no example for these code.my understanding is plc is digital operating electronic sytem, it can understand 0(low) or 1(high) for exampledigital input signal==80 in hexa(bin 10000000) it mean I0.0have some machine code. siemens has given all code,but there is no example if anybody know please put by example. regards |
3/18/2009 6:36 PM | ||||||||||||||||||||
Posts: 2661 Rating:
|
Hi Eastern, P is for periphery area (without process image). For example IW20 in the process image corresponds to PIW20 in the periphery. The first table in your postrepresents area codingin theANY & DBpointers and the second table represents the data type coding in the ANY pointers. These codes are not machine codes... They are very useful for preparing ANY pointers using indirect addressing inside an FBwith temp data. The structure of the ANY pointer for data types is as follows:
Regards Added: I have made an example (STL source attached) for transferring 10 input bytes to 10 output bytes in an FB using SFC20:BLKMOV. AttachmentBLKMOV_EXAMPLE.zip (567 Downloads) |
|||||||||||||||||||
Last edited by: Phantom75 at: 3/18/2009 8:43 PMAttached Example |
||||||||||||||||||||
This contribution was helpful to
1 thankful Users |
3/19/2009 5:32 AM | |
Posts: 557 Rating:
|
hi Thanks for your reply. please find the attachment for some code program.if anybody have more idea please share. regards AttachmentCODE.zip (590 Downloads) |
3/19/2009 9:41 AM | |
Posts: 2348 Rating:
|
Hmm, when i was trying P area in pointer few years ago i didn't succeed. Maybe i did something wrong (i was learning that time), but i couldn't get PIW.. Will check that:^) What about mashine codes - it may be true, but with similar probability it may be wrong^) |
3/20/2009 5:18 AM | |
Posts: 557 Rating:
|
HI Aret, I got some program for p area....... try this L DW#16#80000001 LAR1 // P0.1 A M[AR1,P#0.0] // A M0.1 REGARDS |
3/20/2009 6:23 AM | |
Posts: 2348 Rating:
|
Thanks, Eastern. But it's not so interesting this way. Does it work if you write A [AR1,P#0.0] ? (without specifying area in command)? |
3/20/2009 9:17 AM | |
Posts: 557 Rating:
|
Dear Aret, i have not written A [AR1,P#0.0] ? i have written A M [AR1,P#0.0] Plese find the attach, which will give you a online help. by using this i would like to give you a one example. DB1=ALARM DB DB2=i required to latch like ADB1.DBX0.0 S DB2.DBX0.0 - - -- ADB1.DBX10.0 S DB2.DBX10.0 HERE EXAMPLE L MD0 //COUNTER WHICH WILL INCREMENT P#0.0 L DW#16#80000000 // P AREA +D T MD4 LAR1 // HERE you will get p#0.0 to p#10.0 by incrementing the counter OPN DB1 A DBX [AR1,P#0.0] OPN DB2 S DBX []AR1,P#0.0] SO DB1 WILL MAP WITH DB2 BY INCREMENTING COUNTER . regards AttachmentOnline.zip (514 Downloads) |
3/20/2009 11:31 AM | |
Joined: 1/4/2008 Last visit: 1/4/2025 Posts: 703 Rating:
|
Hello, I'm pretty sure that Aret knows this. He would like to know if it works as area-crossing indirect addressing (A [AR1,P#0.0]). When it's used as A M [AR1,P#0.0] it means area-internal indirect addressing. It willaccess directly M area and the area ID inside the pointer is omitted. I've never used indirect addressing of periphery but at least it couldn't be used as first code example, because it's bit access which is impossible in the case of periphery.What seems strange to me is that there isn't specification if it should be input or output, because the address number could be the same for both. Regards Sydney |
This contribution was helpful to
1 thankful Users |
Follow us on