Luca Giroletti - 2008-08-12

Fantastic library but I have a problem.
I work with a S7200 CPU226 + CP243-1 on Windows XP with VB6 or VB.NET.
I have a polling rate of 20ms and the performance of the daveExecReadRequest it is always under 30ms and it's ok for me.

The problem is that every 2,7 seconds the daveExecReadRequest has a delay of 200ms. Do you know why?

I have already try with an empty PLC program and with a cross Ethernet cable between my pc and the CP243-1. I have try also on a different new PC.

my init script

    res = initHardware(PLC)
    If res = 0 Then
        res = initPlcConn(PLC)
        If res = 0 Then
                pdu = daveNewPDU
                Call davePrepareReadRequest(PLC.dConn, pdu)
                Call daveAddVarToReadRequest(pdu, daveDB, 1, 100, 1)
                resultSet = daveNewResultSet

        end if
    end if

my scheduled script every 20ms
   
        ‘Timestam1
                res = daveExecReadRequest(PLC.dConn, pdu, resultSet)
        ‘Timestamp2
   
               ‘from t1 and t2 every 2,7 seconds the difference is 200 ms.   
       
                If res = 0 Then
                    res = daveUseResult(PLC.dConn, resultSet, 0)                          
                    debug.print daveGetU8(PLC.dConn)
                    daveFreeResults (resultSet)
                Else
                    sTmp = daveStrError(res)
                End If

Thanks.