SYS_RINGCOUNTER_10us_RESOLUTION_ns

Group

PLC status information

Data type

DINT

Name

Ring counter resolution

Resolution in nanoseconds of the PLC-dependent 10.24ms or 10.67ms type ring counter.

Use conditional compilation to ensure that the exact time value is calculated for each PLC type:

Example
#if (IsSystemVariableSupported('sys_iRingCounter_10usXX')) #then
    if (NOT bIsInitialized) then
        bIsInitialized:=TRUE;
        iRingCounter_Old:=sys_iRingCounter_10usXX;
    else
        iRingCounter_New:=sys_iRingCounter_10usXX;
        iRingCounterDiff:=iRingCounter_New-iRingCounter_Old;        
        diScanTime_ns:=INT_TO_DINT(iRingCounterDiff)*SYS_RINGCOUNTER_10us_RESOLUTION_ns;
        iRingCounter_Old:=iRingCounter_New;
    end_if;
#end_if;

Modified on: 2019-10-14Feedback on this pagePanasonic hotline