08-08-2017 06:59 AM
Hello all,
Can anyone give me an gist of how to Log data that's been recorded or executed, across sites running in parallel to be logged within same file.
The method that am thinking is to put a file global under, file properties - same global variable for each and every sites and logging my Data inside one global. Is there any other procedure of handling the same.
We can't help everyone, but everyone can help someone..
Solved! Go to Solution.
08-08-2017 07:05 AM
@PriyadarsiniS wrote:
Can anyone give me an gist of how to Log data that's been recorded or executed, across sites running in parallel to be logged within same file.
What do you mean by "sites"? Parallel loops in the same application? Separate computers?
Other factors to consider:
Do you need to save all data?
Is the data to be logged at the same rate?
What file type do you want? Raw binary? Text? TDMS?
But short answer: Global Variables are NOT for logging. I inherited a project that did that and it did not work well.
Need more information before I can give better advice.
08-09-2017 02:31 AM
Need more information before I can give better advice.
Sure.. pleasure explaining!!
Sites as mentioned represents; sockets running in parallel in TestStand, which is more or less similar to a parallel loop running independent of each other.
I can elaborate this further as:
This was also interesting, can you share knowledge about it.
Global Variables are NOT for logging. I inherited a project that did that and it did not work well.
08-09-2017 03:03 AM
In this case, I would use an Action Engine to store your log data. This ensures the read-modify-write process is protected by having the VI itself act as a semaphore (non-reentrant VI, so only one call can run at a time). The cases I can think of you will need are Initialize, Clear, Add, and Get. Of course you will have an input for socket number.
08-09-2017
03:11 AM
- last edited on
04-14-2025
02:59 PM
by
Content Cleaner
PriyadarsiniS wrote:This was also interesting, can you share knowledge about it.
Global Variables are NOT for logging. I inherited a project that did that and it did not work well.
Are Global Variables Truely Evil?
08-09-2017 04:27 AM
This ensures the read-modify-write process is protected by having the VI itself act as a semaphore (non-re entrant VI, so only one call can run at a time).
But, the VI must be accessed at the same time in-order to log data whenever it's present or at the time of execution of that particular test sequence step, right.
Will not, a 2 D File global that is hard coded based upon socket numbers as column numbers to store respective sockets data serves the purpose.. even-though, its a risky method.
Let suppose this data must be processed, which storage method would be convenient to retrieve data (.txt, .csv etc.,).
08-09-2017 05:04 AM
PriyadarsiniS wrote:
Will not, a 2 D File global that is hard coded based upon socket numbers as column numbers to store respective sockets data serves the purpose.. even-though, its a risky method.
Very risky. You are opening yourself up to one major race condition that will make you lose data. That's why I recommended the Action Engine as that prevents the race condition. And the operation will be fast enough, that the parallel work will still mostly be there (about as much as things actually run in parallel purely due to CPU limits).
PriyadarsiniS wrote:
Let suppose this data must be processed, which storage method would be convenient to retrieve data (.txt, .csv etc.,).
Personally, I like to store my data as tab delimited text or TDMS files. Since you just have a 2D Array of numbers, I would be more tempted to go with the TDMS and make a different channel for each column.
08-10-2017 03:48 AM
That was very helpful, thank you Tim..
Actually is there any recommended site for downloading TDMS viewer, as I have already
implemented LV2G and its working fine!!
08-10-2017
05:37 AM
- last edited on
04-14-2025
03:00 PM
by
Content Cleaner
@PriyadarsiniS wrote:
Actually is there any recommended site for downloading TDMS viewer
I am a big fan of Scout by Signal.X. You can view the TDMS files with the free version. If you want to edit the files and some more advanced things, then you can pay to get the Pro version.