Real-Time

Description

The Real-Time library is a helper class to assist with spawning pre-compiled models designed to interface with QLabs.

Important

These methods assume the Quanser’s QUARC has been installed on the system and the quarc_run executable is accessible.

System Library

class qvl.real_time.QLabsRealTime[source]

The QLabsRealTime class is a collection of methods to start and stop pre-compiled real-time models to support open worlds in QLabs.

Constants

This class has no public constants.

Methods

QLabsRealTime.start_real_time_model(modelName, actorNumber=0, QLabsHostName='localhost', 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.

  • userArguments – (Optional) Enables using non-standard device unmbers 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, 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