-
Posts
835 -
Joined
-
Last visited
-
Days Won
49
Content Type
Profiles
Forums
Downloads
Gallery
Posts posted by MikaelH
-
-
-
Same here, I love it.
//Mikael
-
Since the device only have one internal clock it can only sample at one frequency, but you can sample on several channels at the same time.
//Mikael
-
Keep up the work on interfaces, and maybe we someday can convince NI (read AQ) to implement this for us
I did have interface working in LV 7.1 on GOOP2, where we had to have out own dynamic dispatch code in our base class methods.
Cheers,
Mikael
-
Hi all scripting fans
I don't like the build in Sorting feature of Event cases in the Event Structure, and though about creating an RCF-module for this.
But I can't read the Names/Cases from an event structure.
It's easy to do this if it's a Case Structure since you have the Property Node: CaseSel.FrameNames
But there is nothing like this what I can find (I might just be blind) for the Event structure.
Since there are methods (Invoke Nodes), to rearrange cases in the Event structure, there must be ways of reading the names/objects of every case.
Ideas?
Cheers,
Mikael
-
I suggest UML, oh I meant OO of cause ;-)
These videos haven't been officially released but could been accessed here at the moment.
www.goop.endevo.net/GDS/videos/GDSFeatures
www.goop.endevo.net/GDS/videos/GettingStarted
www.goop.endevo.net/GDS/videos/DesignPatterns
www.goop.endevo.net/GDS/videos/StateMachine
www.goop.endevo.net/GDS/videos/Debugger
//Mikael
(soon releasing the new version of GDS with some UML updated)
- 1
-
Interesting question!
If you put code inside the TimeOut case, you are screwed.
There are many different approaches here, but the easiest one I use is by using a state machine like this:
If the TimeOutCounter is zero, I wait for 1000ms before going to the TimeOut case,
else a 0 or 1 ms is wired to the TimeOut on the Event Structure, so it goes directly to the TimeOut case if no other events are in the queue.
//Mikael
- 1
-
Hi
I can’t help you much there.
The design I’m looking into is to have the class-data (attributes) as a TypeDef belonging to the class and then put it into the Data Value Reference (DVR) wire.
That then goes into the lvclass private data.
A update method could then look like this.
By using this method the dynamic dispatching will work as usually without having to put an In Place Element Structure around all abstract methods.
Cheers,
Mikael
- 1
-
So my fellow LOOPers, how do you handle this situation?
Hi
For normal/simple implementations I just tell the "public" class what type of objects it should aggregate/create as an input to the constructor, and have a case structure inside like this:
And for this design, I normally store the TestInstrument objects in a class attribute belonging to the TestInstrument class.
And with a static method "TestInstrument:GetObjectByName", I can retirve the instrument object.
But when I develop TestSystem Framwork I use the Factory design pattern.
Cheers,
Mikael
-
I'm using LV9.0 64-bit on a Vista machine but haven't tried VISION on it myself, but what I've heard it should work.
I did get some other problems for other drivers as NI-Scope that isn't supported yet.
//Mikael
-
Hi guys
We're working on it and are into to the final testing phase of it.
This should be done by next week.
I hope you can wait one more week.
Cheers,
Mikael
-
I agree, its soooo annoying , but I’m happy they changed the Shift-Right click option on a tab control that really annoyed me when upgrading to 8.6
In 8.6 you can’t get to the tool palette when Shift-Right clicking on a tab control.
-
Good on you.
Let me know when you're up for a
-
In did this a long time ago like this (only for windows).
Make a system call to "Dir nothing.txt" this will give you this result:
H:\>dir nothing.txt Volume in drive H is Data Volume Serial Number is [color="#ff0000"]64BA-5E87[/color] Directory of H:\File Not FoundH:\>
Then just parse the string
//Mikael
- 1
-
If this happens to you, give this a try and let me know what your think.
That's a good feature.
It would be good though to be able to define a Project Specific VI(s) that always is ran before you start your main VI in a Project.
Of cause I like to see the option of defining a Main VI in a project so then you press Ctrl-R from the Project Tree, it should automatically start your Projects Main VI.
//Mikael
-
- Popular Post
- Popular Post
The concept interface doesn’t exist in LabVIEW yet, but I hope that it will be added in the future.
An interface class is an abstract class that only contains empty methods/VIs.
So when someone calls this method/VI the call should be forward to the real implementation of this method in the class that implements this interface, just like normal inheritance, but instead of deriving for this Interface class the OO term is to implement this interface.
Many design patterns uses the Interface concept e.g. Command Pattern and Observer.
So how do you implement an interface in LabVIEW?
Of cause you can make your classes all inherit from the Interface class they need to use.
But is really a UUT a kind of command?
Is a Player a kind of Observer?
You should always be able to say the <child class> is a type of <parent class>
E.g. A car is a type of vehicle.
But maybe you can ignore this rule for those classes, but maybe you want to implement several interfaces, then you’d run into trouble.
The way I implement this in LabVIEW is by using an Interface Helper class.
So if I have this example where 2 different classes like to implement MyInterface.
I have to create an extra Interface child class to the Interface parent class, so I can make use of the powerful dynamic dispatch.
These are two very small classes only containing the methods defined by the interface.
So when someone calls the Update method/VI in the Interface class, that call will be directed to the Update methods in my X_MyInterafce class which only forwards the call to the Update method in the Player or Spectator class.
This way I can implement several interfaces.
I’ve made a small example code that uses this approach together with the observer design pattern ( PartII).
Project: TennisGame.zip
You need some Class VIs you get when installing GDS
Key: COMM-UNIT-YEDI-TION-2009
The main VI does these things:
- Creates the TennisBall, 2 Players, X no of Spectators
- Creates the Help classes PlayerInterface and SpectatorInterface
- These 2 help classes are used as inputs to the Ball:AttachObserver method.
- The AttachObserver method stores the reference to all observers/subscribers
- The main VI updates the Ball's position using the SetBallPosition method.
- This method sets the new positions and also calls the NotifyObserver method.
- The NotifyObserver calls the update method on all Observers that are attached.
- The Update method in the Player and Spectator class, has now been informed that the tennis ball has been moved and they update their private attribute they have of the balls position.
This might not the best way of implementing this problem, but shows how the players and spectators can be notified when something they have subscribed to happens.
Cheers,
Mikael
- 3
-
I'm now finding myself in need of a tool to parse the type descriptor of an LVClass. I can't use the flattened string data, since I'm actually parsing a reference (e.g. a Queue or Notifier reference).
Tomi has made one parser that you can find in the OpenG root class template.
I've a version of that code in one on my VIs, it looks like this:
//Mikael
-
Hi
Regarding the GDS, I've created some videos of how to use it and how to get started with OO.
These videos haven't been officially released but could been accessed here at the moment.
www.goop.endevo.net/GDS/videos/GDSFeatures
www.goop.endevo.net/GDS/videos/GettingStarted
www.goop.endevo.net/GDS/videos/DesignPatterns
www.goop.endevo.net/GDS/videos/StateMachine
www.goop.endevo.net/GDS/videos/Debugger
Cheers,
Mikael
-
Make sure you don't wire the Working directory Path!!!
//Mikael
-
Yes you can, but the execution properties has to be "Run when open".
Just type:
"c:\program files\national instruments\labview 8.6\labview.exe" "c:\test1.vi"
You can read about this in the LabVIEW Help, just serach for "Launching a VI from the Command Line"
//Mikael
-
QUOTE (rssharpe @ May 24 2009, 03:03 AM)
Very very new to Labview, I am looking for a compass rose gauge to display heading information. And 3 d display for pitch,roll,heading. Any suggestions would be greatly app.Thank you!
And you could also use the picture control and use the drawing funtions to draw your own control, I would use that for the pitch,roll,heading and then customize a Gauge control to create the compass.
//MIkael
-
QUOTE (Michael Aivaliotis @ Mar 28 2009, 07:36 AM)
I apologize in advance if this has already been mentioned. Sometimes, when I'm creating a Data Member Access VI, I end up with a new broken VI. The problem is the new input or output terminal is not wired to the bundle or unblundle node and it is not wired to the terminals. See image:I notice this happens mainly when I'm selecting a subcluster of a larger data cluster.
If you try the Add Method->Property Method using the GDS toolkit, does it them work?
Cheers,
Mikael
-
Could you first answer these questions:
What result are you after?
Do you what to see if there is a exact match, or just get a value indicating how good the match is?
And also could you give me some real data to play with. E.g. save the 2 waveforms as "Make Current Values Default".
Cheers,
Mikael
-
Hi
The content of the Data (dat) file is not correct, the While loop never terminates.
What result are you after?
Do you what to see if there is a exact match, or just get a value indicating how good the match is?
One solution could be to find the peaks in the different waveforms and compare the locations of these peaks.
You could add a LowPass-Filter and then compare the waveform as you did in your code.
Cheers,
Mikael
Data Entry Problems
in LabVIEW Bugs
Posted
Hi
My version of LabVIEW is behaving odd when it comes to Data Entry limits.
Have YOU seen the same problem?
When I open the “Data Entry…” option for a numeric the first time it does show me the right limits for that control.
When I open the same option for the next numeric control these values don’t show the correct values.
They still show the first opened control’s Data Entry-limits.
And if I change the values, that values changes for the other control not the one I open the dialog from.
This is in LabVIEW 8.6
Cheers,
Mikael