Siemens programming problem

I've written something simple in SCL. Problem I have is, the data that is transmitted with a rising edge or a falling edge to the DB's (see red) becomes zero, I mean, the data transmitted into the DB is hold for only 1 cycle ????

When I connect Merkerwords MW100 and MW102 for example, then the data is kept in these datalocations, but in the DB's not ???

cv0.JPG



Code:
BEGIN
Flank_Voorloper:= Voorloper_Tapijt AND (NOT Membit_1);  
Flank_Tapijt:= (NOT Voorloper_Tapijt) AND Membit_2; 
 
IF Flank_Voorloper THEN					 // Background colors van de knoppen Voorloper & Tapijt
Background_Voorloper:= 2;
Background_Tapijt:= 0; 
END_IF;   
 
IF Flank_Tapijt THEN
Background_Voorloper:= 0;
Background_Tapijt:= 2; 
END_IF;
 
Membit_1:= Voorloper_Tapijt;			   // Flanken wegschrijven

Membit_2:= Voorloper_Tapijt;
END_FUNCTION
 
Are we back to the OUT verses IN_OUT problem here.

If you want to remember the status ALWAYS use IN_OUT.

I know not all cases do you need it, I just feel its good practice.
 
:)

PeterW said:
Are we back to the OUT verses IN_OUT problem here.

If you want to remember the status ALWAYS use IN_OUT.

I know not all cases do you need it, I just feel its good practice.

I also have a flashback,

I'll do as you say, us In_OUT
 

Similar Topics

I am trying to set up an EZmarqee with a Siemens ET200sp CPU, CM profibus and TIA v13. Using the DPWR communication block, it has an error of...
0
Replies
2,268
Views
Hello Guys! Let me explain what is my problem. I have two timers T1 and T2, When i detect a metal the M8.0 memory will addressed and start the...
1
Replies
5,003
Views
Hello everyone, I have been attempting to complete a simple weight conversion program... basically it loads in 3 values from a BCD Thumbwheel...
3
Replies
3,958
Views
Hi, I'm converting a TIA Portal V11 Program to a V17. I think I have all the programming done correctly, but I need to program the KP300 Basic...
8
Replies
641
Views
Hi all, i am the new controls guy at the plant and i have inherited a pc from the previous controls guy with Siemens tia portal version 16 and 17...
20
Replies
3,174
Views
Top