From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems to implement a solar regulator in a Producer-Consumer-Loop / flags

Hello everyone!

I hope to get some help to implement my solar regulator in a producer consumer loop.

In dependence of different temperature levels, a solar pump should be switch on or of. In addition I implemented a over temperatur protection. If the over temperatur level exceeds, the pumpe should switch on again at a temperatur, wich is about 10 degrees below the over temerature.

To implement every situation, I used a state maschine which is running in a loop. In addition I used a shift register as a flag for the following:

  • pump is switched on or off
  • overstep of the temperatur
  • stop buttonpressd

I need these values in the next case to choose the right Case.

The regulator itselve is working fine.

 

But if I like to use it in my producer consumer loop I got trouble.

I know, the loop of the regulator need to stop by itselve, so that the Producer loop can continiue. But if I stop and start the regulator VI again, I lose all the set flags/ values in my shift register.

 

I thought about to use a global variable for storing the values of the pump, the stop button an the over temperatur. But would this not be a kind of dirty solution? Any better ideas?

 

Atteched:

Regulator "Regler Zustandsautomat"

Producer Consumer loop with regulator "Producer Consumer Loop"

0 Kudos
Message 1 of 2
(2,098 Views)

Hi Laudst,

 

several options:

- use an uninitialized shift register in your regulator subVI to store internal settings

- use a shift register in the consumer loop to store the regulator settings

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(2,081 Views)