konimarti / opc

OPC DA client in Golang for monitoring and analyzing process data based on Windows COM.
MIT License
237 stars 85 forks source link

client.Close() method doest`t work #30

Closed eddielth closed 4 years ago

eddielth commented 4 years ago

I use demo to connect opc server Kepware, While the demo program run over ,Kepware still has client .How to resolve it ?

eddielth commented 4 years ago

func main() { client, _ := opc.NewConnection( "Kepware.KEPServerEX.V6", // ProgId []string{"localhost"}, // OPC servers nodes []string{"C1.D1.tag1"}, // slice of OPC tags ) // read single tag: value, quality, timestamp fmt.Println(client.ReadItem("C1.D1.tag1"))

client.Close()// This method does not work normally. Even if this method is called, there is still a client connection at kepware of my server. I try to use olerelease(), but this can only be executed once, and it will not work next time

}