Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

read digital line from DAQ and D to A conversion using Labview

Hello,
I am trying to write a VI that reads in a digital signal using a DAQ with hp34907A. The digital signal I'm trying to read was orginally analog signal converted to digital signal in the serial form of 1 start bit, 8 data bits, and 1 stop bit. I'm using labview version 6.0 and HPIB-B interface. My goal is to write a VI that reads in the signal, eliminate the start and stop bit, and converts it back to the original form, which is analog signal and graph or write data to file. I have several questions and problems as follow:
1. I have configured the DAQ hardware using GPBI interface sucessfully, however, when I tried to create a digital channel from the DAQ solution wizard, it did not list any DAQ hardware for me to choose from.
2. I used the open,close, read,write VISA to read the digital signal. However, it seems that it doesn't scan fast enough to read the changes in logic of the signal. My signal baud rate is from 0.3 to max 2.4kbps. Is there a way to change the sampling rate in labview.
3. There are several examples in labview about reading in a digital line or port, but they don't work for me since I don't know the device name or device number of my DAQ.Under Device& interface of MAX, I see the GPIB interface but cannot find the device name or number.
If you have some VI examples and instructions on how to write the VI described above, please help. Thanks a lot.
DanaDU
0 Kudos
Message 1 of 6
(3,858 Views)
When people talk about DAQ, they generaly refer to DAQ boards that are installed in the pc. Your 34970 is a GPIB instrument that does data acquisition. All of the LabVIEW DAQ examples are for pc boards and not your external box. The only place the 34970 will show up in MAX is when you do a scan for GPIN instruments. The digital sampling rate is strictly a function of the hardware inside the 34970. All you can do with LabVIEW is send the GPIB command that sets it to the fastest rate. If you haven't already, download the LabVIEW driver here.
Message 2 of 6
(3,858 Views)
Dennis, thanks for your clarification.
I'm a student and I'm new to all of this so there was some confusion. For my application, do you suggest using GPIB interface or serial interface? Another problem I have is that I'm using the multifunction module(HP 34907A) that has two non-isolated 8-bit input/output ports use for reading digital patterns. However, I only want to read in one single line(1 bit serially) of digital signal instead of a port. I tried grounding the other 7 bits and read only bit 0 in the port. I use the VISA functions to read in the pattern but I don't know how to isolate the line I am trying to read with the other lines in the port.
Any suggestion or example is greatly appreciated. Thanks,
0 Kudos
Message 3 of 6
(3,843 Views)
Given a choice, use the GPIB interface. Its faster and you don't have mess around with com settings (baud, parity, etc.) but you have to have a GPIB controller in the pc and a gpib cable. Download the driver that I mentioned in my other post. It will work with either GPIB or serial connections. There is a VI in there called HP34970A Digital Output.vi that should work. It returns the values of a digital port as an array of Booleans. To get the specific bit that you are interested in, you just have to do an index array. I believe that the elements in the array are ordered the same as the digital I/O lines so Bit0 is element 0, Bit1 is element 1, etc.
Message 4 of 6
(3,838 Views)
Dennis,
I downloaded the driver. It has about 12 VI in the folder, but I couldn't find the HP34970A Digital Output.vi that you mentioned. Thanks for your help.
0 Kudos
Message 5 of 6
(3,832 Views)
Nevermind, I got the vi. Thanks
0 Kudos
Message 6 of 6
(3,831 Views)