Simhydraulics: Pressure distribution over the entire circuit
You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
0 votes
Share a link to this question
Accepted Answer
0 votes
- Go to Model Configuration Parameters (Ctrl+E) > Data Import/Export Pane
- Set the "Output options" to "Produce specified output only" ( doc link )
- Set the "Output times" to your time vector to, e.g., 10:0.001:11
- Place a motion sensor on the cylinder and measure its position. Put this through a 10 ms Transport Delay block since you want to start logging 10 ms AFTER the event.
- When the output of that block is greater than the max piston displacement, have Simulink output "true" and then feed that into an Enabled Subsystem.
- Inside the Enabled Subsystem block, pass in the measured pressure value into, e.g., a To Workspace block.
7 Comments
- Use the output options I mentioned in my original post, and force data to be logged at your known time of 20.71. This requires you to know the time beforehand, but it's an easy solution if you do.
- Take whatever data values come out and interpolate them in MATLAB
- Set up logic on the cylinder's measured position, as I also mentioned in the first post. This will force Simulink to take additional time steps around the event you are looking for, thus increasing the likelihood that you'll get data right around the time without you having to know it beforehand. Here's a screenshot:

More Answers (0)
Categories
Find more on Sources in Help Center and File Exchange
Products
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)