How to delay an output signal by milliseconds

4 visualizaciones (últimos 30 días)
Akinkunmi
Akinkunmi el 4 de Abr. de 2024
Respondida: R el 4 de Abr. de 2024
My modelling requirement includes a need to delay an input signal (of type 'BOOL') by up to 10 milliseconds. I have tried using Transport Delay block but it returns an error saying this only works for 'Double' data types and not 'BOOL'. I also tried standard delay block but this only accepts integer delay length values. Does anyone have a walkaround step in mind I could try?

Respuesta aceptada

R
R el 4 de Abr. de 2024
Hi,
As a workaround, you can convert the input signal from 'bool' to 'double' using the Data Type Conversion Block and then pass it in the Transport Delay block. Here is the documentation for reference:

Más respuestas (0)

Categorías

Más información sobre Simulink PLC Coder en Help Center y File Exchange.

Productos


Versión

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by