Список форумов   Список форумов  

Параметры timed loop в labview 7.1

Всё о программировании на Labview

Модераторы: Техподдержка NI, Robert, Модератор

Параметры timed loop в labview 7.1

Сообщение pajal'nik » Чт окт 11, 2007 1:04 pm

В настройках timed loop есть настройки, физический смысл которых мне не совсем понятен. В частности группа параметров "Timed loop action on late iterations", параметр "time out" и его значения, а также параметр "priority" и его численное значение.
Сообщений: 1
Зарегистрирован: Пн окт 08, 2007 3:29 pm

Сообщение jonni » Вс окт 21, 2007 9:44 am

Esli vse esche interesno (voobsche govorya vse vrode v help napisno, v chem konkretno vopros?):

Loop Timing Attributes: Priority:

Priority—Specifies the priority of the execution of the timed structure relative to other structures that are ready to execute. The higher the number you enter, the higher the priority of the timed structure over other structures. The value for the Priority must be a positive integer between 1 and 2,147,480,000.

Note These priorities are different from VI priorities. LabVIEW executes the timed structures at a priority level below the time-critical priority and above the high priority. The LabVIEW execution system is preemptive, so a higher priority timed structure that is ready to execute preempts all lower priority structures also ready to execute and other LabVIEW code not running at time-critical priority.

Action on Late Iterations: Maintain Original Phase checkbox:

You can handle the late execution of a Timed Loop in the following ways:

LabVIEW can align the execution with the original established schedule.
LabVIEW can define a new schedule that starts at the current time.

For example, if you set a Timed Loop with a period of 100 ms and an offset of 30 ms, you expect the first loop iteration to execute 30 ms after the first timing source starts running and in multiples of 100 ms after that—at 130 ms, 230 ms, 330 ms, and so on. However, the first execution of the Timed Loop might occur after 240 ms have elapsed. Because other Timed Loops or hardware devices might already be running at the schedule you specified, you might want to align the late Timed Loop with the already running global schedule, which means the Timed Loop should align itself as quickly as possible with the schedule you specified. In this case, the next Timed Loop iteration would run at 330 ms and continue to run in multiples of 100—at 430 ms, 530 ms, and so on. If aligning the Timed Loop with other Timed Loops or other hardware devices is not important, the Timed Loop can run immediately and use the current time as its actual offset. In this case, the subsequent loop iterations would run at 240 ms, 340 ms, 440 ms, and so on.

Action on Late Iterations: Discard missed periods check box:

You can handle the late execution of a Timed Loop in the following ways:

The Timed Loop can process the missed iterations.
The Timed Loop can skip any missed iterations.

If the Timed Loop is late, it might miss data other Timed Loops or hardware devices generate. For example, if the Timed Loop missed two iterations and some of the data from the current period, a buffer could hold the data from the missed iterations. You might want the Timed Loop to process the missed data before it aligns with the schedule you specified. However, a Timed Loop that processes the missed iterations causes jitter, which is the amount of time that a loop cycle time varies from the time you specified. If you do not want to process the missed data, the Timed Loop can ignore older data in the buffer the loop iterations missed and process only the latest data, such as the data available at the next period and the subsequent iterations.

Advanced Timing: Timeout

A timeout specifies the maximum amount of time, in milliseconds, a subdiagram can wait to begin execution. The timeout value is relative to the start of the iteration or relative to the end of the previous frame. If the execution of the subdiagram does not begin before the specified timeout value, the Timed Loop returns Timeout in the Wake-up reason output of the Left Data node for that frame.

In the following example, the first frame of the Timed Sequence executes for 50 ms. The second frame is configured to start 51 ms after the start of the Timed Sequence. The timeout value of 10 ms for the second frame indicates that the frame can wait 10 ms to start after the completion of the first frame. If the second frame does not start before 10 ms, the structure continues to execute the rest of the iteration untimed and the second frame returns Timeout in the Wakeup Reason output of the Left Data node.

If a timeout occurs in a timed structure, the structure continues to execute the rest of the iteration untimed to preserve the phase specified by the period. The timed structure returns Timeout in the Wakeup Reason output of the remaining frames. The timing information provided by the remaining frames equal the timing information for the frame where the timeout occurred. If a Timed Loop must complete another iteration, the loop stops at the same frame where the timeout occurred and waits for the original timeout event.

The default timeout value for the first frame of a timed structure is -1, which indicates to wait indefinitely for the start of the subdiagram, or frame. The default timeout value for other frames is 0, which indicates no change from the timeout value of the previous frame.
Активный пользователь
Сообщений: 45
Зарегистрирован: Пн окт 15, 2007 11:26 am

Вернуться в LabVIEW

Кто сейчас на форуме

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 0