User Tools

Site Tools


uphp:uphp_intro

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
uphp:uphp_intro [2018/09/05 13:22]
jeff Added links to 'wattmons'
uphp:uphp_intro [2021/09/13 05:57] (current)
Line 15: Line 15:
 The biggest challenge with the scripting language is its memory limitation.  The [[hardware:wattmons:WattmonPRO]] and [[hardware:wattmons:WattmonMINI]] processors have a total of 128KB (yes, Kilobytes!) of RAM available to run a multitasking OS with a TCP/IP and USB stack, modbus polling engine, scheduler and more.  For these platforms during normal operation scripts have a maximum of about 30 KB of memory for variables, which means that as a programmer you need to be very conscious of memory allocation.  We have introduced some special non-PHP compatible variable types to help with this.  The [[uphp:functions:indexed_array()]] function lets you create arrays of a very specific type (int, byte, etc) which will reduce the amount of resources compared to hash arrays created with the [[uphp:functions:array()]] function. The biggest challenge with the scripting language is its memory limitation.  The [[hardware:wattmons:WattmonPRO]] and [[hardware:wattmons:WattmonMINI]] processors have a total of 128KB (yes, Kilobytes!) of RAM available to run a multitasking OS with a TCP/IP and USB stack, modbus polling engine, scheduler and more.  For these platforms during normal operation scripts have a maximum of about 30 KB of memory for variables, which means that as a programmer you need to be very conscious of memory allocation.  We have introduced some special non-PHP compatible variable types to help with this.  The [[uphp:functions:indexed_array()]] function lets you create arrays of a very specific type (int, byte, etc) which will reduce the amount of resources compared to hash arrays created with the [[uphp:functions:array()]] function.
  
-The [[hardware:wattmons:WattmonMEGA]] processor has a total of 512KB of RAM (4 times as much as for the PRO and the MINI). Memory limitations are much less of a challenge when scripting for the MEGA.+The [[hardware:wattmons:WattmonMEGA]] processor has a total of 512KB of RAM (4 times as much as for the [[hardware:wattmons:WattmonPRO|PRO]] and the [[hardware:wattmons:WattmonMINI|MINI]]). Memory limitations are much less of a challenge when scripting for the [[hardware:wattmons:WattmonMEGA|MEGA]].
  
 ====Benefits==== ====Benefits====
uphp/uphp_intro.1536153744.txt.gz · Last modified: 2021/09/13 05:56 (external edit)