Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a Non-stop Continuous Digital Output

Hi all,

 

I'm trying to make a continuous digital signal that does not stop when the sub procedure that creates it ends.

 

I'm able to create a continuous analog signal that doesn't stop when its procedure ends by loading the necessary analog output task as soon as I pull up the .xls file, then writing values to a buffer, then stopping the analog output task, then using the WriteBinaryI16 command.

 

That code looks something like this.

 

publicStatus = DAQmxStopTask(publicAnalogOutTaskHandle)
publicStatus = DAQmxWriteBinaryI16(publicAnalogOutTaskHandle, DACwaveFormSize, True, 5, DAQmx_Val_GroupByScanNumber, buffer(0, 0), publicSampsPerChanWritten, ByVal 0&)

 

Can I use much the same procedure to output a nonstop continuous digital signal? For what it's worth, I'm using an PCI-6259 DAQ card that is connected to an SCB-68 connector block.

 

Thank you,

 

Armando83

 

0 Kudos
Message 1 of 2
(5,963 Views)

Hi Armando83,

 

Hardware timed digital output on a M-series device (62xx) can be a little tricky.  The M-series devices don't have a dedicated timing engine so you have to use an external clock, a counter configured to act as a clock, or share the sample clock from an analog task that is already running.  This process is called correlated digital I/O.

 

There are a number of VB examples on the the Code Exchange found at http://www.ni.com/community .  I've found one example that might be useful below, but I'm sure there are others that will be helpful to you as well.

 

NI-DAQmx: Correlated Digital Output in Visual Basic 6.0

http://forums.ni.com/t5/forums/replypage/board-id/230/message-id/5052

Josh B
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(5,953 Views)