08-11-2011 08:47 AM
Hi,
I'm using a parallel model in Teststand with 8 testsockets (Teststand 3.1 and Labview 7.1)
I want to collect some log data from all the (sub-)sequences that run in the testsockets. At the end of sequence I want to write (in the cleanup) the collected data of that specific testsocket in a common text file
So I need a global variabel in which I can concate data (strings) but has a (local testsocket) copy which I can use. Not a station Global in which all the testsockets can write
I thought I had the solution by using a fileGlobal string.
I read the previous string from the fileglobal with a Teststand Get Property Value (string) in my VI concate the new string and put it all back in the fileglobal with a Set Property Value.
The idea only works half. the text file only shows the last entry of the fileglobal
If I use Watch Expressions I can see that the Fileglobal is filled with data but it is overwritten every time.
If I set a breakpoint and I step through my VI I see that the previous string is read, concated with new data and put back in the fileglobal
It looks like every time a sub-sequence with a VI that tries to add a string to the fileglobal a new copy of my fileglobal is created in which data is written
I don' know what I'm overlooking or my interpretation on the workings of a Fileglobal are faulty
thanks
Shaun
08-11-2011 09:45 AM
You need to set the property in the SequenceFile Properties so that you share FileGlobals.
08-15-2011 02:08 AM
Hi Ray
I tried your advice, but no sigar.
I went to the EDIT-pulldown menu and click-ed on the option Sequence File Properties and in the new window I changed the option Sequence File Globals to "All Executions Share the Same File Globals"
But it didn't work. In addition to this I tried changing properties of my FileGlobal by marking the the boxes next the properties PropFlags_Shared and PropFlags_SharedAtRuntime. But still the same problem
Do know what I'm doing wrong ??
regards
Shaun
08-18-2011 09:28 AM
Hallo,
I don't know that you still have you problem to share with fileGlobal, but I found some information which maybe is useful for you.
Problem:
When executing my sequence under the Batch UUT process model, I update a File Global Variable from one UUT in the batch, but the other UUTs do not see the update. It is as if each UUT has its own separate File Global. Why is this happening?
Solution:
This is expected behavior because each UUT in the batch does, in fact, have its own separate copy of the file global variable by default. This is because each UUT in the batch has its own execution, and by default, sequence files do not share file globals between executions. So if you have a sequence file with a file global named FileGlobals.Global1, and run your sequence under the batch model with 3 UUTs, then there will be three separate copies of FileGlobals.Global1 opened in memory, one for each UUT.
If you want, you can override this behavior by following the instructions in KB29TEE5IJ: How Do I Share Data Stored in a File Global Between Different Executions?. This will force all executions (UUTs) in a batch model to look to one memory space for the file global and not create a separate memory space for each UUT in the batch.
Let me know if it could help you.
Best regards,
08-29-2011 02:44 AM
Hi Guys,
Thanks for all your input. I was out of the office for last 2 weeks so I wasn't able to reply. But just before I found a small bug in my code hidden deep in a sub-VI. Which didn't read the Fileglobal variable but started with a empty string input. Causing the fileglobal to be emptied and giving me the idea that the File Global was overwritten every time. Once I solved this problem it worked fine
Thanks again for all the input. Now I can tackle the next problem figuring out how to log the testresult (passed/failed) from a testsocket. So time to search the posts or start a new post
regards Shaun