Signal Routing in Simscape
Ältere Kommentare anzeigen
I'm not very familiar with SimScape, but I need to do some signal routing.

Above, you're looking at two prismatic joints. My goal is to switch between prismatic joints based on another physical signal through time. This naturally lead me to the PC switch block, but it seems like it can only take three signals as an input. If this were Simulink, I would simply concatenate the signals and handle them as a vector, but I'm not sure that works in Simscape. Help would be appreciated!
2 Kommentare
Yifeng Tang
am 20 Aug. 2024
Hi Paul,
Are you trying to switch viewing the signal from two different joints or to have the mechanism physically switch between use two different joints? The former is easy, but I suspect it's not what you intended (just to make sure). If it's the latter, I wonder why you wanted to do that.
Some description of the actual mechanism may help the community understand and answer your question. It's uncommon for an actual system to "switch" between joints/constraints, so I am curious what the purpose is here and what's different between the two prismatic joints.
Paul
am 20 Aug. 2024
Akzeptierte Antwort
Weitere Antworten (2)
praguna manvi
am 20 Aug. 2024
0 Stimmen
Hi Paul,
As per my understanding, you are trying to switch between the outputs of a "Prismatic Joint" block using a control signal. This can be achieved by using a "PS-Simulink Converter" on each output signal. You can then concatenate these signals using a "Mux" block, route them through a “Switch” block and separate them using a "Demux" block for further processing.
Hey Paul,
I had a similar query as well, as of R2024a there is a “Simscape Bus” block, but it cannot be used with “PS Switch” block as it takes only a single physical signal as input, not a bus.
There is a workaround though and that is to convert the signals from physical signal to Simulink signal through a "PS-Simulink" block and then use “Bus creator” block along with “Switch” block.
The output of the “Switch” block can be passed to “Bus Selector” block from which you can bifurcate the bundled signal into individual signals and if required use “Simulink-PS” block to convert them back into physical signals.

Regards Pramil
2 Kommentare
Paul
am 20 Aug. 2024
Pramil
am 21 Aug. 2024
There is no switch block for frames but you can look in this MATLAB answer for alternative: https://www.mathworks.com/matlabcentral/answers/296879-simscape-body-frame-switch
Kategorien
Mehr zu Assembly finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



