timespan variable type not available
Paul G 2 years ago in bOS Configurator • updated by Doctore Esparta 9 months ago • 7
The timepsain variable type does seen to be a restricted variable type, i.e. I cannot create a string using such template, hence not making it available for making quick time comparisons between two variables.
In other words because the variable type is not available, it is not possible to compare two values, e.g. Time.TimeOfDay compared to "variable x". Because I cannot create a varaible X I cannot compare the Time of the day value offered by the system
Customer support service by UserEcho
I've tested, and in fact if you create, let's say a string, with a certain time of day variable, the TimeOfDay actually can't be compared to that string variable (it doesn't show up to select the string).
But my question is:
When you use a Task, and use a: If TimeOfDay equals... can't you use the constant field below and chose the time you want to compare? Or does your task need some variable that's not static? Let me know...
Thanks. Effectively as you rightly point out we want to use a variable to compare the value of TimeofDay, the variable is a variable not a fixed value. Because there is a lack of TimeofDay template we cannot compare TimeOfDay value to a variable, let's say X. The variable X would allow a user to effectively modify by the screen its value and hence allow a function to work based on parameters driven by time that is adjustable.
Effectively building some form of AI that can be parameterised. Currently TimeOfDay only allows to be compared to an integer value, it does not accept a string, hence it is a massive constrain not being able to compare timeofday to a variable that contains hour:minute:second, effectively defeats the purpose of trying to build a flexible AI logic. It is just not right that TimeofDay is a 'protected' variable type, OR the fact that the value of TimeofDay can only be compared to an integer
Below screenshot and the contracints resulting form the problem reported
a) Triggers need to be fixed, you cannot use a variable to compare
b) Logic in the programme is constrained to fixed variables - or reduced to comparing timeofday to an integer -bit of not worth the point
Any thoughts on this needed variable that is currently restricted as a system variable?
Still no solution? I have clients that need this variable to be able to enter dates that change the execution of the functions.
If not, please tell me how to concatenate integers to be able to make a date that is interpreted as such in the execution of the functions.
you can use our program task use time as trigger and create two hour/minute veriables, which you can change and use them in the program to trigger your devices (see example attached)
It is not the solution that I need for this case but I can try to obtain it by relying on your suggestion.
Thanks and regards