LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

12-bit binary output to DAC

Hi All,

 

Please bear with my inexperience with LabView. I am currently using LabView 8.5.

 

I have somewhat of a multilevel problem, one that I have no idea how to even begin tackling.

 

I am trying to make a VI which will take 12 separate output lines from a DAQPad 6509, and I would like to sequentially convert these into binary code. I then need this binary code to be inputted into a single-input 10-bit DAC (with the last two bits written as 00). However, when I input the binary, it needs to be done with the chip select set at "low" (meaning, within the same VI, I want to have this binary generation and transmission start when I set the control for the DAC to low). Finally, also within the same VI, I want to include a reference clock with which I can tell the DAC when to begin / finish reading each bit. In essence, I need 3 separate outputs (one for main start, one for timing, and one for the binary generation). Can anybody recommend me a sample VI that can help me in meeting these requirements?

 

If 12 separate outputs is too demanding / unfeasable, I might be able also to do this with one single output line, bit I need to ensure that the timing between bits is syncronized between the two.

 

Thank you for all of your help and time!

 

David

0 Kudos
Message 1 of 5
(3,686 Views)

I don't think the USB-6509 has an onboard clock. The computer's timing probably won't be sufficient to control your DAC. You can use one of the 6509 pins as an input with an external clock source such as a function generator. I've done this with the PCI version of the 6509, see this...

 

I don't think LabVIEW base supports timed loops, so you would need the full or professional version to effectively use a 6509 as an input.

 

It will be hard to determine if you can accomplish what you want without telling us the rate you want to write to the DAC. NI makes some higher end signal generator products that might be a more appropriate choice. I'm not an expert in this area, maybe someone else will chime in...

0 Kudos
Message 2 of 5
(3,671 Views)

My dear customers,



I will like to jump in for a second and clarify some
concepts regarding the 6509. Let’s take a look at the PCI-6509, as
you can see in the specifications tab the 6509 any for factor will perform a static
digital input or output (i.e. the timing is going to be software controlled).
Since the 6509 has no counters the DIO can’t be correlated to an external
clock. You can read in an external clock to post process your data but it will
not be correlated to the data. In other words you are not reading when there is
a rising edge on the clock; you are reading when you tell it to read in.



For and application like yours you need to look at boards
with correlated DIO, like for example the 6533 or even
better and M series. The M series will have an ADC and you can use it to
compare the results of your ADC.


If you search for correlated DIO, in our site, you will find a lot of information.

I hope this helps

Jaime Hoffiz
National Instruments
Product Expert
0 Kudos
Message 3 of 5
(3,648 Views)

Thank you all for the help and suggestions. I may not have been clear in my explanation of what I need, so I apologize if I may have wasted your time.

 

With the DAQPad-6509, I want to use lines 9.0 -> 9.7 and 10.0 -> 10.1 to generate the binary

 

From the DAQPad, iIn terms of a layout of what I want to do, it is:

 

(1) Use one line (1.0) to put the DAC into a low level state, allowing for information to be written to the chip

(2) Set line 9.0 to the user defined state (high or low)

(3) Use another line (2.0) , connected to the clock on the DAC, to switch the clock to the high state, allowing for the data to be written

(4) After some delay, bring the clock to the low state

(5) Remove the setting for line 9.0, and iInput the user defined state for line 9.1

(6) Raise clock (line 2.0) to high state

(7) Bring clock (line 2.0) to low state

 

I want to repeat (5-7) for all the ports that I have set, until all the bits have been entered. Afterwards, the last step that I need is to change (line 1.0) to the high state, finalizing the writting process.

 

I don't know if I can still achieve this with my current hardware, perhaps through the use of timed loops or such. If anyone has any ideas / sample VI on how I can achieve this, that would be much appreciated.

 

Thank you so much, and again I apologize if I didn't make myself clear in the beginning or if I am mistaking your solutions to my predicament.

 

David

0 Kudos
Message 4 of 5
(3,622 Views)

Hi David,

 

find attached a really old vi , where I have sent Data via serial Protocol  ( SPI - Interface ) to a Digital Potentiometer AD5207.

In this case 10 Bit of Data will be sent twice, because of the two channels of this Device.

 

The only thing you need to do - change the 10 Bit  to 12 Bit,  remove one of the sub.vi's, reorder the Bits and replace the PortOut

with the PortOut of your DAQPad.

The scope picture shows the timing at the LPT - Port; maybe you need to look at the Datasheet of the DUT.  But I think, it is already the direction where you need to go..............and from where you can change to your needs.

 

Regards

wha

0 Kudos
Message 5 of 5
(3,608 Views)