Bulletproof OPC Client in VB?


Thread Starter

Michal Casterline

I would like to correspond with anyone who struggles with DCOM, error-handling and other issues encountered when trying to write a quality OPC client with VB.

Michal Casterline
Casterline Technical Services

Sage, Pete (IndSys, GEFanuc, Albany)

The toughest part with DCOM is the long timeouts. The only way we've been able to address the problem is through the use of multiple threads. Essentially any DCOM call you do is done in a thread and then you create
another thread to watch the thread, if the thread detects the other thread hasn't returned within the configured amount of time then you can mark the connection as down. It is a challenging problem for professional developers to solve in C++, no doubt as difficult if not more in VB.

The simplest solution is to buy a product (devicecom) from Intrinsyc (www.intrinsyc.dom) - they have a DCOM replacement that handles all the
difficult timeout issues for you. I'm not sure of the price but I seem to remember its less expensive than the days or weeks of programming involved.

They spent a day out here showing us their product about a year ago - it worked well.