Runs ok in HW but not in simultator

Moderator: Benj

Post Reply
iain wilkie
Posts: 97
Joined: Tue Jul 14, 2009 4:37 pm
Has thanked: 13 times
Been thanked: 9 times
Contact:

Runs ok in HW but not in simultator

Post by iain wilkie »

This program assembles ok and downloads into my hardware where it seems to run fine.
However if I run it in the simulator it runs to a point where it gets caught in a loop where
it is sitting at the END of "READ_ANALOGUES" macro where it seems to never return back to the "RAMP_UP"
program. While it sits there, the interrupt routine macro kicks in (thats ok).

Any thoughts ????

Iain
Attachments
Inflation REV3.fcf_avr
(21.84 KiB) Downloaded 264 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: Runs ok in HW but not in simultator

Post by Benj »

Hello Iain,

If you pause the program and start stepping through then you will see that the simulation does leave the macro. When the simulation is running full speed you do not see the window change. However if you reduce the speed of the simulation via the project options window then you will be able to reduce the simulation running speed to allow you to see the simulation working correctly.

iain wilkie
Posts: 97
Joined: Tue Jul 14, 2009 4:37 pm
Has thanked: 13 times
Been thanked: 9 times
Contact:

Re: Runs ok in HW but not in simultator

Post by iain wilkie »

Hi Ben,

Thats what I was doing .... stepping through .... even from the beginning of the program. I'll try it again with the sim speed turned back.

Iain

Just tried that and its exactly the same, gets to the end of the Read Analogues Macro and never returns to the Rampup macro !
:x
Iain

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: Runs ok in HW but not in simultator

Post by Benj »

Hello Iain

Ok sorry I have spotted and rpelicated the problem now. I will pass it onto the Flowcode engineers and see if we can find out why this problem is happening. From the offset it looks like the interaction between the simulation of the interrupt and the end of the macro is causing a bit of a problem.

Post Reply