Real-Time
Description
The Real-Time library is a helper class to assist with spawning pre-compiled models designed to interface with QLabs.
System Library
Constants
This class has no public constants.
Methods
- QLabsRealTime.start_real_time_model(modelName, actorNumber=0, QLabsHostName='localhost', RTModelHostName='localhost', uriPort=17001, userArguments=True, additionalArguments='')[source]
Starts pre-compiled real-time code made with QUARC or the Quanser APIs that has been designed to provide a real-time dynamic model and a virtual hardware interface. This function is for local execution only, but QLabs can still be running remotely.
- Parameters
modelName (string) – Filename of the model without extension.
actorNumber (uint32) – (Optional) The user defined identifier corresponding with a spawned actor of the same class and actor number. Only used for models with “workspace” in the model name.
QLabsHostName (string) – (Optional) The host name or IP address of the machine running QLabs. Only used for models with “workspace” in the model name.
RTModelHostName – (Optional) The host name or IP address of the machine running the RT Model. Only used for models with “workspace” in the model name (advanced feature).
uriPort – (Optional) The user specified port number for the -uri run. Required for when more than a single type of device is being used.
userArguments – (Optional) Enables using non-standard device numbers and uris
additionalArguments (string) – (Optional) See QUARC documentation for additional quarc_run arguments.
- Returns
If the platform is supported, returns the command line used to start the model execution.
- Return type
string
- QLabsRealTime.terminate_real_time_model(modelName, RTModelHostName='localhost', additionalArguments='')[source]
Stops a real-time model specified by name that is currently running.
- Parameters
modelName (string) – Filename of the model without extension.
additionalArguments (string) – (Optional) See QUARC documentation for additional quarc_run arguments.
- Returns
If the platform is supported, returns the command line used to stop the model execution.
- Return type
string
- QLabsRealTime.terminate_all_real_time_models(RTModelHostName='localhost', additionalArguments='')[source]
Stops all real-time models currently running.
- Parameters
additionalArguments (string) – (Optional) See QUARC documentation for additional quarc_run arguments.
- Returns
If the platform is supported, returns the command line used to stop the model execution.
- Return type
string