Jump to content

Jeff Plotzke

Members
  • Posts

    144
  • Joined

  • Last visited

Posts posted by Jeff Plotzke

  1. I'm developing a UI for a LVRT system to be run on a remote front panel. I need to allow the user to use a button to open a valve in increments. Each time the user presses the button, the valve opens a set amount. However, I also need to allow the user to hold down the button and the valve will continously open at a certain rate until the button is released.

    My problem is that it seems that LVRT doesn't support the two boolean mechanical actions that I need: Switch/Latch until released. The other four actions only allow the button to trigger once and doesn't support the user "holding it down."

    Does anyone know of a way around this problem? Thanks!

  2. QUOTE(van18 @ Feb 13 2007, 08:50 AM)

    There is only one A/D in the card the Channels are multiplexed. If you set up a task in MAX for continuos sampling or even N number of samples, and run that in parrallel with another task, one will get the A/D First and the other will not be able to access it. The answer is to not do continuous sampling do N number and use a semaphore. Use obtain and release before and After read this will allow sharing of the resource.

    If you can read both analog channels in the same place of your code, you can put both channels in a DAQmx Task and read them using a DAQmx Read. The task will handle the resources so you won't need to worry about doing the locking yourself (assuming that you're only reading the task in one place).

  3. QUOTE(alnaimi @ Feb 12 2007, 05:17 PM)

    I have so silly question but plz i need it :$ :$

    how can i apply virtual input to labview??? i mean i am using DAQ i need to output sinwave to real oscilscope but teh input will be virtual how?

    Are you having a problem with creating the sine wave or setting up the channel? What have you done so far and what's giving you the problem?

    To create a simple sine wave on a DAQ channel, I'd check out the example:

    C:\Program Files\National Instruments\LabVIEW 8.2\examples\DAQmx\Analog Out\Generate Voltage.llb\Cont Gen Voltage Wfm-Int Clk.vi

  4. QUOTE(vee_yar @ Feb 12 2007, 09:10 AM)

    but I am unable to calculate heart rate from the ECG waveform.I want to display heart rate(BPM) on the front panel while the VI is running(real time heart rate display).

    Here's a few suggestions I have for your VI:

    You're calculating the heart rate based on finding peaks each time this loop runs. However, this loop will execute every 0.1 sec (It's timed by your DAQ acquisition -- Continous samples at 1kHz, grabbing 100 at a time). So, right now you're assuming that you're going to find two peaks in your data each iteration of the loop... This means that you'll need a signal hooked up going at 20 Hz -- or a patient with a heart rate of at least 1200 beats per minute! :wacko: (Talk about a stress test! :) )

    What you'll want to do is to store the last peak found and store it on a shift register of the while loop, since there will many iterations of the loop without any peaks at all. You know that there will only be, at maximum, one peak per cycle, so you don't have to worry about if there's more than one. Now, for each subsequent peak detection, you can take the time of the current peak, subtract it from the value on your shift register (the time the last peak was found), and find the difference. Then, as you did, take the inverse of that time to find the frequency (altough this is in 1/sec, you want 1/min, so multiply by 60)

    You may also want to consider averaging the BPM you find over time. If there's some peaks that aren't detected, or if you find some extra peaks, this number will jump all over place. You'll probably want to average over the last few times to smooth it out.

    I've attached a quick fix I did to your VI to help my explaination... You'll of course want to clean it up -- And this doesn't look at all at the averaging issue.

  5. QUOTE(xavier30 @ Feb 12 2007, 12:19 PM)

    I don't think there's much you can do to raise the limit, other than getting a faster ethernet card... Here's a few suggestions:

    -Run the shared variable engine on the faster of the two computers. The engine will take up lots of CPU usage, especially during intensive read/write operations, so I would put that on the faster cpu to make sure the CPU isn't holding you down.

    -Are you running this on a network which has other network traffic on it? Other network traffic will significantly slow down the data transfer rate. You'd probably get better results if you had a direct connection between the two.

    You can take a look at this article on ni.com regarding shared variables:

    http://zone.ni.com/devzone/cda/tut/p/id/4679

    If you scroll down to Test T3, they're doing the same test you're trying. They first do a large transfer via TCP/IP VIs from one host to another, then they do the same test using shared variables. The results are interesting... It looks like the data rate starts to cap off at about 1000 DBLs (so 8 Kbytes), and that's operating at about 9-10 MB/s (72-80 Mbps). At the bottom they mention they're using a 1 Gbps connection between an RT PXI Controller and a host PC.

    That said, they still recommend in the article to use plain TCP/IP VIs for faster performance -- and, as you can see from their graph, the TCP/IP VIs did much better at around 40 MB/s -- 320 Mbps, which isn't too bad since a lot of the TCP/IP bandwidth is header/handshaking information.

    Hope this helps!

  6. It's an interesting toy, but what about it can't be done on a normal computer screen? Also, seems to me that traditional things such as pianos or saxophones have pretty tangible UIs and are more practical than this -- such as in allowing rapid dexterity to have a role. The widgets are too specific to be really useful for anything else than effects generation and automatic music... in short, this musician was bored by the demo.

    I agree... as a musician myself too, I had to put that side of me away while watching. It really doesn't do much musically. But, the pretty lights and colors made the engineer side of me want to build one! :)

  7. Did the video auto-play for everyone else? It's kind ofprogressively more annoying when it plays every time a page containing it loads (e.g. on the front page, on the thread page, and now on the reply page). Apropos as that may be given that it's a Dilbert video :) ..

    Haha... Yeah, it started doing that for me too... I'd be sitting here listening to music and all the sudden "I'm worried about my little Dilbert..." starts up :o

    If you go into the "Plug in Preferences" (click the little button to the lower right of the movie), then uncheck "Play movies automatically"... :)

  8. What are the technologies "PnP", "PnP Proj"? and differences between them?

    So could I use the Drivers for LabVIEW 8.0 on LabVIEW 8.20??

    The differences between 'PnP' (Plug and Play) and 'PnP Proj' (Plug and Play Driver in a LabVIEW project) is that the 'PnP Proj' takes advantage of the LabVIEW project architecture which debuted in LV 8.0. It's easier for driver developers to organize their drivers and mark VIs as public/private. You can read about the differences of the two here: http://zone.ni.com/devzone/cda/tut/p/id/2921

    In your case, both of the drivers shown look like they're the same (the same name is on both), but the 'PnP Proj' is newer. (If you look at the revision numbers on the right, the PnP is driver revision 2.0, while the PnP Proj is revision 3.0.

    You can certainly use the LV 8.0 driver with LV 8.2, altough it will ask you to re-save the VIs once you start using them since it has to recompile them for LV 8.2. It would probably be wise to do a mass-compile of the driver after you download it using the Wizard. (Tools > Advanced > Mass Compile) After you download the driver, it will tell you where in your instr.lib directory it put it.

  9. Is there any version of the Tunnel Wiring Wizard that works in LV 8.20? I'm trying the 8.0 release of the wizard (on LV 8.20) and it always says that I'm not selecting two tunnels, even though I am.

    I know that with 8.20 you need the license to do scripting... but I hope one of my favorite tools isn't destroyed! :wacko:

    Thanks!

  10. how used the DSC in Labview 8 to make

    1- data logging .

    2- Securtiy .

    3- Alarms .

    4- Networking .

    5- Trends .

    This is a pretty vague question... If you haven't used LV DSC before, I'd start with LabVIEW Help / DSC Examples. They can give you a start for how to use DSC. I think NI has some examples/tutorials on their site as well.

  11. I input values for x and y , run my program, "RPSTestLibrary.VI" , ...then I get the Error code 1172.

    "Error calling method RPSTestLibrary.RPSInfo.RPSMultiply of NULL ObjectId, (System.ArgumentNullException: Key cannot be null.

    Parameter name: key) in RPSTestLibrary.vi"

    Can you show us any of the code that you're using? (at least a screenshot?)

    One thing that I forgot to include in my post yesterday is that you need to call the .NET constructor before you can use the reference. On your block diagram pallette -- Connectivity -> .NET -> Constructor. Use this to create your .NET reference instead of dropping down and using the .NET refnum control on the front panel (You'd use this method to pass the already created refnum to a subVI after you call the constructor to create the refnum).

    See if the constructor fixes your problem. There's also a few .NET examples with LabVIEW that can give you an idea, too.

  12. I want to view all the methods and properties contained in the .dll

    First of all, make sure you have the latest .NET framework off microsoft.com (You need at least .NET 1.1 SP1 for LabVIEW). If you have VS.NET, you're probably OK.

    Drop a .NET refnum on your front panel. On your block diagram, right click it and select "Select .NET Class" > Browse... You can select the DLL to use and the .NET class inside the DLL to use. From there, wire up a property node or invoke nodes to use the properties/methods of the .NET DLL.

  13. I place the "Current VI's path" and the VI I want to call is in the same folder as the main VI, so I just put the Sub VI's name in the path, however, the program says it could not find the VI I want to call.....

    Can you post a screenshot of the code that you're trying for the subpanel? If you wire a path to the Open VI Reference VI, it will load the VI from the path you give. If you just give a VI file0name (with no absolute path), it will load from the current running VI's folder.

    For example, I just tested with the code attached. I have "C:\master.vi" running "C:\subVI.vi" in a subpanel. It works either with "C:\subVI.vi" or "subVI.vi" wired to Open VI Reference. (I made sure all VIs were out of memory before each test)

    As for distribution, you'll need to either make sure that if the user won't have the subpanel VI in the same folder, that your program accounts for this and asks the user to enter the location of the VI. That way, you can build the path to pass to 'Open VI Reference'.

    post-4078-1170299042.jpg?width=400

  14. Hello All! I need to emulate a hands free profile on a PC so my LV app looks like a Bluetooth phone and can stream audio data to the device I am connectiong to. THis seems like something that would alread have been done by someone. Any suggestions?

    I don't know about the hands free profile... but one thought is if you could find a device which supports the "Audio Gateway" bluetooth profile, your computer could see if as a normal soundcard and you could play audio like normal...

  15. In LabVIEW 8.2, it appears that the Delete file primitive has a nasty little bug, in that it ignores the confirm input, which is supposed to present an OK/Cancel confirmation dialog box to the end user, before deleting the file (or folder)!

    Jim,

    I find that the confirm works correctly and asks for confirmation only if you leave the file input unwired (to use the file dialog)... But you're right, it ignores it if you wire in a file name... :headbang:

  16. Or another bad design topic where many subVIs that all do more or less the same with slight differences are sprinkled through the entire application hierarchy.

    Now that's a coding challenge right there! Create a program that reads a subVI, understands what it does, and then detect other VIs which do similar functions! whew... :blink:

  17. I wonder if it would be possible to detect code that should be made into a subVI? Probably best left to the humans...code completed in a rush can be short on subVIs.

    It would be interesting if you could scan through the code and detect a "code sequence" that you use in multiple places -- something that could be made into a subVI...

  18. When you say they aren't working, are you getting an error messages? One thought is that since the examples are using TCP port 2055 perhaps a firewall is blocking the connection (turn Windows firewall or any other firewalls you have enabled off). Are you setting the client VI with the right IP address of the server? You of course need to replace the 'localhost' string with the IP of the server.

  19. You're going to be the second bastard to file a bug report about the 16k wire aren't you? Yes, that's right, I have a CAR that says:

    "If any segment of my wire (no bends) is greater than 32767 pixels then if I right click on it and select "Clean Up Wire" then the wire gets deleted."

    This CAR was closed as "Not a bug." The general consensus was that LV had responded correctly to such a wire.

    :wacko: A straight wire 32767 pixels long!?! I don't even want to know how someone discovered this...

  20. Pockey,

    If you want to have only one front panel shown to the user, can you either:

    -Copy and paste the entire front panel / block diagram from the SubVI to your main VI (There's no easier way that I know of other than 'Select All', 'Copy', 'Paste'. Your VI will get pretty ugly, though, since you now have two VIs in one.

    -Run your SubVI through a subpanel. With a subpanel, you can "run" another VI and show it's front panel as part of another. Instructions for that can be found here:

    http://zone.ni.com/reference/en-XX/help/37...el_in_subpanel/

    That said, in either case you'll need to create a way to get both VIs to stop simultaneously. I'd probably create a notifier in the "main VI" which sends a notification when the stop button is pressed. Then, have your subVI listen to the notification in its idle case and have it stop on a notification.

    Let me know if you need more help.

    ~Jeff

×
×
  • Create New...

Important Information

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