Method to set the station process model

Hi ppl...
I'm building a custom operator interface in LabVIEW. I want to know the method to set the station process model.
Thanks 
Solved!
Go to Solution.

Vishal
Applications Engineer 
Natoional Instruments
India

Similar Messages

  • Using a Custom Method to Set the Bind Parameters in a View Object

    Hi all:
    i tried to follow the tutorial in oracle jdeveloper 10.1.2 documentation about creating a simple search page but i'm receiving this error when i tried to test the application module after i added a where clause to my view object(i.e where dept_id= :1) and define a custom method to bind variables in the appmodule class
    i keep getting this error
    JBO-27122: SQL error during statement preparation. Statement: SELECT Employees.EMPLOYEE_ID, Employees.FIRST_NAME, Employees.LAST_NAME, Employees.SALARY, Employees.DEPARTMENT_ID Employees.DEPARTMENT_ID = :1
    ????? IN ?? OUT ????? ?? ??????:: 1
    when i used the setwhere metohd it works
    i'll apprciate ur answer
    regards

    I have the same problem:
    Just like in Toystore Demo I am calling the following method in my VO:
       * Find an account by username and password, leaving the account
       * as the current row in the rowset if found. BUT EVEN IF WE FIND ACCOUNT BY
       * USERNAME AND PASSWORD, IT WILL RETURN FALSE IF THE ACCOUNT IS DISABLED!!!!
       * @param username the username
       * @param password the user's password
       * @return whether the user account exists or not
      public boolean findAccountByUsernamePassword(String username, String password) {
         * We're expecting either zero or 1 row here, so indicate that
         * by setting the max fetch size to 1.
        setMaxFetchSize(1);
        setWhereClause("staff_id = :0 and passw = :1");
        setWhereClauseParam(0, username);
        setWhereClauseParam(1, password);
        executeQuery();
        RowSet rs = this.getRowSet();
        String userEnabled = new String("N");  // Default setting
        if (rs != null){
          int currentSlot = rs.getCurrentRowSlot();
          Row r = rs.getCurrentRow();
          if (r == null){
             r=rs.first();
             currentSlot = rs.getCurrentRowSlot();
          //check if we found the user
          if (currentSlot == SLOT_VALID){
            Object[] av = r.getAttributeValues();
            LoginUtils.userLoggedIn    = av[0].toString();  // '0' is username
            LoginUtils.userFirstName   = av[1].toString();  // '1' is user first name
            LoginUtils.userAccessLevel = av[6].toString();  // '6' is user level
            LoginUtils.userEnabled     = av[7].toString();  // '7' is user level
            userEnabled = av[7].toString();
        boolean found = (first() != null) & userEnabled.equals("Y");
        setWhereClause(null);
        setWhereClauseParams(null);
        setMaxFetchSize(0);
        return found;
      }It gives the same exception...
    JBO-27122: SQL error during statement preparation. Statement: SELECT Staff.STAFF_ID, Staff.FIRST_NAME, Staff.MIDDLE_NAME, Staff.LAST_NAME, Staff.POSITION, Staff.PASSW, Staff.USER_LEVEL, Staff.ENABLED, Staff.PHONE, Staff.EMAIL FROM STAFF Staff WHERE (Staff.STAFF_ID = :0 and Staff.PASSW = :1)
    This worked in 10.0.1.2 but now it does not work in 10.0.1.3!!!

  • How the method to set the JAVa logo off in JInternalframe?

    any 1 know? how to set the java logo off? using wat method?

    You could try setFrameIcon(null). However the javaDoc warns that the look and feel may display a default one anyway. If that doesn't work you could try changing the default in the UIDefaults with the key InternalFrame.icon
    It contains an instance of javax.swing.plaf.metal.MetalIconFactory$InternalFrameDefaultMenuIcon@6a5671 when I'm running showing the metal look and feel.
    I haven't tried this and I'm making the assumption that this is the correct icon.
    Col

  • How to set the Native Process Installer generatedFile.exe's icon

    hi
    i have made the (Native Process packaged) .exe by using adt command
    how can i change the default icon to the desiered one
    thanks,
    Dhaivat

    Ah I see what you mean now.  Unfortunately, this isn't available directly through AIR.  However, there are third party utilities on Windows that will allow you to modify the icon resources and it should be simple enough on Mac through File Info.
    If you'd like to see this functionality added to AIR, I'd like to suggest you add a feature request to our ideas.adobe.com page.
    Thanks,
    Chris

  • Delegate method to set the Text of a TextBlock

    I have to ask a follow up qestion.
    My previous question was
    this one:
    In a WPF Navigation Page I have the following code:
             private void NewWindowHandler()
                Thread newWindowThread = new Thread(new ThreadStart(ThreadStartingPoint));
                newWindowThread.SetApartmentState(ApartmentState.STA);
                newWindowThread.IsBackground = true;
                newWindowThread.Start();
            private void ThreadStartingPoint()
                PassingClass passingObj = new PassingClass() {
                    FirstPar = "my first par", SecondPar= 123, ThirdPar = DateTime.Now, tb_Page2Callback
    = tb_Callback
                Window1 tempWindow = new Window1(passingObj);
                tempWindow.Closed += (s,e) =>
                    Debug.WriteLine("CallBack: " + passingObj.CallBack );
                    passingObj.handler(passingObj.CallBack, passingObj.tb_Page2Callback);
                    Dispatcher.CurrentDispatcher.BeginInvokeShutdown(DispatcherPriority.Background);
                tempWindow.Show();
                System.Windows.Threading.Dispatcher.Run();
             public static void DelegateMethod(string message, TextBlock
    tb_Callback)
                try {
                    tb_Callback.Text = message;
                } catch (Exception exc) {
                    Debug.WriteLine(exc.Message);
                    Debug.WriteLine(exc.StackTrace);
    and this is my PassingClass.cs
    using System;
    using System.Windows.Controls;
    namespace SystemAlloc
        public delegate void Del(string message, TextBlock
    tb_Callback);
        public class PassingClass
            public PassingClass()
            public string FirstPar;
            public int SecondPar;
            public DateTime ThirdPar;
            public string CallBack;
            public Del handler = Page2.DelegateMethod;
            public TextBlock tb_Page2Callback;
    How can I fix the Exception?
     CallBack: 3
    The calling thread cannot access this object because a different thread owns it.
       at System.Windows.Threading.Dispatcher.VerifyAccess()
       at System.Windows.Threading.DispatcherObject.VerifyAccess()
       at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
       at System.Windows.Controls.TextBlock.set_Text(String value)
       at SystemAlloc.Page2.DelegateMethod(String message, TextBlock tb_Callback) 
    Thank you!

    Fixed!
             private void UpdateText(string text)
                // Set the textbox text.
                tb_Callback.Text = text;
            //public delegate void UpdateTextCallback(string text);
            public void DelegateMethod(string message)
                try {
                    //tb_Callback.Text = message;
                    Debug.WriteLine("calling dispatcher"); tb_Callback.Dispatcher.BeginInvoke(new Action(() => { 
    this.UpdateText(message);                                              
    }), null);                //this.Dispatcher.Invoke(new UpdateTextCallback(this.UpdateText),
                    //                   new object[]{message});
                } catch (Exception exc) {
                    Debug.WriteLine(exc.Message);
                    Debug.WriteLine(exc.StackTrace);
            private void NewWindowHandler()
                Thread newWindowThread = new Thread(new ThreadStart(ThreadStartingPoint));
                newWindowThread.SetApartmentState(ApartmentState.STA);
                newWindowThread.IsBackground = true;
                newWindowThread.Start();
            private void ThreadStartingPoint()
                PassingClass passingObj = new PassingClass() {
                    FirstPar = "my first par", SecondPar= 123, ThirdPar = DateTime.Now, 
                    handler = DelegateMethod
                Window1 tempWindow = new Window1(passingObj);
                tempWindow.Closed += (s,e) =>
                    Debug.WriteLine("CallBack: " + passingObj.CallBack );
                    passingObj.handler(passingObj.CallBack);
                    Dispatcher.CurrentDispatcher.BeginInvokeShutdown(DispatcherPriority.Background);
                tempWindow.Show();
                System.Windows.Threading.Dispatcher.Run();
    and PassingClass.cs
    using System;
    namespace SystemAlloc
        public delegate void Del(string message);
        public class PassingClass
            public PassingClass()
            public string FirstPar;
            public int SecondPar;
            public DateTime ThirdPar;
            public string CallBack;
            public Del handler;

  • How to release process model sequence file object?

    Calling engine's method GetStationModelSequenceFile we get the reference to the process model sequence file object. According to TestStand Help, you should "Release this reference when you are done using it." The question is: how do you release it? Call engine's method ReleaseSequenceFileEx passing the reference to the model sequence file gotten from GetStationModelSequenceFile won't work, it returns FALSE which means the sequence file can't be released. Similar problems exist with methods SequenceFile.GetModelSequenceFile, Execution.GetModelSequenceFile. My aplication is written in VB. Using the statement like
    Set modelSequenceFile = Nothing also does not solve the problem.  I want to get some information of process model, such as version number, so I call those API functions in my code, which was developed under TestStand 3.1. I post this question because when I ran my application with TestStand 3.5 or 4.0 beta, I got the warning dialog when loading a sequence file and then closing the application. The dialog listed all the unreleased objects which I figured out is due to that the process model file was not released. Because message in the dialog is as following:
    The following top-level objects were not released:
            Sequences [1 object(s) not released]
                Sequence #1:
                    Name: Test UUTs
            Type Definitions [43 object(s) not released]
                Type Definition #1:
                    Name: TimeDetails
                Type Definition #2:
                    Name: ReportOptions
    Of course there are more in the list, but the sequence file loaded into the application is released correctly by calling engine's method ReleaseSequenceFileEx, so it does not appear in the list.
    Any help will be greatly appreciated.

    Here are what I did after launch the operator interface:
    1) Call Engine.GetSequenceFileEx to get a reference to a sequence file.
    2) Display steps of MainSequence of the sequence file in GUI.
    3) Call Engine.GetStationModelSequenceFile to get a reference to the station process model sequence file. The variable used to save the reference of process model sequence file is modelSequenceFile.
    4) Loop through all the sequences in process model sequence file, get the references of entrypoint sequences in the process model and put them in a container (VB Collection).
    At this point,
    Calling modelSequenceFile.CanUnload returns TRUE
    Calling modelSequenceFile.IsExecuting returns FALSE
    Calling Engine.ReleaseSequenceFileEx(modelSequenceFile, ReleaseSeqFile_UnloadFile) returns FALSE
    There is no other loaded process model sequence file reference at this point.

  • How to load the sequence file from the process model?

    Does anyone have an example process model that loads a sequence file? The out-of-the-box process models assume the sequence file is already loaded. I want the process model to identify the UUT type and load the appropriate sequence file based on that.

    Mark,
    A better solution to your question can be accomplised if you have TestStand 2.0.
    Within the entry point of a process modle you can set the client sequence using Execution.ClientFile(). This is a new method of TestStand 2.0. It was specifically designed so that you could dynamically set the client sequence within the process model.
    Currently the entry points in the default process models (i.e. Test UUTs and Single Pass) are configured to Show Entry Point When Client File Window is Active. This means that you must open and have active a client sequence file before you can execute one of the entry point. You probably do not want this implementation if you are going to set the client file during the entry point execution. To change this you will need to go the sequence properties of your entry point (while the sequence is open select Edit>>Sequence Properties), switch to the Model tab of the entry point's property dialog box, and enable Show Entry Point For All Windows. The entry point will then appear whether or not you have an open sequence file active.
    You will need to add at least 3 steps to your entry point sequence that all use the ActiveX Automation Adapter. Remember that MUST disable Record Results for any step you add to the process model. The 3 steps will perform the following tasks:
    1) Obtains a sequence file reference of the file that you want to be the client sequence file. You will need to use the Engine.GetSequenceFileEx method. You will need a local variable (ActiveX data type) in which to store the sequence file reference.
    2) Set the client sequence file using the Execution.ClientFile property.
    3) Close the reference to the client sequence file in the Cleanup step group of your entry point sequence using Engine.ReleaseSequenceFileEx
    I am attaching a SequenceModel.seq file (the default process model in TestStand 2.0) in which we have modified the TestUUTs entry point as described above.
    Note that you'll be prompted to enter the path to your client sequence file. This is a message popup that you can delete and it was added for your review only.
    Good luck in your project,
    Azucena Perez
    National Instruments
    Attachments:
    sequentialmodel.seq ‏164 KB

  • How to set the number of sockets for batch processing at runtime?

    Hello all,
    I need to change the execution model at runtime. I have achieved this by setting the 'ModelPath' property of the sequence file at runtime. When I set the sequence file model as batchmodel, i need to set the number of test sockets also dynamically. How can this be done? Once i set the number of sockets, i would also have to set the UUT serial number for each socket. Please help me out in solving this.
    Thanks and Regards
    Madhu Srinivasan.

    Hi Madhu,
        You can do this by inserting a sequence file callback into your main sequence and choose the ModelOptions callback. You can then use the expression step to set the "Parameters.ModelOptions.NumTestSockets" value to whatever you want. If you then use the Test UUTs execution entry point you will be prompted for serial numbers automatically. You could also use this same procedure but alter the ModelOptions callback in the process model directly, either way works just as well but I think that using a sequence file callback gives a bit more flexibility in the system.
    Hope this helps,
       Nick

  • How to set the report path in a model plugin

    I am trying to figure out how to set the report path in a process model plug-in. I can seem to figure out how to get access to it. It seems like this would be a reasonable thing to do since the plug-ins are for results processing. Does anyone know how to do this? We typically use the Sequential process model but I am trying to keep my plug-in as independent of that as possible. 
    Thanks.
    Solved!
    Go to Solution.

    If I understand, you want your plug-in, when enabled, to alter the settings of any other instances of the NI report plug-in such that their reports share the same directory as your plug-in is configured to use.
    If so, your plug-in can access and modify the settings of all other plug-in instances. All instances are passed to all plug-in entries point in the plugins array sub-property of the ModelConfiguration parameter. You can iterate through this array. Any element of the array with a Base.SequenceFilename equal to "NI_ReportGenerator.seq" is an instance of the NI report plug-in. Its report options are stored in the element under PluginSpecific.Options.
    You can change the report options to what ever you want. Note that the ReportOptions model callback is called from the Initialize model-plugin entry point, so you might want to ensure that your changes are applied after that, so they aren't overwritten. To do that, you could make your changes in the the Initialize entry point of your plug-in, and ensure that your plugin runs last. To make it run last, you could set the FileGlobals.ModelPluginComponentDescription.Default.Base.RunOrder in your plug-in file to a value greater than 0, such as 1.0 (see TestStand Help>>Fundamentals>>Process Model Architecture>>Process Model Plug-in Architecture>>Structure of Plug-in Sequence Files>>Model Plug-in Entry Points>>Order of Entry Point Execution at Run Time).

  • Station Info using Batch Process Model

    Hi,
    I have a test sequence that use a sequential process model and I grab station information using the following.
    RunState.Root.Locals.StationInfo.StationID
    RunState.Root.Locals.StationInfo.LoginName
    I am creating a new test sequence which uses the batch process model - when I try to grab the Station Info data using the syntax above I get the following error 
    Unknown variable or property name 'RunState.Root.Locals.StationInfo'.
    Can some please advise if I am accessing the wrong area when using a batch process model?
    Thanks & Regards,
    Shane.
    Solved!
    Go to Solution.

    In the batch and parallel models you can access this information using:
    RunState.Root.Parameters.ModelData.StationInfo
    -Doug

  • Initialize in the constructor is better or set the value thro' set method?

    Hi,
    For the normal helper classes for servelt or jsp or EJB,
    Which of the following one is the better ...?
    1.
    i.initialize all the fields in the constructor, then
    ii.use the set methods
    or
    2.
    i.do not use the contructor and
    ii.use the set methods to set the values
    Anybody can give the solution for this one...
    With regards
    vkm

    Your option 1 puzzles me, why would you need tyo use the setter methods if you already initialized in the constructor?

  • How do you stop photoshop from flickering when the graphics processing mode is set to basic? (Using windows 8)

    I am using Photoshop CC (2014) and I can not get the screen to stop flickering even when I set the graphics processing drawing mode to basic ( which is what other people have suggested to do). I am using windows 8.

    Update your video card driver from the GPU maker's website.

  • Best way to modify Sequential Process Model for report generation.

    I am using the Sequential Process Model in my application and the TestStand Reference Manual, (Figure A-1), clearly shows the following processing sequence:
    ...<part removed>
        Call the Test Sequence
        Display the UUT results
        Generate a Report
        Log Result to a Database
    ...<more removed>
    I want to generate the report BEFORE displaying the results to the operator, or at a minimum, I want to generate the report in parallel with displaying the results to the operator.  Currently, the problem I have is that when the test is done I have some automated scripts that take the data file and do some statistical processing on it, but the way the Sequential Process Model is set up, the test might finish but until the operator acknowledges the PASS/FAIL results display, the resulting file is never created.  It could be overnight, over the weekend, or several days before an operator comes back and says, "Oh that last test finished, I guess I can press the OK button!", but until they do, I get no data.  So I want the report generated no matter what, and right after the test finishes.
    Any ideas as to how that might be best accomplished?
    Thanks a billion -  Ski (noob)

    Ray,
    Is that new in 4.2 that the engine won't call a callback with nothing in it?  I just did it and it seemed to work fine.  I'm using 4.1.1 though.
    Ski,
    Maybe there is a better solution for what you want.  Are you using the SequentialModel?  What version of TS do you use?  Why does the report have to be written before the pass/fail banner displays?  The pass/fail banner gets displayed in the PostUUT callback.  Like Ray said if you just put that in your client sequence you won't see the banners.  However, I'm assuming there is more to this than just that.  I'm assuming you want to see the report because of your external analyzer that is gathering the statistical data.  And then based on that data you want to allow the user other options.  Is this correct? 
    If so then I would override the PostUUT callback and then use a different callback (possible the ProcessCleanup callback) to displaly the banners.  You could even do this without modifying the process model (which I always try to avoid).  Just override both the PostUUT and ProcessCleanup callbacks.  And then put code in the ProcessCleanup to behave like you need.
    Or if you want you can modify the process model and create a new callback lower in the process model.  Then have that new one do the post report analysis.
    Just some thoughts.
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • Parallel Process Model Entry

    Hello,
    First, using LabVIEW 2011 and TestStand 2010 SP1.
    We have a custum GUI setup to use the sequential model.  At the heart of it, when we hit start, it accesses the Single Pass entry point and runs it with some modifications we've made.  Now, we'd like to have a setup that can test multiple DUTs and use the Parallel Process Model.  I'd like to have our GUI basically perform the same functions as the built in popup when running the TestUUTs entry point.  I've seen the PreUUT callback where you can disable the built in popup.  But what I can't seem to figure out is how to initiate a test socket test because it doesn't seem to line up with an entry point necessarily.
    When they push the start button next to DUT 0, I want to start socket 0.  And if they hit the start button next to DUT 1, I want to start socket 1.  What entry point does the GUI use to make this happen?  Does the GUI need to start an entry point (IE Test UUTs) then send more information later to start a test?  if so, where does TestStand wait for that information within the parallel process model?
    Thanks.

    One way you could do it is as follows:
    Still override PreUUT like in the example and add code which posts a UIMessage synchronously to the UI and then waits for a persocket notification (e.g. you can use the socket index as part of the name to make a per socket notification). Then in your UI, handle the UIMessageEvent on the ApplicationMgr. When you get the UIMessage from your PreUUT you will know it's ready and you can then update your UI to enable the start button, and when the user presses it, you can then Set() the notification to tell the testsocket thread to continue.
    for example, in preuut:
    Create Notification "MyUIStartNotification Socket 1"
    Thread.PostUIMessage(UIMsg_UserMessageBase + 1, RunState.TestSockets.MyIndex, "MyUIStartNotification Socket 1", null, true)
    Wait on Notification "MyUIStartNotification Socket 1"
    In your UI
    Handle UIMsg_UserMessageBase + 1
    Enable Start Button
    When start button pushed, Set Notification that corresponds to that socket. Pass any data needed with the notification, for example, create a container that contains a serialnumber property and a continuetesting property and pass that with the Set operation. In your PreUUT code get that data from the notification and update your parameters.
    Not simple, but doable.
    -Doug

  • Trouble setting the session state of a select item.

    Hi,
    I have a requirement whereby I need to change the session state of a select list item in my form without the need to submit. I am using Application Express 4.1.0.00.32. I thought this would be straight forward using a dynamic action or javascript and calling an on demand process for example.
    P1_MY_SELECT onchange="set_option();"
    function set_option() {
    var l_option=$f_SelectValue('P1_MY_SELECT');
    alert( 'My new value is ' + l_option );
    // ON DEMAND Set the new session state value
    var lRequest = new apex.ajax.ondemand
    ('SET_P1_MY_SELECT',function()
    {  /* start the return function */
    var l_s = p.readyState;
    if(l_s == 1||l_s == 2||l_s == 3)
    else if(l_s == 4)
    { gReturn = p.responseText;
         (gReturn)?json_SetItems(gReturn):null;
    else{return false;}
    /* end the return function */
    lRequest.ajax.addParam('x01', l_option );
    lRequest._get()
    My on demand application process
    DECLARE
    l_options varchar2(2000) := wwv_flow.g_x01;
    BEGIN
    APEX_UTIL.SET_SESSION_STATE('P1_MY_SELECT',l_options);
    apex_util.json_from_items('P1_MY_SELECT');
    END;
    Is there a better method to set the session state of my P1_MY_SELECT other than what I am doing as above or can you tell me why the session state of P1_MY_SELECT is not changed?
    Thanks.
    Edited by: 968358 on 01-Nov-2012 08:40

    if you are on 4.1 why don't you use a dynamic action instead of writing the code again?
    create a dynamic action like this
    Event: Change
    Source Type: Item
    Item: P1_MY_SELECT
    True Action:
    =========
    Action: Execute Plsql Code
    Plsql Code: null;
    Page Items to Submit: P1_MY_SELECT
    Page Items to Return: P1_MY_SELECT (this is optional)
    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/advnc_dynamic_actions.htm#HTMDB27020

Maybe you are looking for

  • Cannot sync my iPhone 5s, macbook usb is drawing too much power

    I have a macbook pro, 2.8 ghz intell core i7 and a new iphone 5s. Each time i try to sync using the apple usb cord, I get an error saying that a device is drawing too much power and the usb has been disabled. Help! I am trying to get my pcitures on m

  • IE6 and HttpSession

    My JSP's/Servlets use simple HttpSession objects that expire when the browser is closed. It is my understanding that if a browser has cookies disabled that URL rewriting is used. I've been testing in IE6 and when cookies are restricted all my session

  • Image sent with photo app does not show on mail sent box. How do I find it?

    My daughter sent a photo from the photo album on her itouch. I search it in her mail sent box, but I cannot find it. Any idea how to find it? Thanks

  • Same CAS Array Exchange 2010 (HLB), with OS Windows 2008R2 and Windows 2012.

    Hello, We have a 10 node DAG (Exchange 2010 SP3, Windows 2008 R2), with 2 CasArray. We are planning to add news (multirole) servers and create a new DAG (Exchange 2010 SP3, Windows 2012) in this infra, in the same AD site, to migrate all mailbox from

  • How to parse an equation?

    Here's my problem: The user enters an equation into a TextField. The app reads the TextField and records the equation into a String. Say the user enters 3x + 5. Now, I need to convert the String into an algorithm that will be able to calculate the va