Jump to content

Setting a NaN duty cycle can cause subsequent counter updates to hang


mje

Recommended Posts

This one caused me a day of grief.

Turns out an error in the start up logic of one of my applications would request a duty cycle of NaN to a counter output I'm using for pulse width modulation. The problem is the NaN request goes through without returning an error. But the next request to update the duty cycle hangs the DAQmx write VI. After hanging, there's no way out, aborting the calling VI leaves LabVIEW in a sorry state.

Example:

post-11742-0-66818400-1332266046_thumb.p

WARNING: Running the snippet above can leave LabVIEW in an undefined state. Save your work before you do so!

Now obviously a NaN duty cycle makes no sense, but I'd expect DAQmx to be able to handle such requests gracefully, either by ignoring them, or preferably issuing an error.

I've observed this behavior on the USB-6343 device.

Link to comment

Also in LV2011 (DAQmx 9.3.5), I tried this on a simulated device (PCI-6230, though I doubt it matters). It repro'd, but I couldn't stop the VI. When I tried to close it, it asked me to save; I declined and it got stuck at the "Resetting VI" window.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.