Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Memory looping with PCI-6534 device under VB6.0?

I work with a PCI-6534 device under Visual Basic 6.0.
How can I loop from onboard memory to output data permanently from Port C.
The data contains 76 samples, and the refresh rate is 50ns.
ND_Pattern_Generation_Loop_Enable(d) does not work.
So I use the following instructions:

DIG_Grp_Config
DIG_Block_PG_Config
DIG_DB_Config
DIG_Block_Out

For example with 120, 160 or 200 sammples this code works, but not with the configuration above!
Who knows the reason? Thanks
0 Kudos
Message 1 of 5
(3,407 Views)
Hi,

Have you tried using the NI-DAQ function call:
Set_DAQ_Device_Info(board,ND_Pattern_Generation_Loop_Enabled, ND_ON);
It looks like you were trying to use this function but it wasn't working for you.

What errors was it causing?

What is your code segment that works with 120...etc. but not 76?

I've never had problems in the past, mind you I have never tried a buffersize of 76 for the first port of group 2. Anyway, if you can give me specifics about your program and things you've tried that might help me give you some suggestions.

Ron
Message 2 of 5
(3,407 Views)
Hi Ron,

when I use the NI-DAQ function: Set_DAQ_Device_Info(board,ND_Pattern_Generation_Loop_Enabled, ND_ON);
the following error appears: "Varible not defined"
Then I tried to define ND_Pattern_Generation_Loop_Enabled and ND_ON as Variant. Now no errors were caused, but it doesn´t work. It seemd that NI-DAQ doesn´t know this function, although he is defined in the "NI-DAQ Windows - Function Prototypes for Visual Basic" (see Attachment (1))
To the second question. My programm outputs a clock-signal (T = 3-6µs) at one line and short pulses (100-500ns) with different delays to the clock-signal on four other lines of port C. I calculate a period of these signals and want to output it continuously. The code works till about T=4µs (see Attachment (2)).
For T<4µs the signals are biassed, but the buffer-content is ok. I contolled it manually and see it on the CWGraph. For examble with T=4µs the buffer contains 4µs/50ns=80 samples, every 50ns one sample is send.
I hope it helps

Lars
0 Kudos
Message 3 of 5
(3,407 Views)
Hi Lars,

It looks like it didn't automatically include the constants file that you need to reference the functions in nidaq32.bas. When I code for Visual Basic I usually add the following files to my project:
convert.bas
nidaq32.bas
nidex32.bas
nidaqcns.inc
nidaqerr.inc
I add them by right-clicking Module in the Project view and selecting Add. These files should all be in the NI-DAQ >> Include directory. Hopefully that gives you the right constants and allows you to make the call successfully.

Ron
0 Kudos
Message 4 of 5
(3,407 Views)
Hi Ron,

you´re right, now it works.
Thank you very much!

Lars
0 Kudos
Message 5 of 5
(3,407 Views)