LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

server failur

Hi all,

 

I have an application in LV 8.0 and DSC. I'm reading OPC items via shared variables. OPC configuration is done well. Reading OPC items in an OPC client, I see

 

they have a good statues and a right value. But when I check monitor variables, the statues of OPC items are server failure. I can't understand what the problem is. 

 

I appreciate any help.

 

0 Kudos
Message 1 of 12
(6,394 Views)
Hi Maryam,

I believe the problem may be solved by configuring the National Instruments Variable Engine service.

This can be accessed from the Windows Control Panel >> Administrative Tools >> Services >> National Instruments Variable Engine
1. Double click the National Instruments Variable Engine and this should bring up the service configuration
2. Under the General Tab, click Stop to stop the service
3. Click on the Log on Tab and change the Log on as: from Local System account to This account.
4. In This account, enter the domain name\username and your password
5. Click apply, then OK
6. Start the service and your tags should now read.

Please let me know if this works for you. If it doesn't, could you post your code and I'll have a look at it?

Kind regards,
Sarah Brady
National Instruments | UK
Sarah

Applications Engineer | National Instruments | UK & Ireland
0 Kudos
Message 2 of 12
(6,366 Views)

Thanks for your guide. I did whatever you said but my problem hasn't changed. I've attached my code. One more thing I really want to know what these instructions were for.

Message Edited by Maryam on 06-18-2006 02:18 AM

Message Edited by Maryam on 06-18-2006 02:22 AM

0 Kudos
Message 3 of 12
(6,355 Views)
Hi Maryam,

The variable engine needs to be running in order to be able to view shared variables on a network. The engine should start working when you launch windows but sometimes it needs to be configured.

Just to make sure that the OPC server has been configured correctly, could you confirm that you have completed all of the following steps?:

1. Start a new project
2. Right Click My Computer in the project and select NEW>>IO Server
3. Select OPC
4. BROWSE->NETWORK
5. Select OPC server on network
6. TOOLS>>DSC MODULE>>Multiple Variable Editor
**** IN VARIABLE EDITOR****
7. FILE>>OPEN PROJECT LIBRARY and select the library associated with the OPC server
8. EDIT>>Create Bindings
9. Select the OPC server and then ADD a group of variables from it
10. HIT OK
11. HIT APPLY.
12. Close Multiple Variable Editor
**********************
13. Right Click on library associated with the OPC editor and hit DEPLOY ALL. (This is the only way I could get them to show up in the Variable Monitor)
14. TOOLS>>DSC Module>>Monitor Variables
******IN Variable Monitor*******
15. Select Library on left of variable monitor and double click on 1 or 2 variables.

Also, have you been able to use the shared variables to read data on the block diagram?

I'm going to try and build a variable myself that uses an OPC server to see if I can reproduce the problem.

I'll let you know how I get on.

SarahB

NI | UK
Sarah

Applications Engineer | National Instruments | UK & Ireland
0 Kudos
Message 4 of 12
(6,336 Views)
Hi Maryam,

Just to confirm, did you set up the account information for both the client and the server PCs when you configured the variable engine?

The following document outlines the possible reasons for getting a Server Failure error:
http://digital.ni.com/public.nsf/websearch/8719713F089653C1862570F10074E06B?OpenDocument

The following knowledge base may also be useful as it outlines methods for troubleshooting OPC interface problems:
http://zone.ni.com/devzone/conceptd.nsf/webmain/401cb3a4e216356286256bc7004b5831

Another thing to check is the compliance of your OPC server. Do you know if it's OPC 1.0, 2.0 or 3.0 compliant? LV 8.0 is only compliant with OPC 2.0 and 3.0, not 1.0 so it would be worth checking that.

Kind regards,
SarahB
NI | UK
Sarah

Applications Engineer | National Instruments | UK & Ireland
0 Kudos
Message 5 of 12
(6,334 Views)

Dear SarahB,

 

I really excuse you for my delay replying the message, these two days I didn't access to my PLC to check these solutions. I'm thinking of using LabVIEW OPC Server to have my project progress independent of these problems. I want to know using Shared variable Engine and NI-PSP protocol how I can perform this application.

 

0 Kudos
Message 6 of 12
(6,323 Views)
Hi Maryam,

I'm not sure I fully understand your question. Do you want to stop using the DSC module?

If you want information on how to use NI-PSP and shared variables there is some information on how to configure it etc in the LabVIEW help.

There is also lots of information on the NI website if you would like further information. The following tutorial describes how to use the Shared Variable:
http://zone.ni.com/devzone/conceptd.nsf/webmain/5b4c3cc1b2ad10ba862570f2007569ef

Have you configured your OPC server in the NI Server Explorer utility? What is the status of your variables in that?

Regards
Sarah

Applications Engineer | National Instruments | UK & Ireland
0 Kudos
Message 7 of 12
(6,307 Views)

Hi sarah,

 

First I should note I'm working on a single PC meaning the Server and the client are on the same PC. Then I don't need to configure the SVE to log on as another user other than Local Computer. Second, I won't need browse for "Network" instead of "Machine" configuring OPC Client Instance in my Project.

 

By the way I didn't change SVE configuration, but I completed all the steps you mentioned in reply 4. And surprisingly the problem was solved. After this I back to my previous project which I had an OPC Client instance configured to be on local host not on network. I rebound the variables again to the items of this OPC Client instance and the problem was solved!

 

I mentioned I moved all the application to a new PC when I encountered this problem. Before that it was working well. Then as I understand whenever I run the program on a new PC I should rebind all the variables or I should create my bindings to OPC items programmatically. I really appreciate if you confirm me on this result. And I want to know if this weakness really exists. And to programmatically create bindings what can I do?

 

Also in Reply 5 you said, "Just to confirm, did you set up the account information for both the client and the server PCs when you configured the variable engine?" how can I do this?

0 Kudos
Message 8 of 12
(6,288 Views)
Hi Maryam,

You shouldn't have to rebind all your variables each time you change PCs provided the OPC server you're referencing is configured the same.

If you do need to bind the variables programmatically you can use property nodes to do this. The following KB describes how you might go about doing this:
http://digital.ni.com/public.nsf/websearch/2E8BAD0EA218A7558625712E0003F044?OpenDocument

The following discussion forum also describes a similar problem to the one you appear to be having:
http://forums.ni.com/ni/board/message?board.id=170&message.id=157928&requireLogin=False

Another thing that may help is if you manually deploy your variables. When you build variables they default to autodeploy in the project window. If you turn off the autodeploy by rightclicking on the vilib and either manually deploy them through that shortcut menu or programmatically deploy them using the Deploy Libraries VI that's on the DSC palette.

I also found this discussion forum which may also be useful:
http://forums.ni.com/ni/board/message?board.id=170&message.id=177268&requireLogin=False

Finally, with regards to:
"Just to confirm, did you set up the account information for both the client and the server PCs when you configured the variable engine?"

I only meant for you to do this if you were working with more then one PC. If your server and client are on the same machine then this doesn't really matter.

Kind regards



Sarah

Applications Engineer | National Instruments | UK & Ireland
0 Kudos
Message 9 of 12
(6,268 Views)
Also, I forgot to ask, have you resolved the issue you posted on this forum?
http://forums.ni.com/ni/board/message?board.id=170&message.id=188425


Sarah

Applications Engineer | National Instruments | UK & Ireland
0 Kudos
Message 10 of 12
(6,266 Views)