Passing values from CVI dll to TestStand gives wrong values

Initially I wanted to pass an array of booleans from CVI to TestStand.  I read that this was not possible because you cannot set Boolean as a parameter.
So I declared it as unsigned intin CVI.
Strangely enough, TestStand does receive it as an arrayof Booleans.  However the values are still wrong.  I wonder if it actually is possible to pass an array of Booleans.
Using TestStand 3.1 and CVI ver 7.1 (no impact)
Here is how I declare the parameters in CVI:
void __declspec(dllexport) __stdcall MemTest
    CAObjHandle     thisContext,
    unsigned char *    apbResult,
    int             alComport,
    int                alSocketNum,
    UINT32            aulHostAddr,
    BOOL        *    apbTestOutcome,
    UINT32             testSize,
    UINT32          startAddress
The other functions within CVI use an array of booleans.
Here is how I declare the parameters in TestStand:
Here are the results I get.  They should match...
The obvious question is:
How do I get the results in TestStand to match those from CVI?
The printout >>  no. 1 Passed << etc..  are the values of the array apbResult in CVI.  bSippResuls should match.
Message Edited by Ray.R on 10-16-2009 10:41 AM
Attachments:
TS_prms.PNG ‏29 KB
TSwrongValues.PNG ‏12 KB

Ray,
Try this:
void __declspec(dllexport) GetResults(unsigned char arg1[16])
 //Insert function body here.
 arg1[0] = (unsigned char)0;
 arg1[1] = (unsigned char)1;
 arg1[2] = (unsigned char)0;
 arg1[3] = (unsigned char)1;
 arg1[4] = (unsigned char)1;
 arg1[5] = (unsigned char)0;
 arg1[6] = (unsigned char)1;
 arg1[7] = (unsigned char)1;
 arg1[8] = (unsigned char)1;
 arg1[9] = (unsigned char)0;
 arg1[10] = (unsigned char)1;
 arg1[11] = (unsigned char)1;
 arg1[12] = (unsigned char)1;
 arg1[13] = (unsigned char)1;
 arg1[14] = (unsigned char)0;
 arg1[15] = (unsigned char)1;
Regards
Ray
Regards
Ray Farmer

Similar Messages

  • Calling test sequence from CVI DLL that use ATL COM object does not work

    I am trying to call some DLL function writen in CVI from teststand. The CVI DLL is using ATL COM object(Written by me).
    The ATL COM object making instance of several ATL COM object inside it (including two controls that contains dialog). If I use a client writen in VC++ 6 and use the ATL COM (writen by me) works perfectly. But if I try to use it from CVI DLL it does not work any more.
    What is wrong? The client is passing an IUnknow interface to my component. Can anybody explain me what is wrong?

    It is not clear from your question as to what is specifically failing. If possible, one option would be to remove TestStand from the picture and see if the problem still occurs using a CVI EXE that invokes the CVI DLL.
    Scott Richardson - NI
    Scott Richardson
    National Instruments

  • CALCULATE_TAX_ITEM gives wrong values for Scess and HScess in PO Print

    Dear Friends,
    I am working with PO Print in smartforms hare the Fm CALCULATE_TAX_ITEM is gives wrong values for Scess and HEcess if I put the Gate pass (Basic Excise Duty) Manually.
    And one more Issue is as if I check any line item condition taxes than imediatly when I see the print the all line items Scee and HEcess displays same which I have saw.
    If there is a single line item in PO than there is no issue any way.
    kindly suggest to resolve the issue.
    Regards,
    D Tarun Kumar

    Hi,
    I had the same issue, that taxes on invoice tab of PO was not printed correctly on PO form by calling CALCULATE_TAX_ITEM.
    If you want to have the same tax value as komp-mwsbp, that use following form routine call before FB CALCULATE_TAX_ITEM.
    perform j_1b_save_tax_fields(saplmepo) using ekko ekpo lfa1.
    This is used in transaction me23n also.
    Kind regards,
    Tülay

  • Pass error cluster from labview dll to teststand

    Hello,
    I just want to pass an error cluster from a dll compiled in LV7.1 to TestStand 3.1. I never receive the contents of the LV error cluster in TS. I compiled my function with standard calling convention option, this should work. In my VI I generate only an error and pass to error output.
    LV Settings:
     TS settings:
    regards
    MB

    MB,
    please follow the info in this KB:
    http://digital.ni.com/public.nsf/allkb/22BF02003B4588808625717F003ECD67?OpenDocument
    Please note that using "By Value" will never return any values to TestStand!
    You cannot use the default error-container in TestStand to receive data from the LV error cluster if you compile the VI into a LV DLL.
    So either you choose to follow the KB or you split up the error cluster in your LV VIs to return error.occurred (boolean), error.code (numeric i32) and error.msg (LV String) .
    hope this helps,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • CVI module writes TestStand property, property value resets after step executes

    Hi,
    I've done a good bit of searching and can't find anything relevant to the issue I am having. I have created a DLL in CVI containing several functions which I call from TestStand. I also have created a custom step type for each function call. Each function in the DLL has a run-time version and an edit-time version. The edit-time functions each have a user interface associated with them called from teststand. These edit-time functions are put in the custom step-type substep tab under the "edit" category. Before running a sequence with these custom steps the edit-time user interface is launched to allow the user to input values which will be passed to the run-time function. Originally I tried to set up my run-time functions as a "post step" substep in the step type properties. However, the sequences would fail to run because the step settings module tab was blank. I then selected CVI as the adapter in the step type properties and specified a default module for each type. This populated the module tab of step settings like I wanted. However, when I ran the sequence each steps run-time function was called twice, once for the post step and once for what was in the module tab I am guessing. I then went back into the step types and deleted all the post steps. I thought all my problems were solved at this point, however after doing some more extensive testing I still have one bug I have been unable to get rid of.
    The problem is that two of my step types have to write data back to TestStand at run-time after they query an external device for it. I know the query works because my text log that the DLL generates shows the correct values. However, the data is not getting written back to TestStand properly. In the run-time functions after verifying valid data has been returned I try to write it back to TestStand using: "TS_PropertySetValNumber(seqContextCVI,NULL,"ThisContext.Step.ParameterValue.NumericParameter",0,(double) ushortint);"
    I've checked that this call doesn't generate an error and also used the TS_PropertyExists method to verify that I had the lookup string correct. Both of these checked out so I then added another command which reads the value written to TestStand back immediately after writing it. I printed this to my log file and found that the value is being written to the TS property. So, the problem is that TestStand is setting the property back to zero after the code module executes. How do I prevent this?  
    Thanks for any input, let me know if anything needs clarified.
    Josh Meyer
    Solved!
    Go to Solution.

    Well, I've come to the conclusion that my "problem" isn't actually a problem. I had a bit of fundamental misunderstanding of how TestStand works (I don't actually use it, I'm just writing some code that will bring an existing tools functionality inside of TS).
    Anyways, what I've learned is that when you write to a property during editting/sequence setup these properties are preserved (so you can set up a sequence, save it, re-open it and be able to run it without any re-configuration for instance). The run time values aren't preserved (unless logged) becuase they are only needed at run-time. For instance, if a user calls one of these functions to pull a value from a controller they are probably doing so becuase they want to verify the value is what they expect it to be. Rather than looking at the value after exection (which is what I was assuming they'd do), they'd set up the step after the "read value" step to test the value it returned. This value is availablein "RunState.PreviousStep.valuename" during the step followint the "read value" step.
    Hope I didn't confuse anyone to much, I'm completely new to TestStand.

  • Exporting imaqImageToArray arrays from CVI DLL

    I have created a DLL in CVI (6.0) that populates an array sent to it by another process (also a CVI program.) The program works fine - until I try to incorperate IMAQ commands - specifically imaqImageToArray (as contained in Imaq 6.0.5 for CVI.)
    When I examine the array produced by the imaq command - WHILE still in the DLL - The result looks great - BUT what gets exported is blank (set to zeros.)
    I have determined that the command imaqImageToArray is causing this behavior. Is a workaround/fix available?
    Thanks in Advance!

    Martin,
    It seems that this questions has already been answered through our Email Support team, if I'm not wrong, the correction was to pass the newer pointer value to the program from the DLL, in that way you would get an updated pointer. I will reference the same example in the web that shows how to use this function as well.
    IMAQ Image To Array in CVI
    Regards,
    Nestor Sanchez
    IMAQ/Motion Group
    National Instruments
    Nestor
    National Instruments

  • How can i pass string from C++ DLL to Java via JNI?

    Hi everybody. I made a DLL with Borland C++. I must pass a string from this dll to Java via JNI.Namely i define a string variable in C++ DLL and i send this variable's value to Java via JNI.
    I can pass integers but i couldnt Strings. . How can i do this? is there any sample?

    Hi,
    So your function should be private static native String get_text();
    (It's often a good idea to make native methods private since when you change signatures you generally have to change java wrapper methods only).
    I know nothing about C++ strings but I'm pretty sure that you can convert it to char*, so
    do :
    char* szMyString = myString.toChar*();
    Then return from native with JNU_NewStringPlatform(env, szMyString)
    (see my 1st answer for JNU_NewStringPlatform() description).
    --Marc (http://jnative.sf.net)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Exchange value from a running sequence teststand and an independent vi LabView.

    I have a teststand sequence, which runs with a local variable.
    I want to read this local variable in a independent vi.
    Are you an Idea ?

    Sebus,
    I'm not sure what you mean by an "independent vi".
    If you have a VI that TestStand calls, the post entitled In TestStand, how to pass data to LabVIEW will probably be very helpful. In addition, there are Getting Started guides that explain this concept and with TestStand 3.0, there is a whole manual called "Using TestStand with LabVIEW" that walks you through step by step how to use TestStand and LabVIEW together.
    If you have a VI that executes your test, this VI would be considered an Operator Interface. For this situation, you can use the TestStand concept of UIMessages to pass data from your sequence to the operator interface. This is described in more detail in the TestStand help. UIMessages are a TestStand object that you can pass from your sequence to your operator interface. Since the engine actually executes the sequence, you do not have access to the internal sequence characteristics mid-execution. By using the UIMessages, you can have your sequence automatically send data, and then your Operator Interface will retrieve these messages.
    The third scenario is where your VI is not connected to TestStand at all. In this case, if you truly have no connection to TestStand, this is not possible. However, if there is a common shared application then you can use that to pass data. For instance, you could use Datasocket (see DataSocket Overview
    for a brief synopsis) and have TestStand pass the value of the local variable and have LabVIEW read from Datasocket. There is also an ActiveX server that TestStand has called the Synchronization server. This is used internally with the Synchronization step types. However, since it is based upon ActiveX you can use each of the methods and properties that are available; the functions just are not documented. You could use the queue synchronization type to pass data from TestStand to your independent LabVIEW VI.
    If this does not answer your question, please let us know and clarify what you mean by an independent VI. Also, the versions of TestStand and LabVIEW would be helpful.
    Regards,
    Shannon R
    Applications Engineer
    National Instruments

  • Passing parameters from LabVIEW vi to TestStand

    Hallo,
    I'm struggling with retrieving the value of a vi OUT Parameter of type ASCII string from the basic_serial_write_and_read.vi (http://zone.ni.com/devzone/cda/epd/p/id/2669)
    I've assigned a Local Variable type string and assigned this expression to the vi OUT parameter "read string".
    When running the sequence however, the Local Variable value is not updated! (?)
    I can see the ASCII string being returned from the UUT on the NI I/O Trace tool.
    The basic_serial_write_and_read.vi works OK in LabVIEW.
    I'm just getting started but can't figure this out. I'd be appreciative of any hints.
    Cheers
    Kech
    Solved!
    Go to Solution.

    Attached are the basci_erial_write _and_read.vi and my play.seq TestStand sequence.
    When using the ASCII char "@" as string to write value - i get no reply value to the Locals.Local_read Variable, although i see that the UUT replies with a 22 byte long message on the NI I7O Trace tool.
    How do i convert the vi - so that the string to write and read string parameter type can be used with hex data i.e. 0x40?
    Attachments:
    basic_serial_write_and_read.vi ‏23 KB
    play.seq ‏9 KB

  • MONTHNAME on Presentation give wrong values even the timezone settings are

    HI All,
    I have done the timezome settings on the BI Presentation services,all the dates work fine exactly the required date with timestamp is comming.
    THe problem is if i use MONTHNAME on the Presentations it gives the original value.
    Ex:if My original date is "31-MAR-2011 11:00 00 PM" after time zone setting(+2hrs) it shows "01-APR-2011 01:00 00 AM" which is exactly which we need to get and we are getting ,
    but if im using MONTHNAME(above date field) it still returns MAR where it should return APR,coz we expect APR as the timezone setting has been done.
    Can you please help me if i still missing any Settings in OBIEE.
    Regards,
    Kishore K

    HI,
    Thanks for the reply...!
    But if the timezone is handled there should be something which works on the months as well......any file setting need to be changed...?
    Or any doc from Oracle handling the issue.....!
    Thanks in advance....!
    Regards,
    Kishore

  • Direction Needed: Storing calculated values from datagrid column in order to call values into graph

    Hi all,
    I am new to Flex/Flash Builder, actionscript, and mxml, so please be kind.
    I have developed a small program that has a component that displays a datagrid fed with information out of a mysql db via a php data services connection. Within that same component (page), I have a graph that charts the dates via a plot chart. I am interested in adding a line series to the graph, but the data I want to use is a calculated field in the datagrid which I used a custom lable function to derive and display. Can someone steer me to the correct method to store such values and how to call them into a chart?
    Some addition information
    Custom label function:
      /* Custom label function for the Delta1 column. Calculates the number of days between the planting date and 10% flower. */
                                  private function calculateTo1stFlower(item:Object, column:GridColumn):String {
                                            var tempDate1:Date = new Date(item.dflower10 - item.dplanting);
                                            return Math.round((tempDate1.time / MS_PER_DAY) + 1).toString();
    /* Number of milliseconds in a day. (1000 milliseconds per second * 60 seconds per minute * 60 minutes per hour * 24 hours per day) */
                                  private const MS_PER_DAY:uint = 1000 * 60 * 60 * 24;
    Within my spark datagrid
    <s:GridColumn width="30" headerText="Δ1" labelFunction="calculateTo1stFlower" ></s:GridColumn>
    I assume I need to store the array of values for this column and then chart the saved values as the xField within the LineSeries. Should I use a class based model?
    The following link seemed like it may be an appropriate path; I am not sure though.
    http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7b51.html
    Thanks in advance for any support,
    Matthew

    Thanks for trying to post DDL, but you have no idea how to do a data model. You do not know that tables have to have keys, what ISO-11179 is, etc. 
    You have a table that is supposed to model companies. Your singular names says that there is only one company!  There is no company identifier (the industry standard is the DUNS). A customer is not a company. We do not use numeric data types for identifiers;
    do you do math on them? NO!  The attribute property comes after the attribute name (you never heard of ISO-11179). 
    Think about how silly VARCHAR(1) is. 
    CREATE TABLE Companies 
    (company_duns CHAR(9) NOT NULL PRIMARY KEY, 
     company_name VARCHAR(30)NOIT NULL, 
     margin_oil INTEGER NOT NULL, 
     margin_hangar INTEGER NOT NULL, 
     margin_cleaning INTEGER NOT NULL);
    INSERT INTO Companies
     VALUES (1, 'AviatKorea', 100, 125, 200), 
    (2, 'AXHollande', 50, 40, 30), 
    (3, 'BFXNorway', 60, 80, 600), 
    (4, 'EEEFrance', 10, 25, 60);
    CREATE TABLE Company_Tariffs
    (company_duns INTEGER NOT NULL
       REFERENCES Companies(company_duns), 
     tariff_type CHAR(1) NOT NULL
        CHECK (tariff_type IN ('A','B','C','D'),
     PRIMARY KEY (company_duns, tariff_type));
    INSERT INTO Company_Tariffs values (1, 'A'), (2, 'C'), (2, 'D'), (3, 'A'), (4, 'A'), (4, 'C'), (4, 'D')
    SELECT * -- do not use * in production code
      FROM Companies AS C,
           Company_Tariffs AS T 
     WHERE C.company_duns = T.company_duns;
    >> I would like something like with a computed column [ ] that retrieves the different contracts used: <<
    You might but a SQL programmer would not. This violated First Normal Form. It is a display report and is done in the presentation layers. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Editable field gives wrong value in report.

    Hi,
    I have report with some editable fields. I am using apex_item for one editable select list. I gave functionality to update row by providing go button. when user clicks on go button, I sends page by using javascript dosubmit which updates values in table through update process. everything works fine but sometimes i am not able to read particular value in row. for example...
    Rownum---------select_list--------- button---------- comment(editable)-not used apex_item
    1------------------------ 'abc'---------------- GO----------------------------- new
    2------------------------- null---------------- GO--------------------------- closed
    3 ------------------------'xyz'---------------- GO--------------------------- reopen
    I used apex_item for select list but status is made editable by selecting "text area" from tabular form element of column.
    when I press GO button on row third by selecting xyz it takes null value of 2nd row. same if I select something in 2nd row. i.e. instead of null if I selects 'mno' in 2nd row it takes select list value as 'mno' for third row. I observed this by writing javascript code which alerts me value of variable f01,f02.....
    Please if anybody can help me. I want to know why this happens?

    You might have better luck asking in the Oracle Application Express (APEX).

  • GetDuration() gives wrong value. bug?

    I have a simple Symbol with a timeline of 10 seconds.
    If i place a any trigger  like sym.stop()  anywhere "on the timeline" sym.getDuration() gives me 10000 what ist correct.
    If i place no triggered action on the timeline sym.getDuration() gives me 170454.41228624 which is quite not correct.
    Its in the same EdgeAnimate - Compositon and clearly reproducible.

    Sorry, i do not understand your answer.
    1) To me, stage timeline has a length of 5000 ms. But on the stage is a Symbol that itself has a timeline of 2min 50.4sec, to my understanding this should not extend the stages timeline length.
    2) Nevertheless, placing a trigger ( like sym.stop() or even empty )  on the stage should not alter the value of the alert, but it does.
    without a trigger i get 170454.41228624, with a trigger set on first frame i get 5000.

  • TransactionStateChanged gives wrong value when validation error.

    In my navbar, wich extends the standard one I extended the transactionStateChanged method.
    It seems to work and when the transaction goes dirty I receive a true state; when transaction returns clean I receive false.
    However if a validation fails during commit the transaction remains dirty but I receive a false value (as if commit worked).
    Testing the transaction dirty during that phase gives false.
    How can I solve that issue ?
    Tks
    Tullio

    Repost

  • PVal.Row gives wrong value

    Dear all,
    I have an add-on that does something in the rows of a number of forms.
    Now I have the problem that if I have just made an Invoice with 6 rows and I change to sales order the Item_event says that I have 6 rows, although my screen is empty.
    How can I be sure that the number of rows the pVal.Row gives me is correct?
    Can I reset everything when I change forms?
    Kind regards,
    John Slaats

    Hi
    If .update method don´t work... ... perhaps you should show us some code..... maybe you are consulting that value on beforeAction

Maybe you are looking for

  • Getting # instead of £

    Hi, I have the problem for viewing the pound sign in the front end. Instead of pound sign i see the # sign. Could you please tell us what nls settings needs to be done on the database side and at the client side. Thanks Vinayak

  • How to make some fields of table as non editable through SM30

    Hi, I craeted a custom table and maintained thriugh sm30. 2 fields should be read only. Can any one help me un that Regards, Jayaram

  • What triggers WebUtil auto-install?

    We are trying out JInitiator 1.3.1.14 with our 9i Forms app as suggested by Pedro Garza to fix 9i Forms on XP: the even more final insult. Unfortunately this seems to have broken the WebUtil download: neither the webutil.properties file nor the requi

  • I cannot Run OTM,OLT & ADMIN on OATS

    Hello, I cannot Run OTM,OLT & ADMIN on OATS. I get "Error 404--Not Found From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1: 10.4.5 404 Not Found" I tried every comment on this page and even the ReadMe html page under documentation to no avail. I

  • Some emails are coming in on my iPhone, but all of them are on my MacBook.  Can't figure it out.

    some emails are coming in on my iPhone, but all of them are on my MacBook.  Can't figure it out. any idea why this might be happening? Thanks!