Jump to content

Neville D

Members
  • Posts

    752
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Neville D

  1. Just a few comments on displaying large volumes of data fast: 1 If you have a labview version other than the Base version, you could use the "point-by-point" libraries to calculate mean/median/mode and MANY other functions on a point by point basis (instead of waiting for 50 points to collect at a time). This should help in smoothing out the data. 2 To speed up data display you could acquire say 500 points, and use the Decimate.vi to decrease the plot data by whatever factor you like before plotting it on screen. 3 Another trick is to use the "defer panel updates" property to decrease the number of screen redraws. You could probably draw the panel once a second or so to decrease the screen refresh burden. Hope this helps. Neville.
  2. Its in a very "obvious" place.. Programming>>Dialog & User Interface--4th row :ninja: Don't you just love the new re-arranged pallets? Neville.
  3. Another secret place for a Wait.vi with error chaining is: Traditional DAQ Pallet >Counters>Intermediate>Wait+ ms.vi (or something like that).. It even has an additional time input in seconds Unfortunately, by default Traditional DAQ no longer gets installed when installing the newer versions, and I have only LV 8.2 on my PC at the moment. Neville.
  4. Peter, If you use the OpenG toolkits, they have a wait VI with error clusters. VERRRY useful. Downloading and installing the OpenG toolkits is a real breeze thanks to the latest VI Package Manager. Neville.
  5. I am not sure what exactly you are trying to do, but here is an approach: Add a Process button, link that to a separate value change event on your Event structure, and within the Process state of the event structure feed in the array from the shift reg and do whatever you want to do. The loop is basically stopped waiting for an event.. if none is generated, then it just waits forever; the way you have the event structure set up, it can either stop or read a file. If you want to read the files again, put the whole mess into another While loop that will allow you to get at the next set of files. Neville.
  6. Hi Darren, First I would ask that you read the below links on info: :headbang: How to ask questions How to use LAVA Now proceed to further clarify your question. What hardware/software/version/toolkits do you have? Is it a GigE camera? Do you have IMAQ toolkit ? etc etc. What have you tried so far? People will be more than willing to help, if you do your bit first. Neville.
  7. Use a shift register to pass out the array data.. as shown in the image. Sorry I have only LV 8.20 on my PC, so I am not sure if the attached edited VI will be of help. Neville. Download File:post-2680-1162323074.vi
  8. Just as an aside, not to take away anything from Sam's effort, you can save/read back any LabVIEW data structure very easily to an xml file, making the ini file functions more or less redundant. I have written complicated structures of clusters/arrays/booleans very easily with just a single VI. The read is fairly easy as well. I think the xml read-write VI's were introduced with LV 7. Neville.
  9. Can you describe your hardware/software a bit better? :headbang: What LV version? what drivers? Do you have a NI Slot 0 Controller? etc etc. Please see these links for future reference if you want to be really helped: How to ask questions How to use the LAVA Forums Neville.
  10. If I remember right, there is an example in LabVIEW called "simple PID" or something like that, which already has PID implemented. This example does not use the PID toolkit. Neville.
  11. The built-in Icon Editor feature is only available with LabVIEW 8.0 onwards. You will have to use some third party icon editor tools to build icons for LV 7.0 Neville.
  12. Neville D

    Thanks!

    Hi Lynne, A few points: 1 The Vision example VI's are in my opinion the worst in terms of LabVIEW style. They are littered with sequence structures willy-nilly, and no error-chaining in every example. They look like they were done by a summer intern with about half an hour of LabVIEW "training". I have had LabVIEW newbies look at those examples and start coding using sequence structures. 2 Help on specific properties should show which platform they are NOT applicable on; i.e. LabVIEW-RT or PDA etc. 3 Is there need to define the Error Cluster on the Help info for EVERY single VI and function? Maybe a link to a separate blurb on the error cluster would save space and make help info more readable for the actual VI or function. Thanks, Neville.
  13. I think I have used the Notifiers correctly. Just to help with your trouble-shooting, I will describe my scenario: 1 Init 2 Named Notifiers 2 Pass each Notifier ref to 2 parallel VI's: PROCESS & TCP. (Both VI's & respective subVIs re-entrant) 3 TCP immediately waits for a notifier. 4 When PROCESS has finished some initialization steps, it fires a notification to TCP to start up. 5 Steps 3 & 4 repeated for another set of PROCESS & TCP. Notifiers only used once at startup, never again. Internal to TCP there are two parallel loops that use an unnamed notifier internally to pass TCP session data. These seem to never miss (else TCP would have failed often, but it seemed to be quite robust). What I found was that one of the TCP vi's would wait at notification forever (missed notification) at startup. It wasn't consistent which one. I added logic in the PROCESS vi to check notification status and if there was non-zero waiting on notification to fire it again with upto 3 re-tries, but this almost ALWAYS resulted in #waiting on notifiers as 0 (indicating the notification was either read or was fired before the VI was waiting for it). I also added about 150ms delays BEFORE firiing the notifiers but it would still miss them from time to time. I just worked around this by removing the notifiers and using single element Q's instead. Sorry, as you can see, the code is fairly complex, and difficult for me to offer a screenshot or a set of VI's. Neville.
  14. Hi Dan, thanks for the reply. I checked IMAQ Threshold.vi and in Vision 8.2, it IS thread-safe. What version are you using? (8.2 is available as a download off the NI website, but might need SSP to activate it). There are some Window draw VI's which are obviously not re-entrant.. since they are UI related. Getting back to putting two instances of a VI on a block diagram on different threads.. how do you do that? The TCP part of the code seems to be quite fast.. I just write out about 30k of data in a single write and it takes 0 ms, so I will leave that alone. thanks for the quick answers! :beer: Neville
  15. Hi all, I am working on a multi-threaded vision application on a PC with the latest Core 2 Duo processor. I have image data coming over two TCP sockets, and image processing using the IMAQ Vision libraries. I have managed to parallelize the image processing, TCP communication, and display functions. I have 2 Image processing loops, 2 TCP loops (one for each socket), a UI loop, and a display loop. Inter-loop communication is via 2 Q's and a few notifiers. The image processing and TCP VI's are all re-entrant. The TCP and Image processing VI's are on different threads. I tried playing around with changing priorities on the VI's but it made things a bit worse. My questions are: 1 Are dll calls to the IMAQ dll's re-entrant? (probably not?) 2 Can these dll calls be made re-entrant? Would it make a difference? 3 Any way to set two different instances of the same re-entrant VI on the diagram on DIFFERENT threads? 3 Any other ways I can improve performance? Thanks for any insights! Neville
  16. Seems to occur only for Notifiers.. I have an 8.20 program that initializes 2 Q's and 4 notifiers, and inspite of 100+ms waits, it occasionally will miss an initial notifier (which starts the tcp loops). Neville.
  17. Just a question: Does anybody know of the speed improvement/performance lag when using variants with LV-RT 8.x ? Neville.
  18. What scope are you using? Does it have an ethernet interface? Also, try to use binary data transfer and then convert to DBL's in the LV code, that will help the data transfer speed. Optimize the code to avoid sending the same command repeatedly to reduce bus traffic. Without looking at the code, can't say much more; these are just some general pointers. Neville
  19. Hi Tajinder, Another way is to write each control/indicator individually to an XML file. This offers the same functionality as an ini file, without using the OpenG toolkit. Last time I played with it, there seemed to be a bug with OpenG ini file VI's and LV 8.0 (the exact same code worked fine in LV 7.1.1). At that point, I refactored my code to replace ini file usage with the equivalent xml file, using the built-in Write to XML file and Read to XML file vi's. This way you can write any LabVIEW structure (array, cluster, cluster of clusters, etc. etc.) to (xml) file without problems. The read from file is pretty straightforward as well. Check out the XML examples in LV for more info. Neville.
  20. You might try opening the front panel with its coords of the window set to off the monitor screen as well.. Running the VI transparently might be a pain to debug. Neville.
  21. Its been a while since I played with DAQ but as far as I can remember, even though you have 2 AO channels they are not 'independent'. You can't run each one with different frequencies, since the DAQ card has only one FIFO. I think you are seeing this when trying to output both chans. You can set both to use the same frequency, and then they might work. See: Can I Individually Control Each Analog Output Channel on my E-Series Board? I have found the DAQmx performance to be much better with the 6036 and multiple AO's, since the driver is multi-threaded, it can switch between DAQ tasks without 'freezing' in-between. Cheers, Neville.
  22. You can also select under: TOOLS Menu>Options>Environment>Automatically Close VISA sessions. This will close VISA sessions when the top-level VI goes idle. It is a good safety net in case you forget to close all VISA refs in your code. Neville.
  23. I had this problem as well... I got around it by unzipping the LV 7.1.1 update but NOT automatically running setup.exe immediately on unzipping. Once unzipped I double-clicked on LV711.msi (instead of setup.exe) and that quietly installed it without further complaints or argument.. Neville.
  24. I have changed your VI to: 1 Initialize the Serial Port outside the main loop. 2 Added a Send Command button which you hit once you have selected which command to send and the params for it. The command is only sent when you click this button. 3 Replaced your Action I32 with a Enumerated Type. This allows you to see what the action that is taking place. 4 During the first execution of the VI, the Initialize command is automatically sent. Subsequently, you can re-initialize by hitting the Initialize button. You should really look at a State machine architecture to clean up your code. Init State>Monitor State>Monitor State. If any change in button values >Send Command State>Read Serial State>back to Monitor... Somethign like that. Neville. PS your uploaded example is missing Serial Read.vi and Serial Write.vi but no matter, you get the idea from my changesDownload File:post-2680-1150911420.vi
×
×
  • Create New...

Important Information

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