Hi Flowcode Team
Want Macro with 2x Return value floating?
Please see below the picture where I have tried to illustrate the question!
Do you have a suggestion on how this can be done with the 2x Variables so that the values can be used elsewhere in the codes?
See attached file:
Macro 2x Return value floating
Moderator: Benj
-
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
- Contact:
- 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: Macro 2x Return value floating
Hello Monie,
You cannot return more then one value.
The easy way is to hold the values inside global variables and then have a second macro with an index parameter that allows you to specify which of global variables you want to read back. The Accelerometer type components are done like this.
Another way is to pass an array of floats as a parameter to the macro. You can then edit the values inside the array using the macro and the values will be present inside the array when you leave the macro.
You cannot return more then one value.
The easy way is to hold the values inside global variables and then have a second macro with an index parameter that allows you to specify which of global variables you want to read back. The Accelerometer type components are done like this.
Another way is to pass an array of floats as a parameter to the macro. You can then edit the values inside the array using the macro and the values will be present inside the array when you leave the macro.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
- Contact:
Re: Macro 2x Return value floating
HI Benj
Thank you very much for your description.
Just as I would work with Flowcode v8 and MIAC dsPIC, I couldn't upload the codes to this device.
Thank you very much for your description.
Just as I would work with Flowcode v8 and MIAC dsPIC, I couldn't upload the codes to this device.
Best Regard
Monie
Monie