Jump to content

Neville D

Members
  • Posts

    752
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Neville D

  1. I understand completely but I I'd like to integrate a fast series of tests that can be performed on the first run of my program so it can get a "good" feel of the users current running state. There will be a warning message before this test opens that will ask the user to close all unnecessary applications and to run the test just like they would run the main program. From this simple fast test that takes less than 5 seconds on almost every machine, you can get a feeling for how fast you can update the screen. My other option was to have a feedback that monitored the queue state. If the queue got too big it would slow down the refresh rate. Do you think this is a better method?

    I would not try to update a GUI more than 5 times a second. Any faster would be overkill. Usually every 0.5 s is good enough. You could use the "defer panel updates" property to limit the number of updates, and then you wouldn't need to worry about the speed of your processor.

    Make sure:

    1 all loops in your code have a Wait ms with an appropriate time (even 0ms is better than nothing)

    2 limit transparent graphical objects on your panel

    3 do not overlap objects.

    Note also that raw processor speed is anyway not a measure of system performance with LabVIEW.. if doing a lot of array manipulations, poor labview code will require more and more contiguous memory, and calls to the LV memory manager drastically affect performance.

    Read the Labview performance and Optimization App note for further info.

    Neville.

  2. The thing is I'd like to be able to display the raw data at any level of a bunch of nested routines. How do you typically do this? I wanted everything to be available from the main window, previously I'd have to go and find the subVI executing and open that to look at the graph on it's front panel, for example. So when I've got several nested routines, this gets annoying, so I figured a tab control can display the data for the various routines. And since the subroutines, especially the type of data (graph or scalar, or even 2-D intensity graph), so I figured I can put the appropriate indicators onto a tab control.

    Why don't you make a subpanel of your subVI and display it on one of the tab sheets. That way you can display the front panel of the vi you are running with a much simpler UI. This would be a quick and dirty way to do it.

    Another way is to develop an architecture so that data can be moved from the acquisition loop to the UI loop for display.

    Then it is just a matter of selecting what you want to display.

    Neville.

  3. Hi everyone,

    I am new with LabVIEW. This is the first project I am doing. I want to use Labview as a Hyper Terminal, But I am unable to determine how do I open and Close Serial port before and after the session. So that the port is free for other applications.

    Thanks

    Take a look at Scott Hannah's Serial library; it already has a simple terminal emulator.

    http://sthmac.magnet.fsu.edu/labview/vi_library.html

    Neville.

  4. Let's just say the code is 4800x3000 at the moment but will NOT be getting any larger :) . Got a good video card, lol.

    It's really not that bad. Later this evening when I get some free-time I'll make a clean easy to read flow of my code that'll fit in 1 screen capture. I'm not using a wait on the display loop, only on the user event and serial/playback input loops. I thought that because of the queue, the while loop that contains the display terminals would wait at the queue and just poll it until there is something in it to output?

    Just a quicky question, is it better to put a wait of 0ms or 1ms or doesn't it matter?

    0 ms will work, but add a reasonable delay. If you can live with 50ms updates, then use 50ms. Its just good practice to not hog all the time, if not needed.

    Neville.

  5. :throwpc:

    Programmable suicide of VI.

    Realy. Stupid idea.

    Under some conditions end application and send reboot signal to PC, like "Restart computer" command in Windows.

    Sound stupid. I know. :]

    AAAHH....!!

    I remember doing that once on an RT Target. If an error was generated in the RT code, I would automatically reboot the RT target, and the application was set to run at startup. I think I used the Reboot VI..

    Let me see if I can dig out what I used.. Will get back to you tomorrow.

    Neville.

  6. I've been reading about OpenG this and OpenG that but I don't know where to start. There is very limited documentation explaining why anybody would want whatever it is OpenG offers :( . Maybe I suck at researching but I'm pretty sure I'm not.

    Breifly, what is the advantage of OpenG other than it being "free"? Do I need to install Commander before I can use/install the OpenG Toolkit/Builder? Is there a chance that installing this software will break my current LabView program causing a reinstall? Will I need to package new run-time lib for sending out to beta testers that have only installed the main run-time? Currently I enjoy sending out updates of just a compiled exe to replace the old... I'm sorry for all of the questions but the OpenG websites I've visited haven't given me my answers. Would be nice to see some screenshots :) . Last question, if you don't mind; Is the OpenG builder a replacement for the LabView application builder or is it just a builder for wrapping vi's to send as toolkits? :wacko:

    The more I know, the more help I can be in the future. I plan to stick with LabView for life... eventually helping out with this OpenG stuff :)

    Lots of free, useful tools for array/number/boolean/file/string manipulation etc etc.

    Yes you need to download and install the OpenG commander, and then from Tools menu start the commander and download and install all the separate packages. This is so that each package can be updated independant of all the other OG packages.

    Installing it will do nothing to your original LV install. It just places a bunch of useful VI's in your user.lib folder, and various other stuff in your other LV folders (all of it pretty harmless). As far as I know, it does not make any entries into your registry (it is after all platform independant).

    The OG Builder enhances the functionality of your application builder (I haven't used it). You can't use it if you don't already have the App builder as part of your orig. LV install.

    Its great stuff.. give it a try. Open up the OpenG Commander for a lesson in good LV programming style.

    Neville.

  7. @temp409x and Jim:

    i have the same problem with OpenG. I can install the Commander and download Packages, but i see nothing in my palettes.

    Maybe this happens, because i have a english LabVIEW installed on a german Windows XP? where the default path to LabVIEW is not "C:\Programm Files\National Instruments\..." but "C:\Programme\National Instruments\..."

    best regards,

    CB

    Are you using LV 8? Then all the OpenG stuff appears in a single sub-pallete. If using prior to 8 you should have a full set of tools in all the appropriate locations.

    Check your user.lib folder in NI/LV x.x/user.lib

    If correctly installed you should see a whole bunch of OpenG tools installed there. If correctly installed, then cruise over to:

    Block diagram>right-click-pallete & nail it, then -options (top right corner) and select Dynamic pallete view.

    You should see the OpenG functions in each of the sub palletes. Check array functions to see if you have the OpenG array tools.

    I would really urge you to download and install these tools. They are well-written, extremely useful and in general bug-free.

    Neville.

  8. Which one is faster with raw data and is there a difference or are they the same thing?

    I notice the feedback node doesn't release a value at the end of a while loop? Could't you just wire a terminal to the the loop basically creating a shift register?

    Maybe there is a book that goes into details, if there is, what is it's title and where can I get it :)

    They are different implementations of the same thing. The feedback node was introduced later (in LV 7 or so) to clean up the diagram a bit, so you don't have to route wires from one end of the diagram to the other.

    It is just a matter of taste which you use. I don't think there is any speed advantage. I do remember there being a bug with the feedback node a long time ago, but that was probably fixed.

    There should be a note in the LV Programming manual explaining the finer points of both.

    Neville.

  9. Right. It is PC card SBC81870.

    I've found this - RT Reboot Controller.vi.

    I would like reboot local machine.

    I've tried use RT Reboot Controller.vi but that is wrong way - I have Mac adress and IP but result is error 56.

    Sorry, you lost me.. I still don't understand what you are trying to do (or why).

    Neville.

  10. So my program is displaying a lot of data to a GUI. Attached is a screenshot.

    My laptop is a Compaq Presario 3000 model 3045us; specs are as follows. P4 2.4, 512mb, 60gb, 16"lcd 1280x1024, SiS 650m video shared ram.

    My program reads in serial data at approximately 37.6kbps where the data is async sent blind. Each packet si 277bytes where 256 is from the car's computers ram dumped followed by 8 10-bit a/d channels followed by a 16-bit checksum of all of the data followed by the start/stop bytes "55AA" repeated continuously (duh, async). Anyways, my program has several loops, 1 for events, 1 for looking at the serial port or playback file, and 1 to display the GUI. After the serial loop has gotten a full packet it runs a checksum on the packet and compares it to the checksum bytes in the packet, if good, send it to the queue. The GUI loop has the queue (FIFO) which outs the byte array "packet" which is indexed and sent to the gauges and various displays. Here is the problem, it takes up about 35-40% of my cpu power ONLY when the data is being sent to the gauges. Mind you, there are a couple tabs in my program, when one tab is in focus there is a conditional case structure that only updates what is visible. With that being said, it's obvious that the indexing and calculations being run on the byte array aren't the slow down because when I display "flag" (aka boolean) only the CPU usage is SUPER lower, like 2-6%, change over to the gauges and 1 line chart and it jumps up :( .

    Here might be my problem; I'm using classical gauges instead of the default 7.0 gauges because I thought it would be lower cpu usage, is this wrong? Are the newer gauges with the alpha blending edges and smooth appearance better code wise? I don't have the time to convert all of my gauges so maybe somebody knows. Other than that, I'm at a complete loss. The gauges are only refreshed 17Hz! Slower laptops have had similar issues with my program and honestly, I'm fed up. My last step is to update the GUI less frequently, every other packet and from there I might try indexing the byte array for only the bytes I need instead of sending the whole packet into the queue... although I need to display 1/3 of the bytes in the packets :headbang:\

    Things that affect performance:

    1 Overlapping graphic objects

    2 Transparent objects overlapping each other or other graphics.

    3 New-Style (6i) controls/indicators have a bit more overhead because of the shading etc.

    4 Static graphic objects (boxes, arrows etc.) if placed, should be placed at the BACK. (Group Menu>Move to BACK).

    5 If placing things like logos etc. do not overlap with other objects. If no choice then move to back.

    6 Do you really need a 17Hz update on the panel meters? Use "defer panel updates" property to update indicators every 250ms or so. Anything faster is useless anyway (unless captured on a plot)

    7 Get latest drivers for you Graphics card (this may not make too much of a difference)

    8 Increase system memory to 1Gig. 512MB is barely enough nowadays.

    9 Upgrade to a newer laptop if you have an option. I have had display related issues with older laptops.

    10 Separate User-Interface updates to a separate loop from the rest of the acquisition/control code.

    Don't worry about graphics on a tab sheet that is not displayed. That won't affect performance since those pages don't have to be drawn.

    Calculations etc. are usually very fast in LabVIEW. However, avoid building arrays in a loop, that calls the memory manager which will slow down your system.

    You can add logic to display every alternate or every 3rd or 4th value based on the length of the GUI Q elements. If too much backlog, display less data.

    Neville.

  11. I work at LabVIEW RT 7.1. I need restart hardware using LabVIEW at RT.

    Is there any possibility to do that? I didn't found any options (except using C and asm injecton to diagram)

    best regards

    Mikrobi

    Zbigniew StS

    What "hardware" do you want to restart?? If you mean the LV-RT platform itself, you could reboot it with a VI on your HOST system, targetting the RT platform.

    Its reboot RT controller.vi or something like that.. I don't have RT loaded on at the moment on my PC.

    Neville.

  12. I been developing most of our applications in LabVIEW 6.1 and one in LabVIEW 7.1. with the DAQ 6.9.3 driver on the same computer. They are built into stand alone applications with the Application Builder. When deployed, we use InstallShield to deploy the application as well as install DAQ 6.9.3 and the appropriate LabVIEW RTE.

    I want to start a controlled upgrade to DAQmx 8.0 and LabVIEW 8.0. If I install the DAQmx 8.0 driver for LabVIEW 7.1 and LabVIEW 8.0, will it wipe out my DAQ 6.9.3 support for LabVIEW 6.1?

    Anyone tried this before?

    I need to maintain my LabVIEW 6.1 development setup in order to support legacy versions of our products. I hope I do not have to maintain a second computer.

    One other thing is: when you install LV 8 or one of the newer DAQ drivers (7.5 onwards of NI-DAQ I think), by DEFAULT the older style NI-DAQ does not get installed. You have to expressly check off to install the traditional NI-DAQ driver.

    To the best of my knowledge, every new version of NI-DAQ holds the traditional DAQ driver at 6.9.3, while upgrading and expanding the DAQmx part of the driver.

    Neville.

  13. Has anyone ever shared 1 GPIB device with 2 PCs? I have an expensive piece of equipment that I would like to share across several test platforms via GPIB, and I wanted to find out any caveats/tips/tricks before I go down this path...

    Your help would be greatly appreciated!

    Thanks.

    Hook up the device to one PC, and then in NI-MAX on the other PC, configure the device to be accessible as a "remote VISA" device. Tools>NI VISA>VISA Options-General Settings-Remote.

    That way you have access to it through VISA, and can use the same software on both PC's, one accessing the device "locally" and the other using the remote VISA functionality.

    I believe you can also use this method to have access to the serial ports of a different PC. Speed MIGHT be an issue if you are getting large amounts of data from the instrument.

    PS I haven't tried it this way before, but it looks like it should work.

    Neville.

  14. Hi

    A month ago I just install LabVIEW 8 evaluation and write my licence code and everythink was OK. After that I activated my soft with any problems.

    I can say that there wasn't any problems with that. Maybe when I will be acticating rest of my instalation will be some problems, but right now I don't have any problems with that.

    Now I wait for my LabVIEW 8 PDS. Have you hear something when NI will be sending CD's to customers ?

    Regards

    bogdani

    We have already received our LV 8 PDS CD's last month in North America. Maybe check with your local NI rep to see when you will receive them in Poland.

    Of course the installation of the LV 8 Debug Licence was such a pain, I have not bothered to install 8 on my development PC.

    Neville.

  15. Hi everyone:

    I am new with LabVIEW. This is the first project I am doing. I want to use Labview as a Hyper Terminal, I found one VI is very close to what I need, But the message read window does not keep the current data, I have to use a scroll bar to read the current data. Is a way or some setting to keep the message window show the last 10 lines or the current data (like Hyper terminal).

    Thanks

    I am using Ladview 7.0

    Hi Fei,

    Remove the shift register which is used to collect all the message strings and append the new ones to the old list.

    See attached image:

    Neville.

    post-2680-1134687176.jpg?width=400

  16. Hi there, am rather new to labview. Have been looking high and low for some kind of look-up table function that I might be able to implement in labview unsuccessfully.

    I need to be able to have a 2D table that gives out a single output taken from the table for a given set of two input variables. Anway to do this easily?

    Cheers

    Hi,

    Here is an implementation of a lookup table. The LUT can be either:

    - a 2d array of X-col, Y-col,

    OR

    - a 1d array of (X,Y) clusters.

    Given an X, it will interpolate a Y value. Note that the LUT must be monotonically increasing for the LV function to work!

    You can add additional logic to check for out of range X values, error generation, interpolating Y given X etc. as needed.

    Cheers,

    Neville.

    Download File:post-2680-1134673935.vi

  17. Has anyone experience connecting Yokogawa MX100 and LabVIEW ?

    I have this problem...

    I have got the LabVIEW driver from Yokogawa website and than started to built the LabVIEW program to take the data from MX100.

    This MX100 has the capability to measure in 10 ms interval rate. Using I tried to make a loop with 10 ms period. And than I tried to change the coltage rapidly. But it seems the LabVIEW Program only can detect voltage change every 100 ms. I have used Yokogawa program and it worked.

    But using Labview I can have other possibility to modify the program as I want.

    So, if anyone has such experience , please please tell me...

    I have been stucked in this problem for last days

    Thanks in advanced.

    Your email is very unclear. How are you communicating with the device? GPIB/Serial/USB/Ethernet?

    I am guessing, you are using a canned example VI to acquire data?

    Structure your code to set up the instrument in the required mode, and then put just the data acquisition commands in a loop with the required timing, to speed up the processing.

    Maybe you can set up the instrument in burst mode to acquire all the values and then transmit an array of values.

    I am not sure what you mean by rapidly, but if you want fast deterministic control, use an analog control line on the instrument (if it has one). Connect the control line to an NI DAQ card, and then control the voltage output as rapidly as you desire. This should give you much finer control than GPIB.

    Neville.

  18. Thanks Mr. Massey,

    Now I want 2 know from where u ve get the Excel Tollkit, hav u purchased it or download it from anwhere? i don have any kind of excel toolkit, so i am bit confused, wat to do????????

    Thanks,

    Nishant

    Read the above reply AGAIN, and click on the hyper-links.

    Maybe spend less time playing the guitar and more time working with labview??

    java script:emoticon(':ninja:', 'smid_17')

    smilie

    Neville.

  19. If I start and stop the serial port with the stop button on the window's toolbar, it doesn't clear the serial port, and my program doesn't work properly. I have it set up so that if you push my stop button, it does shut down the serial port which clears it. I'd hate to have to write a function to clear the serial port myself, it's just silly. Is there a way to trap the stop button on the toolbar, or disable it?

    Hi Eric,

    You are not really meant to be using the "stop" button on the toolbar to stop your code. That is an ABORT button. Its like pulling the plug on your coffee-maker to stop it.

    Write your code to exit/cleanup/close files etc. when the user presses a front panel boolean of your choice.

    For your serial code, when user hits this STOP button, use VISA CLOSE to close the serial session, and free up the serial port for access again by either LabVIEW or another program (like Hyperterminal).

    then you don't need your series of steps to have access to the serial port again in LV.

    Hope this helps.

    Neville.

  20. Thank you for your fast responses didierj.

    can you address me the exact URL of "NI-DAQ" for downloading, as I understand in my eval Version "Measurement & Automation Explorer" doesn't installed.

    EVAL version of LabVIEW may not have hardware support. But from your comments looks like you need to install VISA for the Serial port stuff to work at the very least.

    Neville.

  21. pallen:

    You mentioned that you were switching to USB to save $$. Be careful, I have looked at the specs of the 6008/6009 and I am not too impressed with the analog inputs, they have an input impedance of only a few hundred kohm. Some people have ran into problems saying their measurments were innaccurate- it turns out that the analog inputs were loading down their circuitry. No counter/timer support and software timed analog output too on the 09, I believe.

    You may want to look over the specs of the USB devices before commiting to them. Granted I have never used one, but have heard other people issues and some have had to go back to traditional cards (PCI, PCMCIA)

    I have used the USB 6015 with 5 analog Input chans with no problems. I am using an old Toshiba laptop which has only 2 USB ports, so I have the DAQ connected into a powered hub, with a USB mouse, and a USB-Serial converter on the other USB port direct to laptop.

    It all works like a charm; the 6015 is like an E series card but running off USB. Works great.

    Note that the USB DAQs use interrupts and not DMA for data transfer and this may affect speed.

    Neville.

  22. Hi again,

    Last problem solved thanks to Neville :) but now i've got another simple problem that i couldn't solve yet.

    How to capture a value for double click on listbox? My program can't capture the value, the value reset too fast. i don't know what's wrong. Could anybody give a clue what's wrong with my program.

    regards,

    Abe

    Maybe you can post a code snippet..

    Neville.

  23. Hello all,

    I have a question about working with large data sets. I am currently acquiring about 8Ms of data, splitting it into two arrays and processing it. I require this vi to be very quick for the hopes of a real time imaging system. I am currently implementing a 3 For loop system, but my processing time is still rather slow. The most inner loop is the actual loop that does most of the number crunching. The outer 2 loops manipulate the data to be the proper size. I have read that if you decimate your data into smaller sets, labview can perform tasks faster. I have attached a basic version of my algorithm and was wondering if anyone can point me in the direction of using the smaller data sets. I have also read that arrays should be initialized at the output of for loops for memory management. Has anyone heard of this and if so can you provide me an example as I have tried but have not been able to produce encouraging results.

    Thanks,

    Azazal

    Hi Azazel,

    Looking at the diagram, you have a lot of coercion dots on arrays. These are a killer for memory allocation.

    The output of the arctan probably is a DBL, but output array is a SGL. Use Numeric>Conversion>To SGL precision Float to cast the data to the right type.

    You should see a huge performance boost.

    Neville.

×
×
  • Create New...

Important Information

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