mp9876 - 2024-06-24

Hi everyone, new at Codesys and PLC programming in general. I am using Codesys Win V3.5 SP20 I would like to measure an encoder's frequency output (obtaining that pulse train from Factory IO) and intended to use the MeasureFrequence FB (Intern/CAA/Utilities/CAA Mathematics/3.5.19.0). As mentioned in the title what I need to measure is low frequency, such as lower than 40hz (a cycle every 25mS) or so; I could even go lower frequency if required as this is for test purposes) therefore I am not expecting problem measuring a low frequency with that FB

The library in question appears to be installed as I can retrieve it from the Library Repository. I can also see it from the Device's Library Manager.

Problem arises when I am trying to instantiate this particular FB. I go like this:

VAR
MeasF:MeasureFrequence;

END_VAR

Please note that as soon as I start typing the "MeasureFrequence", the MeasureFrequence comes out as a viable option in auto-typing; seems to indicate that the FB is recognized somehow.

But there is no way I can compile this as it comes back with the following: C0046: Identifier 'MeasureFrequence' not defined. Tried to rename that to ABC instead of MeasF; same issue.

Possibly that the library is not properly installed ? Placeholder ?

I would greatly appreciate a bit of guidance if possible.

Thank you and regards,

Mike