Page 1 of 1

Component not registered

Posted: Wed Nov 25, 2009 3:34 pm
by kdoney34711
When I bring up some of the examples in my upgraded Flowcode 4 I get an error which says the component is not registered and then crashes flowcode. How do I register the example components?

Re: Component not registered

Posted: Thu Nov 26, 2009 9:05 am
by Steve
Examples from v2 of Flowcode and some of the early v3 examples might show this problem.

Which examples are you trying? Please post them here and I'll take a look.

Re: Component not registered

Posted: Thu Jan 07, 2010 3:53 am
by felix341
I have the same problem. The component example TCP/IP- firewall,ARP,REC_HTML,SEND_HTML and UDP all give me that error. I'm working with a Olimex PIC-P67J60. It has the TCP-IP stack already programmed. I want to monitor 4 inputs and control 4 outputs from the web. Using the embedded server, I'm not sure of the necessary programming in Flowcode needed with the TCP/IP component when using the webserver. Does someone have an Flowcode example where you control and monitor from the webpage on the embedded server? Is the TCP stack rewritten if I have the component in my Flowcode program?
Thanks again for any help.

Re: Component not registered

Posted: Thu Jan 07, 2010 8:52 am
by Steve
Can you please post the link for those example files so I can check them and see why this error is occuring.

Also note that the TCP/IP component in Flowcode is designed to work with the TCP/IP E-Block, which has its own hardware TCP/IP stack. It is not designed to work with any other TCP/IP stacks, so it is unlikley to work with your board.

Re: Component not registered

Posted: Thu Jan 07, 2010 2:47 pm
by felix341
Steve,
Thanks for getting back with me. The files were downloaded from the Flowcode V4 example files on this site. Do you have an example I ask about using your stack? I understand that it is different then my board. Is the webserver a part of the TCP stack? I was thinking it was different .But I believe that with an example, I will still get out of it what I need. I hope to be able to use Flowcode for most of the project and program the rest in C. Which I hope will save me a lot of time. I am a newbie using the embedded webserver and I'm trying to fill in the holes.
Thanks again.
Lee

Re: Component not registered

Posted: Thu Jan 07, 2010 3:57 pm
by Steve
In our learning centre there is a course about TCP/IP which you will find useful.

The Webserver component in Flowcode uses the same hardware TCP/IP stack as the TCP/IP component, but is designed for a microcontroller to publish webpages on the Internet. The TCP/IP component is much mroe flexible and allows you to communicate using various layers of the TCP/IP stack (e.g. MAC, UDP, IP, TCP).

Re: Component not registered

Posted: Thu Jan 07, 2010 5:12 pm
by felix341
So Flowcode bypasses the on chip server/TCP to use the Eblock? If the chip came with it, why wouldn't the program be written to support it? So is there an example using the EBlock? Also, did you find the files you needed to look at the component error problem?

Thanks again,
Lee

Re: Component not registered

Posted: Thu Jan 07, 2010 5:29 pm
by Benj
Hi Lee

All the examples for the TCP and Webserver components are available from the Learning Centre on our website.
If the chip came with it, why wouldn't the program be written to support it?
We decided to create the TCP/IP E-Block as it allows you to create a webpage or host ethernet comms from any PICmicro device with an onboard I2C bus. You do not have to get the E-Block and could simply connect up the same Wiznet module as used on the E-Block. The E-Block just makes things much easier.

Rewriting the Ethernet components to interface with a internal or alternative module would be a huge amount of work for very little reward.

Re: Component not registered

Posted: Thu Jan 07, 2010 6:56 pm
by felix341
The TCP examples don't work with my v4.2. Steve is looking into it. I'm hoping that the examples will give me what I need.

Re: Component not registered

Posted: Fri Jan 08, 2010 7:49 am
by Steve
The examples load and compile fine on my v4. Is the TCP/IP component available under "Peripheral" on the toolbar? Which other components are not available?

If there is no TCP/IP component, then there was probably a problem during installation. I believe there are other posts (either in this forum or in the FAQs) that deal with component re-registration.

Re: Component not registered

Posted: Sat Jan 09, 2010 3:57 am
by felix341
Yes, there is a TCP/IP component available under "Peripheral". Everything in the toolbar is working. The only examples that I have found that isn't working are the ones I already pointed out. Tomorrow I will download them again and see what happens. I'll let you know.

Re: Component not registered

Posted: Tue Jan 12, 2010 5:19 am
by felix341
OK. I downloaded the examples for Flowcode V4 from >support>software downloads,patches and updates.(twice) I unzipped the files and then try to open the TCP components. I get the same error as before. SMTP and ping are the only two that work under TCP. When I add TCP to a project, it works fine. Only the examples don't work. Please help.

Re: Component not registered

Posted: Tue Jan 12, 2010 5:37 pm
by Steve
Please post the example that does not work to this forum and I will try that one.

Re: Component not registered

Posted: Wed Jan 13, 2010 3:41 am
by felix341
Here are two of them. In case it matters, Flowcode V4.2.3.58

thanks again

Re: Component not registered

Posted: Wed Jan 13, 2010 11:09 am
by Steve
That's strange - these files are V2 files, which cannot be directly imported into V4. I have converted them and you should be able to load the versions that are attached.

There are also some other examples here:
http://www.matrixmultimedia.com/softwar ... amples.zip

Re: Component not registered

Posted: Thu Jan 14, 2010 1:07 pm
by beambase
Hi,
I have tried the RECV_HTML_01a example on a 16F877A and that works well.
Since the 16F877A is a bit cramped for memory I converted the example to run on a 18F452 that is pin compatible.

To get the example to compile without errors I had to add

#define TMR0 TMR0L

in the defines section of custom code of the TCP_IP component.

Entering
#define TMR0 tmr0l
as suggested before for the 18F series did not work but resulted in errors.
However. It seams as it is not a workable solution. The code executes onces and then for some reason gets stuck if I try to send the repeat it. After powerdown and reset the code will execute once again and then get stuck. On a 16F877A it runs as it should. Any ideas why and is there a solution to use this example on the 18F series of Pics?

Re: Component not registered

Posted: Thu Jan 14, 2010 2:39 pm
by Steve
Sorry, but the code is designed to run on the 16F877a and we have not tested it on other devices. I can't think of why it will not work on this chip and I have no examples for an 18F series chip.

You could try addign the following 2 defines:

Code: Select all

#define TMR0 TMR0L
#define tmr0 tmr0l

Re: Component not registered

Posted: Thu Jan 14, 2010 4:43 pm
by Dan81
hello

In the C code icon " C Code for random port "
If you replace "FCV_SRC_PORT = tmr0; " with " FCV_SRC_PORT = TMR0; "

The compilation is OK.

But I can't test it in hardware.

Daniel

Re: Component not registered

Posted: Fri Jan 15, 2010 8:14 am
by beambase
Hi,
the problem is that the tmr0 function does not return a random number. It is the same number that is beeing returned as the SRC_PORT all the time. And that makes a second Tx on the same port impossible until the connection has timed out and closed.
Ant one that knows how to make tmr0 return random numbers on the 18F452?

Re: Component not registered

Posted: Fri Jan 15, 2010 8:35 am
by Steve
In the header files for the compiler TMR0L is defined as the register location, and not the register itself:

Code: Select all

#define TMR0L                 0x00000FD6 
If you look further down the header file, you will see the actual register definition:

Code: Select all

volatile char tmr0l                  @TMR0L;
So you should be using "tmr0l" instead of "TMR0L".

Re: Component not registered

Posted: Fri Jan 15, 2010 8:40 am
by Steve
But looking further into this, there is a problem with the C code for the component. That in fact uses "TMR0" to generate a "random" port number. This is wrong - it should use "tmr0" (and if this changes, the definition "#define tmr0l tmr0" will work as required).

(edit) You will need to add this definition to the component C file because adding it in the "supplementary code" window will put it in the wrong place.

We will fix this in the C code and issue an update soon. In the meantime, the edit can be made manually to the "PIC_TCP_IP.c" file int he "Components" directory of Flowcode (on lines 921 and 922).