![]() |
Serial_DelayMilliseconds |
Waits the specified number of milliseconds.
Syntax
Serial_DelayMilliseconds( switches ; milliseconds )
Parameters
switches | not used, reserved for future use. Leave blank or put "-Unused" |
milliseconds | the time in milliseconds the script is paused |
Returned Result
Data type returned
Error code
Result
The returned result is always 0 (no error).
Considerations
You can use this function to wait for a (small) amount of time on a device, for example to produce a few bytes of data.
The maximum delay time is limited to 600000 milliseconds (= 10 minutes).
This function has no effect on the user interface and it does not unfreeze a Freeze Window script step.
Example
Lets say a serial device needs a bit of time to initialize. You can add this line to a script:
Set Variable [ dontCare ; Serial_DelayMilliseconds ("-unused"; 4500 ) ]
This will pause the script for 4.5 seconds, allowing the device to start up.
Used in example file
Terminal.fmp12
Related function
Serial_Receive |
Related topics
Troi Serial Plug-in online help (overview)