Jump to content
  • 0

USB-DIO32HS cbDOutScan consecutive outputs have long in-between times


PARESH

Question

I am trying to implement three consecutive outputs using cbDOutScan() using the Windows UL (in C) where each output consists of 20 patterns (DataArray is size 20 elements).  While the pulses being generated have the correct rate and count, there is always a large delay  between each output.  The first 20 patterns can be seen, the second 20 patterns can be seen after a big delay, and the third 20 patterns can be seen after another big delay using an oscilloscope.  It seems like there a 100 ms constant from when one output starts to to the time when the next one starts and not sure why this is the case...

I have used the BACKGROUND option but it does not help.  Even when stopping the background operation using cbStopBackground() function does not seem to do anything.  It is always 100 ms between the start times of each outputs scan.

I have coded this for a simple command window program, and also a WinAPI 32 bit program with the same results.

Strange thing is when using cbDOut() without the Scan part, the three sets of 20 patterns each come out immediately one after another.  Of course I cannot adjust the rate using this function so my only option is to use cbDOutScan() function.

Any help or recommendations are appreciated.

 

scope_0.png

TestIO.c

Edited by PARESH
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hello @PARESH.

Thank you for providing a screen capture of the output data and your code.  There is no other function call to reduce the delay.  The delay between cbDOutScan() functions is nondeterministic, though consistent on that particular system.  What is the brand, model, and hardware specifications of that target system?  Do you have a different Windows system to use for comparison?  I do not expect a significant improvement with the delay.

If you knew the desired set of patterns per test, then creating one large array per test would be the workaround.

If the workaround is unacceptable for your application and you are open to using a different DIO device and library, then consider Digilent's Digital Discovery.

https://digilent.com/shop/digital-discovery-portable-usb-logic-analyzer-and-digital-pattern-generator/

 

Regards,

Fausto

Link to comment
Share on other sites

  • 0

Fausto, the screen capture is from a Windows 7 machine.  As suggested, I also tried a faster Windows 10 machine but the same delay occurs.

Out target system performs handshaking as follows:

a) A single 1.5 us pulse is sent to the target system by the computer.

b) The target system responds within 50 us seconds of receipt of the pulse and send the computer back a 1.5 us pulse.

c) After that the computer sends data of various number of words, and each word is responded to by the target system with a 1.5 us pulse.

Communications between the computer and target system have to be rather fast and occurs continuously.  The specifications of USB-DIO32HS should have stated that there will be a large delay between consecutive outputs. It just seems abnormal.  When using cbDOut(), there is no delay but we cannot adjust the rates.

As of now I have no faith in the recommended product "Digital Discovery: Portable USB Logic Analyzer and Digital Pattern Generator" as I am not sure it will not behave the same way.  We bought three of the USB-DIO32HS expecting them to get us moving in the right direction but this unexpected issue just threw us a huge hurdle to overcome.

Is there a way to elevate this issue to your design / programming team to have them investigate the reason of why the cbDOutScan() function  does not return back to the calling program once all output is processed.  Per documentation of the help file it should return, but instead just  delays for such a long time. 

In addition it seems like cbStopBackground() function does not perform as documented since because it will not also not terminate once the output is processed (essentially not useful).

These seem like major flaws in the firmware of the USB-DIO32HS, and if not then the product documentation should state that consecutive outputs (writes) are 100 ms apart and cannot be performed any quicker and the program is locked up for that duration.

Please let me know if this is something you can elevate to your design / programming members and provide further feedback to us.  Your help is appreciated and thanks for taking a look at it.

Paresh

Edited by PARESH
Request additional help / Elevate issue to designers.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...