LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using global in web method vis

 I am using labview 8.6 . I have a problem in using Globals in my web method vis. If i directly read the data it works fine but if i use global it doesnt read data.

0 Kudos
Message 1 of 7
(4,048 Views)

Hi Jawad,

can you explain a bit more? Why do you want to use globals if you are able to read it directly? Smiley Wink

 

Mike

Message 2 of 7
(4,046 Views)

Hi Mike, I am using global because my application is so big. With global i can easily access changes that we made  in other vis with reading .cfg file again and again and before closing application at once i change my .cfg by geting and saving data from global.

 

Can you tell me the limitations of web services?

0 Kudos
Message 3 of 7
(4,030 Views)

Hello Jawad,

 

Thanks for sharing your issue. There could be more than one reason why your global variables are not behaving as you would like them to. I would encourage you to read through the following online article to get started with troubleshooting: <https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P83YSAS&l=en-US>. Could you also share more about your application and what your ultimate goal is with the global variable?

 

If you are interested in web services, I would recommend reading the articles at the following links:

http://zone.ni.com/devzone/cda/tut/p/id/7350 

http://zone.ni.com/reference/en-XX/help/371361E-01/lvhowto/build_web_service/ 

https://www.ni.com/en/support/documentation/supplemental/08/labview-web-services-faq.html

If you have any questions about web services, please feel free to ask.

 

Regards,

 

Dan Richards

Dan Richards
Certified LabVIEW Developer
Message 4 of 7
(3,992 Views)
I hope Dan or someone else will correct me if I'm wrong, but my understanding is that web services VIs run in their own application instance, separate from the application or executable that launched the web server.  Because of this, you cannot use globals to share data between the web method and the main application - you'll just get independent copies of the global with different values, one in each application instance.  To share data between a web method VI and your main application consider using shared variables, files, or VI server.  One approach would be to use a functional global variable containing a cluster of all your global values, and call that from your web method VI using VI server.
Message Edited by nathand on 09-15-2008 11:49 AM
Message 5 of 7
(3,989 Views)

HI Dan_R,

                 Thanx for providing me a useful help and links.

 

 

0 Kudos
Message 6 of 7
(3,974 Views)

Hello Nathand,

                         thanx for u help.I will try this approach.

0 Kudos
Message 7 of 7
(3,973 Views)