04-20-2011 04:09 AM
Dear All,
I am a beginner to labview and programming in general. I am reading someone elses code and I wish to know how I can determine the type of the variables he has specified? I would also like to be able to find out the properties of the type ie the functions available to it. Is there a way to do this?
Thank you
ALex
04-20-2011 05:01 AM
ususally i use 3 data types (in common) i.e string(purple wire), numeric (orange or blue wire based on data type) and boolean (Green wire). (now there is LVOOP with which the above concept of color gets blown off so i am not much bothered to explain about the same). If you form a cluster then you will end up with brown or purple color (if i have not mistaken)
So once you know what type of control or indicator, you can right click on that particular inidicator or control and create something called as "property nodes" to se all the property that are attached (like visible propery ot value property and so on)
I hope i answered your question
Guru
04-20-2011 07:31 AM - edited 04-20-2011 07:32 AM
The easiest way to see the data type of a wire or control is to hit Ctrl-H to bring up the context help, then click on what you are interested in. The data type will be shown in the help window.
04-20-2011 10:02 AM
@DFGray wrote:
The easiest way to see the data type of a wire or control is to hit Ctrl-H to bring up the context help, then click on what you are interested in. The data type will be shown in the help window.
You don't even need to click. Simply hover over a wire or terminal while watching the context help window.
(browna: You did not say want LabVIEW version you are using. On older versions, the contect help for terminals does not show the datatype).
@browna wrote:
I would also like to be able to find out the properties of the type ie the functions available to it. .
Many functions are polymorphic, and accept several datatypes. For example most boolean functions accept boolean scalars and arrays as well as integers, where in the case if integers the operations are performed bitwise.
Sometimes easiest is to just try to connect. if the wire is not broken, the datatype is accepted. 😄
If you show us some code under question, we might be able to provide more detailed help.
@browna wrote:
I wish to know how I can determine the type of the variables he has specified?
The word "variable" is a bit tricky in LabVIEW, because they are not the same as with text based programs. Typically the wire is the variable and controls and indicator terminals provide a connection to the user interface. In rare instances, you might need local variables, which are basically just secondary access points to a terminal. LabVIEW also has shared variables, global variables, etc. for advanced functionality.
Can you explain in more details what you actually mean by the word?