LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Producer Consumer Event Structure with Continuous Display

Turns out that I was programming the supplies with a current limit of 0.  Doh!    Though, I learned something from all the suggestions on structure and good practices.   Thanks to all that posted suggestions.   I would still like to incorporate the 3rd while loop into the queue structure.  Aputman, I need to study your layout I'm trying to figure out how the first loop continuously runs.  I'm still a novice when it comes to queuing structures.  Thanks. 

0 Kudos
Message 11 of 16
(847 Views)

How does a current limit of 0 stop your UI from responding?

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 12 of 16
(838 Views)

Technically, I was still able to press buttons and update the voltage setting, so I wasn't totally locked out.  It is just that the current and voltage readings were always zero no matter what change that I made.  With a zero current limit, the voltage reading will also stay at zero.  Thanks.

0 Kudos
Message 13 of 16
(836 Views)

Gotcha. 

 

In regards to your comment about the third loop, with your code as posted, there is no reason to use a queue because you are only displaying the data.  If you want to store the data or act on it in any way, then you might want to use a queue to move the data to your consumer loop to handle those actions and keep the display updating without those delays. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 14 of 16
(833 Views)

I do plan to have a file log of the voltage and current readings taken at a regular frequency...once every 10 seconds or so.  In this case, you think putting it into a consumer loop would be beneficial?

0 Kudos
Message 15 of 16
(829 Views)

@jschichl wrote:

I do plan to have a file log of the voltage and current readings taken at a regular frequency...once every 10 seconds or so.  In this case, you think putting it into a consumer loop would be beneficial?


The problem you could run into is with the communications.  If you have one loop requesting data and before the data is sent back the other loop sends data, you could potentially get an error from your instrument.  It is best to have all of your communication in a single location to avoid those kinds of race conditions.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 16 of 16
(824 Views)