Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

differential mode of PXI

I'm using PXI-4461 based on Visual Basic programming. My goal is to generate 

differential mode signal with 0.5v offset using the PXI-4461 and VB.

  

The followings are details, but I'm attaching a ppt file for better understanding of my question.

How can I shift up the negative sinewave by +1v?

The following is the VB code which is the same as the code in the attached ppt file.

---------------------------------------------------------------------------------------------------------------------------

Public Sub test(ByVal numSamples As Long, ByRef writeData() As Double, dataRate As Double)
     If chanDAQ.taskHandle <> 0 Then
        DAQmxErrChkMod DAQmxTaskControl(chanDAQ.taskHandle, DAQmx_Val_Task_Unreserve)
        DAQmxErrChkMod DAQmxStopTask(chanDAQ.taskHandle)
        DAQmxErrChkMod DAQmxCfgSampClkTiming(chanDAQ.taskHandle, "", dataRate, DAQmx_Val_Rising, DAQmx_Val_AcquisitionType_ContSamps, numSamples)
        DAQmxErrChkMod DAQmxWriteAnalogF64(chanDAQ.taskHandle, numSamples, False, 10#, DAQmx_Val_GroupByChannel, writeData(0), sampsPerChanWritten, ByVal 0&)
        DAQmxErrChkMod DAQmxStartTask(chanDAQ.taskHandle)
        chanDAQ.taskStarted = True
    End If
   
End Sub 

---------------------------------------------------------------------------------------------------------------------------

 

 

<Description to explain the same problem descripbed in the attached ppt file.> 

----------------------------------------------------------------------------------------------------------------------------------

PXI-4461 is connected to an oscilloscope with BNC cable. 4461 uses the differencial mode (NOT pseudo-differential mode)

due to some reason. The positive signal from 4461 (i.e. the center core of BNC) is connected

to channel 1 of the oscilloscope, and the negative signal (i.e. the shield of BNC) is connected to

channel 2.

Then A sinewave which has the range from 0 to 2v and 1v offset, was generated in VB program.

Then it was applied to an oscilloscope. The channel 1 of oscilloscope showed a sinewave which has

the range from 0 to 1v with 0.5v offset, and the channel 2 showed a sine which has the range

from -1v to 0v with -0.5v offset.

 

For my application, the channel 1 is ok,  but channel 2 should be shift up by 1v, basically the channel 2

should be a sine which has the range from 0v to +1v and +0.5v offset, and also its phase should lead

over 180 degree.

--------------------------------------------------------------------------------------------------------

Message Edited by talking on 05-03-2010 09:27 PM
0 Kudos
Message 1 of 4
(7,520 Views)

Good morning talking,

 

Before we try to integrate VB into the picture, it might be best to get the signal working in Measurement and Automation Explorer.  We can create a task in MAX to generate a sine wave out on the channel, and this will remove the VB and other software side of the issue.  Then we can verify that the card can put out a voltage how it is desired. 

 

I imagine you are splitting the BNC to a 2 wire pair, and then putting that 2 wire pair into another BNC cable for each channel.  Is this true? Is there a reason that you have to split the BNC output to 2 channels?  The signal should be differential, and the scope should be able to handle this.  From my recollection a scope should expect a positive signal, and a ground or negative signal to the BNC, which the analog output will provide. 

 

Also, are you using AC or DC coupling on the o-scope?  I am pretty sure that you should be using DC coupling if you are seeking an offset, and alos ensure that the signal is zero'd out correctly on the vertical scale.

 

Best,

Adam
Academic Product Manager
National Intruments
0 Kudos
Message 2 of 4
(7,492 Views)

Thank you very very much, Adam.
Let me answer to your questions first.

 

-------------------------------------------------------------------------------------------------------------
>it might be best to get the signal working in Measurement and Automation Explorer.

 

Yes, I have just tried to use MAX. But results are the same as one that I got using my VB code.
But it was good suggestion. I think using task in MAX is powerful.

 

-------------------------------------------------------------------------------------------------------------
>I imagine you are splitting the BNC to a 2 wire pair, and then putting that 2 wire pair into another BNC cable for each channel.  Is this true?

 

Yes, Correct. I followed the direction from the following document.
www.ni.com/pdf/manuals/373088a.pdf  (page 2-13, 3-3 and 3-5)
Only one BNC cable was used to make connection between a signle channel of PXI-4461 and two channels of oscilloscope.
One side of the BNC was connected to a singla channel of 4461, and then the other side of the BNC was connected to two channels of oscilloscope. As shown in page 3-3 of the following document, "+" of BNC (which means positive signal of differential mode) was connected channel 1 prober of the oscilloscipe, and "-" of BNC was connected to the channel 2 prober of oscilloscope.
Then the ground of these two probers are shared to the ground of the 4461 as shown in page 3-5.
Is this connection of the ground correct? Please let me know anythin wrong in my setup.

 

-------------------------------------------------------------------------------------------------------------
> Is there a reason that you have to split the BNC output to 2 channels?

Yes, I need the specific reason of it. I'm working on ADC test.
My first goal is to generate the differential mode sinewave signal from PXI-4461.
Then the second goal is to connect this differential signal to my differetial input ADC.
The ADC has a specification that both of positive and negative signals have 0.5v offset, and their max
voltage is 1v, and min voltage is 0v, as I showed in the ppt fiile.
So I need to first both of positivie and negative signal from 4461 on the scope. Then I can apply this signal to my ADC.
The oscilloscope is not a product dedicated for differential mode signal. This is regular one (agilent DSO5034A).

 

-------------------------------------------------------------------------------------------------------------
> From my recollection a scope should expect a positive signal, and a ground or negative signal to the BNC, which the analog output will provide. 

 

It sounds like my scope (agilent DSO5034A) might measure wrong value for offset. Isn't there any way to measure each sigle signal of differential analog signal of 4461, using my scope?

 

-------------------------------------------------------------------------------------------------------------
> are you using AC or DC coupling on the o-scope?

 

Yes, I was using DC coupling on the scope.

 

-------------------------------------------------------------------------------------------------------------
> ensure that the signal is zero'd out correctly on the vertical scale.

 

Yes, I carefully observed each signal using "cursor" from the screen of my scope.
I'm for sure, the positive signal offset was +0.5v, and the negative offset was -0.5v as shown in my ppt file.

 

 

Thanks.

talking

0 Kudos
Message 3 of 4
(7,482 Views)

Hi talking,

 

I appreciate e detailed follow-up.  Let me try to clarify a bit.  Based on the manual that you referenced or your card, you are correct that the positive signal is on the center (core) wire of the BNC, and the negative signal is on the outer shield wire of the BNC cable.  However, I do not think that you need to split the wire out into two channels, and you can just plug the BNC output to the BNC input of the scope, 1 to 1.  The connection should look like the image here, form the manual:

 

bnc.png

 

In this situation, the load is your o-scope.  Please give this a shot and see if this resolves the issue.

 

The only time that you will need to split the BNC to a 2 wire connection is if you will be inputting the signal into a screw terminal.  The BNC connection is by default a differential input, it just so happens that the negative lead can be connected to a GND signal as well.

 

Best,

Adam
Academic Product Manager
National Intruments
0 Kudos
Message 4 of 4
(7,467 Views)