Visual C++ 6.0 usage with TestStand

Greetings!  I would like to have a jump start in using Visual C++
6.0 with Test Stand.  Any example of Visual C++ DLL and sequency
file which demonstrates the most basic function as below :
Example 1:
a.  Test stand sequence calls a Visual C++ 6.0 DLL and pass in 2
parameters, say a variable type of float - "fInput" and another
variable type of integer - "nPower"
b.  The Visual C++ 6.0 DLL calculates "fInput" to the power of "nPower" and pass back the results to Test Stand
c.  Test Stand evaluate the result by comparing to the upper and lower limit
Example 2:
a.  Test stand sequence calls a Visual C++ 6.0 DLL and pass in 1
parameter, says a variable type of string - "strMeasType" (value of
"AC" or "DC")
b.  The Visual C++ 6.0 DLL reads the parameter and configure an
instrument, says Agilent 34401A, to measure either ACVolt or DCVolt
depending on "strMeasType" (using VISA)
c.  Test Stand evaluate the result by comparing to the upper and lower limit
Thanks a lot!

Hi,
What you are trying to do is pretty basic TestStand functionality. There are several resources you can use to get information on howTestStand and C++ DLL's can interact.
For instance, you can check out http://ni.com/manuals (or more specifically, http://sine.ni.com/manuals/main?q=Teststand) to look at the TestStand documentation that is shared online. For more TestStand documentation, you could also open TestStand and follow the Help menu to Help>>Search the TestStand Bookshelf. This will open a PDF with a link to several helpful documents. You could also check out the NI Developer Zone and search for help there.
If you are looking for specific coding examples, there are several examples of how to access a C/C++ DLL in <TestStand>\Examples. Specifically, you could look at the <TestStand>\Examples\MultiUUT example. While this example does not perform your exact requirements, it does demonstrate how a TestStand sequence file can use a DLL and how to evaluate limits. If this example is not what you are looking for, you can always search on the previously mentioned NI Developer Zone and look for example code to find something that better fits your needs.Message Edited by Matt Mueller on 08-14-2006 03:20 PM

Similar Messages

  • Trouble with TestStand running VB DLLs compiles in separate threads

    I have an application that uses DLLs written in VB 6 to manipulate hardware. The hardware is Stepper Motors controlled via the NI CAN bus card, and two instruments controlled via the GPIB PCI card. I have written the two DLLs to use the same NI PCI GPIB and the same NI CAN BUS card. (One instrument per DLL and One Motor per DLL)
    Test stand is then creating the DLLs and running them in separate threads. I have the one DLL Call in a subsequence running as a separate thread, and the other DLL is in the main sequence. I have a GOTO step with preconditions set so that the main sequence only continues after the separate thread in the subsequence is finished.
    The problem I am having is that these D
    LLs work OK when I run them both in the VB debugger. The program even works when I run the main thread in the debugger, and the subsequence is run compiled.
    The problem is, that if I try to run both of these DLLs compiled It seems as if the subsequence DLL never executes.

    To Tuxamation -
    Nothing comes to mind as to why this would happen. VB 6 automation DLLs are used all the time for code modules.
    Note that when MSVB debugs a DLL, it is actually running the DLL as an EXE server within the MSVB process and not in TestStand's process that is using it. I typically found that there is typically a subtle difference in behavior between running the server as an EXE or DLL server.
    A simple way to determine if the TestStand call is reaching your DLL is to place a MsgBox function call in the DLL entry point and immediately return, ie. bybassing your existing code.
    So, if the call is being made to your DLL, you could then enable the Visual Basic project option on the Compile tab, "Create Symbol Debug Info" and recreate your VB DLL.
    You can then attach Microsoft Visual Studio (C++ debugger) to the TestStand process, open the file that contains the entry point in to DLL that TestStand calls, set a breakpoint, and see if the breakpoint is reached.
    Scott Richardson
    Scott Richardson
    National Instruments

  • Comparing the BOM usage with the actual usage for materials.

    Hi All
    My client want to compare the BOM usage with the actual usage and have a report for this within a period? More specified they want to calculate the BOM usage, based on the requirement quantity from confirmation - but with out the scrap %. mulitplied with the confimed quantity of the header material.
    The actual usage should be based on  goods issuing from stock, either as goods issue to order (backflushing) or as goods issue to cost center. 
    I havent been able to indentiy a standard report for doing this - does some of you know a standard report?
    -  I was thinking of the following method:
    Look at  tabel RESB and compare it  with MSEG, but I have some diferent problems with this.
      - In resb there is no qty before scrap. 
      - The data amount from MSEG, is so huge so it is not possible to make a data search for a whole period (eg. month)
    Br. M

    There is one std report MCRX which gives a comparison of quanity in order and actual consumption,
    if it doesnt meet your need, you may have to create a custom report.
    logic can be find the quantites as per BOM for the produced quantities
    issued quantities to the order
    tables you may need are AUFK AUFM
    AFKO, STAS STPO
    MSEG, MKPO
    JEST ( if you want to filter using order status)

  • Hello, i have updated my iphone 5 black 16 gb to ios 7 ios 7.0.2 (11a501) and my battery has become worse it gives 9 hours of usage with out doing anything, i have done everything i tried, not using my iphone as well but still no change at all!

    hello, i have updated my iphone 5 black 16 gb to ios 7.0.2 (11a501) and my battery life of my iphone has become worse it gives 9 hours of usage with out doing anything, i have done everything every tip that is available online i had 3gs and 4s so i know how to save battry life,i even tried  not using my iphone as well but still no change at all!. i have upadted to ios 7.0.3 then downgraded it , i thought battery may be an issue ,so i put  brand new battery still no change , so what should i do ? , update to the latest version which is ios 7.0.4 or wait for the ios 7.1 , i was using iphone 4s running on ios 6.1 it gave me 3 days of battery timing , iphone 5 seemed to be very bad for me ,help ! ?
    its facory unlocked btw

    Try to do a reset, if it doesn't work try remove recently added apps this may solve your problem ( like google app because it has happened with me)
    Take a look at apps using your location service in privacy, it can cause battery draining.

  • Huge data usage with Verison 4G LTE hotspot ( Verizon-890L-50DB)

    Recently upgraded my internet service to a Verizon 4G LTE hotspot (Verizon-890L-50DB).  First month - no problems - second month - I have 6GB of overage charges.  Every time I log in to check email or any other minimal data usage task, I get hit with another GB or more of download usage.  My computer is an HP Pavilion Laptop, Windows 7 with NETWORX installed.  Networx tells me it is indeed MY computer that is downloading this data and my hard drive is also showing the increases in data.  
    I've run AVG, Glary Utilities, Speedy PC PRO and Spybot Search and Destroy but found no virus, rootkit or anything on my computer that would explain this problem. 
    When I use a different wireless internet service, I do NOT see the extraneous data usage.
    I contacted Verizon's support team and got no help diagnosing the problem but they did agree to send a replacement for my hotspot device.  Hopefully this fixes the issue; then I have to battle with them about the unwarranted $60 or more in overage charges.
    Has anyone else experienced a problem similar to this?

    I would recomend getting out of the contract before the 14 day trial period ends.   Verizon will charge you an activation fee, restocking fee and one months service, but that is better than being stuck with this mess.  I have homefusion and am afraid to use since verizon seems to fabricate data usage.  Unfortunately I did not realize this untill after the 14 day trial.  Now is will cost me $350 to terminate my contract.
    Date: Mon, 18 Feb 2013 21:21:48 -0700
    From: [email protected]
    To: <Email address removed for privacy.>
    Subject: Re: Huge data usage with Verison 4G LTE hotspot ( Verizon-890L-50DB) - Re: Huge data usage with Verison 4G LTE hotspot ( Verizon-890L-50DB)
                                                                                    Re: Huge data usage with Verison 4G LTE hotspot ( Verizon-890L-50DB)
        created by Lyda1 in Verizon Jetpack 4G LTE Mobile Hotspot 890L - View the full discussion
    Exactly the same thing has happened to me.  I purchased the Verizon Jetpack™ 4G LTE Mobile Hotspot 890L two days ago.  After one day, I had supposedly used half the 5GB monthly allowance.  After two days, I am at 4.25 GB usage.  I don't stream movies, I have the hotspot password protected, I live alone, and no one else uses my computer.  I have not downloaded any large files.  At this rate, I'll go broke soon.
    Reply to this message by replying to this email -or- go to the message on Verizon Wireless Community
    Start a new discussion in Verizon Jetpack 4G LTE Mobile Hotspot 890L by email or at Verizon Wireless Community
    © 2011 Verizon Wireless
    Verizon Wireless | One Verizon Way | Mail Code: 180WVB | Basking Ridge, NJ 07920
    We respect your privacy.  Please review our privacy policy for more information.
                                 Not interested in these emails anymore, or want to change how often they come? Update your email preferences.
    Message was edited by: Verizon Moderator

  • Fast dial (visual bookmarks) does not work with the new 5.0 upgrade. How do I correct this issue

    fast dial (visual bookmarks) does not work with the new 5.0 upgrade. How do I correct this issue Asked this question yesterday. I desperately need info, will I ever be able to use fast dial again?

    I tried it and it WORKED....I even tried the other version BEFORE this one and it didn't work so I tried yours and it worked like a charm so THANKS brother....

  • Problems in using Labview DLL with TestStand!

    Hi,
    I tried to put the VI's to create a TCP/IP Connection, read/write Data to it and close it inside a LabVIEW DLL and use these functions with TestStand.
    The problem is to get access to the ConnectionID generated as TCP Network Refnum in LabVIEW.
    I don't know how to specify the prototype entry for this Refnum in LabVIEW and how to read it with TestStand.
    Another try to pass an ActiveXReference of SequenceContext and use the SetValIDispatch method to set a local variable (Type: ActiveXReference) to the returned ConnectionID of the TCPOpen.VI wasn't successful too.
    It seems to me that the connectionID isn't a normal ActiveXReference.
    Regards,
    Sunny

    Hi Sunny -
    You should treat this parameter as a pointer to an int when calling the DLL from TestStand (or any language like C or C++). Note that you can't do anything with the value outside of LabVIEW since it only has meaning inside of LabVIEW. You can only pass it around for use in other VIs you call from TestStand.
    Hope this helps....
    Kyle G.
    National Instruments
    Kyle Gupton
    LabVIEW R&D
    National Instruments

  • What is the best way to organize LabVIEW VIs to be used with TestStand?

    I'm using LabVIEW 8.6 with TestStand 4.1.1 and I'm trying to organize the VIs to later deploy them to a production PC. So, I organized them into a LV project and built a LLB with the "Source Distribution Tool". (Destination type: LLB)
    Some VIs in the LLB use the "Call Library Function" (user32.dll) to simulate keyboard events. But, when any of these VIs is called from TS, LabVIEW is suddenly terminated. When these same VIs are not in the LLB and are called from TS they do not have any problem.
    Is the LLB the best way to organize VIs to be used with TestStand? If so, What could I be doing wrong?
    I appreciate your help.
    H.P.
    Mfg. Test Engineer
    Certified LabVIEW Associate Developer
    Attachments:
    LabVIEW Problem.JPG ‏28 KB

    Hi Ray,
    I really appreciate your intention to help, but I believe I solved the problem already. However I still have some questions.
    The problem was that when I built the LLB the configuration of the "Call Library Function" changed. When the LLB is built it is also created a Support Directory named "data" that contains some dependencies including a new copy of the user32.dll. The "Library name or path" field in the "Call Library Function" changed to be linked to a new Dependency Path. ( ...\data\user32.dll.)
    What I did was select "Specify path on diagram" and create a path-constant ("C:\WINDOWS\system32\user32.dll"), so the "Call Library Function" will be always linked to the original user32.dll.
    I still don't know why the "Call Library Function doesn't work with the user32.dll copy in the New Dependency Path. And I'm not sure if the LLB is the best way to organize VIs to be used with TestStand.
    Do you know why?
    Thank you,
    H.P.
    Mfg. Test Engineer
    Certified LabVIEW Associate Developer

  • CPP DLL's use pass-by-reference integration with teststand

    I have the detail in the attached Outlook format file.
    Attachments:
    CPP DLL Integration with Teststand.docx ‏120 KB

    If you don't know what a method is, you're going to have a number of problems down the road... A method is a function. It's a member of a class. It sounds like you may need to go through some .NET tutorials to understand the terminology.
    Arrays in .NET are objects and are always passed by reference. That said, you would need to provide the details on the method's signature (i.e., the function prototype). Is the array a System.Array object or a regular old "int[]"? Is the method actually returning an array, or is it operating on the array in place. What is the return datatype of the method?
    Message Edited by smercurio_fc on 08-15-2008 02:26 PM

  • Can I use C# forms with TestStand

    I am looking to use a rtf file to store data collected during a TestStand sequence test.  I have used C# class libraries in the past with TestStand, but I can only alter the Rich Text while using a Rich TextBox format and that can only be used in a windows form.  Is it possible to work with a windows form and not a library with TestStand?

    Hey mcfrenzy36,
    I found something in the TestStand help that I think can point you in the write direction http://zone.ni.com/reference/en-XX/help/370052J-01/tsapiref/infotopics/font_objects/
    Hope this helps
    BeauH
    Applications Engineer
    National Instruments

  • Visual Studio Express Community 2013 with Update 4

    I'm in college, and the class I am in is programming, so in order to do my work, I need C++ (which our required work is through Visual Studio Express). Unfortunately, after every single time I try to download Visual Studio Express: Community 2013
    with Update 4, it gives me these error messages: "SETUP FAILED! Install cannot continue because some required components failed.", "Visual Studio Core Features: Fatal error during installation", and "Visual Studio Core Features - ENU:
    User cancelled installation". Obviously the last two errors popped up, because of the first error message, but why would it say that some components failed? What exactly does that mean? If someone can please respond quickly, I would be really happy, because
    I need to install this ASAP, in order to do my classwork, homework!!!!

    Hello Eadsele,
    I think the problem is pending on your network. Please try download the ISO and verify its checksum before install, refer to here to verify:
    https://www.visualstudio.com/en-us/downloads/visual-studio-2013-iso-sha1-vs
    Best regards,
    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How long does the IPhone5c battery last for without hardly any usage with about 2/3 to 3/4 left?

    How long does the IPhone5c battery last for without hardly any usage with about 2/3 to 3/4 left?
    Has the side affect of charging, where the battery's life gradually decreases overall with each charge, been fixed ?

    Eric,
    They did say 12-14 hours, but as is always the case with such estimates, they invariably quote the 'best possible scenario' and almost never mirror 'real world' conditions.
    If, from a fully charged position, you simply switch on your nano, and set it to continuously play through a long set of songs, with EQ off, backlight off, modest volume (50%) don't touch it during playback, then you might just get somewhere near this figure - and if you don't then it's either not been conditioned properly or it's faulty.
    If you use it like me, daily for a couple of hours, with 2 secs backlight and switch songs regularly, using fairly high volumes then 6-8 hours is more likely. It'll even drain when it's not in use, even in sleep mode, albeit very slowly. They also tend to drain more quickly before they've been through their first few charge cycles (the conditioning period).
    Personally I haven't got a problem with this though I can understand why some people have. It's not very impressive in this respect. Apple should be able to come up with something much better - maybe they should talk to Sony

  • IVI compliance package 2.2 with teststand 2.0

    Hy,
    I work with Teststand 2.0 and the IVI compliance package 2.2 and I do Fall time and Rise time measures on CAN low speed protocol with a remote scope Lecroy. If I do a data acquisition of one CAN frame (which contain several rise and fall front) and after, for example, I do a rise time measure on my previous data acquisition; I would like to know if the result of this rise time measure is the mean of all differents rise front or just the rise time measure of the rise front triggered.
    Thank you for you help,
    Xav

    Hi Xav,
    Alan from LeCroy Tech Support here...
    Which particular model are you using?  Most LeCroy scopes can accumulate measurements, both in terms of multiple measurements per sweep and over many sweeps. You can read back the overall mean value of everything accumulated since the last time "Clear Sweeps" was executed, or you can read back the last measured value. You can also read back the min, max and standard deviation of all measurements. The attached image shows a LeCroy WP7300A that is running our CAN analysis software... (Older scopes operate in a slightly different manner... )
    Let me know if you have any questions.
    Best Regards,
    Alan
    Alan Blankman, Technical Product Marketing Manager and LabVIEW Developer
    LeCroy Corporation
    800-553-2769 x 4412
    http://www.lecroy.com
    [email protected]
    Attachments:
    screenshot2.jpg ‏210 KB

  • Visual studio web express 2013 with update 4 downloading stuck

    I am downloading Visual studio web express 2013 with update 4 and when acquiring KB2829760  it stuck. Then prompts that "Unable to locate package source".Please give your kind attention as this is highly important to fix and install.

    Hi,
    You could try downloading ISO file for visual studio express 2013 for web with update 4.
    http://www.visualstudio.com/downloads/download-visual-studio-vs
    Before install, please try verify the supplied DVD ISO checksum use this tool
    http://support.microsoft.com/kb/841290/en-us It will tell us the ISO's checksum number, you can use it to compare with the one listed on download page.
    If the errors also occur, please use  http://aka.ms/vscollect 
    to gather the installation logs. After using it, you will find vslogs.cab from %temp% folder. Please upload the file to
    https://skydrive.live.com/ 
    and share the link here. I will help you check your installation logs to know the reason of your issue.
    Best Wishes!
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a
    href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

  • Adapting LabView to work with TestStand

    I am currently trying to get TestStand 4.2 to work with VIs created in LabView 9.0.1.  I looked in the LabView adapter and the development system that I am using is chosen.  I am currently going through the booklet for using LabView with TestStand and it states that I must TestStand default value, but I can not find where this value exists. 
    Solved!
    Go to Solution.

    The folder of interest is below:
    C:\Documents and Settings\All Users\Documents\National Instruments\TestStand 4.2.1\AdapterSupport\LabVIEW
    I attached a picture of my folder contents.
    I believe you need to copy 'TestStand - Default Values 86.llb' to 'TestStand - Default Values 90.llb'.  Be sure after copying to make the LLB NOT read only before you mass compile.  It may not be 86 or whatever version is installed by default.
    I don't know where these VIs come into play but I have had to perform the copying when I was using Clusters in connector panes when I was calling LabVIEW VIs.  There are probably other reasons.
    Good luck,
    PH
    Attachments:
    AdapterSupport.PNG ‏15 KB

Maybe you are looking for