VERIABLES

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

Moderators: Benj, Mods

Post Reply
wayne millard
Posts: 234
Joined: Thu May 31, 2007 2:18 pm
Has thanked: 7 times
Been thanked: 12 times

VERIABLES

Post by wayne millard »

How do i send data from a flowcode veriable to a C code veriable.
C code veriable is B V and flowcode veriable is baselenth & velocity.

Thanks
Wayne M
[/code]

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

Post by Steve »

You would use a C code icon. In this, all Flowcode variables are converted to uppercase, and have a suffix of "FCV_".

So, if you have a variable "MyFlowcodeVar" in Flowcode, you could reference it in a C-code icon like this:

Code: Select all

char my_c_code_var;

//set a local C variable to a Flowcode variable
my_c_code_var = FCV_MYFLOWCODEVAR;

//and vice-versa
FCV_MYFLOWCODEVAR = my_c_code_var;

//and you can treat your Flowcode variable just like any other C variable
FCV_MYFLOWCODEVAR = (FCV_MYFLOWCODEVAR >> 2) + my_c_code_var;
But remember that C code icons are not simulated within Flowcode, so they will only work when running on the chip.

Post Reply