LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to control & read labview application input and output using testand or an other application

 

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

  

Labview application

 

0 Kudos
Message 1 of 9
(3,422 Views)
Just reading your title, I think this would be helpful.
Message Edited by parthabe on 06-11-2009 03:15 AM
- Partha ( CLD until Oct 2027 🙂 )
Message 2 of 9
(3,416 Views)

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 

0 Kudos
Message 3 of 9
(3,412 Views)

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.

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 4 of 9
(3,408 Views)

Wow!  That is a large Block Diagram!

 

I don't know what else to say...

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 5 of 9
(3,401 Views)

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 

0 Kudos
Message 6 of 9
(3,392 Views)

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.

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 7 of 9
(3,388 Views)
And making it an exe to be controlled by TestStand is just plain silly, imho. To be truthful, the whole VI seems poorly written with all of those individual Booleans. It also seems that whoever wrote it, never heard of subVIs.
0 Kudos
Message 8 of 9
(3,381 Views)

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

Omar
Message 9 of 9
(3,377 Views)