Jump to content

Neville D

Members
  • Posts

    752
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Neville D

  1. Mross:

    my running average is like this.

    post-6798-1164320168.jpg?width=400

    post-6798-1164320148.jpg?width=400

    People using the system need to see the values on the screen in real time. The display doesn't need a high refresh rate, but we still need to see the value to know exactly what we are doing and when to start writing to the file.

    Bigl00z3

    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. Maybe it's early dimentia but I *think* I mentioned this before: where did the colour constant go? It used to be on the constants palette under the numeric palette, but it's been missing since LabVIEw 8.0. NI: may I have it back pleeeeeeeeease? :(

    Its in a very "obvious" place.. Programming>>Dialog & User Interface--4th row

    :ninja:

    Don't you just love the new re-arranged pallets?

    :throwpc:

    Neville.

  3. I'm a fan of the OpenG toolkit too, but don't forget that there has been a way to do this since 7.1 using the Time Delay and Elapsed Time "Express VIs" ( :o Did I say that?!)

    post-949-1162467877.png?width=400

    They look bad on your diagram when placed, but you can right-click and select "view as icon" to make them less obtrusive... Just a thought when you get stuck somewhere without "OpenG on a stick"

    There's a thought for the prize of a coding challenge; a nice sized USB stick drive (>=2GB) preloaded with OpenG tools and everything in the Code Repository...

    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. post-2931-1162388289.png?width=400

    Essentially, through trial and error I had found that the Stanford Research TIU620 seemed to need a 3 ms wait between the write and the read for this vi to work properly, and this was a quick and simple way to do it. I could have made a small vi as well to do the same thing, but didn't bother to. I find using the "box" of the sequence structure to force some data dependencies convenient, particularly at the end of execution of multiple parallel loops, where I want to make sure all the loops have cleanly exited before commencing with the next step.

    Just my :2cents: ! ;)

    -Pete Liiva

    Peter,

    If you use the OpenG toolkits, they have a wait VI with error clusters. VERRRY useful.

    post-2680-1162399924.gif?width=400

    Downloading and installing the OpenG toolkits is a real breeze thanks to the latest VI Package Manager.

    Neville.

  5. So the only way to get the data out is when I stop the while loop? I don't want to stop the procedure to get the data because I then have to start it back up and select the files again, so that would defeat the whole purpose of me trying to do this. I have been passing other data in and out of while loops with local variables, but it is not working here. I am trying to be able to load multiple files so that I may look at them one at a time and everytime I look at a different file it displays the data . I already have the procedure to display the data and it works fine when I load one file, but I can not seem to read multiple files and display each data set on command. I have tried a couple of things, but I can not get everything to work together.

    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, i am currently in university and one of our modules coursework is to design a program that will pick up the signal of an ethernet network camera and be able to view the camera's picture and control the pan etc of it.

    the problem is, we've never used this program before and haven't been told how to work it. i was wondering if someone could help me out on where to start or how to get the program to pick up the signal.. ?

    the camera is a sony network camera (snc-rz30p)

    thanks,

    darren

    ps - sorry if this is in the wrong section of the forum!

    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. Hey crelf,

    I have a question about the code you helped me with. I am trying to pass the array values outside the while loop so I can use them in another while loop. I can not get it to work, I tried a couple of things but I attached the more simple version here.

    Thanks

    Kevin

    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.

    post-2680-1162322868.jpg?width=400

    Download File:post-2680-1162323074.vi

  8. Hi,

    I just added LabVIEW 7.0 code. Try to download again.

    -Sam

    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. Dear Members

    I am a novice to Labview. I am trying to run this file from Keithley to control my 2400SMU.

    http://www.keithley.com/data?asset=10313

    I ahve the relevant VXI PNP driver installed from

    http://www.keithley.com/data?asset=7145

    However when i run the file, i get the follwoing error.

    Ke24xx Initialize.vi<ERR>Driver Status: (Hex 0xBFFF0015) Timeout expired before operation completed.

    Can any one please help me out with this problem.

    Regards

    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. I have thought about this too. What i have come to is that in 90 % of the cases, all you need in an app is a straight forward PID controller with a minimum of "bells and whistles". In addition you probably in some cases need an integrator and a derivator. The two latter things already exist in the math library in LabVIEW, and a simple PID is made in 5-10 minutes.

    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. Hi

    I want to no if it's possible and how calling the icon editor by program in labview 7.0.

    I try to create an llb editor more convenient and want put a possibity to modify icon.

    Perhapse some one have creat icon editor (in 7.0) that i can at to my program with is permission

    I want to send my program to Lavag community when i have finish.

    Regards

    Eric

    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. Phew! Got it. :) I will definitely send that feedback to the appropriate parties.

    Lynne

    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. Take a look at

    <labview>\vi.lib\Utility\Wait for All Notifcations.llb\Wait for All Notifications.vi

    This shows a correct implementation for how to wait for an entire set of notifications to fire. I'm not sure what is wrong in your code, but maybe by code comparison you can find it. I'm still hunting around, but I just started looking at this and it may take a while to untangle.

    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. I'll try to answer those...

    1 Are dll calls to the IMAQ dll's re-entrant? (probably not?)

    A: They are thread-safe. You can tell because the call library node is yellow (as opposed to orange). Thread-safe = Reentrant in the call library node configuration. However, I noticed that many of the image processing VIs (such as

    IMAQ Threshold) are not reentrant themselves. That doesn't seem right. Actually I have a parallel-ized IMAQ application, and I never checked that part before. I'll be opening up a service request on that one.

    3 Any way to set two different instances of the same re-entrant VI on the diagram on DIFFERENT threads?

    A: I believe so, just make sure those two different instances are not inside a loop. Doing that would cause a thread swap for at least one of them every time it is called.

    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. Sounds like a bug to me. I wonder if this bug exists also for queues and other inter-thread communication nodes.

    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. HI friends,

    am interfacing with a digital oscilloscope(rs 232) and i got lv7.1.the acquisition was very slow.i tried changing the baud rate(from 9600 to something higher) in the scope and in the system but a VISA timeout error occured.is there a way to increase the speed of the acquisitoin.of course the GPIB is a better choice, but using rs232 is it still possible to increase the speed?

    thankyou

    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

  18. Hi Everyone,

    I need some help for saving Front Panel Status of Control and Indicators, to an INI File, I am Trying to use Write Panel to INI VI provided by OpenG.org , But when i write, the INI file is empty, There is no error while writing, can any one please help me out to fix that problem.

    Regards.

    Tajinder Singh

    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.

  19. Thanks again,

    Dave Graybeal

    Alright, after playing with a few more things I managed to find a property node that appears to work for hiding the Front Panel of the VI in an executable. First thing I do is Set the Run VI Transparently to True, then I set the Transparency Level to 100% which makes the VI invisible. Now when I launch the VI all I see is a Windows Task Bar for the VI come up, No Front Panel Flash or anything. Thanks to all for the help!

    Dave Graybeal

    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.

  20. Hi there!

    I'm having a little problem I was wondering about. I've got a 6036e DAQ-card and I'm trying to run a sine through both outputs simultaneously. My problem is that when I'am using only one output the signal's just fine but when I configure to used both outputs I "lose" every second period. I've got the same signal levels but a sine only every second period. I'm using the traditional DAQ vi's for building the program. Tried to look at the Simul AIAO Buffer.vi in example finder but didn't get much wiser. I've probably just missed something small but since I'm new to the game I'm having trouble spotting what!

    /Raz

    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.

  21. ann,

    Some of the required fils are not included in you post. Regardless, I think the problem is in the writeserial 4.vi. You may need to carefully review the code to ensure that you close every VISA resource that gets opened. Using a VISA global vi as you have is not a bad way to do it but you must be quite vigilant about what references (VISA or otherwise) that are open/initialised and how (& when) the application closes those references.

    2) Your application controls the VISA resource as follows: open->read/write->close any time it needs to communicate. This ensures that VISA resources are handled appropriately and minimises the chance of a COM port being locked out by LabVIEW causing problems on subsequent executions. This method will no doubt incur a perfromance penalty as serial devices often require a finite time to establish communication though.

    Sorry if I am regurgitating stuff you already know.

    Cheers & Beers

    :thumbup: & :beer:

    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.

  22. I have to agree. I recently had an issue where someone else had installed NI-DAQmx 8 over a LabView 7.1, and when I attempted to upgrade the 7.1 to 7.1.1, it would NOT take. I tried to "gracefully" roll back the NI-DAQmx, but I could find a good way to do it. I ended up completely deleting and reinstalling LabView and NI-DAQmx 7.5, which was not in the least bit "elegant" :(

    -Pete Liiva

    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.

  23. Hi all,

    I am novice in Labview! I ve just started to work and learn it a month ago. I would like to create a program to pump system which is controlled by a lynx4 microcontroller what I can program through serial port! I did a vi for this purpose (with your help :worship: )

    Everything is in a while loop to run it continously and I can stop things in the same time.

    my case structure (which send the command to through the serial port to the controller) is also in the while loop. The problem is this ... becouse it is in the loop it is send the command continously (the pump is not stop after finishing a task) but when i put the case structure out of the loop (nothing changes) it still run again continously (i think because the lines came from the structure go into the loop ---but I am not sure)

    So how can i make the case structure to send the commands only once?

    thank you for your help in advance!

    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.