Unable to Export Component

A forum where Flowcode v6 user created components can be shared, discussed and reviewed.

Moderator: Benj

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 381 times
Been thanked: 714 times
Contact:

Unable to Export Component

Postby JohnCrow » Sun Dec 08, 2013 5:56 pm

Hi
I must be missing something but I've tried following the Create LED tutorial in the Wiki

I get to the Export Component section and hit a problem.
In the "Interface" section of "Component Management" where it says select component macro for LEDon and LEDoff, that one is not in the dropdown box
I just get
Hidden
Downloadable
Simulation
Hidden embedded
Embedded

I had it working in the beta release, but it seems to be a slightly different method now.

Attached the file I've created so far.

oneLED.fcfx
(5.48 KiB) Downloaded 165 times
1 in 10 people understand binary, the other one doesn't !

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 64 times
Been thanked: 306 times
Contact:

Re: Unable to Export Component

Postby JonnyW » Sun Dec 08, 2013 6:24 pm

Hi John.

The 'component macro' was the older name for 'downloadable macro' - we felt it described the type of macro better that way. Same thing though and I will update the Wiki, thanks for the spot.

Jonny
These users thanked the author JonnyW for the post:
JohnCrow (Sun Dec 08, 2013 6:26 pm)
Rating: 5.56%
 

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 381 times
Been thanked: 714 times
Contact:

Re: Unable to Export Component

Postby JohnCrow » Sun Dec 08, 2013 7:10 pm

Thanks Jonny
Got it working now :)
1 in 10 people understand binary, the other one doesn't !

Kenrix2
Flowcode v5 User
Posts: 211
Joined: Tue Feb 19, 2013 9:51 pm
Has thanked: 72 times
Been thanked: 177 times
Contact:

Re: Unable to Export Component

Postby Kenrix2 » Sat Mar 08, 2014 12:42 am

The tutorial on creating the led component is very well done. It is step by step with clear instructions on how to create it which made it easy for me to learn. Thank you very much for for making that tutorial. I would like to learn more so I can create components that use some of the other functions. Using the function "SetColor" is all I understand how to do right now. Perhaps when you have time, another tutorial using other functions, like "GetValue" and "SetValue" would be very helpful. Another thought would be to request a program that has some examples using the other functions and properties so I can see how they are setup and also step through them to understand how they react. An example program wouldn't have to actually "do anything" I am just looking for something to take the mystery out of using the other functions and properties. Having an example program would be nice since I could have that program open to refer to while creating my own program.

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 64 times
Been thanked: 306 times
Contact:

Re: Unable to Export Component

Postby JonnyW » Sat Mar 08, 2014 8:09 pm

Hello.

I have done a Flowcode introduction tutorial recently, and we have step-by-step guides on various activities, such as creating and LED component and a sim-only analogue clock. These are good for getting in to components and simulations.

I will Email my manager and if it is OK with them will post some of these tutorials here, hopefully let you know Monday.

In the meantime, here is a Simon game that I wrote as an activity - this gives hints on what to do but is not a step-by-step tutorial. This is a downloadable (I assume) and simulatable Simon game. I hope it helps.

simon.png
simon.png (6.69 KiB) Viewed 4638 times

simon_game.fcfx
Game source
(28.84 KiB) Downloaded 145 times

simon_activity.pdf
Activity sheet
(61.83 KiB) Downloaded 240 times


PS: If this does not open in your version of Flowcode, I have had a play with the file format, trying to streamline things. Let me know if this is the case and I will try to ensure compatibility with 6.0.4.

Jonny
These users thanked the author JonnyW for the post (total 2):
medelec35 (Sat Mar 08, 2014 8:27 pm) • Kenrix2 (Sat Mar 08, 2014 10:14 pm)
Rating: 11.11%
 

Kenrix2
Flowcode v5 User
Posts: 211
Joined: Tue Feb 19, 2013 9:51 pm
Has thanked: 72 times
Been thanked: 177 times
Contact:

Re: Unable to Export Component

Postby Kenrix2 » Sat Mar 08, 2014 11:21 pm

Thank you for the example, nicely done. I will experiment with the SetValue portion. I wish I understood the basic concept of of the other functions and properties and the variables (which don't even seem to act like variables) so I could at least ask a simple question on how to do something in particular, but i don't. If I add a list of integers to the property and then select a function for a Sim icon, just about anything I try to put in the fields is rejected or does not work as I would expect. Another problem, or maybe it really isn't a problem, I always get incompatible macro!. For some reason I am just not getting it. I am a patient person and I am sure, eventually, something will get posted about creating components that will make me understand and I can say, "Oh, that's what is going on, now I get it". Thanks again for your help.

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 64 times
Been thanked: 306 times
Contact:

Re: Unable to Export Component

Postby JonnyW » Sun Mar 09, 2014 8:45 am

Morning.

Events
There are various subtleties to Events and matching macros. One thing to remember is every event returns a ULONG type - this is the usual thing to miss when creating macros by hand.

Easiest thing to do is let Flowcode create the macros and it will get everything right for that event. Double click on the bold Macro and the macro will be created, as it is for the interrupt icon.
000040_Add event.png
000040_Add event.png (16.92 KiB) Viewed 4620 times


This wiki entry may help clear things up.
http://www.matrixmultimedia.com/wiki/in ... ion_Events

Properties
A property is a funny thing. When it is downloaded it becomes a define, but in simulation we have the ability to 're-define' its value using SetValue(). They behave more like mini-macros than variables.

So if you have a property called 'Number' and it has a value of '5', you can not do 'Number = 10', because Flowcode sees this as '5 =10', which does not make sense. To get round this during simulation we use SetValue() to redefine the value of the property.

Here is a demo program of 'SetValue' and 'GetValue' - it uses a general expression you can modify during simulation to change the results of the property.
property_eg.fcfx
Properties in simulation
(16.48 KiB) Downloaded 155 times


I hope all this is useful (and works) - let me know of any problems.

Jonny
These users thanked the author JonnyW for the post (total 3):
kersing (Sun Mar 09, 2014 12:57 pm) • Kenrix2 (Mon Mar 10, 2014 8:48 am) • Rudi (Fri May 16, 2014 1:19 pm)
Rating: 16.67%