F_BA_SetWeekdays

F_BA_SetWeekdays 1:

The F_BA_SetWeekdays function sets entries in a weekly schedule for a contiguous range of weekdays.

To do this, the program iterates over the first dimension of aWeek. For each day between eDayFrom and eDayTo (inclusive), the function F_BA_SetSchedulerEntry is called for entry index nIndex, and the scheduler entry is populated with tEntryTime and uEntryValue.

Nothing is assigned to the function’s return value itself.

Syntax

FUNCTION F_BA_SetWeekdays : BOOL
VAR_IN_OUT
  aWeek       : ARRAY[*, *] OF ST_BA_SchedEntry;
END_VAR
VAR_INPUT
  eDayFrom    : E_BA_Weekday := E_BA_Weekday.eMonday;
  eDayTo      : E_BA_Weekday := E_BA_Weekday.eSunday;
  nIndex      : INT          := 1;
  tEntryTime  : TIME;
  uEntryValue : U_BA_ClassValue;
END_VAR

F_BA_SetWeekdays 2: Inputs/outputs

Name

Type

Description

aWeek

ARRAY[*,*] OF ST_BA_SchedEntry

Reference to the weekly schedule to be edited, containing the schedule entries to be set.

F_BA_SetWeekdays 3: Inputs

Name

Type

Description

eDayFrom

E_BA_Weekday

First weekday of the range to be set (inclusive).

eDayTo

E_BA_Weekday

Last weekday of the range to be set (inclusive).

nIndex

INT

Index of the schedule entry within a weekday.

tEntryTime

TIME

The time entered in the relevant schedule entries.

uEntryValue

U_BA_ClassValue

Value entered in the relevant schedule entries.