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]
VERIABLES
- Steve
- Matrix Staff
- Posts: 3433
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
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:
But remember that C code icons are not simulated within Flowcode, so they will only work when running on the chip.
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;