12-04-2025 04:32 AM - edited 12-04-2025 04:33 AM
Hi everybody,
I’m discovering NI multithreading, what a pleasure xD
I have an issue :
I have multiple identicals test bench running into parallels executions (using Sequnce call "use new execution").
BUT I need to log some informations, and for that I need to handle filewriting access.
I wanted to use a FileGlobals variable for that, but they are differents from one execution to an other.
So, I wanted to use Parameters passed by reference, but variable update still not working.
I could use a StationGlobals variable, but seems not really clean to me (maybe cause I started coding with embedded C, and I have a "DO NOT USE GLOBALS" issue xD)
Have you some recommandations for "threadsafe through multi-executions" variable handling in this context ?
Thx a lot !
12-04-2025 06:26 AM
You ca configure FileGlobals to be shared in the SequenceFile settings.
Yet, if this is not really very much cleaner than using StationGlobals.
The clean way IMHO could be setting up an execution which actually performs the file handling and all other executions throwing data at it using a Queue.
12-04-2025 09:22 AM - edited 12-04-2025 09:22 AM
How can you configure FileGlobals to be shared ? I never heard about that.
I’m already using a queue to feed the logfile into a parallel execution.
But I’m encounting an issue to transmit variables for an execution to an other…
12-04-2025 11:20 PM
Which transfer mechanism do you use to pass variables between executions?