Long push on button

Discuss PC Developer and Web Developer projects and features here.
medelec35
Matrix Staff
Posts: 1913
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 619 times
Been thanked: 644 times

Flowcode v10 Re: Long push on button

Post by medelec35 »

Hi.
Now there is no need to worry about it.
A new timer interrupt component has been created as I believe it will be very useful for PC developer projects going forward.
It's simple to use when compared to other interrupts.
The component will allow you to select a user macro, or add your own.
The description:
A component for PC developer only.
The timer interrupt can be set to trigger a specified User macro every time a set time has elapsed.
Time units that can be selected are: Milliseconds, Seconds, Minutes, Hours or Days
Maximum milliseconds = 4294967295
Maximum seconds = 4294967.
Maximum minutes = 71582,
Maximum hours = 1193,
Maximum days = 49


Before the component is added to the component database.
Browse to this location using file explorer , it's hidden by default so just paste the link into your address bar.

Code: Select all

%ProgramData%\MatrixTSL\FlowcodeV10\Components
Place the attached component.
If Flowcode is already open, then you will need to reload your project for the new component to work
If you run any component updates, then the component you added will be overwritten, so it will stop working again (unless the component update has been pushed).
I have also included your project updated with the new timer interrupt component.
Don't open the project until you have added the timer interrupt component to the specified directory first, otherwise your project won't work as expected.
Attachments
TimerInterrupt.fcpx
(2.67 KiB) Downloaded 32 times
PC Dev Simple USB Sender with API timer.fcsx
(38.14 KiB) Downloaded 28 times
Martin

User avatar
Nico595
Posts: 76
Joined: Tue Jul 04, 2023 4:17 pm
Has thanked: 16 times
Been thanked: 3 times

Re: Long push on button

Post by Nico595 »

Thank Martin,

I will add the Interrupt timer in my component list.
I will reorganise my timer function to use this component on small task. My project count more 80 timers. It's a big project with many functions and with a real time recorder.

medelec35
Matrix Staff
Posts: 1913
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 619 times
Been thanked: 644 times

Re: Long push on button

Post by medelec35 »

Thanks Nico.
Would you mind checking the timer with the project I modified and letting me know if the component does the required job or not?

If you are happy with it it can be pushed on to the component database.
Martin

medelec35
Matrix Staff
Posts: 1913
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 619 times
Been thanked: 644 times

Re: Long push on button

Post by medelec35 »

Sorry, I just noticed on the example that within the counter user macro, I have left a TimerStart API at the bottom.
That can be deleted.
Also I have tried with multiple new timer interrupt components, and there was not an issue for me.
Martin

User avatar
Nico595
Posts: 76
Joined: Tue Jul 04, 2023 4:17 pm
Has thanked: 16 times
Been thanked: 3 times

Re: Long push on button

Post by Nico595 »

Your Timer component work fine in my project and it's very easy to use. Great job, thank Martin.
You can add this component in the database,

I must eat, I come back to you tonight with some information.

Thank you so much :)

User avatar
Nico595
Posts: 76
Joined: Tue Jul 04, 2023 4:17 pm
Has thanked: 16 times
Been thanked: 3 times

Re: Long push on button

Post by Nico595 »

Martin,

All timers share the process time. With a good setup of macro, we can use the component timer interrupt like the Interrupts.
I have no conflict with button process when a button is pushed. If the process of the button is too big like create file or write file, I think better use buffer to write file. I checked with small files without problem with the timers. It's all right :)

I will add 16 Component Timers to create around 80 timers. After that, I will add the real time recorder.

I dispatched all functions on 4 panels, like this the user can adjust all parameters on 2 display. The result is very nice.

Thank you so much for your help.

medelec35
Matrix Staff
Posts: 1913
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 619 times
Been thanked: 644 times

Re: Long push on button

Post by medelec35 »

Your welcome.
I have just added more functions to the timer interrupt timer.
Now you can change on the fly the interrupt time of milliseconds, seconds, Minutes, hours or days:
Timerinterrupt new functions.png
Timerinterrupt new functions.png (20.22 KiB) Viewed 8511 times
I have attached the updated TimerInterrupt component and an example.
Attachments
Timer interrupt component test.fcsx
(19.6 KiB) Downloaded 32 times
TimerInterrupt.fcpx
(3.06 KiB) Downloaded 39 times
Martin

User avatar
Nico595
Posts: 76
Joined: Tue Jul 04, 2023 4:17 pm
Has thanked: 16 times
Been thanked: 3 times

Re: Long push on button

Post by Nico595 »

Hi Martin,

It's perfect, thank you :)

Built in functions are very interesting. Video about this on your Youtube channel are welcome. Also a video "how to do" to design a component like this Timer with Built in functions.

Console to see the threads executing in real time may be interesting tool.

All the best.

Post Reply