Author Topic: OPC help  (Read 2642 times)

MrPike

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
OPC help
« on: April 05, 2016, 11:51:07 PM »
Hi Archie, I'm trying to connect to a device thru OPC and need help.  I can connect to the device thru a OPC quick client as shown in the attached pic.  However I cannot get AHMI to connect using the settings in the pics.  can you inform me what I'm doing wrong?  thanks

P.S. I may have to attach pics in two separate post due to limitations on the forum. 

MrPike

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
Re: OPC help
« Reply #1 on: April 05, 2016, 11:53:54 PM »
this error occurs one time during the initial start of the application

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: OPC help
« Reply #2 on: April 06, 2016, 05:04:41 AM »
I would try to remove the OPCTopic, then use labats.normvca in the PLCAddressValue

MrPike

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
Re: OPC help
« Reply #3 on: April 06, 2016, 12:51:42 PM »
Tried with same results. Also tried every combination group name, topic name, and PLC address Value
I keep getting the CoCreateInstanceEx: Invalid value for registry in the basic label text on first starting app. Then get "object reference not set to an instance of an object". I tried this in 3.99a and started a fresh project in 399d with just one OPCDAcom1 driver and a single basic label. Same results. What do those error messages mean?  I verified the server is OPCDA. Also tried serial and TCP settings on the OPC server and both work with the test client. But same results with AHMI. Please help. Thanks.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: OPC help
« Reply #4 on: April 06, 2016, 12:56:50 PM »
Do you have an OPC Browser that will find and identify all of the servers by name? This is very helpful in making sure you have the name correct.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: OPC help
« Reply #5 on: April 06, 2016, 01:23:00 PM »
The only OPC Server that I have used that required a topic was RSLinx, so most likely that should be left blank. The GroupName realy does nothing because the OpcDaCom creates names internally. The biggest challenge is to find the exact server name.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: OPC help
« Reply #6 on: April 06, 2016, 01:25:43 PM »
I found the ServerName, it is "SWToolbox.OmniServer"

Is labats a topic you created?
« Last Edit: April 06, 2016, 01:27:33 PM by Archie »

Godra

  • Hero Member
  • *****
  • Posts: 1438
    • View Profile
Re: OPC help
« Reply #7 on: April 06, 2016, 08:39:15 PM »
Attached pictures show:
* what MatrikonOPC Explorer and OPC Quick Client look like side by side
* driver settings
* PLCAddressValue setting of the BasicLabel

These were used with the same server (in this case Matrikon.OPC.Simulation.1).

Only ItemID was used for PLCAddressValue field and neither OPCGroup nor OPCTopic was specified in the driver settings.

It worked for me so hopefully it might work for you as well (I would suggest you try using MatrikonOPC Explorer).

MrPike

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
Re: OPC help
« Reply #8 on: April 06, 2016, 10:53:20 PM »
Yes "labats" is a topic I created in Omniserver. I will try these settings  tomorrow Godra and let you know how it works. If it is unsuccessful I will try to run Matrikon OPC sniffer and log the results to share. Thanks.

MrPike

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
Re: OPC help
« Reply #9 on: April 09, 2016, 12:47:45 AM »
Update:  I removed the OPC Topic and OPC Group properties and retried with the same results.  I then installed an OPC analyzer and restarted PC and it suddenly started to work.  My best guess is something in VS was goofed up and a PC restart corrected that.  Its working now, thanks for the help.