using a table in a "from workspace block" in simulink
47 views (last 30 days)
for my Thesis I developed a control in simulink to control my heating elements.
for the control and the parameters I need for the regulation of the whole system, I want a table which appears when I double click on the §from workspace"-block. the table should contain 6 columns(Port-Number,ID, P(stationary), P(transient), Ohm, Voltage) and 12 rows.
Each row is for one PWM-Port of my Arduino.
The configurated table should be saved as an .xlsx, so if I have to measure again with the same parameters I just can use the block "from spreadsheet" for the control
I already developed a table for my needs itself, but how can I include this table into the block or how can I get this done in general?
I hope you understand what I'm asking ^^ and can help me with my problem
thank you for your support :)
Nick Choi on 8 Dec 2017
Edited: Nick Choi on 8 Dec 2017
If the data is loaded into MATLAB as a table, you could import the signal data using a 'From Workspace' block on the column or row data points. As described in the following documentation link, a MATLAB table is not a supported input format and you would need to have the data as a matrix or a timeseries in order to properly use the block:
If you are trying to access data from an Excel spreadsheet and you want to make use of the row/column names, a 'From Spreadsheet' block would be more suitable for this application. If you click on the icon next to the 'Sheet Name' dialog parameter of the block, you can view the contents of the raw Excel file to specify the range of data that you want to use:
Double-clicking on the 'From Spreadsheet' block to visualize its content is not a feature of the block. You could look into masking the block or adding model callback functions if you wanted to try adding additional functionality.