Real-Time
Description
The Real-Time library is a helper class to assist with spawning pre-compiled models designed to interface with QLabs. Note that these methods assume the Quanser’s QUARC has been installed on the system and the quarc_run executable is accessible.
System Library
Constants
This class has no public constants.
Methods
- QLabsRealTime.start_real_time_model(modelName, actorNumber=0, QLabsHostName='localhost', 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.
QLabsHostName (string) – (Optional) The host name or IP address of the machine running QLabs.
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
Danger
TODO: Need to add support for MacOS, Linux x86, and Linux NVidia (?) targets. TODO: Also consider adding remote execution of the real-time model.
- QLabsRealTime.terminate_real_time_model(modelName, 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(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