Timer (storage) compile error with Mega2560

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

Moderator: Benj

Post Reply
viktor_au
Posts: 342
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 43 times
Been thanked: 60 times
Contact:

Timer (storage) compile error with Mega2560

Post by viktor_au »

Hi
Question to Matrix team.

After I did the update, the Uno and Mega, during the 'Compile to HEX' process do return the errors.
It only happened with added Timer (storage).
No problems without the Timer.
I am not sure what has happened.
I used the Timer (storage) yesterday with the Uno project. All worked OK.
Today I had to move the project to Mega2560 and did some updates (again) and the problems began.

Any help please?

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Timer (storage) compile error with Mega2560

Post by Benj »

Hello,

Please can you attach your project that is showing the error.

The .msg.txt file that is generated would also be useful so we can see the errors being generated.

You might just need to refresh the component properties, maybe point the component to a different timer and then change it back and hopefully this will reset things.

viktor_au
Posts: 342
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 43 times
Been thanked: 60 times
Contact:

Re: Timer (storage) compile error with Mega2560

Post by viktor_au »

Hello Ben

The attached files:
- the program with Timer1(storage) in it (with error in compiling process)
- .msg file
Attachments
Mega_timer1_error.msg.txt
(1.47 KiB) Downloaded 143 times
Mega_timer1_error.fcfx
(88.98 KiB) Downloaded 156 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Timer (storage) compile error with Mega2560

Post by Benj »

Thanks for posting the files.

I think the problem is the timer componet relies on code to generate the appropriate interrupt to deal with the timer overflows. As you haven't referenced the component in the code this isn't currently happening. If you add in a call to the component in your code or delete the component then hopefully the problem will go away. Seemed to fix the issue for me.

If this doesn't solve it for you then please let me know and I'll investigate further for you.

viktor_au
Posts: 342
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 43 times
Been thanked: 60 times
Contact:

Re: Timer (storage) compile error with Mega2560

Post by viktor_au »

Thank you Ben
All good now.

A few more questions please.
--------------------------------------
1. How can I test the timer1 (storage)?

I used the delay component to let timer do the counting.
However the result is a different from expected.
What is the reason?
-------------------------
2. Timer1 has own display.
This display shows the numbers with dot.
No units after numbers.
Is it in seconds?
Attachments
1000msDelayShows0.750.jpg
1000msDelayShows0.750.jpg (35.44 KiB) Viewed 2656 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Timer (storage) compile error with Mega2560

Post by Benj »

Hello,

The simulation will be a bit out, it relies on Windows timing to do the incremental tick and so will generally be a bit behind. On hardware it should be pretty bang on (probably more accurate then the delay).

0.750 = 0.75 seconds.

viktor_au
Posts: 342
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 43 times
Been thanked: 60 times
Contact:

Re: Timer (storage) compile error with Mega2560

Post by viktor_au »

Thank you Ben

Post Reply