amw253 Posted October 7, 2005 Report Share Posted October 7, 2005 I've read of the manuals that came with the LabVIEW 7.1 Developers Suite (what, no "yawn" smiley?). I'd like to define constants across all my modules, like the old-fashioned "#include" feature in a C pre-processor. I've seen examples of what I want ".ctl" files - but somewhere along the line I've missed the chapter, section, etc. that explains all this. Could somebody please tell me where it is? Thanks! Quote Link to comment
Yair Posted October 7, 2005 Report Share Posted October 7, 2005 I've read of the manuals that came with the LabVIEW 7.1 Developers Suite (what, no "yawn" smiley?). I'd like to define constants across all my modules, like the old-fashioned "#include" feature in a C pre-processor. I've seen examples of what I want ".ctl" files - but somewhere along the line I've missed the chapter, section, etc. that explains all this. Could somebody please tell me where it is? Thanks! What you want is a .ctl file which is set up to be a typedef. A typedef, unlike a standard control, will also hold on to the values you give it, so when you update the typedef, the values will be updated whereever it's called. Just search the help or the user manual for "typedef". Quote Link to comment
amw253 Posted November 9, 2005 Author Report Share Posted November 9, 2005 A followup question ... I have a subVI returning a typedef value (a ring of listed unsigned shorts), and I would like to feed that result into a case statement. However, instead of giving me options for each possible value of the typedef, I get the standard list of ("0, default", "1"). How do I specify the type of the case selector? The "?" is wired directly to the output of the subVI ... :question: Andrew Quote Link to comment
WMassey Posted November 9, 2005 Report Share Posted November 9, 2005 I've seen examples of what I want ".ctl" files - but somewhere along the line I've missed the chapter, section, etc. that explains all this. Could somebody please tell me where it is? Go to the on-line labview help and enter "customize" and select "controls". More info is here as well. A followup question ...I have a subVI returning a typedef value (a ring of listed unsigned shorts), and I would like to feed that result into a case statement. However, instead of giving me options for each possible value of the typedef, I get the standard list of ("0, default", "1"). How do I specify the type of the case selector? The "?" is wired directly to the output of the subVI ... You cannot do what you want with a ring value. You can do it with an ENUM. You could open the TypDef'd .CTL and right-click the ring control/indicator and select Replace --> ENUM followed by an "apply changes" (in the file menu) and it would then do what you want -- assuming it did not mess up other areas of the program that used the typdef. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.