problem playing a scene using actor blocks and 3D configuration block in simulink

1 view (last 30 days)
this is the error that im getting, i tried to use the Rate transition block before my actors so i get the same transition rate but it still didnt work and i got the same error ,then i tried to change the transition rate to what the error needs it to be (0.05) and i got the new error . if you need any clarification please let me know, thank you

Accepted Answer

Umar
Umar on 7 Oct 2024

Hi @Abolfazl ,

I first tried to understand error messages mentioned in your comments.

FFAdaptationExp Model 2024 Rotation/Reaching center-out and FFAdaptationExp Model 2024 Rotation/Target/Simulation 3D Generic Actor.

Analysis of first error message: The first error indicates a sample time mismatch between two blocks:

The sample times must be integer multiples of one another for successful data transfer. Your current configuration does not meet this requirement.

Analysis of second error message: The second error relates to setting the Translation property of the Simulation 3D Generic Actor. It must be a matrix with three columns (representing x, y, z coordinates).

So, after going through documentations listed at the links below

https://www.mathworks.com/help/sl3d/simulation3dactor.html

https://www.mathworks.com/help/rtw/ug/rate-transitions-and-data-transfers.html

Here are my suggestions listed below.

Resolving Sample Time Issues

Check Sample Times: Ensure that both blocks have sample times set as integer multiples. For instance, if one block is set to 0.05 seconds, the other should ideally be set to 0.1 seconds (2x) or 0.025 seconds (0.5x).

Using Rate Transition Block: If you already tried using a Rate Transition block and it did not resolve the issue, double-check that:

  • The parameter “Ensure deterministic data transfer” is unchecked if you want to allow for more flexibility in data transfer.
  • Both blocks connected through the Rate Transition are configured correctly with their respective sample times.

Setting Up the Simulation 3D Actor

  • Translation Property: Verify that you are setting the Translation property correctly. It should be defined as a vector of size [1,3]. For example, [x,y,z], where each value represents a coordinate in meters.
  • If you are passing dynamic values, ensure they are being formatted correctly before assignment.

Debugging Steps

  • Simplify your model by isolating problematic blocks and testing them independently to confirm they work as expected.
  • Use debugging tools available in Simulink to step through your model execution and identify where errors arise.

If issues persist after adjusting settings, consider checking for updates or patches for your MATLAB version as sometimes bugs can lead to simulation issues. Consult MATLAB’s documentation on Rate Transition Blocks and Simulation 3D Actors links provided above, which can provide further insights into proper configurations and common pitfalls.

Always maintain clarity in sample time management across your entire Simulink model; mismatched sample rates can lead to cascading errors. For complex simulations involving multiple components, consider implementing unit tests on smaller subsystems before integrating them into larger models.

By following these steps, you should be able to resolve the errors encountered in your Simulink model and successfully run your simulation with the 3D actor configuration.

If further issues arise, providing specific error messages can help narrow down solutions more effectively.

Hope this helps.

Please let me know if you still have any further questions.

  2 Comments
Abolfazl
Abolfazl on 8 Oct 2024
Thanks alot for answering my question, I’ll implement it and reach out again if I have any further questions.
Umar
Umar on 8 Oct 2024
Hi @ Abolfazl,
Thank you for your message. I appreciate your prompt response and am glad to hear that you found the information helpful. Please feel free to reach out anytime if you have further questions or need additional assistance as you implement the suggestions. Looking forward to hearing from you soon.

Sign in to comment.

More Answers (0)

Categories

Find more on Multicore Processor Targets in Help Center and File Exchange

Products


Release

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!