VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

.net or VI for system def channel viewing like in profile editor

Solved!
Go to solution

I would like to use the .net or vi that is used by the stimuluos profile editor to view the system def channels and select them.  I am developing a Labview program and would like the ability to view a system def file and select a channel or group of channels from it.  I can do this while veristand is running the sys def, but I want to do it off line by just using the system def file.  The Stimulous Profile editor does this and I would like to copy this ability.  Is there a .net that does this or a Vi.  If so please let me know where and what it is called.

 

THANKS!!

0 Kudos
Message 1 of 9
(7,233 Views)

Check this out:

"C:\Program Files (x86)\National Instruments\LabVIEW 2012\examples\NI Veristand\Workspace\Workspace Tool Example.vi"

Stephen B
0 Kudos
Message 2 of 9
(7,231 Views)

I was able to get the sysdef from the file without deploying VeriStand using the following snip.

 

snip1.png

 

Later in my code I want to find out specific VS channel attributes like is the channel readable or writable.  Originally I used the built in NI Veristand - Get System Node Channel List.vi, but since I don't have a workspace manager running I get an error when I access this.  Looking in the Get System Node Channel List.vi I see that the ClientAPI.IWorkspace2 is used to get the channel list as ClientAPI.NodeInfo that the channel attributes are contained in. Since I only have the SystemDefinitionAPI I am stuck.

 

Is there another way to get this information from the SystemDefinitionAPI?  Can I use the ClientAPI.NodeInfo without the Workspace running? If so, how?  I have been experimenting, but can't seem to find the info I need.  Please help.

 

Thanks!

0 Kudos
Message 3 of 9
(7,023 Views)

Yes you can get any information about the system with that .NET API. Can I ask why you're trying to find that information? What is your overall goal? This will help guide.

Stephen B
0 Kudos
Message 4 of 9
(7,018 Views)

I have developed a labview based GUI for VeriStand.  Part of the GUI is the ability to connect Labview controls and indicators to VeriStand channels.  If a LV control is mapped to a readonly VeriStand channel I want to catch that and warn the user.

0 Kudos
Message 5 of 9
(7,016 Views)
Solution
Accepted by topic author joshe

after the channel has been selected you should have a .NET reference to that channel.

Capture.PNG

 

You can then cast the node to channel type and get its writable property

get read only.png

 

Stephen B
0 Kudos
Message 6 of 9
(7,013 Views)

Thanks!!!  Just had to find the Channel Type ref then it worked.  Still so much to learn about these API .NET things. Is there some documentation out there for these or is it still use at your own risk?

0 Kudos
Message 7 of 9
(7,006 Views)

The System Definition API is fully documented and supported. See the NI VeriStand .NET API Help CHM (search in start menu/screen). However... the "System Storage API" which you have to use inside workspace controls or with those .NET controls is unfortunately not supported or documented. Thankfully they are pretty similar and once you figure out the workflow its not that bad

Stephen B
0 Kudos
Message 8 of 9
(6,976 Views)

I have another related question on the SystemDefinitionAPI.  I am trying to pull information out of my Sys Def file for documentation purposes, and am having an issue with calculated channels.  I find my Calculated Channels node and get the children, and then cast it to CalculatedChannels type, I then use the Downcast Property to cast it to a Formula type.  The Formula has variables (channels) that are used in the calculation (seen in the system Definition Explorer), but I can't find any property or method to extract them.  How do I get the variable name and channel path for the calculated channel formula?

 

Thanks!!

0 Kudos
Message 9 of 9
(6,796 Views)