I'm mechatronic engineer using Codesys from some years.
I have a PLC application with cycle time 10 ms.
I have a library provided from the plc supplier able to read the period of the input digital signal with precision of 1 us (micro-second) and it works very well.
My need is to read about the same digital signal, not the period, but the high level time with precision of 1 us. Because I have high level time that is variable and I want to rread it.
Example I know that the signal has period of 100000 us and high level time of 500 us.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's probably done in the hardware. You should ask the manufacturer, typically the peripherals that do that stuff already have both the high/low time and the period information.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear,
I'm mechatronic engineer using Codesys from some years.
I have a PLC application with cycle time 10 ms.
I have a library provided from the plc supplier able to read the period of the input digital signal with precision of 1 us (micro-second) and it works very well.
My need is to read about the same digital signal, not the period, but the high level time with precision of 1 us. Because I have high level time that is variable and I want to rread it.
Example I know that the signal has period of 100000 us and high level time of 500 us.
It's probably done in the hardware. You should ask the manufacturer, typically the peripherals that do that stuff already have both the high/low time and the period information.