Page 1 of 1

Create logical blocks (OR AND,...)

PostPosted: Tue Dec 22, 2020 11:37 am

I am new with Magicdraw and I wanted to create an OR block (if at least one input is true then return true) so I created a constraint block like this :
Capture d’écran 2020-12-22 183034.png

It's working but now I want this block to be more automatic in order for the user to not change the code if they want to use more than 3 inputs (like simulink where you can choose the number of your inputs with an Or block).

Do you have any ideas ?

Thank you in advance.

Re: Create logical blocks (OR AND,...)

PostPosted: Sun Jan 03, 2021 2:13 pm
by saulius_p
Hello Eloise,

Good to talk to you. I think in Action or Constraint Block you have always fixed number of inputs based on parameters. It could be array of values you input but still input shall be available.

Please find Activity based AND, also sample with arrays.

Kind regards,