Is it possible to realize the condition <=1
or =1
with any switch of the simulink library?? The idea is to use it for priority. For example the device with the priority 1 should be selected for further signal processing?
Asked
Active
Viewed 2,190 times
3

check
- 39
- 5
-
Please expand your question, giving more details of what you are asking. Currently it makes no sense. What does "the device with priority 1" mean? What is a device? Are there many devices? How is priority specified? Are you wanting to switch on the value of a signal? – Phil Goddard Oct 06 '18 at 15:29
-
There are several devices, for example washing machine, iron etc. The number of devices can be modified. For example the washing has the highest priority and should start first. For example I connect three devices to a switch. The devices have different priorities. Only the the device with the highest priority should through the switch first. – check Oct 07 '18 at 15:48
-
Should only 1 device be on at any given time? How would the highest priority device be turned off to enable the next priority device to turn on? Should that be done automatically, if so how? Is manual intervention required? – Phil Goddard Oct 07 '18 at 21:48
1 Answers
0
The Switch block can do exactly this. You can configure the Switch block to route one of two signals depending on the "control input signal" which can be a logical operator such as <=1 or <1.
You could also use Flowcharts in Stateflow to allow selection of different devices when more complex logic exists.

scotty3785
- 6,763
- 1
- 25
- 35
-
4
-
1@check Two ways of dealing with that; swap the inputs over or use a [Relational Operator](https://uk.mathworks.com/help/simulink/slref/relationaloperator.html) (which does support <= and <) connected to port 2 of the Switch block and set the "Criterial for passing first input" to "u2 ~= 0" – scotty3785 Oct 09 '18 at 09:24
-