Compiler reports 'unknown identifier' using PWM

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

Moderators: Benj, Mods

Post Reply
cleverchip
Posts: 7
Joined: Wed Sep 05, 2007 4:58 pm
Location: Leeds
Contact:

Compiler reports 'unknown identifier' using PWM

Post by cleverchip »

When compiling to hex I receive an error from the compiler, 'unknown identifier' using PWM component. The identifiers which it thinks are undefined (I presume) are the PWM variables (Enable, ChangePeriod, etc).

Have I missed a step in using the PWM component? ie, was I supposed to copy some code into the Supplementary Code box, etc?

Any help appreciated...

User avatar
Steve
Matrix Staff
Posts: 3426
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Post by Steve »

The PWM component should work on its own without any additional code.

Please post your FCF and C files to us (support@matrixmultimedia.co.uk) and we'll look into this.

cleverchip
Posts: 7
Joined: Wed Sep 05, 2007 4:58 pm
Location: Leeds
Contact:

Post by cleverchip »

Thanks, Steve - I'll mail the files to you. However, I think I have made some progress in terms of the symptoms - the errors are present whenever I try to use the PWM component in a flowcode program that also contains the Formula Flowcode component. Is there some conflict here?

(I was simply trying to make comparisons between the FF macro and a simple one that I wrote using the PWM component. I intended the buggy to drive forwards for a couple of seconds on the FF macro, pause, then do it again using my own driver macro!)

Cheers...

User avatar
Steve
Matrix Staff
Posts: 3426
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Post by Steve »

I've just tried the PWM and the Formula Flowcode components in the same program and not been able to get this error.

I will look at your code when I receive it.

User avatar
Steve
Matrix Staff
Posts: 3426
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Post by Steve »

Hello,

Thanks for the files. I now know why the errors are generated...

You will get the same error if you add the Formula Flowcode component to a new blank program, but do not call any of its macros.

To get around this, simply add a call to one of the Formula Flowcode macros somewhere in your program.

Post Reply