Y_IM_FMGetPeriod
- This function block (FB) enables one channel of a frequency measurement module 050-1BB40.
- The FB reads the measured values of the module and calculates the period duration of one channel.
- The FB displays the period duration on an output.
- The FB shall be usable in IEC programs.
Parameters
| * | Parameter | Data Type | Description | Default |
|---|---|---|---|---|
| VAR_INPUT | ||||
| V | Enable |
BOOL | The function block will continue to execute every scan while Enable is TRUE and there are no errors. |
FALSE |
| V | PresetPeriod |
DINT | Enter here the measurement period in µs for the corresponding channel. Range of values: 1µs ... 8 388 607µs. | DINT#1 |
| V | FMPeriod |
DWORD |
Currently determined period duration of the corresponding channel in 100ns. The value has to be consistent connected with the input area of the frequency measurement module. |
DWORD#16#0000_0000 |
| V | FMRisingEdges |
DWORD |
This parameter contains the determined number of rising edges . The value has to be consistent connected of the corresponding channelwith the input area of the frequency measurement module. |
DWORD#16#0000_0000 |
| V | FMStatus |
WORD |
This parameter contains the status of . The value has to be consistent connected of the corresponding channelwiththe input area of the frequency measurement module. |
WORD#16#0000 |
| VAR_OUTPUT | ||||
| V | Valid | BOOL | The Valid output indicates that the function block is operating normally and the outputs of the function block are valid. |
|
| V | Busy |
BOOL | Busy indicates that the function block is operating, but may not be ready to provide valid outputs. |
|
| V | Error | BOOL | The Error output is set to TRUE if an error has occurred during the operation of the function block. The output is cleared when the Execute or Enable input becomes FALSE. |
|
| V | ErrorID | UINT | The ErrorID output provides the identifier of the error when there is an active error in the function block execution. The output is cleared when the Execute or Enable input becomes FALSE. |
|
| V | Period | DINT | Currently determined period duration of the corresponding channel in 100ns. | |
| V | FMPresetPeriod |
DWORD |
The measurement period in µs. This value must be written to the FM module process variables of the used channel. |
|
| V | FMControl |
WORD | Set value for the FM module. This value must be written to the FM module process variables of the used channel. |
|
Error Description
See the
Function Block ErrorID List