Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

patten generation problem with PCI-DIO-32HS

I AM USING A PCI-DIO32HS TO GENERATE buffer[] CONTINOUSLY AND IN THE SAME TIME ACQUIRE A 16 BITS PATTERN.
I USE 1 THREAD TO ACQUIRE AND ANOTHER TO GENERATE with LW/CVI.
I HAVE PROBLEM WITH DIG_Block_PG_Config()parameters
IT'S OK FOR TIMEBASE=-2 Pattern interval=6or7
NOT OK FOR TIMEBASE=-2 Pattern interval=5or4...
NOT OK FOR TIMEBASE=-3 Pattern interval=8 or....
WHY ? SEE ATTACH FILE
THANKS
0 Kudos
Message 1 of 6
(3,715 Views)
sl

For a timebase of 27us as you wish to have, you should set the timebase to 1 and the reqInterval to 27.

-2 is not a valid value for the timebase. According to the NI-DAQ User Manual the only value for a timebase are -3, 1, 2, 3, 4 and 5. What error messages are you getting when it is not working?

Brian
0 Kudos
Message 2 of 6
(3,715 Views)
Thanks Brian for your answer.
See attach file to see what i want to generate.
-3 give a timebase=50ns and -2 a timebase=100ns
no error message but a random generation
best regards
Stephane
0 Kudos
Message 3 of 6
(3,715 Views)
Stephane

I noticed in your code when you call DIG_DB_Config that you have set the fourth parameter, oldDataStop to 0. This will allow regeneration of old data. That is, it may output the same data more than once. Disable this by setting oldDataStop to 1 and let me know if you have better results. The setback to this however, is that you may have to run your application at lower speeds.

Brian
0 Kudos
Message 4 of 6
(3,715 Views)
Hi Brian,
With new code(attached file code.c),it work good with time base and pattern interval
-3,4 see attached file tek00000.jpg
but with -3,3 there is jitter?? see attached file tek00001.jpg
Is it a PCI-DIO32HS overload??
Best regards
Stephane
Download All
0 Kudos
Message 5 of 6
(3,715 Views)
It may be rewriting the same data twice. Have you checked the actual data values? Also, when you set oldDataStop to 1, do you recieve an error? If so, there is a good chance it will be outputting bad data when it is set to 0.

Brian
0 Kudos
Message 6 of 6
(3,715 Views)