hil_task_flush hil_task_stop_all navigation bar

Table of Contents

hil_task_stop

Deprecated

The HIL API MATLAB functions have been deprecated in favour of the new quanser.hardware.hil class, which has support for code generation for Quanser targets. Hence, with the new hil class it is possible to run MATLAB scripts in real-time on Quanser targets, while making use of the Quanser hardware.

Stops the specified task.

Syntax

err = hil_task_stop(task)
    

Description

Stops the specified task.

If no err output is provided then it throws an exception if an error occurs. In generated code it prints the error message. Use hil_get_error_message to get the message associated with an error code.

Parameters

task

Task handle returned by one of the hil_task_create functions.

Outputs

err

A negative error code or zero on success.

Examples

% Start the task using SYSTEM_CLOCK_1 at 1 kHz. Put no limit on the number of samples.
hil_task_start(task, -1, 1000, -1);
...

% Stop the task
hil_task_stop(task);
hil_task_delete(task);
    

See Also

 

navigation bar