Test Socket PreStep Callback

Hi:
I'm trying to create a trace file that contains information on every single step executed by Teststand. I do not want to have to edit any test sequence files, only the model files. I have tried using sequence callbacks StationPreStep (StationCallbacks.seq), ProcessModelPreStep (BatchModel.seq) and SequenceFilePreStep (BatchModel.seq). All of these only show me some of the steps. I do not see step results for any of the test sockets. I only see steps that have been called by the controlling 'Test UUTs' socket. 
Can anyone tell me how to implement a PreStep callback on the test socket steps without editing any test sequence files?
Thanks,
Dave

Nevermind.... the callbacks work. It was a different problem. I was enabling the tracing via a variable that was only enabled on Test UUTs. Working now!

Similar Messages

  • How to change Number of test socket in Model option during run-time

    I wanna be able to change the the number of test sockets(in the Model Options menu) during runtime. I have overriden the Prebatch callback and used my own instead. I have a LabView program in my Prebatch where I would select the test script each time before running the batch. I wann be able to also modify the number of test sockets each time before I run the batch again. I tried setting the "Parameters.ModelData.ModelOptions.NumTestSockets" from the Labview program which is in my Prebatch before running each batch, but get into errors. Please help?

    Hello Kumar,
    The Batch process model shipped with TestStand does not handle this scenario, but you can still do this. Attached is a sequence file that utilizes the Batch Model's ProcessCleanup callback to reset the next execution point. It still uses the method of setting the Parameters.ModelOptions.NumTestSockets variable in the PreBatch callback. The change I added was three steps to a different callback (the ProcessCleanup callback):
    Message Popup - prompts Yes or No to continue testing with a new batch size.
    Statement 1 - based on the response to the message popup (via precondition), resets the Batch Model's next step to be executed and the ContinueTesting flag:
    RunState.Root.RunState.StepGroup = "Setup"
    RunState.Root.RunState.NextStepIndex = 0
    RunState.Root.Locals.ModelData.ContinueTesting = True
    Statement 2 - based on the response to the message popup (via precondition), loops to reset each TestSocket's ContinueTesting flag:
    RunState.Root.Locals.ModelData.TestSockets[RunState.LoopIndex].ContinueTesting = True
    These two statement steps force the next step to be executed in the Batch Process Model to be the first step in the "Setup" step group, and reset all necessary flags for the batch itself and the individual TestSockets. I discovered the flags that had to be reset by trial-and-error (that was the time-consuming part).
    You can run continuous batches of the same size you first chose (for as long as you like), but when stop the batch execution this new message popup will prompt (yes/no) whether you want to continue testing with a new batch size. If no, then processing terminates. If yes, then the next two statement steps are run and execution resumes back at the beginning of the Batch Process Model's Setup step group. This forces the ModelOptions callback to be executed again, so your VI (in my example here it's just a Message Popop) can then set NumTestSockets appropriately.
    Thanks for contacting National Instruments!
    David Mc.
    NI Applications Engineering
    Attachments:
    kumar.seq ‏27 KB

  • Disable a test socket during execution (Batch Mode)

         We are running a Batch Model with Batch Synchronization.   I am wondering if it is at all possible to totally disable one or more of the test socket during execution.  I know that the opening screen allows you to choose which sockets are active, but in the event that something goes astray like the RS-485 communication is non-responsive, I would like to disable one or more at anytime during the test.  Thank you in advance for any ideas you come up with.
    Regards
    Scott
    Environment: TestStand 2010
    Solved!
    Go to Solution.

    I am not aware of how to stop a socket which is already running and facing an error midway.
    But this setting will ensure that the socket is disabled for the next runs.
    1) Override the preBatch callback.
    2) Call this statement in the current executing thread to stop the socket from next run. ( precondition = on error)
    RunState.Caller.Parameters.ModelData.TestSockets[RunState.TestSockets.MyIndex].Disabled=True

  • How can I set the number of test sockets in my program?

    How can I set the number of test sockets in my program? I use LabWindows/CVI  6 and TestStand version 2.0.
    And I use BatchModel for the parallel UUT running. I didn't found program way to set the number of test socket. I think I should have it. In TestStand I can change the number of test sockets through menu Configure -> Model Options -> number of test sockets (I mean I do it by manual mode).
    Thank's a lot.
    Maria

    One way you can set the number of Test Sockets for your sequence is by overiding the ModelOptions Callback used by your sequence. Select All Sequences from the View drop-down then right click, select Sequence File Callbacks, select the ModelOptions callback and then click on Add. You can then select the Edit button to Edit the ModelOptions for your sequence. You can set other ModelOptions as required also.
    RG

  • Associating a comm port with a TS test socket

    Hello,
    In order to run several test platforms on one machine (parallel model), I must be able to associate each test socket with a unique serial port. Each hardware platform has it's own serial connection which is built in Labview. So my question is, "how can I use a single test sequence calling LV VIs where each test socket must use a different comm port?"
    Thank you for helping,
    Adam

    How dynamic is the com port configurations? Will some testers only differ in the number of ports? If that's the case, then you'll also need to dynamically change how many sockets you're testing. This could be done, probably in a sequence file load callback and with the LabVIEW function VISA Find Resource. Searching for all ASRL resources will return a count and their names. You could populate a station global string array with the names. Right now, I have a fixed count of resources so I just populate a main sequence local variable with all of the possible names. I assign the resource name for the VI as Locals.VISAResource and in a pre-expression for the VI, Locals.VISAResource = Locals.AllVISAResources[RunState.TestSockets.MyIndex]

  • I want my Test Sockets will run in loop

    I want my Test Sockets will run in loop. I use BatchModel, sequential batch mode.
    Now it works so:
    process setup
    main sequence of Socket 1...
    main sequence of Socket 2...
    main sequence of Socket N...
    process cleanup
    I want to do so:
    process setup
    loop 1
    main sequence of Socket 1...
    main sequence of Socket 2...
    main sequence of Socket N...
    loop 2
    main sequence of Socket 1...
    main sequence of Socket 2...
    main sequence of Socket N...
    loop N
    main sequence of Socket 1...
    main sequence of Socket 2...
    main sequence of Socket N...
    process cleanup
    How can I do it ?

    Marta,
    Try using the PreUUTLoop and PostUUTLoop callbacks instead of ProcessSetup and ProcessCleanup.
    Allen P.
    NI

  • Sharing a communication object between test sockets

    Hi everyone, I am having some trouble using teststand in batch mode as it is my first time doing so. Here is my question:
    I am creating a test sequence that uses multiple test sockets. I am using a switching matrix that is controlled over ethernet to allow me to connect different loads to the hardware under test. I only have one load, but I have several different devices that need to connect to that load for the tests to be run, and they can only be connected one at a time.
    My approach was to initilaze the connection to the switching matrix and store the resulting object reference as a global variable, which allows me to send commands to the switch matrix from any sub-sequence. I then created another sub sequence for the load tests called "External Load Tests". In this step, the load is connected to the hardware via the switching matrix, and tests are run. I am using batch mode, so I put a lock on the "External Load Tests" sub sequence so that only one thread can enter at a time.
    This sequence works if there is only one active test socket. If there is more that one, the first thread will get inside the external "External Load Tests" step and try to send a command to the switch matrix using the object reference that I mentioned. However, when this happens, the step hangs indefinitely until the other threads are manually stopped. It seams like the thread isnt being given access to the switch matrix object, becuase usually if there is an error the switch matrix driver throws an exception, but in this case it just hangs. 
    Any ideas on how I can fix this? I don't have a lot of experience with multi threading, so any advice would be greatly appreciated.
    Thanks!

    For the batch model you could use a serialized batch synchronization section rather than a lock. A lock should also work though, it just doesn't guarantee that all threads get to the section before any of them continue and doesn't guarantee the order like batch synchronization does. Typically you should use all default settings for the batch model (other than perhaps number of sockets). Which setting did you change? The 'Default Batch Synchronization' setting? You should typically leave this as "Don't Synchronize". Setting this to Parallel makes it synchronize at every step which requires all sockets to get to each step before any of them to continue. This is not the behavior that people typically want. In most cases you should use the default of "Don't Synchronize" and then set synchronization manually in your sequence where you want it, either using the step synchronization settings, or the batch synchronization step types, or other synchronization step types such as locks.
    Hope this helps,
    -Doug

  • Master/Test socket issue

    Hi all, I've had Infinity 2 activated on Monday (13th) and have been noticing slow speeds when plugged into an extension, getting around 40download/10upload.
    I have now plugged it in the master socket and it has improved.
    I then tried it in the test socket and it's even better.
    This was a self install as BT said an engineer wasn't needed. My question is, do I need a different master socket as there is quite a difference in speed? It is a NTE5 master socket at the moment and how do I go about improving the speeds for the extention socket as it located more conveniently, better wiring?
    Thanks

    r1chmo wrote:
    No, I have the phone plugged into the master socket which is out in the hallway and the extension socket I use is in the living room behind the TV which I would use to plug the home hub in.
    If you are not going to use the extension, then disconnect the wires from the master socket. The alternative is to fit a filtered faceplate, and then reconnect the extension wiring, just in case you need to use anothe device, like a set-top box.
    There is a helpful page here.
    http://www.kitz.co.uk/adsl/socket.htm
    This would also apply for Infinity.
    There are some useful help pages here, for BT Broadband customers only, on my personal website.
    BT Broadband customers - help with broadband, WiFi, networking, e-mail and phones.

  • How can I terminate ALL test sockets from API

    I want to terminate all my test sockets (Batch model).
    Manually I do it by "Debug -> Terminate All".
    Is there any way to terminate all sockets through NI TestStand API Automation Server ?
    I succecced to terminate only one socket (object class RunState.Execution), but I didn't find any way to terminate all test sockets.
    Thank's to someone that will answer.

    Hi,
    Yes, use Engine.TerminateAll
    You will find reference to it in the TestStand Help
    regards
    Ray Farmer
    Regards
    Ray Farmer

  • Have to use TEST socket for fast broadband but ext...

    Hi, this is my first post, would be very grateful for any help as I am getting nowhere fast with BT.
    Have had broadband here for several years without too much problem until recent months when the speed seemed to be getting slower and slower. I contacted BT on several occasions about this, and tested the equipment, with the upshot that connection is definitely faster IF the phone etc is plugged into the TEST SOCKET. Hurray for that - BUT it means that my (only) extension line upstairs in my house doesn't work (I've tried plugging two different corded phones in, with filters, and there is no dialling tone).
    This is really inconvenient and I have contacted BT yet again this morning to be told the same thing, ie test the equipment and it is probably an internal wiring problem. What they don't seem to take on board is that the extension line was fine for ages until I started using the test socket.
    Help someone please! Thank you.

    Hi ConfusedofSurrey and welcome
    Is the extension lead exposed or has it been run under floorboards?
    Phone wiring has a Bellwire. This makes the old style phones ring. Modern day phones don't need this wire and it WILL slow your connection down. Have a look at http://www.jarviser.co.uk/jarviser/bellwirenutshell.html
    Also any extensions WON'T work if you've removed the face plate from the master socket to use the test point as it isolates any other extension wiring.
    Hope this helps.
    -+-No longer a forum member-+-

  • Multiple sequences in different test Sockets

    Hi all,
    I`m using Parallel process model in TestStand 2010,
    My requirement is to run 10 different sequences which communicate with 10 different DUT/UUT at a time,
    Is it possible to execute different sequences in individual test sockets, for eg., sequence abc01.seq in test socket 0 of 10, abc02.seq in test socket 1 of 10, ……    abc10.seq in test socket 10 of 10.   And all should run simultaneously.
    Any suggestion is helpful,
    Regards,
    Prashanth

    Try here as a start
    It was just an idea I had a few years ago.
    Regards
    Ray Farmer

  • Disabling Test Sockets in SinglePass.

    I am new to TestStand and LabWindows and am trying to figure out how to
    pass serial number and socket status to a sequence file from a
    LabWindows application. I have an application that successfully opens a
    sequence file and executes it via the TestStand API. I can probably
    figure out a way to pass serial numbers and socket status via the
    Parameters.ModelData.TestSockets[x] sub property. The problem is that
    it appears that SinglePass is waiting for all the test sockets to
    complete whether they are enabled or not. It seems to never get out of
    the step "Wait For TestSockets" under the SinglePass entry point.
    Is there an easy way to do this? I really don't want to use the
    TestUUT's entry point. Should I just customize the SinglePass entry
    point with logic in the "Wait For TestSockets"  loop or is there a
    much easier way to do this?
    Thanks,
    John

    Hello John,
    To answer your first question, generally to pass information
    back and forth between an operator interface and a sequence you should have
    your sequence post a UIMessage, and your operator interface reads the message
    and responds.  If you look at the
    PostUIMessage help you see the following definition:
    Thread.PostUIMessageEx ( eventCode, numericDataParam,
    stringDataParam, activeXDataParam, synchronous)
    You can pass data with the message, and since the
    activeXDataParam is passed by reference you can update the value and use it in
    your sequence file.  This is how you
    could send a serial number between the Operator interface and the sequence
    file.
    Next, you mention that you are having problems with test
    sockets waiting for disabled test sockets.  I think this is probably due to
    how the disabled flag is being set.  We
    have been able to disable a test socket if the user does not type in a serial
    number (in the batch process), by modifying the batchuutdlg.c in the
    modelsupport2.prj.  We first declared a
    variable static char string[200]; and in the goCallback we added the following
    instead of the statement at line 932.
    GetCtrlVal(childPanel,
    panelData->testSocketDataArray[i].ctrls[kTSCtrl_SerialNum], string);
    if (!strcmp(string, ""))
                tsErrChkMsgPopup(
    TS_PropertySetValBoolean (panelData->testSocketDataArray[i].testSocket,
    &errorInfo, TEST_SOCKET_DISABLED, 0, (VBOOL)(VTRUE)));
    I hope you find this example helpful.
    Regards,
    Jesse O
    Applications Engineering
    National Instruments
    Jesse O. | National Instruments R&D

  • Getting Test Socket status in batch mode

    Hi!
    I´m running multiple UUT´s in the standard batch model.
    I need to find a way to get a teststep running in one test socket to know the current status (passed, failed, terminated etc.) for all other test sockets.
    Is this possible?
    One solution might be to have each test socket to store the context pointer (CAObjHandle seqContextCVI when using LabWindows) to an array at the beginning of each test socket and then access each others test socket context. This way it might be possible if there is a context value or string to look for. Is this a good idea at all or are there better solutions?
    / Roine

    Hi,
    this would in fact be better in the TestStand discussion group.
    However, there are several options available to you.
    The first is to use queues. They're in the synchronisation menu. That way you can make sure you don't write to the same variable from two different threads before a third one has read it.
    The second option is to store the seqContext pointer, however, this pointer is only a reference to where you currently are, i.e. if you start flying around launching other threads, then your seqContext might not be correct at that time
    The third option is the hardest to implement. In the batch process model, the execution handles that are involved in the launching of Test UUT -- Test Socket Entry Point, are stored in a FileGlobal to the processmodel : FileGlobals->TestSocketExecutions. However, when you're in your sequence file, and you look at Runstate.Root.FileGlobals.TestSocketExecutions, it's empty. This is because that array hasn't been set as shared. So the top level Test UUT's can see it, but since we're launching executions, we cannot see it. So in the processmodel, you have to find the fileglobals, find the TestSocketExecutions, go to it's properties, and then hit the advanced button. Go down that list, and look for the property flag for shared at run-time.
    That way, Runstate.Root.FileGlobals.TestSocketExecutions will have an array of execution reference handles.
    From this handle, there's a method of the execution object to get a thread. This is where it's difficult, since you might not know which thread you're trying to get hold of. Once you have one of those, you can get the seqeuence context for that thread, and then you can (get using that as a property object), the number, string etc, from the other thread.
    The last option is simply to share (as in option 3, but in the client sequence file) a variable, however, you can easily run into the problem you see in option 1 since the resource is like using station globals. There's no marshalling system to make sure things are written to before they're read from.
    Hope that helps
    Sacha Emery
    National Instruments (UK)
    // it takes almost no time to rate an answer

  • Broadband only working through test socket... Plea...

    Hi,
    Newbie here, I'm afraid...
    Having dire problems with broadband connection...
    Initially thought it was issues with router, so bought a new one, no change though...
    Then thought it was upstairs extension, so brought PC back to main BT socket, but still no connection...
    Tried test socket & all ok there, finally got broadband connection but still unable to get one when I replace the face plate. Any ideas???
    Thanks in advance

    http://www.rob-r.co.uk/other/UKphonecatwiring.htm
    the wires that shouldnt be used for a faster connection are orange and white.
    Im not exactly sure (i cant remember) but maybe one of those colours have to do with the extension.
    http://www.rob-r.co.uk/other/UKphonecatwiring.htm
    They have a table of what goes where etc...
    I dont recommend messing with it, just check that everything is in correctly, if it is then theres another fault with the cabling in your home.
    Do the extension points allow phone calls?
    Check the micro filters also,
    try connecting the router directly into the phone extension.
    Also give BT a call and tell them to send an engineer round.
    Hope that helps.
    Netgear Setup

  • Sync drop even in test socket.

    Currently in my 10 day waiting period having just signed up to BT, but unplugged the hub a few times to experiment with the orange wire and combinations of that and the i plate. My sync has dropped at the test socket from 1856 to 1216. Is this something that I have done, or am I right in thinking that the sync speed on the test socket will not change unless its a problem at the exchange?
    Thanks in advance.
    Dave

    You could do a quiet line test by
    dial 17070 option 2 and listen - should hear nothing
    preferably with an analogue phone a digi one may have slight hiss otherwise silence
    but only if it dont improve
    If any post helps tick the star box on the left
    Just cause Im paranoid dont mean they are not out to get me

Maybe you are looking for