Variable ANY pointer Date_and_Time

niek1230

Member
Join Date
Dec 2013
Location
Nederland
Posts
2
Hello everybody,

I have a problem with a indirect addressed Any Pointer. With a block move.
The code below works fine but I want a Variable destination Byte The DB is always 8. [P#DB8.DBX [#BYTE_nr] .0 BYTE 8] is this possible? I have read a lot of Forums but i cant find. Or the result is not Correct.

CALL RD_SYS_T
date_type:=Date_And_Time
RET_VAL :=#Ret_val_1
OUT :=#Temp_Date_And_Time

CALL BLKMOV
blk_type:=Any
SRCBLK :=#Temp_Date_And_Time
RET_VAL :=#Ret_val_1
DSTBLK :=P#DB8.DBX8.0 BYTE 8


Hopefully you can help me.
 
You will have to create the destination any pointer dynamically. pDest is a temp variable of type ANY.
Use pDest as the DSTBLK parameter for your block move.

Code:
      LAR1  P##pdest
      L     W#16#1002
      T     W [AR1,P#0.0]
      L     8
      T     W [AR1,P#2.0]
      T     W [AR1,P#4.0]
      L     #BYTE_Nr
      SLD   3
      L     P#DBX 0.0
      +D    
      T     D [AR1,P#6.0]
 

Similar Topics

Hello! Is it possible to copy pointer's pointing address to any variable at Siemens step7? I mean I have pointer address to db block with...
Replies
14
Views
15,572
Hello all, I need to store the pointer-address of a database in an “ANY” variable. How can I do this? Example: When a variable is equal to 11...
Replies
6
Views
2,680
How can I declare a UDT with variable of a type POINTER? What value should I place in initial value(Anfangswert in German)(I think in English it...
Replies
1
Views
1,969
So i've been at this for a long while, i have Citect Scada 2018, i have full access to everything but i can't seem to find any option or...
Replies
0
Views
52
I'm upgrading an existing machine with a Honeywell HC900 controller, and I'm trying to do some data processing in the controller. I have variables...
Replies
0
Views
56
Back
Top Bottom