Problem connecting to Matrikon OPC Server

We just installed a new NDC system that came with a Matrikon OPC server. I can browse items with their opc explorer and also from my existing Kepware OPC quick client. From FSQL I cannot browse or connect to the Matrikon server.

From both Matrikon and Kepware the program ID is “Matrikon.OPC.NDCOAP.1” but from FSQL the ID is “Matrikon.OPC.NDCOAP”.

When the Matrikon server is started the “OPCNDC~1.EXE” process is started as username: factorypmi. When Kepware quick client accesses this server no additional process starts. When I double click the “Matrikon.OPC.NDCOAP” server in FSQL another instance of “OPCNDC~1.EXE” starts as username: System.

How do I get FSQL to correctly connect?

Sounds like FactorySQL is trying to start it’s own instance in it’s own user account- by default the FactorySQL service runs under the “System” account.

I’d try changing the service to run under your “factorypmi” account:

  1. Run “services.msc”, or go to Control Panel-> Administrative Tools->Services
  2. Right click FactorySQL, go to Properties.
  3. Click the “Log-on” tab.
  4. Set to “this account:” and enter in the user information for the factorypmi account.
  5. Hit OK, stop and start the factorysql service. Your frontend will be disconnected if it was open, so you’ll need to reconnect that.

FactorySQL should now connect to the server instance you have already have open.

Let me know if this doesn’t help!


I changed the logon properties as you suggested but I get an error that the system actively refused the connection. I then changed the Matrikon to run as a system service. Now Only one instance is loaded but FSQL still shows “Matrikon.OPC.NDCOAP” instead of “Matrikon.OPC.NDCOAP.1”.



Does FSQL now work with the server name “Matrikon.OPC.NDCOAP”? That name is simply a shortcut to the CLSID of the application, so if it works as is I wouldn’t worry about it too much. It comes from the registry, and was put there by the Matrikon installer. FactorySQL queries OPCEnum for the available servers on the machine, and it could be that the other clients are doing something different, or requesting a different version of the server. Ultimately they should both point to the same application, so if it works, go for it.



I cannot browse items yet but I tried to enter the item path directly and it is now connecting and reading the data.

I am still having problems trying to read an array item. If I configure the item as an array all communications stop. If I configure it as a blob then it works. The item in question is a 514 point array containing integers and floats

I did some more experimenting with the array type and in the status tab it gives me this message:

“Unexpected error executing this group. Object must implement IConvertible”

Hmm, that seems to be a problem. However, even it did work correctly, it would only store the values as a big pipe separated string to a single column, which is probably not what you want.

Depending on how you want to use the array, the block group may be good option. You can create an item with a “template” segment, and get each value into a row in your table. When you create a template segment, you define a pattern and a place holder, which gets filled in with numbers. That way, you can easily address arrays of items.

As for browsing- if you go to Help->Log Viewer, are there any errors that appear when you try to browse?


Hi, Thanks for the reply.
I will start with the browsing first. Yes, there is an error entry in the log:

[quote]Error during opc tree browse.
at OpcCom.Da.Server.Browse(ItemIdentifier itemID, BrowseFilters filters, BrowsePosition& position)
at Opc.Da.Server.Browse(ItemIdentifier itemID, BrowseFilters filters, BrowsePosition& position)
at FactorySQL.ServerElementBrowseOperation.BrowseItems()
[/quote] This error appears each time I double click the server

Now for the array. I have different arrays to process but the most important one is a 514 point numeric array defined like this:

Starting point: 12.1 (X-axis starting value)
Resolution: 0.10483 (X-axis increment)
Number of points: 512
Point1: 6.22 (Y-axis value for point 1)
Point512: 3.87 (Y-axis value for point 512)

I want to bring in this array and display with the chart component. I also want to archive this to the database.

Ok, first the error: if you scroll down a bit more (past the code information), there should be a secondary message that should provide a bit more information.

For the chart: Is each point a different x value displayed in 1 pen, or is each point it’s own pen? If they all get displayed in 1 pen, a block group is definitely the way to go. It’s going to put each value as its own row, which is perfect for graphing.

If you can, it might also be helpful to export the log from FSQL and email it to: support AT


There wasn’t any other information in the message. I tried to export the log and it created an xml file that did not contain any error messages. I am using version 4.1.5

For the chart: I should be more specific about the array. It is not a typical array like a PLC. With this system I read one address and it returns a comma delimited string. I’m not sure how to use the block group since I can’t address each element of the array separately.

I would have 512 points in the dataset
Point 1 = (X-axis starting value), (Y-Axis point 1)
Point 2 = (X-axis starting value) + (X-axis increment), Y-Axis point 2)
Point 3 = (X-axis starting value) + [2 * (X-axis increment)], Y-Axis point 3)
Point 4 = (X-axis starting value) + [3 * (X-axis increment)], Y-Axis point 4)

Sorry about the confusion in this topic. While writing this I realized I was refering to the data as an array when it really was a string.

Ah, well that certainly changes things a bit. Unfortunately a comma separated list of values coming from the PLC isn’t too flexible. You could set the data type to string, and store the list under a single column in the DB, but then you’d need to parse it out on the display side.

If you really wanted to get fancy you could write a custom function or procedure in the database which took in a string (your value), parsed it, and inserted each value separately in a table. You could then call this from an action item in FactorySQL, passing in the value.

Hope this helps,

For the sake of completeness, I wanted to post the resolution to the OPC server connection problem:

Turns out the particular Matrikon server being used (a customized OEM server version) reports that it supports OPC 3.0, but actually doesn’t (or has problems with it). FactorySQL will normally use 3.0 if both 2.0 and 3.0 are available. However, under ‘Service Settings’ in FactorySQL it is possible to request that it use 2.0 when possible. By changing this setting, everything worked correctly with the server.

Just wanted to put that up in case someone else has similar problems.