04-10-2013 02:20 PM
Hello,
I don't know what I did wrong,
I make a program with 4 loop that communicate with each other by using notifies the queue
but sometime when I click on a button the queue is not change, the program enter to the event structure but don't change the queue.
And I also have a memory leak after an hour of working the ram rise by 7mb-10mb
hope that you can help me
thanks
johnny.
04-10-2013 02:33 PM - edited 04-10-2013 02:34 PM
04-10-2013 03:10 PM
hi GerdW
if you have good comment please give it to me,
The main problem in labview is there is no good tutorial about how to make things right, all the tutorial i readed is only about the feature in labview.
the only i manage to taught my self is from this forum.
hoop you will understand
04-10-2013 04:15 PM
Let's start a little slower.
Your architecture appears to use a queued state machine. Do a search on the forums to look at the general recommendations for using a QSM and common pitfalls.
The general LabVIEW recommendations for keeping blocksize diagram sizes small are there to facilitate debugging. It's good advice and your VI is almost scrollable vertically so my criticism is less harsh than Gerd's.
I think you're dequeuing in too many places. You really should only dequeue in your state machine handler(top loop) and your event structure should only be used for enqueing states.
I will take the time to note my own pet peeve though: Don't ever put an E-stop button on a SW interface! It's misleading and potentially dangerous. E-stops should always be implemented with failsafe hardware.
04-13-2013 01:42 PM
I think I figure out the problem,(when the queue is miss)
if I click on one of the button in the front panel, and the sequence loop(upper loop) is in a middle of waiting (on delay) the upper loop is missing the change of the queue,
I did change my code to be more readable,
about the memory leak: I also figure it out, I really think is the daq assistant.
how now you can help me with that.
04-15-2013 05:27 PM
Hi Johnny1986,
It might be easier if you isolated your issues and made smaller sample VIs for us to help you. This might also help you realise where you went wrong. As far as the daq assistant is concerned, you should probably be using the DAQmx read/write functions instead of the DAQ Assistant. I've attached a link to this at the bottom of this post of a community of DAQmx examples. I hope this helps!
https://decibel.ni.com/content/groups/ni-daqmx-examples
Regards,