Tomi Maila
-
Posts
849 -
Joined
-
Last visited
-
Days Won
9
Content Type
Profiles
Forums
Downloads
Gallery
Posts posted by Tomi Maila
-
-
Tomi> The discussion in this thread insipred me to post an article on recursive types to my blog at ExpressionFlow.
robijn> PS Very clear article Tomi !
Thanks I promised to keep posting on challenging subjects as well Let's see if LabVIEW 10.25½ includes recursive types
-
QUOTE(Gavin Burnell @ Jan 8 2008, 12:07 PM)
Has anyone out there succeded in adding an XNode to a LabVIEW class ?I don't think it's possible to get XNodes to even work with LabVIEW classes. LabVIEW simply crashes when a class type wire in connected to an XNode. At least this is my experience. Do you have some knowledge that would allow using XNodes with LabVIEW classes? I would really love to use XNodes with LabVIEW classes.
-
The discussion in this thread insipred me to post an article on recursive types to my blog at ExpressionFlow.
QUOTE(Aristos Queue @ Jan 7 2008, 04:06 PM)
Care to contradict?No.
-
QUOTE(Aristos Queue @ Jan 6 2008, 09:10 PM)
There is no programming language in existence that allows this. None.Actually there are languages that allow recursive types without reference mechanism. However I think at least in eager languages there must be a mechanism to end the recursion. Lazy languages could possibly allow infinite recursion that simply is not evaluated until needed. C++ pointer mechanism that AQ referred to is one way to end the recursion. Anohter way to end the type recursion is to allow a variable to be of type 1 or type 2. Let's use symbol '|' to denote for this type of or. Then we can define a recursive class
Class A(y) {x : A | Nothing= y}where the class A has a variable x that can either be of class A or of class Nothing. The class Nothing is a empty Class with not functions and not private data. We now can define a few variables of class a.
a1 : A(Nothing);a2 : A(a1);a3 : A(a2);A lazy language could have something like this
ClassNaturalNumber(initialValue) {next:NaturalNumber(initialValue+1)functiongetValue{ returninitialValue}}The constructor parameter initialValue is a number that is passed to the class when created. We assume that constructor parameters are stored byt the language as a class private data automatically. The class has a private data called next. However next not initialized until referred to; lazy languages compute data only when the data is actually needed. Now we can define all natural numbers the following way
naturalNums = NaturalNumber(0); // initialize class NaturalNumber with constructor parameter 0.We can get the three first natural numbers with the following lines
naturalNums.getValue; // returns 0naturalNums.next.getValue // evaluates initialValue (1) of naturalNumber.next and returns itnaturalNums.next.next.getValue // evaluates initialValue (2) of naturalNumber.next.next and returns itSo to conclude, AQ, never say never;)
APPENDIX - Notation
Class definition:
Class ClassName(list of constructor parameters) {
class body...}
Function deifinition;
function functionName(list of arguments)
{
function body...}
Variable definition:
varname : VarType | AlternateType | AlternateType [= initial_value]
Variable definition with constructor parameters:
varname : VarType(constructor arguments)
Class construction:
- Class argument list is stored as if it was private data.
- Class body is executed
Edited several times, last edit at 8.17 pm GMT
--
Tomi
- Class argument list is stored as if it was private data.
-
Actually one thing came into my mind. Opening a web page using ActiveX intefrace may be a security issue. As a result it may be that some security software such as virus protection or malware protection may disable this feature from Windows. So I suggest you investigate if disabling your virus protection has an affect to this HTML help issue.
Tomi
-
My machine, where everything works properly, doesn't have NI drivers installed. Could there be something installed with NI driver CD that could mesh up with things?
-
When I open help for Dictionary Create with LV 8.5 on Windows XP, a new Firefox 2.0.0.11 tab is opened and the following file shown
file:///C:/Program%20Files/National%20Instruments/LabVIEW%208.5/help/OpenG/dictionary/Dictionary_Create.htm
So I guess it works for me.
Tomi
-
Thank you all! I really enjoy your company, otherwise I wouldn't have made that many posts Don't stop keeping interesting discussion going on... I'll keep up trying to participate these discussions regularily and I also try to occasionally keep posting thse hurts-the-brain issues.
-
I wrote a subVI for LabVIEW 8.0 and later that should be able to set the process priority class of LabVIEW application instance under Windows 2000, XP, 2003 and Vista. Download File:post-4014-1198863975.vi
-
QUOTE(Jim Kring @ Dec 27 2007, 12:35 AM)
Then you should set the XP process scheduling system to work the same way as in Windows 2003 server where the front most processes don't get extra "boost". The instructions how to disable the boost for front most applications can be found for example in this blog entery. The blog also instructs how to modify the time slice used for process scheduling. Surely you can also run your LabVIEW apps under Windows 2003 server as well if you don't want to use the tricks. If you don't need to do this programmatically, you can disable the front most application boost from Control Panel -> System -> Advanced -> Pefromance -> Advanced -> Processor Scheduling.
The second thing you may want to do is to set your application priority above normal. This can be done by calling the Windows API function SetPriorityClass. I don't know if LabVIEW uses this API directly as well to set the priority of different scheduling systems. You propably can call this function directly from LabVIEW by configuring call library node to use Kernel32.dll. Also take a look at these lecture notes, beginning from page 30 the Windows XP process scheduling system is covered.
I must confess I've never used these tricks, I just know they exist. So you're on your own if you try these. Please report if you had any success.
Tomi
-
Jim, do you need background application performance or front most application performance or both? Windows XP is optimized for front most application performance whereas Windows 2003 server is otpimized for background application performance.
-
-
I'd like to thank all LAVA members for another amazing year. To spend your christmas holidays ExpressionFlow has developed you an amazing LabVIEW Block Diagram game for LabVIEW 8.5. I wish everyone Merry Christmas and Happy New Year 2008. Enjoy your holidays.
Tomi
-
-
In LabVIEW 8.5 there is something called Native 3D Graph under the folder
LabVIEW 8.5\Native 3D Graph
Anyone has any experience with this package? Is this something supported or something forthcoming that was accidentally included into the build? Seems interesting though, especially the 3D XControl. Though I'd like to be able to draw multiple surfaces and set suface properties such as transparency for each surface separately.
Tomi
-
I've not coded our own Matlab tools by myself. However I checked how do we open ActiveX automation and it seems that for Automation Refnum input of Automation Open node we use constant to automation class MLApp.DIMLApp. Is this the same class you are trying to open an automation refnum for?
Tomi
-
This is one of those features that can be implemented with XNodes.... Simply use AugmentSelf ability to connect your XNode to the stop terminal of a loop and even place your XNode on top of that stop terminal so that it hides the original stop terminal.
-
There are a few alternatives to call Matlab code directly from LabVIEW. First in the latest LabVIEW version 8.5 there is a new structure called MathScript node. This structure can execute Matlab scripts directly within LabVIEW. However not all Matlab functionality, especially toolkits are available. Then there is an older structure called MATLAB Script node that uses ActiveX under Windows to communicate with Matlab installed on your computer. Third option is to call Matlab directly via the ActiveX interface. Refer to Matlab documentation to find out how the ActiveX interface can be used to call Matlab from external programs.
-
QUOTE(mballa @ Dec 13 2007, 09:13 AM)
I had two vis with the same name "Build FLD Record". One owned by a class and one that wasn'tIf I were to remove the owned one from the class lvlib I would have two vis with identical names.
If this is the case then you can simply rename the VI you want to remove and then remove. What always works is removing items from a class by editing the .lvclass file with a text or an XML editor. This never fails
Tomi
-
It seems I've missed this topic. There is a simple workaround. Simply open the .lvclass file with a text editor and remove the lines in the items in memory section within the lvclass XML file. Next time you open the class, everything works smoothly.
Tomi
-
QUOTE(shoneill @ Dec 12 2007, 10:21 AM)
How does one actually create multiple constant instances of a Class with different content without creating a new Class?At least in LabVIEW 8.5 you can copy a value of a class control or indicator from right click menu and then paste it to a class constant, control or indicator.
-
My appologies Mike, but I'm annoyed by the fact that each time I open LAVA, I hear this bing sound cause of your post.
-
QUOTE(Paul_at_Lowell @ Dec 11 2007, 07:11 PM)
What does a black border on a class (LVOOP variety) indicator mean? (Usually the border is gray, as in the first example, but sometimes the border is black--see the second example. I vaguely remember reading somewhere what this means, but I can't remember where.)I think it means that the value of the class constant differs from the class default value.
-
You don't need to place all VIs within the executable but you can also add VIs outside the executable into one or more support folder. If this is not a problems for you, then you can add your VIs you need to list into a support folder and list the content of that folder. I'm not sure if the content of LabVIEW executable is listable. If it is, there is no guarantee that it will remain such in future LabVIEW versions. So to play safe, you shouldn't rely on listing the content of the executable. Another thing you can do is to store the names of the VIs within the executable into an external file. Then use this file to get the list of the VIs in the executable.
Programmatically "Discard Event" in an event structure
in Application Design & Architecture
Posted
There are two types of events 1) static events and 2) dynamic events. Static events are directly subscribed by the event structure and cannot be unregistered. Dynamic events on the other hand can be registered and unregistered as you wish. When an event is registered, it can be catched with event structure. When an event is unregistered, it will be ignored by the event structure. To register events, use register for events node and wire your boolean control reference as the event source. To unregister events, use the same node but this time use existing dynamic event registration refnum and wire null reference to the to the event source input. So actually you change your event to listen to a non-existing boolean button instead of your real one. Then you can change it back when you feel like it.
For more details see an example VI Dynamically Register for Events.vi shipped with LabVIEW located in labview\examples\general\dynamicevents.llb
Cheers,
Tomi