Problem: automatic, step and manual mode in SCL

BoSChoW

Member
Join Date
Apr 2006
Location
Nova Gorica
Posts
107
Hi guys,
i was trying to make a program in simatic step 7 with which i could with the useing of a switch choose between automatic, manual and step mode. Any ideas how do i do that in SCL. I was trying to do it with a CASE statemant followed by an IF but i failed, it seems that the program remains stuck in the CASE statement in the last execution . . . The program looks like this:

IF auto OR step //if auto mode or step mode is selected
THEN
CASE auto OF
1: IF op_inp.DW0=plc_inp.DW0 //if the value of inputs tyed in OP7 is equal to number of connected inputs
THEN output1:=true; output2:=false; steping:=2;
ELSIF op_inp.DW0<>plc_inp.DW0 //if the values are not equal
THEN output1:=false; output2:=false; steping:=1;
END_IF;
.
.
.
.
16: IF op_inp.DW16=plc_inp.DW16 //if the value of inputs tyed in OP7 is equal to number of connected inputs
THEN output15:=true; output16:=false; GOTO I;
ELSIF op_inp.DW0<>plc_inp.DW0 //if the values are not equal
THEN output15:=false; output16:=false; steping:=16;
END_IF;
END_CASE;

I: IF auto //if auto mode is selected
then step:=steping; //the value of steping is aquired by step
else
IF step //is setp mode is selected
then
IF start //and if the start button is pressed
then step:=steping; // the value of steping is aquired by step
else GOTO I;
END_IF;
END_IF;
END_IF;

This is my version of the program and any other suggestions are very much aprishiated. Thank you for your help and time.
 

Similar Topics

On all pages of my project i have a lot of information, texts and details that should not not be shown. I can remove them for each part apart from...
Replies
0
Views
40
Hi, I have had problem with upgrading some projects from v16 to v18. I tried it on 3 diffrent computers. I want to post this so that anyone that...
Replies
3
Views
176
Hi, I am having a challenge installing a new drive ACS355-03E-44A0-4 as it keeps on displaying Fault code F00018 even when the load is not...
Replies
3
Views
135
I have an issue on my vessel, we have water tight door system created in China, company is no longer operating. We have 7 doors each with their...
Replies
4
Views
145
Hi all. Simple as simple can be, I don't understand what's happening. I'm toggling he OSR on, GX_LUB_PUMP1_LEAD should switch. It doesn't. The...
Replies
27
Views
669
Back
Top Bottom