Home AMX User Forum AMXForums Archive Threads AMX Applications and Solutions

[?] Max number of module

Hi everybody, ( sorry if my English is not good )
I wanted to ask about the maximum number of modules placed in an NI-4100.

In my "main code" i have 26 define module that recall three module write by me;
the first: recall for 15 times, manage the connection of a wireless device
the second: recall for 8 times; manage the rooms
end the last one: recall for 3 times; manage 3 differnt type of room.

If I use all together i have a problem with the connection but, if i remove three ( no difference ), all working well.

It is possible that is a problem about the quantity of memory use ?
Exist a limit about the maximun module that can i use ?

Thanks to all,
Max

Comments

  • viningvining Posts: 4,368
    Massimo wrote:
    It is possible that is a problem about the quantity of memory use ?
    Exist a limit about the maximun module that can i use ?
    I don't know of any limit on the amount of modules you can use and don't see any reason why there would/could be a limit. It's like asking how many lines of code can I have. You can't possible know with out knowing what's defined and using up resources.

    I would telnet ino your master and see how much memory you have left with out the 3 modules. Do a "show mem" so you can see the break down of memory types and see if you're low in any type. You might be able to change your memory types in your modules by using volatile where you've been using non volatile. There really isn't too much need to declare variables as non volatile since most variables are fine being reset to 0 upon a reboot.
  • AuserAuser Posts: 506
    Massimo wrote: »
    If I use all together i have a problem with the connection [...]

    By "a problem with the connection" do you mean you have trouble connecting to the master? It's quite possible that something's stuck in an endless loop in the program which can cause this behaviour.

    Which three modules are you removing? Three of the 8 duplicated rooms, or others?
  • MassimoMassimo Posts: 5
    Hi,
    By "a problem with the connection" do you mean you have trouble connecting to the master?
    Yes, the device ping the master but not establish a connection.
    It's quite possible that something's stuck in an endless loop in the program which can cause this behaviour.

    Which three modules are you removing? Three of the 8 duplicated rooms, or others?

    In the test that I have made I delete the three smaller rooms (rooms for staff). I want tell you that those three rooms can be called from the eight larger rooms (rooms for the guests) and that this control is made from a cycle within the "DEFINE_PROGRAM".

    Clearly if the wireless device is not online, the request is ignored and I do not think that the problem is inside of this.

    ---
    Regarding the amount of memory:

    whit all the module:
    Volatile Free   : 14099928/67108864 (largest free block in bytes/max physical)
    NonVolatile Free:  1017320/1047536 (bytes free/max physical)
    Disk Free       :247103488/256622592 (bytes of free space/max physical)
    Duet Memory Free :  2506580 (bytes)
    

    whit out 3 module:
    Volatile Free   : 14156424/67108864 (largest free block in bytes/max physical)
    NonVolatile Free:  1021898/1047536 (bytes free/max physical)
    Disk Free       :247111680/256622592 (bytes of free space/max physical)
    Duet Memory Free :  2506580 (bytes)
    

    ---

    Thanks to all again,
    Max
  • ericmedleyericmedley Posts: 4,177
    Those numbers are not out of line. I don,t think the issue is memory. Commonly the issue with a processor doing this kind of thing is a endless loop or a flooding of runtime errors. Common things are referencing a zero cell of an array or one bigger than the array size. Every time a runtime error occurs the processor logs it. If the number of errors gets too high and to frequent the processor becomes too busy and cannot devote much time to actually running the program.

    Log into the unit with a terinal program using rs232 and type 'MSG ON ALL'. If you see a flood of error messages you will have found the culprit.
Sign In or Register to comment.