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.
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.
03-23-2009 12:50 PM
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
03-23-2009 12:56 PM
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.
03-24-2009 08:49 AM
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
03-24-2009 02:00 PM
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...