Reset a data block

Have a copy of the DB in question with the bool/int/real values at the reset values you require. When you wish to reset, copy the values from the reset DB to the other DB using SFC20
 
Thanks LD
I want to reset the contents to Zero. I am using this DB to recieve interfacing signals from another PLC. What I want to do is to reset the whole DB to Zero when the comms lost.
 
Here's an FC that will do the job:

Code:
FUNCTION FC 1 : INT
TITLE =
VERSION : 0.1

VAR_INPUT
  blockDB : BLOCK_DB ; 
END_VAR
VAR_TEMP
  pAny : ANY ; 
  byFill : BYTE ; 
END_VAR
BEGIN
NETWORK
TITLE =
      OPN   #blockDB; 
      L     DBLG; 
      LAR1  P##pAny; 
      T     W [AR1,P#2.0]; 
      L     DBNO; 
      T     W [AR1,P#4.0]; 
      L     P#DBX 0.0; 
      T     D [AR1,P#6.0]; 
      L     W#16#1002; 
      T     W [AR1,P#0.0]; 
      L     0; 
      T     #byFill; 
      CALL SFC21 (
           BVAL                     := #byFill,
           RET_VAL                  := #RET_VAL,
           BLK                      := #pAny);
END_FUNCTION
 
That ab stuff is awesome. I here they even have a microphone you can plug in and just verbally tell the machine how you want it to run

by the way I would use the fill instruction Siemens has too
 
LD just wrapped general use fill to specific use function that is easier to use for ppl not so good at siemens way of thinking.
 

Similar Topics

We are using RED LION HMI Since las 15 years. To day we have found that My log file has data up to 22 Mar 2024 1:16. Then After new Log File is...
Replies
23
Views
1,525
Good day folks. I have a suspicion that my issue is self inflicted but wondered if someone could help me figure the source of my troubles. I'm...
Replies
10
Views
5,080
I am trying to figure out how to use a High speed counter module for an incremental encoder. I don't have the exact model number for the encoder...
Replies
4
Views
2,587
Hello all, I am quite new to the Indusoft application. The project I am working on leaves me a little stumped. I need to reset all values to zero...
Replies
0
Views
1,495
Hello, I would like to reset to zero Data File N96 compose of 20 elements (N96:0 to N96:20). I would like to do this using one command only if...
Replies
7
Views
2,024
Back
Top Bottom