So far, I've used the SequenceFilePreStep callback to do some action for particular steps in the sequetial model. Now, I am trying to run the sequence in the batch model for multiple UUTs but I began to get errors from the callback. Do I have to replace the SequenceFilePreStep callback with the ProcessModelPreStep callback to run callbacks for multple threads?
It seems I have to modify the BatchModel.seq but isn't this sequence used for all batch processes in general? In some other project, I may want to use the default BatchModel.seq. I can delete the modified callback or save the seq file in a different name but this doesn't seem right. How do you usually manage multiple modified process model sequences?
I found an answer for the second question and I tried using the ProcessModelPreStep callback to no avail. I get the same type of errors.
It seems multiple threads are accessing the same properties as described here.
The pre-step callback I use doesn't just read properties but also remove and insert variables to the step's custom additional results. I use statements such as the following.
RunState.CallingStep.AdditionalResults.CustomResults.Item(Locals.LoopIndex).Name == "\"Temperature\""
I don't get why RunState.CallingStep in different threads refer to the same object (shared object). How can I make each thread deal with its own unique CallingStep?