PLC Coder: How do I prevent exponential notation in lookup tables?

2 ビュー (過去 30 日間)
Isaac Friedman
Isaac Friedman 2020 年 6 月 1 日
コメント済み: Isaac Friedman 2020 年 6 月 1 日
I'm using Simscape Multibody to create lookup tables that correlate joint rotation to linear actuator data. When I parse the data collected from the simulations, I get a lot of numbers that are less than 1E-3 (0.001), which MATLAB only displays in exponential notation when the table is exported to a TwinCAT3 format using the PLC Coder. All other exponential numbers are written out to 8 decimal places, but specifically not those.
TwinCAT3 doesn't accept exponential notation.
How do I tell MATLAB or the PLC Coder app to only export these values in decimal form to 8 decimal places?
  1 件のコメント
Isaac Friedman
Isaac Friedman 2020 年 6 月 1 日
The matrix that makes up a lookup table is programmatically inserted into the lookup table function block as a string. Currently I use mat2str to do this. Is there a way to tell the mat2str function to use the decimal forms of the numbers when called?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink PLC Coder についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by