Jump to content

bbean

Members
  • Content Count

    245
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by bbean

  1. The event structure is in a parallel loop (just like your consumer loops) with a branch of the VISA session going to it after your initialize. The event loop will be waiting for an event (in this case the stop button press). When you press the stop button it will fire an event , in that event you would execute the VI I attached which should kill the VISA session, which will cause an error in the Read VI (unlocking it) in your loop where you currently have the stop button control wired up.
  2. Not sure this will work, but try using the attached VI in a parallel while loop with an event structure and event case for stop button value change. Its just a wrapper around the viTerminate function in VISA. Also put a sequence structure around the current stop indicator and wire the error wire from just above to the new sequence structure to enforce dataflow to the stop button. This way it will read the correct value after the event structure fires. Not sure why you would do this but if its your preference then go ahead. As you can see its causing you problems Don't
  3. The last time I did data acquisition that required start triggering (ai/StartTrigger) was 5 years ago in a LV8.6 application. I seem to remember that the dataflow would pause at the slave's DAQmx Start Task.vi until the master arrived at its DAQmx Start Task.vi, then each task would proceed to their DAQmx Read VIs. Fast forward to LV2014 where I'm trying to help someone on another project get DAQmx start triggering working. In LV2014, the process appears to operate differently and the slave's DAQmx Start Task.vi executes without pause and continues to the DAQmx Read.vi where it doesn't
  4. Recently I was having massive slowdowns opening VIs, including classed, but the culprit turned out to be an old link to an SCC Perforce Server that was not valid. Not sure if that is your problem or not, but if you have source control enabled in labview, you could check that.
  5. What if you decrease the frequency of the 0x00 eg. have a 1ms wait between each 0x00 send and use a while loop that exits after 1 second of elapsed time (vs a for loop).
  6. I can't really tell from the NItrace or code. Do you have the manual that describes the wakeup protocol that you could also attach? Is the touch panel a "real" serial port or a USB to serial converter? One problem I've had in the past with USB comm (or USB->serial com) was with the OS sending the USB ports to sleep. Not sure if it could/would be able to do this on a "real" COM port. Check the Advanced Power Settings in Control Panel\All Control Panel Items\Power Options\Edit Plan Settings and disable this everywhere. You may also have to disable something in the BIOS. The wor
  7. Can you attach your 2009/2012 VIs and NI IO Trace logs?
  8. As a work around, what if you open with Option set to x100? it seems to release memory then. I don't know if its bad form or opens another can of worms to open with "Prepare to call and collect" but never collect. The documentation seems to indicate so. Quote: If you use this option flag (x100), you must include one Wait On Asynchronous Call node for every call that you begin with a Start Asynchronous Call node to ensure that LabVIEW does not retain any started calls in memory indefinitely.
  9. Obviously this depends on the circumstances, but what mechanism do you use to execute the "do" portion of code that could hold up the event structure? Do you just pipe information into a parallel queued state machine or actor? Is there a post on lavag or on the darkside that lays out the benefits or pros and cons of this (using user events) vs just directly piping the "do" into a separate parallel queued state machine queue?
  10. Do all your loops with CAN communication have a Wait ms in them? Maybe CAN performance got better and the PC doesn't have time to sleep.
  11. What type of performance hit would you expect manipulating pixels using IMAQ ImageToEDVR and an IPE? Curious as to the difference between an algorithm implemented with this technique vs a c DLL call, but I'm not near a development environment with Vision.
  12. Are the Matrox dll calls thread safe? Are you making any dll calls in your image processing? Is it possible they are executing in the user interface thread?
  13. Off topic: that looks like one of the most interesting/promising improvements to the Vision toolkit in a while.
  14. CharlesB...I can't figure out where your race condition is. Also am not sure why you need all the extra mechanisms (Semaphore, DVR, Status) when you can achieve the same thing using 2 simple queues as shown in my example. Plus the 2 queue approach guarantees you can not work on the image being displayed until it is put back in the camera/processing pipeline. IMHO it is a simpler and easier to debug solution. The other thing my solution does is allow you to do the image processing in "parallel" to your acquisition.
  15. ShaunR - I was unaware that you could use events like that with Imaq IO refs...very nice. I will have to remember that for my next vision app. While the Godwin Global approach is nice, I think there are two issues: 1) I believe the poster is not using IMAQ camera interface (Matrox proprietary instead) and 2) Somehow his Imaq Image Display is getting corrupted by newer images when it is updated faster (400fps) than it can be painted by the OS. I'm not suggesting the "triple buffering" approach is the proper solution here, but I am collaborating with the hopes that he can see a "simpl
  16. Triple Buffering with simple queues and shift register. BufferTest.llb
  17. Is the attached closer to what you want? it prevents the "corruption" of the imaq image ref by taking it out of the cam /processing buffer while it is being displayed. The third image reference in the VI is pretty much worthless. But wanted to see if this was a step closer. BufferTest.llb
  18. How fast can you run your acquire and processing loop if you do not display? So passing the imaq reference to a display loop with a notifier doesn't work because you are afraid you may be overwriting the "displayed" image in the notifier loop?
  19. Can you share your code? Are you doing any image processing? Can you drop frames on the image processing?
  20. Threw together some quick code using an Express VI (GASP) to test the theory. Haven't run or debugged other than with my webcam. The Queue should prevent race conditions and provide a little margin on processing. Not sure how many data copies of the images will exist. Don't have time to investigate. Bean BufferTest.llb
  21. does anyone know if the code for the Edit Format String dialog box is written in LabVIEW and is it available somewhere in the LabVIEW directory?
  22. Yes. We had a similar experience using VISA but with USB Raw calls in parallel to an FTDI chip on a NI RMC running LabVIEW 2012 RT (no virtual comm port). We ended up having to remove the parallel loop and could not determine the root cause.
×
×
  • Create New...

Important Information

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