Skip to content

At Hour

RobotAgentz uses 24 hour clock or also known as military time. If you are not familiar with this please read What is Military Time?

The At Hour task block consists of an input and a True and False outputs.


If the input to this block is triggered the first entry for the hour number (0-23) will be compared to the actual hours number (0-23) and if they match the True output will be triggered else the False output will be triggered.

TIP

One thing to keep in mind when using this block is that an hour will be true for an hour, so if you run some other task blocks when this block is true and then go back to it to check for the hour it will run again. This could cause a situation where you could be running some logic many times during an hour instead of just running it once for that hour. The way to combat this is to add another at hour after your logic to determine if the next hour has come before going back to the original hour to be checked. The example below will show this configuration.

Examples

Here is an example of a mission that checks if the current hour number is 17 representing 5:00PM. If it is 5:00PM then it will trigger a log message block to write "End of work day!" in the mission log. Then after the logging of the message another At Hour block will be used to check if the previous hour has passed. If so, then the process moves back to the original At Hour block. This setup only allows the writing to the log to occur once each day. If the At Hour is not 5:00PM then the false output will be triggered which will go to a delay block for a delay of 900 seconds or 15 minutes. The same process is used for checking that the hour is at 6:00PM. The Exit block is never connected because this is a continous mission.


Copy / Settings / Docs

Each task block has three buttons named Copy, Settings, and Help.

  • Copy: This will duplicate the task block with all the current settings.
  • Settings: Settings will show a dialog that allows some added configuration for the block
    • Note: This allows you to add a text note for the current block. This note will appear in the log file if the Block Loggin option is enabled.
    • Transition Out Time: Each block can specify a delay in milliseconds that it will wait after an output trigger is activated. This feature is generally not used but is avilable for more granular flow control of the mission if needed.
    • Block Logging: If this is enabled then the internal logging of the block is turned on and will be sent to the mission log. Each block has different amounts of internal logging which can make mission logs become large in some cases. Users generally do not enable this feature because of the limits to data storage.