Showing results for 
Search instead for 
Did you mean: 

Global variables with VI Server

Hallo Guys,

in my current project I have some trobbel with global variables.

I have 3 different VI's, whcih I use for communication with the microcontroller MCP2210. For the control I use a pre-made dll (MCP2210 Breakout Modul).

- initialization

- readwritedata

- close

In the first VI I create some references to the different functional levels and save them into a global variable.

When I bring all VI into a top-level VI it works perfectly, but when I call the VI's from Excel via VI Server the global variable of the references are equal to zero or empty.

To call the VI I use the following commands:


- Set lvapp = CreateObject("Labview.Application")
- Set viref = lvapp.GetVIReference("path")
- Call, paramVals)


The first Command I use once.

The other two commands I use serveal times to call all VI's with different path, paramNames and paramVals.

The VI's are called in the order as above.


Why lose the global variables their values and there are solution for that or a workaround?


Thanks for your help


0 Kudos
Message 1 of 2

Hello Banick,


it sounds, like you are reading the default values. Its hard for me tu fully understand what you are doing. Could you provide me with some more information, like Screenshots of your code, vis, etc?

This would help a lot.



0 Kudos
Message 2 of 2