From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Batch FileGlobals data for each UUT seperate

Hello,

I have a batch process that has one set of Fileglobals for the sequence. These file globals are set for "Seperate File Globals for each" and will change based on a popup VI that will accept user input then stuff the values into the fileglobals based on that input. The systesm works great for one UUT but when I start the second UUT the values after the popup are not in the file globals variables for the new socket. Do I need to use the Runstate.TestSockets.MyIndex for each socket when I populate the values? Or do i need to create a Array of file globals based on the Runstate.TestSockets.MyIndex? Like I said it works great if I run either (1 or 2) sockets independent but when I try to run both it does not fuction.

Bill Lewis
0 Kudos
Message 1 of 13
(3,686 Views)

In what callback do you setup your FileGlobal variables? I mean: ProcessSetup, PreUUT, PreBatch, MainSequence, or somewhere else? Could you upload here some code/screenshots, to let us here understand it more detailed?

 

Thanks,

logos_middle.jpg

0 Kudos
Message 2 of 13
(3,666 Views)

thanks, I load each within Mainsequence. There are 2 sockets and I use the standard batch UI then tranfer to my own UI for monitoring. For instruments I use the RunIndex and that works great but values of the fileGlobals seem to be not working correctly.

 

 

 

Bill Lewis
0 Kudos
Message 3 of 13
(3,662 Views)
0 Kudos
Message 4 of 13
(3,660 Views)

Honestly - no ideas...

Right now I selected Batch Process Model, setup it to 2 sockets.

In Sequence File Settings, selected "Separate FileGlobals for Each Execution".

Created FileGlobal "Test", and added Statement step with:

FileGlobals.Test = RunState.TestSockets.MyIndex + 10

And in both windows I've received that FileGlobals.Test equals to 10 and 11, as should be...

 

And what values do you get? Default (like zeroes), or the same, as in the first thread?

 

Thanks,

logos_middle.jpg

 

 

0 Kudos
Message 5 of 13
(3,650 Views)

default all zeros and empty strings. I would assume that anything preformed in the thread would have been part of the same execution. That is the reason I started looking into maybe the Runtime socket approach.

Bill Lewis
0 Kudos
Message 6 of 13
(3,628 Views)

My entire app is to be able to run different part types on the sockets and have different values in the globals for each socket based on the UI interaction. So I'm stuck now Smiley Mad

Bill Lewis
0 Kudos
Message 7 of 13
(3,623 Views)

Any of the TS developers have an Idea? I should be able to populate the run-time socket global within the instance sequence that they are called shouldn't I? or does the popup for user interaction need to be in the PREUUT callback instead in the Main sequence?

Bill Lewis
0 Kudos
Message 8 of 13
(3,587 Views)

Remove from sequence all your private code, try to reproduce the issue. If it will appear again, put sequence here - without code there is no chance to find out, what is happenning.

Also, if you update values in code module via SequenceContext, there can be an error - inside of code module. Did you debug it well?

 

logos_middle.jpg

 

0 Kudos
Message 9 of 13
(3,580 Views)

Yes, the single sequence in running one socket works great. It has ran for many days without issue so I know the overall sequence works great. When I run more than one socket the issue occurs. The first socket that runs will continue with no faults. As soon as the second socket starts it faults due to empty values. Here is the code that was stripped to minimize. There are 2 power supplies each their own COM port and a Compaq DAQ module with 2 AI and one DIO module. That is the reason for the DAQ locks

Bill Lewis
0 Kudos
Message 10 of 13
(3,576 Views)