Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

single Buffered read using DIO-32HS w/ handshaking: interface hardware question

Hi,
 
I am new to data acquisition and I have one very simple doubt. I am trying to write a simple test program using VB 5 and my very simple test board. The program is meant to read 100 times the content of port 0 (A+B) and plot it in a graph. I am using a simple home made board with a few switches on the board to generate my signal and the REQ1 signal.
 
From what I have read on the manuals and here all I would need to know is to have REQ1 high to trigger the transfer. I am using DAQ legacy drivers because I have other applications here that use that driver instead of the new one. Once I understand how this works I can change all applications to use the newer driver.
 
My code (removed error detection parts):
status = DIG_Grp_Config(deviceNumber, 1, 2, 0, 0) --> set port 0 as a 16 bits port
status = DIG_Grp_Mode(deviceNumber, 1, 3, 0, 0, 0, 0) --> set burts handshake w/ active high req
status = Set_DAQ_Device_Info(deviceNumber, ND_CLOCK_REVERSE_MODE_GR1, ND_OFF) --> i think this is not necessary but in the final application the DIO card is supposed to generate the clock signal
status = DIG_Block_In(deviceNumber, 1, StepBuffer%(0), TotalSamples&) --> start the data input
While ((remaining_points& <> 0) And (status% = 0)) 'While there are items to acquire and no error --> monitor the end of the process
    status = DIG_Block_Check(deviceNumber, 1, remaining_points&)
    DoEvents 'Return control to the host system
Wend
status = DIG_Block_Clear(deviceNumber, 1) --> terminate transfer
status = DIG_Grp_Config(deviceNumber, 1, 0, 0, 0) --> DIO back to normal
status = NIDAQPlotWaveform(StepBuffer(0), 100, WFM_DATA_I16) -- table plot
 
The problem is that the program locks and waits for the req for a long time.
 
My REQ1 input is a pull up resistor connected to pin 1 in my switch and to DIO's +5V output. The other end of the switch goes to ground. When I measure what is supposed to be my active high REQ1 (>= 2.7V) I get only 0.9V. Am i missing something on the hw side? Can I implement the REQ signal this way or is there any other better way? I want to try it with my simple board (that has no expensive parts) first before connecting it to the target system.
 
I would appreciate any help and I can provide as much information as required to answer my question.
 
Thanks in advance,






0 Kudos
Message 1 of 5
(3,819 Views)
Hello,
 
It sounds like your hardware circuitry may be improperly terminated, causing the voltage to be less than your expected value.  What is the value of your pull-up resistor?  Could you provide a schematic of your simple board and how that is connected to our DIO board? 
 
I'm assuming that you're using a terminal block such as the SCB 68? 
 
Hopefully we can get your question answered as soon as possible once we have more information. 

Regards,
 
Daniel L.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(3,815 Views)

Hi Daniel,

Thanks for the references. That is the board I am using. I am drawing the schematic right now to post it here. It is just a basic circuit that it was completely hand wired. I will get back to you in soon.

Leo.

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

Hi Daniel,

This is the circuit I am trying to use. I didnt have SW2 before. Now I am trying to read a total of 50 points using the burst handshake mode. My idea is to activate REQ1 (pin 2) using SW2 and then see the collected data (all same value) from the word long port 0 (I left DIOB disconnected intentionally). I expect to be able to change port A value (using SW1) and always read port B as zeroes (according to documentation). I have a test point to monitor the ACK1 signal. There is no power supply I am using the board's 5V line. All resistors are 10K.

If you need anything else let me know but I believe  that all I can do now is provide you my code (based on the examples for burst handshake (DIsingleBufBurstHandshake653x.VBP). I am using VB5 and I dont have Measurement Studio.

Thanks for your assistance,

0 Kudos
Message 4 of 5
(3,797 Views)
I just solved my problem. I missed a buffer from the switch to REQ1 input. Now the burst mode operates as expected. Thanks.
0 Kudos
Message 5 of 5
(3,790 Views)