High-speed counter instructions
900
Part III FP Instructions
END_IF;
Example 2: Without maximum target value control
ST
When programming with structured text, enter the following:
IF (sys_bIsFirstScan) THEN
sys_diHscChannel0ElapsedValue:=0;
END_IF;
IF DF(bStartCam) THEN
F165_HighSpeedCounter_Cam(iHscChannel := 0,
s_dutDataTable := dut_F165_CAM_Example1,
dutBitOutputs => WR0_bits_F165_CAM_Examples);
Example 2
In this example the function has been programmed in ladder diagram (LD) and structured text (ST).
DUT
The DUT F165_HighSpeedCounter_Cam_8_Values_DUT is predefined in the FP Library and can
be used as a sample.
POU header
All input and output variables used for programming this function have been declared in the POU
header.
Body
When the variable bStartCam is set to TRUE, the function is carried out.
LD
ST
When programming with structured text, enter the following:
IF (sys_bIsFirstScan) THEN
sys_diHscChannel0ElapsedValue:=0;
END_IF;
IF DF(bStartCam) THEN
F165_HighSpeedCounter_Cam(iHscChannel := 0,
s_dutDataTable := dut_F165_CAM_Example2,
dutBitOutputs => WR0_bits_F165_CAM_Examples);
END_IF;