LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dsc opc shared variables yields Server Failure

I've been struggling with the transition from DSC 7.1 to 8+ ever since the release of version 8. I use the Allen Bradley OPC server supplied with the DSC module (Industrial Automation OPC Servers v 5.1) to communicate with a PLC 5/30 via Ethernet, or at least I did when I was using 7.1.

Prior to today I always failed to get the shared variables that were bound to addresses in the OPC server to deploy, usually getting an error number that started with -19. However today I finally got it to deploy by keeping the I/O server and the shared variables in separate libraries within my project. Now that they deploy I find that I am unable to monitor them. I keep getting a Server Failure. I have browsed the forums here heavily, and the documentation all relates to remote OPC, which is not what I'm doing here (OPC client and server are on the same machine). I tried changing the login account for the Variable Engine service anyway, but that doesn't help, so I put it back.

I have had some luck simply binding my front panel objects to the OPC server addresses using Datasockets, so it appears that my OPC server is working. However, Datasockets is not a viable option for me because there are times when my project needs to write to a large number of addresses in the PLC sequentially, which never works over datasockets (in my experience).

We have continued to work in version 7.1 because of the challenges of moving to 8+, but since we can no longer purchase DSC runtime licenses for version 7.1 in order to deploy, it seems that we MUST move forward to 8+ or abandon LabVIEW altogether (which is certainly an option).

For clarification, I am now working with version 8.2 (but I've been fighting with it since 8.0 without much success). If anybody out there can think of a critical step that I might have missed that might cause this, or if there is a known solution, I could really use (and would greatly appreciate) the help. Thanks!
0 Kudos
Message 1 of 3
(5,108 Views)
Nobody out there seems to have any answers for this, so I kept pounding on it (and pulling my hair out). In the end I finally succeeded in getting one of my old 7.1 DSC projects to run on 8.2. Here's what I did:

1. I begin with a fresh installation of Windows. I tested it with both 2000 and XP Pro. Vista RC1 will absolutely NOT work!
2. Install LabVIEW 8.2, DSC 8.2, and just the OPC server that I need from the IA OPC CD (in my case the Allen Bradley server)
3. Open the IA OPC server editor, and create a new file with an object in it for my PLC (PLC 5/30, Ethernet in my case)
4. Save, set it as the startup file
5. Run LabVIEW, create an empty project
6. Add an IO server
7. Launch Multi Variable Editor, load project file created in step 6, and bind one variable to PLC address
8. Save all. Uncheck auto deploy for the library, and deploy all.
9. Launch variable monitor, browse to new variable, double click to monitor.
10. This will ALWAYS fail with "server failure". Don't worry, just exit completely out of LabVIEW.
11. Stop the Variable Engine service.
12. Run OPC server editor again, and load up the lpd file from your old project. Modify if needed, save, and set as startup
13. Start the Variable Engine service again.
14. Launch LabVIEW
15. Create a new empty project (I created mine in the same directory as my old 7.1 project resided)
16. Add an IO server, and uncheck auto deploy for its library
17. Save all
18. Run Tools->DSC->Migrate->import scf
19. Convert your old SCF file
20. Add the new library to your project (it will be named LabVIEW)
21. Uncheck auto deploy for the "LabVIEW" library you just added
22. Right click on the "LabVIEW" library and do deploy all
23. Save, and open the variable monitor
24. Browse to a tag in the LabVIEW library, and double click
25. This time it will actually monitor the variable, with a status of "Good"
26. Now you can add your main front panel VI to your project, open it and run it
27. Version 8.2 will select the proper legacy tag read/write VI's, whereas 8.0 does not. The writes however do not work. Replace them with shared variable writes. The reads work fine.
28. The empty project that you created in step 5 is a throw away. It will never work anyway.
29. So far the only variables that I can get to work at all are the ones that I import from an scf file, which is a pain, but if I must create all my tags in 7.1 and import them into 8.2 I will (for now). I may try exporting to Excel and copying variables that work in order to get functional new variables, since binding them in the editor does not work.

I hope this helps anybody else out there struggling with moving to 8+ DSC. I saw a few posts with similar issues, but without ANY answers at all. It's a convoluted solution that doesn't make a lot of sense, but for me it is repeatable.
Message 2 of 3
(5,086 Views)
 

Tim,

Thanks for the detailed procedure.  This will defintely help other customers having similar issues.  One thing that may have been causing your difficulties is the OPC browsing compatibility of the IA OPC Servers driver, which was fixed in an update.  You can get it here.

Cheers,

 
--Paul Mandeltort
Automotive and Industrial Communications Product Marketing
0 Kudos
Message 3 of 3
(5,024 Views)