Can labview call a test stand module
Having problems with a test dll that runs in test stand, but I get errors when trying to use the wizard in labview, however I can use the call library function node to protypye it. Problem - the function openComserialPort(char* comPort, ErrStruct & err), how do you difine the parameters for the ErrStruct & err part.
next Question, since this Dll runs in Test Stand, is their anyway to export to work in LabVIEW.
Solved!
Go to Solution.
Here's a description of the dll, to start off, I have a circuit board with a microprocessor on it, that has control for a radio module. During test I need to program this board serially through its' TX and RX lines on the processor. The dll given to me, which was written for test stand, has functions to enable me to do this programming. There are basically 11 function contained is this Dll.
Initialize Dll, (no errors),
open serial port, (no errors),
getStandardTable, which sends a command for the microprocessor to send back its information-> get assertion error
WriteHardwareVersion -> Sends the version and revision number -> assertion error.
ColdStart -> Which resets board statistics variables -> assertion error. Now, this function prototype is ColdStart (errStruct & err); So I prototype like I did for the above error struct, but still got an assertion error, which leaves me to believe, that , or vendor, has a bug communicating, or sending the commands via serially, to test this, I could use the serial examples contained in LabVIEW, however I don't know the command set of the microprocessor, or could there be something else wrong, Any ideas will be appreciated.
Similar Messages
-
My project requires me to convert a C++ program to a DLL and having it called by LabVIEW. Due to the complexity of this C++ program (converted from fortran using f2c -C++ option), it cannot be compiled without using /clr option. I did build the application standalone (/clr), and it functioned fine. When I build it into DLL using VS2005, I was forced to use No Entry point option and without using DllMain in the C++ code. Eventually the DLL was built without error. But after I call it from LabVIEW, I was not getting calculated results as expected. I added a testing function to the C++ code of the DLL and just try to modify a parameter, it will not, but only return the input numbers. I was passing data by pointer and not by value, so I expect this parameter output be modified. I suspect that the DLL didnt get executed at all as it has no entry point specified.
Am I on the right track to approach this task, or I am heading to totally wrong direction here? I believe due to the fact that my C++ was from f2c and use vsf2c.lib and so on, the code is managed code, so that a regular DLL cannot be built from it with an entry point. How can LabVIEW call such a DLL? Am I right on that? I really need your advice here for a right approach to this problem and possible implementation "watch outs"...Thanks!
BryanHi...Finally I was able to compile my code with an entry point defined and without using /clr. I can also call this DLL from LV and got back a variable from a little test function added to the DLL. But the function that was used for my main application in the DLL crashed LV and I got a pop up box from Microsoft Visual C++ Runtime Library: Runtime Error! "This application has requested the Runtime to terminate it in an unusual way, please contact the application's support team for more information". In Visual Studio I also got the following message: (I eliminated most of the "No symbols loaded" messages that are not errors but just info.) I would apprciate if someone can take to look with your more "experienced eyes", many thanks! Bryan.
'LabVIEW.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll', No symbols loaded.
'LabVIEW.exe': Loaded 'C:\WINDOWS\system32\xpsp2res.dll', Binary was not built with debug information.
'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\Shared\nicont.dll', Binary was not built with debug information.
'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\Shared\NICONTDT.dll', Binary was not built with debug information.
'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\nitaglv.dll', No symbols loaded.
'LabVIEW.exe': Loaded 'C:\WINDOWS\system32\lkbrow.dll', No symbols loaded.
'LabVIEW.exe': Loaded 'C:\WINDOWS\system32\lkrealt.dll', No symbols loaded.
'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\lvdaq.mxx', No symbols loaded.
'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\lvdesktop.mxx', No symbols loaded.
'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\lvfp.mxx', No symbols loaded.
'LabVIEW.exe': Loaded 'C:\WINDOWS\system32\mfc71.dll', No symbols loaded.
'LabVIEW.exe': Loaded 'C:\WINDOWS\system32\MFC71ENU.DLL', Binary was not built with debug information.
'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\vi.lib\FieldPoint\SubVIs\FPLVMgr.dll', Binary was not built with debug information.
'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\lvfprt.mxx', No symbols loaded.
'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\LvProjectProxy.mxx', No symbols loaded.
'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\LvRealTimeCoreProvider.mxx', No symbols loaded.
'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\MVEProvider.mxx', No symbols loaded.
'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\QtCore4.dll', Binary was not built with debug information.
'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\QtXml4.dll', Binary was not built with debug information.
'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\QtGui4.dll', Binary was not built with debug information.
'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\mxLvProvider.mxx', No symbols loaded.
'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\nimxlcpp.mxx', No symbols loaded.
'LabVIEW.exe': Loaded 'C:\WINDOWS\system32\nimxlc.dll', No symbols loaded.
'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\Providers\variable.mxx', No symbols loaded.
'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\Framework\lvMax.dll', No symbols loaded.
'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\MAX\UI Providers\FieldPoint71.dll', No symbols loaded.
'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\MathScriptParser.dll', Binary was not built with debug information.
'LabVIEW.exe': Loaded 'Z:\bli\development\projects\galfitDLL\Debug\galfitDLL.dll', Symbols loaded.
'LabVIEW.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700\msvcr80.dll', No symbols loaded.
'LabVIEW.exe': Loaded 'C:\Program Files\National Instruments\LabVIEW 8.5\resource\mesa.dll', No symbols loaded.
'LabVIEW.exe': Loaded 'C:\WINDOWS\system32\mscms.dll', No symbols loaded.
'LabVIEW.exe': Loaded 'C:\WINDOWS\system32\icm32.dll', No symbols loaded.
The thread 'Win32 Thread' (0xf94) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x90c) has exited with code 3 (0x3).
The thread 'Win32 Thread' (0xfd0) has exited with code 3 (0x3).
The thread 'Win32 Thread' (0x284) has exited with code 3 (0x3).
The thread 'Win32 Thread' (0xdac) has exited with code 3 (0x3).
The thread 'Win32 Thread' (0xa98) has exited with code 3 (0x3).
The thread 'Win32 Thread' (0x528) has exited with code 3 (0x3).
The thread 'Win32 Thread' (0x614) has exited with code 3 (0x3).
The thread 'Win32 Thread' (0xa5c) has exited with code 3 (0x3).
The thread 'Win32 Thread' (0xebc) has exited with code 3 (0x3).
The thread 'Win32 Thread' (0x5cc) has exited with code 3 (0x3).
The thread 'Win32 Thread' (0x700) has exited with code 3 (0x3).
The thread 'Win32 Thread' (0xcf0) has exited with code 3 (0x3).
The thread 'Win32 Thread' (0xc7c) has exited with code 3 (0x3).
The thread 'Win32 Thread' (0x4c8) has exited with code 3 (0x3).
The thread 'Win32 Thread' (0xa4) has exited with code 3 (0x3).
The thread 'Win32 Thread' (0x52c) has exited with code 3 (0x3).
The program '[804] LabVIEW.exe: Native' has exited with code 3 (0x3). -
*Can we call a Standard Function Module inside a Zfunction module ?*
Can anyone please help me know whether we can call a Standard Function Module inside a Zfunction module ?
I tried the same (No syntax error) BUT when i activate the zFunction Module it throws the error:-
+'' REPORT/PROGRAM statement missing, or program type is INCLUDE. " +Yes, I got the Answer -
We Can we call a Standard Function Module inside a Zfunction module.
But we need to make sure that the Function Groups are activated.
FUNCTION ZFM_TEST_NESTED_FM.
""Local Interface:
*" EXPORTING
*" REFERENCE(EX_CONVERT_UPPER_CASE) TYPE STRING
CALL FUNCTION 'TERM_TRANSLATE_TO_UPPER_CASE'
EXPORTING
LANGU = SY-LANGU
TEXT = 'gaurav'
IMPORTING
TEXT_UC = EX_CONVERT_UPPER_CASE
EXCEPTIONS
NO_LOCALE_AVAILABLE = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFUNCTION. -
Can LabVIEW call a function from a .sys file or is LabVIEW limited to dll access?
My vendor has sent me a .sys file with functions accessing their hardware. Can i call these function from labview directly or do I have to wrapper the .sys with a dll?
Well a sys file is a kernel device driver. LabVIEW does not have any direct way of accessing such a driver. The way kernel drivers are accessed is usually through a DLL which makes calls to WinAPI functions such as CreateFile(), ReadFile(), WriteFile(), CloseHandle() and DeviceIORequest(). Since these WinAPI calls are basically just DLL calls too, you could theoretically use the Call Library Node to call them and access the kernel device driver in such a way.
However for any kernel device driver with more than one or two device driver calls, it will certainly be easier in terms of development, debugging and maintenance of the code, to write actually a dedicated DLL in C/C++ for this device driver and access that DLL from LabVIEW, especially if you consider the LabVIEW datatype limitations when designing the DLL interface (Basically this same DLL can then be called from any other Windows development environment, be it Visual Basic (similar datatype limitation as LabVIEW), Delphi, (Visual) C, LabVIEW or also various scripting environments like Python and Lua.
Some of the necessary WindAPI calls are rather involved and pose quite a bit of trouble to get the parameter data right in LabVIEw.
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions -
How can i save my Test Stand report as the serial Number?
Hi, I'm using TestStand 3.0 and LabVIEW 7.0 I want to know how i can save my TestStand generated report as the UUT serial number. Thanks
Hi arj,
Within the Report Option in the Report File Pathname Tab is a control 'New UUT Report File for Each UUT'. Enabling this will include the Serial number in the Report Filename. Unfortunately its formated into the filename as '[serial number]'.
This is done in a step in the Process Model - Test UUTs or Single Pass. This step is called 'Determine Report File Path' which is a dll call to a function in modelsupport2.dll. This returns the full pathname to the report and stores in Locals.ReportFilePath.
So you have the option either modify the Locals.ReportFilePath or modify the Function in modelsupport2.dll and rebuild the DLL.
Hope this helps
Regards
Ray Farmer
Regards
Ray Farmer -
Linking Labview Conrtrols to Test Stand Parameters
I am trying to run a Teststand sequence from Labview. I was able to link all the necessary Teststand controls like Open sequence, execution display, Test UUT using the connect command invoke node. However, I am having difficulty linking labview controls to the sequence Parameters found in the sequence context. Any help on this will be appreciated.
Thanks,
SamSam,
As I mentioned before, UI Messages is how you would do this. Essentially, what you would do is send a UI Message from the sequence and then handle that UI Message in the operator interface in a callback. For instance, say that you want to know the number of loops to iterate as a setting on your operator interface. You would send a message from your sequence named say "Give_Iterations". In your operator interface, you monitor the UI Messages and when you see a message that says "Give_Iterations", you can set some value in your sequence context as a response to the message.
Here is an example of this type of callback:
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=04A24417FF0933A2E0440003BA7CCD71&p_...
For general UI Message information, you can check out our developer zone documents on UI Messages located here:
http://zone.ni.com/devzone/devzone.nsf/webcategories/5D2CDEB27E67D8378625681900729242
Hope this helps!
Message Edited by AndrewMc on 09-12-2006 01:26 PM
Thanks,
Andy McRorie
NI R&D -
Using labview global in test stand sequence steps
If I have to pass data between different steps ( only labview vis) within same Main sequence, is it right using LabVIEW globals, rather than TestStand globals?
in one step, I will be writing data to the Global.
In a later step, I will be reading the global to access that data.
Example sequence:
I am more comfortable with using Labview globals than Teststand variables. Labview is the only adapter in my sequence.If it is just within one sequence, then I would use the TestStand variables. The reason is because you are limiting your possible reuse of those VIs by using the global. If you pass in the value, you have a better chance of being able to reuse the VI.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines -
We have
a great opportunity at Cooper Power Systems for someone with experience developing electrical test
stands for a manufacturing production environment. This will be a great
opportunity for someone with Labview, PLC, and Test Stand Software and Hardware
experience. If interested in this Milwaukee, WI metro area opportunity
please email me at [email protected]
Thanks!
MattSorry.... I forgot to mention in the original post... this is a permanent position.
-
Test Stand: TestStand Engine Process
I'm looking into an application (written by someone else of course) which calls a "Test Stand Engine" to execute a test.
First thing is what is this "Test Stand Engine" ?
I have been using Test Stand GUI (Test Stand Sequence Editor) to execute such test cases in the past so I never knew what do they mean by Test Stand Engine.
The problem i'm looking into is simple.
They say that Test Stand Engine is being executed as part of a thread and my task is to make it execute in a process.
But I Can't find the actual call to test stand engine itself.
I'm on Windows box and all I can see in Task Manager => Process is TSAUTO~1.EXE which is same whether I run GUI or my application with Test Stand Engine.
What should I look for in my application code to find the "Test Stand Engine"?
Any Help?
NirvanaHi,
just to clarify that - there's two approaches to making an operator interface with TestStand.
1) Use the TestStand UI controls and manager controls or 2) Go directly to the TestStand Engine.
Option 1 actually overwraps the calls to the TestStand Engine anyway to make it easier to implement an operator interface. That's not to say that going directly to the TestStand Engine ActiveX automation server is difficult, but you have to do certain things, like shutting down in a sepcific way.
Your best other resource is the TestStand help (rather than the bookshelf pdf's) and have a look at the topic about "Writing an application with the teststand engine"
As Dennis says - you might get more help on the TestStand forums rather than the LabVIEW ones though.
Thanks
Sacha Emery National Instruments (UK)
Message Edited by SachaE on 02-22-2007 10:26 AM
// it takes almost no time to rate an answer
Attachments:
teststandHelpSection.JPG 55 KB -
I am using test stand and Labview 7.1. I used Express VIs to setup my RS232 communications in numerous VIs that I call from test stand for different types of tests. I have the same product, but with different baud rates. Is there a way in test stand to change the baud rate settings in MAX for Com1? I tried to create a Labview program to do it, but once a sequence runs that has the Express VI I/O Control it must start a new VISA session and I loose what was set up and it reverts back to the MAX settings for Com1. The only time The VISA setup vi I created appears to work is when I converted an Express VI (or opened the Express VI's front panel). And messed with the code.
Hey,
I would suggest using the VISA Configure Serial Port to configure the port and then calling the Express VI using the VISA Resource Name Out from the configure VI.
Regard,
jigg
CTA, CLA
teststandhelp.com
~Will work for kudos and/or BBQ~
Attachments:
setbaudrate.vi 36 KB -
Can we Call Custom function in Background? VERY URGENT
Hi All,
Can one one tell me can we call a custom function module in background. Is it possible or not. If yes plz tell how.
In the custom function module I am updating a data base table using UPDATE statement. Can help me on this issue.
Thanks
YathishHi,
1)
Yes..You can call a customer function module in BACKGROUND ...
Steps
1 Make the custom FM as remote enabled..
2 CALL FUNCTION 'ZFUNC' IN BACKGROUNG TASK
2) Yes..You can write UPDATE statement..
Thanks,
Naren -
Updating the result from Labveiw to Test stand!
Hello, I
have a quick question; i am using Labview 8.5 & Test Stand. I am
develeoping Test Scripts using Labview for the design & using them in
Teststand as PASS/FAIL tests. My question is when i run the tests in teststand
its showing that the tests what i have written in labview has been passed but
when i remove the connection to UUT & run the same its showing that tests
are passed. Actually at this time it should show that the tests are failed
since the connection to UUT is not present. But on the lab view window its showing
the proper result(that the is failed due to to bad connection) but on the test
stand window side its showing erroneous results i.e. tests are passed(i.e. the
result is not being updated from lab view to test stand window). What should I do to
update the result from lab veiw to testand . I have this problem from couple of
days.
Any help
would be appreciated.
Thanks.Hi basha,
Looking at your Sequence File and the Pass / Fail Step in MainSequence.
Although you have three connections on your VI FT_Open_Device_By_Sreial_Number.vi (one input, two outputs),
within your step, you haven't connected them to any TestStand variables.
I have attached the FileGlobals.Handle to the Handle output of your VI as an example.
You need to do something similar for Device Serial Number and FT_Status.
I am not sure where this top level vi comes in, are you hoping to replace FT_Open_Device_By_Sreial_Number.vi with this top level vi.
If you are then you need to connect on input and output to its connector pane. I would suggest the boolean result is one of the ouptut
Which you connect to Step.Result.Pass/Fail
Regards
Ray
Message Edited by Ray Farmer on 03-10-2008 10:04 PM
Regards
Ray Farmer
Attachments:
vi.PNG 25 KB
Specify Pass_Fail.PNG 24 KB
top level.PNG 6 KB -
Hello All,
My question is related to calling and execution of LabVIEW Vis from two or more different teststation(Test System) using NI TestStand.
Following are some definitions to understand the question better
A Test Station:is a independent sytem.different instruments(Multimeter,Function generator etc) are connected to this Station.Teststaion using NI TestStand for Test managment.
A LabVIEW :LabVIEW vis are saved at share location(server).These vis are responsible for communicating with different instruments connected to TestStation.
Execution:TestStand calls these Vis in sequene to perform particular test.
My query is to know ....Can we call and execute shared labVIEW vis from two or more TestStation simulatneously and cummunicate with connected instrument on each teststation.
Is there any possiblity of conflict as using same vis but on different station?
My concern is to avoid duplicacy of similar vis.Is there any better option to implement the same concern?
Thanks in advance
Regards:
Vaibhav Kanchan
Sr. Engineer
NI Certified LabVIEW Developer(CLD)
NI Certified TestStand Developer(CTD}I suggest you to try adding the shared vi to the labview project(.lvproj) running in same or different stations which is connected to the instrument. Adding the vi to a project will open it in the project instance instead of default application instance. Hence there won't be any conflict in execution.
Anand kumar SP
Senior Project Engineer
Soliton Technologies Pvt Ltd -
Is there any way I can convert a Test stand sequence and corresponding vi's to an executable?
I need some creative ideas on how I can convert a test stand sequence into an executable in the shortest possible time. I know that beats the entire purpose of using TestStand but I need to have a way to do this. Is there no other way i can accomplish this without writing a sequencer in LabVIEW and rewriting all of my code in LabVIEW??
There is no way i know or can think of to move all components from a TestStand application into a single EXE. Running TS in an application means that you should/must work highly unitized during developement and deployment.
In general:
-> Custom UI will become "The EXE" for the enduser. This involves the link for startup on desktop/start menu.
-> TS Engine, ActiveX Server, will be attached to the UI.EXE OS process when launched by the UI. Will never be part of the UI.EXE.
-> TS Compontens (e.g. process model, language files, ..). Will never be part of the UI.EXE.
-> Custom Components (e.g. modified process model components, reporting, ...). Very unlikely(never) to become part of the UI.EXE.
-> Custom Sequences. Will never be part of the UI.EXE, but extension can be changed to other than .seq.
-> Code modules called by custom sequences. Unlikely (but possible) to be part of the UI.EXE. Should be implemented and tested to run within the RTE (runtime engine) of the appropriate programming language. It is not par design, that the deployment system has the development environment of that programming language installed.
-> License information. TS requires at least the Base Deployment License installed and activated (requires NI License Manager software). RTE of modules might also include licensing and possibly activation fees.
Why is there the requirement to have a single, monolythic EXE (hard to handle!) at all? If it is about the deployment process, you know that you can provide a single MSI (Microsoft Installer) with all required components using the TestStand Deployment Utility?
hope this helps,
Norbert
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it. -
In Test Stand when I call a sub-VI front panel, the pop-up window goes behind all the windows and the user just waits for the screen. I want the pop-up to come to the front so that the user can know what to do. I couldn't find any property that I can set which would make the called VI go to the front.
What version of TestStand are you using? Here are the TestStand palettes in LabVIEW for TestStand 2.0 and 3.1. You can also set a VI to be modal in VI Properties>Window Appearance. Select Dialog or go to Cutomize and change the Window Behavior.
Message Edited by Dennis Knutson on 03-07-2006 10:32 AM
Attachments:
TestStand palettes.JPG 37 KB
Maybe you are looking for
-
Error while trying to import external web service in webdynpro java
Hi, I am trying to import external webservice in webdynpro java using adaptive webservice model, but i am getting below error..i tried some other external webservices but those are working fine....I wanted to know if there is any issue with this wsdl
-
new to iPhoto...is there a way to share and/or use the same library between two users of the same computer? i don't want to have to duplicate our photo collection...and my wife and i both have seperate user accounts on our macbook. is there a way to
-
NVIDIA GeForce GT650M video card and CS6 Premier Pro
How can I get CS6 Premier Pro to recognize my video card; NVIDIA GeForce GT650M? Or can it be used at all with CS6 Premier Pro?
-
Updated itunes and now ipad will not sync and itunes locks up?
i have just updated i tunes and now have issues with itunes and syncing my ipad?
-
Min date for each month from list
Hi all, I need to select only minimal date for each month from this sample query: select date '2011-01-04' as adate from dual union all select date '2011-01-05' as adate from dual union all select date '2011-01-06' as adate from dual union all select