NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member BSI
Member
BSI
Posts: 187
0 Kudos
Accepted Solution

How to invoke a Workspace tool from Labview using the VS API?

[ Edited ]

I thought I had seem how to do this in a previous post..but no trace of it so far... Is there a .net call that can be used to launch a VS Workspace tool from LV ? 

Thx.

L.

Active Participant
Devin_K
Posts: 305
0 Kudos

Re: How to invoke a Workspace tool from Labview using the VS API?

This functionality is part of the Project API in NIVS 2010+.  I don't know of any examples, but in 2011 there is a LabVIEW wrapper for this function on the palettes under NI VeriStand >> Execution >> Project >> Workspace Automation.  Unfortunately there is no VI wrapper for it in 2010, but it still exists in the .NET API.

 

In addition to launching Workspace tools, you can also send messages to them with the "SendToolMessage" method. You can see an example of how to handle these messages in the example Workspace tool located at:

 

<LabVIEW>\examples\NI Veristand\Workspace\Workspace Tool Example.vi

Devin K
Systems Engineering - RTT & HIL
Member BSI
Member
BSI
Posts: 187
0 Kudos

Re: How to invoke a Workspace tool from Labview using the VS API?

Ok, that sounds like a potential solution. What are the Workspace Tool Path though? For instance I want to launch the Channel Viewer tool.

L.

Active Participant
Devin_K
Posts: 305

Re: How to invoke a Workspace tool from Labview using the VS API?

[ Edited ]

Ah, good question.  The default tools are actually built into NI VeriStand.exe, so there's not an easy way to get the paths.  This was actually brought up in another thread you posted.  Have a look at Jarrod's response for some caveats to keep in mind.  His response also shows the current path for the TDMS Data Viewer.

 

The paths aren't documented, so if you need a specific tool, you're going to need to contact support so they can talk to R&D and get the path.  For your question though, the Channel Data Viewer is:

 

C:\<Program Files>\National Instruments\VeriStand 2011\NI VeriStand.exe\NI VeriStand\Workspace\Tools\Channel Data Viewer.vi

(where "<Program Files>" is either "Program Files" or "Program Files (x86)", depending on your operating system)

Devin K
Systems Engineering - RTT & HIL
Member BSI
Member
BSI
Posts: 187
0 Kudos

Re: How to invoke a Workspace tool from Labview using the VS API?

Thanks Devin, it worked.  Now I remember... this sounded familiar.

Laurent

Active Participant
Jarrod_S.
Posts: 1,346
0 Kudos

Re: How to invoke a Workspace tool from Labview using the VS API?

If you are calling the API from LabVIEW, you don't need to pass in the full path for a built-in tool such as the Channel Data Viewer. You can simply reference it by the path "Channel Data Viewer.vi". Unfortunately this doesn't work from the Stimulus Profile Editor function call, but it does work with LabVIEW.

Jarrod S.
National Instruments
Member
joshe
Posts: 41
0 Kudos

Re: How to invoke a Workspace tool from Labview using the VS API?

I would like to be able to launch the Stimulus Profile Editor in VS2011 from a LabView App. Can I do this?  If so how?

 

Thanks!!

Active Participant
Jarrod_S.
Posts: 1,346

Re: How to invoke a Workspace tool from Labview using the VS API?

If you are referring to the new Stimulus Profile Editor in VeriStand 2011, it is an application that you can launch using the System Exec function in LabVIEW. It's located in Program Files next to NI VeriStand.exe.

Jarrod S.
National Instruments
Member
joshe
Posts: 41
0 Kudos

Re: How to invoke a Workspace tool from Labview using the VS API?

Thanks!! I guess I need to poke around more in VeriStand.

Member
joshe
Posts: 41
0 Kudos

Re: How to invoke a Workspace tool from Labview using the VS API?

Is there a way to detect if the Stimulus Profile Editor (or any exe for that matter) is already running?  I can do it with VIs, but don't see how to do it with EXEs launch from the System EXE.vi.

 

Thanks!!

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page