What can we improve?




boolean IPS_Sleep (integer $WaitingTime)


WaitingTime Specifies the waiting time in milliseconds


If the command succeeds, it returns TRUE, otherwise FALSE.


The instruction exposes the execution of the script for WaitingTime milliseconds. After this time, the script continues. With this command short(!) waiting times can be realized. Longer waiting times should not be implemented by Sleep commands, but controlled through appropriate Events.

Since the lifetime of the script increased by WaitingTime, make sure that the maximum duration defined in the file "php.ini" will not be exceeded. Otherwise, the script exits with an error message. Longer waiting times in the range of several seconds or more should be implemented using other methods.

IPS_Sleep has no influence on other concurrently running scripts.

Alternatively, the PHP commands sleep(int seconds) or usleep(int microseconds) can be used.


// Delayed data output to the COM port
    COMPort_SendText($id, chr(0x1b));    // Sent ESC to LC-Display 
    IPS_Sleep(200);                      // Wait 200ms 
    COMPort_SendText($id, "0");          // Delete LC-Display
    IPS_Sleep(200);                      // Wait 200ms 
    COMPort_SendText($id, "Good day!"); // Return Text
// Wait 2 seconds with PHP alternatives
Deutsche Webseite verfügbar
Go to cart
Any questions?