07-19-2013 02:05 PM
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!!
Solved! Go to Solution.
07-19-2013 02:28 PM
Check this out:
"C:\Program Files (x86)\National Instruments\LabVIEW 2012\examples\NI Veristand\Workspace\Workspace Tool Example.vi"
10-18-2013 11:41 AM
I was able to get the sysdef from the file without deploying VeriStand using the following snip.
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!
10-18-2013 11:46 AM
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.
10-18-2013 11:53 AM
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.
10-18-2013 02:31 PM
after the channel has been selected you should have a .NET reference to that channel.
You can then cast the node to channel type and get its writable property
10-18-2013 05:34 PM
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?
10-21-2013 10:29 AM
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
11-14-2013 09:56 AM
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!!