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: 

Saving data and running application in a different time rate - Write to Measurement File

Hi!

 

I´m using a tab control to navigate through several pages in a process control application. In one of the tabs, I use the Write to Measurement File Vi to save data with acquisition time of 1 second. I´d like to run my application at a different time rate. How can I do this? If needed, I can post my code here (if anyone explain how!).

 

Thanks in advance.

 

Mauro

 

Mauro

Labview 8.2
0 Kudos
Message 1 of 4
(2,336 Views)

Hi Mauro,

 

adding attachments is done by using the "Add attachment" button below the "Tags" line wen composing a new message... If thevi is big or you need to attach several vis you may zip them before attaching.

 

What do you mean by "pages"? Front panel tabs are irrelevant on the block diagram...

Do you speak of frames of a sequence? Sequence are often considered "evil" - well at least they are seldomly useful...

 

When you need different rates you may use two independent loops or (by an integer ratio) a case structure, which is called only every n-th iteration.

 

So it seems you should attach the vi you already made.

Best regards,
GerdW


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

GerdW:

 

Thank you for your answer. I think I wasn´t clear enough while explaining my problem. . Let me try to be more specific: I want to control a tank (level and pH) using PID and other techniques, but I wanted to run my application, lets say, every 1 second. But I wanted to save data with an acquisition time of, for example, 2 seconds. I´m using tab control (case structure inside a while loop). How can I do this?

 

Attached to this message is a jpg image of my block diagram.

 

Best regards,

 

Mauro

 

Mauro

Labview 8.2
0 Kudos
Message 3 of 4
(2,299 Views)

Hi Mauro,

 

a "tab control" is a front panel object. You use a state machine on your block diagram...

 

When the timing of the file write is a multiple of the pid loop you can put a case structure around the file write, where the active case is executed only every n-th iteration.

The better approach would be to use two independent loops, especially to have better timing in the PID loop...

Best regards,
GerdW


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