10/16/2017 2:29 PM | |
Joined: 11/29/2011 Last visit: 2/20/2023 Posts: 1347 Rating:
|
Hi, You are trying to work with the wrong address range. See the In STEP 7 V5.x, with a function, how do you load the address of the ANY pointer for the IN, OUT and IN-OUT parameters into the AR1? FAQ. It details the procedure. Logically:
If you need further assistance. Please come and ask! |
Last edited by: MicroMan at: 10/16/2017 2:35:28 PM- What you read here, please check with manuals and your requirements. |
|
This contribution was helpful to
1 thankful Users |
10/16/2017 11:06 PM | |
Joined: 11/29/2011 Last visit: 2/20/2023 Posts: 1347 Rating:
|
Hi, The Simple fix, something like: LAR1 P#Source LAR2 P#Dest L B [AR1,P#2.0] T B[AR2, P#0.0] Anyways, to go the ANY Pointer way, Initialize the ANY pointer like. S7Code: BYTE; //specification of the syntax ID DataType: BYTE; //code for the data type Length: INT; //repeat factor DBNumber: INT; //number for data block MemoryArea:BYTE; ByteAddressMSB:BYTE; ByteAddressLSB:WORD; In this thread it is detailed: [Topic (read)] ANY, POINTER in SCL In your case, I think you define the IDB number incorrectly: L P##pAnyString LAR1 L B#16#10 T B [AR1,P#0.0] L B#16#2 //type - byte T B [AR1,P#1.0] L 2 //String length T W [AR1,P#2.0] L #dwPointer1 //source area I think that is Where it is going wrong. |
- What you read here, please check with manuals and your requirements. |
|
Follow us on