Function: Background - v3.1
The _background function generates the basic system signals, such as clock signals,
clock pulses, date, day of the week, etc.
Dependencies
Section titled “Dependencies”| Type | Name | Version |
|---|---|---|
function | TON_TIME | Siemens FB |
function | RUNTIME | Siemens FC |
function | RD_LOC_T | Siemens FC |
Parameters
Section titled “Parameters”Function
Section titled “Function”| Parameter | Declaration | Type | Initial value | Description |
|---|---|---|---|---|
OB_initial_call | Input | Bool | 0 | IR: Map the initial call from OB1. |
HW_firstScan | Input | Bool | 0 | IR: Map the first scan from memory bit. |
HW_diagStatusUpdate | Input | Bool | 0 | IR: Map the diagnostic status update from Memory bit. |
HW_clock | Input | Byte | 0 | IR: Map the clock byte from Memory byte. |
HW_TRUE | Input | Bool | 1 | IR: Map the always TRUE from Memory bit. |
HW_FALSE | Input | Bool | 0 | IR: Map the always FALSE from Memory bit. |
clockSource | Input | Bool | 0 | IR: Clock source:0=From HW if configured. 1=This function generates it. |
TMP_EMRG_BYPASS_TIMEOUT | Input | Time | T#0s | IR: Temporal emergency bypass timeout:=0=Forever >0=Timeout |
PROV_TRUE | Output | Bool | 1 | OR: Provisional always true. |
PROV_FALSE | Output | Bool | 0 | OR: Provisional always false. |
clock | Output | Byte | 0 | OR: Block output if done by HW or SW. See here. |
pulse | Output | Byte | 0 | OR: Get positive edges from clock. See here. |
cycleTime | Output | Time | 0 | OR: Cycle time in milliseconds. |
now | Output | DTL | 1970-01-01T00:00:00.0 | OR: Current date and time. |
weekday | Output | Struct | - | OR: Current weekday in bits. See here. |
tmp_errorAckn | InOut | Bool | 0 | IOX: Temporal - Error acknowledgment. |
tmp_emrgAckn | InOut | Bool | 0 | IOX: Temporal - Emergency acknowledgment. |
tmp_emrgBypass | InOut | Bool | 0 | IOX: Temporal - Emergency bypass. |
tmp_loadFactory | InOut | Bool | 0 | IOX: Temporal - Load factory settings. |
Weekday Structure
Section titled “Weekday Structure”| Name | Type | Initial value | Description |
|---|---|---|---|
d0_nil | Bool | 0 | 1=Null day. |
d1_sunday | Bool | 0 | 1=Sunday. |
d2_monday | Bool | 0 | 1=Monday. |
d3_tuesday | Bool | 0 | 1=Tuesday. |
d4_wednesday | Bool | 0 | 1=Wednesday. |
d5_thursday | Bool | 0 | 1=Thursday. |
d6_friday | Bool | 0 | 1=Friday. |
d7_saturday | Bool | 0 | 1=Saturday. |
Clock and Pulse
Section titled “Clock and Pulse”| Bit | Period (s) | Frequency (Hz) |
|---|---|---|
| .0 | 0.1 | 10 |
| .1 | 0.2 | 5 |
| .2 | 0.4 | 2.5 |
| .3 | 0.5 | 2 |
| .4 | 0.8 | 1.25 |
| .5 | 1.0 | 1 |
| .6 | 1.6 | 0.625 |
| .7 | 2.0 | 0.5 |