Change Prototype Parameter from a TestStand DLL Module Programmat​icaly

Hi.
I started this post inside the LabWindows section, but had no replies there.
Hope I can get some help here.
Please see the follwing link
http://forums.ni.com/ni/board/message?board.id=180​&message.id=46129&query.id=804485#M46129
Thanks in advance.
Daniel Coelho
VISToolkit - http://www.vistoolkit.com - Your Real Virtual Instrument Solution
Controlar - Electronica Industrial e Sistemas, Lda
Solved!
Go to Solution.

Hi Doug.
I'm sorry for the delay.
Here's how I solved the problem: I changed from CVI module to DLL module.
Here's a sample of my code:
//I changed from CVIModuleGetParameters() and CVIParametersGetItem() to TS_DllModuleGetParameters() and TS_DllParametersGetItem and now it works fine.
//seqContextCVI = ThisContext reference object
void __declspec(dllexport) __stdcall GetControlarParameters(CAObjHandle seqContext)
    int error = 0;
    ErrMsg errMsg = {'\0'};
    ERRORINFO errorInfo;
    char strItemLabel2[1024] = "";
    CAObjHandle step = 0;
    CAObjHandle seqFile = 0;
    CAObjHandle module = 0;
    CAObjHandle parameters = 0;
    CAObjHandle parameter = 0;
    tsErrChk(TS_SeqContextGetStep (seqContext, &errorInfo, &step));
    tsErrChk(TS_StepGetModule(step, &errorInfo, &module));
    tsErrChk(TS_DllModuleGetParameters (module, &errorInfo, &parameters));
    tsErrChk(TS_DllParametersGetItem (parameters, &errorInfo, CA_VariantInt(1), &parameter));
    sprintf(strItemLabel2, "\"%s\"", "TEST");
    tsErrChk(TS_CommonCParameterSetValueExpr(parameter​, &errorInfo, strItemLabel2));
    // NOTE: After making an edit to a step you need to mark the file as modified by
    // incrementing the file's change count. This is also necessary for the change to show
    // up in the sequence editor imediately.
    tsErrChk(TS_SeqContextGetSequenceFile (seqContext, &errorInfo, seqFile));
    tsErrChk(TS_SeqFileIncChangeCount(seqFile, &errorInfo));
Error: 
    CA_DiscardObjHandle(step);
    CA_DiscardObjHandle(seqFile);
    CA_DiscardObjHandle(module);
    CA_DiscardObjHandle(parameters);
    CA_DiscardObjHandle(parameter);
    // If an error occurred, set the error flag to cause a run-time error in TestStand.
    if (error < 0)
        TS_SetStepError(seqContext, error, errMsg);
Thank you for all the help.
My best regards.
Daniel Coelho
VISToolkit - http://www.vistoolkit.com - Your Real Virtual Instrument Solution
Controlar - Electronica Industrial e Sistemas, Lda

Similar Messages

  • Transaction/program to change AVAILABLEFLAG parameter from table UJ0_PARAM_APP

    Hi Experts,
    Do you know if is there a transaction/program to change BPC environment status (for example, a transaction/program that changes AVAILABLEFLAG parameter from table UJ0_PARAM_APP to "0" or "1").
    Regards,
    Danilo

    Hi Danilo,
    i'm trying to use the same method as you in BPC 7.5.
    Did the method worked for you to set offline and online the application?
    Could you please tell me how you used it?
    Thanks.
    Amine

  • Change name of parameters output by code module

    Hi guys,
    I am calling this  code module everytime but pass different parameters as input  & get different results
    I want to customize the  Parameter Name  for the output parameters as they get saved in my report.
    & so I can be very specific.

    Hi,
    I think it is not an option or configuration in TestStand. You can try to change the parameter name in the code module.
    Have you tried this?
    best regards
    Richard

  • Passing Parameter from fiori launchpad to the app in sapui5

    Hi All,
    I have a requirement to pass a parameter from Fiori launchpad to the application. Then i have to use that parameter to construct the OData service URL and read the data. So how can we pass the parameters from Fiori launchpad tile to app? Thank you in advance.
    Regards,
    Seshu
    Tags edited by: Michael Appleby (but please start doing this on your own)

    Hi Masa,
    I will explain scenario:
    I have Main.view.xml and Main.controller.js in my App. I read the data in Main.controller.js using the following statement.
    var bus_scenario="Lead to Deal Approval";
    oModel.read("BusScnCollection('"+bus_scenario+"')?$expand=BusinessProcess",null, null, true,function(data,response)
    Now my requirement is to get the value for bus_scenario variable from Fiori launchpad configuration.
    What I did in Fiori launchpad configuration:
    Then, When I launch my app by clicking on tile, the URL appears in the following way.
    https://<server>:<port>/sap/bc/ui5_ui5/ui2/ushell/shells/abap/FioriLaunchpad.html#ZCIO_DASHBOARD-display?BUS_SCENARIO = "ORDER TO CASH"
    So I can read this parameter in Main.controller.js and assign to bus_scenario variable. But it is possible that user can change the parameter (from ORDER TO CASH to LEAD TO DEAL) directly in the URL, So that he can get the data corresponding to LEAD TO DEAL (which he should not get). Because when he clicks on ORDER TO CASH Tile, he should get only the data corresponding to it.
    So, is there any other way to send parameters from launchpad configuration to app, so that we can use those parameters in app (Main.controller.js) ?
    is there any way to hide parameters in the URL and send them?
    Thanks & Regards,
    Seshu

  • Why am I unable to change text color from black in LR5 book module?

    Why am I unable to change text color from black in LR5 Book Module?

    I'm assuming you clicked on the color patch besides the word <Character> to open the color picker window.
    At the right side of this window there is a vertical bar that has 2 horizontal black lines at the bottom.
    This is actually a slider. Pull it upwards with the color picker and color will appear in the window.

  • Is it possible to launch the SequenceAnalyzer from a C# code module in a Custom TestStand Editor

    The Sequence Analyzer is not available in the Custom TestStand Editor Mode GUI.
    Is it possible to add the Sequence Analyzer to a menu in the custom TestStand Editor?
    Is it possible to launch the sequence analyzer from a C# code module, this method is then called from a sequence call back.
    Best regards
    Patrick

    From the TS Help:
    TestStand Sequence Analyzer Application
    Select Start»All Programs»National Instruments»TestStand»Tools»TestStand Analyzer or run <TestStand>\Bin\AnalyzerApp.exe to launch the stand-alone TestStand Sequence Analyzer application. Use this application to analyze projects outside of the TestStand Sequence Editor.
    The sequence analyzer application window contains the following tabs:
    Files—The files and directories to analyze.
    Rules—The rules to use for analysis. Use this tab to enable, disable, and configure rules for analysis in the current project.
    Options—Contains the project options that control the analysis and determine whether the sequence editor automatically saves the current analyzer project.
    Messages—Contains the list of messages for the most recent analysis of the current project, sequence file, or workspace file. The sequence analyzer overwrites the content of the Messages tab each time you start an analysis session.
    Analysis Summary—Contains a summary of the most recent analysis of the project.
    Command-Line Usage
    You can use the following command-line syntax to open an analyzer project:
    AnalyzerApp.exe "C:\My Documents\MyProject.tsaproj"
    CTA, CLA, MTFBWY

  • Get poll interval parameter from adapter module

    Hi,
    I'd like to make special treatment in my adapter module based on the "poll interval" information filled in Processing Parameters part of the adapter configuration.
    Can an adapter module access this information?
    regards
    Yann

    Hi Yann,
    >>>>Can an adapter module access this information?
    of course it can you just have to use
    a correct parameter's name
    check this post to get the java code
    Re: Access the URL Parameter from a Adaptermodule
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • How to pass parameter from FM to report without changing interface of FM

    Hello experts,
    How can I pass a table name from a FM to the report calling the FM, without changing the existing interface of the FM.
    Thanks,
    Ajay.

    Hi,
    I f you want to pass any parameter from FM to Report or Vice-versa, parameter should me maintained in the FM otherwoise you can't pass any other than existing parameters.
    Otherwise create a custom FM.
    Regards,
    Sunil

  • How to change date parameter field in crystal from YYYY-MM-DD to DD/MM/YY

    Hi
    I want to change a Parameter field in Crystal report from YYYY-MM-DD format to DD/MM/YY format

    >
    Sukhi Singh wrote:
    > Hi
    > I want to change a Parameter field in Crystal report from YYYY-MM-DD format to DD/MM/YY format
    What do you mean by Crystal Report?  Are you sure you posted this to the correct forum?

  • Accessing "changing parametes " from JCo

    Hi all,
         I would like to access a RFC having "changing" parameters (eg EMPLOYEE_READ_APPLICANTNUMBER). How do I do it? How do I build a custom repository metadata for such a RFC??
    when I check the RFC library there the new function RFCCallRecieveEx() seems to support changing parameters but not the older one RFCCallRecieve(), but when I see the trace I see that the RFCCallRecieve() is the one being and therefore I get a RFC_SYS_EXCEPTION error.
    Can somebody tell me how to solve the problem? Has somebody tried building metadata for RFC/BAPI containing changing parameters
    Thanks in Advance
    Dilip

    I'm new to JCO and java so I'm not sure how you would handle this on the java side but as a work around you could probably just create a custom ABAP function module that called the original function module.
    Just specify all the parameters of the new function module as either IMPORTING or EXPORTING, then inside the new function module call the old one with the parameters as per the interface of the original function module.
    On the java side just call the new function module and all your parameters should work ok with the JCO.
    The "CHANGING" parameter is really more of an internal ABAP designation indicating the value may be changed during execution.  You can change a parameter that is not designated as changing.  The two behave a little differently if the program is terminated before execution is completed and it adds clarity to the interface, but other than that there really aren't many benefits.

  • EvaluatingTteststand 4.2.1: Null pointer access violation (error 17502) when attempting to use a mixed-mode std::map / boost shared_ptr class contained in a DLL through an interface from a different DLL

    Hi there.
    I have been working on a test system which will potentially have TestStand at its core, and downloaded/installed the 4.2.1 evaluation. Current details from the information dialog are:
    TestStand Engine version 4.2.1 (4.2.1.83)
    Sequence Editor Verison 4.2.1.83
    The system will drive mobile radio devices using RS232 serial interfaces, usnig a variety of serial protocols (Hayes, and a couple of proprietary binary protocols for other work).
    We already have in existence a soak tester, written in VS2005 with MFC unmanaged DLLs and also managed DLLs, which are mixed up together to provide different aspects of the functionality required for the binary protocols.
    I have created:
    1. a "master wrapper" DLL for the constellation of other DLLs - this offers up a simple C-API interface which I hope TestStand will use. It's called "SerialSessionMgr.dll""
    2. a mixed managed / unmanaged "IJW" (it just works) DLL which wraps up the binary logging protocol control interfaces, which are entirely in managed C++/CLI: the "master wrapper" DLL calls into this through an unmanaged interface to create instances of the CLI-compiled class which interfaces to the underlying managed DLLs imlpementing the logging protocol. This is called "WinTseInterface.dll".
    Before I started evaluating TestStand, I knocked up a test harness using CPPUnit / MFC, with which I was able to test SerialSessionMgr.dll and its' use of WinTseInterface.dll and verify they worked. The harness loads the DLL dynamically at run-time using AfxLoadLibrary() to try to emulate the way TestStand uses it.
    When we open a
    TSE session:
    The SerialSessionManager makes a call to the
    WinTseInterface.dll to "create" a logging instance. The instance is
    created in a std::map which is held by the CWinApp derived class, this map
    contains boost::shared_ptr of the class which works with a managed class. So we
    have a call trace: Client
    app->SerialSessionManager{TseStartSession()}->WinTseInterface{WINTSE_GetWinTseBridge()} - WINTSE_GetWinTseBridge()
    just creates a new instance of the unmanaged class which interfaces through to
    the managed CLI/C++ class beneath, and returns the address to the
    SerialSessionManager, which stores it.
    The SerialSessioManager actually initialises the WinTseBridge using a method of a C++ pure virtual interface class to the class in the std::map in the WinTseInterface DLL
    implements. The initialise call passes miscellaneous details and actually calls
    "gcnew" to create the managed class which interfaces to the
    underlying managed DLLs which implement the logging protocol.
    My logs of the DLL loading as seen in VS2005 debug output are attached this message as PDFs
    While trying to fix this, I have tried:
    Enhancing the WinTseInterface DLL so it manually loads all the other assemblies in the logging system, including the managed portion of WinTseInterface itself (no effect)
    All the different options for the way the C DLL adapter loads and unloads the DLL in the DLL adapter steptype in TestStand
    I've even tried calling directly into the WinTseInterface DLL before trying any SerialSessionManager DLL calls to try to load the WinTseInterface DLL completely beforehand
    and I cannot stop this exception.
    It seems like the object is created in the WinTseInterface DLL OK (I have debugged the creation step which runs for WINTSE_GetWinTseBridge() and the object is created OK) when the SerialSessionManager makes the call, but when it calls the first managed function, which creates the managed object, the DLL is reloaded as managed - I suspect this causes the object to be destroyed or overwritten, and thus the call to initialise bombs with null pointer violation.
    Have I done something obviously wrong, and what other approaches can I take? 
    Does TestStand 4.2.1 have issues with driving DLLs which use managed/unmanaged DLLs beneath them?
    My nuclear option is to throw the WinTseInterface DLL out completely and wrap up the managed C++ CLI code in a new interface, entirely managed, and use the TestStand ".Net" adaptor to drive that, creating my step library to run to that directly. This isn't ideal as I have some co-ordination of the protocols which is implemented in the SerialSessionMgr DLL.
    I hope someone can help. This one's low level, dirty and a stumper to me.
    Many thanks to the NI community. This is my first posting!
    Solved!
    Go to Solution.
    Attachments:
    CPPUnit Test Harness DLL load debug output.pdf ‏18 KB
    TestStand DLL load & crash debug output.pdf ‏43 KB

    Hi there Ray.
    First - many thanks for engaging with this thorny problem. Love the avatar BTW.
    I've been using the C/C++ DLL adapter: the original premise of the Serial Session Manager DLL was to provide a simple C type functional interface, using simple data types, so that TestStand would be able to drive the underlying functionality easily through a single DLL.
    Seeing as you've been kind enough to respond, I should explain the makeup of the DLLs a little more, I think.
    The SerialSessionManager (SSMgr) DLL uses C++ and MFC internally. This is the DLL which TestStand calls into directly through the C/C++ adapter. This DLL does have one odd feature though - because the it uses the Windows Multimedia Timer (implemented in WinMM.dll) I had to artificially create a scenario where it would load the .Net mscoree DLL _before_ it loads WinMM.dll - (http://connect.microsoft.com/VisualStudio/feedback/details/329819/freelibrary-in-the-winmm-dlls-modu...), basically WinMM.dll's init code gets rather upset when .Net DLLs load, which causes the entire executable to be unloaded with subsequent crashes.
    To work around this crash, the SSMgr has a single, completely empty, file which is compiled for CLR, effectively forcing a dependency into the DLL on the .Net subsystems and turning the DLL into a "IJW" binary. The resulting DLL doesn't actually have any executable managed .Net assemblies, but I'm guessing that it does contain enough .Net related stubs and information that when the DLL is loaded, mscoree.dll loads before WinMM.dll - and this means the system doesn't crash.
    Now, on to the WinTseInterface DLL. My initial description of this little software system was done in something of a hurry.
    This DLL is the C++/CLI "IJW" DLL which actually contains managed and unmanaged code. Underneath the WinTseInterface DLL is another system of (this time exclusively C++/CLI) DLL assemblies which implement the TSE protocol interpretation system.
    When the SSMgr DLL needs to start a TSE protocol session, it calls a C-API function in the WinTseInterface which creates a new CWinTseBridge class. Here's the steps in a little more detail:
    SSMgr DLL calls WINTSE_GetWinTseBridge(), passing in the name of the device which needs it (this is used to put the new WinTseBridge into a std::map in the WinTseInterface DLL) - this call runs just fine, and returns the address of the CWinTseBridge C++ object. This is stored in the SSMgr, because the CWinTseBridge class implements a pure virtual interface which is used by the SSMgr as a way of accessing the CWinTseBridge methods. 
    We now use the address from (1) to make a call to CWinTseBridge::Initialise(), passing some basic configuration details.
    I've run VS2005 debug on the Sequence Editor when running the test, and done F11 step-throughs of the code loading each parameter in the Initialise() call onto the stack, and what appears to happen is that when the call is made, the whole lot steps off into oblivion (a reference to 0x00000000 is made, I think).
    Do you think it's worth trying to get this approach to work? It would be useful to retain the control surface in the top of the SSMgr as there is co-ordination of the protocols within the logic of that component. If I move the Wintse control out into a separate managed DLL I may not have that co-ordination (this might be overcome with some design, as I've confirmed that it is possible to "reach into" the WinTseInterface DLL with TestStand and create and use managed objects from assemblies contained within).
    Are there any known issues with this version of TestStand using C/C++ CLI IJW DLLs? I haven't found much out there on the web.
    Attachments:
    Tse_Test.seq ‏7 KB

  • Change the Parameter as Select option

    Hi Guy's,
    Please help me friends, present requirement is like this : change the Parameter into Select-Option.
    Here they are using one function module, this function module import parameter taking single value, how  loop this function module with in this select-option.
    PARAMETERS p_fictr LIKE fmfctr-fictr.
    START-OF-SELECTION.
    Move the select options to internal tables (import parameter for fn)
      move_sel_option  : sel_buk   s_bukrs ,
                         sel_pern  s_pernr ,
                         sreinr    s_reinr ,
                         spdatv    s_pdatv ,
                         sberei    s_berei .
    Call the function to get all trips corresponding to sel criteria
      CALL FUNCTION 'ZHR_GET_FUND_TRIPS'
        EXPORTING
          p_fictr = p_fictr
          p_sub   = p_sub
        TABLES
          s_bukrs = s_bukrs
          s_pernr = s_pernr
          s_reinr = s_reinr
          s_pdatv = s_pdatv
          s_berei = s_berei
          i_trip  = i_trip
        EXCEPTIONS
          OTHERS  = 1.
    Thanks and Regards,
    Sai

    hi,
      You can first the field values using the select statement and then loop that internal table and pass the values to the function module.
    try this
    *PARAMETERS p_fictr LIKE fmfctr-fictr.
    select-options: s_fictr for fmfctr-fictr.
    START-OF-SELECTION.
    Move the select options to internal tables (import parameter for fn)
    move_sel_option : sel_buk s_bukrs ,
    sel_pern s_pernr ,
    sreinr s_reinr ,
    spdatv s_pdatv ,
    sberei s_berei .
    select fictr
       from fmfctr
       into tabel itab
    where fictr in s_fictr.
    loop at itab.
    Call the function to get all trips corresponding to sel criteria
    CALL FUNCTION 'ZHR_GET_FUND_TRIPS'
    EXPORTING
    *p_fictr = p_fictr
    p_fictr = itab-fictr
    p_sub = p_sub
    TABLES
    s_bukrs = s_bukrs
    s_pernr = s_pernr
    s_reinr = s_reinr
    s_pdatv = s_pdatv
    s_berei = s_berei
    i_trip = i_trip
    EXCEPTIONS
    OTHERS = 1.
    endloop.
    regards,
    Veeresh

  • EMMA Log Error:  Incorrect parameter X_VSTELLE (X_EVBS) in function module

    Hi Experts,
    We have errors on our EMMA log for invoicing (EA29) of Incorrect parameter X_VSTELLE (X_EVBS) in function module ISU_ADDRESS_PROVIDE.  These errors are occuring on final invoices for customers that have been moved out of installations that are typically billed for the month ahead.  Since the periodic bills are for the month ahead, there are no dollars billed on the final.  It produces a Print Doc. number but says that Print Doc. does not contain any printed lines and will then display just the header.
    We need to get these off of our EMMA log as they just continue to build up.  Can we somehow do one of the following?
    Delete the entries off the Emma log?
    Print these "zero" bills?
    Suppress the Print Docs from being created?
    Thank you for any consideration you can give to this issue.
    Linda

    Linda:
    Generally speaking, the error message and process indicate that this is within your billprint custom logic, and maybe it is not anticipating the situation correctly.  First recommendation would be to debug one of them to find the problem and address it in the print logic.  If not then i am not sure what you want - billprint will still create these 'error' messages.  You can change your EMMA settings such that there is no case generated for them.  The messages would still be issued, but no cases would be created.  I would hesitate to implement that solution, since it would prevent legitimate errors from being captured and processed.  If you want to print them, then the underlying error needs to be resolved.  You could also suppress the printing of these bills using event R412 also - but you would need to know the situation up front.
    regards,
    bill.

  • Change java parameter dinamically

    Hi all!
    I've created a java module (JDialog) which is called FROM an external third-part application and my problem is that to execute my java code i need :
    -Dswing.noxp=true parameter when I launch java.
    but i cannot change java parameters of this external application. Can i change this parameter dinamically from my Java code?
    Thanks!

    If you are using absolute positioning, and/or forcing the size of the dialog, then the buttons might not show as they would be pushed of the side of the Window.
    If not, it might be worth posting a http://homepage1.nifty.com/algafield/sscce.html so we can try to work out what is going on.

  • Changing the Owner from Peoplesoft8.8 to Peoplesoft 9.0 causes Data errors

    Hi
    for a particular task in DAC, i changed a parameter in Parameter sub-tab of Tasks Tab in the Design view. the Default one was Dept_Security which i changed to Division_Tree. the Owner for Dept_security was Peoplesoft 8.8 in the Parameter sub-tab of the tasks tab (SDE_PSFT_Stage_InternalOrganizationDimension_DepartmentHierarchy_GetDept), when i changed this Parameter to Division_tree, the Owner was changed to the custom container we created out of exisitng delivered container.
    i am not able to predict if this causing the problem, whats happening is the ETL Process loads multiple Department and Division related dimensions and facts and its is doing that by incrementing the data by 1 each time. for example: the headcounts are always one at any point of time selected. but after changing this parameter i guess, the ETL Process is triggered five times and so facts and related dimensions are loaded five times in Data warehouse.
    what possible changes or errors in DAC or Informatica could cause this issue. i never heard this type of issue on web. this is not data issue in Source i guess.
    thank you
    kumr

    This issue has been corrected and a supported fix can be download from
    http://support.microsoft.com/kb/3038387
    This is already included in Host Integration server 2010 Cumulative Update 10 available at
    http://support.microsoft.com/kb/2917398
    Manfred MIttermüller
    - MSFT -

Maybe you are looking for

  • Badi implementation error after implementing oss note 745168

    Hi All, i implemented oss note 745168 to fix badi ME_PROCESS_REQ_CUST by doing step 1 & 2 manually.. during the implementation of step 3, there was error but we just proceeded..now my whole badi consists error and can't be activated but the definitio

  • Visual attribute creation at runtime.

    hi all, can i create a visual attribute attribute and set its properties at run time. please help me. thanks Muhammad Nadeem [email protected]

  • Can I replace a home hub with a decent adsl modem?

    I have several PCs, laptops, an internet TV, a couple of apple TVs, ipads, phones etc in my house and am fed up with them not communicating properly.   So after reading how reliable they were, and given the fact I have somehow become an apple fanboi

  • One artist listed many times...

    Hi guys, One of the bands in my 3G iPod is listed once for each of their songs in the "artists" menu. I think I uploaded them as a compilation by accident. I deselected this option but it didn't change anything in my iPod. Any suggestions? THANKS!

  • Streets&Trips

    Bonjour,Est-ce que je peux acheter Streets&Trips sur un Mac-book-pro ?