|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Robot Global Data VI -- organizing separate cluster/data type
I would like to organize my Global variables that can be better, making future changes and sharing with other programmers cleaner. So, for certain task/control systems I decided to create a cluster for each on Robot Global, ie.. Cluster for Accelerator controls/indicators, robot arm controls system, ect...
I am having trouble modifying/using these clusters. I am not sure if I am doing it correct? Also, do I make clusters in Robot Global VI a type def, strict type def? If yes, how? Can someone assist how you arrange / organize you Global Variables? Easy to read, share, modify further down the road? Thanx Mark |
|
#2
|
|||
|
|||
|
Re: Robot Global Data VI -- organizing separate cluster/data type
The key to having the SW adapt to type changes is to use a typedef or strict typedef.
Strict Typedef: any modification to the control definition is propagated (including visual styling, color, etc.) Typedef: datatype changes are propagated (color, size, style is ignored) Neither: no automatic updates, no master definition file. A global is simply the storage, and can be any of the above. The read and write to the global will always update, but data flowing through the connectors to subVIs and types that you want to match will be more convenient using typedefs. Clusters group the data values together and guarantee that all values are read or written at the same time. If you group elements that update at different rates or locations in the program, you can actually make it more difficult by grouping them into a cluster. So, in summary, these three distinct features are for somewhat uses. I think you are probably more interested in using typedefs than the others. Greg McKaskle |
|
#3
|
|||
|
|||
|
Re: Robot Global Data VI -- organizing separate cluster/data type
Thanx Greg
Sounds like it will not be a good ideal creating clusters in Global VI.... Correct So, when will be the correct time creating type def? Maybe when using a state machine? Mark |
|
#4
|
|||
|
|||
|
Re: Robot Global Data VI -- organizing separate cluster/data type
There is very little overhead for using a typedef. For debugging purposes, I believe that the files are actually downloaded sometimes, but it is a matter of choice and development habits. There is a small time cost to making typedefs, but as your code evolves, most of those will be smoother if you use a typedef than if you did not.
My own habits are to use typedefs when it is code I intend to keep, but if I'm doing a quick prototype I will not. If that prototype turns out really well and I'm going to keep it, then making the typedefs is an easy step. Greg McKaskle |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|