VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

workspace objects channel info

I am creating a workspace object using Labview 2011.

 

Once the object is placed in the workspace and the channel is selected, I would like to be able to programmatically make decisions based on the selected channel. Is there a vi somewhere in the Veristand API that provides channel info from the existing workspace objects?

 

If not, does someone have a method for extracting that info?

 

Thanks

0 Kudos
Message 1 of 15
(6,844 Views)

You may use the "get alias" or "get system node children" to retrieve channels from the running gateway.

0 Kudos
Message 2 of 15
(6,834 Views)

It looks like those two vi's return the whole list of channels. I'm interested in identifying which specific channel was selected for the workspace object.

 

To clarify, bear with me...

 

When an object is placed on the workspace a dialog pops up that allows the user to browse for a channel to associate with that object. In the code that I'm writing for the custom object, I want to make a decision based on what channel the user selected. The vi that generates the pop up dialog does not provide that as an output and it doesn't appear to be something that would be easy to dig out of there. So I thought there might be a vi in the Veristand API that allows you to look at what specific channel was selected for a particular workspace object.

 

Thanks

0 Kudos
Message 3 of 15
(6,824 Views)

Pmac,

 

We don't have the exact functionality you are looking for currently impletment but the screen file is just a xml document that you could parse to find out this information. It isn't the easiest to look up but if you add things one at a time your should be able to watch all the changes and pull out the corresponding data. 

 

Feel free to post the idea to the idea exchange

http://forums.ni.com/t5/Additional-NI-Software-Idea/idb-p/nisoftware/label-name/veristand

 

Thanks,

Kyle Hartley
Senior Embedded Software Engineer

0 Kudos
Message 4 of 15
(6,794 Views)

Kyle's suggestion won't work, unfortunately. The screen file is XML, but the data about the controls on the screen is encoded binary data. You would not be able to make sense of it.

 

We don't have any APIs to get the data that you want. You could create your own control based on the Decoration - Free Label template, or perhaps one of the controls on the VeriStand add-ons page. This provides a lot more flexibility, but you also have to program more yourself, such as the configuration dialog, because the custom control template does not provide this.

Jarrod S.
National Instruments
0 Kudos
Message 5 of 15
(6,792 Views)

Thanks for your replies.

0 Kudos
Message 6 of 15
(6,777 Views)

pmac,

 

I was recently contemplating a similar scenario and a helpful Applications Engineer was kind enough to point me to this:

 

NI VeriStand Add-On: Channel Select Dialog

 

Works like a charm and I think it will get you a long way towards the custom workspace object you're looking to create.

Chris
Project Engineer
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 7 of 15
(6,723 Views)

It looks like that does get me closer to what I'm trying to do. I'll give it a go.

 

Thanks

0 Kudos
Message 8 of 15
(6,712 Views)

I put this on the block diagram of my custom object (per the installation instructions) and tied an indicator to the "Channel Path" output. When I drop the custom object on the workspace I get a .NET exception dialog telling me basically, that a referenced item does not exist.

 

Did you see this error or am I doing something wrong?

 

Thanks

0 Kudos
Message 9 of 15
(6,697 Views)

Sorry, I forgot to mention something about that tool:

 

When I downloaded it, it was not working properly, I had to edit it slightly.

 

undefined

 

I then had to feed the VI my custom device reference as an input.  The .NET API probably changed slightly from when this was first built.

 

Sorry for the omission!

Chris
Project Engineer
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 10 of 15
(6,695 Views)