SET DELAY

Any general or miscellaneous queries that do not fit into the other forum catagories

Moderators: Benj, Mods

Post Reply
franky
Posts: 49
Joined: Tue Jan 13, 2009 7:23 pm
Contact:

SET DELAY

Post by franky »

hi,
I'm using Flowcode V3 but I have a problem...

I' must to change a delay time in ms fox example 1,1ms 1,2ms ecc. but I don't know how...

can someone help me?
thanks!

Sean
Valued Contributor
Valued Contributor
Posts: 548
Joined: Tue Jun 26, 2007 11:23 am
Has thanked: 6 times
Been thanked: 44 times
Contact:

Re: SET DELAY

Post by Sean »

Flowcode can not currently provide direct control of delays below 1ms. However, there is access to a function called 'delay_10us' via Flowcode C code blocks.

You could make a 1.1ms delay directly with the following C code:

delay_10us(110);

A Flowcode variable can be passed to the C function if program control is required:
An example Flowcode variable - Delay1- can be referenced in C code using the name FCV_DELAY1.

delay_10us(FCV_DELAY1);

Flowcode delay blocks and C code block delays can be used sequentially to provide a range of delay options.

franky
Posts: 49
Joined: Tue Jan 13, 2009 7:23 pm
Contact:

Re: SET DELAY

Post by franky »

ok I'll try
thank you very much sean!

Jimjam
Posts: 4
Joined: Mon Feb 23, 2009 8:53 am
Contact:

Re: SET DELAY

Post by Jimjam »

Hi,

I'm new to Flowcode. Is there a list of all the C functions we can implement with the syntaxes ? I'm very impressed with what I have been able to do so far BUT I know it has the possibility to do more.

Thanks

J

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: SET DELAY

Post by Benj »

Hello

There is a manual for the BoostC compiler located inside the Flowcode V3/BoostC directory.

Sean
Valued Contributor
Valued Contributor
Posts: 548
Joined: Tue Jun 26, 2007 11:23 am
Has thanked: 6 times
Been thanked: 44 times
Contact:

Re: SET DELAY

Post by Sean »

There is a complete manual for the C compiler used by Flowcode in the boostc folder of your Flowcode installation (boostc.pdf). You can access all the C functions, device specific registers, etc. using the Flowcode C Code blocks (and the target device data sheet).

Any variables that are to be passed between Flowcode and C must be declared in Flowcode. They will then be available to the C code with the name in upper-case characters, preceeded by FCV_ for global variables and FCL_ for local variables, FCL_ for local variables (declared within Flowcode macros) and FCR_ for macro return variables.

Example:
The Flowcode global variable, Var1, could be accessed by C Code as FCV_VAR1.

Variables used purely within the C code can use the normal C naming conventions.

Note:
C code can not be simulated and is not error-checked by Flowcode. The code is passed directly to the C compiler.

The Custom Code components can be used to write complete new components in C, and allow property values to be transfered to each instance used by Flowcode.

Jimjam
Posts: 4
Joined: Mon Feb 23, 2009 8:53 am
Contact:

Re: SET DELAY

Post by Jimjam »

Thanks guys for the prompt info. Best get reading!!

Cheers again

J

Post Reply