Dear All,
I am a beginner in PLC. I am writing a sample structure text application. I have written a while loop and i want to put a timer delay inside the loop.
My code looks like below
where TEMP is INT,
Small help will be highly appreciated.
Thank you all.
I am a beginner in PLC. I am writing a sample structure text application. I have written a while loop and i want to put a timer delay inside the loop.
My code looks like below
where TEMP is INT,
Code:
TEMP := 1;
WHILE TEMP = 1 DO
//1. My logic is here
TEMP := TEMP+1;
IF TEMP = 1000 THEN
TEMP := 0;
END_IF;
[COLOR="Red"][B]//2. Here i want to put a 2 second delay[/B][/COLOR]
END_WHILE ;
Small help will be highly appreciated.
Thank you all.