Author Topic: OpcDaCom Issue - AHMI_V398t  (Read 2249 times)

andrew_pj

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
OpcDaCom Issue - AHMI_V398t
« on: July 24, 2015, 05:14:38 AM »
Currently I have issue with OpcDaCom.
I have developed using OpcDaCom since 6 months ago and worked properly in my laptop.
Now, I run the same program in new installed computer, but unable to work.

The error message appears in BasicLabel:
"CoCreateInstaceEx Access is Denied"
This error comes out only once, then the following error message appears continuously:
"Object reference not set to an instance of an object"

This is strange because I run the program at the same time in my laptop, but no error message.
The OPCServer indicates correct value in both computer and laptop, but unable to read with AHMI in computer.

Please help to advise regarding this issue.
Refer to attachment for the OpcDaCom Properties (it works in laptop, but not in new computer).
Thank you.

Best regards,
Andrew


Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: OpcDaCom Issue - AHMI_V398t
« Reply #1 on: July 25, 2015, 09:28:28 PM »
I got the same error when trying to connect from a computer to an OPC Server that is on a laptop.

What computer is your OPC Server installed on?

From your picture, OPCServerPath points to a localhost and if you are using the same setting on both computers and your OPC Server is installed only on one, that would be the reason for the error.

You would need to make sure that your OPC Server is visible on the network and then you could try setting a proper OPCServerPath.

andrew_pj

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: OpcDaCom Issue - AHMI_V398t
« Reply #2 on: July 26, 2015, 09:05:27 PM »
I got the same error when trying to connect from a computer to an OPC Server that is on a laptop.

What computer is your OPC Server installed on?

From your picture, OPCServerPath points to a localhost and if you are using the same setting on both computers and your OPC Server is installed only on one, that would be the reason for the error.

I installed OPC Server on both laptop and computer.

For OPC Server, I am using ICONICS Modbus Configurator.
http://www.iconics.com/Home/Products/OPC-Connectivity/Free-OPC-Tools.aspx#.VbWC9LOqqko

Quote
You would need to make sure that your OPC Server is visible on the network and then you could try setting a proper OPCServerPath.

Could you advise some steps on how to do above?
Specifically where is the network that you mean?
Thank you.

Best regards,
Andrew

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: OpcDaCom Issue - AHMI_V398t
« Reply #3 on: July 26, 2015, 11:32:00 PM »
My suggestions/questions were related to: 1 instance of OPC Server on 1 computer and the 2nd computer accessing that over network.

Your explanation makes things different now and suggests that you have the same independent setups, one on a laptop and one on a desktop computer. Could you suggest of how do you run the program (did you copy the Debug folder from laptop or did you add your project to 3.98t version...)?

Generally, the 1st error that you are getting, if it is 0x80070005, would point to DCOM Permission problems (slightly weird since it would be sort of network related and you are not using the network for your setup). The 2nd error is just a consequence of the first error (since there is no connection to the server it cannot find an instance of the object). Here is a link suggesting issues with .Net for similar error:

http://www.schneider-electric.us/sites/us/en/support/faq/faq_main.page?page=content&country=ITB&lang=en&locale=en_US&viewlocale=en_US&id=FA212076&prd=&redirect=true

It is sufficient to Google your error and look at some results/explanations. Luckily, you have a setup that is already working for you so you could do things in parallel and compare laptop DCOM configuration with desktop DCOM configuration. Since the laptop is working then you should try to setup your desktop with the same settings (assuming it is DCOM issue).

I am using MatrikonOPC Explorer to find all OPC servers available on my computer and/or network computers and then choose one of them and connect to it. It is free to download and you can see a picture of it in this post https://www.advancedhmi.com/forum/index.php?topic=648.
If this explorer cannot find your OPC server or connect to it then AHMI shouldn't be able to do so either.
If it does find your server that should indicate that your server was installed properly and OPCenum has enumerated it.
If it cannot connect to the server then it should pop an error message. Try it since it can only help you identify the cause.

One more thing to mention to you is to copy the whole AHMI project that you have on a laptop and use it on a desktop computer. If it works then there might be an issue with the OpcDaCom driver that is included in version 3.98t (which shouldn't really be the case since it works for me on my computer and over the network as well). From what I recall the driver has changed since 6 months ago and that's why I am suggesting to try the old AHMI version.
« Last Edit: May 20, 2019, 01:20:57 AM by Godra »