SKAN_INNOVA
Member
Hi.
I came from S7 and i have a problem trying to reset the value of some tags. In Siemens is To Easy reset a DB (With BLKMOV or FILL), in Rslogix i can't find the solution to reset all the values of the structure with one instruction....
I have a structure of tags composed of differents User data types and generic data types (Bool, Sint, Array, Int, Dint) this structure have the same content of one DB in S7.
In S7 at the end of the program i reset all the DBs to 0 with "FILL" (calling SFC21), it's the following code:
L 0
T #auxFill
CALL SFC21
BVAL:= #AuxRstFill
RET_VAL:= MW4
BLK:= P#DB504.DBX0.0 BYTE 144
With this code we charge to 0 the local variable "#auxFill" and this value is transfered to all the bytes specified in the line BLK:= (In DB504, start at Byte 0.0 End at Byte 144 (all the lenght of the DB)).
In Rslogix i can't do this?, i can't reset all the values of a tags structure (int, array, bools....) in one instruction? I try with "CLR", "MOV".... but this instructions don't accept the sctructure.......
To copy one DB in other (with exactly the same tags and types of data) i use "CPS" and works correctly. But when i want to Reset all the DB i can't use CPS.
Thks for your attention and sorry for my bad English.
I came from S7 and i have a problem trying to reset the value of some tags. In Siemens is To Easy reset a DB (With BLKMOV or FILL), in Rslogix i can't find the solution to reset all the values of the structure with one instruction....
I have a structure of tags composed of differents User data types and generic data types (Bool, Sint, Array, Int, Dint) this structure have the same content of one DB in S7.
In S7 at the end of the program i reset all the DBs to 0 with "FILL" (calling SFC21), it's the following code:
L 0
T #auxFill
CALL SFC21
BVAL:= #AuxRstFill
RET_VAL:= MW4
BLK:= P#DB504.DBX0.0 BYTE 144
With this code we charge to 0 the local variable "#auxFill" and this value is transfered to all the bytes specified in the line BLK:= (In DB504, start at Byte 0.0 End at Byte 144 (all the lenght of the DB)).
In Rslogix i can't do this?, i can't reset all the values of a tags structure (int, array, bools....) in one instruction? I try with "CLR", "MOV".... but this instructions don't accept the sctructure.......
To copy one DB in other (with exactly the same tags and types of data) i use "CPS" and works correctly. But when i want to Reset all the DB i can't use CPS.
Thks for your attention and sorry for my bad English.