How to enter delay as a time in the Calculation box.?

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
astro1234
Posts: 50
Joined: Mon Apr 10, 2017 12:53 pm
Has thanked: 39 times
Been thanked: 13 times
Contact:

How to enter delay as a time in the Calculation box.?

Post by astro1234 »

Hi.
Can i use the calculation icon to enter a delay for time.
Example i make a var called Delay, then in the calculation box enter Delay = 100 milliseconds
How can i enter time in milliseconds/ or fraction of seconds in the calculation box.
Win 10 pro
Flowcode V8.1
Thanks Roy.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: How to enter delay as a time in the Calculation box.?

Post by medelec35 »

Hi Roy,
Delay icons accept variable names:
Variable Delay.png
(11.35 KiB) Downloaded 974 times
I'm not sure if there are any limits on the maximum value you can use but I believe the delays can be greater than 255 if required.
Martin

astro1234
Posts: 50
Joined: Mon Apr 10, 2017 12:53 pm
Has thanked: 39 times
Been thanked: 13 times
Contact:

Re: How to enter delay as a time in the Calculation box.?

Post by astro1234 »

Tried that out, would only work up to 255,
so changed the number format to int, and it works ok.
Thank you.
Regards Roy.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: How to enter delay as a time in the Calculation box.?

Post by medelec35 »

Hi Roy,
You're welcome,
Glad it's working for you.
Yes, you will need to change the variable type to reflect the value you're after.
For example, if you require a 300ms delay and the variable used is a byte, then the actual delay will be 300 - 256 = 44ms
The is because if you add 1 to a byte value of 255 then instead of being 256 the byte roles over to 0.
Reason being a byte in flowcode has the range of 0 to 255 only.
Best to use UInt as that goes from 0 to 65535
Martin

Post Reply