5
« on: June 20, 2016, 03:32:27 PM »
Hi Team, I have a question. I am assigning a driver via code, Im not dragging it from the toolbox and dropping it on the form. I am using a backgroundworker to keep the driver's read/writes off the User Interface thread so that in the event of a problem communicating, it doesn't drag the UI to a dead halt. What is happening, however, is that my read/write cycle starts off at about 33ms to complete a pass and within an hour its at 200ms and then over a few hours it gets to 0.5 seconds to complete a pass of the routine. Below is some example code , there are probably 30 read/writes that take place in total per pass. It just gets slower and slower. Any idea on whats going on? Memory leak of some sort?
Public PLCDriver As AdvancedHMIDrivers.EthernetIPforMicro800Com
PLCDriver = New AdvancedHMIDrivers.EthernetIPforMicro800Com(components)
-code example
Do While True
If PLC_IO_Write.bNewHour Then
PLC_IO_Write.bNewHour = False
PLCDriver.Write("PlateCnt_PerHr_Tick", "1")
End If
System.Threading.Thread.Sleep(0)
loop
Thanks -Eric