OPC-DA to RSLinx Classic (Emulated PLC)

#1

While doing testing I found a way to use the OPC-DA connection to create a link between 2 computers and read values from an RSLinx topic I had created to an emulated PLC.

Note: Because this uses OPC-DA (because RSLinx does not yet support OPC-UA), this will only work on Windows (unless an OPC-DA client has been released for the linux version since last I used Ignition)

Pre-requisites:

  1. Two computers (or VMs) that can communicate to each other using IP addresses and computer names.
  2. A computer with RSLinx Classic and RSLogix Emulate (for my testing I used 5000)
  3. A second Windows computer with Ignition installed

Step 1: Configure DCOM Settings on both computers:

1)	On BOTH Computers 
     a.     Launch the DCOM configurator by clicking on the start menu then typing “dcomcnfg”
     b.	     Expand Component Services->Computers
     c.     Right click on My Computer, and select Properties.
     d.     Select the default properties tab
          i.     Make sure “Enable Distributed COM on this computer” is checked
          ii. 	Set the Default Authentication Level to Default.
          iii.	Set the Default Impersonation Level to Identify.
 
2)	On the computer with RSLinx: (Note, it should be possible to skip this step and instead apply these settings only to the next to DCOM areas in steps 3 and 4, but if you’re okay with it you can change the global settings which have been tested and will work for a fact)
     a.     	Browse back to the screen shown above and select the COM Security tab
     b.     	Click the Edit Limits button in the Access Permissions section.
          i.	Add ANONYMOUS LOGON to the Group or user names list, and give it full access to local and remote settings.
          ii.	Ensure that the “Everyone” group has access to both local and remote access.
     c.     	Click on the Edit Limits button in the Launch and Activation Permission section.
          i.	Add ANONYMOUS LOGON to the Group or user names list, and give it full access to local and remote settings.
          ii.	Ensure that the “Everyone” group has access to both local and remote access.
     d.     	Click on the Edit Default button in the Access Permissions section.
          i.	Ensure that the “Everyone” group has full permissions for local and remote access.
     e.     	Click on the Edit Default button in the Launch and Activation Permission section.
          i.	Ensure that the “Everyone” group has full permissions for local and remote access.

3)	Edit the OpcEnum Entry in DCOM Settings
     a.     	After applying the above settings click on “OK” then expand “My Computer” in the dcomcnfg window and click on “DCOM Config”.  
     b.     	Change the view to “Detail” and expand the “Name” Column enough to read the names.
     c.     	Find the entry labeled “OpcEnum”
     d.     	Right click on “OpcEnum” and select Properties
     e.     	In the General tab, set the Authentication Level to none.
     f.     	Within the Identity tab, select “The system account (services only).”
     g.     	Select the Security tab
          i.	If Customize has to be used, it must be configured to make sure that the group “Everyone” has the correct permissions enabled for both sections. As was done for the system wide DCOM settings.
          ii.	Otherwise:
               1.	Set the Launch and Activation Permissions and Access Permissions both to default.
               2.	The Edit Default work we did before is what these will now use.

4)	Edit the RSLinx Entry in the DCOM settings
     a.	     Find the entry labeled RSLinx
     b.     	Right click on the RSLinx entry and select properties.
     c.     	Set the Authentication Level to Default.
     d.     	Within the Identity tab, select “The interactive user” (This option is only available provided you do not have RSLinx set to run as a service)
     e.     	Security tab
          i.	If Customize has to be used, it must be configured to make sure that the group “Everyone” has the correct permissions enabled for both sections. As was done for the system wide DCOM settings.
          ii.	Otherwise:
               1.	Set the Launch and Activation Permissions and Access Permissions both to default.
               2.	The Edit Default work we did before is what these will now use.

5)	On the Client Computer
     a.     	Restart the client application you’re using, and attempt to connect to the OPC server. If all has gone well, the OPC server should now be accessible.

6)	Restart both computers just for good measure.

Step 2: Install the OPC Core Components Classic kit

1) Go to https://opcfoundation.org/developer-tools/developer-kits-classic/core-components and download the appropriate package for your system architecture. 2) To download you'll have to register an account, but it's free 3) Install on computer with Ignition.

Step 3: Configure RSLinx OPC Topic

1) In RSLinx Classic, under the DDE/OPC menu on the menu bar select “DDE/OPC Topic Configuration” 2) Create a new Topic name (I used Emulate) 3) Link the new topic name to the slot being used in RSLogix Emulator 5000 4) Click “Apply” then “Done”

Step 4: Configure OPC Server Connection in Ignition

[code]1) Open Ignition Gateway and enter configuration area
2) In the left menu area, find the “OPC Connections” area and select “Servers”
3) Select “Create New OPC Server Connection…”
4) Select “OPC-DA COM Connection” then click “Next>”
5) Select Remote then click “Next>”
6) Enter the IP Address or Hostname of the computer that RSLinx Classic is on then click “Next>”

Note: If you followed this guide correctly and have already installed the OPC Core Components Classic Kit then you will be presented with a list of OPC servers on the computer you are connecting to. If you do not get a list and only see one option that says, “Other Server” then the OPC Core Components Classic Kit is not install correctly and you will not be able to connect to the RSLinx Topic you created.

  1. Select the option that says, "RSLinx OPC Server" then click "Next>"
    
  2. Give the Connection a name, and if desired a description, then click, "Create New OPC Server Connection".
    
  3. If done correctly, the status should go from "Closed" to "Connecting" to "Connected"[/code]
    

You can now use the OPC quick client to browse the tags in the topics you create in RSLinx. Since I was using two VMs on the same laptop there was some lag (5 to 10 seconds) for me in expanding the “Online” folder. If you don’t see any tags at this point, but everything else is working, make sure you have RSLogix Emulate 5000 turned on and a project is correctly loaded.

Enjoy!

2 Likes

Ignition and Rockwell Emulate 5000/RSLinx Classic Gateway
#2

:thumb_left: :thumb_left: :thumb_left:

0 Likes

#3

Timely post as I was just working on setting up a system to do this! I have been able to setup a OPC server connection and can browse all my tags; however, I cant get any data. I have the green question mark with a quality of unknown in the designer. When I go to the quick client and check my tags, I can see my tags, but I cannot get any data when I subscribe. When I try to read a tag I get a quality of:

“[OPERATION_FAILED] null” up top and a quality of “[NOT_CONNECTED] null” in the subscription list.

Any ideas?

I have backed up to a simple project with just one tag in the emulator, deleted the server in ignition and reinstalled only to have the same result. I have not backed up to a blank ignition gateway and started from there - that’s my next step as I started with an old project.

0 Likes

#4

What version of RSLinx are you using? (Is it RSLinx Classic?) If I remember correctly when I had RSLinx configured to run as a service, I could not select “Use Interactive User” in the DCOM settings, which would create problems.

Have you tried it with Windows Firewall turned off on both computers?

When you told it to connect to a remote OPC server were you able to see the names of the OPC server on the remote workstation? What version of the OPC core components are you using?

Is RSLogix Emulate on with a project loaded? Do the tags you’re reading form have the correct external access rights?

Beyond that I would check each step and confirm that you followed each step, it’s a pain to go through, but I’ve done this on a couple of computers now with no issues so I know when I follow these steps exactly (which is why I wrote it down in the first place :laughing: ) it all works with no problems. I’ve also been able to use these steps to get FSGateway to communicate between Wonderware and RSlinx Classic.

0 Likes

#5

In case you never got any further, I did some testing and can confirm that you will see this message if you are running RSLinx as a windows service. You have to set it to run as an application and on the “Identity tab” of the RSLinx DCOM properties window select “The interactive user”.

0 Likes

#6

Another way to emulate the PLC data with Ignition is using the SoftLogix controller and the same setup with ControlLogix-Ethernet/IP driver in Ignition. It works pretty nice.

0 Likes

#7

One of the issues I had was that the “Edit Limits” button was disabled/grey-ed out. It turns out that there is a registry key that defines this. However, editing the registry key or even the local/global policies did not allow OPC-DA to work. So I deleted the registry entry after I made a backup and followed the procedure above. It worked beautifully. I no longer have to rely on Kepware OPC-UA to talk to RSLogix Emulate. I can talk directly with RSLinx Classic Gateway.

These were the registry keys. Note that deleting may have an adverse impact on other parts of the OS so delete with caution and back up your keys.
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\WindowsNT\DCOM
MachineAccessRestriction
MachineLaunchRestriction

0 Likes

#8

Which version of Windows were you using? For my testing I was using Windows 7. If I recall correctly it was the Professional version.

0 Likes

#9

Mine was Win 7 Professional as well.
It was certainly odd because my host computer gave me access to the ‘edit limits’ button but neither of my VMs (I use vmware) had it accessible. All greyed out on the VMs.
I use one VM with RSLinx Classic Gateway and another VM with Ignition. If I were on the same VM, it’d be much easier.

0 Likes

#10

Hi…

Yet another way to pair Ignition with RSLogix Emulate 5000 is: Ignition > OPC-DA > FactoryTalk Gateway > RSlinx Enterprise.

*EDIT: FactoryTalk Gateway must be installed prior to attempting this method.

  1. In FactoryTalk Administrator set up a new local application with an RSLinx Enterprise Server and a new shortcut pointing to the emulator.
  2. In Ignition Gateway create a new OPC Server Connection.
    • Choose OPC-DA COM Connection;[next] Local; [next] FactoryTalk Gateway
    • Name it the same as the shortcut in step 1
    • Save changes.
  3. Start emulator, download code, put in run.
  4. Open Ignition Designer and refresh the OPC Browser. Your connection should show up with all the tags live from the emulator.

As you were,
Steve

1 Like

OPC-UA to RSLogix5000 Emulator?
#11

I did all configuration as above mentioned. Matrikon explorer found the Rslinx but could not access it. it gives error code 0x80040112 for class is not licensed. is it could be the version of Rslinx? i am using Rslinx OEM classic not gateway version.

0 Likes

#12

RSLinx OEM is limited to Rockwell’s own products.

0 Likes

#13

Hello Ignitioneers…

Just as an FYI, I have been testing the new FactoryTalk Linx Gateway v6.00. This version now contains the new OPC-UA driver along side the OPC-DA driver. Being a beta tester for this product, I noticed early on it was a bit buggy, unfortunately. One really annoying bug is that all the OPC tags are doubled in the Ignition OPC Browser… every folder and every tag are displayed twice. I also conducted some rudimentary round trip testing on single tags and the Ignition OPC-UA driver seemed to perform better-than-slightly better. Now, I cannot attest this advantage would be the same if thousands of tags were gathered each round trip, but it seems logical to assume it would (test performed on Emulate 5000 and a physical test rack). I notified the RA software engineering team about the bug, which they could recreate, but… now that this has been released to the public I see they have not fixed it. Hopefully as this offering matures it will be a viable Ignition option, but as for this moment in time I am not a big fan.

Cheers,
Steve

1 Like

Factory Talk Linx Gateway UA mode and Ignition Designer
#14

Does RSLinx OPC Server support Arrays read/write? i heard somewhere that RSLinx has restrictions communicating arrays.

0 Likes

#15

I have FTLGW 6.11 running with Ignition 8.0.0, Emulate 5K v32. The OPC (using DA) shows connected and no faults. I have an FT Local Application setup with the FTL connected to the Emulator.
However all of the tags are showing BAD-Stale in the OPC Quick Client…any ideas?

0 Likes

#16

Hi Dwoo, just to make sure, when you set up the device in the Ignition Gateway you were able to see a full list of options for OPC servers and not just an “Other Server” option right?

Then within that OPC server you were able to browse and see the topic name you previously set up.

If all that is correct and you’re still seeing bad-stale values. I would start by making sure that you’re tags are configured to allow external access. They need to be set to at least Read-only if you want to be to get data from them and read/write if you want to be able to write back to them.

0 Likes

#17

Yes, I had a full list of OPC Servers and chose FactoryTalk Gateway.
I used the FT Live Data Client and browsed using the OPC-DA->FactoryTalk Gateway and was able to see data updating
Data array has EXTERNAL DATA set as Read/Write

0 Likes

#18

Do you have any basic INT or Bool data type tags that you are trying to read or are they all arrays (and what kind of arrays are they specifically)?

0 Likes

#19

INT Array, also tried discrete bool or INTs, same thing. I removed the OPC connection and recreate it, same issue.

I also setup a 2nd OPC Connection using the RSLinx OPC Server (Rslinx Classic 4.11) and works fine.

Seems like an issue with the FactoryTalk Linx GW / FactoryTalk Linx 6.11 or Ignition’s interface to it. Maybe I’ll try patching it up.

0 Likes

#20

That is very interesting. If you do get time to test around with various things I’d be very interested in your results. I’d also look into using the OPC-UA option for RSLinx gateway (assuming it’s been released from beta). OPC-DA is just full of random quirks. You might find the OPC-UA doesn’t suffer from the same issues, is easier to set up when you’re connecting between two separate computers, and responds more quickly than its OPC-DA counterpart.

0 Likes