Cancel
Showing results for 
Search instead for 
Did you mean: 

How to edie LB "If Condition" in CEE mode

Valued Contributor
Valued Contributor

LB.PNG

Hi All

 

I would like to get your direction for the LB Edit in CEE Mode, in "Eixts" we have "If Condition", seems we can only add one "If condition", is it possible to add another "If condition" or "Else"?

 

such as below LB:

 

"If condition" siganl_1=true,  "Value Expression" signal_2=1;

"If Condition" signal_1=False, "Value Expression" signal_2=2;

 

how to make it come true?

 

Thanks

6 REPLIES

Re: How to edie LB "If Condition" in CEE mode

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi,

 

Actually I have not possible solution to use the IF condition for your case in a LB.

 

But, maybe you can work with modules.

1.jpg2.jpg3.jpg4.jpg

 

Maybe someone else has a solution for implementation in LB.

 

Best regards

Patrick

Re: How to edie LB "If Condition" in CEE mode

Valued Contributor
Valued Contributor

Hello

 

 

Thanks for your direction, I have made it came true trough module edit as you showed below.

 

since I am a new student for Process simulate

 

I just want to learn from your side what is different between "LB" and "Module Edit", I thought in CEE mode, LB more seems like "PLC program" but now seems "Module" more seems like "PLC  program"

Re: How to edie LB "If Condition" in CEE mode

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi,

 

Modules in PS are like PLC Program.

 

A LB is very helpful if you want to put some logical control into a resource.

Just create a simple kinematics e.g. a clamp, define two poses (OPEN/CLOSE) and run the command "Automatic Action/Sensor Creation".

It creates a LB with entries, exists, sensors and the actions. You only need to connect some signals.

 

You can use a LB independent from a resource as well. 

It depends on the use case and what you want to achieve.

 

Best regards

Patrick

Re: How to edie LB "If Condition" in CEE mode

Solution Partner Creator Solution Partner Creator
Solution Partner Creator

Hello,

 

I have tried repeat that steeps but I have a problem, after creating "New modulo Object" in the field "Result Signal" I have to choose a signal to the Signal Viewer, but when I select it, I can´t push the button "OK" (the button is off). I attach a pic.

I hope you can help me.

Thanks!

Re: How to edie LB "If Condition" in CEE mode

Valued Contributor
Valued Contributor

Hello

 

please firstly define the signal in signal viewer, then put the same name in the moudle signa name, and put the value in bottom blank area, and try

Re: How to edie LB "If Condition" in CEE mode

Solution Partner Creator Solution Partner Creator
Solution Partner Creator

Thanks very much for the reply.

The problem was I had to give it a value in this step (in your case: "true").