Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/30/2009 in all areas

  1. Just to prove that it is technically possible: Yes, programmaticly: Sorry for not closing references, etc.
    4 points
  2. I am creating a MAP of all the location I plan to visit at NI Week and thought it might be useful to those who are new to Austin. Feel free to add location that you want others to be aware of.
    2 points
  3. I begged. I pleaded. I failed. "The project is for file organization, not for defining a single application." But if someone wants to lobby for this, I'd back it in a heart beat. I've kept "ctrl+shift+R" open just in case we need a "Run the VI that my current project has marked as the top-level VI" shortcut key. And, while I'm dreaming, we could even mark *multiple* VIs as the top-level or start up VIs, maybe some of them are on other deployment targets, and hitting ctrl+shift+R could deploy as needed and kick them all off and running. Whoa... a whole new flavor of uber-geek nirvana.
    2 points
  4. To avoid this problem I never set my VIs modal in the VI properties, VIs to appear modal set themselves "modal" when they are called and set themselves back to "normal" after execution. But I like your VI, it's a nice way to solve this issue .
    2 points
  5. Here is a quick demo of an x-control I threw together. There is an issue with changing the value and being able to change the state (Pressed or Unpressd) If you want both operation to be done by a left mouse click. I’ve thought of 2 way to maybe solve this issue. The first way would be to create a click zone and when the user is ready to change states he left clicks in that area. The click zone needs to be reasonable distance away from the knob pointer so the proper operation will happen. The second method would be to use a left click to change the value and a right click to change the state. I’ve implemented both methods in this xcontrol. Xcontrols are a bit of a pane to work with if you are new to LabVIEW so I also included the basic code in the demo. Use the best one for you. Let me know how it works out Mark Click and rotate.zip
    1 point
  6. I don't have any real answer for you, but if you add a wait of a couple of seconds between opening the FP and running the VI the error doesn't occur. If you debug the actual error, you can see it's an error 97 in the first property node, which is a null refnum. I'm guessing that you're correct and that there's a race condition somewhere. Basically, I guess the ActiveX object needs enough time to be initialized after being "dropped" before you try to access it. You might be able to add the wait to the XControl's Init command to encapsulate it.
    1 point
  7. Its possible, GOOP Developer is a LV7.1 executable that communicates to any version of LabVIEW development environment from LV6.1 up and gets it to perform scripting operations. It does this by using agent vi's which are called into the development environment by the executable to do the scripting.
    1 point
  8. I've knocked up a bit of a demo that I think will help you out. Its based on a Queue Driven State Machine architecture that executes a script. I've written a simple script that will demonstrate how it works, shown below. status:Test Start wait:1 temp_ramp:0.5 temp_setpoint:10 status:Waiting for ramp 1 completion temp_rampcheck wait:60 temp_ramp:1 temp_setpoint:20 status:Waiting for ramp 2 completion temp_rampcheck wait:60 temp_ramp:1.5 temp_setpoint:30 status:Waiting for ramp 2 completion temp_rampcheck status:Test Complete End When executed the script tells the system to display the status "Test Start" then 1 second later it sets the ramp to 1 deg/min and the setpoint to 10 deg, updates the status to display "Waiting for ramp 1 completion" and then waits until the ramp has completed when it hits the "temp_rampcheck" command. Once the ramp is completed it waits 1 minute and then moves into the next ramp sequence, ie ramp up to 20 deg at 1.5 deg/min. When all ramps are done it then displays to the user "Test Complete" Have a play, this is only a demo but you can expand your other HW into it and build your system from it. The demo implements OpenG library components which I have packaged. Use VI Package Manager to unpack the Packages.vipc file. TempControllerDemo.zip Hope this helps
    1 point
  9. Hello, Remember that you are limited only* by your imagination LabVIEW has a function in the "File function" Palette to list the content of a folder : So you can use it to get the content of your folder and then use a while loop to read each file : Of course you can then add improvements to only read text files, etc.. Hope this helps *: well.. almost..
    1 point
  10. Interface 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
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.