# Difference between revisions of "Simulink Tester Issues"

From T-VEC Wiki

(→S-Functions) |
(→Math Functions) |
||

Line 17: | Line 17: | ||

The way that we support S-functions is to allow the user to create an independent Simulink model that represents the input and output interface to the S-function and also represents the same functional semantics as the S-function. Then, the user can add a reference to the S-function in the block properties of the S-function block that names the external Simulink model. The sl2tvec translator then substitutes the external Simulink model for the S-function during translation. This way, the user can use S-functions for code efficiency or direct addressing of specific memory locations or for what ever reason they are necessary, but still use the sl2tvec/T-VEC processes on their model. | The way that we support S-functions is to allow the user to create an independent Simulink model that represents the input and output interface to the S-function and also represents the same functional semantics as the S-function. Then, the user can add a reference to the S-function in the block properties of the S-function block that names the external Simulink model. The sl2tvec translator then substitutes the external Simulink model for the S-function during translation. This way, the user can use S-functions for code efficiency or direct addressing of specific memory locations or for what ever reason they are necessary, but still use the sl2tvec/T-VEC processes on their model. | ||

− | |||

− | |||

− | |||

---- | ---- | ||

===Embedded Matlab Language (EML) Translation: m-script guidelines=== | ===Embedded Matlab Language (EML) Translation: m-script guidelines=== | ||

− | Support for Embedded Matlab Language (EML) functions | + | Support for the translation of Embedded Matlab Language (EML) functions is now available. Not all EML functions will be immediately available but they will be scheduled for implementation as requested. Only those EML functions that can be graphically represented using Simulink blocks can be implemented at this time. Support for other EML functions can be added but they may require a development contract. If there is a function you need please E-mail your request to support@t-vec.com. |

====M-Scripting Guidance==== | ====M-Scripting Guidance==== | ||

− | + | A list of the currently supported EML functions is included in this wiki. Additionally there are a few programming shortcuts that are not supported. These are listed in the Unsupported Syntax section. If your script uses those shortcuts then minor modification will be required. | |

+ | |||

+ | =====Global Variables===== | ||

+ | Global variables should not be used in your EML script. All external values needed by a function should be passed into that function as parameters. | ||

+ | |||

+ | =====Workspace variables===== | ||

+ | Because the processing of the EML script is done outside of Matlab workspace variables should be passed in as function parameters if needed. | ||

+ | |||

====Unsupported syntax==== | ====Unsupported syntax==== | ||

=====Matrix field selection using a single parameter===== | =====Matrix field selection using a single parameter===== | ||

Line 92: | Line 96: | ||

ERROR SL0253: (Internal) No subsystem implementation found. | ERROR SL0253: (Internal) No subsystem implementation found. | ||

<br> | <br> | ||

− | No subsystem implementation found for subsystem reference: | + | No subsystem implementation found for subsystem reference: [function name]. |

<br> | <br> | ||

Please verify that your model passes the Matlab model check (CTRL+D). | Please verify that your model passes the Matlab model check (CTRL+D). | ||

Line 103: | Line 107: | ||

if, elseif, else | if, elseif, else | ||

=====Conditional syntax===== | =====Conditional syntax===== | ||

− | & | + | &&,|| %and, or |

+ | |||

=====Relational syntax===== | =====Relational syntax===== | ||

<, <=,==,~=,>,>= %less than, less than or equal, equal, not equal, greater than, greater than or equal | <, <=,==,~=,>,>= %less than, less than or equal, equal, not equal, greater than, greater than or equal | ||

Line 145: | Line 150: | ||

atan | atan | ||

atan2 | atan2 | ||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

=====Math Functions===== | =====Math Functions===== | ||

+ | abs | ||

+ | dot | ||

exp | exp | ||

+ | hypot | ||

log | log | ||

log10 | log10 | ||

− | + | mod | |

power | power | ||

− | |||

− | |||

− | |||

rem | rem | ||

− | + | sqrt | |

=====Matrix Functions===== | =====Matrix Functions===== | ||

eye | eye | ||

+ | inv | ||

---- | ---- |