EXPERTGetImmediateValue: Read Counter Value of HSC or Encoder Function
This administrative function permits to read the counter value of an HSC or Encoder bypassing the controller cycle.
To see the general representation in IL or ST language, refer to Function and Function Block Representation.
This table describes the input variables:
Inputs |
Type |
Comment |
---|---|---|
EXPERT_REF_IN |
Reference to the EXPERT function block. |
|
Execute |
BOOL |
On rising edge, starts the function block execution. On falling edge, resets the outputs of the function block when its execution terminates. |
This table describes the output variables:
Outputs |
Type |
Comment |
---|---|---|
EXPERT_REF_OUT |
Reference to the EXPERT function block. |
|
Done |
BOOL |
TRUE = indicates that ExpertDiag is valid. Function block execution is finished. |
Error |
BOOL |
TRUE = indicates that an error was detected. |
ErrID |
When Error is TRUE: type of the detected error. |
|
ImmediateValue |
DINT |
Contains the counter value. |
Adding the EXPERTGetImmediateValue Function Block
Step |
Description |
---|---|
1 |
Select the Libraries tab in the Software Catalog and click Libraries. Select Controller > LMC058 > LMC058 Expert IO > Administrative > EXPERTGetImmediateValue in the list, drag-and-drop the item onto the POU window. |
2 |
Link the EXPERT_REF_IN input to the HSC_REF output of the HSC. |