Skip to content

helper function for clearing existing task of a defined name #9

@raacampbell

Description

@raacampbell

Because of the annoying errors where an existing task of the same name exists following an error:



    % Check if free

    taskMap = dabs.ni.daqmx.Task.getTaskMap;

    if any(strcmp(taskMap.keys, obj.taskName))

        oldTask = taskMap(obj.taskName);

        disp(['Deleting existing task "' obj.taskName '"']);

        delete(oldTask);

    end

Check that fixes our problem. If so, write a function that wraps task creation so all functions use it and we avoid this annoying problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions