How to define timers with Structured text?

2 ビュー (過去 30 日間)
Tapio Rytinki
Tapio Rytinki 2021 年 8 月 23 日
回答済み: Sri Kapali 2022 年 2 月 18 日
I'm trying to create a TON-timer in simulink model and translate it to Structured text (codesys), but can't find any block to simulate TON-timer that works with structured text. I found corresponding from ladder logic generation https://www.mathworks.com/help/plccoder/ref/ton.html but this does not work with Structured Text.
Is there a block to implement this function?

回答 (1 件)

Sri Kapali
Sri Kapali 2022 年 2 月 18 日
Hello Tapio,
One option we have available is to use Stateflow and absolute time temporal logic constructs. When you specify target timer the generated structured text code contains target specific timer implmentation. For more information, see https://www.mathworks.com/help/plccoder/ug/plc-coder-interface.html#mw_1e9d7724-d4df-4702-a596-3d3f27bacf5e

カテゴリ

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

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by