LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with Flat Sequence Structure for retaining data between Loops

Greetings Everyone, 

 

I am trying to interface LabVIEW with a Eurotherm 3504 Temperature Controller with the aim of achieving an automatic operation.

 

The system should be such that an user enters the Temperature, the Controller follows the command fed into LabVIEW, reaches the Setpoint and after that is done it stays on the setpoint for a specified amount of time.

 

I chose to use a Flat sequence Structure for this task and seems to be working well. However, there is an issue which I am not able to address. 

 

Once the Controller reaches the setpoint, I use a compare operator to stop the present loop in the present section of the Sequence Structure and jump onto the next one which runs for a specified amount of time with the Elapsed Time Express VI. 

 

Once this so called jump takes place between the two loops, the system forgets the data of the last loop. I wish that the system retain the data and display the data in continuation with the data of the present loop.

 

Naturally, the Save to Excel Express VI also saves the data from the second loop, ignoring the data from the first loop. Can someone please help me identify what I am missing to solve this issue.

 

I have attached a copy of the vi and a  snippet of my code with this post. It needs two other VI's to run still It may help you to understand what I have done in the code.

                                                                                         

Advice as well as suggestions for a  better architecture are most welcome. Any help would be deeply appreciated 

 

Kind Regards,

Jalashwa

 

 

 

   

 

Download All
0 Kudos
Message 1 of 4
(2,326 Views)

You're only updating the latest values not collecting them.Use insert into array function.

bp
0 Kudos
Message 2 of 4
(2,285 Views)

Here is not only a Simple Fix, but a way of remembering and using the key element of LabVIEW, the Principle of Data Flow:

  1. Use the Error Line to "serialize" code where necessary.  In particular, connect Error Out from Kollector Express VI to Error In of Kollector2.
  2. Draw a While Loop around the Frame Sequence, then delete the Frame Sequence.
  3. Use Shift Registers (in the While Loop) to "retain data between loops".  That is their main function.
  4. When did you want to use VI Server to start Read and Write VI?  If you want it done before the now-a-While Loop, use the Error Lines to sequence them.  Similarly, if you want to reset all values to default before doing anything else, make sure (using the Error Line) this gets done first.

Bob Schor

Message 3 of 4
(2,258 Views)

Hi Bob,

 

Thanks for your inputs  and they make a lot of sense to me.

 

I am out trying implementing what you have suggested, keeping this thread open incase I have further questions

 

BR,

Jalashwa

0 Kudos
Message 4 of 4
(2,208 Views)