Signal Routing in Simscape
Afficher commentaires plus anciens
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 commentaires
Yifeng Tang
le 20 Août 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
le 20 Août 2024
Réponse acceptée
Plus de réponses (2)
praguna manvi
le 20 Août 2024
0 votes
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 commentaires
Paul
le 20 Août 2024
Pramil
le 21 Août 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
Catégories
En savoir plus sur Assembly dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



