php command


When the system boots up, the init.php is run in the beginning. User can program the one's code in the init.php and user can run other file with a "php" system command as well. In addition, user can adjust the running time per a loop of the task with this command.

Running the test.php file

The following is the php command format.

This command returns the script name to be run.

Parameter Description
$cpu_time $cpu_time is CPU running time per a loop of the task. The default value is 500us if it is omitted (range: 10 ~ 10000) If this value is larger, CPU occupation rate will be higher. But there might be network data losses when network load is high if this parameter is high.
$restart_delay The script will be restarted automatically after this parameter time when the PHP script has been terminated. If this value is 0 the script will not be restarted. If it is omitted the default value is 5. The unit for this parameter is second. The script will not be restarted when the PHPoC Board is connected to the debugger
$script_name If the $script_name is used for a parameter, this script will be restarted if the script is terminated.
If it is omitted, the CPU time of the current task will be changed immediately.

The following example is an example which start a script when the current script is terminated.