Weekday and Time Variables

<< Click to Display Table of Contents >>

 

Weekday and Time Variables

Use a Block Tag with 2 (two) Elements to manipulate variables declared in ScapeWorks with a Weekday and Time data type, according to the parameters described on the next table.

 

B1

Not used

B2

Specifies a unit number

B3

100 (Weekday and Time data type)

B4

Not used

Size

2 (two)

 

This Block Tag must contain the following Elements:

Element 1: Weekday in Number format

Element 2: Time in Date and Time format

 

The first Element refers to a weekday by manipulating a number value represented by the map of bits on the next table.

Map of bits for the first Element

position

weekday

value

Bit 0

Sunday

0: Off or 1: On

Bit 1

Monday

0: Off or 1: On

Bit 2

Tuesday

0: Off or 1: On

Bit 3

Wednesday

0: Off or 1: On

Bit 4

Thursday

0: Off or 1: On

Bit 5

Friday

0: Off or 1: On

Bit 6

Saturday

0: Off or 1: On

Bit 7

Except Holidays

0: Off or 1: On

 

Users can manipulate these bits individually by enabling access to the bits in the first Element of this Block Tag.

The second Element refers to time, manipulating a number value representing the number of seconds since 01/01/1970, that is, it only requires information about the time of the first 24 hours, discarding any additional seconds to represent dates greater than 01/01/1970.

 

NOTES

Each type of variable and unit of an HSNET network must be pre-programmed using ScapeWorks program.

Readings and writings must occur at Block Tag's base, always processing its 2 (two) Elements together, such as "BlockTag.Write()".

Was this page useful?