06-11-2009 02:38 AM
Hello,
I’m a trainee and new user of labview since 2months. I work on a labview application which controls in real time 4 PXI devicesinstalled on a national instrument bench in order to test electronic boards.
At the bottom an outline of the application, there isalso an IHM.
My concern is to be able to control the inputs(Bool and Double) and the outputs (Bool) by another application. (For examplewith Teststand or with another application) In order to run automated tests.
For the moment the user have to fill all ofthem step by step and it is too long.
Maybe by shared memory. (If yes have you got anexample with the labview part and the other part C, C++ or with Teststand)
If the communication is easy with Teststand,the company would buy the license directly.
I started to do this exchange thanks to txt-files(one by output and one by input) but I think that will largely slow down theapplication.
Would you have tracks?
Thank you very much and good continuation
Jocelyn Gate
Trainee Schneider Electric
38000 Grenoble FRANCE
06-11-2009 03:14 AM - edited 06-11-2009 03:15 AM
06-11-2009 03:27 AM
Thanks,
I already have this document, it was the first one a read.
And I have not found my answers.
Have a nice day and good continuatiion
Schneider Electric
Grenoble 38000, FRANCE
06-11-2009 03:38 AM
Do you know how to use TestStand?
You need to call the VI in TestStand Sequence & pass parameters from it & read the outputs back from LV.
I think this would be a more appropriate forum to search for the answers you want.
06-11-2009 05:29 AM
06-11-2009 06:43 AM
Thanks,
I've build an exe file from my .vi and I have not found how to drive it whitout labview just using another application as a c,c++ application or Teststand.
Is it possible?
Have a nice day
Jocelyn Gate
Schneider electric
Grenoble 38000 FRANCE
06-11-2009 07:00 AM
Jocelyn,
You problem description in your latest reply is not clear to me.
You can run your EXE developed using LV, in another PC without LV. All you need to do is to have the corresponding version of the LV run-time engine [RTE] installed in it.
If you want to call your LV-built EXE in that another application, there are quite a few ways. AFA TestStand is concerned, you can call your LV application either as code (VI), or DLL or EXE.
For C/C++, I think DLL is the best option. I m not 100% sure, since I dont have practical exp in that till now.
06-11-2009 09:13 AM
06-11-2009 09:19 AM
I think there is a misunderstanding on how sub-code called from another program. This applies to just about all programming languages not just LabVIEW.
When you call some sub-code you pass it all it’s input up front when you call it. The sub-code goes and does what it is to do without any other input from the calling code. When the sub-code is done it stops and returns any output back to the calling, but not until then. Normally there is NO interaction between the call-er and the call-ee while the sub-code is running. In fact the calling code normally goes to sleep and waits for the sub-code to finish.
With that said there are back door ways to communicate with running sub-code, but you have to create the paths into and out of your sub-code. Something that is beyond this reply.
What I think you need to do is to break up you VI into many smaller function calls that do just ONE thing and returns the results. Then your calling program (TestStand) can call each one as needed, pass it any input that it needs and then get back any results.
From what I can see from your VI you have created a stand alone with controls on the front panel that seem to be design by you to rely on a human operator to click on button or fill in a number. This method is not suited for calling from another program you need to rethink your design.
You design code from the start to be call from other programs
OR
You design code from the start to be used by a human operator
Separate your human operator code from the part that actually does the work.
Bundle to working code into a DLL that can be called from other programs like TestStand or C.
Then create your own GUI to call the working code when you want to use it as stand alone (human operated).
Omar