Skip to content

Updating FGEN example to catch timeout and maximum time exceeded exce…#211

Merged
DelpireNI merged 3 commits intomainfrom
users/cdelpire/catch-fgen-timeout-errors-in-example
Jan 18, 2023
Merged

Updating FGEN example to catch timeout and maximum time exceeded exce…#211
DelpireNI merged 3 commits intomainfrom
users/cdelpire/catch-fgen-timeout-errors-in-example

Conversation

@DelpireNI
Copy link
Copy Markdown
Contributor

@DelpireNI DelpireNI commented Jan 18, 2023

…ptions when calling wait_until_done.

Signed-off-by: Chris Delpire chris.delpire@ni.com

What does this Pull Request accomplish?

With real hardware the FGEN example throws an exception when calling wait_until_done. This is expected and in other examples we are catching timeout exceptions and trying again until a cancellation occurs or the operation completes successfully. I have added a try/except to the FGEN example to do the same.

I tested with two different instruments and saw two different error codes, so I am checking for both.

Why should this Pull Request be merged?

Currently the FGEN example will not work with real hardware.

What testing has been done?

This was tested on a device with real FGEN devices attached.

AB#2272711

…ptions when calling wait_until_done.

Signed-off-by: Chris Delpire <chris.delpire@ni.com>
@bkeryan
Copy link
Copy Markdown
Collaborator

bkeryan commented Jan 18, 2023

…ptions when calling wait_until_done.

Many projects and Git tools don't like overly long commit subject lines. I guess GitHub is one of them.

Comment thread examples/nifgen_standard_function/measurement.py Outdated
Comment thread examples/nifgen_standard_function/measurement.py Outdated
Comment thread examples/nifgen_standard_function/measurement.py Outdated
Signed-off-by: Chris Delpire <chris.delpire@ni.com>
Comment thread examples/nifgen_standard_function/measurement.py Outdated
Signed-off-by: Chris Delpire <chris.delpire@ni.com>
@DelpireNI DelpireNI merged commit fdc318b into main Jan 18, 2023
@dixonjoel dixonjoel deleted the users/cdelpire/catch-fgen-timeout-errors-in-example branch February 2, 2023 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants