Simulink If block error "Port 1 must directly or indirectly connect to one If Action Subsystem"
100 views (last 30 days)
Hello, I am working to use an If block and If action blocks to set shift points for a vehicle model, the code that I am going after would be:
If u1 > 57.3421
6th Gear If Action Block activated
elseif u1 > 46.2345
5th Gear If Action Block activated
elseif u1 > 35.9144
4th Gear If Action Block activated
elseif u1 > 25.6962
3rd Gear If Action Block activated
elseif u1 > 4.2575
2nd Gear If Action Block activated
1st Gear If Action Block activated
but I keep recieving an error that Port 1 must be connected to an If action block. Any suggestions on how to fix this?
Attached are pictures of the example I was using to build this and the model I have created.
Fangjun Jiang on 28 Sep 2023
Edited: Fangjun Jiang on 28 Sep 2023
Outport 1 of the If block is also connected to another destination but it was not shown in the snapshot. Dis-connect that branch and do the same for the rest.
Outputs from the if, else, and elseif ports are action signals to If Action Subsystem blocks. They can't be connected to other places.